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 json | |
import logging | |
import os | |
import random | |
import sys | |
from datetime import datetime, timedelta | |
import attr | |
import mohawk | |
import pytz |
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 os | |
import re | |
def forge_package_version(): | |
git_rev = os.popen('git describe --tags').read().strip() # type: str | |
groups = re.match(r'^((\d+).(\d+)(.\d+)?)(-(\d+)-([0-9A-Za-z]+))?$', git_rev).groups() | |
major = int(groups[1]) |
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
/** usage sample | jsfiddle: https://jsfiddle.net/q9g34fzp/10/ **/ | |
function queue() { | |
this.gid = 0; | |
this.q = []; | |
} | |
queue.prototype = { | |
gid: 0, | |
q: [], |