mirror of
https://github.com/wassname/pytorch-for-numpy-users.git
synced 2026-06-27 16:10:21 +08:00
Add README.md.in
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
# PyTorch for Numpy users.
|
||||||
|
|
||||||
|
[](https://travis-ci.com/wkentaro/pytorch-for-numpy-users)
|
||||||
|
|
||||||
|
[PyTorch](https://github.com/pytorch/pytorch.git) version of [_Torch for Numpy users_](https://github.com/torch/torch7/wiki/Torch-for-Numpy-users).
|
||||||
|
|
||||||
|
$contents
|
||||||
+13
-15
@@ -2,25 +2,12 @@
|
|||||||
|
|
||||||
import collections
|
import collections
|
||||||
import os.path as osp
|
import os.path as osp
|
||||||
|
import string
|
||||||
|
|
||||||
import tabulate
|
import tabulate
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
TEMPLATE = '''\
|
|
||||||
# PyTorch for Numpy users.
|
|
||||||
|
|
||||||
[](https://travis-ci.com/wkentaro/pytorch-for-numpy-users)
|
|
||||||
|
|
||||||
[PyTorch](https://github.com/pytorch/pytorch.git) version of [_Torch for Numpy users_](https://github.com/torch/torch7/wiki/Torch-for-Numpy-users).
|
|
||||||
|
|
||||||
{contents}
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
here = osp.dirname(osp.abspath(__file__))
|
|
||||||
|
|
||||||
|
|
||||||
def get_section(title, data, h=2):
|
def get_section(title, data, h=2):
|
||||||
if not isinstance(data, list):
|
if not isinstance(data, list):
|
||||||
content = '%s %s\n\n' % ('#' * h, title.capitalize())
|
content = '%s %s\n\n' % ('#' * h, title.capitalize())
|
||||||
@@ -56,4 +43,15 @@ def get_contents():
|
|||||||
return '\n'.join(contents)
|
return '\n'.join(contents)
|
||||||
|
|
||||||
|
|
||||||
print(TEMPLATE.format(contents=get_contents()))
|
here = osp.dirname(osp.abspath(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
template = open(osp.join(here, 'README.md.in')).read()
|
||||||
|
template = string.Template(template)
|
||||||
|
readme = template.substitute(contents=get_contents())
|
||||||
|
print(readme)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user