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
import { memoize, partialRight } from 'lodash'; | |
/** | |
* Custom memoize that uses a 1 minute TTL | |
* @see https://lodash.com/docs/4.17.15#memoize | |
*/ | |
const memo = partialRight(memoize, function memoResolver(...args) { | |
// or for one hour: (new Date()).getHours(); | |
const time = (new Date()).getMinutes(); |
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
# -*- coding: utf-8 -*- | |
import requests | |
from io import BytesIO, SEEK_SET, SEEK_END | |
class ResponseStream(object): | |
def __init__(self, request_iterator): | |
self._bytes = BytesIO() | |
self._iterator = request_iterator |
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
(function (api, $) { | |
'use strict'; | |
api.writeText = function (x, y, text, options) { | |
options = options || {}; | |
var defaults = { | |
align: 'left', | |
width: this.internal.pageSize.width | |
} |