Skip to content

Instantly share code, notes, and snippets.

View Maghoumi's full-sized avatar

Mehran Maghoumi Maghoumi

View GitHub Profile
@mattbell87
mattbell87 / remote-wsl.md
Last active September 1, 2023 22:17
VSCode Remote: Connect to WSL2 from another machine
View remote-wsl.md
@alimanfoo
alimanfoo / find_runs.py
Created November 5, 2017 23:53
Find runs of consecutive items in a numpy array.
View find_runs.py
import numpy as np
def find_runs(x):
"""Find runs of consecutive items in an array."""
# ensure array
x = np.asanyarray(x)
if x.ndim != 1:
raise ValueError('only 1D array supported')
@gre
gre / easing.js
Last active September 25, 2023 22:01
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
View easing.js
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {