pip install falcon
pip install requests
pip install gunicorn
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 msgpack | |
data = {} # Input large Python dict | |
import time | |
import json | |
print("Dumping") | |
print("########### msgpack ##############") | |
print("started") |
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
2015-06-16 09:42:09,565 ERROR [waitress][Dummy-4] Exception when serving /manage/terms/ãã£/@@properties | |
Traceback (most recent call last): | |
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/waitress/channel.py", line 337, in service | |
task.service() | |
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/waitress/task.py", line 173, in service | |
self.execute() | |
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/waitress/task.py", line 392, in execute | |
app_iter = self.channel.server.application(env, start_response) | |
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid-1.6a1-py3.4.egg/pyramid/router.py", line 223, in __call__ | |
response = self.invoke_subrequest(request, use_tweens=True) |
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
""" | |
Usage | |
===== | |
:: | |
$ python easyscript.py 1 2 | |
3 | |
""" |
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
<source> | |
type forward | |
</source> | |
<match **> | |
type record_reformer | |
renew_record false | |
enable_ruby true | |
tag ip_formatted.${tag} |
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
class WidgetForm(object): | |
def is_valid(self): | |
pass | |
def __str__(self): | |
widget_forms = { | |
widget_code: modelformset_factory(widget_class) | |
for widget_code, widget_class in widgets.widgets.items() | |
} |
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 pycallgraph import PyCallGraph | |
from pycallgraph import Config | |
from pycallgraph import GlobbingFilter | |
from pycallgraph.output import GraphvizOutput | |
class ProfilerMiddleware(object): | |
includes = [] | |
def can(self, request): |
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 io import StringIO | |
import cProfile | |
import pstats | |
from django.conf import settings | |
class ProfilerMiddleware(object): | |
""" プロファイラーを実行するMiddleware |