Skip to content

Instantly share code, notes, and snippets.

View klen's full-sized avatar

Kirill Klenov klen

View GitHub Profile
@klen
klen / response
Last active August 29, 2015 14:04
[{u'deal_term_pfc': False,
u'event': {u'created_at': None,
u'id': u'5357baaff51600525c9e1397',
u'lifetime': u'BEGIN:VEVENT\r\nDTSTART;VALUE=DATE-TIME:20140710T000000\r\nDTEND;VALUE=DATE-TIME:20140910T000000\r\nEND:VEVENT\r\n',
u'org': {u'contact': {},
u'desc': None,
u'id': u'5357b929f51600525c9e1396',
u'name': u'Organizator',
u'roles': [u'org'],
u'tags': []},
File "/usr/lib/ticketscloud/env/lib/python3.4/site-packages/raven/middleware.py", line 35, in __call__
iterable = self.application(environ, start_response)
File "/usr/lib/ticketscloud/env/lib/python3.4/site-packages/pyramid/router.py", line 242, in __call__
response = self.invoke_subrequest(request, use_tweens=True)
File "/usr/lib/ticketscloud/env/lib/python3.4/site-packages/pyramid/router.py", line 217, in invoke_subrequest
response = handle_request(request)
File "/usr/lib/ticketscloud/env/lib/python3.4/site-packages/pyramid/tweens.py", line 21, in excview_tween
response = handler(request)
File "./ticketscloud/lib/tweens.py", line 52, in __call__
raise exc
[
{
"org": {
"desc": null,
"contact": {},
"name": "Organizator",
"tags": [],
"id": "5357b929f51600525c9e1396"
},
"deal": {
from django.core.exceptions import ValidationError, PermissionDenied
from .models import QualityProcess
from .utils.flow import task_loader
from viewflow import flow, lock
from viewflow.base import Flow, this
class QualityFlow(Flow):
import pytest
pytestmark = pytest.mark.django_db
def test_quality_flow(mixer, personal):
from core.flows import QualityFlow as flow
org = mixer.blend('core.organization', role='supplier')
{u'created_at': u'2014-12-12T15:52:17.293000+00:00',
u'deal': {u'extra': u'0%', u'pfc': False},
u'id': u'548b0f319cb53807b216a356',
u'lifetime': VEVENT({u'DTEND': <icalendar.prop.vDDDTypes object at 0x2b04fee34cd0>, u'DTSTART': <icalendar.prop.vDDDTypes object at 0x2b04fee34fd0>}),
u'media': {u'cover': {u'author': u'548b08ff9cb53807b316a3f9',
u'content_type': u'image/jpeg',
u'id': u'548b16fd9cb53807b416b196',
u'length': 1055109,
u'md5hash': u'c5d7507d67487db44e9c4777edabd56c',
u'url': u'https://s3-eu-west-1.amazonaws.com:443/media.ticketscloud/production/image/2014-12/548b16fd9cb53807b416b196.jpe'},
[hekad]
base_dir = "/var/cache/hekad"
pid_file = "/var/run/hekad.pid"
maxprocs = 1
[UdpInput]
address = ":2003"
splitter = "TokenSplitter"
decoder = "StatsToFieldsDecoder"
#!/bin/sh
POSTGISCONTRIB_PATH=`pg_config --sharedir`/contrib
POSTGIS=$(find $POSTGISCONTRIB_PATH -name 'postgis.sql')
POSTGIS_COMMENTS=$(find $POSTGISCONTRIB_PATH -name 'postgis_comments.sql')
POSTGIS_SPATIAL=$(find $POSTGISCONTRIB_PATH -name 'spatial_ref_sys.sql')
if [ -z "$POSTGIS" ] || [ -z "$POSTGIS_SPATIAL" ]; then
echo " * Not found postgis contrib files."
exit 1
@klen
klen / gist:842597
Created February 24, 2011 18:18
Profiler log
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
3698/4 0.033 0.000 0.078 0.019 /usr/local/lib/python2.6/dist-packages/pyparsing.py:926(_parseNoCache)
814/4 0.009 0.000 0.019 0.005 /usr/local/lib/python2.6/dist-packages/pyparsing.py:2342(streamline)
477/16 0.008 0.000 0.077 0.005 /usr/local/lib/python2.6/dist-packages/pyparsing.py:2531(parseImpl)
107/56 0.007 0.000 0.020 0.000 /usr/lib/python2.6/sre_parse.py:385(_parse)
905/105 0.007 0.000 0.074 0.001 /usr/local/lib/python2.6/dist-packages/pyparsing.py:2406(parseImpl)
872/5 0.005 0.000 0.019 0.004 /usr/local/lib/python2.6/dist-packages/pyparsing.py:2704(streamline)
2955 0.005 0.000 0.005 0.000 /usr/local/lib/python2.6/dist-packages/pyparsing.py:1442(streamline)
from hotshot import Profile
import os.path
import sys
def main():
from scss.parser import Stylecheet
p = Stylecheet()
p.loads("""
@mixin font {
font: {