Skip to content

Instantly share code, notes, and snippets.

@cpcloud
cpcloud / adbc_snowflake.py
Last active August 7, 2023 18:07
adbc vs sfc
import os
import adbc_driver_manager as adm
import adbc_driver_manager.dbapi
import snowflake.connector as sfc
def adbc():
with adm.dbapi.connect(
driver="adbc_driver_snowflake",
@cpcloud
cpcloud / duckdb.ipy
Last active November 15, 2023 16:20
duckdb spatial wkb issue
In [53]: import duckdb
In [54]: con = duckdb.connect()
In [55]: con.load_extension("spatial")
In [56]: t = con.sql(
...: "select geom from st_read('./ci/ibis-testing-data/geojson/zones.geojson') limit 1"
...: )
@cpcloud
cpcloud / bq-ci-perf.ipynb
Last active April 17, 2024 14:00
BigQuery CI performance
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cpcloud
cpcloud / build.sh
Created September 19, 2024 16:38
script to build pyarrow pyodide wheel
#!/usr/bin/env bash
set -euo pipefail
export TZ=America/New_York DEBIAN_FRONTEND=noninteractive
apt-get update -y -qq
apt-get install -y build-essential software-properties-common git -qq
apt-get update -y -qq
apt-get autoremove python3 -y -qq
import re
import tree_sitter_python as tspython
from IPython import get_ipython
from IPython.core.completer import SimpleCompletion, SimpleMatcherResult
from tree_sitter import Language, Parser