Skip to content

Instantly share code, notes, and snippets.

@gatamar
gatamar / python_info_chunks.txt
Last active April 19, 2019 06:33
TechTalk "Speed your Python Up" Lviv 18.04.19
Js wat
Eurocon: https://blog.europython.eu
Rust prom.ua
Rabbitmq
Celery
Namedtuple vs dict: Lear std types
Userdict in my current CI
Disassembling
Pypy vs Cython: compiles bytecode
Which python i Use?
import regex
def try_recursive_regex():
text = "ababagalamaga1-ababagalamaga2-(werewr(o)(l)(i)(a))sdfsdf()()(((("
pattern = "\((?>[^()]|(?R))*\)"
res = regex.findall(pattern, text)
print( res )
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = YES
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
APPLE_INTERNAL_DIR = /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
digraph finite_state_machine {
rankdir=LR;
size="8,5"
node [shape = circle];
node [shape = doublecircle]; s1;
node [shape = doublecircle]; s5;
My top tips for productive code reviews:
👍 Give praise, not only improvement suggestions.
🤖 Automate all sorts of style checks.
🤝 Agree with the team before making big changes.
🤔 Ask for clarification, rather than saying something is wrong.
✅ Use tests to show your intent.
16 =========================================
flapping = маяти, розвіватись
sodden = промоклий, просочений
founder = загрузнути, затонути
fare = жити, існувати
spearmen = списники
formidable = грізний, величезний
vanguard = авангард
engulf = поглинати
from subprocess import call
# git diff --name-only --diff-filter=D > deleted_files_list.txt
folder_name = "SubFolder1/SubFolder2"
with open("deleted_files_list.txt") as f:
for filename in f:
if filename.startswith("folder_name"):
call(["git", "checkout", filename[:-1]])
# search given text in all commit messages
git log --all --grep='some_text'
NSLog(@"%@", [[NSThread callStackSymbols] description]);
void dumpExtensions()
{
GLint n;
glGetIntegerv(GL_NUM_EXTENSIONS, &n);
if (n > 0)
{
const char** extensions = (const char**)malloc(n * sizeof(char*));
GLint i;
for (i = 0; i < n; i++)
{