Skip to content

Instantly share code, notes, and snippets.

View skirdey's full-sized avatar

Stan Kirdey skirdey

  • San Francisco Bay Area, California
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 March 13, 2024 21:15
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)