There are several dependencies needed in order to get the app running:
- Ruby (2.0.0 or higher)
- Qt5 (for tests)
class Node | |
attr_accessor :value, :left, :right | |
end | |
def subtree(root, min, max) | |
if root.value >= min | |
if root.left <= min | |
if root.left.right >= min | |
root.left = root.left.right | |
else |
// some resource | |
{ | |
a: 1, | |
b: 2, | |
links: { | |
"show": "asdf", | |
"delete: "asdf2" | |
} | |
} |
foo_shiny_feature: | |
type: *FEATURE_RELEASE # as opposed to, for instance, *EXPERIMENT | |
buckets: | |
disabled: | |
percentage: 90 | |
whitelist: | |
user_ids: | |
- *JRHEARD_USER_ID # jrheard is a curmudgeon, doesn't want the new version until it's done | |
dark_launch: | |
percentage: 0 |
{ | |
"visit_time": "2014-10-16 09:44:57", | |
"title": "Pizza New York, NY", | |
"url": "http://www.yelp.com/search?find_desc=pizza&find_loc=NYC" | |
} |
SELECT | |
r.id as restaurant_id, | |
rez_sheet.shift as shift, | |
start AT TIME ZONE r.timezone as start_time, | |
"end" AT TIME ZONE r.timezone as end_time | |
FROM | |
rez_sheet,rez_schedule rs,rez_restaurant r | |
WHERE | |
r.id = rez_sheet.restaurant_id AND | |
rs.sheet_id = rez_sheet.id; |
with mock.patch("%s.restart_server" % module_under_test, autospec=True) as mock_restart: | |
restart_servers_in_datacenter(servers, "sfo") | |
mock_restart.assert_called_once() |
{ | |
"query" : "cheap restaurants", | |
"language" : "en", | |
"queryAnnotations" : [ | |
{ | |
"type" : "RawTokenQueryAnnotation", | |
"offset" : 0, | |
"length" : 5, | |
"queryText" : "cheap" | |
}, |
require 'aws-sdk' | |
require 'json' | |
REGION = 'us-west-2' | |
QUEUE_NAME = 'c0wl-cloudtrail' | |
s3 = Aws::S3::Client.new(region: REGION) | |
sqs = Aws::SQS::Client.new(region: REGION) | |
queue_url = sqs.get_queue_url(queue_name: QUEUE_NAME).queue_url |
# -*- coding: utf-8 -*- | |
import itertools | |
import re | |
import urlparse | |
import boto | |
import warc | |
from boto.s3.key import Key | |
from gzipstream import GzipStreamFile |