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
Traceback (most recent call last): | |
File "pylama/pylint/logilab/astng/scoped_nodes.py", line 284, in getattr | |
return [self.import_module(name, relative_only=True)] | |
File "pylama/pylint/logilab/astng/scoped_nodes.py", line 339, in import_module | |
return MANAGER.astng_from_module_name(absmodname) | |
File "pylama/pylint/logilab/astng/manager.py", line 133, in astng_from_module_name | |
return self.astng_from_file(filepath, modname, fallback=False) | |
File "pylama/pylint/logilab/astng/manager.py", line 104, in astng_from_file | |
return ASTNGBuilder(self).file_build(filepath, modname) | |
File "pylama/pylint/logilab/astng/builder.py", line 128, in file_build |
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 itertools import product, groupby | |
print sum([len(tuple(g)) ** 2 for _, g in groupby(sorted(map(sum, product(range(10), repeat=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
from itertools import product | |
print sum(1 for a, b in product(map(sum, product(range(10), repeat=3)), repeat=2) if a == b) |
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
""" Hello GIL! | |
""" | |
from __future__ import print_function | |
import math | |
import multiprocessing | |
import threading | |
from time import time |
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 os | |
import threading | |
import Queue | |
class WorkerThread(threading.Thread): | |
""" A worker thread that takes directory names from a queue, finds all | |
files in them recursively and reports the result. | |
Input is done by placing directory names (as strings) into the |
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
# Somewhere in your app (Ex. foundation/base/yourapp/mixin.py | |
class NameMixin(object): | |
name = db.Column(db.String(50)) |
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
30.08 13:53:59 root INFO #177619 <A: Казанский вокзал> CanceledByUser | |
30.08 13:53:59 root INFO Published | |
30.08 13:53:59 root INFO Rule: #523 Правило вхождения в интервал времени [#1556 +Такси Адмирал: Комфорт (день) (Standard) (09:00—20:59) [geo]] True | |
30.08 13:53:59 root INFO Rule: #525 Правило вхождения в интервал времени [#1557 +Такси Адмирал: Комфорт (ночь) (Standard) (21:00—08:59) [geo]] False | |
30.08 13:53:59 root INFO Rule: #35 Правило минимального времени подачи [#1274 +Globus Taxi: Комфорт (день) (Standard) (07:00—21:59) [geo]] False | |
30.08 13:53:59 root INFO Rule: #34 Правило минимального времени подачи [#1273 +Globus Taxi: Комфорт (ночь) (Standard) (22:00—06:59) [geo]] False | |
30.08 13:53:59 root INFO Rule: #31 Правило минимального времени подачи [#1090 +Globus Taxi: Аэропорт (комфорт\встреча) (Standard) (00:00—23:59) [geo]] False | |
30.08 13:53:59 root INFO Rule: #32 Правило минимального времени подачи [#1091 + |
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
filetype off | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() | |
syntax enable | |
" Enable filetypes feature | |
filetype plugin indent on | |
" SETTINGS | |
set colorcolumn=80 |
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
" ------------------------------ | |
" .vimrc klen <horneds@gmail.com> | |
source ~/.vim/rc.vim |
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
#!/usr/bin/env python | |
import os | |
from django.core.handlers.wsgi import WSGIHandler | |
# Celery settings: | |
os.environ['CELERY_LOADER'] = 'django' | |
os.environ['DJANGO_SETTINGS_MODULE'] = os.environ.get('DJANGO_SETTINGS_MODULE', 'settings.dev') | |
application = WSGIHandler() |