🚶♂️
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
%% Imported from https://upload.wikimedia.org/wikipedia/commons/3/32/Blank_US_Map.svg | |
%% Translated to TikZ using Inkscape 0.48 | |
\tikzset{USA map/.cd, | |
state/.style={fill, draw=white, ultra thick}, | |
HI/.style={}, AK/.style={}, FL/.style={}, NH/.style={}, MI/.style={}, MI/.style={}, VT/.style={}, ME/.style={}, RI/.style={}, NY/.style={}, PA/.style={}, NJ/.style={}, DE/.style={}, MD/.style={}, VA/.style={}, WV/.style={}, OH/.style={}, IN/.style={}, IL/.style={}, CT/.style={}, WI/.style={}, NC/.style={}, DC/.style={}, MA/.style={}, TN/.style={}, AR/.style={}, MO/.style={}, GA/.style={}, SC/.style={}, KY/.style={}, AL/.style={}, LA/.style={}, MS/.style={}, IA/.style={}, MN/.style={}, OK/.style={}, TX/.style={}, NM/.style={}, KS/.style={}, NE/.style={}, SD/.style={}, ND/.style={}, WY/.style={}, MT/.style={}, CO/.style={}, ID/.style={}, UT/.style={}, AZ/.style={}, NV/.style={}, OR/.style={}, WA/.style={}, CA/.style={}} | |
\tikzset{ | |
every state/.style={USA map/state/.style={#1}}, | |
HI/.style={USA map/HI/.style={#1}}, AK/. |
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
"""Plot for a grant. | |
Plot the dramatic arc on the left axis | |
and 3 components (staging, progression, tension) on the right axis. | |
Arrows connect them. | |
""" | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as mpatches | |
import numpy as np | |
from scipy.interpolate import CubicSpline |
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
""" | |
Clean some text in the FDD reports. | |
This takes the database from version 0.1.2 to 0.2.0. | |
""" | |
import re | |
import pandas as pd | |
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
import os | |
os.environ['OPENAI_API_KEY'] = '<Your OpenAI API Key>' | |
# See here on how to find your Zotero info: https://github.com/urschrei/pyzotero#quickstart | |
ZOTERO_USER_ID = '<Your Zotero User ID>' | |
ZOTERO_API_KEY = '<Your Zotero API Key>' | |
ZOTERO_COLLECTION_ID = '<Your Zotero Collection ID>' | |
question = 'What predictive models are used in materials discovery?' | |
# The following prompt instruction is injected to limit the number of keywords per query |
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
""" | |
Download all media (from media posts) into a single zip file. | |
Does not catch gallery or multi-image posts. | |
> python rscrape.py --subreddit MedievalArtMemes | |
> python dmedia.py --subreddit MedievalArtMemes | |
""" | |
import argparse | |
import json | |
import logging |
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
""" | |
Each participant has: | |
- sub-001 | |
- theta (counterbalanced Stimulus Set A or B) | |
- Learning (useable??) (in-lab/.../tv5-01_Theta_Initial learning_2022_Sep_01_1033.csv) | |
- Pre-test (in-lab/.../tv5-01_setA-memorytest1_2022_Sep_01_1109.csv) | |
- Post-test (in-lab/.../tv5-01_memoryTest2_2022_Sep_01_1224.csv) | |
- Reactivation?? (in-lab/.../tv5-01_reactivation_2022_Sep_01_1147.csv) | |
- Condition 1 [no reactivation] | |
- Condition 2 [reactivation no stim] |
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
silentpath="2secblank.wav" | |
for puzzlepath in Puzzlenames/*.wav; do | |
puzzlebase="${puzzlepath##*/}" | |
puzzlename="${puzzlebase%.wav}" | |
for soundpath in Soundfiles/*.wav; do | |
soundbase="${soundpath##*/}" | |
soundname="${soundbase%.wav}" | |
export_path="Merged/${puzzlename}-${soundname}.wav" | |
# printf "file '${puzzlepath}'\nfile '${silentpath}'\nfile '${soundpath}'" > list.txt |
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
import schemdraw | |
from schemdraw import flow | |
import schemdraw.elements as elm | |
""" | |
d1 | |
""" | |
with schemdraw.Drawing(show=True) as d: | |
# with schemdraw.Drawing(file="mycrc.svg") as d: | |
d.config(fontsize=10) | |
d += (b := flow.Start().label("Lucid dream\ninduction attempt")) |
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
"""scrape ALL the SUBMISSIONS of a given subreddit | |
""" | |
import os | |
import json | |
import tqdm | |
import datetime | |
import argparse | |
from psaw import PushshiftAPI |
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
""" | |
separate dream and nondream content | |
create two new columns | |
one with bracketed one without | |
""" | |
import os | |
import re | |
import argparse | |
import pandas as pd |
NewerOlder