Skip to content

Instantly share code, notes, and snippets.

View ngzax's full-sized avatar
😎
delivering!

Daryl Richter ngzax

😎
delivering!
View GitHub Profile

Sadly due to the nature of the migration from links to graph store, it was not technically feasible to do a seamless migration. Instead, the latest OTA has moved all the link collections into graph-store, as archived graphs. As links now uses a client-server topology, groups should decide amongst themselves who should host the link collections, in order to prevent everybody hosting a different copy. If you would like to host a publically accessible link collection that you were in prior to the OTA, then you must do the following.

Work out what your resource identifier is

In the dojo, run

:graph-store +dbug [%state '~(key by archive)']
> {[entity=~nus name=%posts-853] [entity=~nus name=%music-384]}
:: :- :* title+"urbit-flavored markdown docs"
:: author+"ted blackman"
:: date+~2017.8.25
:: ==
::
;>
# udon: urbit-flavored markdown
## overview
@RealOrangeOne
RealOrangeOne / README.md
Last active February 23, 2024 11:27
Trello JSON parser

Trello Parser

Download

Open a terminal, run this:

sudo curl https://gist.githubusercontent.com/RealOrangeOne/c35751ee794e90df512bdfba6f22574d/raw/trello-parser.py -o /usr/bin/trelloparse && sudo chmod +x /usr/bin/trelloparse

Usage

$ trelloparse -h

usage: tp [-h] input output

Recent versions of Cloudera's Impala added NDV, a "number of distinct values" aggregate function that uses the HyperLogLog algorithm to estimate this number, in parallel, in a fixed amount of space.

This can make a really, really big difference: in a large table I tested this on, which had roughly 100M unique values of mycolumn, using NDV(mycolumn) got me an approximate answer in 27 seconds, whereas the exact answer using count(distinct mycolumn) took ... well, I don't know how long, because I got tired of waiting for it after 45 minutes.

It's fun to note, though, that because of another recent addition to Impala's dialect of SQL, the fnv_hash function, you don't actually need to use NDV; instead, you can build HyperLogLog yourself from mathematical primitives.

HyperLogLog hashes each value it sees, and then assigns them to a bucket based on the low order bits of the hash. It's common to use 1024 buckets, so we can get the bucket by using a bitwise & with 1023:

select
#!/bin/bash
# This script is edited by Brice Dutheil
# See there in french http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
# Translate button is broken for now, please use Google to translate this website.
#
# 2013/10/30 Updated for OS X 10.9.
#
# 2013/05/11 Added a few more guidance when Java Preferences is not available anymore
# Added a simple example of a JDK switch function.