Skip to content

Instantly share code, notes, and snippets.

@runiq
runiq / make_map.py
Created July 22, 2013 12:06
Soil cadmium pollution over Europe
{
"metadata": {
"name": "Cd2+ soil pollution in Europe"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@runiq
runiq / make_pov.py
Last active December 17, 2015 20:39
PyMOL POV-Ray ambient occlusion rendering
# make_pov.py
#
# Original script written by Robert Campbell
# Modified by Tsjerk A. Wassenaar and Patrice Peterson
from os.path import splitext
from pymol import cmd
def make_pov(file, name="PymolObject", clip=False):
f1, f2 = file, splitext(file)[0] + '.inc'
#!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
DTYPES = {
'em': [('step', int),
@runiq
runiq / pgf_subplot_ylabel_align_test.py
Created May 21, 2013 16:48
PGF backend subplot ylabel alignment bug
"""
+-----+ +-----+
a | | a | |
x | ax1 | x | ax1 |
1 | | 1 | |
+-----+ should become: +-----+
a | | a | |
x | ax2 | x | ax2 |
2 | | 2 | |
+-----+ +-----+
@runiq
runiq / pgf_callback_test.py
Last active December 17, 2015 13:59
PGF backend callback bug
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def on_draw(event):
print "on_draw!"
f = plt.figure()
@runiq
runiq / matplotlibrc
Last active December 17, 2015 07:59
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
@runiq
runiq / gist:5332444
Created April 7, 2013 20:47
CUE sheet for Shiropoint's Pinkie Pie Mix 2
PERFORMER ""
TITLE ""
FILE ".mp3" MP3
TRACK 01 AUDIO
TITLE "01. Ashleigh Ball & Andrea Libman - Pinkie Wants A Flugelhorn"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "02. London Elektricity - All Hell Is Breaking Loose"
INDEX 01 00:10:00
TRACK 03 AUDIO
\definesubmol{\gsh}{H_3\chemabove{N}{\scriptstyle\oplus}-[:-30](=[6]COO^{-})-[:30]-[:-30]-[:30](=[2]O)
-[:-30]\chembelow{N}{H}-[:30] (-[2]-[:30]SH)-[:-30](=[6]O)
-[:30]\chemabove{N}{H}-[:-30]-[:30]COO^{\scriptstyle\ominus}}
@runiq
runiq / newick_tree.py
Created September 21, 2012 13:56
Where my gerunds at
import sys
import Queue
class Node(object):
def __init__(self, id, parent=None, dist=0, maxchildren=2):
self.id = id
self.num = 0
self.dist = dist
self.parent = parent
@runiq
runiq / PKGBUILD
Created May 30, 2012 20:33
mutt-kz-git PKGBUILD with fix-notmuch_database_open fix applied
# Contributor: boyska <[email protected]>
pkgname=mutt-kz-git
pkgver=20120228
pkgrel=1
pkgdesc="A small but very powerful text-based mail client + integration with notmuch"
url="https://github.com/karelzak/mutt-kz"
arch=(i686 x86_64)
license=('GPL')
depends=('openssl>=0.9.8e' 'gdbm' 'mime-types' 'zlib' 'libsasl' 'gpgme' 'ncurses' 'notmuch')