This file contains hidden or 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
| class ReactiveState: | |
| def __init__(self): | |
| self.subscribers = set() | |
| self.count = 0 | |
| def subscribe(self, cb): | |
| self.subscribers.add(cb) | |
| return lambda: self.subscribers.remove(cb) | |
| def _notify(self): |
This file contains hidden or 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 json | |
| from typing import TypedDict | |
| from langchain.chat_models import init_chat_model | |
| from langchain_core.tools import tool | |
| from langgraph.prebuilt import ToolNode | |
| from langgraph.graph import StateGraph, START, END | |
| CHAT_MODEL = "llama3.2" |
This file contains hidden or 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
| <html> | |
| <head> | |
| <link | |
| rel="stylesheet" | |
| href="https://unpkg.com/[email protected]/dist/leaflet.css" | |
| integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" | |
| crossorigin="" | |
| /> | |
| <script |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "net/http" | |
| "strconv" | |
| "github.com/gin-contrib/cors" | |
| "github.com/gin-gonic/gin" |
This file contains hidden or 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
| package middlewares | |
| import ( | |
| "crypto/sha256" | |
| "crypto/subtle" | |
| "net/http" | |
| ) | |
| func NewBasicAuthMiddleware(h http.Handler) http.Handler { | |
| return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
This file contains hidden or 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
| ansible-galaxy collection install azure.azcollection | |
| pip install -r https://raw.githubusercontent.com/ansible-collections/azure.azcollection/main/requirements-azure.txt | |
| --- | |
| - name: Create an Azure VM in East US with specific configurations | |
| hosts: localhost | |
| connection: local | |
| gather_facts: no | |
| vars: |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src="./go_wasm.js"></script> | |
| <script> | |
| const go = new Go(); | |
| WebAssembly.instantiateStreaming( | |
| fetch("main.wasm"), | |
| go.importObject, | |
| ).then((result) => { |
This file contains hidden or 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
| //go:build js && wasm | |
| // +build js,wasm | |
| package main | |
| import ( | |
| "log" | |
| ) | |
| func main() { |
This file contains hidden or 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
| { | |
| "name": "web-assembly", | |
| "version": "1.0.0", | |
| "main": "go_wasm.js", | |
| "scripts": { | |
| "build": "GOOS=js GOARCH=wasm go build -o main.wasm .", | |
| "create:js": "cp \"$(go env GOROOT)/misc/wasm/wasm_exec.js\" ./go_wasm.js" | |
| }, | |
| "keywords": [], | |
| "author": "", |
This file contains hidden or 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
| <script type="importmap" src="importmap.json"></script> |
NewerOlder