Skip to content

Instantly share code, notes, and snippets.

Avatar

Francois Vanderseypen Orbifold

View GitHub Profile
@Orbifold
Orbifold / Cora.nb
Created Sep 10, 2021
Loading the Cora dataset and using black-box Wolfram machine learning to predict edges.
View Cora.nb
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 12.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
@Orbifold
Orbifold / ZeppelinPlot.py
Created Nov 17, 2016
Zeppelin plotly example.
View ZeppelinPlot.py
# if needed, install plotly via shell like so
%sh pip install plotly
#---
%pyspark
import plotly
import numpy as np
from plotly.graph_objs import Scatter, Layout
@Orbifold
Orbifold / rsa.py
Created Jul 20, 2018
RSA mechanics with pycryptodome
View rsa.py
#========================================
# create public and private keys
#========================================
from Crypto.PublicKey import RSA
key = RSA.generate(2048)
private_key = key.exportKey()
with open("./private.pem", "wb") as f:
@Orbifold
Orbifold / GraphSageLinkPrediction.ipynb
Last active Aug 13, 2020
Using GraphSage for link predictions. So much fun.
View GraphSageLinkPrediction.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Embedding and Tokenizer in Keras.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View CSVGenerator.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Keras hello world.md

Using Keras (now part of TensorFlow) is really easy. The complexity comes when you deal with large amounts of data figuring out the topology of a neural network. With the topology comes hyperparameter tuning and all that. It's a bit like painting: it's easy to hold a brush but it takes years to paint something worth looking at.

	import tensorflow as tf
	from tensorflow.keras.models import Sequential
	from tensorflow.keras.layers import Dense
@Orbifold
Orbifold / sparkCsv.kt
Created Mar 1, 2020
Load a csv file into Spark with Kotlin.
View sparkCsv.kt
import org.apache.spark.sql.Dataset
import org.apache.spark.sql.Row
import org.apache.spark.sql.SparkSession
public fun main() {
val session = SparkSession.Builder()
.appName("Swa Spark")
.master("local")
.orCreate
val df: Dataset<Row> = session.read().format("csv")
@Orbifold
Orbifold / LaplacianEigenmaps.ipynb
Last active Oct 30, 2019
Using the Laplacian of a graph to predict node labels.
View LaplacianEigenmaps.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Orbifold
Orbifold / CommunityDetection.ipynb
Last active Oct 7, 2019
Community Detection using NetworkX
View CommunityDetection.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.