| Algorithm | Deletions | Merges | Notes |
|---|---|---|---|
| Bloom Filter | difficult | yes - not dynamic | classic |
| Cuckoo Filter | YES | YES | modern |
| XOR Filter | no | no | modern |
| Quotient Filter | YES | YES | SSD friendly |
| CQF | yes | yes | high performance |
| Binary Fuse Filter | no | no | extremely compact modern |
| Ribbon Filter | no | no | space efficient new design |
| Algorithm | Strength |
|---|---|
| KLL | General purpose |
| REQ | Optimised for high quantiles (99th, 99.9th) |
| DDSketch | Constant relative error across all quantiles |
| t-Digest | Highly accurate at the tails |
| Algorithm | Memory | Accuracy | Notes |
|---|---|---|---|
| HyperLogLog | Small | ~1% | Industry standard |
| CPC | Smaller | Apache DataSketches; more complex | |
| UltraLogLog | Very compact | Similar | Modern variant; even more complex |
| Algorithm | Memory | Accuracy | Notes |
|---|---|---|---|
| Count-Min Sketch | Small | ~1% | Simple, widely supported |
| Misra-Gries | Small | Exact top-K | Deterministic but less mergeable |
| Count Sketch | Small | Better for sparse data | Handles negative updates |
| SpaceSaving | Small | Accurate | Used in streaming systems |
This file contains hidden or 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
| options_query: fn query, _assigns -> | |
| select_merge( | |
| query, | |
| [media], | |
| %{label: fragment("concat(?, ', ', ?)", media.caption, media.original_file)} | |
| ) | |
| end |
This file contains hidden or 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
| defmodule Answer do | |
| use Ecto.Schema | |
| schema "answer" do | |
| field :word, :string | |
| field :length, :integer, virtual: true | |
| end | |
| end | |
| Repo.insert(%Answer{word: "SWANS"}) |
This file contains hidden or 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
| curl -X 'GET' "$XENI_API_HOST/api/accommodation_searches/accommodation?search_id=962c9315-0e35-45e3-b158-be10c860912d&property_id=40553&raw=true" \ | |
| -H "accept: application/json" \ | |
| -H "authorization: bearer: $XENI_TOKEN" | |
This file contains hidden or 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
| curl -X 'POST' \ | |
| "$XENI_API_HOST/api/accommodation_searches/search" \ | |
| -H "accept: application/json" \ | |
| -H "Content-Type: application/json" \ | |
| -H "authorization: bearer: $XENI_TOKEN" \ | |
| -d '{ | |
| "check_in": "2023-08-27", | |
| "check_out": "2023-08-30", | |
| "destination_id": "bbc35c49-d2a7-431a-ac40-a4944c3a00e7", | |
| "occupancies": [ |
This file contains hidden or 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
| export XENI_API_HOST="https://xenitravelapi-beta01.gigalixirapp.com" | |
| export XENI_USER_EMAIL="some@email.com" | |
| export XENI_USER_PASSWORD="some password" | |
| export XENI_TOKEN=$(curl -X 'POST' $XENI_API_HOST/api/accounts/get_token \ | |
| -H 'accept: application/json' \ | |
| -H 'content-type: application/json' \ | |
| -d '{"user":{"email": "'"$XENI_USER_EMAIL"'", "password": "'"$XENI_USER_PASSWORD"'"}}' \ | |
| | sed "s/{.*\"token\":\"\([^\"]*\).*}/\1/g") | |
This file contains hidden or 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
| curl -X 'POST' "$XENI_API_HOST/api/accounts/get_token" \ | |
| -H "accept: application/json" \ | |
| -H "content-type: application/json" \ | |
| -d '{"user":{"email": "'"$XENI_USER_EMAIL"'", "password": "'"$XENI_USER_PASSWORD"'"}}' | |
| {"token":"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ4ZW5pX3RyYXZlbF9hcGkiLCJleHAiOjE2OTI0MTA1ND9A"} |
NewerOlder