Skip to content

Instantly share code, notes, and snippets.

# 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 + "%/+="
@miku
miku / new_bashrc.sh
Created August 11, 2012 11:36 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc
@miku
miku / getAPOD.py
Created August 10, 2012 01:17 — forked from mnuck/getAPOD.py
Grabs the Astronomy Picture of the Day
#!/usr/bin/env python
# Grab the Astronomical Picture of the Day from NASA's site.
# Make it the desktop background, if it's a jpg
#
# Matthew Nuckolls
import urllib2
import re
import subprocess
base_url = "http://apod.nasa.gov/apod/"