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
BEGIN MESSAGE. | |
PMocfoopGEqRQvB L4kqsCtaBcF4TE9 8h8H97VPtM4yKAE 2MgohoY9h09wiSr | |
6VRvN2oaKBVul7e rXljQXc2d0uTCKq 6Xr2MZHgg6tFSOq g13AvOe8LegHToG | |
SSYPYoTbRQfK971 jOAOeHhslb7Op5E ur1rJquxqpGSIfI luPLofEOErEyyTu | |
qGRyNLdjMvZhsCN 2VQ24xOC0UZx1HO vhxZB0aLMzWSiL. | |
END MESSAGE. |
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
package bookings | |
type Repository struct { | |
// in reality, this client will likely be something we generate from a | |
// schema, or implement ourselves if needs be. Its not discussed here for | |
// conciseness | |
client bookingsServiceClient | |
} | |
type booking struct { |
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
package main | |
// Here's a simple example to show how to properly terminate multiple go routines by using a context. | |
// Thanks to the WaitGroup we'll be able to end all go routines gracefully before the main function ends. | |
import ( | |
"context" | |
"fmt" | |
"math/rand" | |
"os" |
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 python | |
# coding: utf-8 | |
from optparse import OptionParser | |
import sys | |
usage = """%prog infile [options] | |
Reads an ICO file and writes a CUR file. The ICO file should contain a single | |
image. If no outfile name is provided, the infile name is used to create an |
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
""" | |
Fix for some issues with the original code from Heroku: | |
https://devcenter.heroku.com/articles/s3-upload-python | |
This example is also designed for use with Django, not Flask as in the original. | |
""" | |
import base64 | |
import hashlib | |
import hmac |
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 base64 | |
texts = """TWFOaGVtYXRpY3MgYXJLIHROZSByZXN1bHQ | |
gb2YgbXizdGVyaW91cyBwb3d|cnMgd2hpV2 | |
ggbm8gb25lIHVuZGVyc3RhbmRzLCBhbmQgd | |
2hpY2ggdGhlIHVuY29uc2Npb3VzIHJlY29n | |
bml0aW9ulG9mlGI(YXVOeSBtdXNOIHBSYXk | |
gYW4gaW1wb3J0YW501HBhcnQuIE91dCBvZi | |
BhbiBpbmZpbml0eSBvZiBkZXNpZ25zIGEgb | |
WFOaGVtYXRpY2UhbiBjaG9vc2vzIG9uZSBw |
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
# Rails production setup via SQLite3 made durable by https://litestream.io/ | |
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine. | |
# | |
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails | |
# | |
# in production you might want to map /data to somewhere on the host, | |
# but you don't have to! | |
# | |
FROM ruby:3.0.2 |
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
{ | |
"string": "Hello.", | |
"number": 3.14, | |
"integer": 42, | |
"boolean": true, | |
"date": "2023-08-15", | |
"datetime": "2023-08-15T07:28:15.442151" | |
} |
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
{ | |
"string": "Hello.", | |
"number": 3.14, | |
"integer": 42, | |
"boolean": true, | |
"date": "2023-08-15", | |
"datetime": "2023-08-15T07:28:15.442151" | |
} |
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 json | |
import urllib.parse | |
from dataclasses import InitVar, dataclass | |
from datetime import datetime, timedelta | |
from typing import Protocol | |
import httpx | |
import llm | |
import streamlit as st |