Skip to content

Instantly share code, notes, and snippets.

View chamathabeysinghe's full-sized avatar

Chamath Abeysinghe chamathabeysinghe

View GitHub Profile
import org.apache.sysml.api.DMLException;
import org.apache.sysml.api.jmlc.Connection;
import org.apache.sysml.api.jmlc.PreparedScript;
public class Main {
public Main() throws DMLException {
}
public static void main(String args[]) throws DMLException {
ml = MLContext(spark)
matrixScript = dml(
"""
fileM = 'test_csv.csv'
numRowsToPrint = ifdef($rowsToPrint, 2) # default to 2
numColsToPrint = ifdef($colsToPrint, 2) # default to 2
m = read(fileM)
fileM = $M #read the file given by M
numRowsToPrint = ifdef($rowsToPrint, 2) # default to 2
numColsToPrint = ifdef($colsToPrint, 2) # default to 2
m = read(fileM)
for (i in 1:numRowsToPrint) {
for (j in 1:numColsToPrint) {
print('[' + i + ',' + j + ']:' + as.scalar(m[i,j]))
# coding: utf-8
# # Object Detection Demo
# Welcome to the object detection inference walkthrough! This notebook will walk you step by step through the process of using a pre-trained model to detect objects in an image. Make sure to follow the [installation instructions](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md) before you start.
# # Imports
# In[1]:
@chamathabeysinghe
chamathabeysinghe / Dockerfile
Last active November 7, 2017 16:57
android docker file
FROM openjdk:8-jdk
CMD ["gradle"]
ENV GRADLE_HOME /opt/gradle
ENV ANDROID_HOME /opt/android
ENV GRADLE_VERSION 4.2.1
ARG GRADLE_DOWNLOAD_SHA256=b551cc04f2ca51c78dd14edb060621f0e5439bdfafa6fd167032a09ac708fbc0