This file contains hidden or 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 python3 | |
| import os | |
| import re | |
| import logging | |
| import click | |
| # don't index these | |
| excludes = { | |
| 'single_files', | |
| 'Icon', |
This file contains hidden or 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 cv2, queue, threading, time | |
| class VideoCapture: | |
| def __init__(self, name): | |
| self.cap = cv2.VideoCapture(name) | |
| self.q = queue.Queue() | |
| t = threading.Thread(target=self._reader) | |
| t.daemon = True | |
| t.start() |
This file contains hidden or 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
| """A liveness prober dag for monitoring composer.googleapis.com/environment/healthy.""" | |
| import airflow | |
| from airflow import DAG | |
| from airflow.operators.bash_operator import BashOperator | |
| from datetime import timedelta | |
| default_args = { | |
| 'start_date': airflow.utils.dates.days_ago(0), | |
| 'retries': 1, | |
| 'retry_delay': timedelta(minutes=5) |
This file contains hidden or 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
| class QueryBuilder: | |
| def __init__(self): | |
| self.select_value = '' | |
| self.from_table_name = '' | |
| self.where_value = '' | |
| self.groupby_value = '' | |
| def select(self, select_arg): | |
| self.select_value = select_arg | |
| return self |
This file contains hidden or 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 flask import Flask, request, jsonify | |
| from flask_sqlalchemy import SQLAlchemy | |
| from flask_marshmallow import Marshmallow | |
| from flask_restful import Resource, Api | |
| app = Flask(__name__) | |
| api = Api(app) | |
| app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///users.db' | |
| app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False |
OlderNewer