On Big VM terminal:
After a successful ssh
connection to your BigVM instance from a MoVE terminal do the following only once (or just download and run setup-jupyter.sh
):
1- Go to Python 3 environment
cd ~/env3
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
On Big VM terminal:
After a successful ssh
connection to your BigVM instance from a MoVE terminal do the following only once (or just download and run setup-jupyter.sh
):
1- Go to Python 3 environment
cd ~/env3
wget link -O file_name
wget zip_link -O file_name
unzip file_name -d folder_name
wget raw_link -O file_name
git clone https_link folder_name
You need to do the followings only once when you connect to your BigVM instance for the first time.
Login to MoVE using your authcate and password.
Go to Desktops Tab and select Linux Template. This will take you to an Ubuntu Desktop screen. We call this window MoVE Desktop hereafter.
This desktop is your jump host from which you will be accessing the BigVM server (you cannot connect directly without using MoVE in the middle).
git clone https://gist.github.com/cc7c8cec1188fd387cc2e3ec0f4fed7a.git wordcount
and then cd wordcount
.cat *.txt
chmod +x *.scala
cat baa.txt | ./mapper.scala
cat baa.txt | ./mapper.scala | ./reducer.scala
git clone https://gist.github.com/cc7c8cec1188fd387cc2e3ec0f4fed7a.git wordcount
and then cd wordcount
.hadoop fs -mkdir -p /wc/in
#! /bin/bash | |
IP="$(hostname -I | cut -d' ' -f1)" | |
THIS_USER="$(whoami)" | |
zeppelin-daemon.sh start | |
echo | |
echo | |
echo Please do the following: | |
echo | |
echo 1- On MoVE Terminal issue: | |
echo " ssh -N -f -L localhost:8080:localhost:8080 ${THIS_USER}@${IP}" |
The Project Gutenberg EBook of The Adventures of Sherlock Holmes | |
by Sir Arthur Conan Doyle | |
(#15 in our series by Sir Arthur Conan Doyle) | |
Copyright laws are changing all over the world. Be sure to check the | |
copyright laws for your country before downloading or redistributing | |
this or any other Project Gutenberg eBook. | |
This header should be the first thing seen when viewing this Project | |
Gutenberg file. Please do not remove it. Do not change or edit the |
import json | |
json_file = "file.json" | |
with open(json_file, 'r') as read_file: | |
data = json.load(read_file) | |
with open(json_file+'l', 'w') as write_file: | |
for entry in data: | |
json.dump(entry, write_file) | |
write_file.write('\n') |
# ref: https://pydash.readthedocs.io/en/latest/ | |
import pydash | |
# Arrays | |
pydash.flatten([1, 2, [3, [4, 5, [6, 7]]]]) | |
# [1, 2, 3, [4, 5, [6, 7]]] | |
pydash.flatten_deep([1, 2, [3, [4, 5, [6, 7]]]]) | |
# [1, 2, 3, 4, 5, 6, 7] |