This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# To keep updating codes from git repository | |
# | |
# feng.charmy@gmail.com | |
# Nothe: please make sure git config has read permission of repository | |
# | |
# Usage ./sync_dags.sh git@github.com:user/repo.git branch_name\ | |
# -t interval_in_seconds\ | |
# -d sparse_checkout_directory(optional) -d more_sparse_checkout_directory ..\ | |
# -e execute_command_after_sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from sqlalchemy import create_engine, MetaData, Table | |
from sqlalchemy.engine import reflection | |
from sqlalchemy.orm import mapper, sessionmaker | |
logger = logging.getLogger(__name__) | |
def get_session(host=None, port=3306, db=None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7 | |
RUN wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.2.tgz | |
RUN tar -zxvf mongodb-*.tgz | |
RUN rm mongodb-*.tgz | |
RUN mkdir -p /data/db | |
ENV PATH="/mongodb-linux-x86_64-4.0.2/bin:${PATH}" | |
EXPOSE 27017 | |
ENTRYPOINT ["mongod"] |
NewerOlder