Skip to content

Instantly share code, notes, and snippets.

@TheMuellenator
TheMuellenator / main.py
Last active March 16, 2025 15:25 — 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,
<!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 / randomisation.swift
Last active February 24, 2025 20:45
iOS repl.it - Randomisation Challenge Solution
let alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
//The number of letters in alphabet equals 26
var password = alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)] + alphabet[Int.random(in: 0...25)]
print(password)
@TheMuellenator
TheMuellenator / functions2.swift
Last active February 15, 2025 09:01
iOS repl.it - Functions 2 Challenge Solution
//Don't change this code:
func calculator() {
let a = Int(readLine()!)! //First input
let b = Int(readLine()!)! //Second input
add(n1: a, n2: b)
subtract(n1: a, n2: b)
multiply(n1: a, n2: b)
divide(n1: a, n2: b)
@TheMuellenator
TheMuellenator / functions1.swift
Last active February 15, 2025 08:49
iOS repl.it - Functions 1 Challenge Solution
print("Starting map")
start()
//4 steps right and 5 steps down.
right()
right()
right()
right()
class Assignment {
func fibonacci(n: Int) {
// Write your code here 👇
var n1 = 0
var n2 = 1
if n == 0 {
print("Invalid")
@TheMuellenator
TheMuellenator / structures.swift
Last active February 12, 2025 06:30
iOS repl.it - Structures Challenge Solution
// Define a struct
struct User {
var name: String
var email: String?
var followers: Int
var isActive: Bool
func logStatus() {
if (isActive) {
print("\(name) is working hard")
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"
)
)
@TheMuellenator
TheMuellenator / optionals.swift
Last active February 5, 2025 06:09
iOS repl.it - Optionals Challenge Solution
//Don't change this
var studentsAndScores = ["Amy": Int(readLine()!)!, "James": Int(readLine()!)!, "Helen": Int(readLine()!)!]
func highestScore(scores: [String: Int]) {
//Write your code here.
let a = studentsAndScores["Amy"]!
let b = studentsAndScores["James"]!
let c = studentsAndScores["Helen"]!
@TheMuellenator
TheMuellenator / variables.swift
Last active January 2, 2025 15:54
iOS repl.it - Variables Challenge Solution
var a = 5
var b = 8
var c = a
a = b
b = c
print("a: \(a)")
print("b: \(b)")