This is my first crack at spec'ing out the fields in the wordObject
s contained in a "universal transcript" as produced by a machine, a human, or both, from human speech.
This is the word that the transcriber thinks is spoken.
[ | |
{ | |
"date": "9 Apr 2019", | |
"location": "Spaces Genève, Quai de l'île", | |
"ping": 4, | |
"down": 222.29, | |
"up": 213.07 | |
} | |
] |
MATCHED_LOOKUP = {k: v for k, v in ["()", "[]", "{}"]} | |
def is_valid(string): | |
open_braces = [] | |
for char in string: | |
if char in MATCHED_LOOKUP: | |
open_braces.append(char) |
<!doctype html> | |
<head> | |
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script crossorigin src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.js"></script> | |
</head> | |
<body> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title></head> | |
<body> | |
<script src="https://unpkg.com/react@16.5.2/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16.5.2/umd/react-dom.development.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.js"></script> | |
<script type="text/babel"> |
generateGoL = (numRows, numCols) => { | |
return Array.from({length: numRows}, () => | |
Array.from({length: numCols}, () => | |
Math.round(Math.random()))) | |
} |
const getNeighbors = (rowNum, colNum, board) => { | |
const neighbors = []; | |
for (let r of [rowNum - 1, rowNum, rowNum + 1]) { | |
if (board[r] === undefined) { | |
continue; | |
} | |
for (let c of [colNum - 1, colNum, colNum + 1]) { | |
if (board[r][c] === undefined) { | |
continue; | |
} |
from time import sleep | |
BOARD_WIDTH = 17 | |
LEFT_PAD_30 = " " * 30 | |
LEFT_PAD_10 = " " * 10 | |
WIN_BOXES = [(0, 1, 2), | |
(3, 4, 5), | |
(6, 7, 8), | |
(0, 3, 6), | |
(1, 4, 7), |
""" | |
The star of this show is get_tenders, which will return all tenders | |
if there are no keyword arguments supplied, or tenders from a specific location, | |
and/or before/after datetimes. | |
For convenience, here are the fields of a Tender: | |
'id' | |
'location_id' | |
'transaction_id' |
# http://greatdata.com/areacodetimezone | |
area_code_gmt_dict = { | |
201: -5, | |
202: -5, | |
203: -5, | |
205: -6, | |
206: -8, | |
207: -5, | |
208: -7, |