Skip to content

Instantly share code, notes, and snippets.

View saurabhr's full-sized avatar

Saurabh Ranjan saurabhr

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.
@saurabhr
saurabhr / legend2d.ipynb
Created August 14, 2024 22:31 — forked from thesamovar/legend2d.ipynb
2D Legend for matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saurabhr
saurabhr / rotate_2d_point.py
Created August 25, 2022 20:02 — forked from LyleScott/rotate_2d_point.py
Rotate X,Y (2D) coordinates around a point or origin in Python
"""
Lyle Scott, III // lyle@ls3.io
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
@saurabhr
saurabhr / bashsnippets.sh
Created August 18, 2021 22:57 — forked from megawertz/bashsnippets.sh
Some basic bash snippets I use to introduce shell scripting to my Linux class.
#!/bin/bash
# viewing environment variables
echo "The value of the home variable is: "
echo $HOME
# issue a command
echo "The output of the pwd command is: "
pwd