Skip to content

Instantly share code, notes, and snippets.

View andyfaff's full-sized avatar

Andrew Nelson andyfaff

  • Sydney, Australia
View GitHub Profile
@andyfaff
andyfaff / Simpson_rule_even_points.ipynb
Created March 28, 2023 03:57
Simpson's rule even number of points
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andyfaff
andyfaff / find_adequate_resolution.ipynb
Created March 17, 2023 01:04
Find an adequate resolution smearing oversample
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andyfaff
andyfaff / numba_reflectivity.ipynb
Created March 9, 2023 22:17
Numba reflectivity kernel investigation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andyfaff
andyfaff / docker_commands.txt
Last active February 22, 2023 03:16
Docker commands
# 32 bit ubuntu on a 64 bit Intel host
docker run --rm -it -v $PWD:/io --platform=linux/i386 i686/ubuntu
docker run --rm -it -v $PWD:/io --platform=linux/i386 i386/ubuntu:focal
# if you're having troubles with SSH certificates on the 32 bit host
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
@andyfaff
andyfaff / EP4_XY_Hexagonal_pattern.ipynb
Created October 17, 2022 02:55
EP4 Hexagonal pattern map generator
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andyfaff
andyfaff / gist:506cfc7a165a43d5080a3d3a2af53a51
Created August 10, 2022 10:46
Changing things on macOS
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
export MACOSX_DEPLOYMENT_TARGET=11.0
arch -arm64 /bin/bash --login
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andyfaff
andyfaff / POLFOC.instr
Created June 7, 2021 06:11
McStas collimation system
/*******************************************************************************
* Instrument: <instrument name>
*
* %I
* Written by: <your name (email)>
* Date: <current date>
* Origin: <your institution>
* %INSTRUMENT_SITE: Templates
*
* <instrument short description>