Skip to content

Instantly share code, notes, and snippets.

View ikatson's full-sized avatar

Igor Katson ikatson

  • Facebook
  • London
  • 00:37 (UTC +01:00)
View GitHub Profile

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

@ikatson
ikatson / .gitignore
Last active August 29, 2015 14:08
uwsgi Websocket error: ASYNC call without async mode !!!, IOError: unable to fd to the event queue
*.pyc
@ikatson
ikatson / check_url.py
Last active August 29, 2015 14:05
check that a site works, but do not fail from the first attempt
#!/usr/bin/env python
import argparse
import hashlib
import os
import traceback
import urllib2
import sys
def try_url(url, retries=1):
@ikatson
ikatson / gist:0d586999cf102b10a167
Created July 13, 2014 17:38
Find all non-automatic migrations
find . | grep 'migrations.*py$' | grep -v '__init__' | while read file; do grep -E 'Adding|Deleting|Changing' "$file" > /dev/null || echo "$file"; done
# or just
find . | grep 'migrations.*py$' | grep -v -E '__init__|auto|initial'
@ikatson
ikatson / igorkatson.gpg.key
Created July 9, 2014 02:26
Igor Katson public GPG key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQENBE6KUrsBCACtaVx9eUEZ0yTG9xRpVMx8+S94bRcI91I5rrHvrmAsfTXTm62a
tx5DrP4pT/W3jbMdVj7Etp9Ul+uT9JyrTcqsOymoa5PpVTaXbi3OKbDhl+GSChF/
iTeV/8pyokUjcLw+XbITq0Cj92Pgjnul0iro7Ri9mmwTWHiGHL9hKXUlBuBY8FX6
35kwuUrHZ4O3+dg8puRj8UufP/UiPp6N3G3jlV0k7R9qx7HLjEN8EGPOzW0tKcQ7
PRm1L3C24JCCZ+7zF31nP4gGMnnH9/mJtY+qL4c+DX1DBQuzYqcA0KXjhXFOe8WP
GDyMvw6mV+tLXP/SbOaUu6p86tEJHbn5F6GhABEBAAG0I0lnb3IgS2F0c29uIDxp
Z29yLmthdHNvbkBnbWFpbC5jb20+iQE4BBMBAgAiBQJOilK7AhsDBgsJCAcDAgYV
@ikatson
ikatson / gist:21e80a7e0b3e99a78ef6
Last active August 29, 2015 14:03
fpm install native python packages
# Cython can increase the performance of some packages
apt-get install build-essential cython rubygems python-dev python-pip python-setuptools libpcre3-dev
get install fpm
# Build uwsgi
fpm --verbose -s python -t deb --python-install-bin /usr/bin --name uwsgi \
--architecture amd64 -d libpython2.7 -d libpcre3 -d zlib1g -d libssl1.0.0 -d libxml2 uwsgi
# Build gevent debian package
@ikatson
ikatson / README.md
Last active August 29, 2015 14:02
uwsgi debian build test

Playing with debian packages

  1. Place the original archive into parent directory and rename, in my case to

uwsgi_2.0.5.orig.tar.gz


2. This one will update the changelog, it contains the version.
   ```bash
dch --create -v 2.0.5-1 --package uwsgi
@ikatson
ikatson / index.html
Last active August 29, 2015 13:57
uwsgi + harakiri + websockets bug
<html>
<head>
<script>
var polling = (function () {
var poll_error_timeout = 1;
var default_error_timeout = poll_error_timeout + 0;
var poll_error_max_timeout = 15;
function pollForEventsWebsockets() {
var s = new WebSocket('ws://localhost:8000/ws');
@ikatson
ikatson / uwsgi.ini
Created February 5, 2014 04:48
The work of process 13041 is done. Seeya!
[uwsgi]
##### Basic requried config for app to work ####
home = /home/trip/.virtualenvs/trip/
chdir = /home/trip/trip/
pythonpath = /home/trip/trip/
env = LANG=en_US.UTF-8
env = SERVER_SOFTWARE=gevent
env = DJANGO_SETTINGS_MODULE=settings
# Gevent is our execution model of choice :) Required for many features