todas 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/bin/todas +11 -0
  3. metadata +45 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0fe8fe068cebeb9b8efeee2a82d4f7f84f322cf8
4
+ data.tar.gz: d0133e2012516aee52ec6dc922740ebf22adfecf
5
+ SHA512:
6
+ metadata.gz: a972a2f412e0b5e0e9cf6112ef07106ec769ca4080b148cea1340ee3726bf2d51b20f36b5b5b1dfb1d0c7c111d0dacc175bdf0ae819d18d1d6e14601182d9704
7
+ data.tar.gz: c7d44d4edb33c668c8ebd6792cba2105020ac1f812c4bffacc978704e7b5166b1932f8ef9b7a1d89756bb6540809d7404b9f252516e68ff8e7e29089b6d2bb76
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ lines = $stdin.readlines.map { |l| l.chomp }
4
+
5
+ cantidad = lines.size
6
+
7
+ 1.upto(cantidad).map do |t|
8
+ lines.permutation(t).to_a.each do |p|
9
+ puts p.join(' ')
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: todas
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Eloy Espinaco
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Find all the permutations of a list of words.
14
+ email: eloyesp@gmail.com
15
+ executables:
16
+ - todas
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - bin/todas
21
+ homepage: https://github.com/eloyesp/todas
22
+ licenses:
23
+ - GPL
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.2.2
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: All the permutations
45
+ test_files: []