Pythagorean "Paradox" (right-angled triangle).
The staircase paradox, or why $\pi\ne4$
I am trying to estimate summary statistics of points located inside a polygon. Each points in the point layer is associated with N attributes. My target is to summarize (say mean, min,..) the attributes of points located within a polygon and populate the attribute fields of the corresponding polygon.   I am looking for a solution using GeoPandas or other Python libraries.   import geopandas as gpd    gdf_points = gpd.read_file('/path_to_points.json') gdf_polygon = gpd.read_file('/path_to_polygons.json')  dfsjoin = gpd.sjoin(gdf_polygon ,gdf_points)   Now, how can I summarize the stats for each attribute in the point layer and add it to the polygon shapefile? Which function can I use?  I am looking for something that is functionally equivalent to ESRI ArcGIS  with I was looking at  on why  and emission lines don't cancel out:      An experiment shining light on the material and looking at the   reflected spectrum will see absorption lines at those frequencies,   because the relaxation of the excited electrons will emit back   radiation all around randomly, whereas the reflected spectrum is at a   specific angle.   However it is not totally convincing to me. The photons that get emitted towards the center of the Sun (by the electrons in higher energy states that absorbed a photon earlier) would get absorbed again when they hit a different electron (and then re-emitted) and would eventually make it out. So why don't absorption and emission lines cancel out in our Sun? To my knowledge there are three types of acceleration when a body (e.g. a rod) is moving in a circle about an axis. These are:   Angular acceleration : this is the rate of change of angular velocity. Tangential acceleration : this is the linear acceleration of the system in a tangential direction to the circle and equals the radius times the angular acceleration. Radial/centripetal acceleration : this is the linear acceleration of the system that is directed inwards towards the center of the circle.   I also think there are two types of velocity:   Linear velocity: this is its velocity in the tangential direction and is constantly changing Angular velocity or angular frequency: this is the rate of change of angle.   Is the above correct? And have I missed anything? Spanning volume disk usage I have two SSD disks of 256GB and I want to create a single spanning volume of 512GB. I am using Windows 10. What I want to know is how will Windows handle this under the hood.  Will the first disk fill up before the second one starts being used, or will Windows use both disks. For example, if I have 256GB of data on the spanning volume, will it be divided to 128GB on first and 128GB on second physical disk or will it all be on the first disk with the second disk empty? Would this behavior be any different if I were using two HDDs? What is wrong with code snippets/blocks on Stack Overflow? I wasn't following Meta Stack Overflow too closely so maybe something was changed that I'm not aware of. But each time I paste a snippet from a Python console I'm getting wrong formatting. What I'm doing wrong? It seems that &gt;&gt;&gt; is confusing for Stack Overflow. I've tried to escape it with backslashes, and it was working fine in preview but doesn't work after the question is rendered.  I was able to observe that problem on: recent Chrome (Windows, Mac), Safari 4 (Mac).  Here is  I wasn't able to make right.  Funny, I think the snippets are rendered just fine on Meta Stack Overflow. Here is one:  &gt;&gt;&gt; def throw(): raise Exception()  ...  &gt;&gt;&gt; a=1 &gt;&gt;&gt; a=throw() Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt;   File "&lt;stdin&gt;", line 1, in throw Exception &gt;&gt;&gt; a 1 Remove all packages installed from a PPA? I have installed LibreOffice 4 using PPA. I was using LibreOffice 3, then  I had upgraded to LibreOffice 4, because I was somewhat eager to try a new version.   Now since I found that LibreOffice 4 has some issues, including handling my native language, I want to move back to LibreOffice 3.  This question  has already some answers which has some similarity with my above mentioned issue, but it does not solve my problem. This question talks about downgrading from a specific version of LibreOffice, namely from 4.0 to 3.6. The solutions mentioned are not the ones I am looking for. They will work, but the  solutions suggest either downloading .deb files for LibreOffice 3.6 or adding PPA for them. Furthermore, some of the answers put out-of-proportion~(applicable for the solution, however) stress on use of , not general command-line-solution.     I want a general solution without using PPA or downloading .deb files. All I want is to move back from the (higher) PPA version to the (lower) official version.  Anyway, in order to accomplish this, I removed the LibreOffice config directory from my home and then purged LibreOffice from my machine.  sudo apt-get purge libreoffice-*   Then I removed the relevant PPA's using the sudo apt-add-repository --remove command. And then ran sudo apt-get update.  Now, when I try to install LibreOffice using the command  sudo apt-get install libreoffice   I get an avalanche of output about unmet dependencies, something like,   The following packages have unmet dependencies:  libreoffice : Depends: libreoffice-core (= 1:3.5.7-0ubuntu4) but it is not going to be installed (snipped)    If I dig the issue further, by using the command,  sudo apt-get install libreoffice-core   I get    The following packages have unmet dependencies:  libreoffice-core : Depends: libreoffice-common (&gt; 1:3.5.7) but it is not going to be installed                 Depends: libexttextcat0 (&gt;= 2.2-8) but it is not going to be installed                 Depends: ure (&gt;= 3.5.7~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.    Could you please tell me how do I install LibreOffice 3 in my machine?  I am using Ubuntu 12.04 LTS.    EDIT  Before receiving , I was wondering, at this very moment, if I take a fresh computer, and install Ubuntu 12.04, LibreOffice installation will work without a hitch. Then why I can not install LibreOffice in my 12.04 machine today from simple command line?  Then the accepted answer clarified everything. I need to use ppa-purge so that this resets all packages from a PPA to the standard versions released for my distribution.  Basically it is like a way to restore my system back to the way it was before my installed packages from a PPA.  further elaborates the idea.    worked perfectly for me. Actually, this was an education for me since it taught me how do downgrade a package that was added via PPA. And I realized that the answer actually teaches us to "move from PPA installation  of a package to official lower version package." How to prove $\sum_{n=0}^{\infty} \frac{n^2}{2^n} = 6$? I'd like to find out why  \begin{align} \sum_{n=0}^{\infty} \frac{n^2}{2^n} = 6 \end{align}  I tried to rewrite it into a geometric series  \begin{align} \sum_{n=0}^{\infty} \frac{n^2}{2^n} = \sum_{n=0}^{\infty} \Big(\frac{1}{2}\Big)^nn^2 \end{align}  But I don't know what to do with the $n^2$. Unable to change payment information to NONE in iOS Appstore Ever since adding an iTunes gift card to my account, I'm getting verification requests like crazy. I can't even download free apps. It takes me to my payment info and when I try to select none, I continually get a message under the payment info that says "you must verify your payment info to continue"  I don't want a credit card on file and would really like the none option to work. My ID shows I still have iTunes credit. How to correctly enable Desktop Cube in Unity 3D? Eclipse: Can you format code on save? In Eclipse, under Windows -> Preference -> Java -> Code Style, you can define code templates for comments and code, and you can setup a code formatter.   I'm wondering if it is possible in Eclipse to have these setting take affect every time I save a source file.  Basically, instead of me highlighting everything and pressing Ctrl+Shift+F, I want Eclipse to be responsible for making sure my code is formatted properly.  Is this possible and how do you set it up?  Note On Using the Auto-Format:  It's probably best to choose "Format Edited Lines" as merging changes becomes very difficult when you reformat a whole file that is in source control already that was not formatted properly. Already did this to a co-worker. It's been sometime and Google has yet to index my site. How can I get Google to index my website? It is impossible for $(x-1)^2+x^2+(x+1)^2$ to be a perfect square Prove that it is impossible for three consecutive squares to sum to another perfect square. I have tried for the three numbers $x-1$, $x$, and $x+1$. Examples of patterns that eventually fail Often, when I try to describe mathematics to the layman, I find myself struggling to convince them of the importance and consequence of "proof". I receive responses like: "surely if Collatz is true up to $20×2^{58}$, then it must always be true?"; and "the sequence of number of edges on a complete graph starts $0,1,3,6,10$, so the next term must be 15 etc."  Granted, this second statement is less logically unsound than the first since it's not difficult to see the reason why the sequence must continue as such; nevertheless, the statement was made on a premise that boils down to "interesting patterns must always continue".  I try to counter this logic by creating a ridiculous argument like "the numbers $1,2,3,4,5$ are less than $100$, so surely all numbers are", but this usually fails to be convincing.  So, are there any examples of non-trivial patterns that appear to be true for a large number of small cases, but then fail for some larger case? A good answer to this question should:   be one which could be explained to the layman without having to subject them to a 24 lecture course of background material, and have as a minimal counterexample a case which cannot (feasibly) be checked without the use of a computer.   I believe conditions 1. and 2. make my question specific enough to have in some sense a "right" (or at least a "not wrong") answer; but I'd be happy to clarify if this is not the case. I suppose I'm expecting an answer to come from number theory, but can see that areas like graph theory, combinatorics more generally and set theory could potentially offer suitable answers. I love the subset of collective nouns known as the terms of venery. These are collective nouns specific to a particular group of animals. Some of the more inventive examples are: a murder of crows, a crash of rhinos, a mischief of mice, and a puddling of ducks (specifically swimming ducks).  Is there a standard for these group names and is there a central reference for them as with other zoological taxonomy?  I can see in the Wikipedia articles that the practice has its origins in Medieval Hunting tradition, but the Kangaroo (Mob), for instance would have been unknown at that time, so how do new collections come into being? Persistent Network Configuration using KVM and libvirt I am trying to create a simple page using Bootstrap within salesforce. I need this page to have the standard salesforce header and sidebar.  When I use the standard bootstrap library via a CDN and the page is affecting all the CSS styling for my standard salesforce headers and side bars. Any help on how to prevent this ? Why did Dumbledore drink the potion in the attempt to get a Horcrux? When Albus Dumbledore  finally reaches the island with Harry Potter and finds out that you can't get near the potion, he made a cup and drank it. Why couldn't he just have poured the potion on the "floor"? Why couldn't he have made a big cup to hold almost everything inside the basin? Administrator URL '&' changed to '&amp;' Let $A,B$ be any two sets. I really think that the statement $|A|\leq|B|$ or $|B|\leq|A|$ is true. Formally:     $$\forall A\forall B[\,|A|\leq|B| \lor\ |B|\leq|A|\,]$$   If this statement is true, what is the proof ? How to add citation for a whole paragraph? If I write a report and a whole paragraph is based on one source but not cited verbally it seems unnecessary to include the reference after every sentence:  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua (source 1). Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat (source 1).  Now I found a Phd thesis that puts the reference after the last dot of the paragraph to indicate that it is based on this very source:  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. (source 1)  Is this a common practice? Is it generally understood? What are other ways to add the reference for a whole paragraph?