This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
import contextlib | |
from pprint import pprint as pp | |
from google.cloud import bigquery | |
client = bigquery.Client() | |
def cq(sql, *a, **k): | |
pp(list(client.query(sql, *a, **k))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dev.j1m; | |
import com.google.cloud.bigtable.hbase.BigtableConfiguration; | |
import org.apache.hadoop.hbase.Cell; | |
import org.apache.hadoop.hbase.TableName; | |
import org.apache.hadoop.hbase.client.*; | |
import org.apache.hadoop.hbase.util.Bytes; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pprint import pprint | |
import psycopg2 | |
import uuid | |
from contextlib import closing | |
setup_sql = """ | |
create table data (id int primary key, state jsonb, isc bool); | |
create table stage (id int primary key, state jsonb, isc bool); | |
create or replace function find_cid(fid int, fstate jsonb, fisc bool) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[buildout] | |
parts = server | |
[server] | |
=> zeo config | |
recipe = zc.zdaemonrecipe | |
program = ${buildout:bin-directory}/runzeo -C ${config:location} | |
[zeo] | |
recipe = zc.recipe.egg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<zeo> | |
address localhost:8100 | |
read-only false | |
invalidation-queue-size 100 | |
pid-filename zeoserver.pid | |
</zeo> | |
<filestorage 1> | |
path Data.fs | |
blob-dir blobstorage | |
</filestorage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=> create index pgtextindex_text_vector_idx on pgtextindex using gin (text_vector); | |
CREATE INDEX | |
=> analyze pgtextindex; | |
ANALYZE | |
=> \d pgtextindex | |
Table "public.pgtextindex" | |
Column | Type | Modifiers | |
-------------------+-----------------------------+---------------------- | |
docid | integer | not null | |
community_docid | character varying(100) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Non-history-preserving storage Python 3 on Mac OS X 10.10.4 2.3 GHz Intel Core i7 16GB, Postgres 9.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Summarize a file-storage 1 formatted file, mainly as a way of | |
/// gaging rust performance. This is more or less eqivalent to the | |
/// following Python/ZODB script: | |
/// | |
/// import ZODB.FileStorage | |
/// import sys | |
/// | |
/// def main(): | |
/// it = ZODB.FileStorage.FileIterator(sys.argv[1]) | |
/// transactions = records = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Summarize a file-storage 1 formatted file, mainly as a way of | |
/// gaging rust performance. This is more or less eqivalent to the | |
/// following Python/ZODB script: | |
/// | |
/// import ZODB.FileStorage | |
/// import sys | |
/// | |
/// def main(): | |
/// it = ZODB.FileStorage.FileIterator(sys.argv[1]) | |
/// transactions = records = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import logging | |
import multiprocessing | |
import os | |
import persistent | |
import re | |
import time | |
import ZODB | |
from BTrees.IOBTree import BTree |
NewerOlder