Skip to content

Instantly share code, notes, and snippets.

View 0xjgv's full-sized avatar
:atom:

Juan Gaitán-Villamizar 0xjgv

:atom:
View GitHub Profile
@0xjgv
0xjgv / Python Async Decorator.py
Created March 3, 2022 13:15 — forked from Integralist/Python Async Decorator.py
[Python Async Decorator] #python #asyncio #decorator
import asyncio
from functools import wraps
def dec(fn):
@wraps(fn)
async def wrapper(*args, **kwargs):
print(fn, args, kwargs) # <function foo at 0x10952d598> () {}
await asyncio.sleep(5)
@0xjgv
0xjgv / best_of_best.py
Created February 3, 2022 16:22 — forked from ourway/best_of_best.py
Best Python Snippets
## 1::calculating_with_dictionaries
# example.py
#
# Example of calculating with dictionaries
prices = {"ACME": 45.23, "AAPL": 612.78, "IBM": 205.55, "HPQ": 37.20, "FB": 10.75}
# Find min and max price
min_price = min(zip(prices.values(), prices.keys()))
max_price = max(zip(prices.values(), prices.keys()))
@0xjgv
0xjgv / System Design.md
Created July 6, 2020 13:41 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@0xjgv
0xjgv / gitflow-breakdown.md
Created June 28, 2016 14:38 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository