git init
or
from starlette.applications import Starlette | |
from starlette.responses import StreamingResponse | |
from starlette.requests import Request | |
from starlette.routing import Route | |
from pathlib import Path | |
from typing import IO, Generator | |
""" | |
Stream a file, in this case an mp4 video, supporting range-requests using starlette |
#!/usr/bin/env python | |
# liuw | |
# Nasty hack to raise exception for other threads | |
import ctypes # Calm down, this has become standard library since 2.5 | |
import threading | |
import time | |
NULL = 0 |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
#!/usr/bin/env bash | |
# sudo ln -s "$(pwd)/csv2datasette" /usr/bin/csv2datasette | |
# csv2datasette is meant to explore CSV data. It is not meant to create a sustainable DB. | |
# csv2datasette is a bash script which open CSV files directly in Datasette. It offers | |
# a number of options for reading and exploring CSV files, such as --stats, inspired by WTFCsv. | |
# | |
# `--stats` option includes, for each column: the column name, the number of unique values, | |
# the number of filled rows, the number of missing values, the mininmum value, the maximum value, | |
# the average, the sum, the shortest string, the longest string, the number of numeric values, |
You are a security robot. Your job is to observe and report any activity. Specifically, notice the people and what they are doing. | |
Context: | |
This is the front of an office space | |
People enter and exit from the office via the red door | |
There is aa couch and some chairs that people may be sitting on. There is also a snack area, and an area with equipment. right of the image. | |
Return JSON. | |
{ |
#!/usr/bin/env python3 | |
import os | |
from datetime import datetime, timezone | |
from pathlib import Path | |
from prompt_toolkit import PromptSession | |
from prompt_toolkit.history import FileHistory | |
import openai | |
from rich.console import Console | |
from rich.markdown import Markdown |
Some rough cloudformation to add OIDC support for Github in AWS.
1b511abead59c6ce207077c0bf0e0043b1382612
is the known thumbprint for Github).Note, you can discover current thumbprint using openssl.
$ openssl s_client -servername token.actions.githubusercontent.com -showcerts -connect token.actions.githubusercontent.com:443 < /dev/null 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sed "0,/-END CERTIFICATE-/d" > certificate.crt $ openssl x509 -in certificate.crt -fingerprint -noout | cut -f2 -d'=' | tr -d ':' | tr '[:upper:]' '[:lower:]' 1b511abead59c6ce207077c0bf0e0043b1382612
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Single File Web Component</title> | |
</head> | |
<body> | |
<template id=single-file> | |
<style> | |
h1 { |
"get embeddings from an LLM database" | |
# LICENSE https://www.apache.org/licenses/LICENSE-2.0.txt | |
# Copyright (C) Randall Bohn 2023 | |
# requires: llm>=0.9, sqlite_utils, numpy, umap-learn==0.5.3 | |
from typing import Dict | |
import llm | |
import numpy as np | |
from sqlite_utils import Database | |
from umap import UMAP | |