This file contains hidden or 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
.file "greenlet.c" | |
.text | |
.p2align 4,,15 | |
.type green_is_gc, @function | |
green_is_gc: | |
.LFB142: | |
.cfi_startproc | |
cmpq $-1, 24(%rdi) | |
je .L3 | |
xorl %eax, %eax |
This file contains hidden or 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
# 1 "greenlet.c" | |
# 1 "<command-line>" | |
# 1 "/usr/include/stdc-predef.h" 1 3 4 | |
# 1 "<command-line>" 2 | |
# 1 "greenlet.c" | |
# 1 "greenlet.h" 1 |
This file contains hidden or 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
viktor@haree-nb /tmp/test/greenlet (git)-[master] % ./run-tests.py | |
running build_ext | |
Linking /tmp/test/greenlet/build/lib.linux-x86_64-2.7/greenlet.so to /tmp/test/greenlet/greenlet.so | |
python 2.7.4 (64 bit) using greenlet 0.4.0 from /tmp/test/greenlet/greenlet.so | |
test_dead_weakref (tests.test_weakref.WeakRefTests) ... ok | |
test_dealloc_weakref (tests.test_weakref.WeakRefTests) ... ok | |
test_inactive_weakref (tests.test_weakref.WeakRefTests) ... ok | |
test_version (tests.test_version.VersionTests) ... ok | |
test_exception_disables_tracing (tests.test_tracing.TracingTests) ... ok | |
test_greenlet_tracing (tests.test_tracing.TracingTests) ... ok |
This file contains hidden or 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
[diff] | |
tool = pycharm | |
[difftool "pycharm"] | |
cmd = /usr/local/bin/pycharm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read | |
[merge] | |
tool = pycharm | |
keepBackup = false | |
[mergetool "pycharm"] | |
cmd = /usr/local/bin/pycharm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED" |
This file contains hidden or 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 _convert_to_iban(self, account): | |
""" | |
Convert czech account number to IBAN | |
""" | |
acc = self.RE_ACCOUNT.match(account) | |
iban = 'CZ00{b}{ba:0>6}{a:0>10}'.format( | |
ba=acc.group('ba') or 0, | |
a=acc.group('a'), | |
b=acc.group('b'), | |
) |
This file contains hidden or 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
#!/bin/bash | |
number=$RANDOM | |
let "number %= 10" | |
if [[ $number -gt 8 ]] | |
then | |
echo "Success" | |
exit 0 | |
fi |
This file contains hidden or 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 split_sum_into_parts(limit=1500, min_parts=2, max_parts=5): | |
sample = sorted([0, limit] + random.sample(range(limit), random.randint(min_parts-1, max_parts-1))) | |
return [sample[i+1] - item for i, item in enumerate(sample) if i+1 < len(sample)] |
This file contains hidden or 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 split_sum_into_parts(limit=1500, min_parts=2, max_parts=5): | |
sample = sorted([0, limit] + random.sample(range(limit), random.randint(min_parts-1, max_parts-1))) | |
return [sample[i+1] - item for i, item in enumerate(sample) if i+1 < len(sample)] |
This file contains hidden or 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
#!/bin/bash | |
# CONFIGURATION | |
openssl_config_file=$(openssl ca 2>&1 | grep "Using configuration from" | sed 's/Using configuration from //g') | |
################################################################################ | |
txtgrn='\e[0;32m' | |
txtred='\e[0;31m' | |
txtrst='\e[0m' | |
config_tempfile=$(mktemp --suffix openssl) |
This file contains hidden or 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
with open('even_numbers.txt', 'w') as f: | |
for number in (n for n in range(10**100) if n%2 == 0): | |
f.write('{}\n'.format(number)) |