I hereby claim:
- I am ikatson on github.
- I am ikatson (https://keybase.io/ikatson) on keybase.
- I have a public key ASBpq1eRv5jbAZSPKXwTe0tbPi-mesRfv7mZuADIEMmDRgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function fswatch_propagate_pwd_changes_to_docker () { | |
echo "Starting fswatch on $PWD" | |
# tracking previous not to get into endless loop of changing the same file | |
local previous='' | |
fswatch -r "$PWD" | while read file; do | |
if [[ previous != "$file" ]]; then | |
docker run --rm -v "$PWD":"$PWD" busybox touch -c "$file" | |
fi | |
previous="$file" | |
done |
shaders |
schemas |
uwsgi.websocket_handshake(...) | |
user_id = get_user_id_from_environ(environ) | |
ready = gevent.event.Event() | |
dead = gevent.event.Event() | |
def ws_socket_waiter(): | |
while not dead.is_set(): | |
gevent.socket.wait_read(websocket_fd) |
def get_or_create_contact_from_phones(phones_list): | |
return load_json(request( | |
'POST /api/v1/contact/get_or_create_from_phones/', | |
as_json({'phone': phones_list}) | |
)) | |
def find_contact_by_email(email): | |
for contact in load_json(request('GET /api/v1/contact/?q=' + email)): | |
if email in contact['emails']: | |
return contact |
import pandas | |
class AggregatedValue(object): | |
def __init__(self, aggfunc, value=None, original=None): | |
self.aggfunc = aggfunc | |
self.value = value | |
self.original = original | |
def __repr__(self): |
*** Starting uWSGI 1.9.18.2 (64bit) on [Tue Nov 19 20:44:14 2013] *** | |
compiled with version: 4.6.3 on 23 October 2013 03:45:04 | |
os: Linux-3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 | |
nodename: precise64 | |
machine: x86_64 | |
clock source: unix | |
detected number of CPU cores: 2 | |
current working directory: /src/uwsgi_includes | |
detected binary path: /usr/src/uwsgi-1.9.18.2/uwsgi |
# coding: utf-8 | |
# Profiling middleware and decorator, that allows to profile any django | |
# view easily for superusers. | |
__author__ = 'igor.katson@gmail.com' | |
import cProfile | |
import pstats | |
import tempfile |
import os | |
import uwsgi | |
import gevent | |
import gevent.select | |
import gevent.socket | |
class ProxyMiddleware(object): |