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
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"); |
/* eslint-disable @typescript-eslint/no-require-imports */ | |
const crypto = require("node:crypto"); | |
const fs = require("node:fs"); | |
const sharp = require("sharp"); | |
const logger = console; | |
const Redis = require("ioredis"); | |
const redis = new Redis(process.env.REDIS_URL || "redis://localhost:6379", { | |
enableOfflineQueue: true, | |
commandTimeout: 3000, |
We’re seeing a strong wave of AI agent applications increasingly capable of taking on and automating complex workflows. A lot of what is driving this is taking place in the model layer - with frontier models better able to plan and reason. As Sam Altman has outlined, the emergence of better reasoning capabilities in models such as OpenAI o1 provides the foundation for potentially quick advancement to highly capable AI agents that can understand context, plan and reason in order to make decisions, and then take actions in order to achieve goals.
However, improved models alone will not deliver us advanced and autonomous agents, and, as of today, most models remain poor planners and low-level reasoners. This means that most AI agents are still susceptible to errors that become compounded across multi-step processes, meaning they are unable to reliably take on complex end-to-end tasks. As a result, an ecosystem of enabling software and new architec
As enterprises seek to gain AI maturity, and move along the path from experimentation to scaling applications, greater efficiency and success can be achieved through the establishment of a holistic Responsible AI approach to identifying opportunities and managing risks.
BCG defines Responsible AI (RAI) as “an approach to deploying AI systems that is aligned with the company’s purpose and values while still delivering transformative business impact.”
Put so succinctly, it sounds simple, but in practice, it entails establishing the following, across a large and complex organisation:
import type { ZodSchema } from "zod"; | |
// eslint-disable-next-line no-duplicate-imports | |
import { z } from "zod"; | |
// Define a Zod schema | |
const userSchema = z.object({ | |
// Fix 1. Do not use catch - wreks the input type https://github.com/colinhacks/zod/issues/2852 | |
// Fix 2. Use optional() before default(), don't use at all??? | |
page: z.number().default(1), | |
sort: z.string().optional(), |