a helpful primer for users sick of git's poorly-named commands
I've used Git since 2011, and this is the stuff that I've always had to Google to remember. I hope it helps you not hate Git so much.
| <html> | |
| <!-- See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html --> | |
| <head> | |
| <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"></script> | |
| <style> | |
| #image-map { | |
| width: 100%; | |
| height: 300px; | |
| border: 1px solid #ccc; | |
| margin-bottom: 10px; |
This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].
First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as
| #!/bin/bash -ex | |
| if [ "$(cat /mnt/var/lib/info/instance.json | jq -r .isMaster)" == "true" ]; then | |
| # Install Git | |
| sudo yum -y install git | |
| # Install Maven | |
| wget -P /tmp http://apache.mirrors.spacedump.net/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz | |
| sudo mkdir /opt/apache-maven | |
| sudo tar -xvzf /tmp/apache-maven-3.3.3-bin.tar.gz -C /opt/apache-maven |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Dropout, Activation, Flatten | |
| from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
| from keras.layers.normalization import BatchNormalization | |
| #AlexNet with batch normalization in Keras | |
| #input image is 224x224 | |
| model = Sequential() | |
| model.add(Convolution2D(64, 3, 11, 11, border_mode='full')) |
| #!/usr/bin/env python | |
| """Sample Google Cloud Storage API client. | |
| Based on <https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples>, | |
| but removed parts that are not relevant to the Cloud Storage API. | |
| Assumes the use of a service account, whose secrets are stored in | |
| $HOME/google-api-secrets.json""" |
| TEST_ARRAY1 = [2,5,1,3,4] | |
| def bubblesort(unordered_list): | |
| """ | |
| Bubble the largest element to the right | |
| Complexity: | |
| - Best Case = O(n) | |
| - Worst Case = O(n^2) | |
| """ |
| IPython Installation | |
| 1. Install Git | |
| 1. sudo apt-get install git | |
| 2. Install IPython from GitHub server | |
| 1. git clone --recursive https://github.com/ipython/ipython.git (this clones the git repo into a directory called ‘ipython’ located in the directory you run the command from) | |
| 3. Run the IPython setup script | |
| 1. cd into the ‘ipython’ directory created in the previous step | |
| 2. sudo python setup.py install | |
| 4. Set up a self-signed certificate for SSL (still results in warning in the browser but allows for SSL) |
| function scroll_to(splash, x, y) | |
| local js = string.format( | |
| "window.scrollTo(%s, %s);", | |
| tonumber(x), | |
| tonumber(y) | |
| ) | |
| return splash:runjs(js) | |
| end |