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
| void setup() | |
| { | |
| pinMode(12, OUTPUT); | |
| pinMode(2, INPUT_PULLUP); | |
| } | |
| int button; | |
| int last_button; | |
| int led = LOW; | |
| void loop() |
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
| void setup() | |
| { | |
| for (int i = 1; i < 9; i++) | |
| { | |
| pinMode(i, OUTPUT); | |
| } | |
| } | |
| void loop() | |
| { |
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
| // Code in the setup section runs once | |
| void setup() | |
| { | |
| for (int x = 1; x < 5; x++) | |
| { | |
| pinMode(x, OUTPUT); | |
| } | |
| } | |
| // Code in the loop section repeats |
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
| #include <stdio.h> | |
| // Every GIF must have this first 6 bytes | |
| char *gif_header = "GIF89a"; | |
| int main(int argc, char *argv[]) | |
| { | |
| // check for correct number of arguments | |
| if (argc != 2) | |
| { |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <cs50.h> | |
| #include <time.h> | |
| #define DECK_SIZE 52 | |
| // strings for pretty printing values | |
| string ranks[14] = {"", "Ace", "Two", "Three", "Four", "Five", "Six", | |
| "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"}; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>Cats</title> | |
| <link rel="stylesheet" href="styles.css"> | |
| </head> | |
| <body> | |
| <h1>Learn about cats!</h1> | |
| <h2>Section 1</h2> | |
| <p> |
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 flask import Flask | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def index(): | |
| return "Hello world!" | |
| @app.route("/goodbye") | |
| def bye(): |
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
| # http://nssdc.gsfc.nasa.gov/planetary/factsheet/ | |
| import turtle | |
| import math | |
| turtle.bgcolor("black") | |
| G = 6.67428e-11 | |
| AU = 149.6e9 # m | |
| SCALE = 250 / (2 * AU) # pixels/AU | |
| TIMESTEP = 24 * 3600 # s |
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 requests, bs4 | |
| import time | |
| # for n in range(0, 5937): | |
| # url = 'https://www.fiercebiotech.com/biotech?page=0%2C' + str(n) | |
| # data = requests.get(url) | |
| # use this to prevent ddos | |
| # time.sleep(10) |
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
| shader_type canvas_item; | |
| /** | |
| Maps object texture onto a sphere and applies a spherical normal | |
| based on a simulated light. | |
| Adapted from | |
| https://www.raywenderlich.com/2323-opengl-es-pixel-shaders-tutorial | |
| and | |
| https://gamedev.stackexchange.com/a/9385 |