Skip to content

Instantly share code, notes, and snippets.

@baraldilorenzo
baraldilorenzo / readme.md
Last active November 21, 2023 22:41
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@karpathy
karpathy / min-char-rnn.py
Last active April 23, 2024 17:55
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)
@nyov
nyov / requests_from_generator.py
Created February 28, 2014 06:38
scrapy ranged start_requests from generator
class MySpider(Spider):
# [...]
# start requests from generator
def start_requests(self):
url = 'http://some.page.tld/%s/category'
for page in xrange(1, 247):
link = url % page
yield Request(url=link)
@tovbinm
tovbinm / waves.js
Created January 26, 2014 05:24
Breaking waves sound (Open (http://myjavatools.com/js.html) in Chrome paste the code and hit run)
var AMP = 0.5; // amplitude
var len = 15; // seconds
e = new webkitAudioContext();
var source = e.createBufferSource();
var SR = e.sampleRate;
source.buffer = e.createBuffer(1, len * SR, SR);
var dat = source.buffer.getChannelData(0);
for (var i = 0; i < len * SR; i++) {
dat[i] = AMP * (Math.random() * 2 - 1);
}
@debasishg
debasishg / gist:8172796
Last active March 15, 2024 15:05
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&amp;rep=rep1&amp;t
@tovbinm
tovbinm / ch5_streams.scala
Last active December 26, 2015 13:59
Reading Functional Programing In Scala
// Excercies from chapter 5: Strictness and laziness
def foldRight[A,B](z: => B)(s: Stream[A])(f: (A, => B) => B): B =
s match {
case hd #:: tail => f(hd, foldRight(z)(tail)(f))
case _ => z
}
def exists[A](s: Stream[A])(p: A => Boolean): Boolean =
foldRight(false)(s)((x,a) => if (p(x)) true else a)
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@postmodern
postmodern / rails_rce.rb
Last active July 17, 2023 11:54
Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#!/usr/bin/env ruby
#
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0156)
#
# ## Advisory
#
# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
#
# ## Caveats
#
@yankov
yankov / gist:4230948
Last active October 13, 2015 17:28
Creating new Scala project with sbt
mkdir project1
cd project1
sbt
set name := "project1"
set version := "1.0"
set scalaVersion := "2.9.3"
session save
exit
<!DOCTYPE html>
<html>
<head><title>ChamberedTest</title></head>
<script type="text/javascript" src="js/chambered.js"></script>
<style type="text/css">
canvas, img {
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-optimize-contrast;