First, check to see where our current python installation is located:
> which python # And
> which python3
import argparse | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser(description='Easy way to produce plots of\ | |
3D vector fields in python.') | |
parser.add_argument('task', | |
help='task name', | |
type=str) | |
parser.add_argument("-f", '--fileNameTag', | |
help='Appends it to the end of a filename so it can be unique when you plot it', |
# Generates a random string of length k to std out | |
import argparse | |
import string | |
import random | |
def id_generator(size, chars=string.ascii_uppercase \ | |
+ string.digits \ | |
+ string.ascii_lowercase): | |
return ''.join(random.choice(chars) for _ in range(size)) |
import os | |
import argparse | |
def tobits(s): | |
result = [] | |
for c in s: | |
bits = bin(ord(c))[2:] | |
bits = '00000000'[len(bits):] + bits | |
result.extend([int(b) for b in bits]) | |
return result |
#!/usr/bin/env python | |
import os | |
import sys , traceback | |
import argparse | |
import time | |
import SharkEyesCore.startup as startup | |
from django.core.management import execute_from_command_line | |
from django.conf import settings |
Goal -> ClockNoise | |
ClockNoise -> ClockNoise tick tock | |
| tick tock | |
# Calculates the ingridents for each part based on the number gallons | |
# for the total batch. 110% because I was lazy! | |
import argparse | |
parser = argparse.ArgumentParser(description="Easy way to cacluate how much\ | |
'things you need per quanity of kombuhca") | |
parser.add_argument('-b', '--batch', type=float, | |
help='Float - Gallons of desired batch size') |
import matplotlib | |
matplotlib.use('AGG') | |
import os | |
import numpy | |
import xarray as xar | |
from matplotlib import pyplot as plt | |
from matplotlib import colors |
# Just an example it wont outside of the application is was built in | |
# Uses Scipy.io netcdf and 'snetCDF 4 Dataset | |
from scipy.io import netcdf | |
from netCDF4 import Dataset | |
def navy_hycom_download(level='top'): | |
from pl_plot.plotter import HycomPlotter | |
print "NAVY HYCOM DOWNLOAD" |
from __future__ import absolute_import, division, print_function | |
import sys | |
import argparse | |
import numpy as np | |
from netCDF4 import Dataset | |
from mpas_py.mesh import MeshHandler | |
from mpas_py.soundings import read_soundings |