Skip to content

Instantly share code, notes, and snippets.

View justindavies's full-sized avatar

Justin Davies justindavies

View GitHub Profile
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: api-ingress
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/use-regex: "true"
[
{
"data": [
{
"x": 2013,
"y": 1
},
{
"x": 2014,
"y": 3
@justindavies
justindavies / extract_ners.py
Last active May 19, 2020 00:42
Extract NER
from elasticsearch import Elasticsearch
import spacy
import os
import json
from pymongo import MongoClient
from spacy.pipeline import EntityRuler
import hashlib
import inflection
def set_custom_boundaries(doc):
import sys
import json
fo = open(sys.argv[1], "r")
lines = fo.readlines()
for line in lines: