Skip to content

Instantly share code, notes, and snippets.

View dsignr's full-sized avatar

Neya dsignr

View GitHub Profile
@swalkinshaw
swalkinshaw / tutorial.md
Last active October 24, 2025 14:52
Designing a GraphQL API
@cnicodeme
cnicodeme / fixes.md
Last active August 20, 2025 11:28
List of 5,000 Most Frequently Used Domain Name Prefixes and Suffixes - Ordered By Length
@polvalente
polvalente / kmeans.livemd
Created November 27, 2021 01:41
K-means livebook example

K-means

Initialization

Mix.install([
  {:torchx, "~> 0.1.0-dev", github: "elixir-nx/nx", sparse: "torchx"},
  {:nx, "~> 0.1.0-dev", github: "elixir-nx/nx", sparse: "nx", override: true}
])
@LostKobrakai
LostKobrakai / form_live.ex
Last active June 3, 2025 14:28
Phoenix LiveView form with nested embeds and add/delete buttons
defmodule NestedWeb.FormLive do
use NestedWeb, :live_view
require Logger
defmodule Form do
use Ecto.Schema
import Ecto.Changeset
embedded_schema do
field :name, :string
@ninely
ninely / main.py
Last active September 15, 2025 10:10
Langchain with fastapi stream example
"""This is an example of how to use async langchain with fastapi and return a streaming response.
The latest version of Langchain has improved its compatibility with asynchronous FastAPI,
making it easier to implement streaming functionality in your applications.
"""
import asyncio
import os
from typing import AsyncIterable, Awaitable
import uvicorn
from dotenv import load_dotenv