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
// Author: Patrick McCann | |
// Date: October 5, 2016 | |
fn main() { | |
if std::env::args().len() > 1 { | |
let n = std::env::args().nth(1).unwrap().parse::<i32>().unwrap(); | |
println!("Factors of {}: {:?}", n, factorize(n)); | |
println!("Primes up to {}: {:?}", n, primes(n)); | |
} else { | |
println!("Oops! Add the number you want to factorize as an argument.") | |
} |
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
Computer Information: | |
Manufacturer: Unknown | |
Model: Unknown | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: GenuineIntel | |
CPU Brand: Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz | |
CPU Family: 0x6 | |
CPU Model: 0x45 |
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
// Higher FPS (really works) | |
cl_forcepreload "1" | |
cl_disablehtmlmotd "1" | |
r_drawtracers_firstperson "0" | |
mat_queue_mode "2" | |
r_eyegloss "0" | |
r_eyemove "0" | |
r_eyeshift_x "0" | |
r_eyeshift_y "0" | |
r_eyeshift_z "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
use std::io; | |
fn main() { | |
println!("Enter a number to find its factors: "); | |
let mut s = String::new(); | |
io::stdin() | |
.read_line(&mut s) | |
.expect("failed to read line"); | |
let num: u64 = s.trim().parse().expect("Enter in a positive integer only"); | |
let factors = get_factors_functional(num); |
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
[package] | |
name = "factorial" | |
version = "0.1.0" | |
authors = ["qolop <mptm98@gmail.com>"] | |
[dependencies] | |
num="*" |
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
extern crate time; | |
fn main() { | |
let t = time::now(); | |
match t.tm_wday { | |
0 => println!("Sunday"), | |
1 => println!("Monday"), | |
2 => println!("Tuesday"), | |
3 => println!("Wednesday"), | |
4 => println!("Thursday"), |
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
# opens today's South Portland High School announcements in terminal/command prompt | |
import time | |
from bs4 import BeautifulSoup as clam_chowder | |
from urllib.request import urlopen | |
def main(): | |
dt1 = time.strftime("%Y/%m/%d") | |
dt2 = time.strftime("%B-%-d-%Y") | |
url = "http://highschool.spsd.org/riots/{}/{}/".format(dt1, dt2).lower() | |
print(url) |
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
use std::io; | |
fn main() { | |
println!("Please input the factorial."); | |
let mut s = String::new(); | |
io::stdin() | |
.read_line(&mut s) |
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
--This game only works in the Codea app for iPad (which uses Lua); http://twolivesleft.com/Codea/ | |
--This code was originally made in April 2014. | |
function setup() | |
score = 0 | |
hit = 0 | |
x=380 --starting x | |
y=400 --starting y | |
d=100 --diameter of ball | |
dx = 0 | |
dy = 0 |