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 os | |
import time | |
import pandas as pd | |
import pyarrow as pa | |
import chdb | |
import subprocess | |
# file size 117MB | |
data_path = '/home/Clickhouse/bench/hits_0.parquet' |
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
"""coalesce_parquets.py | |
gist of how to coalesce small row groups into larger row groups. | |
Solves the problem described in https://issues.apache.org/jira/browse/PARQUET-1115 | |
""" | |
from __future__ import annotations | |
from pathlib import Path | |
from typing import Callable, Iterable, TypeVar |
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
/* | |
Copyright (C) 2019 Simon Schmidt | |
Usage of the works is permitted provided that this instrument is retained with | |
the works, so that any entity that uses the works is notified of this instrument. | |
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. | |
*/ | |
const hyperswarm = require('hyperswarm'); |
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 ubuntu as ubuntu | |
RUN apt-get update | |
RUN apt-get install -y dpkg-dev wget gnupg2 curl | |
ARG ubuntu_packages="wget htop default-jre-headless apt-transport-https nvidia-container-toolkit cuda-drivers libopengl0 linux-image-extra-virtual omnisci" | |
WORKDIR /opt/packages/deb | |
# Nvidia-Docker |
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
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB | |
#/32 = 496630545 = 473MB | |
#/64 = 248315272 = 236MB | |
#/128 = 124157636 = 118MB | |
#/256 = 62078818 = 59MB | |
#/512 = 31039409 = 29MB | |
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762 | |
#/25165760 = 623 # half of max_connections = 1993.6MB | |
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608 | |
#*(3/4) #default innodb pool size = 11922309120 |
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
randomByte = function() { | |
return Math.round(Math.random()*256); | |
} | |
randomIp = function() { | |
var ip = randomByte() +'.' + | |
randomByte() +'.' + | |
randomByte() +'.' + | |
randomByte(); | |
if (isPrivate(ip)) return randomIp(); |
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
var sip = require('sip'); | |
var sys = require('sys'); | |
var redis = require('redis'); | |
//Trim leading and trailing whitespace from string values. | |
function trim(str) { | |
return str.replace(/^\s+|\s+$/g, ''); | |
} | |
sip.start({},function(request) { |