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
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.
@alexlib
alexlib / 00README.rst
Created December 13, 2024 15:53 — forked from GaelVaroquaux/00README.rst
Copy-less bindings of C-generated arrays with Cython

Cython example of exposing C-computed arrays in Python without data copies

The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.

The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy

@alexlib
alexlib / detect_overlapping_spheres.ipynb
Last active September 13, 2024 12:08
Remove background for shadow 3D-PTV and detecting overlapping spheres
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / custom_feature_detection_template_matching.ipynb
Created June 24, 2024 15:40
Customized image segmentation algorithm to find a sphere using cross-correlation and template matching
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / settling_velocity_app.py
Created May 26, 2024 19:38
Streamlit app that estimates settling terminal velocity of a sphere
import streamlit as st
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
def drag_coefficient(Re):
"""Calculate the drag coefficient using the empirical correlation."""
if Re < 1:
return 24 / Re
elif Re < 1000:
@alexlib
alexlib / post_processing_trajectories.ipynb
Created February 28, 2024 14:05
Post processing, linking and plotting in 3D trajectories created by OpenPTV using Flowtracks (aka postptv), pandas and plotly
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / trackpy_4view_spliiter.ipynb
Last active May 24, 2023 17:16
trackpy, pims, matplotlib and imageio to get movie with tracks from particle movies
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / embed_video.tex
Created April 22, 2023 11:01 — forked from FedericoTartarini/embed_video.tex
Embed a video into LaTeX wihout using Flash
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \embedvideo{<poster or text>}{<video file (MP4+H264)>}
% \embedvideo*{...}{...} % auto-play
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[bigfiles]{pdfbase}
\ExplSyntaxOn
\NewDocumentCommand\embedvideo{smm}{
\group_begin:
\leavevmode
@alexlib
alexlib / pivpy_plot_vorticity.ipynb
Created March 28, 2023 20:20
pivpy_plot_vorticity.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.