Skip to content

Instantly share code, notes, and snippets.

View danalvarez's full-sized avatar

danalvarez

  • Guatemala
View GitHub Profile
@danalvarez
danalvarez / satnogs_wx_windows.py
Last active February 25, 2022 20:11
Used to process a satnogs ogg audio file for loading in WxToImg GUI (in windows)
#!/usr/bin/python3
import os
import sys
import wave
from datetime import datetime, timedelta
from dateutil import tz
# example satnogs_1692904_2020-02-14T10-24-03.ogg
@danalvarez
danalvarez / transition_probabilities.py
Last active May 13, 2024 14:03
Key recursion to calculate n-step transition probabilities in Markov chains
# define the transition probabilities of the Markov chain
TP = [
[0.4, 0.6, 0, 0, 0, 0, 0],
[0.2, 0, 0.8, 0, 0, 0, 0],
[0, 0.4, 0.6, 0, 0, 0, 0],
[0, 0, 0.4, 0, 0.3, 0.3, 0],
[0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0.2, 0, 0, 0.8],
[0, 0, 0, 0, 1, 0, 0]
]