Skip to content

Instantly share code, notes, and snippets.

View ology's full-sized avatar
💭
🤔

Gene Boggs ology

💭
🤔
View GitHub Profile
@ology
ology / out.txt
Created November 9, 2024 18:18
Can't list deps in my pyproject.toml?
(Python) gene@zappa:~/sandbox/dev/Python> pip install -i https://test.pypi.org/simple/ chess-coverage==0.1.1
Looking in indexes: https://test.pypi.org/simple/
Collecting chess-coverage==0.1.1
Using cached https://test-files.pythonhosted.org/packages/44/73/23e180406c9f065a76a81594b70cf8d1f17503f31b742c695b2ca7224fd0/chess_coverage-0.1.1-py3-none-any.whl.metadata (42 kB)
INFO: pip is looking at multiple versions of chess-coverage to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement chess (from chess-coverage) (from versions: none)
ERROR: No matching distribution found for chess
@ology
ology / out.txt
Last active October 30, 2024 22:00
Variable defined in inner-scope visible to outer scope?
1 x: Hello
2 x: Hello
3 x: Hello
# Should warn that I am using an undefined variable.
# Or... is there no such thing as "lexically scoped" variables in python?
@ology
ology / tester.py
Last active October 8, 2024 21:43
Only replace the last group of multiple numbered sections?
import re
response = '''
Setting the Scene: The Shattered Kingdom of Eldoria
In a world where magic and technology dance upon a knife’s edge, the kingdom of Eldoria lies fractured, its once-proud cities crumbling into ruins. Lush forests turned desolate wastelands; serene lakes poisoned by dark sorcery. Factions vie for power amidst the chaos, each with their own vision of a new order rising from the ashes. Yet, whispers of ancient prophecies and lost artifacts echo in the shadows, promising return, hope—or destruction.
Your journey begins in the modest village of Greynor, nestled against the remnants of the Emerald Forest. The townsfolk, weary of conflict, speak in hushed tones of an approaching storm. Rumors suggest that a faction known as the Veiled Hand seeks to unleash an ancient evil to seize control of Eldoria. As the sun sets, bathing the village in an ominous red glow, it becomes clear that the fate of the kingdom, and perhaps your own, hangs perilously in the balance.
Character Creation: Whisper
@ology
ology / trig.pl
Created October 2, 2024 01:19
Set patch and use a couple handy variables.
#!/usr/bin/env perl
# mess around with trig functions, producing MIDI of dubious merit
use 5.36.0;
use MIDI;
my @events;
my $out_file = shift // "$0.midi";
# how fine or coarse to check on the output of the equation (will depend
# on the equation, how many notes you want, how much silence from
@ology
ology / build.out
Created September 2, 2024 17:12
Can't make seafile work at all ever
gene@mopey:/opt/docker/seafile$ sudo docker compose build
[sudo] password for gene:
[+] Building 2.2s (23/23) FINISHED docker:default
=> [memcached internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [memcached internal] load build definition from Dockerfile-memcached 0.0s
=> => transferring dockerfile: 409B
@ology
ology / out.txt
Created July 14, 2024 23:44
fluidsynth on Linux Mint complains
▸ fluidsynth
FluidSynth runtime version 2.1.1
Copyright (C) 2000-2020 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
Cannot connect to server socket err = Connection refused
Cannot connect to server request channel
fluidsynth: warning: Failed to set thread to high priority
jackdmp 1.9.12
@ology
ology / benchmark-subseqs.pl
Created July 5, 2024 22:01
one perl contiguous subsequences benchmark run and code
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark qw(timethese);
use List::Util qw(all);
my $count = shift || 100_000_000;
my $mother = [qw(qn qn qn)];
@ology
ology / output.txt
Last active July 5, 2024 21:34
musical rhythmic breeding WIP...
Rules: {
en => [ 'en' ],
hn => [ 'den en', 'en den', 'qn qn', 'qn en en', 'en qn en', 'en en qn' ],
qn => [ 'en en' ],
}
Reverse rules (computed): {
'den en' => [ 'hn' ],
en => [ 'en' ],
'en den' => [ 'hn' ],
@ology
ology / .pl
Last active July 5, 2024 06:52
ordered subsequence with possible duplicates
sub contiguous_subsequences {
my ($little_set, $big_set) = @_;
my $little_set_size = @$little_set;
my $big_set_size = @$big_set;
my @matches;
my ($i, $j) = (0, 0); # sequence indices
my $k = 0; # matches found
@ology
ology / mass-clone.pl
Last active November 4, 2023 03:24
GitHub repo clone in Perl!
#!/usr/bin/env perl
use strict;
use warnings;
use Capture::Tiny qw(capture);
use Getopt::Long qw(GetOptions);
use JSON::MaybeXS qw(decode_json);
use URI ();
my %opt = (