Skip to content

Instantly share code, notes, and snippets.

View mliberty1's full-sized avatar

Matt Liberty mliberty1

View GitHub Profile
@mliberty1
mliberty1 / monarch_th.py
Created June 8, 2022 14:08
Monarch Instruments USB Temperature & Relative Humidity Probe python driver
# Copyright 2022 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@mliberty1
mliberty1 / capture_and_downsample.py
Created November 9, 2021 14:34
Capture full rate data, discard initial duration, and downsample
# Created for https://forum.joulescope.com/t/nans-during-10-minutes-recordings/408
# Parts provided by user Andersbg, copyright unknown
# Progress: Copyright 2016 Vladimir Ignatev, MIT license (see below)
# Remainder Copyright 2021 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@mliberty1
mliberty1 / capture_fs_cbk.py
Created November 5, 2021 12:57
Joulescope JS110 capture sampling_frequency with callback
# Created for https://forum.joulescope.com/t/nans-during-10-minutes-recordings/408
# Parts provided by user Andersbg, copyright unknown
# Progress: Copyright 2016 Vladimir Ignatev, MIT license (see below)
# Remainder Copyright 2021 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@mliberty1
mliberty1 / atsams70b_time_counter.c
Created September 3, 2021 14:56
ATSAMS70 64-bit time counter
/*
* Copyright 2021 Jetperch LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@mliberty1
mliberty1 / raspberry_pi.md
Last active October 20, 2020 20:49
Raspberry PI Installation Instructions
@mliberty1
mliberty1 / downsample_logging.py
Created January 15, 2020 13:13
Joulescope downsample logging with min/max
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@mliberty1
mliberty1 / flask_sqlalchemy_model_repr.py
Last active July 17, 2018 02:29
Create automatic, meaningful, ordered repr for Flask-SQLAlchemy models.
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def db_model_repr(self):
"""Create a automatic meaningful repr for db.Model classes
Usage example:
class MyClass(db.Model):
__repr__ = db_model_repr
"""