Skip to content

Instantly share code, notes, and snippets.

Avatar

Stanislav Zubov z00sts

View GitHub Profile
View keybase.md

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:

View 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 / call_limit.py
Last active Jan 22, 2020
call_limit.py
View call_limit.py
class CallLimitException(Exception):
pass
def call_limit(limit=10):
def deco(wrapped):
nonlocal limit
i = 0
def wrapper(*args, **kwargs):
View 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)
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@z00sts
z00sts / setup.cfg
Created May 27, 2020 — forked from althonos/setup.cfg
A `setup.cfg` template for my Python projects
View setup.cfg
# 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
You can’t perform that action at this time.