This file contains hidden or 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
function err_1_(message) { throw new Error(message); } | |
function err_2_(message) { throw new Error(message); } | |
function err_3_(message) { throw new Error(message); } | |
function err_4_(message) { throw new Error(message); } | |
function err_5_(message) { throw new Error(message); } | |
function err_6_(message) { throw new Error(message); } | |
function err_7_(message) { throw new Error(message); } | |
function err_8_(message) { throw new Error(message); } | |
function err_9_(message) { throw new Error(message); } | |
function err_10_(message) { throw new Error(message); } |
This file contains hidden or 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
#! /bin/bash | |
while IFS="," read -r state_name landmark state_code rec_remaining | |
do | |
echo "Run: $state_name \"$landmark\" $state_code" | |
if [ ! -f outputs/landmarks/$state_code.png ]; | |
then | |
python scripts/txt2img.py --prompt "a travel magazine photo by Chris Burkard of $landmark, $state_name, trending on artstation" --n_samples 1 --n_iter 1 --plms --outdir outputs/landmarks | |
mv outputs/landmarks/grid-*.png outputs/landmarks/$state_code.png | |
fi |
This file contains hidden or 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
State | Landmark | State code | x | y | |
---|---|---|---|---|---|
California | The Golden Gate Bridge | CA | 0 | 4 | |
Alaska | Denali National Park | AK | 0 | 0 | |
New York | The Statue of Liberty | NY | 8 | 2 | |
Colorado | Mesa Verde National Park | CO | 2 | 4 | |
Alabama | Birmingham Civil Rights Institute | AL | 6 | 6 | |
Arizona | Grand Canyon National Park | AZ | 1 | 5 | |
Arkansas | The Ozarks | AR | 4 | 5 | |
Connecticut | Yale University Art Gallery | CT | 9 | 3 | |
Delaware | The Lewes Beach | DE | 9 | 4 |
This file contains hidden or 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
from datetime import date, timedelta | |
from collections import Counter | |
# all the dates that fit the equation: | |
dates = [*filter(lambda d:d.year - 2000 == d.month * d.day, [date(2001, 1, 1) + timedelta(i) for i in range(36158)])] | |
# total events is number of dates: | |
print(len(dates)) | |
# Counter.most_common is the year that occurs most: |