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 fastavro | |
schema = { | |
"type": "record", | |
"name": "topLevelRecord", | |
"fields": [ | |
{"name": "string_col", "type": ["null", "string"], "default": None}, | |
{"name": "int_col", "type": ["null", "int"], "default": None}, | |
{"name": "bool_col", "type": ["null", "boolean"], "default": None}, | |
{"name": "bigint_col", "type": ["null", "long"], "default": None}, |
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 scan_leaf(leaf): | |
rowkey_prefix = leaf.app_id + '|' + leaf.event_date + '|' + leaf.event_type | |
filters = get_scan_filters(leaf.event_attributes) | |
scan_request = new_hbase_scan(table = 'events') | |
scan_request.set_rowkey_prefix(rowkey_prefix) | |
scan_request.set_filters(filters) | |
rows_result_set = scan_request.scan() |
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
### Keybase proof | |
I hereby claim: | |
* I am nenorbot on github. | |
* I am nenorbot (https://keybase.io/nenorbot) on keybase. | |
* I have a public key whose fingerprint is 6DA4 4B5C 4AA1 3B63 B81F 20B3 A9EC 3864 4C92 B937 | |
To claim this, I am signing this object: |
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
(defn make-coords [word row row-inc col col-inc] | |
(map (fn [w row col] {:letter w :row row :col col}) | |
word | |
(iterate #(+ % row-inc) row) | |
(iterate #(+ % col-inc) col))) | |
(defn make-next-direction [row col] | |
(println row col) | |
(let [modifier (if (= 0 (rand-int 2)) 1 -1)] | |
(cond |