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 / sum.sublime-snippet
Created September 7, 2014 23:55
sublime snippet example
<snippet>
<content><![CDATA[
\sum_{${1:i=1}}^{${2:n}}
]]></content>
<tabTrigger>sum</tabTrigger>
<scope>text.tex.latex</scope>
<description>Sum</description>
</snippet>
curl -L -O 'http://downloads.sourceforge.net/project/wnsql/wnsql3/sqlite/3.1/sqlite-31.db.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fwnsql%2Ffiles%2Fwnsql3%2Fsqlite%2F3.1%2Fsqlite-31.db.zip%2Fdownload&ts=1409711250&use_mirror=iweb'
function getTarget(e){
if (!e){
e = window.event;
}
return e.target || e.srcElement;
}
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;
}
ALTER TABLE User ADD email VARCHAR(256)
@Planeshifter
Planeshifter / gist:4a8f444ac34529c3c89c
Created June 17, 2014 10:00
Get all objects in head object inside node.js
Object.keys(global)
#!/usr/bin/env node --harmony
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')
@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:
@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: []
});