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 python | |
| # python 3 | |
| # pylint: disable= | |
| ## @file: GenerateDoxyFileBlockBiomeme.py | |
| # @name: "Luke Gary" | |
| # @company: "Biomeme, Inc" | |
| # @date: 2020/6/2 | |
| #################################################################################################### | |
| # @copyright | |
| # Copyright 2020 "Biomeme, Inc" as an unpublished work. |
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
| ## @file: CDriverSectionTemplate.py | |
| # @par: | |
| # @author: | |
| # @company: | |
| # @date: 2016/9/29 | |
| # @Created Time: Mon Sep 19 22:35:32 2016 | |
| # @Last Modified Time: Thu Sep 29 18:29:37 2016 | |
| # @brief: | |
| # @verbatim: | |
| # @note I like the key binding [ctrl+shift+alt+q]... :) |
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 python | |
| # python 3 | |
| # @file: EWMA.py | |
| # @par: | |
| # @author: Luke Gary | |
| # @company: Biomeme, Inc | |
| # @date: 2018/8/15 | |
| # @brief: | |
| # @verbatim: |
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 sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.engine import create_engine | |
| from sqlalchemy.orm.session import sessionmaker, Session | |
| from sqlalchemy import Column, DateTime, String, Integer, func, Float, Boolean, ForeignKey | |
| from sqlalchemy.dialects.postgresql import JSON # postgres specific JSON type for better queries (dont know how yet) | |
| from sqlalchemy.orm import relationship, backref, validates | |
| _base = declarative_base() | |
| # derived table classes go after _base is constructed, table classes are also children of _base | |
| class ParentRecord(_base): |
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 sqlalchemy import create_engine, MetaData, Table | |
| from sqlalchemy.orm import mapper, sessionmaker | |
| import pandas as pd | |
| import pprint as pp | |
| db = 'results_2020-06-01.db' | |
| engine = create_engine(f'sqlite:///{db}', echo=False) | |
| session = sessionmaker(bind=engine)() | |
| # with column filter |
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 python | |
| # python 3 | |
| # pylint: disable= | |
| ## @file: flask-restful-test.py | |
| # @name: "Luke Gary" | |
| # @company: "" | |
| # @date: 2020/6/11 | |
| #################################################################################################### | |
| # @copyright | |
| # Copyright 2020 "" as an unpublished work. |
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
| ######## CUSTOM EXCEPTION ######## | |
| class Test(Exception): | |
| def __init__(self, *args): | |
| print(*args) | |
| super().__init__(*args) | |
| >>> raise Test() | |
| #Traceback (most recent call last): | |
| # File "<stdin>", line 1, in <module> | |
| #__main__.Test |
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 os import environ | |
| from jira import JIRA | |
| import pprint as pp | |
| # need to create an API Token via Atlassian Account Mgmt | |
| # store as env variable on machine | |
| username = '<user@email_url.gfy>' | |
| api_token = environ.get('JIRA_API_TOKEN') | |
| options = {'server': 'https://<company>.atlassian.net'} | |
| # actually connect via https and API Token based authentication | |
| jira = JIRA(options, basic_auth=(user, api_token)) |
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 sqlalchemy.orm.session import Session | |
| class QueryBuilder: | |
| """ | |
| This class describes a query builer. | |
| """ | |
| q_debug = False | |
| def query_from_dict(self, db_session: Session, **q_params): | |
| """ |
OlderNewer