Skip to content

Instantly share code, notes, and snippets.

bgeron /
Created Jun 11, 2020
Hash commitments
  • 91fd1c94dcabe257c1a3b40365c2e200a0c128ee96914bac9220449e08d9b37afc64af38e03afcbc9ae88c05e014d418f2262db918daffb81c80ebae0a09ed6c IMG_3945.MOV
bgeron / common-unicode.sty
Created Mar 22, 2020
LaTeX library to enable many unicode symbols.
View common-unicode.sty
% common-unicode.sty. (c) 2016-2019, Bram Geron. Version 1.1.
% This is a collection of \DeclareUnicodeCharacter macros, so that you can get
% started using many Unicode characters in your LaTeX files as quickly as
% possible. You need to \usepackage[utf8]{inputenc}.
% You are welcome to use this file according to the CC0 Public Domain
% Dedication, version 1.0 ("CC0 1.0"). You should be able to find more
% information about this licence at <>.
bgeron /
Last active Mar 22, 2020
Default output of bgeron/character-snippets

The file below is a Visual Studio Code snippets file with a lot of useful Unicode characters that I've gathered over years of doing a PhD in theoretical CS.

I've included the source .toml below it. If you would like to add new snippets easily in TOML format, check out my tool and just pipe the TOML through it.

If you're planning to use this with LaTeX, then check out this .sty file as well.

bgeron / Cargo.toml
Created Dec 24, 2019
Quicksort in Rust
View Cargo.toml
name = "quicksort-rust"
version = "0.1.0"
authors = ["Bram Geron <>"]
edition = "2018"
# See more keys and their definitions at
rand = "0.7.2"
bgeron /
Last active Dec 18, 2019
Converts an image to a scatter plot.
# CC-BY 2.0 by bgeron
from PIL import Image; import matplotlib.pyplot as plt, pandas as pd
a ="source.png")
b = Image.blend(a,, a.size, "white"), .92).convert(mode="1")
df = pd.DataFrame(((x,-y) for x in range(b.width) for y in range(b.height) if not b.getpixel((x,y))), columns=("x","y"))
# Plot
df.plot.scatter(x=0, y=1, s=5, alpha=.5, c=["#111133"], figsize=(16,16)).set_aspect("equal")
# Save to CSV
df.to_csv(open("out.csv", "w"), index=False)
bgeron /
Created Nov 7, 2018
Fibonacci generators in Python without using the keyword yield
# Python 3.
# Use as follows:
# for f in fibs_hacky():
# print(f)
import itertools
from docutils import nodes
from docutils.nodes import paragraph, emphasis
import docutils.parsers.rst.directives.admonitions
from docutils.parsers.rst import Directive, directives
from docutils.parsers.rst.roles import set_classes
" ------- SETUP ------ "
def setup(app):
bgeron /
Last active Feb 12, 2017


Want to use Unicode in your LaTeX files? Use this package! (Also, you need to \usepackage[utf8]{inputenc}.)

Comment below, or mail me at myfirstname at myfirstname dot xyz.

-- Bram Geron, 21 April 2016.


You can’t perform that action at this time.