Skip to content

Instantly share code, notes, and snippets.

@TheMuellenator
TheMuellenator / main.py
Last active January 24, 2024 20:40 — forked from angelabauer/main.py
Solution for main.py 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 February 2, 2024 13:58 — 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")
#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 December 29, 2023 07:49 — 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