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
# Colab: https://colab.research.google.com/drive/1YpDetI8BRbObPDEVdfqUcwhEX9UUXP-m?usp=sharing | |
import os | |
from pathlib import Path | |
from haystack import Pipeline | |
from haystack.components.converters import HTMLToDocument | |
from haystack.components.writers import DocumentWriter | |
from haystack_integrations.document_stores.chroma import ChromaDocumentStore | |
from haystack_integrations.components.retrievers.chroma import ChromaQueryTextRetriever |
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
echo 'hello from gist!' |
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
var square = function(x){ return x*x;}; | |
var cube = function(x){ return x*x*x;}; |
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
SELECT 21 as AGE |
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
def addtwo(a): | |
return a + 2 |
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 StompJs = require("@stomp/stompjs"); | |
const client = new StompJs.Client({ | |
brokerURL: "ws://localhost:15674/ws", | |
connectHeaders: { | |
login: "user_1", | |
passcode: | |
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtb2RlIiA6ICJydyIsICJjaGFubmVsIiA6ICIxIiwgInJvbGUiIDogIndlYnVzZXIiLCAidXNlcl9pZCIgOiAxLCAiZXhwIiA6IDE1OTkzNDUzNzJ9.HLYr22YUZ6XjocHo0EuxuWuhX6AT7qygOrkB4GZo1nY" | |
}, | |
debug: str => console.log(str), |
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
#!/usr/bin/env python | |
import asyncio | |
import websockets | |
import aiohttp | |
async def hello(): | |
async with aiohttp.ClientSession() as session: |
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 PIL import Image | |
import io | |
from wolframclient.language import wlexpr, wl | |
from wolframclient.evaluation import WolframLanguageSession | |
import numpy as np | |
def CurvatureFlowFilter(session, img): | |
data = session.evaluate(wl.CurvatureFlowFilter(img, 50)) |
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
2+2 |
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 | |
def findfiles(files, test = lambda path: os.path.splitext(path)[1].lower() == '.xlsx'): | |
if isinstance(files, str): | |
files = [files] | |
for path in files: | |
if os.path.isdir(path): | |
for root, dirs, files in os.walk(path): |
NewerOlder