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
public class IntLinkedList { | |
public class IntNode { | |
public int item; | |
private IntNode next; | |
public IntNode(int i, IntNode n) { | |
item = i; | |
next = n; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pandas as pd | |
import numpy as np | |
# download data for example | |
from sklearn.datasets.california_housing import fetch_california_housing | |
d = fetch_california_housing() | |
df = pd.DataFrame(d['data'], columns=d['feature_names']) |
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 pyspark | |
from pyspark import SparkContext | |
from pyspark.sql import SQLContext | |
from pyspark.sql import functions as F | |
from pyspark.sql import types as T | |
from pyspark.sql import Window | |
sc = SparkContext() | |
sqlc = SQLContext(sc) |
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 | |
from pathlib import Path | |
from subprocess import Popen | |
import boto3 | |
import zipfile | |
# This script downloads all files from `download_bucket` to the ec2 instance (specified temp dir), | |
# unzips them on the instance | |
# creates the output bucket, | |
# uploads the unzipped file to the new bucket |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# need aws commandline interface installed (do "pip install awscli") | |
# need aws credentials set-up | |
# usage: start-tunnel.sh <INSTANCE-NAME> | |
instance_name=$1 | |
key_name=$(aws ec2 \ |