Skip to content

Instantly share code, notes, and snippets.

Moshe Zadka moshez

Block or report user

Report or block moshez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@moshez
moshez / france-twisted.rst
Last active Apr 27, 2018
From France to Twisted
View france-twisted.rst
View keybase.md

Keybase proof

I hereby claim:

  • I am moshez on github.
  • I am moshez (https://keybase.io/moshez) on keybase.
  • I have a public key whose fingerprint is 892D D96A 0A37 2F5E 7941 9F93 CCA3 ADC2 53AF C674

To claim this, I am signing this object:

View sample.py
def deepdict():
return collections.defaultdict(deepdict)
def deepdictify(tupdict):
res = deepdict()
for key, val in tupdict.items():
tempres = res
for kpart in key[:-1]:
tempres = tempres[kpart]
tempres[key[-1]] = val
View keybase.md

Keybase proof

I hereby claim:

  • I am moshez on github.
  • I am moshez (https://keybase.io/moshez) on keybase.
  • I have a public key whose fingerprint is EC9F EF3A C5B1 E856 B3CA ED27 0E46 DCC1 1A77 FCF1

To claim this, I am signing this object:

View gist:660840e2f91cf4dba0b6
moshez@mcgyver:~/src/games$ virtualenv forwarner
Running virtualenv with interpreter /usr/bin/python2
New python executable in forwarner/bin/python2
Also creating executable in forwarner/bin/python
Installing setuptools, pip...done.
moshez@mcgyver:~/src/games$ ./forwarner/bin/pip install tox
Downloading/unpacking tox
Downloading tox-2.1.1-py2.py3-none-any.whl
Downloading/unpacking pluggy>=0.3.0,<0.4.0 (from tox)
Downloading pluggy-0.3.0-py2.py3-none-any.whl
View gist:626155fa3b0ec2ed657e
Collecting twisted
Using cached Twisted-15.1.0.tar.bz2
Requirement already satisfied (use --upgrade to upgrade): zope.interface>=3.6.0 in ./venv/site-packages (from twisted)
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./venv/site-packages (from zope.interface>=3.6.0->twisted)
Installing collected packages: twisted
Running setup.py install for twisted
Complete output from command /home/moshez/src/pypy-games/venv/bin/pypy -c "import setuptools, tokenize;__file__='/tmp/pip-build-cyqLBs/twisted/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-U2dS1I-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/moshez/src/pypy-games/venv/include/site/python2.7/twisted:
running install
running build
running build_py
View gist:57cb99bc0a8c76fab974
from werkzeug.routing import Map, Rule
a=Map(rules=[Rule('/<__rest__>')])
c=a.bind('foo', path_info='/foo/%0A%0D')
c.match()
~
View gist:c03f687b5826977c8129
In [18]: from werkzeug.routing import Map, Rule
In [19]: a=Map()
In [20]: b=Rule('/<__rest__>')
In [21]: a.add(b)
In [22]: c=a.bind('foo', path_info='/foo/%0A%0D')
View gist:6513b2f55211defcf9f4
(env)moshez@mcgyver:~/src/ncolony$ git diff -r 196c8dd
diff --git a/ncolony/tests/test_ctllib.py b/ncolony/tests/test_ctllib.py
index 5ff4514..b9a24cf 100644
--- a/ncolony/tests/test_ctllib.py
+++ b/ncolony/tests/test_ctllib.py
@@ -70,6 +70,16 @@ class TestArgParsing(unittest.TestCase):
self.assertEquals(res.gid, 6)
self.assertIs(res.func, ctllib.add)
+ def test_port(self):
View gist:359101f0daa7ee798dae
(env)moshez@mcgyver:~/src/temp$ cat build-cmd
sphinx-build -b html . _build/html
(env)moshez@mcgyver:~/src/temp$ cat index.rst
PROJECT-NAME-HERE
=================
.. toctree::
:maxdepth: 2
(env)moshez@mcgyver:~/src/temp$ cat conf.py
master_doc = 'index'
You can’t perform that action at this time.