dolores-shacontest 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/shacontest +1 -0
- data/ext/dl_contest/sha1b.c +5 -5
- data/lib/shacontest.rb +2 -2
- data/shacontest.gemspec +4 -5
- metadata +4 -4
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2.0.0
|
data/bin/shacontest
CHANGED
data/ext/dl_contest/sha1b.c
CHANGED
|
@@ -376,12 +376,12 @@ int find_best_capitalization(const char* target, char* words, uint64_t start, ui
|
|
|
376
376
|
//SHA1_Update(&context, (uint8_t*)target, strlen(target));
|
|
377
377
|
//SHA1_Final(&context, digestR);
|
|
378
378
|
int i;
|
|
379
|
-
|
|
379
|
+
/*
|
|
380
380
|
printf("Target Sentence: %s\n", target);
|
|
381
381
|
printf("My Sentence: %s\n", words);
|
|
382
382
|
printf("Start %llu\n", start);
|
|
383
|
-
printf("End %llu\n
|
|
384
|
-
|
|
383
|
+
printf("End %llu\n", end);
|
|
384
|
+
*/
|
|
385
385
|
|
|
386
386
|
int l = strlen(words);
|
|
387
387
|
uint64_t p = 0; // iterates over all possible capitalizations
|
|
@@ -464,10 +464,10 @@ int find_best_capitalization(const char* target, char* words, uint64_t start, ui
|
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
if (p % output_freq == 0) {
|
|
467
|
-
printf("Offset: %lld
|
|
467
|
+
printf("Offset: %lld Best Sentence: \"%s\" Lowest Score: %i\n", p, argmin, min);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
printf("
|
|
470
|
+
printf("Done -- Best Sentence: \"%s\" Lowest Score: %i\n", argmin, min);
|
|
471
471
|
|
|
472
472
|
// send the word back to Ruby
|
|
473
473
|
strcpy(words, argmin);
|
data/lib/shacontest.rb
CHANGED
|
@@ -10,8 +10,8 @@ require 'yaml'
|
|
|
10
10
|
CONFIGS = { 'email' => 'email address' }
|
|
11
11
|
module Shacontest
|
|
12
12
|
HOME = 'http://shacontest.doloreslabs.com/'
|
|
13
|
-
SENT = '
|
|
14
|
-
REF = 'I
|
|
13
|
+
SENT = 'many bot ar joy joy joy joy joy joy joy joy joy'
|
|
14
|
+
REF = 'I would much rather hear more about your whittling project'
|
|
15
15
|
|
|
16
16
|
BLOCK_SIZE = 5000000
|
|
17
17
|
REPORT_FREQ = 1000000
|
data/shacontest.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{shacontest}
|
|
5
|
-
s.version = "
|
|
5
|
+
s.version = "2.0.0"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Brian P O'Rourke"]
|
|
9
|
-
s.date = %q{2009-07-
|
|
9
|
+
s.date = %q{2009-07-20}
|
|
10
10
|
s.default_executable = %q{shacontest}
|
|
11
11
|
s.email = %q{brian@doloreslabs.com}
|
|
12
12
|
s.executables = ["shacontest"]
|
|
@@ -32,11 +32,10 @@ Gem::Specification.new do |s|
|
|
|
32
32
|
"spec/shacontest_spec.rb",
|
|
33
33
|
"spec/spec_helper.rb"
|
|
34
34
|
]
|
|
35
|
-
s.has_rdoc = true
|
|
36
35
|
s.homepage = %q{http://github.com/dolores/shacontest}
|
|
37
36
|
s.rdoc_options = ["--charset=UTF-8"]
|
|
38
37
|
s.require_paths = ["lib"]
|
|
39
|
-
s.rubygems_version = %q{1.3.
|
|
38
|
+
s.rubygems_version = %q{1.3.3}
|
|
40
39
|
s.summary = %q{Generate SHA keys and win an iPhone}
|
|
41
40
|
s.test_files = [
|
|
42
41
|
"spec/shacontest_spec.rb",
|
|
@@ -45,7 +44,7 @@ Gem::Specification.new do |s|
|
|
|
45
44
|
|
|
46
45
|
if s.respond_to? :specification_version then
|
|
47
46
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
48
|
-
s.specification_version =
|
|
47
|
+
s.specification_version = 3
|
|
49
48
|
|
|
50
49
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
51
50
|
else
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dolores-shacontest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian P O'Rourke
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-07-
|
|
12
|
+
date: 2009-07-20 00:00:00 -07:00
|
|
13
13
|
default_executable: shacontest
|
|
14
14
|
dependencies: []
|
|
15
15
|
|
|
@@ -38,7 +38,7 @@ files:
|
|
|
38
38
|
- shacontest.gemspec
|
|
39
39
|
- spec/shacontest_spec.rb
|
|
40
40
|
- spec/spec_helper.rb
|
|
41
|
-
has_rdoc:
|
|
41
|
+
has_rdoc: false
|
|
42
42
|
homepage: http://github.com/dolores/shacontest
|
|
43
43
|
post_install_message:
|
|
44
44
|
rdoc_options:
|
|
@@ -62,7 +62,7 @@ requirements: []
|
|
|
62
62
|
rubyforge_project:
|
|
63
63
|
rubygems_version: 1.2.0
|
|
64
64
|
signing_key:
|
|
65
|
-
specification_version:
|
|
65
|
+
specification_version: 3
|
|
66
66
|
summary: Generate SHA keys and win an iPhone
|
|
67
67
|
test_files:
|
|
68
68
|
- spec/shacontest_spec.rb
|