This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import site | |
import os | |
import pathlib | |
# Big thanks to Match on StackOverflow for helping me with this | |
# see https://stackoverflow.com/a/48713998/5614280 | |
# This is some cool hackery to overwrite the default functionality of | |
# the builtin print function within you're entire python environment | |
# to display the file name and the line number as well as always flush | |
# the output. It works by creating a custom user script and placing it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Running this on https://google.com returns expected behavior: | |
# Chrome prompts you to save your credentials | |
# This also works if you spin up an http server i.e: `python -m SimpleHTTPServer` | |
# and run it in your console. | |
# However running on https://localhost results in a silent failure | |
# where the success function fires but you are not prompted. | |
# Easy way to spin up a simple https server is: https://gist.github.com/dergachev/7028596 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python Script I wrote to perform the gram schmidt process on a set of vectors | |
import numpy as np | |
def get_inverse_mag_prod(v): | |
return v * (1 / (sum(list(map(lambda a: a ** 2,v))) ** 0.5)) | |
def rounder(v): | |
return list(map(lambda a: round(a,6),v)) | |