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
# -*- coding: utf-8 -*- | |
from __future__ import annotations | |
import signal | |
from pioreactor.automations import LEDAutomationContrib | |
from pioreactor.automations import events | |
from pioreactor.actions.led_intensity import LED_Channel | |
__plugin_summary__ = "An LED automation for ON/OFF cycles" | |
__plugin_version__ = "0.0.2" | |
__plugin_name__ = "Light Dark Cycle LED automation" |
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
#!/bin/bash | |
sudo apt update | |
sudo apt install -y git | |
git clone https://github.com/Pioreactor/pioreactor.git --depth 1 | |
cd pioreactor | |
make install-leader |
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
#!/bin/bash | |
sudo apt update | |
sudo apt install -y git | |
git clone https://github.com/Pioreactor/pioreactor.git --depth 1 | |
cd pioreactor | |
make install-worker-from-args newHostname=$1 |
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
#!/bin/bash | |
sudo apt update | |
sudo apt install -y git | |
git clone https://github.com/Pioreactor/pioreactor.git --depth 1 | |
cd pioreactor | |
make install-leader-as-worker |
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
votes | scaled_prob | |
---|---|---|
64.02877697841728 | 0 | |
79.85611510791367 | 0 | |
93.52517985611513 | 0 | |
107.19006190396522 | 0.0 | |
120.14388489208633 | 0 | |
135.97122302158274 | 0 | |
151.07913669064752 | 0 | |
159.70386481512466 | 0.011627906976744207 | |
173.36038146227202 | 0.02906976744186074 |
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
[ | |
{ | |
"id": "328cb8d0.ad53d8", | |
"type": "tab", | |
"label": "Flow 1", | |
"disabled": false, | |
"info": "" | |
}, | |
{ | |
"id": "e064c4c9.ed0b18", |
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 time | |
import board | |
import adafruit_dht | |
from paho.mqtt import publish | |
# Initial the dht device, with data pin connected to: | |
dhtDevice = adafruit_dht.DHT22(board.D21) | |
while True: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
Our model is | |
log(cell/ml) = alpha * (secchi stick depth) + intercept + Noise | |
However, our cell/mL comes from a noisy hemocytometer, and our | |
depth measured with the secchi stick is also noisy. Our goal is | |
still to infer alpha & intercept as well as possible, so we can | |
dump the hemocytometer. |
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
# test previous algorithm | |
actuals = pd.read_csv("https://gist.githubusercontent.com/csaid/a57c4ebaa1c7b0671cdc9692638ea4c4/raw/ad1709938834d7bc88b62ff0763733502eb6a329/shower_problem_tau_samples.csv") | |
DELTA = 0.1 | |
def survival_function(t, lambda_=50., rho=1.5): | |
# Assume simple Weibull model | |
return np.exp(-(t/lambda_) ** rho) |
NewerOlder