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(rtweet) | |
library(tidyverse) | |
# Initial authorization setup, only need to do once | |
# auth_setup_default() #nolint | |
# Authorize | |
auth_as("default") | |
# Set user name |
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
javascript: var cell = Jupyter.notebook.get_selected_cell(); | |
var config = cell.config; | |
var patch = { | |
CodeCell:{ | |
cm_config:{autoCloseBrackets:{pairs: ""}} | |
} | |
}; | |
config.update(patch); |
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
javascript:document.querySelectorAll('p, span, li, h1, h2, h3, h4, h5, h6') | |
.forEach(function(x){ | |
if(x.innerText){ | |
x.innerText=x.innerText.replace(/A mask is/g,'Pants are'); | |
x.innerText=x.innerText.replace(/mask is/g,'pants are'); | |
x.innerText=x.innerText.replace(/a mask/g,'pants'); | |
x.innerText=x.innerText.replace(/masks/g,'pants'); | |
x.innerText=x.innerText.replace(/mask/g,'pants'); | |
x.innerText=x.innerText.replace(/Masks/g,'Pants'); | |
x.innerText=x.innerText.replace(/Mask/g,'Pants'); |
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
# modified from this: https://gist.github.com/baali/2633554/ | |
# Same logic, etc, just modified for python3 | |
# Could use argument parser, but really how many times are you going to use this? | |
# | |
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
import getpass | |
import imaplib | |
import os |