Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Rahul Raut rahulmr

🏠
Working from home
Block or report user

Report or block rahulmr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anthonytxie
anthonytxie / hodl20.py
Created Mar 24, 2018
Hodl 20 Rebalancing Algorithm
View hodl20.py
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{
@peterhellberg
peterhellberg / browse.tpl
Last active May 1, 2017
Code7 template used by the Caddy browse directive
View browse.tpl
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<link rel="stylesheet" href="http://c7.se/css/main.css">
<style>
body { font-family: 'Helvetica Neue', Sans-serif; }
#list {
width: 100%;
}
@Shumen
Shumen / kvm.sh
Last active Aug 29, 2015 — forked from will3942/kvm.sh
OSXKVM
View kvm.sh
# OSXKVM project's ultimate goal is to upstream to run MacOSX from unadulterated and standard images on KVM.
# http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/
# http://kashyapc.com/2014/03/10/notes-for-building-kvm-based-virtualization-components-from-upstream-git/
# http://blog.ostanin.org/2014/02/11/playing-with-mac-os-x-on-kvm/ #ubuntu12.04, http://files.ostanin.org/2014/02/osx-kvm.tar.xz
# http://www.vpsee.com/2014/06/install-and-run-os-x-mavericks-with-kvm-under-linux/ #Verified on CentOS 6.5 with 3.x kernel
# kernel 3.10.0-* can be patched directly, no need kvm-kmod external module.
# http://git.kernel.org/cgit/virt/kvm/kvm.git/commit/?id=100943c54e0947a07d2c0185368fc2fd848f7f28
# https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/?id=refs/tags/v3.10
@ndhu
ndhu / phantomjsGoogleSearch
Created Jan 8, 2014
phantomjs. example on how to search google, collect links of search result and scrape multiple pages of the search result
View phantomjsGoogleSearch
/**
* Created by andy hulstkamp
*/
var webpage = require("webpage"),
fs = require("fs");
var debug = false,
pageIndex = 0,
allLinks = [],
You can’t perform that action at this time.