I hereby claim:
- I am rkneufeld on github.
- I am rkneufeld (https://keybase.io/rkneufeld) on keybase.
- I have a public key whose fingerprint is 1A4A 094D D64C FFC8 A8E7 F71F C510 F110 AB0B 89B5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(require '[datomic.api :as d] | |
'[clojure.stacktrace :as st]) | |
;; Knobs | |
(def datoms-per-tx 1000) | |
;; Monitoring | |
(def start-time (atom 0)) | |
(def transaction-count (atom 0)) |
I hereby claim:
To claim this, I am signing this object:
(ns my-suite.actions.acquirer | |
(:require ;; … | |
[io.homegrown.sim-ephemeral :as eph]) | |
(defn create-payment | |
“Create a payment, returning a vector of [<response> <payment id> <nsecs taken>]” | |
[action] | |
…) | |
(defn approve-paymenet |
#Here I add a two helper methods to the Fixnum class to aid in creating cases | |
class Fixnum | |
#returns T/F (actually F/T) if number is zero. | |
def bool | |
self.zero? | |
end | |
#Create a number of cases based on the calling number | |
#i.e. 2 returns [ [T,T], [T,F], [F,T], [F,F]] | |
def create_cases |
def do_work | |
fltArray = [-361, -359, -44, -0.001, 0.0001, 1, 45, 89, | |
90, 91, 179, 180, 189, 360, 360001 ] | |
cosVals = [] | |
sinVals = [] | |
tempVar = -1.0 | |
for (int i = 0; i < fltArray.length, i++) | |
{ | |
if(fltArray[i] >= 360.0) | |
{ |
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> | |
<html> | |
<head> | |
<meta content="text/html; charset=iso-8859-1"> | |
<meta name="GENERATOR" content="Mozilla/4.73 [en] (Windows NT 5.0; U) [Netscape]"> | |
<meta name="Author" content="Web Creations - John Shotton - jasit@mts.net - (204) 882-2832"> | |
<meta name="Description" content=" R. M. of Stanley, Gardenland of Manitoba."> | |
<meta name="KeyWords" content="rm of stanley, rural, municipality, of, stanley, Morden, Manitoba, MB, Canada, City of Winkler, Manitoba, Best in Country Living, Corn and Apple Festival, Minnewasta, south central, Winnipeg, Lake Minnewasta, Pembina Hills Art Gallery, Leo Mol statue, Canadian Fossil Discovery Centre, fossils, Morden Museum, Back Forty Folk Festival, Morden International Triathlon, Colert Beach, Agriculture Canada Research Station, Minnewasta Golf and Country Club, Manitoba Baseball Hall of Fame, Pembina Thresherman's Museum, Cripple Creek Music Festival, Morden Mighty Man Competition, Thresherman's Reunion, Bound |
require 'benchmark' | |
str = "1 2 3 4-5 6 7 8-9" | |
Benchmark.bm do |bm| | |
bm.report("split: ") {10000.times do hash = Hash.new(0); str.split.each { |m| hash[m] += 1}; end } | |
bm.report("scan: (\\w+) ") { 10000.times do hash = Hash.new(0); str.scan(/\w+/m) { |m| hash[m] += 1} end } | |
bm.report("scan: (\w+(-\w+)?) ") { 10000.times do hash = Hash.new(0); str.scan(/(\w+(-\w+)?)/m) { |m| hash[m] += 1} end } | |
end | |
## Native environment tests - 1.8.7 |
(defn count-atoms [L] | |
(cond | |
(not (coll? L)) 1 | |
(empty? L) 0 | |
(list? L) (apply + (map count-atoms L)))) |
#!/opt/local/bin/ruby -w | |
require 'YAML' | |
# Example ~/.git_repos : | |
# repos: | |
# - "~/dev/gh/joust" | |
# - "~/dev/gh/joust/meta" | |
config = YAML.load_file(ENV['HOME'] + "/.git_repos") | |
config['repos'].each do |f| | |
f.gsub!('~',ENV['HOME']) |