This is a small template for the common macOS pattern:
- run a task every night at a fixed local time
- if the Mac was asleep, run on wake
- if the Mac was off and later boots/logs in, run once as catch-up
- avoid custom hourly cron polling
| #!/usr/bin/env -S uv run --script --python 3.12.3 | |
| # /// script | |
| # dependencies = ['httpx', 'rich'] | |
| # /// | |
| # To make it executable: chmod +x executable_uv_weather.py | |
| import httpx, rich | |
| print(httpx.get("https://wttr.in/?format=3").text) |
| import os | |
| import dspy | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| # Configure OpenAI API key | |
| os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY") | |
| lm = dspy.LM(model="openai/gpt-4o-mini", model_type="chat") |
| [tool.ruff] | |
| line-length = 88 | |
| indent-width = 4 | |
| target-version = "py39" | |
| ignore = ["F403", "F405"] # Ignore wildcard import warnings | |
| [tool.ruff.format] | |
| quote-style = "double" | |
| indent-style = "space" | |
| skip-magic-trailing-comma = false |
Privacy Policy for the Spirit of Satoshi GPT
Last Updated: 2023-11-24
The Spirit of Satoshi GPT ("Spirit of Satoshi," "we," "us," or "our") is committed to respecting your privacy and ensuring the security of your information. This Privacy Policy outlines how we handle information when you interact with our GPT model.
When you use the Spirit of Satoshi GPT, we may collect and process the text inputs and queries you provide. This information may be temporarily routed through our private servers to enhance the quality of the GPT responses and help identify the best contexts for your queries.
| import pandas as pd, numpy as np | |
| import yfinance as yf | |
| import datetime as dt | |
| import re | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | |
| sns.set() | |
| plt.rcParams['figure.figsize'] = [10,6] | |
| plt.rcParams["font.weight"] = "bold" | |
| plt.rcParams["axes.labelweight"] = "bold" |
| # from https://www.kaggle.com/kmader/july-24-micro-challenge | |
| from contextlib import redirect_stdout | |
| from io import StringIO | |
| def simulate_game(verbose=False): | |
| out_buffer = StringIO() | |
| with redirect_stdout(out_buffer): | |
| blackjack.simulate_one_game() | |
| out_str = out_buffer.getvalue() | |
| if verbose: |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| import tweepy #https://github.com/tweepy/tweepy | |
| import csv | |
| #Twitter API credentials | |
| consumer_key = "" | |
| consumer_secret = "" | |
| access_key = "" |