Skip to content

Instantly share code, notes, and snippets.

6/26 の YouTube Live の台本


フロントエンドとJavaScriptの歴史を雑に話す会

  • 話し手
    • mizchi
      • フロントエンド/JavaScript歴10年。マークアップは苦手
  • 動画コンテンツで発信したい / 一人じゃ喋れなくて聞き手を探していた
import AnthropicAI from 'npm:@anthropic-ai/sdk@0.24.0';
const client = new AnthropicAI({
apiKey: Deno.env.get('ANTHROPIC_API_KEY')!,
});
const write = (text: string) => {
Deno.stdout.write(new TextEncoder().encode(text));
}
const stream = client.messages.stream({
marp theme paginate
true
gaia
true

LLMによるフロントエンド生成自動化

  • mizchi | Plaid Inc
  • TechFeed Expert Night 31
@mizchi
mizchi / jrpg-memory.md
Last active June 12, 2024 13:43
90年代の小学生がRPGの黄金期をどのように経験したかの思い出。あるいはブレスオブファイア2への愛

これはゲーム仲間でゲームの思い出について語る、ポ鯖アドベントカレンダーの記事の13日目です。時期は気にするな。

身内ネタとかないので普通に一般公開用の記事です。


90年代の小学生がRPGの黄金期をどのように経験したかの思い出。あるいはブレスオブファイア2への愛

1996年、小学2年生でスーパーファミコンを買ってもらった時、最初に買ったソフトがマリオコレクション、すーぱーぷよぷよ2、がんばれゴエモン3 獅子重禄兵衛のからくり卍固めだった。

services:
qdrant:
image: qdrant/qdrant:latest
restart: always
container_name: qdrant
ports:
- 6333:6333
- 6334:6334
expose:
- 6333
import Cloudflare from "npm:cloudflare@3.2.0";
const cf = new Cloudflare({
apiToken: Deno.env.get('CLOUDFLARE_API_TOKEN')!,
});
const result = await cf.workers.ai.run('@cf/baai/bge-base-en-v1.5', {
account_id: Deno.env.get('CLOUDFLARE_ACCOUNT_ID')!,
text: ['This is a story about an orange cloud'],
});
console.log(result);
import type { } from "npm:@cloudflare/workers-types@4.20240524.0";
const CF_API_TOKEN = Deno.env.get('CLOUDFLARE_AI_API_TOKEN')!;
const CF_ACCOUNT_ID = Deno.env.get('CLOUDFLARE_ACCOUNT_ID')!;
const INDEX_NAME = 'embeddings-index';
interface EmbeddingResponse {
result: {
shape: number[];
data: number[][];
type NodeId = number;
interface NodePath {
id: NodeId;
g: number; // Cost from start to this node
f: number; // Estimated cost from start to goal through this node
parent: NodeId | null;
}
export function findShortestPath(
import { createGraph } from "jsr:@deno/graph@0.74.4";
const g1 = await createGraph("jsr:@mizchi/tpl@0.0.3");
console.log("g1", g1);
const g2 = await createGraph("npm:zod@3.23.6");
console.log("g2", g2);
/**
g1 {
trait Serializer {
serialize(Self) -> Bytes
}
impl Serializer for Int with serialize(self) {
Bytes::from_array([
self.land(0xFF),
self.lsr(8).land(0xFF),
self.lsr(16).land(0xFF),
self.lsr(24).land(0xFF)