- FLOSS weekly
- Freakonomics
- IEEE Spectrum
- Radio Free Python
- Risky Business
- Security Now!
- WNYC's Radiolab
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
"""Cooperative, deferred based consumption and processing of mixed iterators. | |
Iterators may return values, or deferreds that will eventually return values. | |
After consuming a value from the iterator, control is voluntarily yielded to | |
other iterators waiting to be processed. | |
""" | |
from twisted.internet import defer, reactor, task | |
def iterate(iterator): | |
"""Consume next value from iterator |
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
"""Proof of concept for adding external actions to Jinja2 templates | |
Demonstrates how control may be passed out of Jinja2 where additional | |
processing could occur and a value be passed back. Targetted use case is using | |
Jinja2 as a templating language for API endpoints. | |
""" | |
import os | |
import random | |
import string | |
import sys |
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
import magic | |
import weakref | |
class Container(object): | |
def __init__(self): | |
_magic = magic.Magic() | |
cleanup = lambda _: _magic.close() | |
self._magic_weakref = weakref.ref(self, cleanup) |
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
Nick is a Boulder resident working remotely for Lab305, specializing in the | |
development and deployment of Python web applications using the Django web | |
framework. Nick's work sees him contributing open source projects in all areas | |
of web development. From Bootstrap CSS scaffold plugins for Django, to | |
presenting on using Salt as a configuration management tool with Django | |
deployments. Nick has earned experience in all areas of building, deploying and | |
maintaining web sites. | |
Nick's other great passion is ultra-running, a pursuit characterized by | |
dedication, determination and a disregard for pain and self preservation. So |
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
(ogrisel27-2)192-168-1-7:~ aaroniles$ nosetests sklearn | |
/Users/aaroniles/.virtualenvs/ogrisel27-2/lib/python2.7/site-packages/sklearn/pls.py:7: DeprecationWarning: This module has been moved to cross_decomposition and will be removed in 0.16 | |
"removed in 0.16", DeprecationWarning) | |
......./Users/aaroniles/.virtualenvs/ogrisel27-2/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/arpack/arpack.py:1664: RuntimeWarning: invalid value encountered in sqrt | |
s = np.sqrt(eigvals) | |
...........................S.........................................../Users/aaroniles/.virtualenvs/ogrisel27-2/lib/python2.7/site-packages/sklearn/manifold/spectral_embedding_.py:226: UserWarning: Graph is not fully connected, spectral embedding may not work as expected. | |
warnings.warn("Graph is not fully connected, spectral embedding" | |
......./Users/aaroniles/.virtualenvs/ogrisel27-2/lib/python2.7/site-packages/sklearn/covariance/graph_lasso_.py:193: RuntimeWarning: invalid value encountered in multiply | |
* coefs) | |
/Users/aaroniles/.v |
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
$ python subcommands.py --help | |
usage: subcommands.py [-h] [-v | -q] | |
[--loglvl {DEBUG,INFO,WARNING,ERROR,CRITICAL}] | |
[--logfile LOGFILE] [--logfmt LOGFMT] | |
{goodbye,hello} ... | |
Greetings and salutations | |
optional arguments: | |
-h, --help show this help message and exit |
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
$ python2.7 | |
Python 2.7.3 (default, Sep 18 2012, 21:28:33) | |
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> type(type.__new__) | |
<type 'builtin_function_or_method'> | |
>>> | |
$ pypy | |
Python 2.7.2 (341e1e3821ff, Jun 07 2012, 15:42:54) |
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
diff -r 8fb438e7f738 Objects/dictobject.c | |
--- a/Objects/dictobject.c Sun Oct 21 18:31:25 2012 -0700 | |
+++ b/Objects/dictobject.c Mon Oct 22 20:27:51 2012 +1100 | |
@@ -235,6 +235,31 @@ | |
static int dictresize(PyDictObject *mp, Py_ssize_t minused); | |
+/* | |
+Hash randomisation by repated folding controlled by a seed value. The seed | |
+value used is the address of the dict object. This breaks copy but avoids the |
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
"""Wrapper for cffi cdata objects to enable coownership of memory. | |
When a cdata object that owns memory is used to set a pointer in a C structure | |
owned by another cdata object, references to both cdata objects must be held to | |
prevent memory from being released early. | |
Coownership enables the C structure's cdata object to hold a reference to the | |
cdata owner the memory it has been initialised with. Preventing the memory from | |
being released until it itself is garbage collected. | |
""" |