This file contains 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
def upload_to_s3(local_file, bucket_name, key_name=None, acl='private'): | |
''' | |
Uploads local_file to bucket_name on Amazon S3 | |
key_name is the "filename" on Amazon S3. We'll default to the local file's name if | |
no alternative key_name is specified. | |
''' | |
# connect to Amazon S3 | |
conn = S3Connection(AWS_ACCESS_KEY, AWS_SECRET_KEY) | |
bucket = conn.create_bucket(bucket_name) |
This file contains 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 django.core.management.base import BaseCommand, CommandError | |
from news.models import Post | |
from django.core.files import File | |
from django.conf import settings | |
from feincms.module.medialibrary.models import MediaFile | |
import sys, os | |
import imaplib | |
import email |
This file contains 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
CC=clang | |
CFLAGS=-O3 -msse2 -Wall -Wextra -D_FILE_OFFSET_BITS=64 | |
objects := $(patsubst %.c,%.o,$(wildcard *.c)) | |
all: statmap statmap.so | |
statmap: $(objects) | |
$(CC) -o statmap \ | |
$(objects) \ | |
$(CFLAGS) \ | |
-lm -lpthread |
This file contains 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
# Bold green prompt | |
# ~ > | |
export PS1="\[\e[1;32m\]\W > \[\e[m\]" | |
# Officially the coolest prompt ever (inverted black-on-green \W) | |
export PS1="\[\e[7;32m\]\W \$\[\e[m\] " | |
# for more: http://jamiedubs.com/ps1-collection-customize-your-bash-prompt/ |
This file contains 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
# Plan for finishing Gapped Reads Mapping | |
Here is the remaining work that needs to be done to map gapped reads (RNASeq) with Statmap. | |
1. [x] Change the binary search in find_matching_mapped_locations to return as matches all locations within a range (REFERENCE_INSERT_LENGTH_MAX in config.h) including and beyond the base location's start. | |
Done on: 8/31/12 | |
2. [x] Handle multiple matches in the candidate mapping building. Storing them is easy (we used a mapped_locations from the beginning with this in mind). | |
Done on: 9/3/12 | |
Once that is done, we will have a set of candidate mappings, as we had before. The next step is to rework the recheck. As preparation, the first step is |
This file contains 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 flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
app = Flask(__name__) | |
app.config.from_pyfile('settings.cfg') | |
db = SQLAlchemy(app) | |
class User(db.Model): | |
__tablename__ = 'users' | |
This file contains 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
In [1]: from __future__ import division | |
In [2]: n = 2**32 | |
In [3]: p = 1 - ((n-1)/n)**1000000000 | |
In [4]: p | |
Out[4]: 0.2077122589016286 |
This file contains 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
#!/usr/bin/env python | |
import sys | |
wordlist_filename = sys.argv[1] | |
words = [] | |
with open(wordlist_filename) as wl_fp: | |
for line in wl_fp: | |
words.append(line.strip()) |
This file contains 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
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA1 | |
I, Garrett Robinson, downloaded the Qubes signing key on | |
Sun Apr 6 16:11:37 PDT 2014 | |
from | |
https://keys.qubes-os.org/keys/qubes-developers-keys.asc |
This file contains 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
diff --git a/lib/userStorage.js b/lib/userStorage.js | |
index 5441382..5cca0cc 100644 | |
--- a/lib/userStorage.js | |
+++ b/lib/userStorage.js | |
@@ -104,6 +104,10 @@ exports.init = function() | |
if (!storage[store]) storage[store] = {}; | |
} | |
); | |
+ // Log JSON out to the console for cooperq | |
+ userStored.forEach(function(store) { |
OlderNewer