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 () { | |
var moduleName = 'someName', | |
methods = {}, | |
root = this; | |
// Private methods | |
var _foo = function () { | |
}; |
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
# Include passwords/API keys etc, stored as env. (if exists) | |
if [ -f ~/.priv/env_config.sh ]; | |
then | |
source ~/.priv/env_config.sh | |
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
#!/usr/bin/python | |
import sys | |
import numpy as np | |
import logging | |
from os import path | |
from sklearn import decomposition, linear_model | |
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer | |
from sklearn.naive_bayes import MultinomialNB | |
from sklearn.pipeline import Pipeline |
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
## Done training | |
# Stats for LogisticRegression | |
## Best params: {'vect__ngram_range': (1, 1), 'tfidf__smooth_idf': False, 'tfidf__sublinear_tf': True, 'vect__preprocessor': <function no_usernames at 0xa1540d4>, 'tfidf__use_idf': True, 'vect__stop_words': None, 'clf__penalty': 'l1', 'clf__C': 2.0} | |
## Best Score: 0.68442947358 | |
precision recall f1-score support | |
"negative" 0.51 0.24 0.33 384 | |
"objective" 0.67 0.84 0.75 1326 | |
"positive" 0.73 0.62 0.67 968 |
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
###################################################################### | |
# Showing for <methods.boost.Boosting object at 0x916aa6c> | |
# Total Score: 0.638452237001 | |
precision recall f1-score support | |
negative 0.74 0.21 0.32 340 | |
neutral 0.61 0.85 0.71 739 | |
positive 0.67 0.62 0.65 575 | |
avg / total 0.66 0.64 0.61 1654 |
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
TASK B | |
Comparing predictions demo.pred to gold standard twitter-dev-gold-B.tsv. | |
File: demo.pred -- no errors found | |
Prediction file: 1654 lines | |
1654 unique | |
Breakdown by class: | |
positive 580 | |
neutral 891 | |
negative 183 | |
File: twitter-dev-gold-B.tsv -- no errors found |
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
###################################################################### | |
# Showing for <models.svm.SVM object at 0x1052c9f90> | |
Best params: {'steps': [('vect', TfidfVectorizer(analyzer='word', binary=False, charset='utf-8', | |
charset_error='ignore', dtype=<type 'long'>, input='content', | |
lowercase=True, max_df=1.0, max_features=None, max_n=None, | |
min_df=2, min_n=None, ngram_range=(1, 1), norm='l2', | |
preprocessor=<function remove_noise at 0x104787410>, | |
smooth_idf=True, stop_words=None, strip_accents=None, | |
sublinear_tf=True, token_pattern=u'(?u)\\b\\w\\w+\\b', | |
tokenizer=<function tokenize at 0x104787848>, use_idf=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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>FRP Piano</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<audio id="sound-A2" src="samples/A2.ogg" preload="auto"></audio> | |
<audio id="sound-B2" src="samples/B2.ogg" preload="auto"></audio> |
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
# An example of Functional Reactive Programming, by implementing a | |
# simple collaborative piano. | |
# By Mikael Brevik <@mikaelbr> | |
socket = io.connect() | |
scale = [ | |
'A2', 'Bb2', 'B2', 'C3', 'Db3', 'D3', 'Eb3', 'E3', 'F3', 'Gb3', 'G3', 'Ab3', | |
'A3', 'Bb3', 'B3', 'C4', 'Db4', 'D4', 'Eb4', 'E4', 'F4', 'Gb4', 'G4', 'Ab4', | |
'A4', 'Bb4', 'B4', 'C5' |
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
<div id="p-wrapper"> | |
<ul id="piano"> | |
<li><div class="anchor clickable" data-note="A2"></div></li> | |
<li><div class="anchor clickable" data-note="B2"></div><span></span></li> | |
<li><div class="anchor clickable" data-note="C3"></div></li> | |
<li><div class="anchor clickable" data-note="D3"></div><span></span></li> | |
<li><div class="anchor clickable" data-note="E3"></div><span></span></li> | |
<li><div class="anchor clickable" data-note="F3"></div></li> | |
<li><div class="anchor clickable" data-note="G3"></div><span></span></li> | |
<li><div class="anchor clickable" data-note="A3"></div><span></span></li> |
OlderNewer