The VectorPlot class is just a helper to container the arrays and plotting logic. All you should need to do is add @plot_me
above the estimate_next_pos
function. You may need to tweak the matplotlib calls (and remove %matplotlib inline
) if you aren't using this in an ipython notebook. You'll need to install numpy and matplotlib as well: pip install matplotlib numpy
.
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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
#init-hook= | |
# Add files or directories to the blacklist. They should be base names, not |
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
#!/bin/bash | |
#set -x #uncomment to watch commands execute | |
#install the latest version of aws cli via pip -- pip install awscli -- note this install to /usr/local/bin and there maybe an old version of awscli in /usr/bin | |
#run $aws configure to set access key, secret key and region, script require output type to be text | |
#Finally, install ntpd -- apt-get install ntp -- because it often isn't install and if your server's clock is not sync'd with amazon's aws cli commands fail | |
#Run this via cron every night at 12:05 am -- crontab -e -- 0 5 * * * /path/to/backupEbs.sh >> /var/log/backup.log 2>&1 | |
NUMBER_TO_KEEP=7 | |
EBS_VOLUMES=( vol-XXXXX vol-XXXXX vol-XXXXX vol-XXXXX ) |
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 matplotlib as mpl | |
num_colors = len(values) | |
cm = mpl.cm.get_cmap(name='YlGnBu_r') | |
currentColors = [cm(1.*i/num_colors) for i in range(num_colors)] |
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
pip freeze | cut -d = -f 1 | xargs -n 1 pip search | grep -B2 'LATEST:' |
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 os, subprocess | |
from optparse import OptionParser | |
def main(): | |
""" | |
Takes a file with urls on separate lines and downloads them using aria2c in small batches. | |
Useful if you need to download a number of links with more characters in the url than will fit in one command. | |
""" | |
parser = OptionParser() | |
parser.add_option("-i", "--input", dest='input_file') |