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
// ==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 |
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"; | |
} |
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
#lang racket | |
(require compatibility/defmacro) | |
'(monkey . peanuts) | |
'(eenie . (meenie . (meiney . (moe . ())))) | |
'(eenie meenie meiney moe) |
I hereby claim:
- I am intellectronica on github.
- I am intellectronica (https://keybase.io/intellectronica) on keybase.
- I have a public key whose fingerprint is AF7A 9377 5C36 35B8 3405 302C 10CD 6B4B DF71 7CCE
To claim this, I am signing this object: