def _show_all_reminders (message):

    response = '\n# One time reminders:\n\n'

    for reminder in RemindOnce.select().where(RemindOnce.sent == 0,
                                              RemindOnce.time >= datetime.datetime.now()):

        orig_message = json.loads(reminder.orig_message)
        if orig_message['chat']['id'] == message['chat']['id']:
            response += '(#{id}) {human} @{time} | {message}\n'.format(
                id = reminder.id,
                human = arrow.get(reminder.time,
                                  config.get('reminder', 'timezone', 'UTC')).humanize(),
                time = str(reminder.time),
                message = reminder.message[:20] + '...' \
                    if len(reminder.message) > 20 else reminder.message)

    response += '\n# Recurring reminders:\n\n'

    for reminder in RemindRecurring.select().where(RemindRecurring.sent == 0,
                                                   RemindRecurring.next_run >= datetime.datetime.now()):

        orig_message = json.loads(reminder.orig_message)
        if orig_message['chat']['id'] == message['chat']['id']:
            response += '(#{id}) {human} @{next_run} | {message}\n'.format(
                id = reminder.id,
                human = arrow.get(reminder.next_run,
                                  config.get('reminder', 'timezone', 'UTC')).humanize(),
                next_run = str(reminder.next_run),
                message = reminder.message[:20] + '...' \
                    if len(reminder.message) > 20 else reminder.message)

    return response
Patch-map over interior windows, ignoring the border
dataset/ETHPy150Open leonjza/hogar/hogar/Plugins/Reminders/main.py/_show_all_reminders--crossover with--dataset/ETHPy150Open iskandr/parakeet/parakeet/lib/patchmap.py/pmap2_trim