┌─────────────────────────────────────────────────────────────┐
│ User Code (pandas-style) │
│ │
│ ds = DataStore.from_file("events.parquet") │
│ ds = ds[ds['age'] > 25] # filter │
│ ds = ds.groupby('city')['salary'].mean() │
│ print(ds) # triggers execution │
└──────────────────────┬──────────────────────────────────────┘
│
┌─────────────────────────────────────────────────────────────┐ │ User Code (pandas-style) │ │ │ │ ds = DataStore.from_file("events.parquet") │ │ ds = ds[ds['age'] > 25] # filter │ │ ds = ds.groupby('city')['salary'].mean() │ │ print(ds) # triggers execution │ └──────────────────────┬──────────────────────────────────────┘ │ ▼
| import chdb | |
| # Get total rows | |
| total_rows = int(chdb.query(""" | |
| SELECT COUNT(*) | |
| FROM postgresql('192.168.3.135', 'sample_db', 'users', 'postgres', 'mysecretpassword') | |
| """).bytes().strip()) | |
| # Calculate rows per file | |
| rows_per_file = -(-total_rows // 10) # Ceiling division |
| payload: | |
| - DOMAIN-SUFFIX,tailscale.com | |
| - DOMAIN-KEYWORD,quickconnect | |
| - DOMAIN-SUFFIX,linrc.com | |
| - DOMAIN-SUFFIX,ts.net | |
| - PROCESS-NAME,tailscale | |
| - PROCESS-NAME,tailscaled | |
| - DOMAIN-KEYWORD,derp | |
| - DOMAIN-KEYWORD,tailscale | |
| - DOMAIN-SUFFIX,r2.cloudflarestorage.com |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "strings" | |
| ) | |
| func main() { |
This article show you the ultimate way to set up a transparent proxy on Linux using clash and iptables to bypass the GFW in China.
We use:
- clash as the proxy software
- online subconverter and crontab to periodically update config file.
- ACL4SSR to provide GFW rules.
You can go to github gist to download all files mentioned in this article.
Based on ClickHouse Individual Contributor License Agreement v1.0
Thank you for your interest in chDB (https://github.com/chdb-io/chdb). In order to clarify the intellectual property license granted with Contributions from any person or entity, the author of chDB, Github User Name:[auxten] (https://github.com/auxten) ("Author")must have a Contributor License Agreement ("CLA") on file that has been signed, accepted or otherwise agreed to by each contributor, indicating agreement to the license terms below.
You accept and agree to the following terms and conditions for Your previous, present and future Contributions submitted to the Author. Except for the license granted herein to the Author and recipients of software distributed by the Author, You reserve all right, title, and interest in and to Your Contributions.
- Definitions. "You" (or "Your") shall mean the undersigned person/entity, which is the copyright owner or legal entity authorized by the cop
| #include <iostream> | |
| #include <fstream> | |
| #include <fcntl.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> | |
| #include <aws/core/Aws.h> | |
| #include <aws/s3/S3Client.h> | |
| #include <aws/s3/model/HeadObjectRequest.h> | |
| #include <aws/s3/model/GetObjectRequest.h> |
| 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' |
| import chdb | |
| data_path = "/home/Clickhouse/bench/uniswap_v2_trading_data/*.csv" | |
| small_data_path = "/home/Clickhouse/bench/uniswap_v2_trading_data/v2_trading_history_14025747.csv" | |
| print("Sample: ", | |
| chdb.query(f"select * from file('{data_path}', 'CSVWithNames') limit 10", "PrettyCompact").data()) | |
| print("Count: ", chdb.query(f"select count(*) from file('{data_path}', 'CSVWithNames')").data()) | |
| # ret = chdb.query( |