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
#!/usr/bin/env python3 | |
import requests | |
import json | |
import time | |
API_KEY = "asdf" | |
def miles_to_meters( miles ): | |
return ( miles * 1609.34 ) |
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
#!/usr/bin/env python3 | |
import cv2 | |
import imagehash | |
import sys | |
from PIL import Image | |
import numpy as np | |
from pathlib import Path | |
from natsort import humansorted | |
# pip install opencv-python ImageHash pillow natsort |
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
ServerRoot "/usr/local/apache2" | |
Listen 80 | |
LoadModule mpm_event_module modules/mod_mpm_event.so | |
LoadModule authn_file_module modules/mod_authn_file.so | |
LoadModule authn_core_module modules/mod_authn_core.so | |
LoadModule authz_host_module modules/mod_authz_host.so | |
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so | |
LoadModule authz_user_module modules/mod_authz_user.so |
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 | |
echo $SHELL | |
chsh -s /bin/bash | |
# iTerm --> Settings --> Profiles --> Default --> General --> Command = Login Shell | |
# https://github.com/pyenv/pyenv | |
brew update && brew install pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile | |
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile |
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
#!/usr/bin/env python3 | |
import subprocess | |
import re | |
import threading | |
import time | |
import json | |
def write_json( file_path , python_object ): | |
with open( file_path , 'w', encoding='utf-8' ) as f: | |
json.dump( python_object , f , ensure_ascii=False , indent=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
#!/usr/bin/env python3 | |
# brew install wkhtmltopdf | |
# pip install imgkit markdown | |
import os | |
import imgkit | |
import markdown | |
import asyncio | |
import nest_asyncio | |
import time | |
from pyppeteer import launch |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>MD + Katex Render Test</title> | |
<script defer src="https://39363.org/CDN/marked.min.js" crossorigin="anonymous"></script> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-3UiQGuEI4TTMaFmGIZumfRPtfKQ3trwQE2JgosJxCnGmQpL/lJdjpcHkaaFwHlcI" crossorigin="anonymous"> | |
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-G0zcxDFp5LWZtDuRMnBkk3EphCK1lhEf4UEyEM693ka574TZGwo4IWwS6QLzM/2t" crossorigin="anonymous"></script> |
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
#!/usr/bin/env python3 | |
import sys | |
import json | |
from pygeoif.geometry import Point | |
from fastkml import kml | |
from pprint import pprint | |
from pathlib import Path | |
import googlemaps | |
from urllib.parse import urlparse , parse_qs , unquote |
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
#!/usr/bin/env python3 | |
import requests | |
from pprint import pprint | |
from box import Box | |
from pathlib import Path | |
import shutil | |
import json | |
from tqdm import tqdm | |
from concurrent.futures import ThreadPoolExecutor | |
import urllib.parse |
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 | |
CLIENT_ID="asdf" | |
CLIENT_SECRET="asdf" | |
REDIRECT_URI="http://localhost:3033/" | |
# 1.) refresh client credentials ( this is a less permissive client credential auth token ) | |
# curl -s -X POST 'https://id.twitch.tv/oauth2/token' \ | |
# -H 'Content-Type: application/x-www-form-urlencoded' \ | |
# -d 'client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&grant_type=client_credentials' |