Skip to content

Commit

Permalink
added parquent
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Al-Saffar committed Jul 22, 2024
1 parent b469522 commit ee30ae2
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 ee30ae2

Please sign in to comment.