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
/*===COLORS===*/ | |
:root { | |
--accent-color: 48, 48, 48; | |
--tab-color: 240, 240, 244; | |
--tab-text-color: 255, 255, 255; | |
--secondary-accent-color: 127, 127, 127; | |
--second-tab-text-color: 127, 127, 127; | |
--third-accent-color: 235, 219, 178; | |
--light-color: 255, 255, 255; |
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/python3 | |
import random | |
def pair_names(filename, output_filename): | |
with open(filename, 'r') as f: | |
names = [line.strip() for line in f] | |
random.shuffle(names) | |
pairs = [names[n:n+2] for n in range(0, len(names), 2)] | |
if len(names) % 2 != 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
.autumn a:link { | |
color: #F16100; | |
} | |
.autumn a:visited { | |
color: #F16100; | |
} | |
.autumn a:hover, .autumn a:active, .autumn a:focus { | |
color: #FFA300; | |
} |
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
<div class="card" style="width: 18rem;"> | |
<img src="{{ image }}" class="card-img-top" alt="#"> | |
<div class="card-body"> | |
<h5 class="card-title">{{ title }}</h5> | |
<p class="card-text">{{ description }}</p> | |
<a href="#" class="btn btn-primary">{{ collection_purl }}</a> | |
</div> | |
</div> |
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 | |
import requests | |
from bs4 import BeautifulSoup | |
url = "https://archive.org/stream/ahandbooksocial00blisgoog/ahandbooksocial00blisgoog_djvu.txt" | |
response = requests.get(url) | |
soup = BeautifulSoup(response.text, "html.parser") | |
pre_selector = "#maincontent > div > pre" |
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
require "webrick" | |
server = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd) | |
trap("INT") { server.stop } | |
server.start |
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 bubble_sort(arr) | |
for i in 0...arr.length | |
sorted = true | |
for k in 0...(arr.length - i - 1) | |
if arr[k] > arr[k + 1] | |
arr[k], arr[k + 1] = arr[k + 1], arr[k] | |
sorted = false | |
end | |
end |
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/python3 | |
import tweepy | |
import csv | |
consumer_key = "" | |
consumer_secret = "" | |
access_token = "" | |
access_token_secret = "" |
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
library(tidycensus) | |
library(tidyverse) | |
# If not set, un-comment below and install your Census API key (https://api.census.gov/data/key_signup.html) | |
# census_api_key("YOUR KEY HERE", install = TRUE) | |
get_acs(geography = "metropolitan statistical area/micropolitan statistical area", | |
variables = "DP03_0021PE", | |
summary_var = "B01003_001", | |
survey = "acs1", |
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
library(tidyverse) | |
library(tidycensus) | |
# My recommendation is to use the tidycensus library to make getting this data | |
# easier than reading in the data from the Census website. | |
# | |
# Before you can begin, you'll need to get an API key from the Census Bureau. | |
# You can acquire one here: | |
# | |
# Once you have the API key, run the following in RStudio: |
NewerOlder