Skip to content

Instantly share code, notes, and snippets.

@machinamentum
machinamentum / toanki.py
Last active May 27, 2026 20:26 — forked from virtalas/toanki.py
Import a Yomiwa (iOS) word list into Anki.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Original code by virtalas (https://gist.github.com/virtalas/e4e8a56bfe48ccb9c5ed13cc181e6ba3)
# Improved example sentence generation support by Josh Huelsman
''' Example sentence generation requires a modified version of jamdict that supports the new <example> XML element
found in JMdict_e_examp.gz since ~2021. And by rebuilding your jamdict database by replacing JMdict_e.gz with
JMdict_e_examp.gz
`python3 -m jamdict config` should list out the locations for where JMdict_e.gz, kanjidic2.xml.gz, JMnedict.xml.gz
@machinamentum
machinamentum / ANSI.md
Created March 6, 2025 04:33 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@machinamentum
machinamentum / OpenSimplexNoise.java
Created March 26, 2019 21:03 — forked from KdotJPG/OpenSimplex2S.java
Visually axis-decorrelated coherent noise algorithm based on the Simplectic honeycomb.
/*
* OpenSimplex Noise in Java.
* by Kurt Spencer
*
* v1.1 (October 5, 2014)
* - Added 2D and 4D implementations.
* - Proper gradient sets for all dimensions, from a
* dimensionally-generalizable scheme with an actual
* rhyme and reason behind it.
* - Removed default permutation array in favor of