Given data x, upper, and lower, you can plot the area between the two curves lower & upper using this code:
fill_between(x, upper, lower, facecolor='#ffcc33', alpha=0.4)
Given data x, upper, and lower, you can plot the area between the two curves lower & upper using this code:
fill_between(x, upper, lower, facecolor='#ffcc33', alpha=0.4)
First, let's upgrade the Amazon Linux setup to include Python 2.7.6. Most of these instructions from excellent article by Kreutzberger at http://www.lecloud.net/post/61401763496/install-update-to-python-2-7-and-latest-pip-on-ec2.
Unfortunately Amazon Linux 3.4 AMIs still ship with Python 2.6 which makes it impossible to run many Python apps. Also the installation and update/upgrade of Pip through yum python-pip fails and puts packages into the old 2.6 lib folder.
Here is my solution to upgrade to Python 2.7 including the latest Pip & Virtualenv. Just copy & paste line by line:
# install build tools
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y
for collection in $scope.collections
collection.key_length = Object.keys(collection.keys).length
var first_key
for k of collection.keys
first_key = k
break
collection.selected_key = collection.keys[first_key]
Generate a UUID using UUIDTools:
UUIDTools::UUID.timestamp_create().to_s
import cPickle as pickle
with open('%s.dat' $ bucket_id, 'wb') as outfile:
pickle.dump(meta, outfile, protocol=pickle.HIGHEST_PROTOCOL)
Suppose you have an array of multiple (i.e., more than two) ruby arrays,
ary = [[1,2,3,4], [4,5,6,7], [8,9,10,11]]
To zip together these arrays in an element-wise fashion, we can use the array's zip
method:
zipped_ary = ary[0].zip(*ary.last(ary.size-1)) # => [[1,4,8], [2,5,9], [3,6,10], [4,7,22]]
After installing the latest & greatest:
To have launchd start postgresql at login:
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
Then to load postgresql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Upgrading to ruby 2.0:
$ rvm remove 2.0.0 # get rid of unsuccessful installation
$ rvm get head --autolibs=3 # get the latest RVM and build required libs
$ rvm requirements # just in case, install all other required stuff
$ rvm install ruby-2.0.0
$ rvm --default use ruby-2.0.0