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/env ruby | |
require 'optparse' | |
options = {} | |
OptionParser.new do |opts| | |
opts.banner = "Usage: example.rb [options]" | |
opts.on("-r", "--rt [Float]", Float, "Rt value") do |v| | |
options[:rt] = v |
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
import cv2 | |
import numpy as np | |
import glob | |
from gray_contourer2 import GrayContourer | |
def mask(img): | |
c = GrayContourer(img,60,0) | |
# only give data for the biggest object found | |
contours = sorted(c.contours, key=cv2.contourArea) | |
if len(contours) == 0: |
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 32 columns, instead of 24 in line 3.
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
0,../rejected/2017-11-18T20:25:00.527406.jpg,0.883719,0.452769,0.102973,0.0195769,0.038895,0.0391537,0.00293222,0.0,0.0,0.0,0.618053,0.736267,0.256814,0.0660522,0.0316771,0.0673513,0.00809414,9.99277e-05,0.0,0.0,0.333,0.819347,0.430899,0.157434,0.0347989,0.0756771,0.0196006,0.000943344,0.0,0.0 | |
0,../rejected/2017-11-18T20:25:06.174305.jpg,0.983749,0.171709,0.0233575,0.0250409,0.0397708,0.0,0.0,0.0,0.0,0.0,0.927514,0.364888,0.0484109,0.0199906,0.0618985,0.00072255,0.0,0.0,0.0,0.0,0.6581,0.741047,0.112786,0.0246377,0.0643317,0.0169726,0.0,0.0,0.0,0.0 | |
0,../rejected/2017-11-18T20:25:08.691287.jpg,0.992609,0.0567651,0.0596911,0.0871958,0.018434,0.0,0.0,0.0,0.0,0.0,0.94088,0.298995,0.0228205,0.154271,0.0320186,0.00104788,0.0,0.0,0.0,0.0,0.741976,0.648424,0.0512726,0.136906,0.087244,0.00577153,0.0,0.0,0.0,0.0 | |
0,../rejected/2017-11-18T20:25:17.510077.jpg,0.993285,0.0936853,0.0375599,0.0543485,0.0156244,0.000306361,0.0,0.0,0.0,0.0,0.899667,0.425459,0.043942,0.0778902,0.0398224,0.00083917,0.0,0.0,0.0,0.0,0.723133,0.6815 |
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
from __future__ import print_function | |
import numpy as np | |
import tflearn | |
from tflearn.data_utils import load_csv | |
data, labels = load_csv('extracted_histograms.csv', target_column=0, n_classes=2) | |
def preprocess(data, columns_to_ignore): | |
# Sort by descending id and delete columns |
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
import numpy as np | |
import cv2 | |
cap = cv2.VideoCapture(1) | |
cap.set(cv2.CAP_PROP_FRAME_HEIGHT,640) | |
cap.set(cv2.CAP_PROP_FRAME_WIDTH,480) | |
success, frame = cap.read() | |
cv2.imwrite('ELP_640_480.jpg',frame) |
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
Bicycle data missing time or location, as percentages | |
year: time location | |
2006: 1.59 0.26 | |
2007: 1.74 0.37 | |
2008: 2.97 0.42 | |
2009: 2.86 0.68 | |
2010: 4.60 1.49 | |
From |
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
$ git clone http://github.com/ry/node.git | |
Initialized empty Git repository in /Users/danielharan/recoset/node/.git/ | |
got f541043618b8e02d65590a60489601d886f85f7d | |
walk f541043618b8e02d65590a60489601d886f85f7d | |
Getting alternates list for http://github.com/ry/node.git | |
Getting pack list for http://github.com/ry/node.git | |
Getting index for pack a95bae93307c7b102d13cf6c0f110e29ecde36aa | |
Getting index for pack 3d8b7812c7467dcf06fbd126680512baa076c00f | |
Getting index for pack 6bbcda776e7940e5d997eb83e59acf1bc521bb7d | |
Getting index for pack b21dcb403ea73e8d045a00276e6b736280a9773b |
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
has_many :connections, :foreign_key => "from_id" | |
has_many :favorites, :through => :connections, :source => :to | |
has_many :connections_as_target, :class_name => "Connection", :foreign_key => "to_id" | |
has_many :fans, :through => :connections_as_target, :source => :from |
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
$ gem list aslak | |
*** LOCAL GEMS *** | |
aslakhellesoy-cucumber (0.3.7) | |
$ gem list cucumber # empty | |
$ rake... |
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/env ruby | |
maxima = Hash.new(0) | |
STDIN.each_line do |line| | |
key,val = line.split("\t") | |
maxima[key] = [maxima[key], val.to_i].max | |
end | |
maxima.each do |key,val| |
NewerOlder