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 os | |
import sys | |
import yaml | |
from pathlib import Path | |
def load_yaml_file(filepath): | |
with open(filepath, 'r') as file: | |
return yaml.safe_load(file) | |
def save_yaml_file(data, filepath): |
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
from __future__ import annotations | |
from datetime import datetime, date | |
from enum import Enum | |
from typing import List, Dict, Optional, Any, Union | |
from pydantic import BaseModel as BaseModel, Field | |
from linkml_runtime.linkml_model import Decimal | |
metamodel_version = "None" | |
version = "None" |
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
""" | |
Script that executes the first stage of the pipeline for VOC data (filtering) | |
""" | |
import argparse | |
import xml.etree.ElementTree as ET | |
import os | |
import random | |
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
prototype airflow DAG operator |
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
def make_box_layout(): | |
return widgets.Layout( | |
border='solid 1px black', | |
margin='0px 10px 10px 0px', | |
padding='5px 5px 5px 5px' | |
) | |
class Sines(widgets.HBox): | |
def __init__(self): |
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
controls = widgets.VBox([int_slider, color_picker, text_xlabel, text_ylabel]) | |
widgets.HBox([controls, output]) |
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
output |
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
# create some control elements | |
int_slider = widgets.IntSlider(value=1, min=0, max=10, step=1, description='freq') | |
color_picker = widgets.ColorPicker(value=initial_color, description='pick a color') | |
text_xlabel = widgets.Text(value='', description='xlabel', continuous_update=False) | |
text_ylabel = widgets.Text(value='', description='ylabel', continuous_update=False) | |
# callback functions | |
def update(change): | |
"""redraw line (update plot)""" | |
line.set_ydata(np.sin(change.new * x)) |
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
output = widgets.Output() | |
# create some x data | |
x = np.linspace(0, 2 * np.pi, 100) | |
# default line color | |
initial_color = '#FF00DD' | |
with output: | |
fig, ax = plt.subplots(constrained_layout=True, figsize=(6, 4)) |
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
def make_box_layout(): | |
return widgets.Layout( | |
border='solid 1px red', | |
margin='0px 10px 10px 0px', | |
padding='5px 5px 5px 5px' | |
) | |
vbox1, vbox2 = make_boxes() | |
vbox1.layout = make_box_layout() |
NewerOlder