Skip to content

Instantly share code, notes, and snippets.

View jlewi's full-sized avatar

Jeremy Lewi jlewi

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VSCode URI Generator</title>
<script>
document.addEventListener("DOMContentLoaded", () => {
// Retrieve the BasePath variable from local storage
const basePath = localStorage.getItem("BasePath");
{
"items": [
{
"subject": {
"associated": {},
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:umpsiyampiq3bpgce7kigydz/bafkreiadswkm4njoz5fsp3irzxmhh6h2z6jmvpblh72zbp2uu7z2iexp3e@jpeg",
"description": "Director of Machine Learning at the Wikimedia Foundation. We host Wikipedia.",
"did": "did:plc:umpsiyampiq3bpgce7kigydz",
"displayName": "Chris Albon",
"handle": "chrisalbon.com",
{
"items": [
{
"subject": {
"associated": {},
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:yhbp52uzo4vsn5hlkbrfvxoq/bafkreigj6grc5kv2drxtcddg5kgie7xo6sl7mctnm4i4xexwmu2tgj3qdu@jpeg",
"description": "Chief Executive, The British Academy\nChair, Our World in Data\nBoard, National Audit Office \nVisiting Professor, Kings College London\nFellow, Birkbeck College\nAdvisory board, Resolution Foundation; Bennett Institute; UCL Policy Lab \nMy own views",
"did": "did:plc:yhbp52uzo4vsn5hlkbrfvxoq",
"displayName": "Hetan Shah",
"handle": "hetanshah.bsky.social",
@jlewi
jlewi / somequery.md
Created October 15, 2024 22:32
query
sqlite3 --header --column ~/.foyle/logs/sessions.sqllite3 "
SELECT
   contextid,
   total_input_tokens,
   total_output_tokens,
   ROUND(total_input_tokens/1E6 * 5, 4) as input_tokens_cost_usd,
   ROUND(total_output_tokens/1E6 * 15, 4) as output_tokens_cost_usd,
   ROUND((total_input_tokens/1E6 * 5) + (total_output_tokens/1E6 * 15), 4) as total_cost_usd
FROM sessions
runme
document session
relativePath
2024_08_06_fix_logging_and_traces.md
id updated
01J4JJ10T27E95Y2XEZVPM0XKQ
2024-08-06 07:03:33 -0700

2024_08_06

cd ~/git_vscode-runme
export NODE_OPTIONS="--experimental-specifier-resolution=node --max-old-space-size=8192"
npm run build

# Ran on 2024-08-01 17:25:37-07:00 for 25.542s exited with 1
(node:86631) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use `node --trace-warnings ...` to show where the warning was created)

> [email protected] build
echo $RUNME_RUNNER

# Ran on 2024-07-15 08:24:51-07:00 for 211ms
v2****a1
echo $RUNME_RUNNER

# Ran on 2024-07-15 08:20:05-07:00 for 849ms
v1
@jlewi
jlewi / Dockerfile
Created July 2, 2024 01:31
Triton Dockerfile
ARG TRITON_VERSION=2.46.0
ARG TRITON_CONTAINER_VERSION=24.05
ARG BASE_IMAGE=nvcr.io/nvidia/tritonserver:24.05-py3-min
############################################################################
## Production stage: Create container with just inference server executable
############################################################################
FROM ${BASE_IMAGE}
#!/usr/bin/env bash
#
# Build script for Triton Inference Server
#
# Exit script immediately if any command fails
set -e
########