Skip to content

Instantly share code, notes, and snippets.

class Foo():
@classmethod
def _fetch(cls, data):
response = requests.get("http://example.com/my/fun/data", data=data)
return cls(response.json())
class ChildFoo(Foo):
@classmethod
def get_latest(cls):
return cls._fetch({'fleeb':'farb', 'can':'dog'})

Keybase proof

I hereby claim:

  • I am habnabit on github.
  • I am habnabit (https://keybase.io/habnabit) on keybase.
  • I have a public key whose fingerprint is 61A4 97F3 DAFE 523F 6D38 6EB4 10F2 FD0D 67DE 9C2A

To claim this, I am signing this object:

{
"depgraph": {
"pydoctor.driver": {
"twisted": 1,
"twisted.internet": 1,
"twisted.python": 1,
"twisted.web": 1,
"twisted.web.resource": 1,
"twisted.web.server": 1,
"twisted.web.vhost": 1
import treq
from twisted.internet import defer, task
def testD():
def makeRequest():
d = treq.get('http://example.com/')
d.addErrback(handleError)
return d
*.egg*
/.tox
+ rm -rf .tox
+ tox
GLOB sdist-make: /Users/habnabit/Projects/20150415-pip-2689/setup.py
py27 create: /Users/habnabit/Projects/20150415-pip-2689/.tox/py27
py27 inst: /Users/habnabit/Projects/20150415-pip-2689/.tox/dist/pip-2689-test-1.2.3.zip
py27 runtests: PYTHONHASHSEED='1241514770'
_________________________________________________________________ summary __________________________________________________________________
py27: commands succeeded
congratulations :)
+ tmp='/var/folders/q5/vn6fl1yn3zgff3jtjjl1_tjm0000gn/T//pip-*'
@habnabit
habnabit / BiblioSortingHelper.java
Created November 14, 2015 17:43
bibliocraft/mekanism compatibility
//
// Decompiled by Procyon v0.5.29
//
package jds.bibliocraft;
import net.minecraft.nbt.NBTBase;
import java.util.List;
import java.util.Collections;
import net.minecraft.util.StatCollector;
@habnabit
habnabit / .gitignore
Last active May 20, 2021 11:15
resume
*.pdf
This file has been truncated, but you can view the full file.
{"series": ["py27__C impl__all", "py27__py impl__all", "pypy__C impl__all", "pypy__C impl__first", "pypy__C impl__last", "pypy__py impl__all", "pypy__py impl__first", "pypy__py impl__last"], "benchmarks": [["lines:1m_lines__chunk_kb:2__length:10m", [[2.14279580116, 2.14249491692, 2.1622941494, 2.13530087471, 2.10460186005, 2.08753490448, 2.04609394073, 2.08531999588, 2.07630991936, 2.08709096909, 2.08721089363, 2.10943388939, 2.11120796204, 2.09325695038, 2.08585691452, 2.08312487602, 2.07958984375, 2.10070896149, 2.09706497192, 2.07089400291, 2.07461309433, 2.09783196449, 2.12072515488, 2.12280893326, 2.11985516548, 2.09099698067, 2.09562802315, 2.14534115791, 2.12346696854, 2.09102487564, 2.12976622581, 2.15593194962, 2.09182405472, 2.11156988144, 2.06978988647, 2.09079623222, 2.08487010002, 2.08858203888, 2.06922602654, 2.09331703186, 2.07288813591, 2.08446097374, 2.08769893646, 2.09053015709, 2.09105992317, 2.07839393616, 2.09628486633, 2.09186601639, 2.07222104073, 2.06711816788, 2.08442497253, 2.0901851