Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcin Lulek ergo

  • WebReactor
  • Poland
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am ergo on github.
  • I am ergo14 (https://keybase.io/ergo14) on keybase.
  • I have a public key ASBpsn2Xugo3nvkwZnJeGjkFUplqPGHRSOYxvhf503VOzwo

To claim this, I am signing this object:

View gist:f50aa4765c53d5d7c8ed3256191b4edb
Hackathon
========================
(w nawiasie poziom trudnosci 1- łatwy 3 - trudny)
https://github.com/authomatic/authomatic - update docs, make test suite work, rewrite pyramid tests, prepare the library for new release (might be harder than others) (2/3)
https://github.com/Pylons/paginate/issues/14 - docs (1)
https://github.com/Pylons/pyramid/issues/1161 - docs (1)
https://github.com/Pylons/pyramid_debugtoolbar/issues/235 - docs (1)
@ergo
ergo / marshmallow_colander_bench.py
Last active Apr 12, 2018
Comparison between Marshmallow and Colander
View marshmallow_colander_bench.py
import timeit
import uuid
import colander
import marshmallow
class BarList(colander.SequenceSchema):
item = colander.SchemaNode(
colander.Integer(), validator=colander.Range(min=1))
View Rickshaw changes demonstration
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>TEST</title>
<script src="http://d3js.org/d3.v3.js"></script>
<script
src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.2/dojo/dojo.js">
</script>
View current_route_url.py
from pyramid.url import route_url
def current_route_url(request, route_name=None, *elements, **query):
if not route_name:
route_name = getattr(request, 'matched_route', None)
route_name = getattr(route_name, 'name')
matchdict = {}
matchdict.update(getattr(request, 'matchdict', {}) or {})
matchdict.update(query)
return route_url(route_name, request, *elements, **matchdict)