Tag Archives: Python

PyCon 2015 Talks: Best of

The following list are the talks I loved, am very curious about or plan on watching because I heard they were amaze-balls (in no particular order).

Keynote – Jacob Kaplan-Moss – Pycon 2015

Keynote – Gabriella Coleman – PyCon 2015

Julia Evans – Systems programming as a swiss army knife – PyCon 2015

David Beazley – Python Concurrency From the Ground Up: LIVE! – PyCon 2015

Allison Kaptur – Exploring is never boring: understanding CPython without reading the code

Type Hints – Guido van Rossum – PyCon 2015

Curtis Lassam – Hash Functions and You: Partners in Freedom – PyCon 2015

Sasha Laundy – Your Brain’s API: Giving and Getting Technical Help – PyCon 2015

Brandon Rhodes – Pandas From The Ground Up – PyCon 2015

Kate Heddleston – How our engineering environments are killing diversity (and how we can fix it).

Amy Hanlon – Investigating Python Wats – PyCon 2015

Raymond Hettinger – Beyond PEP 8 — Best practices for beautiful intelligible code – PyCon 2015

Brett Slatkin – How to Be More Effective with Functions – PyCon 2015

The full list of talks available on youtube here

Some notes from PyGotham (corrections welcome)

Getting Rich with Comparison Methods 

Matt Story

the truth of x == y does not imply that x != y is false […] Mind == blown and mind != blown.

pro tip: when defining ‘__eq__’ also define ‘__ne__’ its reflection method

operators like ‘<‘ have reflection properties to handle ‘>’ when overridden
right-side reflection for left-side method

how much of life is wasted by not reading documentation first?

keep-calm-and-rtfm

python has a NotImplemented error. singleton constant

MRO –> method resolution order –> use the more specific class’s methods, regardless on which side of comparison
this is the reason to use mix-ins as opposed to normal inheritance

test ALL the things
import operator module to test all the cases for bitwise and arithmetic operators

eq, ne, lt, le, gt, ge – check for existence, return the thing or NotImplemented

@functools.total_ordering – may drastically reduce the code

comparison methods are well documented. fairly robust methodology to learn which method to use on right/left side. complex so need to test.

comparison methods do not need to return bools, so you can do whatever you want. harness asymmetrical and non-boolean comparisons… useful for lazy-loaded filtering, iteration

Continue reading

Survival Guide for a Hackathon, Part: the Second

During the fourth annual TimesOpen Hack Day, hosted at the NYTimes, my team developed an application called SayWhat.

Sunlight Foundation

The main goal of SayWhat was to take advantage of the illuminating work done by the Sunlight Foundation, a nonpartisan nonprofit promoting government transparency. Sunlight harnesses the power of the internet, using technology to encourage democratic participation by creating tools and connections to open data through their APIs, so that anyone can access vital government information. Call to action of the Sunlight Foundation:

[…] we know that as government grows ever-more complex, we will all need better tools to navigate it to ensure democracy thrives. Get involved in helping us open up government, one data set at a time.

SayWhat

SayWhat is my first attempt to get involved with government data. Teaming up with 3 other attendees at the hack day, we formed a team named “Python Super PAC.” We sought a way to analyze government bills measuring various metrics of relevance, complexity and transparency. It’s a work-in-progress, but the code is up on GitHub.

Continue reading

Survival Guide for a Hackathon, Part: the First

Thinking about joining a hackathon but aren’t sure where to start?

Hackathon participation sounds awesome. But…it can also feel intimidating. Much of the ritual appears to be tribal knowledge among its veterans.  So how are newcomers able to get involved and benefit the most from their experience?

The trick is to just go: have a great time hacking, making friends and learning!

I participated (and won a prize!) in my first hackathon yesterday.  By reflecting on my experience, I’m hoping to demystify the process and provide some encouragement for other hackathon newbies.

definition of a hackathon

Continue reading