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
polynoteuser02@polynotevm02:~$ sudo docker pull greglinscheid/polynote | |
polynoteuser02@polynotevm02:~$ sudo docker run -p 8192:8192 -v $HOME/poly-notes:/usr/src/app/polynote/notebooks — name=polynote -d -t greglinscheid/polynote:latest | |
polynoteuser02@polynotevm02:~$ sudo docker logs -f polynote |
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
# Setup the Docker Repository | |
polynoteuser02@polynotevm02:~$ sudo apt-get update | |
polynoteuser02@polynotevm02:~$ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
polynoteuser02@polynotevm02:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
polynoteuser02@polynotevm02:~$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
# Install Docker CE | |
polynoteuser02@polynotevm02:~$ sudo apt-get update | |
polynoteuser02@polynotevm02:~$ sudo apt-get install docker-ce |
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
###################################################################################### | |
# Set the configurations. Here's what you need: | |
## 1.) Client ID (a.k.a Application ID) | |
## 2.) Client Secret (a.k.a. Application Secret) | |
## 3.) Directory ID | |
## 4.) File System Name | |
## 5.) Storage Account Name | |
## 6.) Mount Name | |
###################################################################################### | |
configs = {"fs.azure.account.auth.type": "OAuth", |
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
####################################################################### | |
# This is Kyle's Python script for Data Quality Assessment | |
# Assume df = your dataframe | |
# Replace "df" with "[Your Dataframe]" | |
####################################################################### | |
####################################################################### | |
# Check summary statistics | |
####################################################################### | |
df.describe() |
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
############################################################################## | |
# Tesseract Optical Character Recognition (OCR) Engine of Tesco Receipts (Ep.1) | |
# Author: @Kyle Akepanidtaworn | |
# Source Code: Using the Tesseract OCR engine in R (2018) | |
# Created Date: 5/19/2019 | |
############################################################################## | |
# install.packages("tesseract") | |
library(tesseract) | |
eng <- tesseract("eng") |
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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"location": { | |
"type": "string" | |
}, | |
"storageAccountName": { | |
"type": "string" | |
}, |
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
az vm get-instance-view \ | |
--name myVM \ | |
--resource-group myResourceGroup \ | |
--output table |
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
az vm create \ | |
--name myVM \ ### This name identifies the VM in Azure. It also becomes the VM's internal hostname, or computer name. | |
--resource-group MyResourceGroup \ ### The resource group, or the VM's logical container, is named MyResourceGroup. | |
--image UbuntuLTS \ ### UbuntuLTS specifies the Ubuntu 18.04 LTS VM image. | |
--location southeastasia \ | |
--size Standard_DS2_v2 \ ### Standard_DS2_v2 refers to the size of the VM. This size has two virtual CPUs and 7 GB of memory. | |
--admin-username kyleake \ ### specify "kyleake" as the username for the VM. The username can be whatever you want. | |
--generate-ssh-keys ### create an SSH key pair to enable you to log in to the VM. |
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 Libraries | |
# --------------------------------------------------------------------------------------------- | |
from pyspark.sql.functions import col, floor, translate, round | |
from pyspark.ml import Pipeline | |
from pyspark.ml.feature import VectorAssembler, OneHotEncoder | |
from pyspark.ml.regression import LinearRegression | |
# --------------------------------------------------------------------------------------------- | |
# Load Input Data with PySpark |
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
# -------------------------------------------------------------------------------- | |
# Introducing Spark DataFrames | |
# -------------------------------------------------------------------------------- | |
# Create some Spark DFs | |
df = spark.range(1000).toDF("number") | |
display(df) | |
# Summary statistics | |
df.describe().show() |