In the middle of the desert you can say anything you want
CLI:
sudo lshw -C disk
tells you all disks
h
In fsspec fs.copy()
doesn’t really work from local to remote, also existing or not-existing directories etc.
Their documentation has a whole page on this: Copying files and directories — fsspec 2024.10.0.post13+gdbed2ec.d20241115 documentation
GitLab CLI - glab
| GitLab Docs: CLI thingy to interact with gitlab.
It’s really neat and has a cool CLI interface, either you set things through flags or you get a neat menu to choose from!
Smart enough to parse current directory!
Pipelines:
glab ci status
for a curses interfaceglab ci status -l
is a live view as they runGit Tag: A Tutorial for Tagging Releases in Git - DEV Community
#ligthweight tag
git tag v1.0.0
# full
git tag -a v1.0.0 -m "Releasing version v1.0.0"
Tags don’t get pushed automatically. For this,
git push origin v1.0.0
uv
uses hatch
which has this to say about dynamic versioning: Configuring project metadata - Hatch[project]
dynamic = ["version"]
[tool.hatch.version]
path = "..."
Path is a python file w/ version info. If using src
layout, src
has to be included in the path.j
For uv, this works. Described for example here: Versioning Python Projects with Hatch
(I like __init__.py
though, not about as that guide does)
uv-dynamic-versioning · PyPI exists but I don’t really see why.
Because every single goddamn time
Command line: How do you rotate a PDF file 90 degrees? - Unix & Linux Stack Exchange
pdftk input.pdf cat 1-endwest output output.pdf
1-
is needed because page range, here for all pages.
endwest
etc from man page:
[<begin page number>[-<end page number>[<qualifier>]]][<page rotation>]
The qualifier can be even or odd, and the page rotation can be north, south, east, west, left, right, or down.
Each option sets the page rotation as follows (in degrees): north: 0, east: 90, south: 180, west: 270, left: -90, right: +90, down: +180. left, right, and down make relative adjustments to a page’s rotation.
This is brilliant: Git, rewrite previous commit usernames and emails - Stack Overflow
TL;DR
git config --global alias.change-commits '!'"f() { VAR=\$1; OLD=\$2; NEW=\$3; shift 3; git filter-branch --env-filter \"if \\\"\$\`echo \$VAR\`\\\" = '\$OLD' ; then export \$VAR='\$NEW'; fi\" \$@; }; f"
Then
git change-commits GIT_AUTHOR_NAME "old name" "new name"
# last 10 commits
git change-commits GIT_AUTHOR_EMAIL "old@email.com" "new@email.com" HEAD~10..HEAD
Depending on why I need this, I may need also GIT_COMMITTER_[NAME/EMAIL]
For multiple times, I created an change-commit-f
that forces overwiriting the backup:
git config --global alias.change-commits-f '!'"f() { VAR=\$1; OLD=\$2; NEW=\$3; shift 3; git filter-branch -f --env-filter \"if \\\"\$\`echo \$VAR\`\\\" = '\$OLD' ; then export \$VAR='\$NEW'; fi\" \$@; }; f"
A quick tldr from other answer, may be better but untested:
git config alias.change-commits '!'"f() { VAR=\$1; OLD=\$2; NEW=\$3; shift 3; git filter-branch --env-filter \"if \\\"\$\`echo \$VAR\`\\\" = '\$OLD' ; then export \$VAR='\$NEW'; fi\" \$@; }; f "
git change-commits GIT_AUTHOR_NAME "<Old Name>" "<New Name>" -f
git change-commits GIT_AUTHOR_EMAIL <old@email.com> <new@email.com> -f
git change-commits GIT_COMMITTER_NAME "<Old Name>" "<New Name>" -f
git change-commits GIT_COMMITTER_EMAIL <old@email.com> <new@email.com> -f
(Previously: 220408-1822 Gitlab ‘you cannot push commits for ..’ error)
Lines of code that beat A/B testing (2012) | Hacker News / 20 lines of code that will beat A/B testing every time
TL;DR: A/B testing that automatically increases how often “good” versions are shown
docker run -it --name inception -p8080:8080 ghcr.io/inception-project/inception:35.1
$ docker run -it --name inception -v /srv/inception:/export -p8080:8080 ghcr.io/inception-project/inception:35.1
/srv/inception
Creating a project automatically fills it with sample data:
Tagsets
{
"name" : "BBK",
"description" : null,
"language" : null,
"tags" : [ {
"tag_name" : "aaa_human_processed",
"tag_description" : null
}, {
"tag_name" : "block",
"tag_description" : null
} ],
"create_tag" : false
}
A layer has to be linked to a feature (string) which then can be linked to a tagset: (INCEpTION User Guide)
annotations get saved automatically
in the viewer, you can set dynamic
for annotations differing based on color