Skip to content

Instantly share code, notes, and snippets.

Avatar

Alessandro Andrioni andrioni

  • Nubank
  • Berlin, Germany
View GitHub Profile
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@andrioni
andrioni / catalogo.json
Created Jun 28, 2014
Unicamp - Catálogo dos Cursos de Graduação 2014
View catalogo.json
This file has been truncated, but you can view the full file.
[
{
"code": "AM016",
"name": "Educação Ambiental",
"prerequisites": [
[
]
],
@andrioni
andrioni / evasao.ipynb
Last active Dec 28, 2015
Evasão Unicamp (teste do Gadfly)
View evasao.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrioni
andrioni / mpfr.rs
Last active Dec 24, 2015
MPFR bindings for Rust
View mpfr.rs
#![crate_id = "mpfr#0.0.0"]
#![comment = "MPFR bindings for Rust"]
#![license = "MIT"]
#![allow(non_camel_case_types)]
use std::libc::{c_char, c_double, c_int, c_long, c_ulong, c_void, size_t};
use std::num::Float;
use std::intrinsics::uninit;
@andrioni
andrioni / lll.jl
Last active Dec 16, 2015
A sample implementation of the LLL algorithm in Julia which outputs δLLL-reduced bases.
View lll.jl
function lll(mat::Matrix{Int}, delta=0.75)
matrix = copy(mat)
n = size(matrix,2)
function projection(v, i, Q)
sum([dot(v, Q[:,j])/dot(Q[:,j], Q[:,j]) for j = i:n])
end
while true
# Size reduction
@andrioni
andrioni / complexbench.jl
Last active Dec 16, 2015
Small benchmark to compare using MPC and using the julian native complex type with MPFR for the components
View complexbench.jl
function old_complex(n)
a = complex(MPFRFloat(1.1), MPFRFloat(1.1))
sum = complex(MPFRFloat(0))
for i = 1:n
sum += a
end
product = complex(MPFRFloat(1))
for i = 1:n
product *= a
end
@andrioni
andrioni / dominance.py
Created Oct 7, 2012
Dominance-based solution concepts
View dominance.py
"""
This is a first (and ugly) sketch of an implementation of
dominance-based solution concepts according to [1], with yet
severe limitations (only works for bimatrix games, doesn't really
support a set dominating a strategy), but it does serve as a nice
prototype for future refinements.
[1]: http://dss.in.tum.de/files/brandt-research/dombased.pdf
"""