This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
▸ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 = ( |
NewerOlder