Skip to content

Instantly share code, notes, and snippets.

@TheMuellenator
TheMuellenator / main.py
Last active June 17, 2024 14:29 — forked from angelabauer/main.py
Day 40 L354 - Solution for Customer Acquisition for the Flight Club
import sheety
print("Welcome to Angela's Flight Club.\n \
We find the best flight deals and email them to you.")
first_name = input("What is your first name? ").title()
last_name = input("What is your last name? ").title()
email1 = "email1"
email2 = "email2"
@TheMuellenator
TheMuellenator / index.html
Last active October 28, 2024 04:44 — forked from angelabauer/index.html
Day 60 L458 - Simple HTML Form Revision
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form>
<label>Name</label>
<input type="text" placeholder="name">
class Assignment {
func fibonacci(n: Int) {
// Write your code here 👇
var n1 = 0
var n2 = 1
if n == 0 {
print("Invalid")
@TheMuellenator
TheMuellenator / main.py
Last active October 26, 2024 01:06 — forked from angelabauer/main.py
Day 38 Step 5 L335 - Solution
#No Authentication
sheet_response = requests.post(sheet_endpoint, json=sheet_inputs)
#Basic Authentication
sheet_response = requests.post(
sheet_endpoint,
json=sheet_inputs,
auth=(
YOUR USERNAME,
YOUR PASSWORD,
class FlightData:
def __init__(self, price, origin_city, origin_airport, destination_city, destination_airport, out_date, return_date):
self.price = price
self.origin_city = origin_city
self.origin_airport = origin_airport
self.destination_city = destination_city
self.destination_airport = destination_airport
self.out_date = out_date
self.return_date = return_date
from pprint import pprint
import requests
SHEETY_PRICES_ENDPOINT = YOUR SHEETY PRICES ENDPOINT URL
class DataManager:
def __init__(self):
self.destination_data = {}
sp = spotipy.Spotify(
auth_manager=SpotifyOAuth(
scope="playlist-modify-private",
redirect_uri="http://example.com",
client_id=YOUR UNIQUE CLIENT ID,
client_secret= YOUR UNIQUE CLIENT SECRET,
show_dialog=True,
cache_path="token.txt"
)
)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="https://fonts.googleapis.com/css2?family=Raleway" rel="stylesheet">
<link rel="stylesheet" href="../static/css/styles.css">
</head>
<body>
<div class="wrapper">
@TheMuellenator
TheMuellenator / main.py
Last active October 25, 2024 09:56 — forked from angelabauer/main.py
Day 61 L464 - Installing Flask-WTF
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template('index.html')
@TheMuellenator
TheMuellenator / conditionals.py
Created January 14, 2020 11:49
Python Conditional Statement Coding Exercise Solution
def is_it_prime(n):
#TODO: Write your code here.
for i in range (2, n):
if n % i == 0:
return False
else:
return True