Skip to content

Instantly share code, notes, and snippets.

View SimonBerens's full-sized avatar
👨‍💻
on the grind

Simon Berens SimonBerens

👨‍💻
on the grind
View GitHub Profile
@SimonBerens
SimonBerens / fr.cpp
Created July 28, 2023 16:10
modern cpp
#define chief main
#define yeet return
#define sussin if
#define bussin for
#define tweakin while
#define vibin std
#define yikes endl
#define ongod cout
#define fr <<
#define deadass >>
@SimonBerens
SimonBerens / random_graph.py
Last active March 7, 2023 01:45
Generate dense and sparse graphs graphs with a defined number of vertices and edges
import random
import math
def random_pick(n, m):
"""Pick m integers from a bag of the integers in [0, n) without replacement"""
d = {i : i for i in range(m)} # For now, just pick the first m integers
res = []
for i in range(m): # Pick the i-th number
j = random.randrange(i, n)