Skip to content

Instantly share code, notes, and snippets.

View breandan's full-sized avatar
📖
I may be slow to respond.

breandan breandan

📖
I may be slow to respond.
View GitHub Profile
@breandan
breandan / ttt.cnf
Last active July 28, 2026 20:04
Tic-tac-toe grammar
START -> T_1 Q_3428
START -> T_2 Q_3419
START -> T_3 Q_3382
START -> T_4 Q_3317
START -> T_5 Q_3146
START -> T_6 Q_2859
START -> T_7 Q_2459
START -> T_8 Q_1925
START -> T_9 Q_1105
T_1 -> 1
@breandan
breandan / contextual_repair_96vCPU.log
Created December 15, 2023 08:32
Contextual repair log on 96 vCPUs for ~1.5 hours.
ubuntu@ip-172-31-41-246:~$ wget -O - https://apt.corretto.aws/corretto.key | sudo gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg && \
> echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" | sudo tee /etc/apt/sources.list.d/corretto.list
--2023-12-15 06:46:12-- https://apt.corretto.aws/corretto.key
Resolving apt.corretto.aws (apt.corretto.aws)... 18.160.41.53, 18.160.41.58, 18.160.41.60, ...
Connecting to apt.corretto.aws (apt.corretto.aws)|18.160.41.53|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1695 (1.7K) [binary/octet-stream]
Saving to: ‘STDOUT’
- 100%[===================>] 1.66K --.-KB/s in 0s
Repairing: START NAME NAME '(' ')' ':' NEWLINE 98 NAME '=' '[' STRING ',' STRING ']' NEWLINE 'def' NAME '(' NAME ')' ':' NEWLINE 98 'return' NAME '+' NAME NEWLINE 99 'return' NAME NEWLINE 99 NAME '=' NAME '(' ')' END
Found length-2 fix in 279ms after 8697 total and 5 valid samples (31 samples/ms, first valid sample: 244ms)
Average time to find human fix: ~674ms (367 trials, 53 expired after 10000ms)
Average time to find valid fix: ~333ms
Average samples before matched: ~62742
Average repair throughput / ms: ~57
Average valid repairs detected: ~154
Repairing: START NAME '=' '(' STRING ',' STRING ',' STRING ',' STRING ',' STRING ',' STRING ',' END
@breandan
breandan / python_levenshtein(2).log
Last active October 15, 2023 19:06
Example of Python-Levenshtein ball of radius 2 around `NUMBER + NEWLINE`.
Constructing ∩-grammar took: 1381ms
∩-grammar has 383551 total productions
Removed 292478 useless productions.
Removed 80128 useless productions.
Removed 7536 useless productions.
Removed 1898 useless productions.
Removed 667 useless productions.
Removed 169 useless productions.
Removed 10 useless productions.
Removed 0 useless productions.
@breandan
breandan / full_stacktrace.log
Created September 5, 2023 16:58
Stack trace after running `./gradlew build`.
> Task :javadoc FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for troubleshooting): '/Users/breandan/IdeaProjects/whisper.cpp/bindings/java/build/tmp/javadoc/javadoc.options'
* Try:
> Run with --info or --debug option to get more log output.
@breandan
breandan / javadoc.options
Created September 5, 2023 16:55
Contents of `whisper.cpp/bindings/java/build/tmp/javadoc/javadoc.options` after running `./gradlew build`
-Xdoclint:none '-quiet'
-classpath '/Users/breandan/IdeaProjects/whisper.cpp/bindings/java/build/classes/java/main:/Users/breandan/IdeaProjects/whisper.cpp/bindings/java/build/resources/main:/Users/breandan/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.13.0/1200e7ebeedbe0d10062093f32925a912020e747/jna-5.13.0.jar'
-d '/Users/breandan/IdeaProjects/whisper.cpp/bindings/java/build/docs/javadoc'
-doctitle 'whispercpp 1.4.0 API'
-notimestamp
-quiet
-windowtitle 'whispercpp 1.4.0 API'
'/Users/breandan/IdeaProjects/whisper.cpp/bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperCppJnaLibrary.java'
'/Users/breandan/IdeaProjects/whisper.cpp/bindings/java/src/main/java/io/github/ggerganov/whispercpp/callbacks/WhisperEncoderBeginCallback.java'
'/Users/breandan/IdeaProjects/whisper.cpp/bindings/java/src/main/java/io/github/ggerganov/whispercpp/callbacks/WhisperNewSegmentCallback.java'
@breandan
breandan / hs_err_pid36696.log
Last active September 5, 2023 17:20
Error encountered when running `./gradlew build -x javadoc` from `whisper.cpp/bindings/java`.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000018393be64, pid=36696, tid=8451
#
# JRE version: OpenJDK Runtime Environment JBR-17.0.1.12-164.8-jcef (17.0.1+12) (build 17.0.1+12-b164.8)
# Java VM: OpenJDK 64-Bit Server VM JBR-17.0.1.12-164.8-jcef (17.0.1+12-b164.8, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# C [libsystem_platform.dylib+0xe64] _platform_strlen+0x4
#
@breandan
breandan / whisper_gradlew_error.log
Created June 4, 2023 15:31
whisper.cpp `./gradlew build` error
java.lang.UnsatisfiedLinkError: Unable to load library 'whisper':
dlopen(libwhisper.dylib, 0x0009): tried: 'libwhisper.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibwhisper.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jetbrains-runtime-17.jdk/Contents/Home/bin/./libwhisper.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jetbrains-runtime-17.jdk/Contents/Home/bin/../lib/libwhisper.dylib' (no such file), '/usr/lib/libwhisper.dylib' (no such file, not in dyld cache), 'libwhisper.dylib' (no such file), '/usr/lib/libwhisper.dylib' (no such file, not in dyld cache)
dlopen(libwhisper.dylib, 0x0009): tried: 'libwhisper.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibwhisper.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jetbrains-runtime-17.jdk/Contents/Home/bin/./libwhisper.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jetbrains-runtime-17.jdk/Contents/Home/bin/../lib/libwhisper.dylib' (no such file), '/usr/lib/libwhisper.dylib' (no such f
@breandan
breandan / nested_parens_invalid.py
Last active March 2, 2023 08:12
Parenthetically complex and syntactically [in]valid Python statements.
numValues = sum([len(i.cache.keys()) for i in _memoizedFunctions]),
expectedGroupedC = [(i, [(i, i * 3 + j) for j in range(3)]) for i in range(5)]
res2 = array(map(lambda x: int(x[1]), tmp))
val = np.array([(1698 - 10.79 * xi) *(np.abs(np.cos(- 0.11 +(xi + 1) / 6)) - 1) + 484 for xi in x])
bottom_ninetyfive_percent = sorted(signal)[: int(np.floor(len(signal) * 0.95))]
data = concatenate((data[0: indx[0] - 1, : ], data[indx[0] + 1: data.shape[0] - 1, : ]))
indx = (s[argmin(s[: , 1]), 0] if d_max > 6 * amin(s[: , 1]) else 1)
sbar_dudy = std(concatenate((data[indx: m - 1, 1], data[indx: m - 1, 2]))) / sqrt(ar_dudyI0.eff_N[0] + ar_dudyIn.eff_N[0])
total = sum([int(input().split()[target_idx]) for _ in range(N)])
val = np.array([(abs(b *((- xi) / a + 1))) *(- 1) *(np.abs(np.cos(c * xi)) - 1) ** 2 + d for xi in x])
from __future__ import annotations
from functools import reduce
from typing import Union, SupportsFloat
class Operator:
def __str__(self):
return ""
class NoOP(Operator):