Skip to content

Instantly share code, notes, and snippets.

@jiffyclub
jiffyclub / drunkards_walk_ipb.ipynb
Created May 1, 2014 15:57
A drunkard's walk with ipythonblocks.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / github_api_commit.ipynb
Created April 16, 2014 05:05
An example of using the GitHub API to make several changes to a repo in a single new commit.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / long_string.ipynb
Created April 15, 2014 18:11
Example of splitting a long string over multiple lines (in an IPython Notebook). http://nbviewer.ipython.org/gist/jiffyclub/10754538
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / conda.fish
Last active December 8, 2021 08:46
Activate and deactivate commands for working with conda environments in the fish shell. Currently assumes you are switching to a named environment, not specifying a directory.
function condalist -d 'List conda environments.'
for dir in (ls $HOME/miniconda3/envs)
echo $dir
end
end
function condactivate -d 'Activate a conda environment' -a cenv
if test -z $cenv
echo 'Usage: condactivate <env name>'
return 1
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@jiffyclub
jiffyclub / github_api_commits.ipynb
Created February 26, 2014 18:53
Examples of using github3.py to make git commits via the GitHub API.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / stui.md
Last active January 1, 2016 21:19
Customizations for Sublime Text.
@jiffyclub
jiffyclub / gist:7492853
Created November 15, 2013 22:37
Command to get git history in chronological order with numbers in the fish shell. fish's history is in reverse-chronological order so I used pyp (https://code.google.com/p/pyp/) to reverse it. Also to replace my aliases with the standard git command name. (Had to do a few replacements because of the overlaps between e.g. 'co' and 'commit'.) I us…
history --search --prefix git | pyp "pp[::-1] | p.replace('co', 'checkout').replace('st', 'status').replace('checkoutmmit', 'commit').replace('statusatus', 'status').replace('checkoutnfig', 'config') | n, w[1] | p" | pbcopy
@jiffyclub
jiffyclub / regex_magic.ipynb
Created September 1, 2013 01:27
Simple regex magic demo.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.