Skip to content

Instantly share code, notes, and snippets.

View AndreiPashkin's full-sized avatar

Andrew Pashkin AndreiPashkin

  • Warsaw
  • 23:48 (UTC -12:00)
View GitHub Profile
@AndreiPashkin
AndreiPashkin / Dockerfile
Created December 18, 2014 07:58
Docker cache tests
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
@AndreiPashkin
AndreiPashkin / bare_vs_task_py34.py
Last active August 29, 2015 14:10
Bare coroutine vs Task
#!/usr/bin/env python
# coding=utf-8
import asyncio
import time
@asyncio.coroutine
def coro():
while True:
print('I\'m running!')
@AndreiPashkin
AndreiPashkin / client.py
Last active January 7, 2020 17:08
Python asyncio coroutines pipelining and exception propagation sandbox
#!/usr/bin/env python
# coding=utf-8
"""Client that demonstrates processing pipeline."""
import asyncio
from functools import partial
import logging
logging.basicConfig(level='DEBUG')
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 - Добавлены поля в форму и соответствующая модель."
@AndreiPashkin
AndreiPashkin / gist:2292aa9a53154217ff39
Created May 21, 2014 19:18
Issue with locale during postgresql installation on Ubuntu 12
$ 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
@AndreiPashkin
AndreiPashkin / gist:9703843
Created March 22, 2014 09:40
Proof of concent for usage of pymorphy for Django admin russian translation
# coding=utf-8
import pymorphy2
morph = pymorphy2.MorphAnalyzer()
verbose_name = u'Статья'
p = morph.parse(verbose_name)[0]
print(