View bqf-reduction.py
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
#!/usr/bin/env python3 | |
# Joseph Winters | |
# Reduction Algorithm | |
# July 2018 | |
# This script implements the reduction of primitive, positive definite binary | |
# quadratic forms, which are those of the form: | |
# ax^2 + bxy + cy^2 | |
# having: |
View co454a4q2a.py
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
#!/usr/bin/env python3 | |
# | |
# Joseph Winters | |
# July 2018 | |
# CO 454 Assignment 4, Question 2 | |
# | |
import sys | |
import math |
View data-creation.sql
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
-- Create the table to hold our data. | |
CREATE TABLE purchases ( | |
name VARCHAR(5), | |
amount DECIMAL(5,2), | |
year CHAR(4) | |
); | |
-- Insert the example data. |
View max_people_living.py
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
#!/usr/bin/env python3 | |
# Joseph Winters | |
# January 27, 2017 | |
# Given a list of people with birth years and death years, all of which fall in | |
# the range [1900, 2000], find the year in which the most people were alive. If | |
# a person is alive for any part of a year, they count towards the total number | |
# of living people for that year. |