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
def foo(): | |
try: | |
pass | |
except: | |
print() |
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
{ | |
"nodes": { | |
"flake-utils": { | |
"locked": { | |
"lastModified": 1667395993, | |
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", | |
"owner": "numtide", | |
"repo": "flake-utils", | |
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", | |
"type": "github" |
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
{ | |
"nodes": { | |
"flake-utils": { | |
"locked": { | |
"lastModified": 1667395993, | |
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", | |
"owner": "numtide", | |
"repo": "flake-utils", | |
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", | |
"type": "github" |
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
""" | |
Given a URL pointing to a Parquet file, how do I get the schema from that file | |
as cheaply as possible? | |
Example URL (75 MB): | |
https://storage.googleapis.com/ibis-tutorial-data/wowah_data/wowah_data_raw.parquet | |
""" | |
PARQUET_MAGIC = b"PAR1" |
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
tconst | titleType | primaryTitle | originalTitle | isAdult | startYear | endYear | runtimeMinutes | genres | |
---|---|---|---|---|---|---|---|---|---|
tt0030540 | movie | Outside of Paradise | Outside of Paradise | 0 | 1938 | \N | 68 | Comedy,Musical,Romance | |
tt0030541 | movie | The Strange Case of Dr. Meade | The Strange Case of Dr. Meade | 0 | 1938 | \N | 60 | Adventure,Drama,Romance | |
tt0030542 | movie | Over She Goes | Over She Goes | 0 | 1937 | \N | 78 | Musical | |
tt0030543 | movie | Over the Wall | Over the Wall | 0 | 1938 | \N | 67 | Drama,Romance | |
tt0030544 | movie | The Overland Express | The Overland Express | 0 | 1938 | \N | 55 | Western | |
tt0030545 | movie | Overland Stage Raiders | Overland Stage Raiders | 0 | 1938 | \N | 55 | Western | |
tt0030546 | movie | To the Victor | Owd Bob | 0 | 1938 | \N | 78 | Comedy,Drama,Family | |
tt0030547 | movie | Father of More Than Four | Padre de más de cuatro | 0 | 1938 | \N | 110 | Comedy | |
tt0030548 | movie | Painted Desert | Painted Desert | 0 | 1938 | \N | 58 | Western |
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
import contextlib | |
import time | |
from datetime import timedelta | |
import ibis | |
import pandas as pd | |
from ibis import _ | |
def pandas(): |
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
from pprint import pprint as print | |
import duckdb | |
import ibis | |
garbage = """ | |
DROP TABLE IF EXISTS demo_data; | |
CREATE TABLE demo_data ( | |
event_id INT |
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
{ | |
"nodes": { | |
"flake-utils": { | |
"locked": { | |
"lastModified": 1644229661, | |
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", | |
"owner": "numtide", | |
"repo": "flake-utils", | |
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", | |
"type": "github" |
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
library(ggplot2) | |
library(stringr) | |
library(tidyr) | |
library(ggh4x) | |
library(bigrquery) | |
library(DBI) | |
library(dplyr, warn.conflicts = FALSE) | |
library(lubridate, warn.conflicts = FALSE) |
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
import sqlalchemy as sa | |
import sqlparse | |
def issue_sql(con): | |
part = con.table("part") | |
supplier = con.table("supplier") | |
partsupp = con.table("partsupp") | |
q = part.join(partsupp, part.P_PARTKEY == partsupp.PS_PARTKEY) |