Skip to content

Instantly share code, notes, and snippets.

View count_numbers.py
def count_numbers(sorted_list, less_than):
count = 0
length = len(sorted_list)
if not length:
return 0
if length == 1:
return count + 1 if sorted_list[0] < less_than else count
elif sorted_list[-1] < less_than:
return count + length
View tesssss
[ec2-user@ip-10-0-1-245 backup]$ docker exec -it 302a6c42fe36 /bin/bash
root@302a6c42fe36:/# mongodump -d heatmap-db -c ha0995231984_mouse -o /data/backup
2020-05-22T13:05:05.225+0000 writing heatmap-db.ha0995231984_mouse to
2020-05-22T13:05:05.226+0000 done dumping heatmap-db.ha0995231984_mouse (0 documents)
root@302a6c42fe36:/# mongodump -d heatmap-db -c ha0995231984_pv -o /data/backup
2020-05-22T13:05:12.185+0000 writing heatmap-db.ha0995231984_pv to
2020-05-22T13:05:12.187+0000 done dumping heatmap-db.ha0995231984_pv (0 documents)
root@302a6c42fe36:/# mongodump -d heatmap-db -c ha0995231984_scroll -o /data/backup
2020-05-22T13:05:19.667+0000 writing heatmap-db.ha0995231984_scroll to
2020-05-22T13:05:19.668+0000 done dumping heatmap-db.ha0995231984_scroll (0 documents)