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 os | |
import sys | |
import logging | |
from datetime import date | |
from optparse import OptionParser | |
IMAGE_TYPES = [ | |
'png', |
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 | |
# numpy and biopython are required -- pip install numpy biopython | |
from Bio import Entrez | |
from Bio import Medline | |
MAX_COUNT = 10 | |
TERM = 'Tuberculosis' | |
print('Getting {0} publications containing {1}...'.format(MAX_COUNT, TERM)) |
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 | |
# | |
# Requirements: | |
# argparse==1.2.1 | |
# pymongo==2.1 | |
# redis==2.4.10 | |
import redis | |
import pymongo | |
import argparse |
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 find_in_sorted(arr, x): | |
''' | |
Returns index of x in arr | |
Precondition: arr is sorted | |
''' | |
def binsearch(start, end): | |
mid = start + (end - start) // 2 | |
if start == end: | |
return -1 | |
if x < arr[mid]: |
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 | |
from optparse import OptionParser | |
import boto.ec2 | |
import logging | |
import sys | |
def get_ec2_connection(aws_key=None, aws_secret=None, region='us-east-1'): | |
""" | |
Returns an EC2Connection to the specified region |
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
class tomcat { | |
$tomcat_url = "http://mirrors.axint.net/apache/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.tar.gz" | |
$jdk_url = "http://download.oracle.com/otn-pub/java/jdk/6u25-b06/jdk-6u25-linux-x64.bin" | |
Exec { | |
path => "${::path}", | |
} | |
group { "puppet": | |
ensure => present, | |
} |
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
[program:redis] | |
command=/usr/local/bin/redis-server /storage/redis_data/redis.conf | |
directory=/storage/redis_data | |
user=root | |
autostart=false | |
stopsignal=QUIT |
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
[program:mongodb] | |
command=/opt/mongodb/bin/mongod --dbpath /storage/mongodb_data --rest | |
directory=/opt/mongodb | |
user=root | |
autostart=false |
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
Benchmarks for COI API using ApacheBench | |
Tests performed using apache bench from Intech network using a wired connection. | |
API Host: t1.micro - ec2-184-72-205-178.compute-1.amazonaws.com | |
MongoDB Host: m1.large - ec2-23-20-88-122.compute-1.amazonaws.com | |
Redis Host: t1.micro - ec2-184-72-205-178.compute-1.amazonaws.com (same as API host) | |
----- | |
1000 req with 100 concurrent to Redis |
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
-javaagent:/opt/tomcat7/webapps/ROOT/WEB-INF/lib/newrelic.jar |
OlderNewer