This file contains hidden or 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
#https://ehmatthes.github.io/pcc/cheatsheets/README.html | |
#$ python --version | |
name = input("What's your name? ") | |
print("Hello, " + name + "!") | |
age = input("How old are you? ") | |
age = int(age) | |
pi = input("What's the value of pi? ") | |
pi = float(pi) |
This file contains hidden or 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
from pyspark import SparkContext | |
from pyspark.streaming import StreamingContext | |
from pyspark.streaming.kafka import KafkaUtils | |
import json | |
sc = SparkContext(appName="PythonSparkStreamingKafka_RM_01") | |
sc.setLogLevel("WARN") | |
kafkaStream = KafkaUtils.createStream(ssc, 'cdh57-01-node-01.moffatt.me:2181', 'spark-streaming', {'twitter':1}) |
This file contains hidden or 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
#Keras is a high-level neural networks API, written in Python and capable of running on top of #TensorFlow, CNTK, or Theano. It was developed with a focus on enabling fast experimentation. Being #able to go from idea to result with the least possible delay is key to doing good research. | |
import pandas as pd | |
import keras | |
from keras.models import Sequential | |
from keras.layers import * | |
import os | |
#layers | |
#keras.layers.Dense |
This file contains hidden or 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 pixiedust | |
import pixiedust_node | |
inspections = pixiedust.sampleData("https://opendata.lasvegasnevada.gov/resource/86jg-3buh.csv") | |
import pyspark | |
# Create a SparkContext in local mode | |
sc = pyspark.SparkContext("local") | |
# Create a SqlContext from the SparkContext |
This file contains hidden or 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
ionic start myApp blank | |
ionic start myApp tabs | |
ionic start myApp sidemenu | |
ionic start myApp tabs --type ionic1 | |
ionic serve |
This file contains hidden or 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
cd /path/to/my/codebase | |
git init | |
git add . | |
git add -A | |
git commit | |
git init project1 | |
cd project1 | |
touch file.txt | |
git add . |
This file contains hidden or 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
whoami | |
ip addr show | |
ip addr show eth0 | |
hostname -i | |
#port forwarding witn netcat | |
nc -lp 45678 | nc -lp 45679 | |
nc $ip $port |
This file contains hidden or 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
#Kubernetes | |
# Can run in bear metal or cloud. | |
# Amazon EKS | |
# | |
#Minikube for locahost developer | |
#Deployments > jobs > services | |
#Labels, selectors, and namespaces | |
#Controllers > Nodes > Pods > containers > docker |
This file contains hidden or 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
brew --version | |
brew update | |
brew list | |
$ brew install wget |
This file contains hidden or 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
##Amazon Elastic Container Service (Amazon ECS) | |
Docker client > VirtualBox > Linux VM > Docker Server | |
docker --version | |
docker logs $containername | |
docker info | |
docker images | |
docker network | |
docker ps |