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
#!/bin/bash | |
port=$1 | |
if [ -z "$port" ] #if port isn't assigned | |
then | |
echo Need to specify port number | |
exit 1 | |
fi |
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 datetime | |
################################################################### | |
# | |
# Showing the way bits, difficulty, target, and hash work together. | |
# | |
################################################################### | |
print "Calculating target from bits, verifying the block's hash is valid, and verify the calculated difficulty." |
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 csv | |
import numpy as np | |
points_label = "Points" | |
lineup_label = "Lineup" | |
players = set() | |
num_lineups = 0 | |
with open('outcome.csv', 'rb') as csvfile: | |
rows = csv.reader(csvfile) |
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 nltk | |
from nltk.stem.wordnet import WordNetLemmatizer | |
import string | |
class SentenceRank(object): | |
def __init__(self, body, title): | |
self.body = body | |
self.sentence_list = nltk.tokenize.sent_tokenize(self.body)[:] | |
self.title = title |
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 nltk | |
import requests | |
FREEBASE_API_KEY = '' | |
class FindNames(object): | |
def __init__(self, text, freebase_api_key): | |
self.text = text | |
self.key = freebase_api_key |
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 requests | |
from bs4 import BeautifulSoup | |
import os, json | |
base_url = "http://api.genius.com" | |
headers = {'Authorization': 'Bearer GENIUS_API_BEARER_STRING'} | |
artist_names = ["Fleet Foxes"] | |
def artist_id_from_song_api_path(song_api_path, artist_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
import nltk | |
import string | |
import requests | |
import operator | |
import re | |
import logging | |
from collections import defaultdict | |
pattern = '[A-Z][^A-Z]*' |
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 nltk | |
import string | |
import pprint | |
import requests | |
import operator | |
import re | |
import logging | |
from collections import defaultdict | |
FREEBASE_API_KEY = '' |
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
(ns gb-or-syria.core | |
(:use [boilerpipe-clj.core] | |
[opennlp.nlp] | |
[opennlp.treebank] | |
[clojure.pprint :only [pprint]] | |
[opennlp.tools.filters] | |
[clojure.set] | |
[clojure.string :only [split-lines]] | |
[stemmer.snowball]) | |
(:gen-class)) |
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
(ns classify.core | |
(:use [boilerpipe-clj.core] | |
[opennlp.nlp] | |
[opennlp.treebank] | |
[clojure.pprint :only [pprint]] | |
[opennlp.tools.filters] | |
[clojure.set] | |
[stemmer.snowball]) | |
(:gen-class)) |
NewerOlder