-
To run Apache Spark on DO, first create a Ubuntu LTS droplet.
-
Install Python and Java:
sudo apt update && sudo apt install -y openjdk-8-jdk-headless python
-
Download the Spark package:
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
class LinkedListNode: | |
def __init__(self, value=None): | |
self.value = value | |
self.next = None | |
def __repr__(self) -> str: | |
return str(self.value) | |
class Stack: |
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 datetime | |
birthdays = { | |
"Simmy": datetime.date(2021, 10, 1), | |
"Mike": datetime.date(2021, 9, 9), | |
"Isa": datetime.date(2021, 10, 6), | |
"Ava": datetime.date(2021, 12, 29), | |
"Wanik": datetime.date(2021, 2, 27), | |
"Riley": datetime.date(2021, 2, 3), | |
"Evan": datetime.date(2021, 10, 24), |
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
tell application "Finder" to close every window |
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
cb17089 - Simone Montali, 3 minutes ago : Added artisti ACF | |
c47d560 - Simone Montali, 17 minutes ago : Added newline | |
cf159e6 - Simone Montali, 27 minutes ago : Added ACFG for about | |
61ceefa - Simone Montali, 2 hours ago : Fixed artist gallery bug | |
8170ec0 - Simone Montali, 25 hours ago : T'APPOSTO | |
2f5b72f - Simone Montali, 25 hours ago : Apposto | |
a884263 - Simone Montali, 25 hours ago : pls work | |
f509b17 - Simone Montali, 25 hours ago : Description sstill not working | |
7a3b1fb - Simone Montali, 25 hours ago : Artist gallery ahd a bug | |
81d414e - Simone Montali, 2 days ago : Added description |
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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import Select | |
from selenium.webdriver.support import expected_conditions as ec | |
from selenium.webdriver.firefox.options import Options | |
from telegram import ParseMode | |
from telegram.ext import Updater, CommandHandler | |
from time import sleep, time |
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 | |
from prophet import Prophet | |
from art import * | |
import NelderMead | |
# We first import the historical data from CSV | |
historical_data = pd.read_csv('all_stocks_5yr.csv') | |
historical_data = historical_data.dropna() |
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 numpy as np | |
class InitialPointShapeException(Exception): | |
pass | |
class NoSimplexDefinedException(Exception): | |
pass |
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
#!/usr/bin/env bash | |
source /opt/anaconda3/etc/profile.d/conda.sh | |
conda activate my_env | |
conda create --name $1 python=3.9 | |
conda activate $1 | |
conda install -c anaconda ipykernel | |
python -m ipykernel install --user --name=$1 |
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
{ | |
"terminal.integrated.fontFamily": "Meslo LG M for Powerline", | |
"editor.suggestSelection": "first", | |
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", | |
"workbench.iconTheme": "Monokai Pro Icons", | |
"python.jediEnabled": false, | |
"files.exclude": { | |
"**/.classpath": true, | |
"**/.project": true, | |
"**/.settings": true, |
NewerOlder