Python Code Snippets
Print the System Path of This Python Executable
This is like running which python
in a Unix-like terminal, except Python will be more honest with where it's located.
Hash a String with SHA-256
Using hash_string('hi')
returns '8f434346648...'
.
Plot a Circle on a 2D Plane
Using matplotlib
to plot a blue circle on a two-dimensional plane.
Plot Complex Numbers on 2D Plane
Using matplotlib
and numpy
to plot a list of imaginary numbers on a two-dimensional plane.