Skip to content

Instantly share code, notes, and snippets.

View tlnagy's full-sized avatar

Tamas Nagy tlnagy

View GitHub Profile
@tlnagy
tlnagy / script.py
Created September 22, 2015 23:30
pubs_plotting_code
import pickle
import seaborn as sns
sns.set_style("whitegrid")
%pylab --no-import-all
%matplotlib inline
flatui = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"]
data = pickle.load(open("allele_dic.pkl", "rb"))
translate = pickle.load(open("translate.pkl", "rb"))
aminotonumber = pickle.load(open("aminotonumber.pkl", "rb"))
@tlnagy
tlnagy / rama.py
Last active August 31, 2015 18:53
ipqb bootcamp programming assignment
from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
print("Python 3 required")
sys.exit(1)
import math, urllib.request, re
try:
import matplotlib.pyplot as plt
import seaborn as sns
except ImportError:
@tlnagy
tlnagy / gist:095333ed775716a19922
Created March 21, 2015 16:01
Pretty, automatic, git-based change logs (a la syncthing)
#!/bin/bash
since="$1"
if [[ -z $since ]] ; then
since="$(git describe --abbrev=0 HEAD^).."
fi
git log --pretty=format:'* %s (%h, @%aN)' "$since" | egrep 'fixes #\d|ref #\d'
@tlnagy
tlnagy / gnu_osx_install
Last active October 17, 2018 15:14
This small script uses Homebrew to make your OS X machine more Linux-like by adding the GNU variants of many command line tools to your PATH. You will need Xcode's command line tools and homebrew installed. Also you'll need to quit and re-initialize your shell to see the changes.
#! /bin/sh
# Copyright (c) 2014, Tamas Nagy <tamas at tamasnagy dot com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.