Skip to content

Instantly share code, notes, and snippets.

View seanbreckenridge's full-sized avatar
🍍

seanbreckenridge

🍍
View GitHub Profile
[ERROR 2023-09-21 19:23:42,017 my.time.tz.via_location __init__.py:283 ] [my.time.tz.via_location:_iter_tzs] error while setting up cache, falling back to non-cached version
[ERROR 2023-09-21 19:23:42,017 my.time.tz.via_location __init__.py:284 ] [my.time.tz.via_location:_iter_tzs] (sqlite3.ProgrammingError) Cannot operate on a closed database.
(Background on this error at: https://sqlalche.me/e/14/f405)
Traceback (most recent call last):
File "/home/sean/.local/lib/python3.11/site-packages/cachew/__init__.py", line 815, in cachew_wrapper
yield from cached_items()
GeneratorExit
During handling of the above exception, another exception occurred:
[ /data/data/com.termux/files/usr/tmp/3mZRdb5YyY/dune | main ] $ ./dune.exe build dune.install --verbose
Warning: Unable to read directory /data/data. Will not look for root in
parent directories.
Reason: /data/data: Permission denied
To remove this warning, set your root explicitly using --root.
Shared cache: disabled
Workspace root: /data/data/com.termux/files/usr/tmp/3mZRdb5YyY/dune
Auto-detected concurrency: 8
Dune context:
{ name = "default"
$ opam install dune --verbose
The following actions will be performed:
∗ install dune 3.10.0
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[dune.3.10.0] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+ /data/data/com.termux/files/home/.opam/5.0.0/bin/ocaml "boot/bootstrap.ml" "-j" "1" (CWD=/data/data/com.termux/files/home/.opam/5.0.0/.opam-switch/build/dune.3.10.0)
- ocamlc -output-complete-exe -w -24 -g -o .duneboot.exe -I boot -I +unix unix.cma boot/libs.ml boot/duneboot.ml
@seanbreckenridge
seanbreckenridge / yt_archive_layout.py
Created August 23, 2023 05:30
possible schema for youtube proxy/s3 uploader
class ChannelBase(SQLModel):
url: str # url to download with
command: str
proxy: Optional[str] = Field(default=None) # yt-dl proxy
yt_dl_args: Optional[str] = Field(default=None) # additional arguments to yt-dlp
gallery_dl_args: Optional[str] = Field(default=None)
name: Optional[str] = Field(default=None)
rerequest_time: Optional[int] = Field(default=None)
python3 -m bleanser_sean.modules.grouvee prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/grouvee
python3 -m bleanser_sean.modules.zsh prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/zsh_history
python3 -m bleanser_sean.modules.bash prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/bash
python3 -m bleanser_sean.modules.bash prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/bash_history
python3 -m bleanser_sean.modules.ipython prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/ipython_default
python3 -m bleanser_sean.modules.ipython prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/ipython_calculator/
python3 -m bleanser_sean.modules.cstimer prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/cubing/cstimer
python3 -m bleanser_sean.modules.twistytimer prune --move /home/sean/.cache/removed --yes --sort-by size /home/sean/data/cubin
from typing import Iterator, TypeVar
from decimal import Decimal
it = int(input("Enter number of iterations: "))
def calculate_pi(till: int, factory: TypeVar) -> Iterator[int]:
approx = factory(0)
denom = factory(1)
for i in range(till):
#!/bin/bash
# pass 'manga' as the first arg to the script to scrape manga instead
# requires https://github.com/ericchiang/pup to be installed
sort_by_id() {
sort -n -t= -k 2
}
scrape_type="${1:-anime}"
case "${scrape_type}" in
@seanbreckenridge
seanbreckenridge / anilist_413.py
Last active May 17, 2021 07:17
cleans up my MAL export so thats its importable to anilist
#!/usr/bin/env python3
# cleans up my MAL export according to this thread:
# https://anilist.co/forum/thread/3291
# so that its importable
# otherwise the graphql error fails with a 413 request entity too large
# since the anilist page just inlines the XML contents into the gql query
import sys
import typing
from pathlib import Path
/home/sean/.config/i3blocks/blocks/b-todo:14:chomp <"${TODO_DIR}/todo.txt" | wc -l
/home/sean/.config/yadm/android_bootstrap:82:havecmd chomp || go install github.com/seanbreckenridge/chomp@latest
/home/sean/.config/yadm/package_lists/go_packages.txt:13:chomp github.com/seanbreckenridge/chomp
/home/sean/.local/scripts/linux/colorize_number:7:NUM="${1:-$(chomp | tr -d "\n")}"
/home/sean/.local/share/shortcuts/group-and-termgraph:4:chomp | sort | uniq -c | awk '{print $2 " " $1}' | termgraph | chomp | awk '{print $NF,$0}' | sort -n | cut -f2- -d' '
/home/sean/.local/share/shortcuts/moviesearch:3:SEARCH_STR=$(input-dialog "Search for a movie > " | chomp | tr " " "+")
/home/sean/.local/share/shortcuts/moviesearch-letterboxd:3:[ -z "$SEARCH_STR" ] && SEARCH_STR=$(input-dialog "Search for a movie > " | chomp | tr " " "+")
/home/sean/.local/share/shortcuts/moviesearch-trakt:3:[ -z "$SEARCH_STR" ] && SEARCH_STR=$(input-dialog "Search for a movie > " | chomp | tr " " "+")
/home/sean/.local/share/shortcuts/synonym:3:mo
diff --git a/my/discord.py b/my/discord.py
index 15730f6..6a7e1f6 100644
--- a/my/discord.py
+++ b/my/discord.py
@@ -3,6 +3,8 @@ Discord Data: messages and events data
"""
REQUIRES = [
"git+https://github.com/seanbreckenridge/discord_data",
+ "mistletoe",
+ "urlextract",