This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from typing import Any | |
SKIP_OPERATIONS = ["OPTIMIZE", "VACUUM START", "VACUUM END"] | |
def is_subset(a: dict[str, Any], b: dict[str, Any]): | |
sub = a.items() | |
full = b.items() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
SQLiteTableWithColumns, | |
SQLiteTextBuilderInitial, | |
SQLiteTextJsonBuilderInitial, | |
SQLiteIntegerBuilderInitial, | |
SQLiteColumnBuilderBase, | |
} from 'drizzle-orm/sqlite-core' | |
import type { BuildColumns, HasDefault, NotNull } from 'drizzle-orm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { get, patch, wrapImports } from './rewire' | |
const push = get('logSuggestionsAndReturn2') | |
const move = patch('_moveDataStatements', function (tableName, json) { | |
// set dataLoss=false to generate copy statements | |
return move.call(this, tableName, json, false) | |
}) | |
wrapImports('init_migrate', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Dict, List | |
from bytewax import operators as op | |
from bytewax.dataflow import Dataflow, Stream | |
from bytewax.connectors.kafka import operators as kop | |
from bytewax.connectors.kafka.serde import SchemaDeserializer | |
class KeyDeserializer(SchemaDeserializer[bytes, str]): | |
def de(self, data): | |
return data.decode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mf = new Miniflare({ | |
script: ` | |
export default { | |
async fetch(request, env, ctx) { | |
let id = env.DOO.idFromName('foo') | |
return await env.DOO.get(id).fetch(request) | |
} | |
} | |
const SECONDS = 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from copy import deepcopy | |
from typing import Optional, Any, TypeVar, Tuple | |
from bytewax.dataflow import operator | |
from bytewax import operators as op | |
from bytewax.operators import KeyedStream | |
RETAIN = False | |
DISCARD = True | |
E = TypeVar("E") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"iam:*", | |
"eks:*", | |
"ec2:*", | |
"autoscaling:*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as k8s from '@pulumi/kubernetes' | |
const provider = new k8s.Provider('k8s-provider', { | |
context: 'docker-desktop', | |
namespace: 'testns', | |
}) | |
const ns = new k8s.core.v1.Namespace( | |
'ns', | |
{ metadata: { name: 'testns' } }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as k8s from '@pulumi/kubernetes' | |
import dedent from 'dedent' | |
new k8s.apps.v1.Deployment('redpanda', { | |
metadata: { | |
labels: { | |
appClass: 'redpanda', | |
}, | |
}, | |
spec: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'node:fs/promises' | |
import path from 'node:path' | |
import rimraf from 'rimraf' | |
import { glob } from 'glob' | |
import { generate } from 'ts-to-zod' | |
import ts from 'typescript' | |
import { v4 as uuidv4 } from 'uuid' | |
const OUTDIR = 'packages/types/gen' | |
const { factory } = ts |
NewerOlder