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 re | |
def inline_func(code: str, globals_=None, locals_=None): | |
if globals_ is None: globals_ = globals() | |
if locals_ is None: locals_ = locals() | |
lines = code.splitlines(keepends=True) | |
indent = None | |
func_name = None |
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
// | |
// randexp v0.4.2 | |
// Create random strings that match a given regular expression. | |
// | |
// Copyright (C) 2016 by Roly Fentanes (https://github.com/fent) | |
// MIT License | |
// http://github.com/fent/randexp.js/raw/master/LICENSE | |
// | |
;!function () { | |
var name = 'RandExp'; |
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 MicroRoute extends Route { | |
/** @var array */ | |
private $callbacks; | |
/** | |
* @param string URL mask, e.g. '<presenter>/<action>/<id \d{1,3}>' | |
* @param int flags | |
*/ | |
public function __construct($mask, $flags = 0) { |
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
use Nette\Utils\Strings; | |
class Lock { | |
/** @var string */ | |
protected $dir; | |
/** @var array */ | |
protected $lockHandle = array(); |