This file contains hidden or 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
""" | |
################################################################################### | |
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 |
This file contains hidden or 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
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 |
This file contains hidden or 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
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" |
This file contains hidden or 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
# -*- 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 |
This file contains hidden or 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
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' | |
] |
This file contains hidden or 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 | |
print("Content-Type: text/html \n") | |
import cgitb | |
cgitb.enable() | |
import shutil | |
username = "danielj" |
This file contains hidden or 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
<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() |
This file contains hidden or 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
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) |
This file contains hidden or 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
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 |
This file contains hidden or 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
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) |