Skip to content

Instantly share code, notes, and snippets.

View daniel-schroeder-dev's full-sized avatar

Daniel Schroeder daniel-schroeder-dev

  • PFES/Entergy/CodeWizardsHQ
  • New Orleans, LA
View GitHub Profile
@daniel-schroeder-dev
daniel-schroeder-dev / main.py
Created July 2, 2022 19:48
P12 - Lesson 12 - Exercise 2
"""
###################################################################################
Harvard Art Museum API
- Get API Key: https://docs.google.com/forms/d/1Fe1H4nOhFkrLpaeBpLAnSrIMYvcAxnYWm0IU9a6IkFA/viewform
- API Docs: https://github.com/harvardartmuseums/api-docs
- Base URL: https://api.harvardartmuseums.org
- Image route: /image
- Docs: https://github.com/harvardartmuseums/api-docs/blob/master/sections/image.md
@daniel-schroeder-dev
daniel-schroeder-dev / ghost.py
Created June 17, 2022 22:06
Add ghost example
def add_ghost(x, y, vertical):
ghost = add_image("ghost.png", 40)
position_element(ghost, x, y,)
if vertical:
___ # Animate up and down
___:
___ # Animate left and right
@daniel-schroeder-dev
daniel-schroeder-dev / graph.py
Created January 30, 2022 18:23
MovieDBAPI Example for Ashley
from urllib.request import urlopen
from urllib.parse import urlencode
from json import loads
# Example request: https://api.themoviedb.org/3/movie/550?api_key=b0f31f3b68b27703024d00cce1fa4366
class Graph:
API_KEY = "YOUR_API_KEY"
@daniel-schroeder-dev
daniel-schroeder-dev / impossible_project.py
Created January 6, 2022 02:30
Student project from winter break
# -*- coding: utf-8 -*-
"""Copy of The freaking impossible coding project to finish during winterbreak
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1SVMJ3M3Q_DZ6aOwP-pDPWwg08jNO-87F
"""
# Harini
var words = wordsList, time = 30, correctWords = 0;
var answer, timeout, timeInterval;
$('.scoreboard').hide();
timeInterval = setInterval(timer, 1000);
var images = [
'saitama.png',
'hulk.png',
'thanos.png',
'samus.jpg'
]
@daniel-schroeder-dev
daniel-schroeder-dev / zip.py
Created September 24, 2021 22:52
CWHQ Zip Folder Script
#!/usr/bin/python3
print("Content-Type: text/html \n")
import cgitb
cgitb.enable()
import shutil
username = "danielj"
@daniel-schroeder-dev
daniel-schroeder-dev / race.html
Created August 29, 2021 21:03
Samuel - Race Project - Lesson 10
<html><head> <link href="race.css" rel="stylesheet"/> <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <link href="https://fonts.googleapis.com/css?family=Audiowide" rel="stylesheet"> <title>Car race</title></head><body><script src="//projects.codewizardshq.com/dist/cwhq-skulpt.js" type="text/javascript"></script> <div id="errorMessage"></div> <div id='canvas'></div><script>
/******************************************************************************
* P Y T H O N C O D E B E L O W
*******************************************************************************/
/* Homework:Increase speed of player on button click
*/
var prog=
`start()
def addRaindrop(x,y,speed):
rainDrop = addImage('raindrop.png', 10)
positionEl(rainDrop, x, y)
moveY(rainDrop, y, 2000, 'infinite', False, speed)
humidity = prompt('Enter humidity value')
if humidity > 50 and humidity <= 100:
cloud = addImage('clouds.png', 1000)
import random
sentences = ("I forgot the colon in the if statement.", "I'm Drunk!", "Don't Do Drugs")
for sentence in sentences:
words = sentence.split()
randomWord = random.choice(words)
new_sentence = ""
for word in words:
# if the word is the randomWord, hide it
score = 0
scoreText = addText(score, 32)
def shoot(target):
vanish(target)
global score
# add 1 to the score
# update the scoreText with the new score
updateText(textElement, theTextYouWantOnPage)