This file contains 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
# See https://blog.3d-logic.com/2015/01/10/using-a-tm1638-based-board-with-arduino/ | |
import atexit | |
from pyftdi.spi import SpiController | |
from time import sleep | |
SPI_FREQ = 10000 | |
SPI_MODE = 0 | |
# Initialize the controller |
This file contains 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
### Time ### | |
All of this needs to be done as root. | |
This assumes the GPS module is connected to the 4th channel of the | |
FT4232H. If it isn't, you need to edit the DEVICES variable below to | |
point to the correct one. The connections you need to make are: | |
GPS Pin <--> FT4232 Pin | |
---------------------------- |
This file contains 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
# Based off the implementation that is already in becquerel.parsers.SpeFile, | |
# but adapted to read *some* of the info from a Spectrum instance. | |
# I'm a little fuzzy on the details of the SPE format (e.g. what is the difference | |
# between $ENER_CAL and $MCA_CAL) but this produces files that load without | |
# issue in Sandia's InterSpec tool. | |
# This is a rough implementation as a prototype, it needs a lot of work. | |
def write_spe( | |
spec, |
This file contains 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 numpy as np | |
import scipy.stats as st | |
class GaussianMixture(object): | |
def __init__(self, mu, sigma, w): | |
self.mu = np.asarray(mu) | |
self.sigma = np.asarray(sigma) | |
self.w = np.asarray(w) | |
self.w /= self.w.sum() |
This file contains 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
""" | |
This is the pipeline `do_stuff` | |
generated using kedro <blah> | |
""" | |
from .pipeline_do_stuff import create_pipeline | |
__all__ = ["create_pipeline"] | |
__version__ = "0.1" |
OlderNewer