Skip to content

Instantly share code, notes, and snippets.

@Dumbris
Dumbris / jq-cheetsheet.md
Created December 4, 2019 13:11 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@Dumbris
Dumbris / linkcsv.py
Created November 26, 2019 16:01
Add web interface to cvsdedupe console tool for deduplication and record linkage
import mock
import myconvenience
from csvdedupe import csvhelpers, csvlink
def myConsoleLabel(deduper): # pragma: no cover
return myconvenience.consoleLabel(deduper)
def launch_new_instance():
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import collections
import itertools
import sys
from dedupe.core import randomPairs, randomPairsMatch
from dedupe.canonical import getCanonicalRep
import trunklucator
@Dumbris
Dumbris / uset_nmslib.py
Created July 11, 2019 06:25
Universal Sentence Encoder + nmslib for kNN search. Minimal example.
import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
import pandas as pd
import nmslib
docs = \
"""good beer
sweet bready malt noticeable
good one share friends nice statement