... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| /** | |
| * Gemini generated object to original schema compatible object converter | |
| * | |
| * Utility to convert Gemini generated objects back to their original schema format. | |
| * Pairs with gemini.schema-converter.ts | |
| */ | |
| import { z } from "zod"; | |
| function findDiscriminatorKey(schema: z.ZodTypeAny): string | null { | |
| if (schema instanceof z.ZodUnion) { |
| use std::cell::RefCell; | |
| use std::rc::Rc; | |
| // A graph can be represented in several ways. For the sake of illustrating how | |
| // interior mutability works in practice, let's go with the simplest | |
| // representation: a list of nodes. | |
| // Each node has an inner value and a list of adjacent nodes it is connected to | |
| // (through a directed edge). | |
| // That list of adjacent nodes cannot be the exclusive owner of those nodes, or | |
| // else each node would have at most one edge to another node and the graph |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| import cmath | |
| import os.path | |
| class KMeans: | |
| ''' | |
| @descriptions: K-means Algorithm implementation. |