mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-24 17:05:03 +00:00
formatting
This commit is contained in:
parent
98988c8481
commit
20069b2a7d
37 changed files with 504 additions and 666 deletions
|
|
@ -4,34 +4,37 @@ from importlib import resources
|
|||
from pathlib import Path
|
||||
from typing import Union
|
||||
|
||||
|
||||
def get_data_file_path(filename: str) -> Path:
|
||||
"""Get the path to a data file in the package.
|
||||
|
||||
|
||||
Args:
|
||||
filename: Name of the file in the data directory
|
||||
|
||||
|
||||
Returns:
|
||||
Path object pointing to the data file
|
||||
|
||||
|
||||
Example:
|
||||
>>> path = get_data_file_path("pg19362.txt")
|
||||
>>> with open(path) as f:
|
||||
... content = f.read()
|
||||
"""
|
||||
return resources.files('reasoning_gym.data').joinpath(filename)
|
||||
return resources.files("reasoning_gym.data").joinpath(filename)
|
||||
|
||||
|
||||
def read_data_file(filename: str) -> str:
|
||||
"""Read the contents of a data file in the package.
|
||||
|
||||
|
||||
Args:
|
||||
filename: Name of the file in the data directory
|
||||
|
||||
|
||||
Returns:
|
||||
String contents of the file
|
||||
|
||||
|
||||
Example:
|
||||
>>> content = read_data_file("pg19362.txt")
|
||||
"""
|
||||
return resources.files('reasoning_gym.data').joinpath(filename).read_text()
|
||||
return resources.files("reasoning_gym.data").joinpath(filename).read_text()
|
||||
|
||||
__all__ = ['get_data_file_path', 'read_data_file']
|
||||
|
||||
__all__ = ["get_data_file_path", "read_data_file"]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
The Project Gutenberg eBook of In the year 2889
|
||||
|
||||
|
||||
This ebook is for the use of anyone anywhere in the United States and
|
||||
most other parts of the world at no cost and with almost no restrictions
|
||||
whatsoever. You may copy it, give it away or re-use it under the terms
|
||||
|
|
@ -702,7 +702,7 @@ End of Project Gutenberg's In the Year 2889, by Jules Verne and Michel Verne
|
|||
*** END OF THE PROJECT GUTENBERG EBOOK IN THE YEAR 2889 ***
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Updated editions will replace the previous one—the old editions will
|
||||
be renamed.
|
||||
|
|
@ -807,7 +807,7 @@ performed, viewed, copied or distributed:
|
|||
at www.gutenberg.org. If you
|
||||
are not located in the United States, you will have to check the laws
|
||||
of the country where you are located before using this eBook.
|
||||
|
||||
|
||||
1.E.2. If an individual Project Gutenberg™ electronic work is
|
||||
derived from texts not protected by U.S. copyright law (does not
|
||||
contain a notice indicating that it is posted with permission of the
|
||||
|
|
@ -869,7 +869,7 @@ provided that:
|
|||
Gutenberg Literary Archive Foundation at the address specified in
|
||||
Section 4, “Information about donations to the Project Gutenberg
|
||||
Literary Archive Foundation.”
|
||||
|
||||
|
||||
• You provide a full refund of any money paid by a user who notifies
|
||||
you in writing (or by e-mail) within 30 days of receipt that s/he
|
||||
does not agree to the terms of the full Project Gutenberg™
|
||||
|
|
@ -877,15 +877,15 @@ provided that:
|
|||
copies of the works possessed in a physical medium and discontinue
|
||||
all use of and all access to other copies of Project Gutenberg™
|
||||
works.
|
||||
|
||||
|
||||
• You provide, in accordance with paragraph 1.F.3, a full refund of
|
||||
any money paid for a work or a replacement copy, if a defect in the
|
||||
electronic work is discovered and reported to you within 90 days of
|
||||
receipt of the work.
|
||||
|
||||
|
||||
• You comply with all other terms of this agreement for free
|
||||
distribution of Project Gutenberg™ works.
|
||||
|
||||
|
||||
|
||||
1.E.9. If you wish to charge a fee or distribute a Project
|
||||
Gutenberg™ electronic work or group of works on different terms than
|
||||
|
|
@ -1048,5 +1048,3 @@ This website includes information about Project Gutenberg™,
|
|||
including how to make donations to the Project Gutenberg Literary
|
||||
Archive Foundation, how to help produce our new eBooks, and how to
|
||||
subscribe to our email newsletter to hear about new eBooks.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue