pip install -r requirements.txt
Run the backend server
| from functools import wraps | |
| from django.template.response import TemplateResponse | |
| def template_view(template_name): | |
| """ View decorator to convert returned dictionary into TemplateResponse | |
| You can apply template name for this decorator like this | |
| >>> @template_view |
| """ Cache <-> Object Mapper | |
| I know there is `rom <https://pypi.python.org/pypi/rom>`_ or some. | |
| """ | |
| import json | |
| from django.core.cache import cache | |
| SEPARATOR = ':' |
| cd /tmp | |
| mkdir adobe_flash | |
| cd adobe_flash | |
| wget http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.442/install_flash_player_11_linux.x86_64.tar.gz | |
| tar axvf install_flash_player_11_linux.x86_64.tar.gz | |
| sudo mv ./libflashplayer.so /usr/lib/mizilla/plugins |
| import asyncio | |
| import logging | |
| import time | |
| import psutil | |
| logger = logging.getLogger(__name__) | |
| Testitg: <class '__main__.RequiredForm'> | |
| ======== Should be True: True ========== | |
| is_valid: True | |
| cleaned_data: {'is_test': True} | |
| ======== Should be True: true ========== | |
| is_valid: True | |
| cleaned_data: {'is_test': True} | |
| ======== Should be True: 1 ========== | |
| is_valid: True | |
| cleaned_data: {'is_test': True} |
| Testitg: <class '__main__.RequiredSerializer'> | |
| ======== Should be True: True ========== | |
| is_valid: True | |
| data: ReturnDict([('is_test', True)]) | |
| ======== Should be True: true ========== | |
| is_valid: True | |
| data: ReturnDict([('is_test', True)]) | |
| ======== Should be True: 1 ========== | |
| is_valid: True | |
| data: ReturnDict([('is_test', True)]) |
| from io import StringIO | |
| import cProfile | |
| import pstats | |
| from django.conf import settings | |
| class ProfilerMiddleware(object): | |
| """ プロファイラーを実行するMiddleware |
| 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): |
| 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() | |
| } |