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 functools import wraps | |
from inspect import Parameter, Signature | |
# ---------------------------------------------------------- | |
# Helper Regular Expression str builders | |
# ---------------------------------------------------------- | |
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 sqlalchemy import Column, event, TIMESTAMP | |
from sqlalchemy.sql.expression import FunctionElement | |
from sqlalchemy.schema import DDLElement, FetchedValue | |
from sqlalchemy.ext import compiler | |
# DDL to create set_updated_at_timestamp function | |
UPDATED_AT_DDL_STATEMENT = """\ | |
CREATE OR REPLACE FUNCTION set_updated_at_timestamp() | |
RETURNS TRIGGER AS $$ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 sqlalchemy import (DDL, event, Column, TEXT, select, func, | |
FLOAT, CHAR, DATE, Table, table, MetaData) | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.schema import CreateColumn | |
from sqlalchemy.sql.ddl import _CreateDropBase | |
from sqlalchemy.ext.compiler import compiles | |
class _View(Table): | |
__visit_name__ = 'view' |
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
""" | |
Proposal for implementing frozendict in stdlib to cleanup implementing code | |
that involves data mapping and conversions. | |
""" | |
from types import MappingProxyType | |
##################################################### | |
# Current way | |
##################################################### |
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
# https://github.com/jasonjoh/python_tutorial/blob/master/tutorial/outlookservice.py#L89 | |
import csv | |
import uuid | |
import requests | |
graph_endpoint = 'https://graph.microsoft.com/v1.0{0}' | |
def make_api_call(method, url, token, payload=None, parameters=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 collections import namedtuple | |
import probablepeople as pp | |
ContactName = namedtuple('ContactName', 'first last') | |
sample_names = [ | |
ContactName('BOB', 'SMITH, JR'), | |
ContactName('Robert P.', 'Kardashian, CFA, CAIA'), |