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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Demo of subplot methods for matplotlib using pyplot only when needed | |
and doing the main plotting on axes objects | |
""" | |
import itertools | |
import numpy as np | |
import matplotlib.pylab as plt |
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
function palette(cmap,varargin) | |
%% palette - Plot the color palette for a given map on x,y in [0,1] | |
% in the current window/axis | |
% Inputs: | |
% cmap - N x 3 array of colors --OR-- a cell array of 1x3 colors | |
% Options/Flags (note the `-` on flags) | |
% -no-label - If specified, will *never* label. Otherwise, will label | |
% for N<=10 | |
% -vert - Plot vertically | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Interact with bash from python | |
ALPHA at best and hasn't been tested in a while | |
""" | |
from __future__ import print_function, unicode_literals | |
import subprocess |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Simple example of calling openSSL from python. Also with base64 set since I | |
will want to store in a text file | |
""" | |
from __future__ import print_function, unicode_literals | |
import subprocess | |
import shlex |
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
#!/usr/bin/env bash | |
############################################################################ | |
################################## Intro ################################### | |
############################################################################ | |
# Example on how to run python inside of bash. Anything that is printed | |
# in the python part is "returned" to bash | |
# | |
# Examples: |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import division, print_function, unicode_literals, absolute_import | |
__version__ = '20180726.0' | |
__status__ = 'beta' | |
import multiprocessing as mp | |
import multiprocessing.dummy as mpd | |
from threading import Thread |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Matplotlib Tips and Demos\n", | |
"\n", | |
"When I first learned Python three years ago, I was often finding myself having to lookup the same thing again and again for Matplotlib. This was back pre-2.0 when there was even more issues (e.g. plotting `NaNs` with masked arrays). \n", | |
"\n", |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Find duplicate files | |
Warning: This has not been thouroughly tested and is missing many | |
features including exlucsions, error handling, parallelism, etc. | |
This is barebones | |
Process: |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Duplicate file finder. Finds dupe files by comparing the following attributes. | |
Matching size is nessesary but very, very far from sufficient. Still, it is very | |
fast so we use that to cut out a lot of files. | |
* size | |
* Obviously not at all robust but a nessesary | |
* CRC checksum |
OlderNewer