Skip to content

Instantly share code, notes, and snippets.

View jbrjake's full-sized avatar

Jonathon Rubin jbrjake

View GitHub Profile
@0xced
0xced / NSData+CommonDigest.h
Created May 23, 2011 09:00
NSData+CommonDigest: The most elegant NSData category for cryptographic hash functions
/*
Licensed under the MIT License
Copyright (c) 2011 Cédric Luthi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mbostock
mbostock / .block
Last active November 22, 2022 23:32
Line Transition
license: gpl-3.0
@mbostock
mbostock / .block
Last active September 15, 2023 11:14
Streamgraph
license: gpl-3.0
redirect: https://beta.observablehq.com/@mbostock/streamgraph-transitions
@debasishg
debasishg / gist:8172796
Last active November 11, 2024 07:10
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
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.datasets import fetch_20newsgroups
from sklearn.decomposition import NMF, LatentDirichletAllocation
def display_topics(model, feature_names, no_top_words):
for topic_idx, topic in enumerate(model.components_):
print "Topic %d:" % (topic_idx)
print " ".join([feature_names[i]
for i in topic.argsort()[:-no_top_words - 1:-1]])
@cbaziotis
cbaziotis / Attention.py
Last active October 22, 2024 08:31
Keras Layer that implements an Attention mechanism for temporal data. Supports Masking. Follows the work of Raffel et al. [https://arxiv.org/abs/1512.08756]
from keras import backend as K, initializers, regularizers, constraints
from keras.engine.topology import Layer
def dot_product(x, kernel):
"""
Wrapper for dot product operation, in order to be compatible with both
Theano and Tensorflow
Args:
@ikrauchanka
ikrauchanka / read-aws-flowlogs.go
Created March 24, 2017 22:26
read AWS FlowLogs
/*
Program require access to S3 objects.
It will download gz file, gunzip it, read flat file and convert output into json.
You can use output as a data in HTTP and stream into elastic search(or ELK).
INFO: https://aws.amazon.com/blogs/aws/vpc-flow-logs-log-and-view-network-traffic-flows/
*/
package main
import (
"bufio"
@ejb
ejb / .block
Last active July 18, 2019 15:20
Structuring D3 code with ES6 classes
license: mit