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
using Arrow, DataFrames | |
using PyCall | |
""" | |
Convert the Arrow bytestream into a DataFrame, process it, | |
and return the resulting DataFrame as a Python bytestream. | |
""" | |
function process_arrowbytes( bytes::Vector{UInt8} )::PyObject | |
df = DataFrame(Arrow.Table(bytes)) # convert bytestream into a DataFrame | |
result = process_dataframe( df ) # run some arbitrary function |
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
from julia.api import Julia | |
import pyarrow as pa | |
def process_dataframe_jl(df): | |
"""Process DataFrame in Julia; return the resulting DataFrame""" | |
bytes = df_to_arrowbytes(df) # convert df into Arrow bytestream | |
jl = Julia(compiled_modules=False) # create / get Julia instance | |
jl.eval('include("process_dataframe.jl"') # this script contains my Julia function |
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
function waitForElm(selector) { | |
return new Promise(resolve => { | |
if (document.querySelector(selector)) { | |
return resolve(document.querySelector(selector)); | |
} | |
const observer = new MutationObserver(mutations => { | |
if ((document.querySelector(selector) !== undefined) && | |
(document.querySelector(selector) !== null)) { | |
resolve(document.querySelector(selector)); |