It is so easy to run locally, and you don't need a docker for that!
brew install postgresql
git clone https://gist.github.com/huksley/f74e422424c03d8e37e5dc04a20f64eb pg
cd pg
| # | |
| # Example job to run on Verda Cloud (formerly DataCrunch). | |
| # This will launch a cluster which will be autodeleted in 120 minutes and will run the training job on it. | |
| # | |
| # $ mkdir -p ${HOME}/.verda | |
| # $ echo { "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET" } > ${HOME}/.verda/config.json | |
| # $ pip install skypilot[verda] | |
| # $ sky launch -i 120 train.yaml | |
| # | |
| name: minGPT-ddp |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [ $# -lt 1 ]; then | |
| echo "usage: $0 ENVIRONMENT" >&2 | |
| exit 1 | |
| fi | |
| ENVIRONMENT="$1" |
| class Inngest < Formula | |
| desc "Workflow orchestration platform" | |
| homepage "https://github.com/inngest/inngest/" | |
| url "https://github.com/inngest/inngest.git", | |
| tag: "v1.13.4" | |
| license "Apache-2.0" | |
| head "https://github.com/inngest/inngest.git", branch: "main" | |
| depends_on "go" => :build |
| -- Query to fetch Bitcoin price data and format as a nice table | |
| WITH api_response AS ( | |
| SELECT content::jsonb as data | |
| FROM http_get('https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=300&interval=daily') | |
| ), | |
| price_data AS ( | |
| SELECT | |
| jsonb_array_elements(data->'prices') as price_array | |
| FROM api_response | |
| ) |
| function getBase64Image(img) { | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = img.naturalWidth; | |
| canvas.height = img.naturalHeight; | |
| var ctx = canvas.getContext("2d"); | |
| ctx.drawImage(img, 0, 0); | |
| var dataURL = canvas.toDataURL("image/png"); | |
| return dataURL.replace(/^data:image\/(png|jpg);base64,/, ""); | |
| } |
| const { DgramSocket } = require("node-unix-socket"); | |
| const http = require("node:http"); | |
| /** | |
| * Implements notify mechanism for systemd services which created with systemd. | |
| * | |
| * See all kinds of messages which can be sent to systemd | |
| * https://man.archlinux.org/man/sd_notify.3.en#WELL-KNOWN_ASSIGNMENTS | |
| * | |
| * @param {string} message - The message to send |
| // Your Slack webhook url | |
| var webhookUrl = 'https://hooks.slack.com/services/.....'; | |
| /** | |
| * Submit for forms "On form submit" event trigger (add in triggers) | |
| */ | |
| function onSubmit(e) { | |
| var formTitle = FormApp.getActiveForm().getTitle(); | |
| var formUrl = FormApp.getActiveForm().getEditUrl(); | |
| var response = e.response.getItemResponses(); |
| # Define a map of blocked user agents | |
| map $http_user_agent $blocked_ua { | |
| default 0; | |
| "~*AI2Bot" 1; | |
| "~*Ai2Bot-Dolma" 1; | |
| "~*Amazonbot" 1; | |
| "~*anthropic-ai" 1; | |
| "~*Applebot" 1; | |
| "~*Applebot-Extended" 1; | |
| "~*Brightbot" 1; |
| /** | |
| * Based on https://nextjs.org/docs/pages/building-your-application/configuring/custom-server | |
| */ | |
| /* eslint-disable @typescript-eslint/no-require-imports */ | |
| /* eslint-disable no-console */ | |
| /* eslint-disable @typescript-eslint/no-empty-function */ | |
| const { createServer } = require("node:http"); | |
| const { parse } = require("node:url"); |