LCAuckland
LCA: 12-16 January 2015
Program online in next year or 2.
Singapore also put in proposal for future LCA.
6-700 attendees hoped.
Heritage Preserve #WeWantJam
Grabbed 30TBs of .co.nz internet.
2 days of catering, hacking.
If you’d like to do it again tweet #WeWantJam
Less Boilerplate
import argparse
Command line
http://github.com/aliles/begins
Command line programs for busy developers.
Show us the world
rbenv - isolate different
pyenv shell 3.4.1
pyenv virtualenv name
pyenv local dirname
MySQL performance schema
Debugging schema for the database.
Can configure at runtime.
5.5 or 6 dbs.
Julia
Very pythonic. Stolen lots of good ideas from Python.
Compiled just in time. Timing a file that does nothing it takes 2.25s.
The Python Promotion Pamphlet
International Python Promotion Pamphlet. Glossy & stylised.
Creating NZ-version. Will have high-quality printable version and web-version.
Make your company more visible to Python programmers rather than pay recruitment agents.
Blackbox
http://sheltered-forest-9460.herokuapp.com
http://github.com/tuxbert/blackbox
NZPUG
When you subscribe to the mailing list (607 members on mailing list) you aren’t a member of the incorporated society.
Jessica McKellar’s Kiwi PyCon73,000 views. Far more than Guido McV’s keynote at PyCon US.
Thomi is commandeering LT and announcing my leaving committee and asking if someone can join NZPUG committee. See committee members if would like to join.
Docker for Python
Will do to IT industry what container box did to shipping industry.
LXC (Linux Lightweight Containers) + UnionFS.
Docker file is essentially like a bash script file of commands.
You can inherit from other docker files.
Fig - Vagrant for Docker.
Ship deltas not images.
Shipyard - 3rd party ecosystem.
Gotchas
- Use docker-osx, PyCharm
Object Factories
Sole object is to create objects for testing purposes.
Don’t care about what object is. Just assign random attributes to objects.
Code Obfuscation
Weird bugs: object() > object()
If doing tests against time it will fail at midnight depending on your timezone.
False = True
Arduino + Thermal Printer + Python
Arduino sketch, Python script, Git
http://github.com/nick-NZ/Arduino-pull-request-printer
Dynamically creating Python tutorials and presentations
Massey Computer Science moved to Python in 2011.
Emacs: an operating system disguised as an editor.
Org-babel - generate code.
Org-slidy
Bad-ass Postgres Tricks
- Template Databases - clone dbs
- Estimated Counts
- Hstore - values have to be strings
- Smart Indexes
- Schema Change Locks
- PL/Python
“One button” test and deploy on AWS
Use Vagrant+Ansible
Scripted creation of AMI and deployment.
Python Antipatterns
Better: list comprehension
Better: raise AssertionError
Better: if pattern in input_str
Don’t pass empty list as default are.
if 5 <= i < 10: print “something”
Better: return NotImplementedError
Map reduction using Python scripts
Script to create ArcMap maps.
Making weird maps with Python
Pulled data from census + meshblock boundaries (Koordinates.com) + map box (tile mill) + GDAL.
Should have used Fiona + Shapely.