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/env python3 | |
# Query GPT3 API | |
import openai | |
import fire | |
# API_KEY = os.getenv("OPENAI_API_KEY") | |
openai.api_key = "FAKE_KEY" | |
def gpt(prompt, |
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
license: mit |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Simple IMDB scraping script | |
# David Dohan | |
import urllib2 | |
import bs4 | |
import sys | |
import time | |
import json | |
def scrape_movies(url): |
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
// Lava lamp code for HCI (COS 436/ELE 469) | |
/* | |
There are 4 effective LEDs in the circuit controlled by the Arduino | |
Uno. One is an RGB LED, one is 2 red LEDs in series, one is a green | |
LED, and one is a blue LED. We have created a mapping to control how | |
each LED turns on with the softpot. | |
Each LED X has 3 associated variables. First, the variable X is the | |
number of the pin that will provide the PWM to control the light |