Skip to content

Instantly share code, notes, and snippets.

View hazelnusse's full-sized avatar

Luke Peterson hazelnusse

View GitHub Profile
@hazelnusse
hazelnusse / gist:c5d706c3f5d7c22c2464ce53ba091e0d
Created December 27, 2018 19:51
emerge --color y --backtrack 9999 --update --deep --newuse --tree @world -vp
480s /var/lib/portage # emerge --color y --backtrack 9999 --update --deep --newuse --tree @world -vp
These are the packages that would be merged, in reverse order:
Calculating dependencies... done!
[ebuild U ] sys-apps/systemd-240:0/2::gentoo [239-r2:0/2::gentoo] USE="acl gcrypt kmod lz4 pam pcre policykit resolvconf seccomp split-usr ssl sysv-utils -apparmor -audit -build -cryptsetup -curl -elfutils -gnuefi -http -idn -importd -libidn2 -lzma -nat -qrcode (-selinux) -test -vanilla -xkb" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild U ] net-misc/wget-1.20.1::gentoo [1.20::gentoo] USE="ipv6 nls pcre ssl zlib -debug -gnutls -idn -libressl -ntlm -static -test -uuid" 0 KiB
[nomerge ] gnome-base/gnome-3.30.2:2.0::Gnome-3-30-X USE="bluetooth cdr classic extras -accessibility -cups"
[nomerge ] gnome-base/gnome-extra-apps-3.30.2:3.0::Gnome-3-30-X USE="games share shotwell tracker"
[nomerge ] media-gfx/gnome-photos-3.30.1::Gnome-3-30-X USE="-flickr -test -upnp-av"
@hazelnusse
hazelnusse / learn_fft.m
Created August 26, 2013 20:22
Trying to figure out how to obtain time delay from the phase portion of the FFT
clear all; close all; clc;
fs = 1000; % Sample frequency
ts = 1/fs; % Sample period
t = 0:ts:3; % Time points
N_real = length(t); % Number of samples
N_complex = floor(N_real / 2) + 1; % Number of unique complex numbers in resulting FFT
f1 = 50; % Hz
@hazelnusse
hazelnusse / build.log
Created August 9, 2013 08:16
Error in Mendeley .bib file
01:04:01 /tmp/mwe$ ll
total 8
drwxr-xr-x 2 luke luke 80 Aug 9 01:04 .
drwxrwxrwt 11 root root 420 Aug 9 01:04 ..
-rw-r--r-- 1 luke luke 308 Aug 9 01:04 library.bib
-rw-r--r-- 1 luke luke 179 Aug 9 01:03 mwe.tex
01:04:02 /tmp/mwe$ xelatex mwe.tex
This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013)
restricted \write18 enabled.
entering extended mode

Notes for Python Science Apps talk

Presentation

@hazelnusse
hazelnusse / .gitignore
Last active December 12, 2015 12:49 — forked from jey/0-example.cpp
*.o
*.so
@hazelnusse
hazelnusse / Makefile
Created August 28, 2012 07:10 — forked from certik/README.md
C vs Fortran benchmark
all : a_f a_c a_c++
a_f : a.f90
gfortran -O3 -march=native -ffast-math -funroll-loops a.f90 -o a_f
a_c : a.c
gcc -O3 -march=native -ffast-math -funroll-loops a.c -o a_c
a_c++ : a.cc
g++ -O3 -march=native -ffast-math -funroll-loops a.cc -o a_c++
@hazelnusse
hazelnusse / gist:1005937
Created June 3, 2011 06:01
First approach to forming equations of motion for a simple particle using Lagrange's method
# Form Lagrangian only with symbols
from sympy import symbols, diff, S, Eq
t, m, g, x, v = symbols('t m g x v')
# Kinetic and Potential energies
KE = 1/S(2)*m*v**2
PE = m*g*x
# Lagrangian
L = KE - PE