Skip to content

Instantly share code, notes, and snippets.

View andsor's full-sized avatar

Andreas Sorge andsor

  • Max Planck Institute for Dynamics and Self-Organization
  • Göttingen, Germany
View GitHub Profile
@HHammond
HHammond / Theming IPython
Last active August 29, 2015 14:02
A quick tutorial on customizing the IPython notebook.
{
"metadata": {
"name": "",
"signature": "sha256:ae12cadbe088aa2df4c44761da5172223e468a824bc68e52b427b2314b428942"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
# This file is placed into the public domain.
"""Calculate the current package version number based on git tags.
This module provides `read_version_git` to read the output of "git describe"
and modify its output modified to conform to the versioning scheme that
setuptools uses (see PEP 386). Releases must be tagged with the following
format:
v<num>(.<num>)+ [ {a|b|c|rc} <num> (.<num>)* ]
#! /bin/bash
SLEEP_TIME=5 # Default time between checks.
SAFE_PERCENT=30 # Still safe at this level.
DANGER_PERCENT=15 # Warn when battery at this level.
CRITICAL_PERCENT=5 # Hibernate when battery at this level.
NAGBAR_PID=0
export DISPLAY=:0.0
@yahyaKacem
yahyaKacem / string_converter.py
Created December 29, 2013 13:51
Convert camel-case to snake-case in python. e.g.: CamelCase -> snake_case e.g.: snake_case -> CamelCase e.g.: CamelCase -> dash-case e.g.: dash-case -> CamelCase By: Jay Taylor [@jtaylor] Me<modifier>: Yahya Kacem <fuj.tyoli@gmail.com> Original gist: https://gist.github.com/jaytaylor/3660565
#!/usr/bin/env python
"""
Convert camel-case to snake-case in python.
e.g.: CamelCase -> snake_case
e.g.: snake_case -> CamelCase
e.g.: CamelCase -> dash-case
e.g.: dash-case -> CamelCase
By: Jay Taylor [@jtaylor]
Me<modifier>: Yahya Kacem <fuj.tyoli@gmail.com>
Original gist: https://gist.github.com/jaytaylor/3660565