Skip to content

Instantly share code, notes, and snippets.

View SadatAnwar's full-sized avatar

Sadat Anwar SadatAnwar

View GitHub Profile
@SadatAnwar
SadatAnwar / simple_websocket.html
Last active August 24, 2018 11:24
A working implementation of the super simple websocket python server
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>
Syeds-MacBook-Pro:libnd4jC Sadat$ ./buildnativeoperations.sh blas cpu
eval cmake
RUNNING OSX CLANG
Running blas
RUNNING COMMAND cmake
-- The C compiler identification is AppleClang 7.3.0.7030029
-- The CXX compiler identification is Clang 3.5.0
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
eval cmake
RUNNING OSX CLANG
Running blas
RUNNING COMMAND cmake
-- The C compiler identification is AppleClang 7.3.0.7030029
-- The CXX compiler identification is Clang 3.5.0
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
export LIBND4J_HOME=/Users/Sadat/workspace/libnd4jC
export OPENMP_HOME=/usr/local/Cellar/libiomp/20150227
export CLANGOMP_HOME=/usr/local/Cellar/clang-omp/2015-04-01
export PATH=$CLANGOMP_HOME/bin:$PATH
export C_INCLUDE_PATH=$CLANGOMP_HOME/libexec/include/clang-c:$OPENMP_HOME/include/libiomp:$C_INCLUDE_PATH
export CXX_INCLUDE_PATH=$CLANGOMP_HOME/libexec/include/clang-c:$OPENMP_HOME/include/libiomp:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$CLANGOMP_HOME/libexec/include/c++/v1:$OPENMP_HOME/include/libiomp:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=$CLANGOMP_HOME/libexec/lib:$OPENMP_HOME/include/libiomp:$LIBRARY_PATH
export LD_LIBRARY_PATH=$CLANGOMP_HOME/libexec/lib:$OPENMP_HOME/include/libiomp:$LD_LIBRARY_PATH
#export DYLD_LIBRARY_PATH=$OPENMP_HOME/include:$LD_LIBRARY_PATH
Apr 11, 2016 5:36:54 PM com.github.fommil.jni.JniLoader liberalLoad
INFORMATION: successfully loaded C:\Users\anwar\AppData\Local\Temp\jniloader4979311375860710700netlib-native_system-win-x86_64.dll
2016-04-11 17:36:54.916 [1] INFO: (Reflections.java:229): Reflections took 103 ms to scan 6 urls, producing 118 keys and 379 values
Exception in thread "main" java.lang.AbstractMethodError: org.nd4j.linalg.cpu.CpuNDArrayFactory.toFlattened(CLjava/util/Collection;)Lorg/nd4j/linalg/api/ndarray/INDArray;
at org.nd4j.linalg.factory.Nd4j.toFlattened(Nd4j.java:1577)
at org.deeplearning4j.nn.layers.BaseLayer.params(BaseLayer.java:260)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.params(MultiLayerNetwork.java:846)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.pack(MultiLayerNetwork.java:905)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.initMask(MultiLayerNetwork.java:1769)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.init(MultiLayerNetwork.java:364)
$ bash buildnativeoperations.sh blas cuda
eval cmake
Running windows
Running blas
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
wifiWatcher = nil
officeSSID = "reBuy.com"
homeSSID = "Devil's Enclave"
lastSSID = hs.wifi.currentNetwork()
function ssidChangedCallback()
newSSID = hs.wifi.currentNetwork()
if newSSID == officeSSID and lastSSID ~= officeSSID then
-- We just joined our office WiFi network