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
class Vint { | |
constructor(_io) { | |
this._io = _io; | |
} | |
_read() { | |
this.val = this._io.readU1(); | |
// negative value | |
if ((this.val & 0x80) > 0) { |
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
cmake_minimum_required(VERSION 3.16) | |
project(hello_cmake_boost_python) | |
# find the python include libraries on our system and our boost installation | |
find_package(Python3 REQUIRED COMPONENTS Development NumPy) | |
find_package(Boost REQUIRED COMPONENTS python3) | |
find_package(Arrow REQUIRED) | |
# create our "hello" shared library (.so) which will be imported from Python | |
add_library(hello SHARED hello.cpp) |
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 pyarrow as pa | |
import socket | |
HOST = '127.0.0.1' | |
PORT = 9143 | |
def read_bytes(sock, n): | |
data = b'' | |
while len(data) < n: | |
more = sock.recv(n - len(data)) |
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
const categories = document.querySelector("#category_taxonomy_list"); | |
// get each h2 and div pair from categories | |
const categoryPairs = Array.from(categories.children).filter( | |
(child) => child.tagName === "H2" || child.tagName === "DIV" | |
); | |
// group the h2 and div pairs into an array of arrays | |
const categoryGroups = []; | |
for (let i = 0; i < categoryPairs.length; i += 2) { | |
categoryGroups.push(categoryPairs.slice(i, i + 2)); |