Skip to content

Instantly share code, notes, and snippets.

Miguel Vaz mvaz

Block or report user

Report or block mvaz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DryRunCrowdsale.sol
pragma solidity ^0.4.18;
// File: node_modules/zeppelin-solidity/contracts/ownership/Ownable.sol
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
View ether_adress
0x5f95fd4235cb14d25f791c1c9b4504bb37a66e99
View rinkeby.account
0x42745feF478C4F60FE88647B9B4DBf1219cb299E
View MetaCoin.sol
contract MetaCoin {
mapping (address => uint) balances;
event Transfer(address _from,address _to, uint _amount);
function MetaCoin() {
balances[tx.origin] = 10000;
}
function sendCoin(address receiver, uint amount) returns(bool sufficient) {
if (balances[msg.sender] < amount) return false;
@mvaz
mvaz / ncp.py
Created May 4, 2016 — forked from panisson/ncp.py
Nonnegative Tensor Factorization, based on the Matlab source code available at Jingu Kim's home page: https://sites.google.com/site/jingukim/home#ntfcode Requires the installation of Numpy and Scikit-Tensor (https://github.com/mnick/scikit-tensor). For examples, see main() function.
View ncp.py
# Copyright (C) 2013 Istituto per l'Interscambio Scientifico I.S.I.
# You can contact us by email (isi@isi.it) or write to:
# ISI Foundation, Via Alassio 11/c, 10126 Torino, Italy.
#
# This work is licensed under a Creative Commons 4.0
# Attribution-NonCommercial-ShareAlike License
# You may obtain a copy of the License at
# http://creativecommons.org/licenses/by-nc-sa/4.0/
#
# This program was written by Andre Panisson <panisson@gmail.com> at
@mvaz
mvaz / postgres-upgrade-recipe.sh
Created Jan 10, 2016 — forked from eoinkelly/postgres-upgrade-recipe.sh
Upgrade Postgres to 9.4 using Homebrew on Mac OSX
View postgres-upgrade-recipe.sh
#!/bin/bash
# This script can be used in "run & hope" mode or you can use it as a recipe to
# do things manually - you probably want the latter if you really care about
# the data in your databases.
# Happy hacking
# /Eoin/
# Tell bash to stop if something goes wrong
set -e
@mvaz
mvaz / raspberry-pi-edimax-wifi-and-motion-sensor.md My notes on setting up a Raspberry Pi with an Edimax EW-7811UN WiFi Dongle and motion sensors
View raspberry-pi-edimax-wifi-and-motion-sensor.md

Raspberry Pi, WiFi and motion sensors

My notes on setting up a Raspberry Pi with an Edimax EW-7811UN WiFi Dongle and motion sensors.

We intend to use a few Raspberry Pis around the office, in order to find out if certain rooms are beeing used or not. For this, we need to get WiFi and a motion sensor working.

@mvaz
mvaz / README.md
Last active Nov 24, 2015
World Borders
View README.md
@mvaz
mvaz / distributions.ipynb
Last active Nov 13, 2015
Dirichlet processes
View distributions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lm_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.