Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 | |
+-----+ +-----+
#!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
DTYPES = {
'em': [('step', int),
@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'
@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 / x-arrow-mwe.tex
Created July 28, 2013 13:17
MW for -X> arrow
\documentclass{article}
\usepackage{chemfig}
\makeatletter
\definearrow9{-X>}{%
\CF@arrow@shift@nodes{#7}%
\expandafter\draw\expandafter[\CF@arrow@current@style,-CF@full](\CF@arrow@start@node)--(\CF@arrow@end@node)node[midway](Xarrow@arctangent){};%
\edef\CF@tmp@str{\ifx\@empty#1\@empty[draw=none]\fi}%
\expandafter\draw\CF@tmp@str (Xarrow@arctangent)%
arc[radius=\CF@compound@sep*\CF@current@arrow@length*\ifx\@empty#8\@empty0.333\else#8\fi,start angle=\CF@arrow@current@angle-90,%
@runiq
runiq / sbmod.txt
Created August 19, 2013 16:05
Starbound Modding Ideas
"+" stuff should (hopefully) be easily moddable
Uncategorized
-------------
- in-game multiplayer setup :)
- *in-game* Munin integration
Animations/Graphics/Sounds/etc.
-------------------------------
- new melee weapon animations
@runiq
runiq / PKGBUILD
Last active December 24, 2015 13:49
pymol-svn PKGBUILD
# Maintainter: Duca
# Contributor: yescalona
# Contributor: Carlos Ríos V. (aka crosvera)
# Contributor: Patrice Peterson <runiq at archlinux dot us>
pkgname=pymol-svn
_pkgname=pymol
pkgver=4043
pkgrel=2
pkgdesc="A user-sponsored molecular visualization system on an open-source foundation"
@runiq
runiq / check_sr_modified_patrice.py
Created November 10, 2013 17:35
check_sr_modified_patrice.py
#!/usr/bin/env python
"""
Check XenServer SR utilization.
(C) Copyright Pekka Panula/Sofor Oy
Licence: GPLv2 or later
Author: Pekka Panula, E-Mail: pekka.panula@sofor.fi
Contact if bugs, etc.
- Uses HTTPS to connect to XenServer; if you have a pool, use a