Skip to content

Instantly share code, notes, and snippets.

Alex Minnaar alexminnaar

Block or report user

Report or block alexminnaar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alexminnaar / ludii_jni_example.cpp
Last active Sep 14, 2019
Using the Ludii jar in cpp with JNI and calling the `listGames()` method
View ludii_jni_example.cpp
//compiled with g++ -g -I/usr/lib/jvm/java-8-openjdk-amd64/include -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux -L/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/ ludii_jni_example.cpp -ljvm
#include <iostream>
#include <string.h>
#include <jni.h>
#include <stdlib.h>
using namespace std;
#define PATH_SEPARATOR ';'
alexminnaar /
Created Jun 17, 2019
depth-first search
class Node:
def __init__(self, x):
self.val = x
self.children = []
def dfs(node, target):
# if the node is found then return it
if node.val == target:
return node
alexminnaar / gist:a286912efa417dfd0f25bd33992c3d6b
Created Mar 27, 2017
Joint image/text classifier in Keras
View gist:a286912efa417dfd0f25bd33992c3d6b
import numpy as np
from keras.layers import Dropout
from keras import applications
from keras.layers import Dense, GlobalAveragePooling2D, merge, Input
from keras.models import Model
max_words = 10000
epochs = 50
batch_size = 32
alexminnaar / gist:8f9ed5eb61dcef22c35eefcf2d7022b1
Last active Aug 25, 2016
Balanced Interleaving Algorithm
View gist:8f9ed5eb61dcef22c35eefcf2d7022b1
import random
def a_start_check():
if random.random() > 0.5:
print "A first"
return True
print "B first"
return False
You can’t perform that action at this time.