How to make an application icon for macOS using
iconset
&iconutil
class BottomIntersectionObserverController { | |
/** @type {HTMLElement} */ | |
host; | |
/** @type {string} */ | |
_bottomThreshold; | |
/** @type {CallableFunction} */ | |
bottomThresholdReachedCallback; |
# STEP 1: Load | |
# Load documents using LangChain's DocumentLoaders | |
# This is from https://langchain.readthedocs.io/en/latest/modules/document_loaders/examples/csv.html | |
from langchain.document_loaders.csv_loader import CSVLoader | |
loader = CSVLoader(file_path='./example_data/mlb_teams_2012.csv') | |
data = loader.load() | |
Create an account at https://openweathermap.org and get an API key.
Note that it can take up to a couple of hours for the key to become active.
Add an environment variable OPEN_WEATHER_API_KEY
with the value of the key.
run the script:
./weather.clj Toronto,CA
These are the rough steps for getting a surrealdb instance running on fly.io and connecting to it. This is heavily based off of steps posted in the surrealdb discord by rvdende. View Origional Post.
These steps work just fine for the hobby (pay as you go) plan.
HEADS UP By default this will create an instance on a single shared cpu with 256m memory. This is pretty darn small to do anything but experiment, but its free. You can scale your instance to something more useable by visiting the https://fly.io/apps/<appname>/scale
. Obviously scaling to larger instances will incur higher costs, please refer to fly.io pricing
source: fly.io docs
import { Hono } from 'hono' | |
const app = new Hono() | |
app.get('/', (c) => { | |
return c.html('Hello Bun!') | |
}) | |
export default { | |
port: 3000, |
-- This code is based on my other Gist "Simple linear regression in Javascript" (https://gist.github.com/patrickpissurno/ea0dc4039f075fbaf398619761bd9044) | |
-- There might be a more efficient way to do this in SQL | |
-- This function is resposible for computing the weights for the ax + b equation | |
CREATE OR REPLACE FUNCTION linear_regression(x_array decimal(15,2)[], y_array decimal(15,2)[]) RETURNS decimal(15,2)[] AS $$ | |
DECLARE | |
slope decimal(15,2); | |
intercept decimal(15,2); | |
n integer; |
import { create, Header, Payload } from "https://deno.land/x/[email protected]/mod.ts"; | |
// License: MIT | |
// How to get an access token from Google Cloud using Deno | |
// | |
// Usage: | |
// const token = await getAccessToken(config) | |
type Config = { | |
privateKey: string; // Private base64 encoded RSA key, starts with -----BEGIN PRIVATE KEY----- |
In case anyone else wants to play with Zig on webassembly, here's what you need to do to make it work on a mac today.
You'll need LLVM to output to the WASM target. This has just been added by default in trunk, so if LLVM >7 is available, you might be able to just brew install llvm
.
If you have wasm support already you should see:
$ llc --version