Skip to content

Instantly share code, notes, and snippets.

View nmoya's full-sized avatar

Nikolas Moya nmoya

View GitHub Profile
@nmoya
nmoya / xmas.clj
Last active December 12, 2018 20:15 — forked from skuro/forkme.md
Advent of Clojure solutions
(ns advent-of-code.core
(:gen-class))
(defn next-coordinates [row column max-row]
(let [new-row (dec row)
new-column (inc column)]
(if (< new-row 0)
[(inc max-row) 0]
[new-row new-column])))
from sklearn.cluster import KMeans
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from PIL import Image
import cv2
import pandas as pd
import numpy as np
def color_fn(values):
colors = []
from sklearn import svm
import pandas as pd
import numpy as np
test = pd.read_csv("./titanic/data/test.csv")
train = pd.read_csv("./titanic/data/train.csv")
drop_columns = ["PassengerId", "Name", "Embarked", "Cabin", "Ticket", "Age", "Fare"]
train_drop_columns = ["Survived"] + drop_columns
# Labels from the training set
(ns transducer-meetup.core)
(defn noop [xf]
(clojure.pprint/pprint (type xf))
(clojure.pprint/pprint xf)
(fn
([] (xf))
([result] (xf result))
([result input] (xf result input))))
@nmoya
nmoya / ParseDB.py
Created July 20, 2015 18:12
Parse Database helper for python
from parse_rest.connection import ParseBatcher
from parse_rest.connection import register
from parse_rest.datatypes import Object
from parse_rest.installation import Push
''' Database helper to interact data with parse.com
For additional documentation, check: https://github.com/dgrtwo/ParsePy
In order to ease the implementation of this helper, more complex queries
like sorting, should be done in python after retrieving a list of rows.'''