Skip to content

Instantly share code, notes, and snippets.

@alarictabaries
alarictabaries / ops.yaml
Created April 30, 2025 11:26
Open Patent Services API 3.2 OAS 3.0
openapi: 3.0.1
info:
title: Open Patent Services API
version: "3.2"
servers:
- url: https://ops.epo.org/3.2/rest-services
paths:
/published-data/search:
get:
tags:
@alarictabaries
alarictabaries / Dockerfile
Created March 26, 2025 14:03
Exo dockerfile
FROM nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
curl \
git \
clang \
libgl1 \
@alarictabaries
alarictabaries / ape_codes_with_parents.json
Created September 12, 2024 21:24
Codes APE / NAF avec intitulés et catégories parentes au format JSON
[
{
"code": "01.11Z",
"label": "Cult céréale, légumineuse, graine oléag.",
"parent_code": "01.1",
"parent_label": "Cultures non permanentes",
"parent_parent_code": "01",
"parent_parent_label": "Cult. & prod. animale, chasse & sce ann."
},
{
@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"