Skip to content

Instantly share code, notes, and snippets.

View aliaksei135's full-sized avatar

Aliaksei Pilko aliaksei135

View GitHub Profile
@aliaksei135
aliaksei135 / vmc.ipynb
Created March 20, 2024 16:58
Rough calculation of proportion of VMC
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aliaksei135
aliaksei135 / ftz_sensor_coverage_reliability.ipynb
Last active February 15, 2024 10:27
A simple bayesian model for assessing system level coverage for a network of sensors
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
[
{
"id": "document",
"version": "1.0"
},
{
"id": "e3595efd-6aed-428b-9dea-4a1e96be2cc9.log",
"availability": "2022-07-07T16:19:49Z/2022-07-07T16:47:19Z",
"position": {
"epoch": "1970-01-01T00:00:00Z",
@aliaksei135
aliaksei135 / log2czml.py
Created October 5, 2022 19:40
Convert ArduPilot DataFlash logs to CZML files. mavlogdump.py must be included in the same dir as this script.
import json
import os
import pandas as pd
import geopandas as gpd
import numpy as np
from uuid import uuid4
import datetime as dt
import subprocess
from glob import glob
@aliaksei135
aliaksei135 / aaline.py
Created November 2, 2021 13:41
Xiaolin Wu's anti-aliased line algorithm in Python3 JIT'd with numba
import numpy as np
from numba import jit
# Reference: https://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm#Algorithm
@jit(nopython=True, nogil=True, cache=True, fastmath=True)
def ipart(x):
return np.floor(x)
@aliaksei135
aliaksei135 / GeoJSON2GPXReverser.py
Created October 20, 2021 13:44
A simple script to reverse LineStrings from GeoJSON and export as GPX files
import sys
import geopandas as gpd
import shapely.geometry as sg
import glob
if __name__ == '__main__':
path = sys.argv[1]
files = glob.glob(path + '**/*.geojson', recursive=True)
for file in files:
@aliaksei135
aliaksei135 / scratch.py
Created June 28, 2021 18:49
Email Plus Addressing Cleaner
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit

Keybase proof

I hereby claim:

  • I am aliaksei135 on github.
  • I am aliakseipilko (https://keybase.io/aliakseipilko) on keybase.
  • I have a public key whose fingerprint is 3238 9670 FD0F 7688 A43E 944F E804 E94B 2711 1FCF

To claim this, I am signing this object: