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

Compare commits

..

6 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
12 changed files with 241 additions and 11 deletions

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,9 +154,9 @@ 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.

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).

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

@@ -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

@@ -113,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>
```