Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Al-Saffar committed Jul 23, 2024
2 parents 037de22 + ee30ae2 commit 1d942f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions myresources/crocodile/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class NetworkAddresses(TypedDict):


def get_network_addresses() -> NetworkAddresses:
print("Getting network addresses")
import uuid
mac = uuid.getnode()
mac_address = ":".join((f"{mac}012X")[i:i + 2] for i in range(0, 12, 2)) # type: ignore
Expand Down
4 changes: 4 additions & 0 deletions myresources/crocodile/file_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def py(path: PLike, init_globals: Optional[dict[str, Any]] = None, run_name: Opt
return runpy.run_path(str(path), init_globals=init_globals, run_name=run_name)
@staticmethod
def txt(path: PLike, encoding: str = 'utf-8') -> str: return P(path).read_text(encoding=encoding)
@staticmethod
def parquet(path: PLike, **kwargs: Any):
import pandas as pd
return pd.read_parquet(path, **kwargs)


def modify_text(txt_raw: str, txt_search: str, txt_alt: Union[str, Callable[[str], str]], replace_line: bool = True, notfound_append: bool = False, prepend: bool = False, strict: bool = False):
Expand Down

0 comments on commit 1d942f3

Please sign in to comment.