enjoy_markov 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -23
- data/bin/enjoy_markov +6 -1
- data/lib/enjoy_markov/version.rb +1 -1
- data/lib/enjoy_markov.rb +4 -3
- metadata +2 -9
- data/.travis.yml +0 -3
- data/LICENSE.txt +0 -22
- data/Rakefile +0 -9
- data/test/minitest_helper.rb +0 -4
- data/test/test_enjoy_markov.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1432418a2351140ca320e9771b2058cc6ce95fdf
|
4
|
+
data.tar.gz: 22f751483977909917323b95df8335681dc4b1e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e1c58bd815425d2c21a956b1c3012ebaa117b25a086c5bcd5b7e28e16f78514eaf3a4da109ce1480e30b957fb273ecec6a64c868753c0aeac5e4857b3a635e7
|
7
|
+
data.tar.gz: 15d5a26fc26f0d31aae1a1a574e330b013878122a6ca219c72351cdd56fe4dc7a666e9d0ae585a89696e4149631ac3a53ee7f88d457ef87dbb88bac7d55ccf95
|
data/README.md
CHANGED
@@ -1,31 +1,20 @@
|
|
1
|
-
#
|
1
|
+
# Enjoy! Markov
|
2
2
|
|
3
|
-
|
3
|
+
[![Gyazo](http://i.gyazo.com/73ec9ff893e88a3893fe07bb6793d2b8.gif)](http://gyazo.com/73ec9ff893e88a3893fe07bb6793d2b8)
|
4
4
|
|
5
|
-
##
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'enjoy_markov'
|
11
|
-
```
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
5
|
+
## How to use it
|
18
6
|
|
19
7
|
$ gem install enjoy_markov
|
8
|
+
$ enjoy_markov
|
9
|
+
$ enjoy_markov -r 30 -s 0.03
|
10
|
+
$ enjoy_markov -s 0.1
|
20
11
|
|
21
|
-
|
12
|
+
#### Option
|
13
|
+
-r ... range. Defalut: 20
|
22
14
|
|
23
|
-
|
15
|
+
-s ... sleep time(sec) after each trial. Defalut: 0.05
|
24
16
|
|
25
|
-
##
|
17
|
+
## License
|
18
|
+
Copyright (c) 2014 gogotanaka
|
26
19
|
|
27
|
-
|
28
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
-
5. Create a new Pull Request
|
20
|
+
MIT License
|
data/bin/enjoy_markov
CHANGED
data/lib/enjoy_markov/version.rb
CHANGED
data/lib/enjoy_markov.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
class EnjoyMarkov
|
2
2
|
class << self
|
3
|
-
def start!(supinf
|
3
|
+
def start!(supinf, speed)
|
4
4
|
@@x = 0
|
5
5
|
loop do
|
6
6
|
@@x += [-1, 1].sample # TODO: use prefer randmGen
|
7
|
-
|
7
|
+
break if supinf == @@x.abs
|
8
8
|
puts "#{wall}#{space * supinf}#{axis}#{space * supinf}#{wall}".tap { |s| s[@@x + supinf + 1] = point }
|
9
|
-
sleep
|
9
|
+
sleep speed
|
10
10
|
end
|
11
|
+
puts 'Ops... ;('
|
11
12
|
end
|
12
13
|
|
13
14
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enjoy_markov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gogotanaka
|
@@ -61,17 +61,12 @@ extensions: []
|
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
63
|
- ".gitignore"
|
64
|
-
- ".travis.yml"
|
65
64
|
- Gemfile
|
66
|
-
- LICENSE.txt
|
67
65
|
- README.md
|
68
|
-
- Rakefile
|
69
66
|
- bin/enjoy_markov
|
70
67
|
- enjoy_markov.gemspec
|
71
68
|
- lib/enjoy_markov.rb
|
72
69
|
- lib/enjoy_markov/version.rb
|
73
|
-
- test/minitest_helper.rb
|
74
|
-
- test/test_enjoy_markov.rb
|
75
70
|
homepage: http://gogotanaka.me/
|
76
71
|
licenses:
|
77
72
|
- MIT
|
@@ -96,6 +91,4 @@ rubygems_version: 2.2.2
|
|
96
91
|
signing_key:
|
97
92
|
specification_version: 4
|
98
93
|
summary: Enjoy markov process
|
99
|
-
test_files:
|
100
|
-
- test/minitest_helper.rb
|
101
|
-
- test/test_enjoy_markov.rb
|
94
|
+
test_files: []
|
data/.travis.yml
DELETED
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014 gogotanaka
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED
data/test/minitest_helper.rb
DELETED
data/test/test_enjoy_markov.rb
DELETED