Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View z00sts's full-sized avatar

Stan Zubov z00sts

  • Belgrade, Serbia
View GitHub Profile

Keybase proof

I hereby claim:

  • I am z00sts on github.
  • I am zsts (https://keybase.io/zsts) on keybase.
  • I have a public key ASAaUVSJcKh1JBekeFuI07sFpED8rHvgZPDhAOL7pN8BrQo

To claim this, I am signing this object:

@z00sts
z00sts / regex_verbose.py
Created December 17, 2019 07:17
regex_verbose.py
_options_regex = re.compile(
r'''
(?P<keyword>[\w.-]+) # Consist of 1+ alphanumeric or '.' or '-'
\s*
(?P<settings> # Settings are optional
: # "Keyword/settings" delimiter
\s*
(?P<quote>"?) # Optional quote character
(?P<value>
(
@z00sts
z00sts / reverse_big.py
Created January 20, 2020 16:21
reverse_big.py
def reverse_big(gen):
yield from reversed(gen)
g1 = range(10**10)
for n, item in enumerate(reverse_big(g1)):
if n > 10:
break
print(item)
@z00sts
z00sts / call_limit.py
Last active January 22, 2020 08:44
call_limit.py
class CallLimitException(Exception):
pass
def call_limit(limit=10):
def deco(wrapped):
nonlocal limit
i = 0
def wrapper(*args, **kwargs):
@z00sts
z00sts / tmux-cheatsheet.markdown
Created May 7, 2020 05:30 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@z00sts
z00sts / setup.cfg
Created May 27, 2020 08:07 — forked from althonos/setup.cfg
A `setup.cfg` template for my Python projects
# https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c
[metadata]
name = {name}
version = {version}
author = Martin Larralde
author-email = martin.larralde@ens-paris-saclay.fr
home-page = https://github.com/althonos/{name}
description = {description}
long-description = file: README.rst, CHANGELOG.rst