I hereby claim:
- I am arsalandotme on github.
- I am arsalandotme (https://keybase.io/arsalandotme) on keybase.
- I have a public key ASAMjh475z_xNZSMwVAZMO7z0E_6pyF9FibN876TM5gzygo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Problem 1: | |
Given a list of numbers, find the most frequent integer | |
Input Example: | |
12 5 6.7 234 0 22 5 | |
Output Example: | |
5 |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
javascript:(function(){var a=document.querySelectorAll('tr > td:nth-child(2) > input[type="radio"]:nth-child(1)');for(var i=0;i<a.length;i++){a.item(i).checked=true}})(); |
casper.test.begin('Results are within price range', function (test) { | |
var MAX_PRICE = 5000, MIN_PRICE = 1000; | |
function getPrices() { | |
var priceNodes = document.querySelectorAll('.productinfo > h2'); | |
return Array.prototype.map.call(priceNodes, function (e) { | |
var pt = e.textContent; | |
var num = /[\d,]+/.exec(pt); | |
var cleanNumber = num[0].replace(/,/g, ''); | |
return Number(cleanNumber); | |
}); |
{ | |
"title": "The Alchemist", | |
"time_scraped": 2032123123, | |
"images": ["http://www.786cart.com/images/9780061233845.jpg"], | |
"price": 230, | |
"attributes": { | |
"excrept": "Haza Baza", | |
"description": "Nilo turbare circulos mios", | |
"pages": 320, | |
"cover": "Hard" |
public static class EnumerableExtensions | |
{ | |
public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source) | |
{ | |
return source.Shuffle(new Random()); | |
} | |
public static IEnumerable<T> Shuffle<T>( | |
this IEnumerable<T> source, Random rng) | |
{ |