- 91fd1c94dcabe257c1a3b40365c2e200a0c128ee96914bac9220449e08d9b37afc64af38e03afcbc9ae88c05e014d418f2262db918daffb81c80ebae0a09ed6c IMG_3945.MOV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am bgeron on github. | |
* I am bgeron (https://keybase.io/bgeron) on keybase. | |
* I have a public key ASBuC3DoKsMtRJCETDlAncEavA12RVV3iaie6nMQzrf8iAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 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 <http://creativecommons.org/publicdomain/zero/1.0/>. |
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 https://github.com/bgeron/character-snippets and just pipe the TOML through it.
If you're planning to use this with LaTeX, then check out this .sty file as well.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "quicksort-rust" | |
version = "0.1.0" | |
authors = ["Bram Geron <bram@bram.xyz>"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
rand = "0.7.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CC-BY 2.0 by bgeron | |
from PIL import Image; import matplotlib.pyplot as plt, pandas as pd | |
a = Image.open("source.png") | |
b = Image.blend(a, Image.new(a.mode, 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python 3. | |
# | |
# Use as follows: | |
# | |
# for f in fibs_hacky(): | |
# print(f) | |
import itertools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |