Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions banyan-polars/banyan_polars/api/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ def read_csv(p):
["Blocked", "Consolidated", "Grouped"],
)
)

# TODO: Implement write_csv such that it writes and returns the location it has written to
4 changes: 4 additions & 0 deletions banyan-python/banyan/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
"BANYAN_API_ENDPOINT",
default="https://4whje7txc2.execute-api.us-west-2.amazonaws.com/prod/",
)

NUM_PROCESSES_PER_INVOCATION = 6

MAX_SQS_MESSAGE_LENGTH = 220_000
5 changes: 5 additions & 0 deletions banyan-python/banyan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,8 @@ def to_list(l) -> Optional[List]:
return None
else:
return [l]

def batch(iterable, n=1):
l = len(iterable)
for ndx in range(0, l, n):
yield iterable[ndx:min(ndx + n, l)]
Loading