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
def upload(line): | |
""" | |
Executes some operation using a dict and returns some output | |
This is where the Eloqua POST function would go, | |
I haven't implemented anything | |
:param line: | |
:return: | |
""" | |
return list(line.values()) |
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
def upload(line): | |
""" | |
Executes some operation using a dict and returns some output | |
This is where the Eloqua POST function would go, | |
I haven't implemented anything | |
:param line: | |
:return: | |
""" | |
raise NotImplementedError |
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
class ExampleParent(object): | |
def run(self, *args, **kwargs): | |
print(args[0]) | |
print(kwargs['a']) | |
class ExampleChild(ExampleParent): |
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 os import environ | |
from logging.config import dictConfig | |
from werkzeug.security import generate_password_hash | |
class BaseConfig(object): | |
def _config_logger(self): | |
""" |
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 .base_model import BaseModel | |
from ..extensions import db | |
from .classes.foreign_key_cascade import ForeignKeyCascade | |
# Association table between Payment and Subscription | |
payment_subscription = db.Table( | |
'payment_subscription', | |
db.Column('payment_id', db.Integer, db.ForeignKey('payment.id'), primary_key=True), | |
db.Column('subscription_id', db.Integer, db.ForeignKey('subscription.id'), | |
primary_key=True) |
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 datetime | |
from dateutil.relativedelta import relativedelta | |
from dateutil.rrule import rrule, MONTHLY | |
today = datetime.datetime.today() | |
end1 = today + relativedelta(years=1) | |
end2 = today + relativedelta(years=2) |
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 datetime | |
from dateutil import rrule as rr, relativedelta as rd | |
start_date = datetime.datetime(year=2017, month=1, day=1) | |
end_date = datetime.datetime(year=2018, month=1, day=1) | |
# Generate rule for valid dates under simple rule (Monthly from start until end) | |
valid_rule = rr.rrule(freq=rr.MONTHLY, dtstart=start_date, until=end_date) |
Loading
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
{ | |
"specifications": | |
{ | |
"age": [ | |
{ | |
"min_age": "20", | |
"max_age": "25", | |
"sample_size": "20" | |
}, | |
{ |
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.orm.exc import NoResultFound, MultipleResultsFound | |
from voxco_survey_analysis.exceptions import InvalidUsage | |
from ..models import Analytic | |
def cluster_analysis_function(request): | |
""" | |
Perform a cluster analysis using the analysis group specified in the request |
NewerOlder