Skip to content

Instantly share code, notes, and snippets.

View szalai1's full-sized avatar
👣

Peter Szalai szalai1

👣
View GitHub Profile
.group {
display: flex;
align-items: center;
flex-direction: row;
}
.group div {
border: none;
}
cloud.google.com/go ^0.35.1 v0.35.1 28a4bc8 v0.35.1 8
contrib.go.opencensus.io/exporter/stackdriver v0.6.0 v0.6.0 2b93072 v0.6.0 1
github.com/Azure/azure-pipeline-go 0.1.7 0.1.7 7571e8e 0.1.7 1
github.com/Azure/azure-storage-blob-go ^0.3.0 0.3.0 0.3.0 1
github.com/NYTimes/gziphandler v1.0.1 v1.0.1 2600fb1 v1.0.1 1
github.com/alecthomas/template branch master branch master a0175ee a0175ee 2
github.com/alecthomas/units branch master branch master 2efee85 2efee85 1
github.com/armon/go-metrics branch master branch master 3c58d81 f0300d1 2
github.com/beorn7/perks branch master branch master 3a771d9 3a771d9 1
github.com/cespa
package main
import (
"fmt"
)
const (
ENCODED_T = 0
ENCODED_X = 1
ENCODED_O = 2
#! /usr/bin/python
#https://code.google.com/codejam/contest/3004486/dashboard#s=p1
import sys
def deduplicate(train):
prev = train[0]
deduped = [prev]
for i in range(1, len(train)):
if train[i] != prev:
model->userFactors->linCombine(recDat->user,-gradient*learningRate, model->itemFactors->get(recDat->item));
if (regularizationRate>0) {
model->itemFactors->linCombine(recDat->item,-regularizationRate*learningRate, model->itemFactors->get(recDat->item));
}
model->itemFactors->linCombine(recDat->item,-gradient*learningRate, &(model->tmpUserFactor));
if (regularizationRate>0) {
model->userFactors->linCombine(recDat->user,-regularizationRate*learningRate, &model->tmpUserFactor);
}
function mount_sshfs_if_needed {
if [ "$(df -P "$2")" == "$(df -P "$2/..")" ]; then
command=(sshfs -o idmap=user $1 $2)
echo "${command[@]}"
"${command[@]}"
fi
}
mount_sshfs_if_needed $USER@info:/mnt/idms /home/$USER/idms
@szalai1
szalai1 / gist:26ad00a939ca423b864f
Last active August 29, 2015 14:26
useful links
http://dailytekk.com/2012/09/24/100-terrific-tools-for-coders-developers/?reading=continue
http://www.cs.rit.edu/~ats/go-2011-2/index.xml
https://github.com/golang/go/wiki/Courses