[CentralOH] 2014-07-26 to 2014-07-28 PyOhio Scribbles

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Sat Aug 9 22:00:55 CEST 2014


todo

send URLs to xxxxx for free cookbook URLs from Don Lancaster

lend Genius to xxxxxxx xxxxxx

archive http://www.bizjournals.com/columbus/print-edition/2014/06/27/forecast-watch-the-man-who-checks-meteorologists.html?page=all

checkout https://github.com/CarlFK

write instructions about resolution and colors

    cite videos where text can not be read

make bumper sticker for always use pip and virtualenv

thank raymond for low res presentation

    and that colors on dark were legible (at least from 1/3 back)

Warn PyOhio 2015 presenters that projectors are 1280x720.
(but Carl wants 1024x768 for video production)

    github

--------------------------------------------------------------------------------

Jason Myers
    PyTn
    Eventbrite was setting up call center in Nashville.
        got them to set up development office in Nashville. 
    works for emma

David Lindsey
    http://toastdriven.com/daniellindsley/
    boto
    tastypie RESTful APIs for Django

--------------------------------------------------------------------------------

2014-07-26

waypaver.co
Waypaver is trying to attract talent to Chattanooga to lift Chattanooga.
It is associated with a business incubator: "The Lamp Post Group".
Attracts talent, assists recuiter arm of "The Lamp Post Group".

    The Lamp Post Group
        business incubator
        supply both capital and mentorship
        and services legal, accounting, soylent, recruiting, and downtown office space
        has 31000 sq ft of shared office space
        10 subsidized apartments for new recruits and employees
        150 work at the lamp post group
        10000 work remotely
        Chattanooga (government?) and "area" funds

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

10:30 Ben Rousch - Kivy

It seems that he's doing a lot of stuff for kivy, building tools as need arises.

use buildozer
    automates much of tedium
    handles both android and ios
    it's not included with kivy, so need to install separately
        pip install buildozer

(parti)cular to Ohio Union PyOhio?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

11:30 Pandas - Jason Myers

Jason A Myers
@JASONMYERS

df = pivot_t.join(g_sum) # Join works just like SQL.
8df.fillna(0, inplace=True)

he works at Emma in Nashville
he fights spam

(almost) everything that comes out of pandas is either a series or dataframe

vincent vega javascript library to use d3 library to make really nifty charts

import vincent
# vincent natively understands pandas

get slides from github
https://github.com/jasonamyers/pyohio-2014-pandas

got panda animated GIFs from internet

--------------------------------------------------------------------------------

Carl ipython notebook

    wants to have ipython notebook conference
        in four to six months from now
        in Chicago for his convenience

timvideos.us
    can watch pyohio live (Cool!)
    don't visit this onsite from PyOhio (bandwidth hog)

native resolution of Ohio Union projectors is 1280x720 (i.e. 720p)

--------------------------------------------------------------------------------

14:00 strace - Brandon Rhodes

... | strace -o foo.txt python foo.py | ...

John Chambers noticed true grew just copyright comments
Did they copyright their copyright message?

strace -o trace.txt /bin/true

mmap2() is cool
man 2 mmap2
Does stuff from mmap2 persist after close?

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC????????????)
lsof -p PID

strace of true shows boilerplate for all programs

strace -o trace.txt python3.4 -c ''
wc -l trace.txt yields 507 lins

    foo at bar:~$ strace -o trace.txt python -c ''
    foo at bar:~$ wc trace.txt 
      878  5972 67467 trace.txt
    foo at bar:~$ 

easy_install adds a directory for each thing installed to sys.path?
zope adds 183 directories to a path

Don't use easy_install.

python3 caches stuff

what is 127.0.1.1? 

make bumper sticker for always use pip and virtualenv

ltrace follows library calls, great for SSL

truss

--------------------------------------------------------------------------------

15:00 shapely - Alison Alvarez

one of top three presentations I saw

http://nbviewer.ipython.org/github/nosila/Shapely_PyOhio/blob/master/Shapely_PyOhio_2014.ipynb
https://github.com/nosila/Shapely_PyOhio
nbviewer.ipython.org/github/

buffer is the duct tape of shapely
wkt

touching by one point in shapely is OK
touching by two points in shapely is bad

free shape stuff
https://www.census.gov/cgi-bin/geo/shapefiles2013/main

TIGER data includes water
wp:Topologically Integrated Geographic Encoding and Referencing

bowtie is bad: polygons must not cross themselves
annealing

explain validity
use it much

zip codes are for postal routes (not geographical _areas_)
ZCTA: wp:ZIP Code Tabulation Area

zipcodes.com has bad data
denoising algorithm to clean up zipcode areas

basemap is good
ZCTAs are as good as anything: voids where no people
maponics

--------------------------------------------------------------------------------

16:00 introduction to Celery - Caleb Smith

Caleb works for Cactus, which is in North Carolina

bit.ly/1k1fVLz
http://caktus.github.io/talks/pyohio/2014/celery/index.html#/slide-content
https://github.com/celery

http://www.celeryproject.org/
http://en.wikipedia.org/wiki/Celery_Task_Queue

http://en.wikipedia.org/wiki/RabbitMQ
http://en.wikipedia.org/wiki/Redis
RabbitMQ is the most robust thing that celery works with
Celery was created with RabbitMQ in mind.

Gross oversimplification: RabbitMQ is the PostgreSQL of message brokers.

https://github.com/calebsmith

--------------------------------------------------------------------------------

17:00 A new default web stack - Simon Willison
director of architecture of eventbrite

showed tiny text

solr : search engine
elastic search full text search

search engine is smart way of denormalizing data
Solr or ElasticSearch?

solr is 10 years old very robust, wants XML
elasticsearch is only a few years old json by default, runs on multiple nodes

you should never be the largest user of a piece of technology, 
because you'll be finding bugs that others won't provoke

django-haystack

celery works pretty good
redis is kind of a swiss army knife
    the more he uses it, the more he finds uses for it and the more he likes it

varnish
    phenominally great performance
        50000 pages per second? on $5/month VM
    difficult to figure out, has it own language vcl (varnish config language)

use feature flags
    release early
    deploy later
    easy rollback when problems

gargoyle (or gutter) feature flag

lanyard is a structured wikipedia for events

read-only version is useful
    easier migratoin (MySQL on EC2 to PostgreSQL on ?

statsd + graphite
    keeps track and show 

--------------------------------------------------------------------------------

kafka

jodd.org
    just increase code coverage by 1%

http://jodd.org/beta.html
We have one simple rule: just increase code coverage by 1%. We are constantly
increasing code coverage by writing more testcases. Even if the increase is
small, it is still a good thing to do.

checkout:
https://github.com/mrrrgn/filtered_websocket

--------------------------------------------------------------------------------

2014-07-27

12:00 Chris Neugebauer (aussie)

can do one true set of tools of all
http://caktus.github.io/talks/pyohio/2014/celery/index.html#/slide-content

mobile devices

web apps and discoverability
pure python apps
hybrid approaches

2008 iphone (ios) set the paradigm
touchscreens (not styli)
touchscreen keyboards
app stores
    define rules about what can be run
    app stores are the only way of discovering what's available)

ios banned flash (and python along with flash)
    until 2 years ago

ios new
    swift (new fond)
    objective c
    python

android
    is weird
    need to avoid conflicts with other players
    hence dalvik
        hence compatibility problems
        hence jython does not work on android
    chose java, so we have to work to use python on android
    moving away from jvm behaviors

    ART android run time

mobile platforms have preferred languages
official APIs also provide visual/design consistency
ios did a massive change last year

rest of this talk is about the things that python can do on mobile

part #1
web apps and discoverability
HTML+JS
designing for touch !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    no hover
    no precision
    can not see through fingers and hands
        so must not need to see what they are over
    android 48 pixel grid for buttons
    constraint-responsive UIs
        alter themselves when visual constraints change
        dimension can change much, such as when soft keyboards appear and
        disappear

web apps 

showed how bad pyohio.org is in chrome on android
make your web apps look like an app and _act_ like an app.

    preserve cookies
    remember last location on the web app
    use html offline support whereeve possible
    make it easy to get back to some place in your app

simple launchers
web view

PhoneGap
play nice in the mobile world, and nobody will care.

Part 2
Full Apps with Python
    Kivy is the leader

kivy
    pure python UI framework
    python support on ios & android

what kivy is
    custom UIs
    touch or click
    cross-platform

what kivy isn't
    "Native" UIs
        won't implement native ios look or android look
    something that will let you do mobile and desktop at once (controversy)

kivy has gotten better at accessing hardware 
    such as data from acclerometer
    PyJnius & PyObjus
    PyJnius requires much boilerplate
    PyObjus also requires much boilerplate
    Plyer is good

The future
    native UIs in Python

it looks like pyjnius was written to access android hardware

ios has a python.framework now (silently)
so now one can write native mac stuff in python

Part 3: Hybrid approach

use python for what it's actually good at
use other languages for other stuff
base most of app on web services

badness: latency, traffic
make sure that everything is repeatable

write most of app in python
with native UI shims

http://chris.neugebauer.id.au/talks/
he'll post his slides there

kivy requires embedded python interpreter as part of app
    that adds 6MB
    also startup delay

kivy
    run on mobile
    user interface toolkit

ben rousch: at least two python rebels on android store

quadriponian?

--------------------------------------------------------------------------------

13:00 Implementing Celery, Lessons Learned - Michael Robellard
works at Onshift

rabbitmq is really the way to go
he assumes that you're using it

at work has 5 stage/testing environments (on one box)
one rabbitmq

use names for queues
    stage1-*
    stage2-*
    stage3-*
    stage4-*
    stage5-*
    queue names come from config?

priorities
    create multiple queues
    high/medium/low
    assign workers to each queue
    you can assing moe or less workers as mecessary.
        can do this dynamically

handling failures
    if failure is due to bug in code, 
    rerunning it will not help

    placing failed items in a failure queue
        makes failures clear
    when to retry?
        when retries help:
            DB deadlocks
            server busy
        but not when:
            unhandled exeptions
            permanent email address failure
    log failures somewhere
        and make sure someone knows it failed
        they use sentry
            https://github.com/getsentry/sentry?
            https://getsentry.com/welcome/
            Sentry is a realtime, platform-agnostic error logging and
            aggregation platform https://getsentry.com

integration with sql alchemy
    desire to tie the creation of the task with the transaction commit
    ie, don't put in queue until transaction has finished successfully

    commit trnsaction on task completion
    rollback on task failure
    proper session handling

creating tasks in postgres
    pg_amqp
    doesn't mnatively send the content type
    hack on github to set it to json
        https://github.com/OnShift/pg_amqp
    Use specific names in your task definition

ons* chose celery over 
apache queueing thing is kafka
pica is low-level ampq library

--------------------------------------------------------------------------------

14:00 Clean code - Brandon Rhodes

really really need to study how subroutines should be used, 
Dr. Wheeler screwed us up, the biggest mistake of the last 60 years.

Need to watch his presentation over and over again.

--------------------------------------------------------------------------------

15:00 configman - Lars

great presentation!

    best use of color in a presentation

--------------------------------------------------------------------------------

16:00 SDR radios - Thomas Winningham

WBFM: wide band FM (ordinary FM broadcast)

d:ctypes
https://docs.python.org/2/library/ctypes.html
https://pypi.python.org/pypi/ctypes/
http://stackoverflow.com/questions/5081875/ctypes-beginner
http://sourceforge.net/projects/ctypes/

https://github.com/th0ma5w/rtl_fm_python

great community on reddit

dangerous prototypes
http://th0ma5w.github.io/pyohio2014/present.html#(1)

--------------------------------------------------------------------------------

tinaja.com has free PDFs of classic Cookbooks

    http://www.tinaja.com/ebooks/mlp1cb.pdf
    http://www.tinaja.com/glib/demlev2r.pdf
    http://www.tinaja.com/ebooks/mlp2cb.pdf
    http://www.tinaja.com/ebooks/tvtcb.pdf
    http://www.tinaja.com/ebksamp1.shtml

--------------------------------------------------------------------------------

http://lab.hakim.se/reveal-js/
https://github.com/hakimel/reveal.js/

--------------------------------------------------------------------------------

2014-07-28

The magic unicorn did not appear this year.

https://duckduckgo.com/html/?q=unicorn+bible

virtualenv broken with anaconda
http://en.wikipedia.org/wiki/Enthought
canopy (formerly EPD)
    it uses its own virtualenv

continuum
epd was open source but not anymore
http://www.bizjournals.com/columbus/print-edition/2014/06/27/forecast-watch-the-man-who-checks-meteorologists.html

enthought
oil gas finance
numba
bokeh
    Travis Oliphant and Peter Wang
    https://github.com/ContinuumIO/bokeh
    wp:bokeh
21st floor
training

31 gifts
    vera knockoffs

amy flatt
    young coders

greg wilson
    software carpentry

continuum analytics is the company
    travis oliphant 
        primary developer of numpy
        a founding contributor of scipy
        used to be president of enthought
    peter wang
        https://github.com/pzwang
    anaconda is product
        "deploy and manage python and other packages internally"
        package management and 
        pip apt-get

--------------------------------------------------------------------------------

thoughtbubble
ideas for places real estate
zukin design industrial designer gahanna

wp:Edward Norton Lorenz
    wp:Chaos theory
    wp:Lorenz attractor
    wp:butterfly effect
    wp:attractor#Strange_attractor
wp:Chaos: Making a New Science
http://asciidoc.org/

Einstein: His Life and Universe by Walter Isaacson
xxxxxxx recommends above biography


More information about the CentralOH mailing list