Skip to content

Instantly share code, notes, and snippets.

View dylan-lawrence's full-sized avatar

Dylan Lawrence dylan-lawrence

  • Washington University in St. Louis
  • St. Louis, Missouri
View GitHub Profile
@dylan-lawrence
dylan-lawrence / libreconverter.py
Last active December 14, 2021 17:58
A converter to convert from USA LibreView output to EU LibreView output
#A converter for LibreView exported data, can convert from European or USA output formats
import argparse
#TODO Setup argparse for changing conversion
#2018-13-1
#Currently this script accepts a USA input from argument 1 and converts it to European format.
import sys
#pipeline version of sci.py for better memory managment
import sys
import numpy as np
from tools.striper import stripe, cleanupfiles
from tools.tweetprocessor import clean, wordclean
from sklearn.naive_bayes import BernoulliNB
@dylan-lawrence
dylan-lawrence / orthofetch.py
Last active May 23, 2016 08:54
A python script to accept an accession number and fetch ortholog proteins in a list of specified organisms
#Accepts an accession number, returns protein sequences
from Bio import SeqIO
from Bio import Entrez
from Bio.Blast import NCBIWWW,NCBIXML
import argparse
from time import sleep
parser = argparse.ArgumentParser(description='Get aa sequence from accession number')
parser.add_argument('-an', '--accession', help='the accession number for the sequence')
@dylan-lawrence
dylan-lawrence / shredditor.py
Created October 15, 2015 16:24
A quick comment shredder for reddit.
import praw
r = praw.Reddit(user_agent='comment_editor')
r.login('<username>', '<password>')
user = r.get_redditor('<username>')
comments = user.get_comments(limit = None)
i = 1
for comment in comments:
print ('iterations: ' + str(i))
std::ostream& operator<< (std::ostream& os, const FsGridSquare& gs)
{
std::stringstream ss;
/* Sample output
Note: @ denotes a blank space
--S:-0.32--E:@0.78--
|@@@@@@@@@@@@@@@@@@|