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 is modelled on the example for the | |
// Python itertools.product example. | |
// | |
// It creates the entire product vector | |
// before yielding. This is acceptable | |
// for the use case it serves, with | |
// a smallish number of smallish iterables | |
// to create. | |
function *product_gen(vec) { | |
let result = [[]]; |
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 control_caching(func): | |
"""This can control whether Django's never_cache is active. | |
It can be used as a decorator. For example | |
@control_never_cache | |
def some_view(request): | |
# The code for some_view here | |
""" |