Skip to content

Instantly share code, notes, and snippets.

View nicodelpiano's full-sized avatar
🏠
Working from home

Nicolas Del Piano nicodelpiano

🏠
Working from home
View GitHub Profile
@nicodelpiano
nicodelpiano / main.js
Last active December 16, 2022 01:54
main.js
#!/usr/bin/env node
function main() {
console.log('hello');
}
main();
@nicodelpiano
nicodelpiano / tree_traversal.rb
Last active July 1, 2019 00:19
Tree Traversal in Ruby
# Binary Tree definition
class Node
def initialize(val)
@val = val
@right = nil
@left = nil
end
end
# Preorder Traversal
@nicodelpiano
nicodelpiano / lists.js
Created November 1, 2016 19:05
An implementation of linked lists in JavaScript
function Node(value) {
return {data: value, next: null};
}
function isEmpty(object) { for(var i in object) { return false; } return true; }
function add(root, value) {
var head = root;
if (root === null || isEmpty(root))
return Node(value);
@nicodelpiano
nicodelpiano / GSoC-FinalSubmission.md
Last active August 20, 2016 21:29
This is Nicolas Del Piano's GSoC final submission

Exact Solutions using Linear Programming

This is a brief description for the final submission of the GSoC 2016 program. This project implements the method described in [[1]] for providing exact solutions for both MDPs and DTMCs models using exact arithmetic on PRISM probabilistic model checker.

Full list of contributions

Last pull requests for the whole project (will be merged soon)

@nicodelpiano
nicodelpiano / bp-wd.c
Last active May 15, 2016 02:35
Backpropagation con weight decay
/*
BP: Entrenamiento de redes neuronales feedforward de 3 capas (entrada - oculta - salida).
Algoritmo: Backpropagation estocastico.
Capa intermedia con unidades sigmoideas.
Salidas con unidades lineales.
PMG - Ultima revision: 18/02/2002
*/
#include <stdio.h>
----------------------------------------
--
-- | Exhaustivity Checking Library (ECL)
--
----------------------------------------
module ECL where
import Data.List (foldl', nub)
-- | Type synonyms: names and lists of binders
data List a = Nil | Cons a
@nicodelpiano
nicodelpiano / quickcheck_vec.hs
Last active March 11, 2016 19:25
QuickCheck for Vec
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
import Test.QuickCheck
import Data.Type.Equality
import Data.Proxy
@nicodelpiano
nicodelpiano / AST.hs
Created May 30, 2015 23:57
STLC+Nat Exhaustivity Checking
module AST where
-- | Name binding association
data Binder = NullBinder -- Wildcard binder
| Zero -- Zero binder
| Succ Binder -- Nat binder
deriving (Show, Eq)
-- | Basic representations of cases
type Case = [Binder]
@nicodelpiano
nicodelpiano / AST.hs
Last active March 11, 2016 19:25
STLC Exhaustiveness Checker
module AST where
-- Name binding association
data Binder = NullBinder -- Wildcard binder
| Zero -- Zero binder
| Succ Binder -- Nat binder
deriving (Show, Eq)
-- Alternatives are the pattern matching clauses
data Alternative = Alternative [Binder]