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
#include <iostream> | |
#include <string> | |
#include <charconv> | |
#include <cassert> | |
template <typename> | |
constexpr std::false_type can_to_chars_helper (long); | |
template <typename T> | |
constexpr auto can_to_chars_helper (int) |
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 tempfile | |
import pandas as pd | |
from fastparquet import write | |
with tempfile.TemporaryDirectory() as tempdir: | |
df = pd.DataFrame({"x": [1, 1, 1, 2, 2, 2], "y": [1, 2, 3, 4, 5, 6]}) |
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
// Licensed to the Apache Software Foundation (ASF) under one | |
// or more contributor license agreements. See the NOTICE file | |
// distributed with this work for additional information | |
// regarding copyright ownership. The ASF licenses this file | |
// to you under the Apache License, Version 2.0 (the | |
// "License"); you may not use this file except in compliance | |
// with the License. You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// |
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 psutil | |
import numpy as np | |
import pyarrow as pa | |
import pyarrow.ipc as ipc | |
process = psutil.Process(os.getpid()) | |
Mi = 1 << 20 |
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
initial mem usage 230264832 0 | |
mem usage 324423680 80000000 | |
mem usage 324423680 80000000 | |
mem usage 328425472 81360000 | |
mem usage 328536064 81360000 | |
mem usage 328601600 81360000 | |
mem usage 328486912 81360000 | |
mem usage 328519680 81360000 | |
mem usage 328663040 81360000 | |
mem usage 328474624 81360000 |
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 pyarrow as pa | |
import pyarrow.compute as pc | |
import pyarrow.dataset as ds | |
table = pa.Table.from_pydict({'x': [1, 2, 3], 'y': ['a', 'a', 'b']}) | |
expr = (ds.field('x') > 1) & (ds.field('y') == 'a') | |
print(ds.Scanner.from_batches(table.to_batches(), schema=table.schema, columns={'result': expr}).to_table().column(0)) | |
# [ [ false, true, false ] ] |
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 pandas as pd | |
df = pd.DataFrame({'x': [[1, 2], "hello"]}) | |
# Will fail because x is not homogenous | |
# df.to_feather('/tmp/foo.arrow') | |
df.to_json('/tmp/foo.json') | |
# Will create: | |
# { | |
# "x": { |
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
value | |
0 first_val | |
1 first_val | |
2 first_other | |
3 first_other | |
4 first_val | |
5 first_other | |
6 second_new | |
7 second_other | |
value |
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
cmake_minimum_required(VERSION 3.3) | |
set(CMAKE_CXX_STANDARD 11) | |
project(app LANGUAGES CXX) | |
#Set the location of where Windows can find the installed libraries of the SDK. | |
if(MSVC) | |
string(REPLACE ";" "/aws-cpp-sdk-all;" SYSTEM_MODULE_PATH "${CMAKE_SYSTEM_PREFIX_PATH}/aws-cpp-sdk-all") | |
list(APPEND CMAKE_PREFIX_PATH ${SYSTEM_MODULE_PATH}) | |
endif() |
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
Car | MPG | Cylinders | Displacement | Horsepower | Weight | Acceleration | Model | Origin | |
---|---|---|---|---|---|---|---|---|---|
Chevrolet Chevelle Malibu | 18.0 | 8 | 307.0 | 130.0 | 3504. | 12.0 | 70 | US | |
Buick Skylark 320 | 15.0 | 8 | 350.0 | 165.0 | 3693. | 11.5 | 70 | US | |
Plymouth Satellite | 18.0 | 8 | 318.0 | 150.0 | 3436. | 11.0 | 70 | US | |
AMC Rebel SST | 16.0 | 8 | 304.0 | 150.0 | 3433. | 12.0 | 70 | US | |
Ford Torino | 17.0 | 8 | 302.0 | 140.0 | 3449. | 10.5 | 70 | US | |
Ford Galaxie 500 | 15.0 | 8 | 429.0 | 198.0 | 4341. | 10.0 | 70 | US | |
Chevrolet Impala | 14.0 | 8 | 454.0 | 220.0 | 4354. | 9.0 | 70 | US | |
Plymouth Fury iii | 14.0 | 8 | 440.0 | 215.0 | 4312. | 8.5 | 70 | US | |
Pontiac Catalina | 14.0 | 8 | 455.0 | 225.0 | 4425. | 10.0 | 70 | US |