Skip to content

Instantly share code, notes, and snippets.

@nocarryr
nocarryr / ffmpeg_sender.py
Created June 27, 2024 23:09
cyndilib sender example
from __future__ import annotations
from typing import NamedTuple, cast
from typing_extensions import Self
import enum
import io
import subprocess
import shlex
from fractions import Fraction
from contextlib import contextmanager
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nocarryr
nocarryr / echoes_implant_levels.ipynb
Last active February 4, 2023 20:37
Stuff to calculate cost of leveling implants in Eve Echoes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nocarryr
nocarryr / audioMeter.pde
Last active October 1, 2022 19:59
NDI Multiviewer
double NINF = Double.NEGATIVE_INFINITY;
class AudioMeter {
double[] rmsDbfs, rmsDbu, peakDbfs, peakDbu, peakAmp;
int sampleRate, nChannels, blockSize, stride;
float avgTime = .1;
int[] bufferLength;
//float[] ticks = {0, -6, -12, -18, -24, -36, -48, -60, -90, -140};
float[] ticks = {0, -10, -20, -30, -40, -50, -60, -70};
float maxTick = 0;
@nocarryr
nocarryr / .gitignore
Last active August 18, 2022 20:52
sphinx_rtd_theme issue 1301
_build
@nocarryr
nocarryr / Pipfile
Created August 3, 2022 20:47
pyrtlsdrlib-test
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
ipython = "*"
numpy = "*"
pyrtlsdr = {ref = "rtlsdrlib-integration", git = "https://github.com/pyrtlsdr/pyrtlsdr.git"}
pyrtlsdrlib = {ref = "main", git = "https://github.com/pyrtlsdr/pyrtlsdrlib.git"}
@nocarryr
nocarryr / birddog.py
Last active March 14, 2022 23:34
Experimenting with the Birddog REST API
#! /usr/bin/env python3
import typing as tp
import enum
from dataclasses import dataclass
import json
from bs4 import BeautifulSoup
import requests
import click
#! /usr/bin/env python3
"""Utilities for parsing and manipulating Primitive Root Diffuser results from
http://www.oliverprime.com/prd/
"""
import argparse
from pathlib import Path
import dataclasses
from dataclasses import dataclass, field
from typing import Union, List, Tuple, Dict, Optional
import json
#! /usr/bin/env python3
from loguru import logger
import os
from pathlib import Path
import shlex
import subprocess
import tempfile
import shutil
import argparse
@nocarryr
nocarryr / plt_multicursor.py
Created December 24, 2018 17:55
Snapping MultiCursor widget for pyplot
import numpy as np
import matplotlib
# matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
from matplotlib.widgets import MultiCursor as _MultiCursor
class MultiCursor(_MultiCursor):
"""MultiCursor widget subclass that snaps to plot data
Snaps to the nearest x-axis value on mouse-movement. The horizontal lines of