Skip to content

Instantly share code, notes, and snippets.

View vibhatha's full-sized avatar
🏠
Working from home

Vibhatha Lakmal Abeykoon vibhatha

🏠
Working from home
View GitHub Profile
pip install eve
@vibhatha
vibhatha / .travis.yml
Created February 19, 2018 14:07
Travis Minimal File for Java Build
language: java
@vibhatha
vibhatha / main.py
Created February 19, 2018 17:08
Docker Flask REST API
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hey I'm using Docker!"
@app.route("/api/cpu")
def get_cpu:
@vibhatha
vibhatha / requirements.txt
Created February 19, 2018 17:10
Requiremetns for Flask API with Docker
Flask==0.11.1
@vibhatha
vibhatha / mnist_v1.py
Last active October 1, 2019 20:27
MNIST Basic Example with Cloudmesh
# replace the # with ! to run them in the Python Notebook
# pip install cloudmesh-installer
# pip install cloudmesh-common
import time
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Activation, Dropout
from keras.utils import to_categorical, plot_model
@vibhatha
vibhatha / arrow_source_build.sh
Created May 3, 2020 12:50
Arrow Building From Source
python3 -m venv ENVARROW_TEST
source ENVARROW_TEST/bin/activate
git clone https://github.com/apache/arrow.git
pip3 install -r arrow/python/requirements-build.txt -r arrow/python/requirements-test.txt
export ARROW_HOME=$(pwd)/dist
export LD_LIBRARY_PATH=$(pwd)/dist/lib:$LD_LIBRARY_PATH
echo $ARROW_HOME
echo $LD_LIBRARY_PATH
mkdir arrow/cpp/build
pushd arrow/cpp/build
@vibhatha
vibhatha / udf_example.py
Created April 4, 2022 03:46
Temporary holder for UDF Arrow Example
from typing import List
import pyarrow as pa
from pyarrow import compute as pc
from pyarrow.compute import register_function
from pyarrow.compute import InputType
def get_function_doc(summary: str, desc: str, arg_names: List[str],
options_class: str, options_required: bool = False):
func_doc = {}
// TODO remove functions
// debug functions
void PrintPyObject(std::string&& msg, PyObject* obj) {
std::cout << std::string('*', 100) << std::endl;
std::cout << "PrintPython Object:: " << msg << std::endl;
if(obj) {
PyObject *object_repr = PyObject_Repr(obj);
const char *s = PyUnicode_AsUTF8(object_repr);
std::cout << s << std::endl;
@vibhatha
vibhatha / vscode_apache_arrow_launch.json
Created November 8, 2022 05:37
Visual Studio Code Sample Lunch.json file for Apache Arrow development
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// "--gtest_filter=Substrait.BasicPlanRoundTripping"
"version": "0.2.0",
"configurations": [

Building Documentation

Install pre-requisites

Within the same conda environment created to build pyvelox install the following conda packages

conda install -c conda-forge pandoc
conda install -c anaconda sphinx