-
Define the time-slicing configuration.
a. Create a file called
time-slicing-config-all.yamlwith the following contents:apiVersion: v1 kind: ConfigMap metadata: name: time-slicing-config-all data:
| import fire | |
| import pika | |
| import redis | |
| import os | |
| from typing import Any | |
| from typing import Dict | |
| from typing import List | |
| from typing import Tuple | |
| import celery |
| from collections import defaultdict | |
| import fire | |
| from pdfminer.converter import PDFPageAggregator | |
| from pdfminer.layout import LAParams | |
| from pdfminer.layout import LTChar | |
| from pdfminer.layout import LTTextBox | |
| from pdfminer.layout import LTTextLine | |
| from pdfminer.pdfinterp import PDFPageInterpreter | |
| from pdfminer.pdfinterp import PDFResourceManager |
convert google takeout archive for location history from kml to gpx and split file into one per day
gpsbabel -i kml -f Location\ History.kml -o gpx -F out.gpx
gpsbabel -t -i gpx -f out.gpx -x track,merge,pack,split,title="ACTIVE LOG # %Y%m%d" -o gpx -F split.gpx
python2 gpxsplitter.py split.gpx
| pip install -e git://github.com/{ username }/{ reponame }.git@{ tag name }#egg={ desired egg name } |
| # 1. Install system deps | |
| apt install ghostscript python3-tk | |
| # 2. Install python deps | |
| pip install | |
| excalibur-py \ | |
| python3-ghostscript \ | |
| "jinja2<3.1.0" \ | |
| "Flask==1.1.4" \ | |
| "markupsafe==2.0.1" |
Motor is an async Python driver for MongoDB.
You should use Motor when you're trying to interact with a MongoDB database in an asynchronous context. When you're making something that needs to be asynchronous (like a web server, or most commonly from what I've seen here, Discord bots), you also want all the database calls to be done asynchronously. But pymongo is synchronous, i.e it is blocking, and will block the execution of your asynchronous program for the time that it is talking to the database.
Thankfully for us, switching from pymongo to Motor isn't too hard, and won't need you to change much code. This process can be roughly summarized as:
Installing can be done with pip - pip install motor