[u'10.57518117688789', u'43.17174576695126', u'0 10.57512669810526', u'43.17172389657181', u'0 10.57509460784044', u'43.17169116727101', u'0']   I need to turn this into a list of latitudes and longitudes that are in order from 1st to last. The first element being latitude and the second being longitude. I don't need the u or the '0'.   Right now, I'm just printing them, but this method needs to return a list of coordinates in order.   def get_coord_list_from_earth(filename):      filename = str(filename)      data = xml.dom.minidom.parse(filename)      coordinates = data.getElementsByTagName('coordinates')[0].firstChild.nodeValue     coordinates = coordinates.strip()      print coordinates.split(',')   I need it to output a list of lists like this.  [10.57518117688789, 43.17174576695126], [10.57512669810526, 43.17172389657181], [10.57509460784044, 43.17169116727101]   This link is to a sample file this would need to run with
I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:
dynamically change UIKeyboards return key The -k option (or --convert-link) will convert links in your web pages to relative after the download finishes, such as the man page says:     After the download is complete,   convert the links in the document to   make them suitable for local viewing.   This affects not only the visible   hyperlinks, but any part of the   document that links to external   content, such as embedded images,   links to style sheets, hyperlinks to   non-HTML content, etc.   So, if I didn't specify -k, can I run wget again after the download and fix that, and if so, what would be the proper command? My guess is wget -c [previous options used] [url] and run it in the same working directory as the file were downloaded to. $|e^a-e^b| \leq |a-b|$ for complex numbers with non-positive real parts How to detect Windows 64-bit platform with .NET? In a  2.0 C# application I use the following code to detect the operating system platform:  string os_platform = System.Environment.OSVersion.Platform.ToString();   This returns "Win32NT". The problem is that it returns "Win32NT" even when running on Windows Vista 64-bit.  Is there any other method to know the correct platform (32&nbsp;or 64&nbsp;bit)?  Note that it should also detect 64&nbsp;bit when run as a 32&nbsp;bit application on Windows 64&nbsp;bit. Cylindrical vs azimuthal symmetry What is the difference between cylindrical and azimuthal symmetry, are they the same? I have not been able to find a clear explanation of these terms wrt. a cylinder. I need to know which length I should integrate over to solve the problem below.  A cylinder of radius $R$ and length $L$ has a cylindrically symmetric volume charge density of $\rho(x)$. Calculate the total charge on the cylinder. Why does pgfplots plot functions only until x = 5 and y = 5, but not any further?    \documentclass{article}  \usepackage{tikz} \usepackage{pgfplots}  %%%&lt; \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{5pt} %%%&gt;  \begin{document} \begin{tikzpicture} \begin{axis}[samples=100,ymin=0,ymax=10,xmin=0,xmax=20]  \addplot [thick] plot  (\x,  {1/(1 + exp(-0.6*(\x - 12)))}); \addplot plot (\x, {\x});  \end{axis} \end{tikzpicture} \end{document} Square bracket notation for dimensions and units: usage and conventions iPhone's Bluetooth - What? Why? How? I googled a lot and read many documents. But I can't understand the concept behind iPhone's Bluetooth technology.  In my knowledge, Bluetooth was used for:   Transferring files between devices Wireless communication for things like video gaming and earphones   Recently I tried to copy some of the photos from my old Android mobile to my iPhone 4S via Bluetooth. It's quite simple in my older phones to connect with other devices by Bluetooth for file sharing. But I can't pair other devices (even another iPhone :( ) with my iPhone 4S.   Copying songs/videos may affect their iTunes as well as their business. But what about images? Why is the usage of Bluetooth restricted and what's the use of it being able to transfer images? Is there any other way to use iPhone's Bluetooth to transfer files? Maybe using an app? But I don't want to jailbreak my device.   I'm confused about the restrictions and Apple's thinking. How do I import a Python module given its relative path?  For example, if dirFoo contains Foo.py and dirBar, and dirBar contains Bar.py, how do I import Bar.py into Foo.py?  Here's a visual representation:  dirFoo\     Foo.py     dirBar\         Bar.py   Foo wishes to include Bar, but restructuring the folder hierarchy is not an option. I've heard that special relativity makes the concept of magnetic fields irrelevant, replacing them with relativistic effects between charges moving in different velocity frames. Is this true? If so, how does this work? What is the difference between “say” and “tell”? I really get confused when to use say and when to use tell. Which is appropriate in the following:   What did he tell? / What did he say? What are you saying? / What are you telling? Parentheses around more than one paragraph Does English allow one to put parentheses around more than one paragraph? Example:     Paragraph 1.      (Paragraph 2.      Paragraph 3.)      Paragraph 4.   (Of course, this is just a simple example. In reality, it looks more clean since the paragraphs are more than one line long, and are not separated by an empty line.) Prevent iTunes from starting when iPhone/iPod/iPad is plugged in on Windows Is there any way to prevent iTunes from starting under XP when an iPhone is plugged in?  Using iTunes v 9.  Usually I just want to charge my phone and don't want iTunes to start.  Note: Exact  of this question - except this is for v9 on Windows.  The answer in the related question doesn't work for me. Multiple logistic regression power analysis I have a logistic regression model and output an $R^2$ value. I then go and add another predictor variable to fit a second model. I can output a new $R^2$ value associated with the second model. When I run an ANOVA test, I see no significant improvement in the second model, but I want to assess the power associated with including the additional variable in model 2.  I have found  for linear regression that uses an $F$-Test. I want to do something similar for a logistic regression using G*Power.   But there appears to be very little documentation on multiple logistic regression models like my situation. .  From what I understand, in G*Power I set Test Family == z tests and statistical test == logisitic regression. But I am not sure what to set R² other X equal to. Is that the improvement in $R^2$?  Reading the tutorial in 27.4 from the  makes no variation of $R^2$, whereas , does not discuss the improvements made from $R^2$. I use Firefox 35.0 on my Macbook to access Stack Exchange. Recently whenever I access a message or Community site, the "spinning circle" indicating activity starts, and never stops. This doesn't seem to happen on other non-Stack Exchange sites.  Has there been any change to the SE code which may have caused this.    The Web Developer Console shows  The connection to ws://qa.sockets.stackexchange.com/ was interrupted while the page was loading. full.en.js:1 Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. jquery.min.js:3 Elementary OS PPA gives “The repository does not have a Release file.” error I am running Ubuntu Bionic Beaver. I was trying to download the pantheon desktop environment on Ubuntu and it didn't work so I gave up. Now when I try to download themes or other things from the terminal I get an error code mentioning Elementary OS even though what I am downloading doesn't have to do with Elementary or pantheon. Here is what the terminal says:   jacob@jacob-MacBookPro:~$ sudo apt-add-repository ppa:tista/adapta -y …                                           E: The repository 'http://ppa.launchpad.net/elementary-os/testing/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/mpstark/elementary-tweaks-daily/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. What do the fields in ls -al output mean? The ls -al command shows the following output;  -rwxrw-r--    10    root   root 2048    Jan 13 07:11 afile.exe   What are all the fields in the preceding display? I have a 3-wire  that looks like this:    I'm trying to wire it up to my Arduino to detect changes in weight. From what I understand, the changes in voltage are so small that the Arduino can't detect the changes without amplifying the voltage. So I bought an  at  that looks something this:    I found  that shows how to wire everything up. However, I can't figure out the schematic and why they are using two load sensors instead of just one. They also mention resistors but I'm not sure why they are using them (and why the sizes they chose), or where in the circuit to put them.  Can someone please help me figure out how to wire this thing up to detect changes in voltage? Also, is there a way to do this by using only one of these sensors? This is what I've done so far:    The amp also has some pins that I don't understand: Offset null, NC. What are these pins for? Should I be using them?  Update: Now I am working with an Instrumentation Amplifier (). I also now have a 4-wire load sensor that I am playing with. Still can't get it to work, but I thought I would try to understand that before moving to the 3-wire load sensor. Proper subspaces of $ R^n $ I'm trying to prove that proper subspaces of $ R^n $ are closed and have empty interiors.  To prove that they are closed I'm trying to use the fact that inverse images of closed sets are closed sets by continuous functions. So I'm trying to find a linear map such that a proper subspace of $ R^n $ is its Kernel but I don't know how to express it so that it would work on all dimensions.  Regarding the fact that they have empty interiors, I really don't know what to do.  Thanks in advance. Not enough storage I have an 8GB iPhone. I've had not enough storage for a while so I went through my photos and deleted 100. I also deleted old notes that I don't need. I also deleted an app of 81.5 MB. I tried downloading an app of 22.1 MB but it's telling me I don't have enough storage. Is this a bug or do I just not have enough storage?