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.
FAQ:
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): |
# Python 3. | |
# | |
# Use as follows: | |
# | |
# for f in fibs_hacky(): | |
# print(f) | |
import itertools |
# 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) |
[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" |
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.
% 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/>. |
### 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: |