It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
var statistic = function(){
var win = 0;
var lose = 0;
var streak = 0;
var longest_streak = 0;
for(var i = 0; i < 10000000; i++)
{
if(roll())
{
streak++;
win++;
}
else
{
if(streak > longest_streak)
{
longest_streak = streak;
}
streak = 0;
lose++;
}
}
return "Win: " + win + " Lose: " + lose + " Longest streak: " + longest_streak;
};
Win: 4949365 Lose: 5050635 Longest streak: 24
count at 125000000
Result: 1, Count: 17853524, Perecent: 14.2828%
Result: 2, Count: 17860550, Perecent: 14.2884%
Result: 3, Count: 17862642, Perecent: 14.2901%
Result: 4, Count: 17855991, Perecent: 14.2848%
Result: 5, Count: 17862922, Perecent: 14.2903%
Result: 6, Count: 17851206, Perecent: 14.2810%
Result: 7, Count: 17853164, Perecent: 14.2825%
#!/usr/bin/perl -w
use strict;
use warnings;
use Digest::SHA qw(hmac_sha512_hex);
use Math::Random::MT;
my $range = $ARGV[0];
our $secret = rand();
my $r = 0;
my %hash = ();
my $cc = 1;
my $c = 1;
while(1)
{
#$r = &get_result($c, $range);
$r = &get_result(rand(), $range);
$hash{$r}++;
$c++;
$cc++;
if($cc >= 500000)
{
$cc = 0;
my $t = 0; # should never see zerom ut check anyway
print "\ncount at $c\n";
while($t <= $range)
{
if(defined $hash{$t})
{
my $s = sprintf("%.4f", ( $hash{$t} / $c ) * 100 );
print "Result: $t, Count: $hash{$t}, Perecent: $s%\n";
}
$t++;
}
}
}
exit 0;
sub get_result
{
my $tx = shift;
my $range = shift;
my $seed = Digest::SHA::hmac_sha512_hex($tx, $main::secret);
$seed =~ s/^(.{8}).*$/$1/;
$seed = hex($seed) + 0;
my $gen = Math::Random::MT->new($seed);
my $number = int($gen->rand($range)+1);
return $number;
}
perl number_distribution_mersenne.pl 7
count at 500000
Result: 1, Count: 70994, Perecent: 14.1988%
Result: 2, Count: 71495, Perecent: 14.2990%
Result: 3, Count: 71369, Perecent: 14.2738%
Result: 4, Count: 71446, Perecent: 14.2892%
Result: 5, Count: 71470, Perecent: 14.2940%
Result: 6, Count: 71637, Perecent: 14.3274%
Result: 7, Count: 71588, Perecent: 14.3176%
count at 1000000
Result: 1, Count: 142091, Perecent: 14.2091%
Result: 2, Count: 142924, Perecent: 14.2924%
Result: 3, Count: 143039, Perecent: 14.3039%
Result: 4, Count: 143031, Perecent: 14.3031%
Result: 5, Count: 143140, Perecent: 14.3140%
Result: 6, Count: 142669, Perecent: 14.2669%
Result: 7, Count: 143105, Perecent: 14.3105%
count at 1500000
Result: 1, Count: 214198, Perecent: 14.2799%
Result: 2, Count: 213999, Perecent: 14.2666%
Result: 3, Count: 214668, Perecent: 14.3112%
Result: 4, Count: 214527, Perecent: 14.3018%
Result: 5, Count: 214434, Perecent: 14.2956%
Result: 6, Count: 213722, Perecent: 14.2481%
Result: 7, Count: 214451, Perecent: 14.2967%
count at 2000000
Result: 1, Count: 285847, Perecent: 14.2924%
Result: 2, Count: 285742, Perecent: 14.2871%
Result: 3, Count: 286227, Perecent: 14.3114%
Result: 4, Count: 285383, Perecent: 14.2691%
Result: 5, Count: 286089, Perecent: 14.3044%
Result: 6, Count: 285052, Perecent: 14.2526%
Result: 7, Count: 285659, Perecent: 14.2829%
#!/usr/bin/perl -w
# bet_verify.pl
use strict;
use warnings;
use Digest::SHA qw(hmac_sha512_hex);
use Math::Random::MT;
if(!$ARGV[0] || $ARGV[0] eq "--help" || $ARGV[0] eq "-h" || $ARGV[0] eq "/?")
{
print "usage: bet_verify.pl\n";
exit;
}
my $range=$ARGV[0];
my $secret=$ARGV[1];
my $tx=$ARGV[2];
my $seed = Digest::SHA::hmac_sha512_hex($tx, $secret); # hash txid and secret
$seed =~ s/^(.{8}).*$/$1/; # use 1st 8 characters of hash for secret
$seed = hex($seed) + 0; # convert hex to number
my $gen = Math::Random::MT->new($seed); # seed MT
my $number = int($gen->rand($range)+1); # generate random result inside game range using seeded MT
print "Result: $number\n";
exit;