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 / Multi-Pass_WiDIM.ipynb
Created August 26, 2020 05:58 — forked from ErichZimmer/Multi-Pass_WiDIM.ipynb
Multi-pass WiDIM code I use with custom load and save directories.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / Single-Pass.ipynb
Created August 26, 2020 05:56 — forked from ErichZimmer/Single-Pass.ipynb
Single-pass code that allows for custom load and save directory
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / DifferentPlots2Revised.ipynb
Created August 24, 2020 10:29 — forked from ErichZimmer/DifferentPlots2Revised.ipynb
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.
@alexlib
alexlib / DifferentPlots.ipynb
Created August 11, 2020 22:02 — forked from ErichZimmer/DifferentPlots.ipynb
OpenPIV Python flavour different graph outputs using .txt file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / link_trajectories.py
Created April 4, 2020 17:47 — forked from yosefm/link_trajectories.py
Trajectory linking with Flowtracks

From "Options for giving math talks and lectures online" https://news.ycombinator.com/item?id=22539537 :

One option: screencast development of a Jupyter notebook.

Jupyter Notebook supports LaTeX (MathTeX) and inline charts. You can create graded notebooks with nbgrader and/or with CoCalc (which records all (optionally multi-user) input such that you can replay it with a time slider).

Jupyter notebooks can be saved to HTML slides with reveal.js, but if you want to execute code cells within a slide, you'll need to install RISE: https://rise.readthedocs.io/en/stable/

Here are the docs for CoCalc Course Management; Handouts, Assignments, nbgrader: https://doc.cocalc.com/teaching-course-management.html

@alexlib
alexlib / Install
Created November 29, 2019 18:49 — forked from ines/Install
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
@alexlib
alexlib / mapread.c
Created August 31, 2019 10:36 — forked from marcetcheverry/mapread.c
mmap and read/write string to file
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
int main(int argc, const char *argv[])
{
@alexlib
alexlib / derivatives.py
Created July 8, 2019 19:58 — forked from deeplycloudy/derivatives.py
Gradient (4th order accuracy) and laplacian (3rd order accuracy) functions for numpy arrays.
import numpy as np
#4th order accurate gradient function based on 2nd order version from http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/lib/function_base.py
def gradientO4(f, *varargs):
"""Calculate the fourth-order-accurate gradient of an N-dimensional scalar function.
Uses central differences on the interior and first differences on boundaries
to give the same shape.
Inputs:
@alexlib
alexlib / rotate_2d_point.py
Created April 29, 2019 18:33 — forked from LyleScott/rotate_2d_point.py
Rotate X,Y (2D) coordinates around a point or origin in Python
"""
Lyle Scott, III // [email protected]
Multiple ways to rotate a 2D point around the origin / a point.
Timer benchmark results @ https://gist.github.com/LyleScott/d17e9d314fbe6fc29767d8c5c029c362
"""
from __future__ import print_function
import math