The jar is 12 wide and 7 tall and 5 deep, so I went with 12*7*5. I guess I should have accounted for the curved shape and divided by like 1.3. oh well.
And then multiplied for the natural packing density of spheres, and then divided a little bit because m&ms aren't spherical.
In mathematics, Euler's identity (also known as Euler's equation) is the equality
where
e is Euler's number, the base of natural logarithms,
i is the imaginary unit, which satisfies i2 = −1, and
π is pi, the ratio of the circumference of a circle to its diameter.
Euler's identity is named after the Swiss mathematician Leonhard Euler. It is considered an example of mathematical beauty.
== Explanation ==
Euler's identity is a special case of Euler's formula from complex analysis, which states that for any real number x,
where the values of the trigonometric functions sine and cosine are given...
Strange, I recall the Euler's Identity article having a very cool animated 3d gif which gave a lovely intuitive explanation for the values in the relation.
Although there are generation techniques that output decimal digits, so you could use those to get as much precision as you want, way beyond what a float can provide.
What if the circle whose circumference you're trying to calculate, has a radius that passes through a strong gravity well that stretches spacetime appreciably?
Kids at home, build your own joke from these parts: 1. "Super bowl LI". 2. "the NFL needs greater ethnic diversity amongst its players". 3. "Li is a common Chinese surname"
Get your parent's permission before using power tools.
Though my girlfriend and I are in almost nearly the opposite situation. Been together for nearly a decade, had a kid, but haven't got around to marrying.
Speaking of which, if you can cope with the inevitable "romance" aspects, Jane the Virgin is a quite entertaining parody of Latin American telenovelas.
Some days I wonder if I'm going to meet some kid who comes up to me and tells me "I think you're my father". She'll be precocious and cute but resent me for never having been around, which under the circumstances I'll think is kind of unfair.
@DSM ... and then you'll have to solve the murder for which her mother was wrongfully convicted, during the course of which you'll discover a bond that etc. etc. etc. ?
"I am a data scientist before a programmer" and "I am not using pandas, and would like to avoid the added overhead it would bring."? If you're not a programmer, shouldn't you be using the highest-level tools available to you?
Oh, well. Suppose I should be grateful the competition is so willing to shoot themselves in the foot.
They're running on a Python implementation that doesn't support it; they're doing a lot of processing of data which is too big to keep in memory; I can think of a few reasons, but very few of them apply to the typical user.
Hey guys BeautifulSoup question here: goo.gl/oVQIhU - I want to get the text string from the element, while also encoding the é character as an HTML entity. I'm having trouble doing both with BeautifulSoup...
I would like to meet more people like myself. Yesterday I thought, "I know, tomorrow I will wear a green shirt and stand in the cafeteria. Everyone like me will have the same idea, and I will be able to identify them by their green shirts."
But this didn't work. I don't know what went wrong.
@Martin same problem as before, huh? You said you're using SublimeText to run Python, right? Is it possible that SublimeText auto-parses the HTML entity?
Ok yeah sorry that's where I'm having problems.. I want to use something like .prettify('ascii') so that I can use it, but I also want to remove the tags from that output
@DSM Alrighty, thanks a lot, noted. Is continuously changing the seed number every now and then makes randrange a valid RNG for a Monte Carlo type of simulation?
im trying to build an executable (for 32bit windows xp) from a python script (which uses lots of eggs)
i considered py2exe(0.6.9), PyInstaller (1.4) and cx_Freeze (4.1.2)
py2exe doesnt like eggs for breakfast
PyInstaller doesnt like python 2.6 for lunch)
so i went with cx_Freeze (supposed to ...
I've hit a bit of a hurdle porting some python2 code over to python3. It was using pypy before and an older version of cffi. Now that I've moved to python3.4 this is no longer working:
from cffi import FFI
ffi = FFI()
ffi.cdef("""
typedef unsigned int mode_t;
int shm_open(const char *name, int oflag, mode_t mode);
int shm_unlink(const char *name);
""")
C = ffi.verify("""
#include <sys/mman.h>
""")
What are some of the more popular questions on Stack Overflow that have been deleted?
This is an archive of popular deleted questions on Stack Overflow, mostly from the days when a broader range of questions were allowed. Also, they may be a poor question, but have really good answers.
If some...
flask is pretty easy ... you would have to code it all or use flask-restless to provide api endpoints to sqlalchemy models ... with django you literally just create the models and register them and it give you crud backend through /admin
to be fair there is probably a flask-crud out there
@Phonon: that's not how I'd put it. With Monte Carlo sims you typically set a seed at the start of the simulation. Python's RNG is strong enough for production use.
@JoranBeasley Nah, angular is like for single page web applications. Instead of getting HTML, it gets JSON from an API and updates the DOM. So, in a way yes
if you run schema you should see the tables ... maybe they dont show up in that metadata thing if they are empty or something ... I would check the file directly with the command line tool
I ran down a bug today that came about because I was using next() to extract a value, and 'not found' emits a StopIteration.
Normally that would halt the program, but the function using next was being called inside an all() iteration, so the all just terminated early and returned True.
Is this ...
Is it sad that I'm using IPython to grep a file's contents because I can never remember the special rules I have to remember so I don't bug out findstr on Windows?