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
import asyncio | |
import getpass | |
from typing import List, Dict | |
from twscrape import API, gather # type: ignore | |
OUTPUT_FILE = "following_export.txt" # Hardcoded output file name | |
async def get_following_accounts(target_username: str, api: API) -> List[Dict[str, str]]: | |
""" | |
Fetch the accounts that the given target user follows. |
This file has been truncated, but you can view the full file.
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
/* WARNING: Script requires that SQLITE_DBCONFIG_DEFENSIVE be disabled */ | |
PRAGMA foreign_keys=OFF; | |
BEGIN TRANSACTION; | |
CREATE TABLE favorites (author TEXT, quote TEXT); | |
CREATE TABLE favs (fav integer); | |
CREATE TABLE categories (id INTEGER PRIMARY KEY, category TEXT); | |
INSERT INTO categories VALUES(0,'Uncategorized'); | |
INSERT INTO categories VALUES(1,'Age'); | |
INSERT INTO categories VALUES(2,'Anger'); | |
INSERT INTO categories VALUES(3,'Art'); |
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
// Types for the result object with discriminated union | |
type Success<T> = { | |
data: T; | |
error: null; | |
}; | |
type Failure<E> = { | |
data: null; | |
error: E; | |
}; |
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
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
def create_quadrant_chart( | |
quadrant_labels, | |
quadrant_colors, | |
axis_labels, | |
arrow_props=None, | |
text_bbox=None, | |
figsize=(8, 8), |
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
# Add date created to Obsidian files, if they don't already exist. | |
import os | |
import datetime | |
import re | |
def get_creation_date(filepath): | |
"""Get the creation date of a file.""" | |
stat = os.stat(filepath) | |
try: |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Author: Michael Thomason <[email protected]> | |
# Copyright (C) 2025 Michael Thomason, All rights reserved. | |
# License: MIT | |
# Daily Journal Index Generator | |
# | |
# This script generates an index file for daily journal notes stored in a specific directory. |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Author: Michael Thomason <[email protected]> | |
# Copyright (C) 2025 Michael Thomason, All rights reserved. | |
# License: MIT | |
# Obsidian Vault Index Generator | |
# | |
# This script generates an index for an Obsidian vault by scanning all markdown files |
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
#!/bin/sh | |
# buildcounter.sh | |
# MAD | |
# | |
# Created by Michael Thomason on 3/4/14. | |
# Copyright © 2017 Michael Thomason. All rights reserved. | |
# Build Counter Script for Xcode | |
# This script updates version/build metadata using git information and PlistBuddy. |
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
// | |
// MADMathAlgebra.h | |
// MADCocoaExtensions | |
// | |
// Created by Michael Thomason on 5/23/16. | |
// Copyright © 2017 Michael Thomason. All rights reserved. | |
// | |
#ifndef MADMathAlgebra_h | |
#define MADMathAlgebra_h |
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
// | |
// MTTree.h | |
// libMTDataStrutures | |
// | |
// Created by Michael Thomason on 6/21/14. | |
// Copyright © 2024 Michael Thomason. All rights reserved. | |
// | |
#ifndef MAD_DataStructures_MTTree_h | |
#define MAD_DataStructures_MTTree_h |
NewerOlder