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/local/bin/env python3 | |
import pandas as pd | |
from prophet import Prophet | |
from prophet.plot import plot_plotly, plot_components_plotly | |
import ssl | |
ssl._create_default_https_context = ssl._create_stdlib_context |
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 python3 | |
import time | |
import curses | |
import os | |
message = "Warning - Production" | |
loading = True | |
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 python3 | |
import time | |
import curses | |
import os | |
import threading | |
import subprocess | |
def waitforthis(thread): |
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 python3 | |
nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11] | |
# filter for prime numbers | |
prime = list(filter(lambda number: all(number % i != 0 for i in range(2, int(number**0.5) + 1)), nums)) | |
print(prime) | |
# cube them | |
cubed = list(map(lambda x: x**3, prime)) |
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 python3 | |
from email.message import EmailMessage | |
import ssl | |
import smtplib | |
# create pw here https://myaccount.google.com/u/4/apppasswords after you enable 2-factor | |
password = "SOMEPASSWORD" | |
sender = "[email protected]" |
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 python3 | |
import requests, json | |
jsn = {"model": "llama3","prompt": "hi","stream": False} | |
response = requests.post('http://localhost:11434/api/generate', json=jsn) |
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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log notice; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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/python3 | |
import roman | |
errmsg = '\nOnly whole numbers or Roman Numerals between 1 and 3999 excepted\n' | |
number = input('Enter a number between 1 and 3999 in either Integer or Roman Numeral format> ') | |
if number.isalpha(): | |
try: | |
print(roman.fromRoman(number.upper())) | |
except roman.InvalidRomanNumeralError: |