Skip to content

Instantly share code, notes, and snippets.

View risicle's full-sized avatar

Robert Scott risicle

View GitHub Profile
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/jaw91z9iin8l4c7amcm2v6nin97jmvrb-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
@risicle
risicle / qgis_metaphone_hack.py
Created July 22, 2019 20:12
Nasty all-in-one bundling of Metaphone 0.6 module, suitable for dumping into QGIS in a hurry without battling with imports
from __future__ import unicode_literals
import unicodedata
class Word(object):
"""
"""
def __init__(self, input):
self.original = input
if isinstance(input, bytes):
error: while querying the derivation named 'nix-2.3pre20190712_aa82f8b':
while evaluating the attribute 'src' of the derivation 'nix-2.3pre20190712_aa82f8b' at /home/bob/.nox/nixpkgs/pkgs/tools/package-management/nix/default.nix:28:14:
unknown hash algorithm '', at /home/bob/.nox/nixpkgs/pkgs/build-support/fetchurl/default.nix:119:3
...
Command '['nix-env', '-f', '/home/bob/.nox/nixpkgs', '-qaP', '--out-path', '--show-trace']' returned non-zero exit status 1.
def send_some_emails(data_api_client, framework_slug):
for supplier_framework in data_api_client.supplier_frameworks_for_framework_iter(
framework_slug,
with_declarations = True,
):
has_company_details = bool(supplier_framework["applicationCompanyDetailsConfirmed"])
declaration_complete = supplier_framework["declaration"]["status"] == "complete"
configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/fz76kdaq7braf5bg39j6xivrharkhn22-libvirt-5.4.0 --localstatedir=/var --sysconfdir=/var/lib --with-libpcap --with-qemu --with-vmware --with-vbox --with-test --with-esx --with-remote --with-init-script=none
checking for a BSD-compatible install... /nix/store/5ibk8xxh2ly7gypv14dyjrb4c5ly5306-coreutils-8.31/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /nix/store/5ibk8xxh2ly7gypv14dyjrb4c5ly5306-coreutils-8.31/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-apple-darwin17.7.0
building '/nix/store/clgk5fki6jbrk9c1b47bnnl7156r1s5h-openjdk-11.0.3-ga.drv'...
unpacking sources
unpacking source archive /nix/store/4dcc4xcghrmmcpgldl8v81rk6ndg5agb-jdk-11.0.3-ga.tar.gz
source root is jdk11u-jdk-11.0.3-ga
setting SOURCE_DATE_EPOCH to timestamp 1554254737 of file jdk11u-jdk-11.0.3-ga/test/nashorn/src/jdk/nashorn/test/tools/StaticTypeInspector.java
patching sources
applying patch /nix/store/881pcwinv35z9f6c5max2m7il0sxvg3n-fix-java-home-jdk10.patch
patching file src/hotspot/os/linux/os_linux.cpp
Hunk #1 succeeded at 2390 with fuzz 2 (offset 120 lines).
applying patch /nix/store/3zfcang88j3y15viz1b4c83dwxpl9ps6-read-truststore-from-env-jdk10.patch
building '/nix/store/nlqnkk9blml54pqvx887ir298b5kzvqb-vapoursynth-R45.1.drv'...
unpacking sources
unpacking source archive /nix/store/04gmgrzrll6kx4g4sjhfcql6573j7y2i-source
source root is source
patching sources
autoreconfPhase
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
building '/nix/store/k1wh7gwnjrg1wf6dxvslr3rwspywpbyq-nip2-8.3.0.drv'...
unpacking sources
unpacking source archive /nix/store/q27lq2k4miccpmzfgm6avlgqchxfc1f9-nip2-8.3.0.tar.gz
source root is nip2-8.3.0
setting SOURCE_DATE_EPOCH to timestamp 1463600557 of file nip2-8.3.0/po/nip2.pot
patching sources
configuring
fixing libtool script ./ltmain.sh
configure flags: --disable-static --disable-dependency-tracking --prefix=/nix/store/5wqncbrm38hv94rsfrda2xvpjrx41559-nip2-8.3.0
checking for a BSD-compatible install... /nix/store/bv1lw6a2kw0mn2y3lxhi43180idx6sp9-coreutils-8.31/bin/install -c
building '/nix/store/cy97ghyfamlnaibslwb43f3r40y17zb0-python3.7-salmon-mail-3.1.0.drv'...
unpacking sources
unpacking sources
unpacking source archive /nix/store/c2kalm4pn4vrp98vsq75si01793rz65l-salmon-mail-3.1.0.tar.gz
unpacking source archive /nix/store/c2kalm4pn4vrp98vsq75si01793rz65l-salmon-mail-3.1.0.tar.gz
source root is salmon-mail-3.1.0
source root is salmon-mail-3.1.0
setting SOURCE_DATE_EPOCH to timestamp 1547748991 of file salmon-mail-3.1.0/setup.cfg
setting SOURCE_DATE_EPOCH to timestamp 1547748991 of file salmon-mail-3.1.0/setup.cfg
patching sources
@risicle
risicle / template_ocr.py
Created March 3, 2019 16:57
Collection of utility functions to implement rudimentary template-matching based OCR using OpenCV, intended for use with large, uniform blocks of monospaced, non-language-correlated text (effectively resulting in a "character grid") where a 100.0% accuracy is required. This could be useful if one, for example, found themselves needing to recover…
"""
Collection of utility functions to implement rudimentary template-matching based OCR using OpenCV,
intended for use with large, uniform blocks of monospaced, non-language-correlated text (effectively
resulting in a "character grid") where a 100.0% accuracy is required. This could be useful if one, for
example, found themselves needing to recover a hardcopy-printed backup of an OpenPGP key.
Modern general-purpose OCR software doesn't tend to do that well with these, relying heavily on
language-context-based guessing, often trying to be too clever in layout auto-detection, all the while
being extremely tricky to configure precisely enough to allow us to impart our existing knowledge
about the constraints of the target text (expected alphabet, line length, expected font...).