Skip to content

Instantly share code, notes, and snippets.

View Midnighter's full-sized avatar

Moritz E. Beber Midnighter

View GitHub Profile
@Midnighter
Midnighter / replace_php_header.py
Last active June 23, 2016 15:36
Replace content of php headers in respective files.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
==============================
Replace Content of PHP-Headers
==============================
:Authors:
@Midnighter
Midnighter / soundings.ipynb
Created April 30, 2016 19:57
Temperature data analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Midnighter
Midnighter / database.dbj
Created April 13, 2015 18:34
References style for the Oxford journal Database
%% Driver file to produce database.bst from merlin.mbs
%% Generated with makebst, version 4.1 (2003/09/08)
%% Produced on 2015/04/13 at 19:37
%%
\input docstrip
\preamble
----------------------------------------
*** Reference style for the Oxford journal "Database: The Journal of Biological Databases and Curation". ***
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Simple Power-Law Graphs "
]
},
{
@Midnighter
Midnighter / postactivate
Created January 11, 2015 21:38
use a (newer) virtualenvwrapper inside a virtualenv
#!/usr/bin/env bash
# This hook is run after every virtualenv is activated.
if [ -f "${VIRTUAL_ENV}/bin/virtualenvwrapper.sh" ]; then
source "${VIRTUAL_ENV}/bin/virtualenvwrapper.sh"
fi
@Midnighter
Midnighter / postmkvirtualenv
Last active January 25, 2017 07:26 — forked from jlesquembre/postmkvirtualenv
link PyQt components into new virtualenv after creation (`postmkvirtualenv`)
#!/usr/bin/env bash
# This hook is run after a new virtualenv is activated.
#set -e # abort after any errors
#set -u # exit after accessing an undefined variable
libs=(PyQt4 sip.so sipconfig.py)
python_version=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))")
var=( $(which -a ${python_version}) )
@Midnighter
Midnighter / gist:316247eafa08d00eee17
Created August 12, 2014 09:52
Effects of NaN-elements on bottleneck sum.
{
"metadata": {
"name": "",
"signature": "sha256:4ccdc8580536b8596c3f61f406528a085be45e6ed17a3775b5fda9d7b310f6cd"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@Midnighter
Midnighter / nan_pdist.ipynb
Created July 24, 2014 10:03
pairwise euclidean distance with missing values
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Midnighter
Midnighter / base_virtualenv
Last active August 29, 2015 14:01
what I want in any Python virtualenv...
pip install -U setuptools pip pip-tools wheel flake8 virtualenv virtualenvwrapper cookiecutter ipython pytest tox
{
"metadata": {
"name": "",
"signature": "sha256:0e53fcc6596234459277ed6b1ad000f213b800ebfa369058a55077ce1f6c2ded"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [