busy_beaver/common/wrappers/github.py
def filter_items_before(timestamp: datetime, items: list):
    """If event happened after timestamp, keep it"""
    keep_item = [date_parse(item["created_at"]) > timestamp for item in items]

    filtered_items = items[:]
    items_to_pop = len(items) - sum(keep_item)
    for _ in range(items_to_pop):
        filtered_items.pop()

    return filtered_items
If event happened after timestamp, keep it
If event happened after timestamp, keep it
If event happened after timestamp keep it
def filter_items_before(timestamp: datetime, items: list):
    keep_item = [date_parse(item["created_at"]) > timestamp for item in items]
    filtered_items = items[:]
    items_to_pop = len(items) - sum(keep_item)
    for _ in range(items_to_pop):
        filtered_items.pop()
    return filtered_items
def filter_items_before ( timestamp : datetime , items : list ) : keep_item = [ date_parse ( item [ "created_at" ] ) > timestamp for item in items ] filtered_items = items [ : ] items_to_pop = len ( items ) - sum ( keep_item ) for _ in range ( items_to_pop ) : filtered_items . pop ( ) return filtered_items
If event happened after timestamp, keep it
If event happened after timestamp keep it
"""If event happened after timestamp, keep it"""
timestamp
datetime
items
list