Skip to content

Instantly share code, notes, and snippets.

View lucmos's full-sized avatar
🧗

Luca Moschella lucmos

🧗
View GitHub Profile
@rmcelreath
rmcelreath / prior_likelihood_conflict.r
Created September 11, 2023 11:29
Demonstration of how normal and student-t distributions interact in Bayesian updating
# prior - likelihood conflict
library(rethinking)
yobs <- 0
mtt <- ulam(
alist(
y ~ dstudent(2,mu,1),
mu ~ dstudent(2,10,1)
@vladak
vladak / varmilo keyboard.md
Last active May 28, 2024 07:57
Varmilo keyboard details
import streamlit as st
import os
import sys
import importlib.util
# Parse command-line arguments.
if len(sys.argv) > 1:
folder = os.path.abspath(sys.argv[1])
else:
folder = os.path.abspath(os.getcwd())
@tvst
tvst / SessionState.py
Last active April 14, 2024 20:24
DO NOT USE!!! Try st.session_state instead.
"""Hack to add per-session state to Streamlit.
Usage
-----
>>> import SessionState
>>>
>>> session_state = SessionState.get(user_name='', favorite_color='black')
>>> session_state.user_name
''
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@michaellindman
michaellindman / am1m-a-freeNAS-boot.md
Last active January 6, 2021 15:54
This document explains the process I used to boot FreeNAS on the ASUS AM1M-A

Booting FreeNAS on the ASUS AM1M-A

The ASUS AM1M-A has an issue with booting OSes in legacy mode that are using the GUID partition table, which is used by FreeNAS by default. In this document I will explain how to implement a workaround that will allow the system to boot into FreeNAS.

The workaround involves installing grub on to a bootable usb memory stick that is using the Master Boot Record partition table and add an entry for the FreeNAS boot device. We are basically using grub on the memory stick as a catalyst to access grub on the FreeNAS device which in turn will let us boot FreeNAS.

When doing this I suggest using a Linux Live-CD to install grub onto the memory stick (I used Ubuntu 14.04.2 Desktop), while it will work on an installed version of Linux, providing it is using the legacy boot mode and not UEFI, I wouldn't recommend it as it is possible that installing grub on the USB memory stick may break the version of grub that is currently in use. I would also suggest either removing or disabling