This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.ind.sanford.tictactoe | |
/** | |
* Created by sanf0rd on 14/09/17. | |
*/ | |
import java.util.ArrayList | |
internal class TicTacToe { | |
//singleton methods | |
var board: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sklearn | |
import plotly.plotly as py | |
import plotly.graph_objs as go | |
from plotly import tools | |
import numpy as np | |
from sklearn import datasets | |
from sklearn.neighbors import NearestCentroid | |
n_neighbors = 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn import datasets | |
from sklearn.tree import DecisionTreeClassifier | |
from sklearn.metrics import confusion_matrix | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from copy import deepcopy | |
import numpy as npy | |
import pandas as pd | |
from matplotlib import pyplot as plt | |
class KMeans: | |
def __init__(self, k, file_name): | |
self.k = k |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
from itertools import combinations | |
import pandas as pd | |
def apriori(transactions, **kwargs): | |
min_support = kwargs.get('min_support', 0.1) | |
min_confidence = kwargs.get('min_confidence', 0.0) | |
min_lift = kwargs.get('min_lift', 0.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by sanf0rd on 21/06/17. | |
*/ | |
public class Main { | |
public static void main(String[] args) { | |
Wrapper wrapper = new Wrapper(); | |
wrapper.doStuff(result -> System.out.println(result)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.reflect.full.declaredMemberProperties | |
/** | |
* Created by sanf0rd on 19/06/17. | |
*/ | |
fun readProperties(instance: Any) { | |
val clazz = instance.javaClass.kotlin | |
clazz.declaredMemberProperties.forEach { | |
println("${it.name} --[${it.returnType}]---> ${it.get(instance)}") |