pyexcelerate : 10.11
xlwt : 15.67
xlsxwriter (optimised): 19.70
xlsxwriter : 23.50
openpyxl (optimised): 95.82
openpyxl : 95.90
It's not really a Flask issue, but the Flask guys were super helpful when I asked why my large dictionary wasn't released from memory: https://github.com/mitsuhiko/flask/issues/1202
I dug even deeper and learned this is a Linux thing:
"Python returns memory to the OS on the heap (that allocates other objects than small objects) only on Windows, if you run on Linux, you can only see the total memory used by your program increase."
Turning it into a function and running it as a separate process: https://gist.github.com/pawl/95769724848269cff890
If you want to go even deeper down the rabbit hole, read these:
- "most malloc implementations will not release memory to the operating system, and the few that do, do not do it very easily" -http://stackoverflow.com/questions/2215259/will-malloc-implementations-return-free-ed-memory-back-to-the-system
- "We compiled a version of Python with TCMalloc that only uses mmap. When testing the new Python in one of our largest projects, we found that not only did Python give back memory to the OS correctly, it also had a reduced memory usage and no apparent CPU penalty for using mmap instead of brk." - http://pushingtheweb.com/2010/06/python-and-tcmalloc/
screen -S 8890.foo -X sessionname bar
"it is cheaper to use a try statement" when checking to see if a key exists in a dictionary (inside of a loop).
I never fixed the issue or found anyone else with the issue. I ended up switching to bx-python instead: https://www.biostars.org/p/99/#100
If Pandas's Group By is applying the function in Apply twice to the first item, it's actually expected behavior according to the warning in the documentation: http://pandas.pydata.org/pandas-docs/stable/groupby.html#flexible-apply
You'll need to have used virtualenv to appreciate this.
Basically, you create virtual environments with "mkvirtualenv" and they're stored in a central location. When you want to switch to your virtual environment, you use the "workon" command.
You can also create a postactivate script that loads environmental variables when you switch to your virtual environment.
Note: There is also a module called Pew that seems to have a simpler installation process: https://github.com/berdario/pew
The error seems to happen when you duplicate the address of another venue. I was able to add the venue, but when I tried to add it a second time - I would get this error.
I ended up getting the list of venues and trying to find a match first.