This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb
This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb
| #!/bin/bash | |
| # @link https://gist.github.com/mattscilipoti/8424018 | |
| # | |
| # Called by "git push" after it has checked the remote status, | |
| # but before anything has been pushed. | |
| # | |
| # If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # Steps to install, from the root directory of your repo... |
This project is superceded by makefile4latex.
This is a GNU Makefile for typesetting LaTeX documents. Expected to work with
TeXLive on Linux (and similar systems, e.g., on Cygwin). Just download
Makefile and put it in a directory that contains your LaTeX files. Running
make will generate PDF files for you:
| #!/usr/bin/env python | |
| from pocket import Pocket | |
| import webbrowser, sys | |
| # Get consumer key from cmd line | |
| consumer_key = sys.argv[1] | |
| request_token = Pocket.get_request_token( | |
| consumer_key=consumer_key, |
| #!/usr/bin/env python | |
| import paramiko | |
| hostname = 'localhost' | |
| port = 22 | |
| username = 'foo' | |
| password = 'xxxYYYxxx' | |
| if __name__ == "__main__": |
| #List unique values in a DataFrame column | |
| pd.unique(df.column_name.ravel()) | |
| #Convert Series datatype to numeric, getting rid of any non-numeric values | |
| df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
| #Grab DataFrame rows where column has certain values | |
| valuelist = ['value1', 'value2', 'value3'] | |
| df = df[df.column.isin(value_list)] |
| ### MATPLOTLIBRC FORMAT | |
| # This is a sample matplotlib configuration file - you can find a copy | |
| # of it on your system in | |
| # site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it | |
| # there, please note that it will be overridden in your next install. | |
| # If you want to keep a permanent local copy that will not be | |
| # over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux | |
| # like systems) and C:\Documents and Settings\yourname\.matplotlib | |
| # (win32 systems). |
| """ | |
| PWMSearch | |
| Searches through a fasta sequence for the relevant Position Weight Matrices | |
| from the Jaspar Database. | |
| """ | |
| from __future__ import division | |
| from optparse import OptionParser |
| def parse_color(s): | |
| """ Parses color string in format #ABC or #AABBCC to RGB tuple. """ | |
| g = len(s) | |
| assert(g in (4,5,7,9)) | |
| if g in (4,5): | |
| return tuple(int(ch * 2, 16) for ch in s[1:]) | |
| else: | |
| return tuple(int(ch1 + ch2, 16) for ch1, ch2 in \ | |
| zip( |
| #!/usr/bin/ruby | |
| # save as pubmed.rb and test using 'ruby pubmed.rb 19662644' | |
| # keyword search may return > 1 record due to retmax bug | |
| # http://github.com/bioruby/bioruby/commit/51c3223e033b2992a7bd95da282f88164406ff92 | |
| require 'rubygems' | |
| require 'bio' | |
| keywords = ARGV.join(' ') |