This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import print_function | |
| import numpy as np | |
| def asciihist(it, bins=10, minmax=None, str_tag='', | |
| scale_output=30, generate_only=False, print_function=print): | |
| """Create an ASCII histogram from an interable of numbers. | |
| Author: Boris Gorelik [email protected]. based on http://econpy.googlecode.com/svn/trunk/pytrix/pytrix.py | |
| License: MIT | |
| """ | |
| ret = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Committing changes to a repo via the Github API is not entirely trivial. | |
| # The five-step process is outlined here: | |
| # http://developer.github.com/v3/git/ | |
| # | |
| # Matt Swanson wrote a blog post translating the above steps into actual API calls: | |
| # http://swanson.github.com/blog/2011/07/23/digging-around-the-github-api-take-2.html | |
| # | |
| # I was not able to find sample code for actually doing this in Ruby, | |
| # either via the HTTP API or any of the gems that wrap the API. | |
| # So in the hopes it will help others, here is a simple function to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # btrfs-undelete | |
| # Copyright (C) 2013 Jörg Walter <[email protected]> | |
| # This program is free software; you can redistribute it and/or modify it under | |
| # the term of the GNU General Public License as published by the Free Software | |
| # Foundation; either version 2 of the License, or any later version. | |
| if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then | |
| echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2 | |
| echo |