If compiling anything against a Python.h installed by homebrew install python
raises the warning (promoted to an error) ‘PyArg_ParseTuple’ is an unrecognized format function type
, review this Homebrew issue and then edit the appropriate pyconfig.h to comment out the line #define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
.
The Python builtin repr()
doesn't seem to take into account the object's __repr__
class Foo(object):
__repr__ = lambda self: "class"
def __init__(self, a):
self.__repr__ = lambda: "object"
foo = Foo('object')
print foo # "class"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table.prod-specs { | |
font-size: 12px; | |
width: 100%; | |
margin-bottom: 25px; | |
} | |
table.prod-specs thead { | |
border-bottom: 1px solid #000; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A and Z are collections of closed segments defined by their 1-d endpoints. | |
Each is sorted according to the start position of the segment. | |
Place these segments on a line according to the following constraints: | |
- segments from Z must absolutely retain their position. | |
- if a segment from A starts before a segment from Z but overlaps with it, | |
split it in two. The part before the segment in Z retains its position, and | |
the second part comes after the segment from Z. This can happen multiple | |
times as needed. | |
- if a segment from A overlaps with a segment from Z but doesn't start | |
before, simply move it after the segment from Z. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A = new webkitAudioContext(); | |
vol = A.createGainNode(); vol.gain.value = 0.3; vol.connect(A.destination); | |
osc1 = A.createOscillator(); osc1.frequency.value = 40; osc1.noteOn(0); osc1.connect(vol); | |
osc2 = A.createOscillator(); osc2.frequency.value = 75; osc2.noteOn(0); osc2.connect(vol); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import functools | |
import inspect | |
class Field(object): | |
def __init__(self, selector=None): | |
self._value = None | |
self.selector = selector | |
def _get_element(self, selector=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtualenv --no-site-packages . | |
. bin/activate | |
pip install jinja2 tornado pyzmq ipython | |
pip install pattern | |
pip install numpy | |
sudo brew install gfortran | |
pip install scipy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am aGHz on github. | |
* I am aghz (https://keybase.io/aghz) on keybase. | |
* I have a public key whose fingerprint is 766F 087E 98A6 0413 734D A526 7C11 DD4F 7836 4FC0 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
zmq_sockets = require('./zmq_sockets'), | |
log4js = require('log4js'); | |
log4js.loadAppender('file'); | |
log4js.addAppender(log4js.appenders.file('/tmp/INode.log')); | |
var logger = log4js.getLogger("app"); | |
function startKernel(configFile) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ghx-issue-compact .ghx-end .ghx-statistic-badge { | |
margin-left: 34px; | |
} | |
.ghx-issue-compact .ghx-end .ghx-statistic-badge.ghx-spacer { | |
margin-left: 34px; | |
} | |
.ghx-issue-compact .ghx-end .ghx-avatar-img + .ghx-statistic-badge.ghx-spacer { | |
margin-left: 36px; | |
} | |
OlderNewer