This is based on the following: https://github.com/troyxmccall/dotfiles/blob/ae78ab87c861efe27aee7ede47cd0e61dac8fe22/.functions#L419-L442
I changed it to be a script, and fixed some issues related to handling of versions.
This is based on the following: https://github.com/troyxmccall/dotfiles/blob/ae78ab87c861efe27aee7ede47cd0e61dac8fe22/.functions#L419-L442
I changed it to be a script, and fixed some issues related to handling of versions.
map $http_origin $allow_origin { | |
default "$http_origin"; | |
} | |
map $request_method $cors_method { | |
default "allowed"; | |
"OPTIONS" "preflight"; | |
} | |
map $cors_method $cors_max_age { |
# This has been edited to work with python3. Some of the tested combinations will not work in python2. | |
import pandas as pd | |
df = pd.DataFrame({'text': [str(i % 1000) for i in range(1000000)], | |
'numbers': range(1000000)}) | |
import pickle | |
# Python 3 has no cPickle | |
#import cPickle | |
import json | |
from functools import partial |
:) SELECT toDateTime(intDiv(toUInt32(EventTime), 5) * 5) AS k, count(), uniq(UserID) FROM hits_layer WHERE CounterID = 29761725 AND EventDate = today() AND EventTime >= now() - 600 GROUP BY k ORDER BY k | |
SELECT | |
toDateTime(intDiv(toUInt32(EventTime), 5) * 5) AS k, | |
count(), | |
uniq(UserID) | |
FROM hits_layer | |
WHERE (CounterID = 29761725) AND (EventDate = today()) AND (EventTime >= (now() - 600)) | |
GROUP BY k | |
ORDER BY k ASC |
:) CREATE TABLE test.nested (EventDate Date, UserID UInt64, Attrs Nested(Key String, Value String)) ENGINE = MergeTree(EventDate, UserID, 8192) | |
CREATE TABLE test.nested | |
( | |
EventDate Date, | |
UserID UInt64, | |
Attrs Nested( | |
Key String, | |
Value String) | |
) ENGINE = MergeTree(EventDate, UserID, 8192) |
class "Apple-Intel-Netboot" { | |
# Limit this class to only Intel Apple machines | |
match if substring (option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386"; | |
option dhcp-parameter-request-list 1,3,17,43,60; # Send these options to the client (possibly forcing it, if the client didn't request it) | |
# From: http://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xml | |
# 1 - Subnet Mask | |
# 3 - Router | |
# 17 - Root Path | |
# 43 - Vendor Specific | |
# 60 - Class ID |
#!/bin/bash | |
# | |
# This script surrounds the command passed in with start and finish notifications | |
# to the cronitor monitoring application. | |
# | |
# === SETUP | |
# | |
# * Make sure the cronitor script is executable. | |
# | |
# chmod +x cronitor |
// Retry with backoff | |
// Adapted from http://blog.danlew.net/2016/01/25/rxjavas-repeatwhen-and-retrywhen-explained/ | |
Observable | |
.range(start: 1, count: 10) | |
.doOn(onNext: { i in | |
if i == 5 { | |
throw NSError(domain: "com.example", code: 1, userInfo: ["any": "thing"]) | |
} | |
}) | |
.retryWhen { (attempts: Observable<ErrorType>) -> Observable<Int64> in |