Skip to content

Instantly share code, notes, and snippets.

View questsin's full-sized avatar

Nicholas Manolakos questsin

View GitHub Profile
#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)
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})
#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
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
ionic start myApp blank
ionic start myApp tabs
ionic start myApp sidemenu
ionic start myApp tabs --type ionic1
ionic serve
cd /path/to/my/codebase
git init
git add .
git add -A
git commit
git init project1
cd project1
touch file.txt
git add .
whoami
ip addr show
ip addr show eth0
hostname -i
#port forwarding witn netcat
nc -lp 45678 | nc -lp 45679
nc $ip $port
#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
brew --version
brew update
brew list
$ brew install wget
##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