This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### A Pluto.jl notebook ### | |
| # v0.12.21 | |
| # (c) 2021 Lewin Bormann | |
| using Markdown | |
| using InteractiveUtils | |
| # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
| macro bind(def, element) | |
| quote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import LsqFit | |
| import Plots | |
| function fwhm(sigma::Real)::Float64 | |
| # Calculate FWHM from sigma. | |
| 2sqrt(2log(2))*sigma | |
| end | |
| const M64 = Measurements.Measurement{Float64} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Sat Mar 13 19:26:59 2021 | |
| @author: lbo | |
| """ | |
| import numpy as np | |
| from numpy import fft |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * To run, install BLAS, LAPACK, and DLib, then do this: | |
| * | |
| * $ g++ -l:libcblas.so.3 -l:liblapack.so.3 -ldlib mlmagic.cc -o run && ./run | |
| * | |
| * If it doesn't work, fiddle with the -l options and ensure that you have the right libraries installed. | |
| * | |
| * This file is very very roughly modeled after the DLib example for Kernel Ridge Regression: | |
| * http://dlib.net/krr_classification_ex.cpp.html | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # Simple sexpr parser | |
| from collections import namedtuple | |
| Expr = namedtuple('Expr', ('children')); | |
| OPEN = 1 | |
| CLOSE = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Tue Dec 1 12:12:22 2020 | |
| @author: lbo | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Tue Dec 1 12:12:22 2020 | |
| @author: lbo | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Tue Dec 1 12:12:22 2020 | |
| Run: $ python a2a.py | |
| Writes to `animation.mp4`. Adjust parameters below. | |
| @author: lbo | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Sat Nov 21 20:04:54 2020 | |
| @author: lbo | |
| """ | |
| from recordtype import recordtype | |
| from queue import PriorityQueue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TokenStream [Ident { ident: "test_function_onearg", span: #0 bytes(437..457) }, Group { delimiter: Parenthesis, stream: TokenStream [Literal { kind: Integer, symbol: "32", suffix: None, span: #0 bytes(458..460) }], span: #0 bytes(457..461) }] | |
| thread 'rustc' panicked at 'expected one of: `for`, parentheses, `fn`, `unsafe`, `extern`, identifier, `::`, `<`, square brackets, `*`, `&`, `!`, `impl`, `_`, lifetime', /home/lbo/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.48/src/parse_quote.rs:95:21 | |
| note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace | |
| error: internal compiler error: unexpected panic | |
| note: the compiler unexpectedly panicked. this is a bug. | |
| note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md |