Skip to content

Instantly share code, notes, and snippets.

View ujh's full-sized avatar

Urban Hafner ujh

View GitHub Profile
[package]
name = "yatf"
version = "0.1.0"
authors = ["Urban Hafner <contact@urbanhafner.com>"]
[dependencies]
[[test]]
name = "yatf"
path = "src/main.rs"
name: "LogReg"
input: "data"
input_dim: 1
input_dim: 2
input_dim: 19
input_dim: 19
#this part should be the same in learning and prediction network
layers {
name: "conv1_7x7_128"
#!/usr/bin/env ruby
#
# Convert VCR cassettes that use basic auth to work with Webmock 2. Takes the folder where the VCR
#cassettes are stored as an argument.
require 'yaml'
require 'base64'
FOLDER = File.expand_path(ARGV[0])
FILES = Dir["#{File.join(FOLDER, '**', '*.yml')}"]
@ujh
ujh / commit-msg
Created April 1, 2011 08:01
git commit hook that modifies the commit message to include links to Pivotal Tracker stories when issue number is included
#!/usr/bin/env ruby
PREFIX = "https://www.pivotaltracker.com/story/show/"
fn = ARGV.first
sids = []
File.open(fn) do |f|
f.each do |line|
next if line =~ /^#/
line.scan(/\[[^#]*#(\d+)\s*\]/) {|a| sids += a }
end
window.onload = function() {
Raphael.fn.hex = function(center, radius) {
var degrees = [0, 60, 120, 180, 240, 300];
var path = "";
for(var i = 0; i < degrees.length; i++) {
if (i == 0) {
path += "M";
} else {
path += "L";
}
From dabd97ec82099de266180372fe63b3c9b426f16e Mon Sep 17 00:00:00 2001
From: Urban Hafner <uh@msales.com>
Date: Mon, 17 Aug 2009 14:54:21 +0200
Subject: [PATCH] Remove empty lines that are produced by splitting the cookie string
---
lib/rack/test/cookie_jar.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/rack/test/cookie_jar.rb b/lib/rack/test/cookie_jar.rb