Skip to content

Instantly share code, notes, and snippets.

View Planeshifter's full-sized avatar
🎯
Focusing

Philipp Burckhardt Planeshifter

🎯
Focusing
View GitHub Profile
@Planeshifter
Planeshifter / gist:11369165
Last active August 29, 2015 14:00
Stanford NLP command line
java -cp stanford-corenlp-YYYY-MM-DD.jar:stanford-corenlp-models-YYYY-MM-DD.jar:xom.jar:joda-time.jar:jollyday.jar:ejml-VV.jar -Xmx2g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse,dcoref -filelist <YOUR LIST OF FILES>
@Planeshifter
Planeshifter / gist:11369385
Created April 28, 2014 11:49
Stanford NLP command line example
java -cp stanford-corenlp-3.3.1.jar:stanford-corenlp-3.3.1-models.jar:xom.jar:joda-time.jar:jollyday.jar:ejml-0.23.jar -Xmx2g edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma,ner,parse,dcoref -file input.txt
var Twit = require('twit');
var util = require('util');
var sqlite3 = require('sqlite3').verbose();
var $ = require('jquery');
// Prototype Methods
String.prototype.double_quotes = function()
{
return this.replace(/[\\"]/g, '""');
}
@Planeshifter
Planeshifter / gist:91d73230b64b2d73a2fd
Created May 22, 2014 15:25
Forever TwitterStreamer
var forever = require('forever-monitor');
var path_RRG = "/home/philipp/TwitterStream/"
var child = new (forever.Monitor)('multiple_streams.js', {
sourceDir: path_RRG,
cwd: path_RRG,
silent: true,
options: []
});
@Planeshifter
Planeshifter / gist:f8582c7e6047f0461ca2
Last active August 29, 2015 14:01
Multinomial Logistic Regression with Regularization
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
#include <iostream>
using namespace Rcpp;
using namespace arma;
using namespace std;
class MultLogit {
public:
R.parseEvalQ('Beta = matrix(rnorm(50),nrow=5,ncol=10);' +
'Beta[5,] = 1;' +
'prob = apply(X,1,function(x){exp(Beta %*% x)});' +
'prob = sweep(prob, 2, colSums(prob), FUN="/");' +
'y = t(apply(prob,2,FUN=function(p) rmultinom(1,1,p)))');
y = R.get('y')
#!/usr/bin/env node --harmony
@Planeshifter
Planeshifter / gist:4a8f444ac34529c3c89c
Created June 17, 2014 10:00
Get all objects in head object inside node.js
Object.keys(global)
ALTER TABLE User ADD email VARCHAR(256)
server {
listen 80;
server_name philipp-burckhardt.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}