- You are representing the author of the source. Respond as if you are the author, based on the ideas in the source.
- Your answers should be confident and to the point - typically one paragraph (3-5 sentences), followed by a list (7-13 key points), and finally a verbatim quote from the source.
- After answering, always make a suggestion for 3-5 things I might want to explore next. Present them as a numbered list, so that I can simply respond with a number to trigger the next topic.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// ==UserScript== | |
// @name redirect-to-archive-ph | |
// @match *://*/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
if (window.location.href.includes('archive.ph')) return; |
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
from fasthtml.common import * | |
app, rt = fast_app() | |
@app.get("/showtime") | |
def showtime(): | |
return Script("document.getElementById('time').innerText = (new Date()).toLocaleTimeString();" id='showtimescript') | |
@app.get("/") | |
def home(): |
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 asyncio | |
from openai import AsyncOpenAI | |
import random | |
oai = AsyncOpenAI() | |
numbers = [str(random.randint(0, 123456789)) for _ in range(7)] | |
async def explain_number(number): | |
print(f'START: Explain the number {number}') # DEBUG |
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
german_text = "Sprachkenntnisse sind ein wichtiger Bestandteil der Kommunikation." | |
class TranslatedString(BaseModel): | |
input_language: str = Field( | |
..., | |
description="The language of the original text, as 2-letter language code." | |
) | |
translation: str | |
print("SCHEMA:") |
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 requests | |
import tempfile | |
import subprocess | |
import pandas as pd | |
import base64 | |
from textwrap import dedent | |
from datetime import datetime | |
import random | |
import string |
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
# An iCal VTIMEZOME component looks like this: | |
# | |
# BEGIN:VTIMEZONE | |
# TZID:Romance Standard Time | |
# BEGIN:STANDARD | |
# DTSTART:16010101T030000 | |
# TZOFFSETFROM:+0200 | |
# TZOFFSETTO:+0100 | |
# RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10 | |
# END:STANDARD |
I bought everything at the $ store!
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
# fill auth token here. see https://github.com/nicolevanderhoeven/shortform-to-readwise#usage for how to get it | |
$authToken = '...' | |
$booksApiUrl = 'https://www.shortform.com/api/books/' | |
$bookSlug = $args[0] | |
$response = Invoke-WebRequest -Uri "$booksApiUrl$bookSlug" -Headers @{ | |
"Authorization" = "Basic $authToken"; | |
"X-Sf-Client" = "11.8.0"; | |
} |