Skip to content

Instantly share code, notes, and snippets.

@whophil
whophil / config.xml
Last active November 19, 2020 20:32
KVM XML configuration file for Windows 8 HTPC with VGA, USB controller passthrough on ASRock FM2A78M-ITX.
<domain type='kvm' id='1'>
<name>Win8-HTPC-OVMF</name>
<uuid>a2c7ea78-f49a-ef5b-6b16-521d098d40c9</uuid>
<metadata>
<vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
</metadata>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<memoryBacking>
<nosharepages/>
@whophil
whophil / Preferences.sublime-settings
Last active December 13, 2020 19:20
Sublime Text 3 user settings to use Unix style line endings by default (and also show the line ending type in the status bar)
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.light (SL).tmTheme",
"default_line_ending": "unix",
"font_size": 12,
"ignored_packages":
[
"Anaconda",
"Monokai Extended",
@whophil
whophil / daylight-derivatives.ipynb
Last active January 15, 2021 03:38
Computing derivatives of daylight hours
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whophil
whophil / jupyter-style.ipynb
Last active November 27, 2021 09:40
Pretty style for Jupyter notebooks using Google web-fonts. Apply to all your notebooks using %run magic.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whophil
whophil / pintfield.py
Created March 3, 2022 00:36
PintField implementation for uMongo
import collections
from marshmallow import ValidationError
from umongo.fields import BaseField
import numpy as np
from json import JSONEncoder
from ..._units import units as units_quantity
@whophil
whophil / scipy-from-euler-convention.ipynb
Created November 23, 2022 18:32
Extrinsic/intrinsic convention swapped in `scipy.spatial.transform.Rotation.from_euler()` ?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@whophil
whophil / jupyter.service
Last active October 30, 2023 16:33 — forked from doowon/jupyter_systemd
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py
@whophil
whophil / .gitignore
Created February 21, 2016 17:38 — forked from k0d3r/gist:3118874
.gitignore for OS (Windows/Mac) generated files
# Windows
Thumbs.db
desktop.ini
# OS X
.DS_Store
.Spotlight-V100
.Trashes
._*