Skip to content

Instantly share code, notes, and snippets.

View ankona's full-sized avatar
🏠
Working from home

Christopher McBride ankona

🏠
Working from home
View GitHub Profile
@ankona
ankona / repo.py
Created February 3, 2026 21:16
Prefect-based git repository caching for C-Star
import shutil
import typing as t
from datetime import timedelta
from pathlib import Path
from prefect import flow, task
from prefect.cache_policies import INPUTS, TASK_SOURCE, CachePolicy
from cstar.base.gitutils import _clone
from cstar.base.log import get_logger
@ankona
ankona / simplempi.c
Created July 1, 2025 19:24
Simplest MPI test program
#include <stdio.h>
#include <mpi.h>
main(int argc, char **argv)
{
int node;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &node);
@ankona
ankona / aerospace.toml
Last active September 9, 2024 17:41
Aerospace config
# ~/.config/aerospace/aerospace.toml
# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
@ankona
ankona / dragon_handshake_w_update_loop.mermaid
Last active February 15, 2024 23:31
Dragon handshake + update messages
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ankona
ankona / dragon_handshake_seq.mermaid
Last active February 16, 2024 20:15
dragon handshake sequence diagram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ankona
ankona / telemetry.py
Last active February 15, 2024 16:31
0MQ synthetic data publisher
import numpy as np
import time
import zmq
def gen():
min_value = 0
max_value = 2000
normal_dy = 10
@ankona
ankona / slider_demo.py
Last active February 14, 2024 17:51
Demonstration of manipulating graph position w/a slider and buttons
import altair as alt
import streamlit as st
import pandas as pd
import numpy as np
import time
window_size = 10000
@ankona
ankona / placeholder_class_diagram.mermaid
Created February 11, 2024 04:36
placeholder mermaid diagram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ankona
ankona / gen_and_resample.py
Last active February 2, 2024 21:22
Simple method of resampling an input using diff tracking
import pathlib
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
file_name = pathlib.Path("generated.csv")
def generate(min_value: float, max_value: float, normal_dy: float, num_timesteps, axis) -> None:
@ankona
ankona / seq_diagram_collectors.txt
Last active January 18, 2024 17:14
collectors mermaid seq diagram example
sequenceDiagram
title: Telemetry Collector Sequence Diagram
%%Driver->>Experiment: create experiment
%%Experiment->>Controller: create controller
%%Controller->>JobManager: create job manager
%%Controller->>Launcher: create Launcher
%%JobManager->>TaskManager: create task manager
%%Controller->>TelemetryMonitor: create telemetry monitor
%%TelemetryMonitor->>CollectorManager: create collector manager
%%TelemetryMonitor->>FileWatcher: create file watcher