This file contains 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 Crypto.PublicKey import RSA | |
key_pair = RSA.generate(2048) | |
print("p: ", key_pair.p) | |
print("q: ", key_pair.q) | |
print("m: ", key_pair.n) | |
print("e: ", key_pair.e) | |
print("d: ", key_pair.d) |
This file contains 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
// Modifies the volume of an audio file | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// Number of bytes in .wav header | |
const int HEADER_SIZE = 44; | |
int main(int argc, char *argv[]) |
This file contains 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 count_letters(text): | |
# TODO: Count the number of letters | |
num_letters = 0 | |
print(num_letters, "letter(s)") | |
return num_letters | |
def count_words(text): | |
# TODO: Count the number of words | |
num_words = 0 |
This file contains 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>Mr. Bradfield's Classes</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<!--navigation bar--> | |
<ul class="nav"> | |
<li class="nav"><a href="index.html">Home</a></li> |
This file contains 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>hello title</title> | |
<link href="style.css" rel="stylesheet"> | |
</head> | |
<body> | |
<h1>Section 1</h1> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Natoque penatibus et magnis dis parturient montes nascetur. Facilisi cras fermentum odio eu. At risus viverra adipiscing at in. Ac orci phasellus egestas tellus rutrum tellus pellentesque eu tincidunt. Blandit massa enim nec dui nunc mattis enim ut. Augue ut lectus arcu bibendum at varius vel. At augue eget arcu dictum varius duis. Duis ultricies lacus sed turpis. At augue eget arcu dictum. Egestas maecenas pharetra convallis posuere morbi leo urna molestie. Pretium vulputate sapien nec sagittis aliquam. Mattis nunc sed blandit libero volutpat sed cras ornare. Sit amet mattis vulputate enim. Eget nulla facilisi etiam dignissim diam quis enim lobortis scelerisque. Urna id volutpat lacus laoreet non cura |
This file contains 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 pygame | |
import random | |
WIDTH = 800 | |
HEIGHT = 600 | |
FPS = 60 | |
pygame.init() | |
screen = pygame.display.set_mode((WIDTH, HEIGHT)) | |
clock = pygame.time.Clock() |
This file contains 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
# https://gist.github.com/cbscribe | |
import pygame | |
import random | |
WIDTH = 800 | |
HEIGHT = 640 | |
FPS = 60 | |
RUN_SPEED = 11 | |
GRAVITY = 2 | |
JUMP_SPEED = -31 |
This file contains 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
# https://gist.github.com/cbscribe | |
# To install pygame, open command prompt: | |
# pip install pygame | |
import pygame | |
import random | |
WIDTH = 800 | |
HEIGHT = 600 |
This file contains 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 KinematicBody2D | |
enum {IDLE, RUN, JUMP, HURT, DEAD} | |
var state | |
var anim | |
var new_anim | |
var run_speed = 150 | |
var jump_speed = -320 | |
var gravity = 750 | |
var velocity = Vector2.ZERO |
This file contains 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
ciphertext = input("Ciphertext: ") | |
m = int(input("m: ")) | |
d = int(input("D: ")) | |
num_digits = len(str(m)) | |
cleartext = "" | |
print("Decrypting (may take a while)...") | |
for i in range(0, len(ciphertext), num_digits): | |
num = int(ciphertext[i:i+num_digits]) | |
cleartext += chr((num ** d) % m) | |
print() |
NewerOlder