This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| generate_compose_math.py | |
| This script generates WinCompose-compatible entries for all Unicode Mathematical | |
| Alphanumeric Symbols including Latin letters, digits, and Greek letters in various styles | |
| such as bold, italic, script, fraktur, double-struck, sans-serif, and monospace. | |
| It also handles special cases: |
This file contains hidden or 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
| import argparse | |
| import json | |
| import pathlib | |
| import sys | |
| import zlib | |
| import cbor2 | |
| from base45 import b45decode | |
| from cose.messages import CoseMessage | |
| from PIL import Image |
This file contains hidden or 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
| # Solution for https://fivethirtyeight.com/features/can-you-outwit-the-tax-collector/ | |
| from constraint import * | |
| def unique(collection): | |
| """Gets a sorted list of unique elements from a collecion.""" | |
| return sorted(list(set(collection))) | |
| def word(*digits): |
This file contains hidden or 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
| # if running bash | |
| if [ -n "$BASH_VERSION" ]; then | |
| # include .bashrc if it exists | |
| if [ -f "$HOME/.bashrc" ]; then | |
| . "$HOME/.bashrc" | |
| fi | |
| fi |