I hereby claim:
- I am radcliffe on github.
- I am davidradcliffe (https://keybase.io/davidradcliffe) on keybase.
- I have a public key ASBWhG5ALZNc5XvD37ywxw3cD2PTJ0m8JgLl7saGGXndGgo
To claim this, I am signing this object:
#!/bin/bash | |
# This script moves files from the Download directory to the current directory. | |
# Usage examples: | |
# pop - move the most recently downloaded file. | |
# pop 3 - move the three most recently downloaded files. | |
downloads=$HOME/Downloads | |
n=1 | |
if [ "$1" != "" ]; then | |
n=$1 |
""" | |
Author: David Radcliffe (2018-02-02) | |
I am interested in numbers that are sums of two successive primes: | |
5, 8, 12, 18, 24, 30, 36, 42, 52, 60, 68, 78, 84, 90, 100, ... | |
Note that 2+3=5, 3+5=8, 5+7=12, 7+11=18, and so on. | |
This is sequence A001043 in the On-Line Encyclopedia of Integer Sequences. |
10 PRINT "1" | |
20 PRINT "2" | |
30 PRINT "Fizz" | |
40 PRINT "4" | |
50 PRINT "Buzz" | |
60 PRINT "Fizz" | |
70 PRINT "7" | |
80 PRINT "8" | |
90 PRINT "Fizz" | |
100 PRINT "Buzz" |
# Download a list of all 7-Eleven stores in the United States. | |
# WARNING: The source data is inaccurate! | |
# Presented at PyMNtos, 2017-11-30 | |
import requests | |
import csv | |
import time | |
import bs4 | |
# Merge multiple lists of distinct elements into a single list, maintaining the order within each list. | |
# The result is a list of distinct elements, consisting of the union of the elements in the constituent lists. | |
# If A precedes B in one of the input lists, then A must precede B in the result. | |
# If this is not possible, then None is returned. | |
from collections import defaultdict | |
# Class to represent a graph - adapted from http://www.geeksforgeeks.org/topological-sorting-indegree-based-solution/ | |
class Graph: |
I hereby claim:
To claim this, I am signing this object:
# Filename: pick_state.py | |
# To run this file, type | |
# python pick_state.py | |
# in a terminal window. | |
# This script requires the file us_states.txt which is available at | |
# https://gist.github.com/Radcliffe/7a3e0fe2efc0a9aeb523abfac67865db | |
import csv |
StateCode|StateName|StateDate | |
AK|Alaska|1959-01-03 | |
AL|Alabama|1819-12-14 | |
AR|Arkansas|1836-06-15 | |
AZ|Arizona|1912-02-14 | |
CA|California|1850-09-09 | |
CO|Colorado|1876-08-01 | |
CT|Connecticut|1788-01-09 | |
DE|Delaware|1787-12-07 | |
FL|Florida|1845-03-03 |
year | name | fear | sadness | joy | anger | disgust | |
---|---|---|---|---|---|---|---|
1789 | Washington | 0.431542 | 0.212422 | 0.297166 | 0.155104 | 0.456401 | |
1793 | Washington | 0.170726 | 0.110822 | 0.080267 | 0.238734 | 0.51617 | |
1797 | Adams | 0.482235 | 0.498792 | 0.538104 | 0.094651 | 0.475888 | |
1801 | Jefferson | 0.592254 | 0.539775 | 0.523261 | 0.139209 | 0.172762 | |
1805 | Jefferson | 0.658992 | 0.230946 | 0.508855 | 0.136953 | 0.441134 | |
1809 | Madison | 0.407716 | 0.46959 | 0.503345 | 0.398835 | 0.168831 | |
1813 | Madison | 0.410416 | 0.496523 | 0.167754 | 0.422014 | 0.508343 | |
1817 | Monroe | 0.184481 | 0.188871 | 0.550531 | 0.132109 | 0.445847 | |
1821 | Monroe | 0.135458 | 0.258702 | 0.540292 | 0.135676 | 0.441433 |