Skip to content

Instantly share code, notes, and snippets.

View goodmami's full-sized avatar

Michael Wayne Goodman goodmami

View GitHub Profile
@goodmami
goodmami / README.md
Last active February 23, 2023 17:39
Converting ACE's Subversion repository to Git

Converting ACE from Subversion to Git

The ace-svn-to-git.sh script will use git-svn to convert ACE's Subversion repository to Git with the --stdlayout flag so the trunk, tags, and branches are handled mostly as expected (more below). The --prefix=svn/ option puts all of those tags and branches under the svn reference namespace, and the --authors-file option maps the Subversion author names to the current GitHub profiles of the three authors in ACE's history.

@goodmami
goodmami / README.md
Last active September 8, 2023 04:10
Parsing JSON with regular expressions

Parsing JSON with Regular Expressions

When I learned of regular expression engines that support recursion I thought I could write a recursive-descent parser in regex. Since I've written JSON parsers a few times and it's a simple spec, I chose that as the test case. In the end I created two versions.

version 1

@goodmami
goodmami / quotes.py
Created February 16, 2016 20:53
List of unicode quote symbols
# quote list: https://en.wikipedia.org/wiki/Quotation_mark
QUOTES = (
'\u0022' # quotation mark (")
'\u0027' # apostrophe (')
'\u00ab' # left-pointing double-angle quotation mark
'\u00bb' # right-pointing double-angle quotation mark
'\u2018' # left single quotation mark
'\u2019' # right single quotation mark
'\u201a' # single low-9 quotation mark
'\u201b' # single high-reversed-9 quotation mark
@goodmami
goodmami / README.md
Last active April 8, 2024 16:14
Basic Arc Diagrams

Demonstration of an ArcDiagram layout function with both distance-based and compact level modes. The compact mode works better for orthogonal edges, and can use much less vertical space. The distance mode works better for curved arc edges.

The alice.json dataset is the first line from Lewis Carroll's Alice in Wonderland, parsed with the Stanford Parser.

@goodmami
goodmami / logging.bash
Last active May 6, 2024 18:24
Basic logging commands for Linux shell scripts
#!/bin/bash
##
## Simple logging mechanism for Bash
##
## Author: Michael Wayne Goodman <goodman.m.w@gmail.com>
## Thanks: Jul for the idea to add a datestring. See:
## http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comment-5854
## Thanks: @gffhcks for noting that inf() and debug() should be swapped,
## and that critical() used $2 instead of $1