Skip to content

Instantly share code, notes, and snippets.

View tobiabocchi's full-sized avatar

Tobia Bocchi tobiabocchi

View GitHub Profile
@thalamus
thalamus / ArchLinuxARM-M1
Last active November 16, 2024 05:37
How to boot Arch Linux ARM in QEMU (patched for M1)
/*
* This document is provided to the public domain under the
* terms of the Creative Commons CC0 public domain license
*/
How to boot Arch Linux ARM in QEMU (patched for M1)
Prerequisites:
QEMU - patched for M1 processors - patches: https://github.com/utmapp/qemu
@stefaang
stefaang / wdhws.sh
Last active September 1, 2024 16:07
Hardware control script for PR2100/PR4100
#!/bin/bash
#
# Post-init script for FreeNAS on Western Digital PR2100/PR4100
# wdhws v1.0 by TFL
#
# BSD 3 LICENSE
#
# thanks unix stackexchange question 231975
setup_tty() {
@bshishov
bshishov / forecasting_metrics.py
Last active October 15, 2024 23:41
Python Numpy functions for most common forecasting metrics
import numpy as np
EPSILON = 1e-10
def _error(actual: np.ndarray, predicted: np.ndarray):
""" Simple error """
return actual - predicted