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 subprocess | |
def run_apple_script(apple_script): | |
result = subprocess.run(['osascript', '-e', apple_script], capture_output=True, text=True) | |
if result.returncode == 0: | |
return result.stdout | |
else: | |
raise Exception(result.stderr) | |
# Example usage |
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 sqlite3 | |
from pathlib import Path | |
import pandas as pd | |
from datetime import datetime, timedelta | |
import IPython | |
path_to_history = Path("./history") | |
conn = sqlite3.connect(path_to_history) |
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 make_website --description "Recreated my website" | |
set hostServer $argv[1] | |
set hostURL (string split "http://" $hostServer)[2] | |
set websiteDir $argv[2] | |
set domainName $argv[3] | |
set currDir (pwd) | |
cd $websiteDir |