at_coder_friends-generator-python_ref 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.rubocop.yml +12 -0
- data/.rubocop_todo.yml +5 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +6 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +74 -0
- data/LICENSE.txt +21 -0
- data/README.md +63 -0
- data/Rakefile +8 -0
- data/at_coder_friends-generator-python_ref.gemspec +44 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/at_coder_friends/generator/python_ref.rb +142 -0
- data/lib/at_coder_friends/generator/python_ref/version.rb +9 -0
- data/templates/python_ref_default.py +7 -0
- data/templates/python_ref_interactive.py +7 -0
- metadata +125 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2e84ac238506799a393d6a5728476aacad96218b
|
4
|
+
data.tar.gz: d08501d453284d7a299ab0caad8333edcc5bb585
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b8a1108c6d301523371c5185cc582cf6bc30b3a98fb2218b413ce777f05d56c94b5ad8d6fcc61c3429e3993d0b894d02d34c6833c874cd1b5694ba5903346e3f
|
7
|
+
data.tar.gz: e59912f8024f5925f1442d78fd16ccb02bdbc8591fb0af1ae792c7b2968f684382c4e383182b3b427ea9a714c4523b6e56ca57b4895ba173ab18639a311ab39f
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.rubocop_todo.yml
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at nejiko2006@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
at_coder_friends-generator-python_ref (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
addressable (2.7.0)
|
10
|
+
public_suffix (>= 2.0.2, < 5.0)
|
11
|
+
at_coder_friends (0.6.1)
|
12
|
+
colorize (~> 0.8.1)
|
13
|
+
launchy (~> 2.4.3)
|
14
|
+
mechanize (~> 2.0)
|
15
|
+
colorize (0.8.1)
|
16
|
+
connection_pool (2.2.2)
|
17
|
+
diff-lcs (1.3)
|
18
|
+
domain_name (0.5.20190701)
|
19
|
+
unf (>= 0.0.5, < 1.0.0)
|
20
|
+
http-cookie (1.0.3)
|
21
|
+
domain_name (~> 0.5)
|
22
|
+
launchy (2.4.3)
|
23
|
+
addressable (~> 2.3)
|
24
|
+
mechanize (2.7.6)
|
25
|
+
domain_name (~> 0.5, >= 0.5.1)
|
26
|
+
http-cookie (~> 1.0)
|
27
|
+
mime-types (>= 1.17.2)
|
28
|
+
net-http-digest_auth (~> 1.1, >= 1.1.1)
|
29
|
+
net-http-persistent (>= 2.5.2)
|
30
|
+
nokogiri (~> 1.6)
|
31
|
+
ntlm-http (~> 0.1, >= 0.1.1)
|
32
|
+
webrobots (>= 0.0.9, < 0.2)
|
33
|
+
mime-types (3.3)
|
34
|
+
mime-types-data (~> 3.2015)
|
35
|
+
mime-types-data (3.2019.1009)
|
36
|
+
mini_portile2 (2.4.0)
|
37
|
+
net-http-digest_auth (1.4.1)
|
38
|
+
net-http-persistent (3.1.0)
|
39
|
+
connection_pool (~> 2.2)
|
40
|
+
nokogiri (1.10.4)
|
41
|
+
mini_portile2 (~> 2.4.0)
|
42
|
+
ntlm-http (0.1.1)
|
43
|
+
public_suffix (4.0.1)
|
44
|
+
rake (10.5.0)
|
45
|
+
rspec (3.9.0)
|
46
|
+
rspec-core (~> 3.9.0)
|
47
|
+
rspec-expectations (~> 3.9.0)
|
48
|
+
rspec-mocks (~> 3.9.0)
|
49
|
+
rspec-core (3.9.0)
|
50
|
+
rspec-support (~> 3.9.0)
|
51
|
+
rspec-expectations (3.9.0)
|
52
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
+
rspec-support (~> 3.9.0)
|
54
|
+
rspec-mocks (3.9.0)
|
55
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
+
rspec-support (~> 3.9.0)
|
57
|
+
rspec-support (3.9.0)
|
58
|
+
unf (0.1.4)
|
59
|
+
unf_ext
|
60
|
+
unf_ext (0.0.7.6)
|
61
|
+
webrobots (0.1.2)
|
62
|
+
|
63
|
+
PLATFORMS
|
64
|
+
ruby
|
65
|
+
|
66
|
+
DEPENDENCIES
|
67
|
+
at_coder_friends (~> 0.6)
|
68
|
+
at_coder_friends-generator-python_ref!
|
69
|
+
bundler (~> 2.0)
|
70
|
+
rake (~> 10.0)
|
71
|
+
rspec (~> 3.0)
|
72
|
+
|
73
|
+
BUNDLED WITH
|
74
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 nejiko96
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# AtCoderFriends::Generator::PythonRef
|
2
|
+
|
3
|
+
Python source generator for [AtCoderFriends](https://github.com/nejiko96/at_coder_friends).
|
4
|
+
(This is reference implementation)
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'at_coder_friends-generator-python_ref'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install at_coder_friends-generator-python_ref
|
21
|
+
|
22
|
+
## Configuration
|
23
|
+
|
24
|
+
Add ```PythonRef``` to ```generators``` setting in ```.at_coder_friends.yml```:
|
25
|
+
```YAML
|
26
|
+
generators:
|
27
|
+
- PythonRef
|
28
|
+
```
|
29
|
+
|
30
|
+
## Generator Options
|
31
|
+
|
32
|
+
You can set following options to ```generator_settings/PythonRef``` setting
|
33
|
+
in ```.at_coder_friends.yml```:
|
34
|
+
|
35
|
+
| Setting | Description | Default |
|
36
|
+
|---------|-------------|---------|
|
37
|
+
|default_template|Source template file path|[/templates/python_ref_default.py](/templates/python_ref_default.py)|
|
38
|
+
|interactive_template|Source template file path for interactive problems|[/templates/python_ref_interactive.py](/templates/python_ref_interactive.py)|
|
39
|
+
|
40
|
+
### Example
|
41
|
+
```YAML
|
42
|
+
generator_settings:
|
43
|
+
PythonRef:
|
44
|
+
default_template: /path/to/template
|
45
|
+
```
|
46
|
+
|
47
|
+
## Development
|
48
|
+
|
49
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
50
|
+
|
51
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
52
|
+
|
53
|
+
## Contributing
|
54
|
+
|
55
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/at_coder_friends-generator-python_ref. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
56
|
+
|
57
|
+
## License
|
58
|
+
|
59
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
60
|
+
|
61
|
+
## Code of Conduct
|
62
|
+
|
63
|
+
Everyone interacting in the AtCoderFriends::Generator::PythonRef project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/at_coder_friends-generator-python_ref/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'at_coder_friends/generator/python_ref/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'at_coder_friends-generator-python_ref'
|
9
|
+
spec.version = AtCoderFriends::Generator::PythonRef::VERSION
|
10
|
+
spec.authors = ['nejiko96']
|
11
|
+
spec.email = ['nejiko2006@gmail.com']
|
12
|
+
|
13
|
+
spec.summary = 'Python generator for AtCoderFriends'
|
14
|
+
spec.description = <<-DESCRIPTION
|
15
|
+
AtCoderFriends plugin
|
16
|
+
which Generates Python source from problem description
|
17
|
+
(reference implementation)
|
18
|
+
DESCRIPTION
|
19
|
+
spec.homepage = 'https://github.com/nejiko96/at_coder_friends-generator-python_ref'
|
20
|
+
spec.license = 'MIT'
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem
|
24
|
+
# that have been added into git.
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = 'exe'
|
31
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ['lib']
|
33
|
+
|
34
|
+
spec.required_ruby_version = '>= 2.3.0'
|
35
|
+
|
36
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
37
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
38
|
+
spec.metadata['changelog_uri'] = spec.homepage + '/CHANGELOG.md'
|
39
|
+
|
40
|
+
spec.add_development_dependency 'at_coder_friends', '~> 0.6'
|
41
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
42
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
43
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
44
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'at_coder_friends/generator/python_ref'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'at_coder_friends/generator/python_ref/version'
|
4
|
+
|
5
|
+
module AtCoderFriends
|
6
|
+
module Generator
|
7
|
+
# generates Python source from problem description
|
8
|
+
class PythonRef
|
9
|
+
ACF_HOME = File.realpath(File.join(__dir__, '..', '..', '..'))
|
10
|
+
TMPL_DIR = File.join(ACF_HOME, 'templates')
|
11
|
+
DEFAULT_TMPL = File.join(TMPL_DIR, 'python_ref_default.py')
|
12
|
+
INTERACTIVE_TMPL = File.join(TMPL_DIR, 'python_ref_interactive.py')
|
13
|
+
|
14
|
+
attr_reader :cfg, :pbm
|
15
|
+
|
16
|
+
def initialize(cfg = nil)
|
17
|
+
@cfg = cfg || {}
|
18
|
+
end
|
19
|
+
|
20
|
+
def process(pbm)
|
21
|
+
src = generate(pbm)
|
22
|
+
pbm.add_src(:py, src)
|
23
|
+
end
|
24
|
+
|
25
|
+
def generate(pbm)
|
26
|
+
@pbm = pbm
|
27
|
+
File
|
28
|
+
.read(select_template)
|
29
|
+
.gsub('### URL ###', pbm.url)
|
30
|
+
.gsub('### CONSTS ###', gen_consts.join("\n"))
|
31
|
+
.gsub('### DCLS ###', gen_decls.join("\n"))
|
32
|
+
.gsub('### OUTPUT ###', gen_output)
|
33
|
+
end
|
34
|
+
|
35
|
+
def select_template(interactive = pbm.options.interactive)
|
36
|
+
interactive ? interactive_template : default_template
|
37
|
+
end
|
38
|
+
|
39
|
+
def default_template
|
40
|
+
cfg['default_template'] || DEFAULT_TMPL
|
41
|
+
end
|
42
|
+
|
43
|
+
def interactive_template
|
44
|
+
cfg['interactive_template'] || INTERACTIVE_TMPL
|
45
|
+
end
|
46
|
+
|
47
|
+
def gen_consts(constants = pbm.constants)
|
48
|
+
constants
|
49
|
+
.select { |c| c.type == :mod }
|
50
|
+
.map { |c| gen_mod(c) }
|
51
|
+
end
|
52
|
+
|
53
|
+
def gen_mod(c)
|
54
|
+
# underscores in numeric literals is available from Python3.6
|
55
|
+
v = c.value.gsub('^', '**').gsub(',', '')
|
56
|
+
"MOD = #{v}"
|
57
|
+
end
|
58
|
+
|
59
|
+
def gen_decls(inpdefs = pbm.formats)
|
60
|
+
inpdefs.map { |inpdef| gen_decl(inpdef) }.flatten
|
61
|
+
end
|
62
|
+
|
63
|
+
def gen_decl(inpdef)
|
64
|
+
case inpdef.container
|
65
|
+
when :single
|
66
|
+
gen_single_decl(inpdef)
|
67
|
+
when :harray
|
68
|
+
gen_harray_decl(inpdef)
|
69
|
+
when :varray
|
70
|
+
if inpdef.names.size == 1
|
71
|
+
gen_varray_1_decl(inpdef)
|
72
|
+
else
|
73
|
+
gen_varray_n_decl(inpdef)
|
74
|
+
end
|
75
|
+
when :matrix
|
76
|
+
gen_matrix_decl(inpdef)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def gen_single_decl(inpdef)
|
81
|
+
names = inpdef.names
|
82
|
+
dcl = names.join(', ')
|
83
|
+
expr = gen_expr(inpdef.item, names.size > 1)
|
84
|
+
"#{dcl} = #{expr}"
|
85
|
+
end
|
86
|
+
|
87
|
+
def gen_harray_decl(inpdef)
|
88
|
+
v = inpdef.names[0]
|
89
|
+
dcl = "#{v}s"
|
90
|
+
expr = gen_expr(inpdef.item, true)
|
91
|
+
"#{dcl} = #{expr}"
|
92
|
+
end
|
93
|
+
|
94
|
+
def gen_varray_1_decl(inpdef)
|
95
|
+
v = inpdef.names[0]
|
96
|
+
sz = inpdef.size[0]
|
97
|
+
dcl = "#{v}s"
|
98
|
+
expr = gen_expr(inpdef.item, false)
|
99
|
+
"#{dcl} = [#{expr} for _ in range(#{sz})]"
|
100
|
+
end
|
101
|
+
|
102
|
+
def gen_varray_n_decl(inpdef)
|
103
|
+
names = inpdef.names
|
104
|
+
sz = inpdef.size[0]
|
105
|
+
dcl = names.map { |v| "#{v}s[i]" }.join(', ')
|
106
|
+
expr = gen_expr(inpdef.item, true)
|
107
|
+
ret = []
|
108
|
+
ret += names.map { |v| "#{v}s = [None for _ in range(#{sz})]" }
|
109
|
+
ret << "for i in range(#{sz}):"
|
110
|
+
ret << " #{dcl} = #{expr}"
|
111
|
+
ret
|
112
|
+
end
|
113
|
+
|
114
|
+
def gen_matrix_decl(inpdef)
|
115
|
+
v = inpdef.names[0]
|
116
|
+
sz = inpdef.size[0]
|
117
|
+
decl = "#{v}ss"
|
118
|
+
expr = gen_expr(inpdef.item, true)
|
119
|
+
"#{decl} = [#{expr} for _ in range(#{sz})]"
|
120
|
+
end
|
121
|
+
|
122
|
+
def gen_expr(item, split)
|
123
|
+
case item
|
124
|
+
when :number
|
125
|
+
split ? 'list(map(int, input().split()))' : 'int(input())'
|
126
|
+
when :string
|
127
|
+
split ? 'input().split()' : 'input()'
|
128
|
+
when :char
|
129
|
+
'input()'
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def gen_output(vs = pbm.options.binary_values)
|
134
|
+
if vs
|
135
|
+
"print('#{vs[0]}' if cond else '#{vs[1]}')"
|
136
|
+
else
|
137
|
+
'print(ans)'
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: at_coder_friends-generator-python_ref
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- nejiko96
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-10-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: at_coder_friends
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
description: |2
|
70
|
+
AtCoderFriends plugin
|
71
|
+
which Generates Python source from problem description
|
72
|
+
(reference implementation)
|
73
|
+
email:
|
74
|
+
- nejiko2006@gmail.com
|
75
|
+
executables: []
|
76
|
+
extensions: []
|
77
|
+
extra_rdoc_files: []
|
78
|
+
files:
|
79
|
+
- ".gitignore"
|
80
|
+
- ".rspec"
|
81
|
+
- ".rubocop.yml"
|
82
|
+
- ".rubocop_todo.yml"
|
83
|
+
- ".travis.yml"
|
84
|
+
- CHANGELOG.md
|
85
|
+
- CODE_OF_CONDUCT.md
|
86
|
+
- Gemfile
|
87
|
+
- Gemfile.lock
|
88
|
+
- LICENSE.txt
|
89
|
+
- README.md
|
90
|
+
- Rakefile
|
91
|
+
- at_coder_friends-generator-python_ref.gemspec
|
92
|
+
- bin/console
|
93
|
+
- bin/setup
|
94
|
+
- lib/at_coder_friends/generator/python_ref.rb
|
95
|
+
- lib/at_coder_friends/generator/python_ref/version.rb
|
96
|
+
- templates/python_ref_default.py
|
97
|
+
- templates/python_ref_interactive.py
|
98
|
+
homepage: https://github.com/nejiko96/at_coder_friends-generator-python_ref
|
99
|
+
licenses:
|
100
|
+
- MIT
|
101
|
+
metadata:
|
102
|
+
homepage_uri: https://github.com/nejiko96/at_coder_friends-generator-python_ref
|
103
|
+
source_code_uri: https://github.com/nejiko96/at_coder_friends-generator-python_ref
|
104
|
+
changelog_uri: https://github.com/nejiko96/at_coder_friends-generator-python_ref/CHANGELOG.md
|
105
|
+
post_install_message:
|
106
|
+
rdoc_options: []
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 2.3.0
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubyforge_project:
|
121
|
+
rubygems_version: 2.5.2.3
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: Python generator for AtCoderFriends
|
125
|
+
test_files: []
|