This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +vivekkrishna is my blockchain ID. https://onename.com/vivekkrishna |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require("require"); //request npm module | |
var Scraper = function() { | |
}; | |
Scraper.prototype.scrape = function(url, callback) { | |
request(url, function responseCallback(error, response, html) { | |
if(error) { | |
callback(error); | |
} else { | |
console.log(html); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fizz = "fizz" | |
def buzz = "buzz" | |
(1..100).collect {Integer i -> | |
String s = ""; | |
s += i%3==0?fizz:"" | |
s += i%5==0?buzz:"" | |
return s?:i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import csv | |
import re | |
for line in sys.stdin: | |
for hashtag in re.findall(r"#[a-zA-Z_]+", line): | |
print "{0}\t{1}".format(hashtag.lower(), 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import re | |
import os | |
def srcrepl(match): | |
"Return the file contents with paths replaced" | |
absolutePath = "http://www.example.com/" #update the URL to be prefixed here. | |
print "<" + match.group(1) + match.group(2) + "=" + "\"" + absolutePath + match.group(3) + match.group(4) + "\"" + ">" | |
return "<" + match.group(1) + match.group(2) + "=" + "\"" + absolutePath + match.group(3) + match.group(4) + "\"" + ">" | |
# |