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
import re | |
from string import digits, punctuation | |
from nltk.stem import SnowballStemmer | |
from nltk.tokenize import word_tokenize | |
class ProcessTextMethods: | |
def __init__(self): | |
self.stemmer = SnowballStemmer("english") | |
self.emoji_pattern = re.compile("[" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import tornado.ioloop | |
import tornado.web | |
import urllib2 as urllib | |
from PIL import Image | |
from cStringIO import StringIO | |
import numpy as np | |
import tesserwrap | |
import cv2 | |
class MainHandler(tornado.web.RequestHandler): |
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
# *********************************************** | |
# *********************************************** | |
# Author: Benjamin Tovar | |
# Date: April 20, 2015 | |
# Post: http://btovar.com/2015/04/introduction-to-k-means-in-r/ | |
# *********************************************** | |
# *********************************************** | |
library(ggplot2) | |
library(reshape) |
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
# ********************************** | |
# Author: Benjamin Tovar | |
# Date: March 25, 2015 | |
# Post: Using Neural Networks to fit equations in R | |
# Post url: http://btovar.com/2015/03/neural-networks-fit-eq/ | |
# ********************************** | |
# load libraries | |
library(RSNNS | |
library(ggplot2) |
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
>gi|1620934|emb|Z80230.1| Calliphora vicina trp gene | |
AAAAGTTTAAATTGGATAAATTGCAAAAGGACAATTAAGGATACGGAATATATGCGTAGTTTGTGTAAAA | |
TGCGCTTATAGAAACACAGAAAAAAAAAATAAAAACGGATAAATCTTTAGAAACAATAAACACTAGCTTA | |
AAAATTAAAAGCAAAACAAACAATAAAACATGGCAACTGATCCGGAAAAAGGGAAAAATGAGGAAGAAAA | |
CTATAATATACAGTTTGCAGATGAATACGTGTTGACGGAGACAGAGAAAACCTTTATATTGGCTTGTGAG | |
CGCGGTGACATAGCAAGTGTCAAGGTAATAATTGAGGAAAATAAAGGTGCACCGGAAAAGTTTAATATTA | |
ATTGTGTTGATCCCATGAATCGTTCGGCCTTAATATCAGCCATTGAAAATGAAAATTTTGATTTAATGAT | |
TGTACTGTTGGAGGAAGGCATAGATGTGGGCGATGCATTGTTGCATGCTATTTCTGAAGAATATGTGGAG | |
GCTGTGGAGGAACTGTTGCAATGGGAAGAAACGCATCATAAGGAGGGTACACCATATAGTTGGGAGGCAG | |
TTGATCGTTCGAAATCGACATTTACGCCTGATATAACGCCTCTAATATTGGCAGCACATCGTAACAATTA |
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
# ****************************************************************************** | |
# FUNCTION: extract.five.utr.sequence | JULY/29/2012 | BENJAMIN TOVAR | |
# ****************************************************************************** | |
extract.five.utr.sequence <- function(gene.list.refseq, | |
number.bases.upstream=1000){ | |
# Author: Benjamin Tovar | |
# Date: July 29, 2012 | |
# Post: http://btovar.com/2015/03/extracting-upstream-regions/ |
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
# Author: Benjamin Tovar | |
# Date: March 14, 2015 | |
# Post: http://btovar.com/2015/03/markov-chains-in-r | |
# | |
# Example of a Markov Chain of zero order (the current nucleotide is | |
# totally independent of the previous nucleotide). | |
# *********************************************************************** | |
# *********************************************************************** |
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
# | |
# PREDICTING LONG TERM CUSTOMER VALUE WITH BTYD PACKAGE | |
# Pareto/NBD (negative binomial distribution) modeling of | |
# repeat-buying behavior in a noncontractual setting | |
# | |
# Matthew Baggott, matt@baggott.net | |
# | |
# Accompanying slides at: | |
# http://www.slideshare.net/mattbagg/baggott-predict-customerinrpart1# | |
# |
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
package crappyBird; | |
import java.awt.Graphics; | |
import java.awt.Rectangle; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.awt.image.BufferedImage; | |
import java.io.IOException; | |
import java.net.URL; |