Skip to content

Instantly share code, notes, and snippets.

@yuanying
yuanying / bryton-410-fit-amender.py
Created October 11, 2018 00:09
Fix fit file for Bryton Rider 410
#!/usr/bin/python
#
# Fit to TCX
#
# Copyright (c) 2012, Gustav Tiger <gustav@tiger.name>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
@caiorss
caiorss / Running.txt
Created July 23, 2018 08:08
C++ Scala JNI - Java Native Interface - Example - Calling C++ from Scala / Java
Compile the C++ code creating a shared library (or shared object in UNIX)
$ clang++ TestJNI.cpp -o libTestJNI.so -fPIC -shared -std=c++11 -I$HOME/opt/java/include -I$HOME/opt/java/include/linux
Run the application
$ scala -save load.scala
dir = /home/archbox/opengl/jni/libTestJNI.so
Hello world java
i = 0
@rao-abdul-mannan
rao-abdul-mannan / Spark2.2_CDH5.13_Jupyterhub
Last active March 30, 2021 07:28
This gist explains how to connect jupyterhub with Spark2 on CDH 5.13 Cluster
### This gist explains how to connect jupyterhub with Spark2 on CDH 5.13 Cluster.
Following below instructions, Spark can be configured with Jupyterhub on any cluster, standalone or locally etc
- Install jupyterhub by following instructions on official repo https://github.com/jupyterhub/jupyterhub
- Once installed, before configuring spark2 kernel first locate the jupyter's kernels directory.
On centos7, its under /usr/share/jupyter/kernels/
- Assuming all jupyterhub kernel's are in /usr/share/jupyter/kernels/
mkdir /usr/share/jupyter/kernels/pyspark2
- Create pyspark2 kernel
touch /usr/share/jupyter/kernels/pyspark2/kernel.json
@maaku
maaku / .gitignore
Last active November 17, 2020 21:53
BIP specifying fast merkle trees, as used in the Merkle branch verification opcodes
*~