Skip to content

Instantly share code, notes, and snippets.

View danielsnider's full-sized avatar

Daniel Snider danielsnider

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hmldd
hmldd / scroll.py
Last active October 6, 2023 14:59
Example of Elasticsearch scrolling using Python client
# coding:utf-8
from elasticsearch import Elasticsearch
import json
# Define config
host = "127.0.0.1"
port = 9200
timeout = 1000
index = "index"
from typing import List, Union
import json
from collections import defaultdict
class Model:
def __init__(self, graph, description="", author="", company="", license="", domain="", source=""):
self.graphs: List[Graph] = [graph]
self.description: str = description
self.author: str = author