https://github.com/nsls2-conda-envs/nsls2-collection/blob/main/envs/env-py310.yml
Remove any linux specific packages. There could be some additional touchups required to get it to build.
| import nslsii | |
| from bluesky_kafka import Publisher | |
| import uuid | |
| from tiled.client import from_profile | |
| c = from_profile("ucal") | |
| config = nslsii._read_bluesky_kafka_config_file(config_file_path="/etc/bluesky/kafka.yml") | |
| pub = Publisher(topic="ucal.bluesky.runengine.documents", | |
| bootstrap_servers=",".join(config['bootstrap_servers']), | |
| key=str(uuid.uuid4()), |
https://github.com/nsls2-conda-envs/nsls2-collection/blob/main/envs/env-py310.yml
| . /Users/gbischof/miniconda3/etc/profile.d/conda.sh | |
| if [ ! -z "$BS_PYTHONPATH" ]; then | |
| if [ ! -z "$PYTHONPATH" ]; then | |
| export PYTHONPATH=$PYTHONPATH:$BS_PYTHONPATH | |
| else | |
| export PYTHONPATH=$BS_PYTHONPATH | |
| fi | |
| fi |
| import time | |
| import threading | |
| class ThermalMaterial: | |
| """ | |
| A material that you can heat and cool. | |
| Parameters | |
| ---------- | |
| thermal_mass: float, optional |
| import time | |
| import threading | |
| from simple_pid import PID | |
| class ThermalMaterial: | |
| """ | |
| A material that you can heat and cool. |
| def plot_ophyd_device(device, dont_plot={'ramp_rate'}): | |
| ''' | |
| Plot all of the signals of an ophyd device. | |
| There is probably some inaccuracy of the timestamps. | |
| Simple implementation. | |
| ''' | |
| history = {signal: [getattr(device, signal).get()] | |
| for signal in set(device.component_names) - dont_plot} | |
| history['timestamp'] = [time.time()] | |
| print(set(device.component_names) - dont_plot) |
| from scipy.io import wavfile | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| import pyfirmata | |
| import pyaudio | |
| import wave | |
| import time | |
| vocals = '/Users/gbischof/Downloads/Bush-Machinehead-Isolated-Vocals.wav' | |
| full = '/Users/gbischof/Downloads/Bush-Machinehead.wav' |
| import argparse | |
| import pymongo | |
| import sys | |
| def update_resource_spec(mongo_uri, resource_uid, new_spec, wet_run): | |
| client = MongoClient(mongo_uri) | |
| collection = client.get_database()["resource"] | |
| print(f"Updating resource spec {'(dry_run)' if not wet_run else ''}") |