Skip to content

Instantly share code, notes, and snippets.

View astrojuanlu's full-sized avatar

Juan Luis Cano Rodríguez astrojuanlu

View GitHub Profile
@austinlparker
austinlparker / README.md
Last active October 31, 2024 06:59
OpenTelemetry Collector Log Parser for ATProto PDS

Parsing PDS Logs With OpenTelemetry

This configuration should parse your ATProto/Bluesky PDS logs into nicely formatted and structured OpenTelemetry Logs.

You'll need to use OpenTelemetry Collector Contrib, and you can either install it on your host or run it as a container (if running as a container, you'll need to map the Docker log path in as a read-only volume).

This also assumes that your Docker daemon.json has "tag": "{{.Name}}|{{.ImageName}}|{{.ID}}" set under log-opts (this is how we parse the container metadata).

As an exercise to the reader, you can use the count connector to parse the log stream into Prometheus or OTLP metrics. You can also add in hostmetrics receiver to get memory, CPU, disk, etc. utilization.

#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@camriddell
camriddell / collect_univariates.py
Last active March 8, 2024 20:56
A collection of univariate plots
from functools import partial
from textwrap import fill
from scipy.stats import norm, uniform, skewnorm, gaussian_kde, triang
from numpy import (
array, linspace, quantile, histogram, atleast_2d, mean, std, add
)
from numpy.lib.stride_tricks import sliding_window_view
from matplotlib.pyplot import subplots, show, rc
@s-m-e
s-m-e / poliastro_benchmark.ipynb
Last active September 3, 2020 14:05
poliastro benchmark
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cadojo
cadojo / Planar Launch State Equations.ipynb
Last active July 8, 2020 10:13
Planar Launch State Equations
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@varqox
varqox / recording_application_and_microphone.md
Last active August 16, 2024 15:09
How to record multiple applications and microphone into one audio file on Linux using PulseAudio

How to record multiple applications and microphone into one audio file on Linux

Step 0. Terminology

Sinks are for output, sources are for input. To stream source to sink a loopback must be created. More shall you find there.

Step 1. Create output sink that will be recorded

Our output sink will be named recording.

pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording
@rabernat
rabernat / zarr_over_http.ipynb
Last active July 16, 2019 18:12
Zarr over http
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from collections import defaultdict, OrderedDict
from scipy.integrate import solve_ivp
import networkx as nx
import numpy as np
import pdb
class Node:
def __init__(self, *args, **kwargs):
self._values = {}
import numpy as np
from astropy import units as u
from poliastro.bodies import Earth
from poliastro.core.angles import (
E_to_nu,
_kepler_equation,
_kepler_equation_prime,
nu_to_M,
)