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
@debasishg
debasishg / gist:8172796
Last active July 5, 2024 11:53
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
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)
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)
@karpathy
karpathy / min-char-rnn.py
Last active July 22, 2024 04:44
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@frozeman
frozeman / mistweb3.js
Last active July 22, 2021 01:00
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
New purely functional data structures published since 1998:
2001: Ideal Hash Trees, and its 2000 predecessor, Fast And Space Efficient Trie Searches, by Phil Bagwell: Apparently used as a fundamental building block in Clojure's standard library.
2001: A Simple Implementation Technique for Priority Search Queues, by Ralf Hinze: a really simple and beautiful technique for implementing this important datastructure (useful, say, in the Dijkstra algorithm). The implementation is particularly beautiful and readable due to heavy use of "view patterns".
2002: Bootstrapping one-sided flexible arrays, by Ralf Hinze: Similar to Okasaki's random-access lists, but they can be tuned to alter the time tradeoff between cons and indexing.
2003: New catenable and non-catenable deques, by Radu Mihaescu and Robert Tarjan: A new take on some older work (by Kaplan and Tarjan) that Okasaki cites (The most recent version of Kaplan & Tarjan's work was published in 2000). This version is simpler in some ways.
@frozeman
frozeman / addressfixes.js
Last active September 4, 2022 01:04
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 / 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()}});
@awjuliani
awjuliani / Q-Table Learning-Clean.ipynb
Last active October 25, 2022 07:57
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.
@awjuliani
awjuliani / SimplePolicy.ipynb
Created September 11, 2016 00:20
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.