1
0
mirror of https://github.com/tiyn/wiki.git synced 2026-08-25 17:51:37 +02:00

Compare commits

...

10 Commits

Author SHA1 Message Date
ef929292da Presentation: Added pdfpc zooming guide 2026-08-25 14:56:33 +02:00
dfe169870d Presentatin: PDFPC settings added 2026-08-25 13:00:41 +02:00
834487439a Added OSS Dict and Neo Store 2026-08-24 01:16:19 +02:00
cfef5b10ec Merge branch 'master' of github:/tiyn/wiki 2026-08-18 09:41:29 +02:00
4dd67c6c2c Added rembg 2026-08-18 09:41:21 +02:00
ee3d5929bb Programming Languages/Python: Added tensorflow gpu fix 2026-08-18 09:40:47 +02:00
8abca04b9a Adobe Acrobat: Added Setup 2026-07-29 15:34:59 +02:00
41cd91f173 Added eduroam entry 2026-07-23 04:15:57 +02:00
176a23211e Calibre: Added Web Troubleshooting 2026-07-21 00:39:30 +02:00
ac773e4ede Git/uv: Added Git Hooks 2026-07-19 10:26:39 +02:00
15 changed files with 413 additions and 20 deletions

View File

@@ -4,6 +4,14 @@
[Adobe](https://www.adobe.com/).
It is free.
## Setup
Adobe Acrobat is available for [Windows](/wiki/windows.md), macOS and [Linux](/wiki/linux.md) on the
[official website](https://get.adobe.com/reader/).
For some [Linux distributions](/wiki/linux.md#distributions) — like
[Arch Linux](/wiki/linux/arch-linux.md) there is also a package called `acroread-dc-wine`, which can
be used to set up Adobe Acrobat.
## Usage
This section addresses the usage of Adobe Acrobat.

View File

@@ -0,0 +1,13 @@
# Episteme Reader
[Episteme Reader](https://github.com/Aryan-Raj3112/episteme) is a free and open-source
[e-book](/wiki/e-book.md) reader for [Android](/wiki/android.md).
It supports annotations and OPDS catalogs and can handle large PDF files.
For looking up words while reading, an offline dictionary application such as
[OSS Dict](/wiki/android/oss_dict.md) can be used.
Episteme Reader also features using translation apps like [DeepL](/wiki/deepl.md).
## Setup
On [Android](/wiki/android.md) Episteme Reader is available on [F-Droid](/wiki/android/f-droid.md)
in a package called [Episteme Reader](https://f-droid.org/en/packages/com.aryan.reader.oss/).

View File

@@ -2,6 +2,8 @@
[F-Droid](https://f-droid.org) is an installable catalogue of free and open source
software for [Android](/wiki/android.md) systems.
Alternatively, [Neo Store](/wiki/android/neo_store.md) can be used as a modern F-Droid client and
alternative.
## Setup

10
wiki/android/neo_store.md Normal file
View File

@@ -0,0 +1,10 @@
# Neo Store
[Neo Store](https://github.com/NeoApplications/Neo-Store) is a free and open-source
[F-Droid](/wiki/android/f-droid.md) client and alternative for [Android](/wiki/android.md).
It can be used to browse, install and update applications from F-Droid and other repositories.
## Setup
On [Android](/wiki/android.md) Neo Store is available on [F-Droid](/wiki/android/f-droid.md) in a
package called [Neo Store](https://f-droid.org/packages/com.machiav3lli.fdroid/).

22
wiki/android/oss_dict.md Normal file
View File

@@ -0,0 +1,22 @@
# OSS Dict
[OSS Dict](https://github.com/fengdeyingzi/OSS-Dict) is a free and open-source offline dictionary
application for [Android](/wiki/android.md) and a fork of Aard 2.
The application can for example be used together with
[Episteme Reader](/wiki/android/episteme_reader.md) for looking up words while reading.
## Setup
On [Android](/wiki/android.md) OSS Dict is available on [F-Droid](/wiki/android/f-droid.md)
in a package called [OSS-Dict](https://f-droid.org/en/packages/com.akylas.aard2/).
## Usage
This section addresses the usage of OSS Dict.
### Installing Dictionaries
Dictionary files have to be downloaded separately and added to OSS Dict.
This is usually done by using `.slob` files.
A guide on where to find them can be found in the
[wiki of the slob Github page](https://github.com/itkach/slob/wiki/Dictionaries).

View File

@@ -154,8 +154,42 @@ This section focuses on the basic usage of calibre's web version.
#### Problems Logging in With Reverse Proxy
It is [a known problem](https://github.com/janeczku/calibre-web/issues/2916?utm_source=chatgpt.com)
not being able to login when using a [reverse proxy](/wiki/reverse-proxy.md) like
[Nginx](/wiki/nginx.md) or [Traefik](/wiki/traefik.md).
It is [a known problem](https://github.com/janeczku/calibre-web/issues/2916) not being able to login
when using a [reverse proxy](/wiki/reverse-proxy.md) like [Nginx](/wiki/nginx.md) or
[Traefik](/wiki/traefik.md).
In this case a 504 error will be displayed.
According to various sources this can be fixed by trying previous sections until it works again.
#### `sqlite3.OperationalError: no such column: books.isbn`
When starting calibre's web version a `500 Internal Server Error` may be displayed.
The logs contain an error similar to the following.
```txt
sqlite3.OperationalError: no such column: books.isbn
```
This indicates that the `metadata.db` schema is missing the `isbn` and `flags` columns expected by
the installed web version.
As a temporary workaround the missing columns can be added manually using the following command.
The placeholder `<metadata>` is the path to calibre's `metadata.db`.
```sh
sqlite3 <metadata>
```
Afterwards run the following [SQL](/wiki/database.md) commands on the database.
```sql
ALTER TABLE books ADD COLUMN isbn TEXT;
ALTER TABLE books ADD COLUMN flags INTEGER NOT NULL DEFAULT 0;
```
After applying the changes restart the service.
The added columns are metadata fields.
Existing books will keep a `NULL` value for `isbn` and `0` for `flags`.
This workaround allows the web version to start again, however it is recommended to verify that the
library was created with a compatible calibre version and that the correct `metadata.db` is being
used.

14
wiki/deepl.md Normal file
View File

@@ -0,0 +1,14 @@
# DeepL
[DeepL](https://www.deepl.com) is an AI-based translation service for translating text and documents
between various languages.
## Setup
DeepL is a website that can be visited without additional setup needed.
On [Android](/wiki/android.md) DeepL is available on [F-Droid](/wiki/android/f-droid.md) in a
package called [DeepL](https://f-droid.org/en/packages/com.example.deeplviewer/).
Additionally, it is available on the [Google Play store](/wiki/android.md#app-store) in a package
called
[DeepL Translate](https://play.google.com/store/apps/details?id=com.deepl.mobiletranslator&hl=en-US).

View File

@@ -35,8 +35,8 @@ track of e-books and normal books at the same time which is a feature no e-book
An e-reader is a device that is designed for reading digital e-books.
Some of them also feature [annotation tools](/wiki/note-taking.md).
- [Episteme Reader](https://github.com/Aryan-Raj3112/episteme) is a native
[Android](/wiki/android.md) [e-book](/wiki/e-book.md) reader, that is capable of annotations.
- [Episteme Reader](/wiki/android/episteme_reader.md) is a native [Android](/wiki/android.md)
e-book reader, that is capable of annotations.
In contrast to [Saber](/wiki/note-taking.md#software) it is able to handle large PDF-files.
Additionally it features the OPDS protocol for catalogs which can, for example, connect to
[the OPDS catalog of calibre's web version](/wiki/calibre.md#connect-via-opds).

30
wiki/eduroam.md Normal file
View File

@@ -0,0 +1,30 @@
# eduroam
eduroam, short for education roaming, is a wireless network available at many universities and
research institutions worldwide.
It allows users to connect using the credentials or certificates issued by their home institution.
## Android
The recommended [Android](/wiki/android.md) client is called [geteduroam](https://geteduroam.app/).
It is available on the [Google Play Store](/wiki/android.md#app-store) as well as on
[F-Droid](/wiki/android.md#app-store).
It supports both username/password authentication and certificate-based authentication (EAP-TLS).
Install the application, select your institution and follow the setup process.
The application should remain installed, as removing it also removes the eduroam configuration.
## Linux
Most [Linux](/wiki/linux.md) desktop environments support eduroam directly through
[NetworkManager](/wiki/linux/networkmanager.md).
For username/password authentication configure a new WPA2/WPA3 Enterprise connection using the
parameters provided by your institution.
If certificate-based authentication (EAP-TLS) is used, import the supplied client certificate and
configure the connection accordingly.
The certificate is usually provided by your institution.
Some institutions also provide an installer through the official
[eduroam Configuration Assistant Tool (CAT)](https://cat.eduroam.org).

View File

@@ -98,10 +98,10 @@ The following add-ons provide translation options.
add-on made by Mozilla itself that gives an option for marked text to display its translations
quickly from the extension menu but can also translate whole sites.
- [Simple Translate](https://addons.mozilla.org/en-US/firefox/addon/simple-translate) is an add-on
supporting both DeepL and Google Translate to translate marked text in various different ways that
can be automatically displayed.
supporting both [DeepL](/wiki/deepl.md) and Google Translate to translate marked text in various
different ways that can be automatically displayed.
- [To DeepL translation](https://addons.mozilla.org/en-US/firefox/addon/to-deepl/) gives an option
for marked text to display its translation in a pop-up window using DeepL.
for marked text to display its translation in a pop-up window using [DeepL](/wiki/deepl.md).
#### Shopping Add-ons

View File

@@ -1,4 +1,4 @@
# Git (Client)
# Git (Package)
This entry deals with the Git client used in [Linux-based systems](/wiki/linux.md).
For a basic overview and the server setup of git see the
@@ -30,9 +30,57 @@ Robertson also made guides on
[post-production](https://sethrobertson.github.io/GitPostProduction/gpp.html) and a guide on
[best practices](http://sethrobertson.github.io/GitBestPractices).
### Git Hooks
Git Hooks are scripts that are executed automatically when certain Git events occur.
They can be used to run checks, format code or generate files before or after operations such as
commits, merges or pushes.
Hooks are stored in the `.git/hooks` directory of a repository.
They are local to a repository and are not tracked by Git.
A hook has to be marked as executable before it is used.
Common hook names are:
* `applypatch-msg`
* `commit-msg`
* `fsmonitor-watchman`
* `post-applypatch`
* `post-checkout`
* `post-commit`
* `post-merge`
* `post-rewrite`
* `post-update`
* `pre-applypatch`
* `pre-auto-gc`
* `pre-commit`
* `pre-merge-commit`
* `pre-push`
* `pre-rebase`
* `pre-receive`
* `prepare-commit-msg`
* `push-to-checkout`
* `sendemail-validate`
* `update`
The following example prints a short message before every commit.
The script has to be stored in `.git/hooks/pre-commit` and marked as executable.
```sh
chmod +x .git/hooks/pre-commit
```
```sh
#!/bin/sh
echo "Running pre-commit hook..."
```
Other hooks function analog.
### Show Commit Information
To explicitly display all informations corresponding to a given commit hash `<hash>` run the
To explicitly display all information corresponding to a given commit hash `<hash>` run the
following command.
```sh
@@ -55,7 +103,7 @@ git commit --amend --no-edit
```
A graphic that visualizes the way amending works was made by
[jubb0bs in a Stackoverflow comment](https://stackoverflow.com/questions/26050327/how-does-git-commit-amend-work-exactly).
[jubb0bs in a StackOverflow comment](https://stackoverflow.com/questions/26050327/how-does-git-commit-amend-work-exactly).
After amending a normal `git push` will not work as a commit was removed.
In this case to [push it has to be done forcefully](#force-pushing).
@@ -113,11 +161,10 @@ git ls-files -v | grep "^S"
Authentication by default is done via a username and a password.
For some services such as GitHub.
it is not possible to use password as an authentication method.
It is not possible to use password as an authentication method.
The other possibility to authenticate to git is by using [SSH](/wiki/ssh.md).
The following sections assumes using a [Linux-based system](/wiki/linux.md) using
[OpenSSH](/wiki/linux/openssh.md).
The following sections assumes [Linux](/wiki/linux.md) is using [OpenSSH](/wiki/linux/openssh.md).
For this a
[SSH certificate has to be created](/wiki/linux/openssh.md#generate-new-keys) and
[added to the authentication agent](/wiki/linux/openssh.md#adding-keys-to-authentication-agent).
@@ -147,7 +194,7 @@ There are different possibilities to improve the diff of git.
One of them is [diff-so-fancy](#git-diff-diff-so-fancy) which allows word specific `git diff`.
A second and more modern option is [delta](#git-diff-delta) which additionally allows syntax
highlighting and a side-by-side view.
delta also improves the `git blame` command, which is another reason why it is widely more popular
Delta also improves the `git blame` command, which is another reason why it is widely more popular
then diff-so-fancy.
A more or less complete overview of the options was performed in an
@@ -180,8 +227,8 @@ Depending on the system settings and preferences the dark-mode (`dark`) and the
#### `git diff`: diff-so-fancy
[diff-so-fancy](https://github.com/so-fancy/diff-so-fancy) is a drop in replacement for the default
`git diff` look.
The package [diff-so-fancy](https://github.com/so-fancy/diff-so-fancy) is a drop-in replacement for
the default `git diff` look.
It can be installed via most [package managers](/wiki/linux/package_manager.md) using the
`diff-so-fancy` package.
Afterward the following lines need to be run to complete the configuration.

View File

@@ -24,3 +24,7 @@ The following is a list of these tools.
Basic guides for this can be found on the pages of
[toromtomtom](https://www.toromtomtom.com/blog/2021/10/17/pdfpc.html) and
[Utah university](https://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/pdfpc/pdfpc-doc.pdf).
Most importantly the tab key opens the overview mode, `p` pauses, `f` freezes, `t` opens
clickable options, `g` opens the option to navigate to a specific page, `h` hides and `b` shows
`a` blank foil. After selecting a rectangular space with the pointer tool, `z` can be pressed to
zoom into it.

View File

@@ -381,7 +381,7 @@ can be referenced.
### TensorFlow
This section addresses the [TensorFlow module](https://www.tensorflow.org/).
Tensorflos is a machine learning resource which is often used for
TensorFlow is a machine learning resource which is often used for
[neural networks](/wiki/neural_network.md).
Apart from [package managers](/wiki/linux/package_manager.md) and
@@ -390,6 +390,88 @@ on [the official website](https://www.tensorflow.org/install/source).
This may especially be useful if specific configurations are needed such as vendor specific GPU
support.
#### Setup TensorFlow with CUDA in a uv Project
TensorFlow can install its required CUDA user-space libraries as optional dependencies on Linux.
The NVIDIA driver still has to be installed on the host system.
```sh
nvidia-smi
uv add 'tensorflow[and-cuda]'
```
Verify whether TensorFlow was built with CUDA support and detects the GPU.
```sh
uv run python -c 'import tensorflow as tf; print("CUDA build:", tf.test.is_built_with_cuda()); print(tf.config.list_physical_devices("GPU"))'
```
If `CUDA build` is `True` but no GPU is listed and TensorFlow reports that it cannot load GPU
libraries, the dynamic linker may not find the NVIDIA libraries installed inside the virtual
environment.
The following command temporarily adds all library directories from the installed `nvidia-*`
packages.
```sh
SITE_PACKAGES=$(uv run python -c 'import site; print(site.getsitepackages()[0])')
CUDA_LIBS=$(find "$SITE_PACKAGES/nvidia" -type d -name lib -printf '%p:')
LD_LIBRARY_PATH="${CUDA_LIBS}/usr/lib" uv run python -c \
'import tensorflow as tf; print(tf.config.list_physical_devices("GPU"))'
```
If the test succeeds, store the path in a machine-specific dotenv file.
```sh
printf 'LD_LIBRARY_PATH=%s/usr/lib\n' "$CUDA_LIBS" > .env.cuda
printf '.env.cuda\n' >> .gitignore
```
Run the project with the file explicitly.
```sh
uv run --env-file .env.cuda python <script>.py
```
To load it automatically, create a `.envrc` file and use
[direnv](https://direnv.net/).
```sh
printf 'export UV_ENV_FILE="$PWD/.env.cuda"\n' > .envrc
eval "$(direnv hook zsh)"
direnv allow
```
For more information about dotenv files in uv, refer to the
[uv environment variable section](/wiki/programming_language/python/uv.md#loading-environment-variables).
Some recent GPUs may require CUDA kernels to be compiled from PTX on the first run because the
TensorFlow wheel does not yet contain native kernel binaries for their compute capability.
For example, TensorFlow 2.21 reports this for an RTX 5060 Ti with compute capability `12.0a`.
According to NVIDIA's
[explanation of PTX compatibility](https://developer.nvidia.com/blog/understanding-ptx-the-assembly-language-of-cuda-gpu-computing/),
embedded PTX can be compiled for newer GPU generations at runtime.
The first start can therefore take considerably longer, while the resulting binary is normally
cached for subsequent runs.
Make sure the `ptxas` executable installed by the CUDA dependency is available in the virtual
environment.
```sh
VENV_DIR=$(uv run python -c 'import sys; print(sys.prefix)')
PTXAS=$(find "$VENV_DIR" -type f -name ptxas -print -quit)
ln -sf "$PTXAS" "$VENV_DIR/bin/ptxas"
```
The library lookup problem is not caused by the GPU being new; it is an environment configuration
issue.
The new GPU generation only explains why TensorFlow falls back to PTX JIT compilation after the
libraries have been found.
Refer to the
[official TensorFlow installation guide](https://www.tensorflow.org/install/pip) for the current
CUDA installation and troubleshooting steps.
#### Basic Usage of TensorFlow
The basic usage of TensorFlow is described in

View File

@@ -14,6 +14,50 @@ to install uv on your operating system.
This section addresses the usage of uv.
### Automatically Updating `requirements.txt`
Projects that still require a `requirements.txt` file can regenerate it automatically by using a Git
`pre-commit` hook.
The hook is executed before every commit and can export the current project dependencies before the
changes are committed.
For the export command see the
[`requirements.txt` export section](#exporting-requirementstxt).
For a general explanation of Git hooks refer to the
[Git Hooks section](/wiki/linux/git_%28package%29.md#git-hooks) in the
[Git package entry](/wiki/linux/git_%28package%29.md).
### Exporting `requirements.txt`
Although `uv` primarily manages dependencies through `pyproject.toml` and `uv.lock`, some tools like
[pip](/wiki/programming_language/python.md#pip) and other
[virtual environments](/wiki/programming_language/python.md#using-virtual-environments) still expect
a `requirements.txt` file.
The recommended way to generate it is by exporting the locked project dependencies.
```sh
uv export --format requirements-txt -o requirements.txt
```
This creates a reproducible `requirements.txt` based on the project's lock file.
Alternatively, the packages currently installed in the active virtual environment can be exported.
```sh
uv pip freeze > requirements.txt
```
Unlike `uv export`, this command only lists the packages that are currently installed and therefore
depends on the state of the active environment.
If a `requirements.txt` file should always stay in sync with the project dependencies, it can be
automatically regenerated using a Git `pre-commit` hook.
For more information refer to the
[Git Hooks section](/wiki/linux/git_%28package%29.md#git-hooks) in
[Linux' entry about Git](/wiki/linux/git_%28package%29.md).
### Executable Scripts
uv fully supports Python scripts that use the standard Python shebang.
@@ -69,6 +113,44 @@ desired package.
uv add <package>
```
### Loading Environment Variables
[`uv run`](https://docs.astral.sh/uv/concepts/configuration-files/#environment-variable-files) can
load environment variables from dotenv files.
Use `--env-file` to load a file for one command.
```sh
uv run --env-file .env.local python <script>.py
```
Alternatively, set `UV_ENV_FILE` to use the same file for subsequent `uv run` commands in the
current shell.
```sh
export UV_ENV_FILE="$PWD/.env.local"
uv run python <script>.py
```
For project-local automation, [direnv](https://direnv.net/) can set `UV_ENV_FILE` whenever the
project directory is entered.
Create `.envrc` in the project root with the following content.
```sh
export UV_ENV_FILE="$PWD/.env.local"
```
Enable the shell hook, then approve the file.
The example uses Zsh.
```sh
eval "$(direnv hook zsh)"
direnv allow
```
The shell hook should be added to `~/.zshrc` to enable it in new shells.
`direnv allow` always expects a `.envrc`; it does not load `.env.local` directly.
Machine-specific dotenv files should usually be added to `.gitignore`.
### Installing CLI Tools
Besides managing projects and virtual environments, `uv` can also install

45
wiki/rembg.md Normal file
View File

@@ -0,0 +1,45 @@
# rembg
[rembg](https://github.com/danielgatis/rembg) is a [command line](/wiki/linux/shell.md) tool and
Python library for removing image backgrounds using pretrained
[neural networks](/wiki/neural_network.md) executed through ONNX Runtime.
## Setup
rembg can be installed from source as described on the
[official GitHub repository](https://github.com/danielgatis/rembg).
Alternatively a [Python package manager](/wiki/programming_language/python.md#package-management)
can be used to install rembg.
For the backend one must select CPU or GPU usage.
For command line usage an extra package has to be installed in addition to the inference backend.
Depending on that choice the name of the package will be `"rembg[cpu,cli]"` or `rembg[gpu,cli]`.
## Usage
This section addresses the usage of rembg.
### Remove Background
The following command removes the background from an image using a specific `<model>`.
In this case `<input>` is a placeholder for the input image path and `<output>` for the output image
path.
```sh
rembg i -m <model> <input> <output>
```
Depending on the use-case other models may also be used.
`u2net` is a general purpose model and most of the time a good default.
`u2net_human_seg` is optimized for human subjects.
`isnet-general-use` is an alternative general-purpose model.
The quality depends on the selected model and the input image.
For portraits with complex backgrounds such as bushes or trees, `u2net` often produces the best
overall results, while other models may perform better on different types of images.
Additionally, alpha matting can improve difficult edges such as hair.
```sh
rembg i -m <model> -a <input> <output>
```