Skip to content

Instantly share code, notes, and snippets.

View skirdey's full-sized avatar

Stan Kirdey skirdey

View GitHub Profile
@skirdey
skirdey / Answers2Docs
Created June 24, 2023 21:33
haystack
class AnswersToDocs(BaseComponent):
"""
This Node is used to convert retrieved documents into predicted answers format.
It is useful for situations where you are calling a Retriever only pipeline via REST API.
This ensures that your output is in a compatible format.
:param progress_bar: Whether to show a progress bar
"""
outgoing_edges = 1
@skirdey
skirdey / pubsub_iot.py
Last active September 19, 2024 11:43
Connecting to AWS IoT MQTT topic using Python and Paho MQTT client
import paho.mqtt.client as paho
import os
import socket
import ssl
from time import sleep
from random import uniform
import json
import logging
logging.basicConfig(level=logging.INFO)