Dieu se rit des hommes qui déplorent les effets dont ils chérissent les causes
Jacques-Bénigne Bossuet
| -- idea and dictionaries taken from https://github.com/andreasonny83/unique-names-generator | |
| create type word_kind as enum('animal', 'color', 'adjective'); | |
| -- insert animals | |
| create table animal_words( | |
| word text primary key | |
| ); |
| import networkx as nx | |
| import scipy | |
| import inspect | |
| from abc import ABC | |
| class OutOfMemoryException(Exception): | |
| pass | |
| class OutOfCpuResourcesException(Exception): | |
| pass |
| open Belt | |
| let {then, thenResolve, catch, resolve, reject} = module(Promise) | |
| module PgResult = { | |
| module FieldInfo = { | |
| type t = private { | |
| name: string, | |
| dataTypeId: string, | |
| } |
| dune build --verbose | |
| Shared cache: disabled | |
| Workspace root: /Users/paul/code/stork | |
| Auto-detected concurrency: 8 | |
| Running[0]: /Users/paul/.opam/default/bin/ocamlc.opt -config > /var/folders/2k/9dsd6lhj3g5gj0zvj6s75g8w0000gn/T/dune_da6911_output | |
| Dune context: | |
| { name = "default" | |
| ; kind = "default" | |
| ; profile = Dev | |
| ; merlin = true |
Dieu se rit des hommes qui déplorent les effets dont ils chérissent les causes
Jacques-Bénigne Bossuet
| CREATE OR REPLACE FUNCTION column_exists( | |
| pschema TEXT, | |
| ptable TEXT, | |
| pcolumn TEXT) | |
| RETURNS BOOLEAN AS $BODY$ | |
| -- does the requested table.column exist in schema? | |
| SELECT EXISTS | |
| ( SELECT NULL | |
| FROM information_schema.columns | |
| WHERE table_name=ptable |
| let intToString = Js.Int.toString | |
| type localeCode = En_US | |
| let localeCodeToString = x => | |
| switch x { | |
| | En_US => "en-US" | |
| } | |
| let localeCodeFromString = x => |
| from elasticsearch import Elasticsearch | |
| from elasticsearch.helpers import bulk | |
| es_host = "MY_ES_URL:PORT" | |
| user = "MY_USERNAME" | |
| secret = "MY_PASSWORD" | |
| file_path = "/PATH/TO/FILE.ndjson" | |
| index = "INDEX_NAME" | |
| doc_type = "_doc" |