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
BUILD_DIR=$(shell pwd) | |
ARCH=$(shell uname -m) | |
VERSION=$(shell sw_vers -productVersion | sed 's/\.[0-9]/_0/') | |
PYTHON_VERSION=3.7 | |
PYTHON_PATCH_VERSION=3.7.12 | |
PYTHON_POSTFIX=m | |
PYTHON_WHL_VERSION=cp$(subst .,,$(PYTHON_VERSION))-cp$(subst .,,$(PYTHON_VERSION))$(PYTHON_POSTFIX) | |
PYTHON_BASE=$(HOME)/.pyenv/versions/$(PYTHON_PATCH_VERSION) | |
PYTHON_LIBRARIES=$(PYTHON_BASE)/lib |
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
""" | |
tropo.py implements resource types not yet supported by troposphere. This module | |
is ever changing and should be updated when troposphere is upgraded. | |
""" | |
from __future__ import print_function | |
from troposphere import AWSObject, AWSProperty | |
from troposphere.validators import positive_integer | |
from troposphere.ecs import ( |
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 dokipen on github. | |
* I am doki_pen (https://keybase.io/doki_pen) on keybase. | |
* I have a public key ASB6BMJE2F-HO3RcgsxXNGQ_kHTAVcCv1kgnfIGgYukehgo | |
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
declare -A testthis | |
testthis[hello]="world" | |
echo "keys: ${!testthis[@]}" | |
printf "a\nb\nc\nd\ne\nf\n" | while read key && read value; do | |
testthis[$key]="${value}" | |
echo "keys: ${!testthis[@]}" | |
done | |
echo "keys: ${!testthis[@]}" |
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
a = [] | |
a[4294967294] = 1 | |
console.log(a) |
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
total = 4768 | |
unpledged = 717 | |
pledged = total - unpledged | |
clinton = 1279 + 18 - 3 | |
bernie = 1027 + 47 + 3 | |
needed = pledged / 2 | |
assigned = clinton + bernie | |
remaining = pledged - assigned | |
bernie_needed = needed - bernie | |
bernie_perc_needed = bernie_needed.to_f / remaining |
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 hello = 0; | |
var values = [1,2,3,4]; | |
for (var i = 0; i < values.length; i++) { | |
hello += values[i]; | |
} | |
console.log(hello); | |
# -------------------------------------- |
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
func bindListener(port string) net.Listener { | |
for { | |
l, err := net.Listen("tcp", fmt.Sprintf(":%s", port)) | |
if err != nil { | |
dlog("%+v", err) | |
time.Sleep(time.Duration(1) * time.Second) | |
} else { | |
return l | |
} | |
} |
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 operator | |
import itertools | |
def star(fn): | |
def wrapper(l): | |
retrun fn(*l) | |
return wrapper | |
pairs = [[1,2], [3,4], [5,6] | |
print map(star(operator.add), pairs) |
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
a = u'Ա Բ Գ Դ Ե Զ Է Ը Թ Ժ Ի Լ Խ Ծ Կ Հ Ձ Ղ Ճ Մ Յ Ն Շ Ո Չ Պ Ջ Ռ Ս Վ Տ Ր Ց Ւ Փ Ք Օ Ֆ ՙ ՚ ՛ ՜ ՝ ՞ ՟ ա բ գ դ ե զ է ը թ ժ ի լ խ ծ կ հ ձ ղ ճ մ յ ն շ ո չ պ ջ ռ ս վ տ ր ց ւ փ ք օ ֆ և ։' | |
len(a.encode('punycode')) # 257 | |
len(a.encode('utf-8')) # 254 |
NewerOlder