Skip to content

Instantly share code, notes, and snippets.

@miku
miku / reactjs.js
Created March 26, 2014 09:21 — forked from pk11/reactjs.js
/** @jsx React.DOM */
/**
* Our component structure will look like the following:
* - WikiBox
* -- AutoCompleteBox
* --- AutoComplete
*/
// this component renders a single entity coming from wikipedia
#!/bin/sh
# This is for Redhat 64 bit versions of Linux with `createrepo` installed. If you
# do not have createrepo, you can install it with:
# yum install -y createrepo
# Change DESTDIR path to RPMS directory of your repo
DESTDIR="/var/www/repo/rhel/6"
for ARCH in x86_64
# How to create an RPM repository
# This is for Redhat 64 bit versions of Linux. You can create your own RPM repository # to host your custom RPM packages.
#
# See "How to create an RPM from source with spec file" for more information.
# https://gist.github.com/1376973
# Step: 1
# Install createrepo
@miku
miku / pagerank.py
Created November 8, 2013 14:15 — forked from diogojc/pagerank.py
import numpy as np
from scipy.sparse import csc_matrix
def pageRank(G, s = .85, maxerr = .001):
"""
Computes the pagerank for each of the n states.
Used in webpage ranking and text summarization using unweighted
or weighted transitions respectively.
@miku
miku / README.md
Last active December 18, 2015 13:49 — forked from anonymous/README.md

README

Data Sources, Transformations, Sinks. A language to express the flow of data. Textual and graphical. Minimal code. Maximum code reuse. 0-Install.

@miku
miku / kalman.py
Last active December 18, 2015 13:39 — forked from alexbw/kalman.py
#!/usr/bin/env python
# coding: utf-8
import numpy as np
class Kalman:
"""
USAGE:
# e.g., tracking an (x,y) point over time
@miku
miku / crawler.py
Created April 10, 2013 05:17 — forked from jmoiron/crawler.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple async crawler/callback queue based on gevent."""
import traceback
import logging
import httplib2
import gevent
# ========================================
# Testing n-gram analysis in ElasticSearch
# ========================================
curl -X DELETE localhost:9200/ngram_test
curl -X PUT localhost:9200/ngram_test -d '
{
"settings" : {
"index" : {
"analysis" : {
@miku
miku / abbass.txt
Created December 14, 2012 22:44 — forked from anonymous/abbass.txt
* http://videos.arte.tv/de/videos/square--7100906.html, aufgerufen am: 14.12.2012
* 9.12.2012, 11:48, Arte.tv, 05:05
* Square 41
* http://de.wikipedia.org/wiki/Hiam_Abbass
@miku
miku / crime.py
Created September 12, 2012 23:08
It's not a crime to build a CRIME
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="