Skip to content

Instantly share code, notes, and snippets.

View jnturton's full-sized avatar

James Turton jnturton

  • Johannesburg, South Africa
View GitHub Profile
@jnturton
jnturton / pom.xml.patience.diff
Created August 28, 2023 14:35
DRILL-8454 pom.xml diff using the "patience" diff algorithm
diff --git a/pom.xml b/pom.xml
index 418885d0c..a0bed7939 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,8 +59,6 @@
<sqlline.version>1.12.0</sqlline.version>
<jackson.version>2.14.3</jackson.version>
<zookeeper.version>3.5.7</zookeeper.version>
- <mapr.release.version>6.1.0-mapr</mapr.release.version>
- <ojai.version>3.0-mapr-1808</ojai.version>
@jnturton
jnturton / json-obfuscator.py
Created September 8, 2021 11:06
JSON obfuscator
#!/usr/bin/env python3
'''
Uses the IJSON library to parse JSON from stdin, replacing strings with salted
hashes that are internally consistent (i.e. "cat" is always replaced with the
same hash). Numbers are not modified. The output is finally writtent to
stdout.
'''
import sys
import logging
@jnturton
jnturton / userContent.css
Last active August 30, 2024 15:10
A multi-column layout for Firefox's Reader mode.
/* Save this file as userContent.css in the chrome/ subdirectory of your Firefox profile
* directory. You may need to create the chrome/ subdirectory first.
*/
@namespace url(http://www.w3.org/1999/xhtml);
/* multi-column layout for FF < 58 */
@-moz-document url-prefix("about:reader") {
/* multi-column layout */
#container {
@jnturton
jnturton / hording-supply-demand.ipynb
Last active October 20, 2017 06:59
A toy economic model of asset hording
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jnturton
jnturton / monty-hall-information.ipynb
Last active March 19, 2018 17:48
Information changes in the Monty Hall Problem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jnturton
jnturton / lift-and-uplift.ipynb
Last active September 6, 2016 06:22
A basic inequality relating lift and uplift
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jnturton
jnturton / encrypted-otps.ipynb
Last active May 30, 2018 11:38
A quick look at a modular arithmetic encryption scheme
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jnturton
jnturton / shapley-value-jhb-election-2016.ipynb
Last active August 15, 2016 10:55
Shapley Values for the City of Johannesburg 2016 muncipal election
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.