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=6; i<=13; i++) | |
| { | |
| pinMode(i, OUTPUT); | |
| } | |
| } | |
| int n = 13; | |
| int add = -1; |
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 hashlib | |
| import json | |
| from time import time | |
| class Blockchain: | |
| def __init__(self): | |
| self.chain = [] | |
| self.pending_transactions = [] | |
| self.new_block(previous_hash="1234", proof=100) |
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 <Adafruit_NeoPixel.h> | |
| # define PIN 2 | |
| # define NUM_PIXELS 6 | |
| Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM_PIXELS, PIN); | |
| void setup() | |
| { | |
| pixels.begin(); | |
| } |
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 <LiquidCrystal.h> | |
| LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
| void setup() | |
| { | |
| // Set the size of the display | |
| lcd.begin(16, 2); | |
| // Print out some text | |
| lcd.print("This is a really long line."); |
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
| {% extends "layout.html" %} | |
| {% block body %} | |
| <form action="/add" method="post"> | |
| <input type="text" name="task"> | |
| <input type="submit"> | |
| </form> | |
| {% endblock %} |
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 <LiquidCrystal.h> | |
| LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
| void setup() | |
| { | |
| lcd.begin(16, 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 <LiquidCrystal.h> | |
| LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
| byte pacman1[] = { | |
| B01110, | |
| B11111, | |
| B11011, | |
| B11111, | |
| B11100, |
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
| # This program finds a value for D in the RSA algorithm | |
| # Given values for A and E | |
| A = int(input("A: ")) | |
| E = int(input("E: ")) | |
| # Start at E so D will be bigger | |
| n = E | |
| while True: | |
| n += 1 |
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
| # Run `pip install pycryptodome` to install Crypto library | |
| from Crypto.PublicKey import RSA | |
| from Crypto.Signature import pss | |
| from Crypto.Hash import SHA256 | |
| import base64 | |
| def sign(): | |
| with open("private.key", "r") as file: | |
| data = file.read() | |
| private_key = RSA.import_key(data) |