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
#!/bin/bash | |
while : | |
do | |
rails c < move_small.rb | |
done |
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
# this assumes the rails console has preloaded the resources; accordingly, | |
# you should invoke this script as | |
# | |
# rails c < move_small.rb | |
begin | |
args_list = [] | |
jobs_list = [] | |
puts 'finding jobs' | |
Sidekiq::Queue.new('internal').each do |job| |
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
# this assumes the rails console has preloaded the resources; accordingly, | |
# you should invoke this script as | |
# | |
# rails c < move_internal.rb | |
begin | |
args_list = [] | |
jobs_list = [] | |
puts 'finding jobs' | |
Sidekiq::Queue.new('internal').each do |job| |
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
{ | |
"id": 4094, | |
"reducible": { | |
"id": 1234, | |
"type": "Workflow" | |
}, | |
"data": { | |
"centers": [ | |
5, | |
30 |
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
def get_page(workflow, last_id) workflow.extracts.where('id > ? and workflow_id = ?', last_id, workflow.id).order(id: :asc).take(10000); end | |
def eval_page(page) puts "#{page.count}\t#{page.last.id}\n"; [page.count, page.last&.id]; end | |
def page_thru(id) | |
wf = Workflow.find(id); last_id=0; count=10000; | |
count, last_id = eval_page(get_page(wf, last_id)) until count < 10000 | |
end | |
def time_this() start=Time.now.utc; yield(); Time.now.utc-start; end |
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
class Node { | |
constructor(value, children) { | |
this.value = value; | |
this.children = children; | |
} | |
setValue(newValue) { | |
return new Node(newValue, this.children); | |
} | |
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 Data.List as List | |
data Tree a = | |
Empty | | |
Leaf a | | |
Branch (Tree a) a (Tree a) deriving Show | |
insertT :: Ord a => a -> Tree a -> Tree a | |
insertT n Empty = Leaf n |
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
{ | |
"annotations": [ | |
{ | |
"task": "init", | |
"value": 3 | |
}, | |
{ | |
"task": "T4", | |
"value": [ | |
{ |
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
.filmstrip{ | |
padding: 0; | |
margin: 10px; | |
display: flex; | |
} | |
.navButton{ | |
border: 0; | |
margin: 0; | |
height: 100%; |
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
var compile = function(selector){ | |
var r = /(\{\{.+?\}\})/; | |
var elem = document.querySelector(selector); | |
var markup = elem.outerHTML; | |
elem.remove(); | |
markup = markup.replace(/\s+/,' '); | |
var fragments = markup.split(r); | |
var template = (function(tpl){ |