Skip to content

Instantly share code, notes, and snippets.

@halloleo
halloleo / config.log
Created May 16, 2022 19:49
Config log for duc 14.5-rc1 on macOS 10.1.5.7
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by duc configure 1.4.5-rc1, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ ./configure --prefix=/opt/local
## --------- ##
## Platform. ##
@halloleo
halloleo / duc-git_slash_log.txt
Created May 16, 2022 19:46
Debug log for indexing on duc 14.5-rc1
This file has been truncated, but you can view the full file.
Using old database at "/Users/alba/.duc.db", please move this to "$XDG_CACHE_HOME/duc/duc.db"
Writing to database "/Users/alba/.duc.db"
>> /
> 25 0 home
>> usr
>> bin
110928 49152 uux
811 4096 cpan
31520 8192 BuildStrings
1936 4096 loads.d
@halloleo
halloleo / extract-zeit-archive-unified.xsh
Last active April 28, 2020 08:43
Extract and unify the tracks of a Zeit Audio archive so that the tracks appear as part of one book (in audiobook players like Bound)
#!/usr/bin/env xonsh
"""
Extract and unify the tracks of a Zeit Audio archive
so that the tracks appear as part of one book
(in audiobook players like Bound)
"""
import re
import sys
import os
from pathlib import Path
@halloleo
halloleo / Sample_a_population.py
Created November 15, 2019 00:35
Sample a given population many times
"""
Sample a given population many times with a fixed confidence level
"""
from pathlib import Path
import math
import csv
import numpy as np
import pandas as pd
@halloleo
halloleo / impress-template.html
Last active September 19, 2019 06:57 — forked from jgm/impress-template.html
Pandoc template for writing impress.js slideshows - using standard meta variables like $title$, $css$, etc
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=1024" />
<meta name="apple-mobile-web-app-capable" content="yes" />
$for(author-meta)$
<meta name="author" content="$author-meta$">
$endfor$
@halloleo
halloleo / pipx_install_xonsh.sh
Created March 13, 2019 03:11
Install xonsh via pipx with the add-ons I use
#!/bin/bash
#
# Install xonsh via pipx with the add-ons I use
#
pipx install xonsh
pipx inject xonsh gnureadline
pipx inject xonsh xonsh-direnv
echo "* Running xpip freeze in xonsh:"
xonsh -c 'xpip freeze'
@halloleo
halloleo / # eye-d3 - 2018-12-28_18-28-22.txt
Created December 28, 2018 10:34
eye-d3 on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for eye-d3 on macOS 10.11.6
Build date: 2018-12-28 18:28:22
@halloleo
halloleo / Environment variables pointing to the location of Python virtual environments.md
Last active December 10, 2018 02:57
In the Python world the various virtual environment tools use different environment variables to define setting like the base directory of all virtual environments.

Environment variables pointing to the location of virtual environments

In the Python world the various virtual environment tools use different environment variables to define setting like the base directory of all virtual environments. Here a table listing them:

variable used by source
VIRTUALENV_HOME xonsh/vox xonsh doco
WORKON_HOME Virtualenvwrapper [Virtualenvwrapper doco](https://virtualenvwrapper.readthedocs.io/en/l
@halloleo
halloleo / id3copy.py
Created August 5, 2014 01:51
copying text tags between mp3 files using id3v2 as a back-end.
#!/usr/bin/env python
"""id3copy - copy id3 (text) tags from mp3 file SRC to mp3 file DEST
usage: id3copy [-h] [-v... | -q] SRC DEST
options:
-h, --help show this help message and exit
-v, --verbose verbose output (give it twice for debug output)
-q, --quiet no information output
@halloleo
halloleo / vollkommen-II.py
Last active August 29, 2015 13:59
find "vollkommene zahlen" in python
#!/usr/bin/env python
"""
find "vollkommene zahlen" in python
---
from https://en.wikipedia.org/wiki/Perfect_number:
"In number theory, a perfect number is a positive integer that is equal to
the sum of its proper positive divisors, that is, the sum of its positive
divisors excluding the number itself"
---
despite the "-II" in the file name this version is rather a crude 1st draft of a "brut force" algorithm...