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
@ines
ines / Install
Last active September 21, 2023 17:14
Streamlit + spaCy
pip install streamlit
pip install spacy
python -m spacy download en_core_web_sm
python -m spacy download en_core_web_md
python -m spacy download de_core_news_sm
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active May 19, 2025 08:58
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@yosefm
yosefm / link_trajectories.py
Created April 2, 2020 22:38
Trajectory linking with Flowtracks
@serazing
serazing / xr_lowess.py
Last active October 24, 2024 03:25
Lowess for xarray
import numpy as np
import numba
import xarray as xr
@numba.jit(nopython=True)
def lowess_1d(y, x, alpha=2. / 3., it=10):
"""lowess(x, y, f=2./3., iter=3) -> yest
Lowess smoother: Robust locally weighted regression.
The lowess function fits a nonparametric regression curve to a scatterplot.
The arrays x and y contain an equal number of elements; each pair
@IlievskiV
IlievskiV / calculate_circle_area.ipynb
Created June 7, 2020 23:52
How to numerically calculate the area of a circle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndreasTsikri
AndreasTsikri / Hardy Cross Method-Changed Github.ipynb
Last active August 28, 2020 15:23 — forked from alexlib/hardy_cross_pipe_network.ipynb
Hardy cross method of solution for the pipeline network problem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ErichZimmer
ErichZimmer / DifferentPlots2Revised.ipynb
Last active August 24, 2020 10:30
Second version of the OpenPIV analysis code that provides more raw results. Furthermore, this code was written in a different and more simple way compared to the previous version in case if the previous analysis code doesn't execute properly.
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.
@yangyushi
yangyushi / pdist_pbc.py
Created November 2, 2020 14:36
Different ways to get pairwise distance in cubic box with PBC in Python
"""
Different functions to get pairwise distance in cubic box with PBC
Args:
positions: the positions of particles, shape (N, dim)
box (int or float): the size of the box
Return:
np.ndarray: the pair-wise distances, shape (N, N)
"""
@FedericoTartarini
FedericoTartarini / embed_video.tex
Last active April 2, 2025 04:46
Embed a video into LaTeX wihout using Flash
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this code was copied from https://tex.stackexchange.com/a/516102
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[bigfiles]{pdfbase}
\ExplSyntaxOn
\NewDocumentCommand\embedvideo{smm}{
\group_begin:
\leavevmode
\tl_if_exist:cTF{file_\file_mdfive_hash:n{#3}}{