Skip to content

Commit

Permalink
late night changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Aviksaikat committed Oct 9, 2023
1 parent 467e805 commit 06fdeed
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/fds/contracts/ENSRegistry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""
Copyright 2023 The FairDataSociety Authors
This file is part of the FairDataSociety library.
The FairDataSociety library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The FairDataSociety library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the FairDataSociety library. If not, see <http:www.gnu.org/licenses/>.
handles crypto
"""


class ENSRegistry:
def __init__(self):
...
Empty file removed src/fds/contracts/ens_registry.py
Empty file.
23 changes: 23 additions & 0 deletions src/fds/fds_contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""
Copyright 2023 The FairDataSociety Authors
This file is part of the FairDataSociety library.
The FairDataSociety library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The FairDataSociety library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the FairDataSociety library. If not, see <http:www.gnu.org/licenses/>.
handles crypto
"""


class FDSContract:
pass
50 changes: 50 additions & 0 deletions src/fds/fds_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"""
Copyright 2023 The FairDataSociety Authors
This file is part of the FairDataSociety library.
The FairDataSociety library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The FairDataSociety library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the FairDataSociety library. If not, see <http:www.gnu.org/licenses/>.
handles crypto
"""
import os


class Utils:
@staticmethod
def file_to_buffer(file):
if os.name == "nt": # Windows
with open(file, "rb") as f:
return f.read()
else: # Unix-based systems (Linux, macOS)
with open(file, "rb") as f:
return f.read()

@staticmethod
def file_to_string(file):
if os.name == "nt": # Windows
with open(file, "r") as f:
return f.read()
else: # Unix-based systems (Linux, macOS)
with open(file, "r") as f:
return f.read()


if __name__ == "__main__":
# Example usage:
utils = Utils()

buffer = utils.file_to_buffer("CHANGELOG.rst")
string = utils.file_to_string("CHANGELOG.rst")
print(string)
print(buffer)

0 comments on commit 06fdeed

Please sign in to comment.