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/python | |
""" | |
Finds the number of primes produced by the function x^2 - 2999x + 2248541 | |
evaluated over a range of integers passed in as args. Produces 80 primes | |
between 1460 and 1539 (inclusive). Inspired by this tweet from @AlgebraFact: | |
https://twitter.com/AlgebraFact/status/757674572254674944 | |
Usage: | |
./primes_in_range.py <lower bound> <upper bound> | |
""" |
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 matplotlib.pyplot as plt | |
import numpy as np | |
import csv | |
def extract_raven_accel(ravenfile, start_time = 0.0, end_time = 60.0, trim_head = 0, print_interval = 1000000): | |
""" | |
Use this to pull acceleration data from a raven raw export file. | |
Returns an Nx2 array of times (col 1) and accel values (col 2) in ft/s/s | |
Assumes col 0 of the raven csv data is time, and col 15 is acceleration. | |
""" |
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/python | |
import math | |
import sys | |
import argparse | |
import time | |
# Nagaram.py | |
# | |
# OVERVIEW | |
# Searches a dictionary of common English words for anagrams with at least |