This file contains hidden or 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
# coding=utf-8 | |
import pymorphy2 | |
morph = pymorphy2.MorphAnalyzer() | |
verbose_name = u'Статья' | |
p = morph.parse(verbose_name)[0] | |
print( |
This file contains hidden or 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
$ sudo apt-get install postgresql postgresql-contrib python-psycopg2 -y | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
libossp-uuid16 libpq5 libxslt1.1 postgresql-9.1 postgresql-client-9.1 | |
postgresql-client-common postgresql-common postgresql-contrib-9.1 | |
python-egenix-mxdatetime python-egenix-mxtools ssl-cert | |
Suggested packages: | |
uuid oidentd ident-server locales-all postgresql-doc-9.1 libdbd-pg-perl |
This file contains hidden or 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
commit 84a68f9be8e2af8d1c019fccb2d61eee05dd92d9 | |
Author: Tierzov Andrii <[email protected]> | |
Date: Wed May 7 18:07:33 2014 +0300 | |
#422 - Добавлены поля в форму и соответствующая модель. | |
commit 926e896ca2c36c5587b0c6fd65172101925df326 | |
Author: Pashkin <[email protected]> | |
Date: Wed Jun 4 11:20:17 2014 +0400 | |
Revert "#522 - Добавлены поля в форму и соответствующая модель." |
This file contains hidden or 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 | |
# coding=utf-8 | |
"""Client that demonstrates processing pipeline.""" | |
import asyncio | |
from functools import partial | |
import logging | |
logging.basicConfig(level='DEBUG') |
This file contains hidden or 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 | |
# coding=utf-8 | |
import asyncio | |
import time | |
@asyncio.coroutine | |
def coro(): | |
while True: | |
print('I\'m running!') |
This file contains hidden or 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 ubuntu:14.04 | |
MAINTAINER Andrew Pashkin <[email protected]> | |
RUN apt-get -y update | |
RUN apt-get install -y software-properties-common | |
RUN apt-add-repository -y ppa:ansible/ansible | |
RUN apt-get -y update | |
RUN apt-get install -y ansible |
This file contains hidden or 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
$ sudo apt-get -y install postgresql-plpython-9.4 | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following package was automatically installed and is no longer required: | |
libgeos-3.2.2 | |
Use 'apt-get autoremove' to remove them. | |
The following extra packages will be installed: | |
postgresql-9.4 postgresql-contrib-9.4 | |
Suggested packages: |
This file contains hidden or 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 "traceback_print_exc.py", line 20, in <module> | |
produce_exception() | |
File "/Users/dhellmann/Documents/PyMOTW/src/PyMOTW/traceback/traceback_example.py", line 16, in produce_exception | |
produce_exception(recursion_level-1) | |
File "/Users/dhellmann/Documents/PyMOTW/src/PyMOTW/traceback/traceback_example.py", line 16, in produce_exception | |
produce_exception(recursion_level-1) | |
File "/Users/dhellmann/Documents/PyMOTW/src/PyMOTW/traceback/traceback_example.py", line 18, in produce_exception | |
raise RuntimeError() | |
RuntimeError |
This file contains hidden or 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
$ PATH=$(pwd)/build:$PATH valgrind --read-var-info=yes --vgdb=yes --leak-check=full tests | |
==20285== Memcheck, a memory error detector | |
==20285== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. | |
==20285== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info | |
==20285== Command: tests | |
==20285== | |
Running "test_pool_alloc"... | |
Running "test_pool_realloc"... | |
Running "test_arraylist_append"... | |
Running "test_arraylist_append_many"... |
This file contains hidden or 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 4caf15883b8a892aca26aa8aaa0d40663f9cca82 Mon Sep 17 00:00:00 2001 | |
From: Andrew Pashkin <[email protected]> | |
Date: Tue, 12 Apr 2016 11:13:03 +0300 | |
Subject: [PATCH] Add a test for loading classes from modules | |
--- | |
tests/integration/loader/loader.py | 13 +++++++++++++ | |
1 file changed, 13 insertions(+) | |
diff --git a/tests/integration/loader/loader.py b/tests/integration/loader/loader.py |
OlderNewer