Skip to content

Instantly share code, notes, and snippets.

@alarictabaries
alarictabaries / chercher_entreprises.py
Last active February 22, 2024 14:53
Recherche d'entreprises via l'API recherche-entreprises.api.gouv.fr et insertion dans une base de données Elasticsearch
import requests
from pprint import pprint
from elasticsearch import Elasticsearch, helpers
# Connexion à l'instance ElasticSearch
es = Elasticsearch(hosts="http://elastic:changeme@localhost:9200/")
# On crée une fonction pour récupérer les informations des entreprises
# avec comme argument : page pour la page actuelle que l'on récupère
import epo_ops
import xml.etree.ElementTree as ET
# https://link.epo.org/web/how_to_test_OPS_en.pdf
client = epo_ops.Client(key='', secret='') # Instantiate client
response = client.published_data_search('in all "alaric tabaries"', range_begin=1, range_end=25, constituents=None)
documents = []
# syntax=docker/dockerfile:1.3
# previous command for builder buildkit compatibility, I guess. https://docs.docker.com/engine/reference/builder/
#For the manual installation on which that dockerfile is based go to :https://docs.ip-tools.org/patent2net/index.html
# Run the ubuntu image of docker
FROM centos:8
#Set Environment langage Profile
#ENV container docker
@alarictabaries
alarictabaries / Kibana Dev Tools commands
Created December 7, 2021 11:00
Kibana Dev Tools commands
POST index/_search
{
"query": {
"match": {
"field": "value"
}
},
"fields": [
"field1",
"field2"