Skip to content

Instantly share code, notes, and snippets.

View nunofernandes-plight's full-sized avatar

Nuno Edgar Nunes Fernandes nunofernandes-plight

View GitHub Profile
library(mnormt)
mycols <- topo.colors(100,0.5)
xhat <- c(0.2, -0.2)
Sigma <- matrix(c(0.4, 0.3,
0.3, 0.45), ncol=2)
x1 <- seq(-2, 4,length=151)
x2 <- seq(-4, 2,length=151)
f <- function(x1,x2, mean=xhat, varcov=Sigma)
dmnorm(cbind(x1,x2), mean,varcov)
z <- outer(x1,x2, f)
@nunofernandes-plight
nunofernandes-plight / addressfixes.js
Created April 2, 2016 15:30 — forked from frozeman/addressfixes.js
Fixes the wallet links in the ethereum wallet
// Open the wallet console: Menu -> Develop -> Toggle console ...
// Run the following script
_.each(Wallets.find().fetch(), function(item){
if(item.address)
Wallets.update(item._id, {$set: {address: item.address.toLowerCase()}});
});
_.each(CustomContracts.find().fetch(), function(item){
if(item.address)
CustomContracts.update(item._id, {$set: {address: item.address.toLowerCase()}});
@nunofernandes-plight
nunofernandes-plight / mistweb3.js
Created April 2, 2016 15:32 — forked from frozeman/mistweb3.js
Mist web3 loading proposal
/*
Basically "web3" comes from Mist,
but "Web3" CAN come from the dapp.
A Dapp has 3 ways to use web3.
2. and 3. would work when in Mist and outside.
*/
// 1. simply use, web3 comes already defined
@nunofernandes-plight
nunofernandes-plight / gist:b0976c12ca92beddc5087f47d7e7a5bf
Created April 6, 2016 14:32 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@nunofernandes-plight
nunofernandes-plight / SimplePolicy.ipynb
Created February 7, 2018 13:26 — forked from awjuliani/SimplePolicy.ipynb
Policy gradient method for solving n-armed bandit problems.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nunofernandes-plight
nunofernandes-plight / Q-Table Learning-Clean.ipynb
Created February 8, 2018 10:42 — forked from awjuliani/Q-Table Learning-Clean.ipynb
Q-Table learning in OpenAI grid world.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nunofernandes-plight
nunofernandes-plight / svd.py
Created February 20, 2018 14:34 — forked from addisonhuddy/svd.py
Singular Value Decomposition Example with Numpy
# Singular Value Decomposition Example
import numpy as np
# example taken from Video Tutorials - All in One
# https://www.youtube.com/watch?v=P5mlg91as1c
a = np.array([[1, 1, 1, 0, 0],
[3, 3, 3, 0, 0],
[4, 4, 4, 0, 0],
[5, 5, 5, 0, 0],
@nunofernandes-plight
nunofernandes-plight / pbt.ipynb
Last active January 13, 2020 11:43 — forked from NicolaBernini/pbt.ipynb
Property Based Testing in C++ with RapidCheck
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.