Skip to content

Instantly share code, notes, and snippets.

View montali's full-sized avatar
HUSTLING

Simone Montali montali

HUSTLING
View GitHub Profile
@montali
montali / stack_queue.py
Created December 1, 2021 11:43
Ultra-basic stack and queue implementation for i posteri
class LinkedListNode:
def __init__(self, value=None):
self.value = value
self.next = None
def __repr__(self) -> str:
return str(self.value)
class Stack:
@montali
montali / birthdays.py
Created October 8, 2021 22:53
Flat180's big average birthday party
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),
@montali
montali / spark-do.md
Created September 20, 2021 09:51
Running Apache Spark on DigitalOcean
  • Running Apache Spark on DigitalOcean

  • 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:

@montali
montali / CloseFinder
Created July 15, 2021 12:37
AppleScript to close the Finder windows
tell application "Finder" to close every window
@montali
montali / commitlist
Created June 23, 2021 08:14
Just a normal day in the life of a backend dev
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
@montali
montali / vaccine-booker.py
Last active June 15, 2021 12:57
Vaccine booker built on SeleniumPy. Keeps refreshing CupWeb until a vaccine is available.
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
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()
import numpy as np
class InitialPointShapeException(Exception):
pass
class NoSimplexDefinedException(Exception):
pass
@montali
montali / conda-jupyter-create.sh
Created April 2, 2021 09:46
Creates a new conda environment and adds it to Jupyter
#!/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
@montali
montali / vscode_settings.json
Created November 10, 2020 08:44
My settings for VSCode
{
"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,