Skip to content

Instantly share code, notes, and snippets.

View alexlib's full-sized avatar
:octocat:
Working

Alex Liberzon alexlib

:octocat:
Working
View GitHub Profile
@alexlib
alexlib / untitled14.ipynb
Last active October 2, 2025 12:13
Self-tutoring demo of reservoir computing using the list sorting algorithm
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / nhist.py
Created September 22, 2025 15:03
normalized histogram, nhist in Matlab-like and Numpy way
import numpy as np
from matplotlib import pyplot as plt
from typing import Optional, Tuple, Union
def nhist_scipy(
y: np.ndarray,
bins: Union[int, np.ndarray] = 20,
plot: bool = True,
density: bool = True,
kde: bool = False
@alexlib
alexlib / Dockerfile
Created August 25, 2025 21:41 — forked from Moosems/Dockerfile
Tkinter Docker App Example
FROM ubuntu:20.04 as builder
FROM python:3.10.7
# Create a user to run the application
RUN apt-get update && \
apt-get -y install sudo
RUN useradd -ms /bin/bash docker && echo "docker:docker" | chpasswd && adduser docker sudo
@alexlib
alexlib / visualize_markers.ipynb
Created August 3, 2025 08:19
Convert proPTV markers to OpenPTV calibration setup
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / Readme.md
Created April 26, 2025 06:38
John D'Errico's inpaint in 3D with Python counterexample using Scipy and tests. The Matlab function is from pivSuite v0.8.3
test_inpaint_equivalence.py
..
----------------------------------------------------------------------
Ran 2 tests in 1.908s

OK
(.conda) user@user-NUC8i7BEH:~/Documents/repos/OpenOpticalFlow_PIV_v1$ /home/user/Documents/repos/OpenOpticalFlow_PIV_v1/.conda/bin/python /home/user/Documents/repos/OpenOpticalFlow_PIV_v1/test_inpaint_equivalence.py
..
----------------------------------------------------------------------
@alexlib
alexlib / trajectories_to_eulerian_average_field.py
Last active April 12, 2025 18:44
Flowtracks trajectories to Eulerian average field using RBF interpolator
import numpy as np
from scipy.interpolate import RBFInterpolator
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
def process_frames_average(particles, N, corner_m, fps, max_frames=None):
"""
Process multiple frames to create average velocity maps.
Args:
@alexlib
alexlib / trajectories_to_txt_for_Paraview.py
Last active April 12, 2025 18:31
trajectories to vtk
import pandas as pd
from flowtracks.scene import Scene
import numpy as np
h5_name = r'../corner_51.h5'
particles = Scene(h5_name)
ids = particles.trajectory_ids()
dataframes = []
@alexlib
alexlib / bundle_adjustment_scipy.ipynb
Created March 14, 2025 18:01 — forked from nmayorov/bundle_adjustment_scipy.ipynb
Large scale bundle adjustment in scipy
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.
@alexlib
alexlib / simple_idw.ipynb
Created December 24, 2024 20:52 — forked from Majramos/simple_idw.ipynb
Simple inverse distance weighted (IDW) interpolation with python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.