Skip to content

Instantly share code, notes, and snippets.

@fthiery
fthiery / parse_uwsgi_profiler.py
Created March 9, 2016 10:07
Parser for uWSGI profile data
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016, Florent Thiery
# Run uwsgi with '--profiler pycall' and run the parser on uwsgi.log
import sys
from collections import Counter
HEADER = '##############'
PATTERN = "[uWSGI Python profiler"
@staltz
staltz / introrx.md
Last active May 24, 2024 07:56
The introduction to Reactive Programming you've been missing
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@errord
errord / install-pypy.sh
Created April 25, 2012 06:38 — forked from baoshan/install-pypy.sh
Install PyPy on CentOS
# yum list \*openssl\*
yum install -y openssl098e
yum install -y zlib
ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8
ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8
ln -s /lib64/libbz2.so.1 /lib64/libbz2.so.1.0
wget https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2
tar -xf pypy-1.8-linux64.tar.bz2
cp -r pypy-1.8 /opt
ln -s /opt/pypy-1.8/bin/pypy /usr/local/bin
@attilaolah
attilaolah / imgcmp.py
Created February 29, 2012 11:30
Fast image comparison with Python
import math
import Image
import Levenshtein
class BWImageCompare(object):
"""Compares two images (b/w)."""
_pixel = 255
@zmanji
zmanji / pygments.css
Created January 7, 2012 05:20
Solarized Pygments Dark CSS
.highlight{background-color:#073642;color:#93a1a1}.highlight .c{color:#586e75 !important;font-style:italic !important}.highlight .cm{color:#586e75 !important;font-style:italic !important}.highlight .cp{color:#586e75 !important;font-style:italic !important}.highlight .c1{color:#586e75 !important;font-style:italic !important}.highlight .cs{color:#586e75 !important;font-weight:bold !important;font-style:italic !important}.highlight .err{color:#dc322f !important;background:none !important}.highlight .k{color:#cb4b16 !important}.highlight .o{color:#93a1a1 !important;font-weight:bold !important}.highlight .p{color:#93a1a1 !important}.highlight .ow{color:#2aa198 !important;font-weight:bold !important}.highlight .gd{color:#93a1a1 !important;background-color:#372c34 !important;display:inline-block}.highlight .gd .x{color:#93a1a1 !important;background-color:#4d2d33 !important;display:inline-block}.highlight .ge{color:#93a1a1 !important;font-style:italic !important}.highlight .gr{color:#aa0000}.highlight .gh{color:#586e