Skip to content

Instantly share code, notes, and snippets.

@not-a-feature
not-a-feature / update_ssd_firmware.sh
Last active March 9, 2024 23:17
Updates the firmware of Western Digital SSDs on Ubuntu / Linux Mint.
⚠️ News: Use the interactive tool wd-fw-update.
- Install it via pip: `pip install wd-fw-update`
- Then run `wd-fw-update`
- See https://github.com/not-a-feature/wd_fw_update for more information.
A shell version is also available and was merged into a proper repository: https://github.com/not-a-feature/wd_ssd_firmware_update
@not-a-feature
not-a-feature / update_appimage.sh
Last active May 25, 2023 18:05
Download and update the newest (Nextcloud) AppImage.
#!/bin/bash
APPNAME="Nextcloud"
# Define the directory where the AppImage is stored
APP_DIR="/home/user/dir"
# Fetch the latest release data from the Github API
# See: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release
# Structure: https://api.github.com/repos/OWNER/REPO/releases/latest
@not-a-feature
not-a-feature / rl_summary.md
Last active May 25, 2023 11:11
Small overview of different RL techniques
  1. Value Iteration vs Policy Iteration

    Criteria Value Iteration Policy Iteration
    Steps Consists of a single step combining policy improvement and truncated policy evaluation Consists of two steps: policy evaluation and policy improvement
    Convergence Converges to the optimal policy after infinite iterations Often converges to the optimal policy faster than value iteration
    Complexity Less complex as it involves only one step More complex as it involves two distinct steps
    Examples Value Iteration method Policy Iteration method
  2. Monte Carlo Methods vs Temporal Difference Learning

@not-a-feature
not-a-feature / download_file.py
Last active February 6, 2023 20:41
Downloads a file and save it. Displays progressbar. Throws exception if sha256 hash does not match.
from hashlib import sha256
from tqdm.auto import tqdm
import logging
__author__ = "Jules Kreuer"
__copyright__ = "Jules Kreuer"
__license__ = "LGPL-3.0-only"
_logger = logging.getLogger(__name__)
@not-a-feature
not-a-feature / impfTermin.js
Last active October 9, 2021 17:29
iOS Widget, welches anzeigt ob im lokalen Impfzentrum Vermittlungscodes verfügbar sind. (für die scriptable.app)
/*
Impftermin Widget
v 1.4.1 Workaround durch JavaScript eval innerhalb eines WebViews (Thanks to @Redna)
This Scriptable Widget will show you if there are any "Vermittlungscode" for vaccination appointments available.
The data is pulled from the impfterminservice.de api, which is neither publicly available nor documented.
Therefore everything may break.
The newest version, issues, etc. of this widget can be found here: https://github.com/not-a-feature/impfWidget