Skip to content

Instantly share code, notes, and snippets.

View okbalefthanded's full-sized avatar
💭
Another day, another problem to solve

Okba BEKHELIFI okbalefthanded

💭
Another day, another problem to solve
View GitHub Profile
@yanqd0
yanqd0 / dl_requests_tqdm.py
Last active May 16, 2024 11:03
Python requests download file with a tqdm progress bar
import requests
from tqdm import tqdm
def download(url: str, fname: str, chunk_size=1024):
resp = requests.get(url, stream=True)
total = int(resp.headers.get('content-length', 0))
with open(fname, 'wb') as file, tqdm(
desc=fname,
total=total,

THIS DOCUMENT

IS OUT OF

DATE

C++ Coding Standards Part 0: Automated Code Analysis

Automated analysis is the main advantage to working with a modern statically typed compiled language like C++. Code analysis tools can inform us when we have implemented an operator overload with a non-canonical form, when we should have made a method const, or when the scope of a variable can be reduced.