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
""" Until Sendgrid updates the Python SDK to handle the new dynamic template data, you can use this Gist to | |
manage dynmaic template data in your python application. | |
The DynamicTemplateData is used to assign the key and value of the data, then NewPersonalizations is a subclass | |
of the existing Personalizations to which the DynamicTemplateData can be added. | |
This Gist takes inspiration from Sendgrid's Python SDK custom_args and CustomArgs. | |
Hopefully, other finds this useful and Sendgrid updates their Python SDK soon | |
""" |
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
// This script assumes that there will be several groups of data in each row and create a distinct collection of JSON for | |
// each group. The group data is contained in the frozen headers, with all but the bottom header cell being the same for | |
// a given group. The labels for the group header data will be in the first column. The row id data, common to all data | |
// groups in the row, is found in first several columns, and ends with a blank column. A data group ends with a change in | |
// the group header data or a blank column. | |
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; |
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
def provideRatings(teams=None): | |
""" Provides ratings object for generating ratings table in a template. If no teams | |
are provided, provide all teams for now result. | |
Arg: A teams object. | |
Returns: ratings object | |
""" | |
# Store player | |
player_id = login_session['player_id'] | |
# If not teams are provided, provide active teams | |
if not teams: |