Begin default phoxy behaviour
175547
public static function Start()
  {
    global $_SERVER;
    if (!phoxy_conf()["is_ajax_request"] && phoxy_conf()["api_csrf_prevent"])
      die("Request aborted due API direct CSRF warning");

    if (phoxy_conf()["buffered_output"])
      ob_start();

    global $_GET;
    $get_param = phoxy::Config()["get_api_param"];
    $file = $_GET[$get_param];
    unset($_GET[$get_param]);

    if ($file === 'htaccess')
      exit('Rewrite engine work SUCCESS');

    try
    {
      include_once('rpc_string_parser.php');
      $parser = new \phoxy\rpc_string_parser();

      global $_phoxy_process_obj;
      $_phoxy_process_obj = $obj = $parser->GetRpcObject($file, $_GET);
      $a = $obj['obj'];

      $method = $obj['method'];
      if (is_string($method))
        $method = [$method, []];

      $result = $a->APICall($method[0], $method[1]);
    } catch (phoxy_protected_call_error $e)
    {
      $error = $e->result;

      if (!isset($error['error']))
        $error['phoxy_comment'] = "Phoxy caught soft error. Look inside network log";


      $result = new phoxy_return_worker($error);
    }

    $prepared = (string)$result;

    if (phoxy_conf()["buffered_output"])
    {
      $buffered_output = ob_get_contents();
      ob_end_clean();
    }

    if (phoxy_conf()["debug_api"] && !phoxy_conf()["is_ajax_request"])
    {
      echo "<h1>Result</h1>\n";
      var_dump($result->obj);
    }
    else
      header('Content-Type: application/json; charset=utf-8');

    if (!phoxy_conf()["debug_api"] || phoxy_conf()["is_ajax_request"])
      echo $prepared;
    else if (phoxy_conf()["buffered_output"])
      echo "\n<hr><h1>Log</h1>\n{$buffered_output}";
  }
609824
def cond_init(m:nn.Module, init_func:LayerFunc):
    ""
    if (not isinstance(m, bn_types)) and requires_grad(m): init_default(m, init_func)
230280
def init(opts):
    '''
    
    '''
    proxy_dict = opts.get('proxy', {})
    opts['multiprocessing'] = proxy_dict.get('multiprocessing', False)
    netmiko_connection_args = proxy_dict.copy()
    netmiko_connection_args.pop('proxytype', None)
    netmiko_device['always_alive'] = netmiko_connection_args.pop('always_alive',
                                                                 opts.get('proxy_always_alive', True))
    try:
        connection = ConnectHandler(**netmiko_connection_args)
        netmiko_device['connection'] = connection
        netmiko_device['initialized'] = True
        netmiko_device['args'] = netmiko_connection_args
        netmiko_device['up'] = True
        if not netmiko_device['always_alive']:
            netmiko_device['connection'].disconnect()
    except NetMikoTimeoutException as t_err:
        log.error('Unable to setup the netmiko connection', exc_info=True)
    except NetMikoAuthenticationException as au_err:
        log.error('Unable to setup the netmiko connection', exc_info=True)
    return True
284254
def _default(cls, opts):
        """"""
        level = getattr(logging, opts.log_level, logging.DEBUG)

        logger = logging.getLogger('luigi-interface')
        logger.setLevel(level)

        stream_handler = logging.StreamHandler()
        stream_handler.setLevel(level)

        formatter = logging.Formatter('%(levelname)s: %(message)s')
        stream_handler.setFormatter(formatter)

        logger.addHandler(stream_handler)
        return True
446787
def default(self, line):
        """"""
        args = self._split_args(line, 0, 99)
        d1_cli.impl.util.print_error("Unknown command: {}".format(args[0]))
375091
private function init()
    {
        if (!$this->plink) {
            if (!extension_loaded('pspell')) {
                $this->error = "Pspell extension not available";
                return;
            }

            $this->plink = pspell_new($this->lang, null, null, RCUBE_CHARSET, PSPELL_FAST);
        }

        if (!$this->plink) {
            $this->error = "Unable to load Pspell engine for selected language";
        }
    }
59101
function startLine (e) {
            e.preventDefault();

            strokes = that.strokes;
            sketching = true;
            that.undos = [];

            var cursor = getCursorRelativeToCanvas(e);
            strokes.push({
                points: [cursor],
                color: opts.line.color,
                size: getLineSizeRelativeToCanvas(opts.line.size),
                cap: opts.line.cap,
                join: opts.line.join,
                miterLimit: opts.line.miterLimit
            });
        }
548006
private void firstInnerTableStart(Options opt) {
	w.print(linePrefix + linePrefix + "<tr>" + opt.shape.extraColumn() +
		"<td><table border=\"0\" cellspacing=\"0\" " +
		"cellpadding=\"1\">" + linePostfix);
    }
1319365
def init(opts):
    '''
    
    '''
    opts['multiprocessing'] = False
    log.debug('Opening connection to junos')

    args = {"host": opts['proxy']['host']}
    optional_args = ['user',
                     'username',
                     'password',
                     'passwd',
                     'port',
                     'gather_facts',
                     'mode',
                     'baud',
                     'attempts',
                     'auto_probe',
                     'ssh_private_key_file',
                     'ssh_config',
                     'normalize'
                     ]

    if 'username' in opts['proxy'].keys():
        opts['proxy']['user'] = opts['proxy'].pop('username')
    proxy_keys = opts['proxy'].keys()
    for arg in optional_args:
        if arg in proxy_keys:
            args[arg] = opts['proxy'][arg]

    thisproxy['conn'] = jnpr.junos.Device(**args)
    try:
        thisproxy['conn'].open()
    except (ProbeError, ConnectAuthError, ConnectRefusedError, ConnectTimeoutError,
            ConnectError) as ex:
        log.error("{} : not able to initiate connection to the device".format(str(ex)))
        thisproxy['initialized'] = False
        return

    if 'timeout' in proxy_keys:
        timeout = int(opts['proxy']['timeout'])
        try:
            thisproxy['conn'].timeout = timeout
        except Exception as ex:
            log.error('Not able to set timeout due to: %s', str(ex))
        else:
            log.debug('RPC timeout set to %d seconds', timeout)

    try:
        thisproxy['conn'].bind(cu=jnpr.junos.utils.config.Config)
    except Exception as ex:
        log.error('Bind failed with Config class due to: {}'.format(str(ex)))

    try:
        thisproxy['conn'].bind(sw=jnpr.junos.utils.sw.SW)
    except Exception as ex:
        log.error('Bind failed with SW class due to: {}'.format(str(ex)))
    thisproxy['initialized'] = True
566892
function deflate_start(level) {
		var i;

		if (!level) {
			level = DEFAULT_LEVEL;
		} else if (level < 1) {
			level = 1;
		} else if (level > 9) {
			level = 9;
		}

		compr_level = level;
		initflag = false;
		eofile = false;
		if (outbuf !== null) {
			return;
		}

		free_queue = qhead = qtail = null;
		outbuf = []; // new Array(OUTBUFSIZ); // outbuf.length never called
		window = []; // new Array(window_size); // window.length never called
		d_buf = []; // new Array(DIST_BUFSIZE); // d_buf.length never called
		l_buf = []; // new Array(INBUFSIZ + INBUF_EXTRA); // l_buf.length never called
		prev = []; // new Array(1 << BITS); // prev.length never called

		dyn_ltree = [];
		for (i = 0; i < HEAP_SIZE; i++) {
			dyn_ltree[i] = new DeflateCT();
		}
		dyn_dtree = [];
		for (i = 0; i < 2 * D_CODES + 1; i++) {
			dyn_dtree[i] = new DeflateCT();
		}
		static_ltree = [];
		for (i = 0; i < L_CODES + 2; i++) {
			static_ltree[i] = new DeflateCT();
		}
		static_dtree = [];
		for (i = 0; i < D_CODES; i++) {
			static_dtree[i] = new DeflateCT();
		}
		bl_tree = [];
		for (i = 0; i < 2 * BL_CODES + 1; i++) {
			bl_tree[i] = new DeflateCT();
		}
		l_desc = new DeflateTreeDesc();
		d_desc = new DeflateTreeDesc();
		bl_desc = new DeflateTreeDesc();
		bl_count = []; // new Array(MAX_BITS+1); // bl_count.length never called
		heap = []; // new Array(2*L_CODES+1); // heap.length never called
		depth = []; // new Array(2*L_CODES+1); // depth.length never called
		length_code = []; // new Array(MAX_MATCH-MIN_MATCH+1); // length_code.length never called
		dist_code = []; // new Array(512); // dist_code.length never called
		base_length = []; // new Array(LENGTH_CODES); // base_length.length never called
		base_dist = []; // new Array(D_CODES); // base_dist.length never called
		flag_buf = []; // new Array(parseInt(LIT_BUFSIZE / 8, 10)); // flag_buf.length never called
	}
737318
def hw(self, hw):
        
        if hw.upper() == "INIT":
            self._raw(HW_INIT)
        elif hw.upper() == "SELECT":
            self._raw(HW_SELECT)
        elif hw.upper() == "RESET":
            self._raw(HW_RESET)
        else: # DEFAULT: DOES NOTHING
            pass
779653
def default(self, line):
        """"""

        if any((line.startswith(x) for x in self.argparse_names())):
            try:
                args = self.argparser.parse_args(shlex.split(line))
            except Exception:  # intentionally catches also other errors in argparser
                pass
            else:
                args.func(args)
        else:
            cmd.Cmd.default(self, line)
280773
function(compose, project, opts) {

    // Default options
    // NOTE: background=true causes rm to be ignored
    // So we are setting mode to default to collect on win32
    var defaults = {
      environment: [],
      noDeps: false,
      rm: true,
      background: (process.platform === 'win32') ? true : false,
      cmd: ''
    };

    // Get opts
    var options = (opts) ? _.merge(defaults, opts) : defaults;

    // Get whether we want to attach/collect or not
    var mode = (options.background) ? false : (opts.mode || false);

    // Execute
    return shCompose(
      buildCmd(compose, project, 'run', options),
      {
        app: opts.app,
        mode: mode
      }
    );

  }
867494
def _init(
            self, default_prefix='_',
            fext=TMPL_FN_EXT, req_tmpl_name=REQ_TMPL_NAME,
            text_prefix=REQUIREJS_TEXT_PREFIX,
            auto_reload=False,
            *a, **kw):
        

        self.default_prefix = default_prefix
        self.molds = {}
        self.tracked_entry_points = {}
        self.fext = fext
        self.req_tmpl_name = req_tmpl_name
        self.text_prefix = text_prefix
        self.auto_reload = auto_reload
1314146
def start(self):
        

        def handle(signum, frame):
            if signum == signal.SIGWINCH:
                self.pty.resize()

        self.original_handler = signal.signal(signal.SIGWINCH, handle)
549496
def _default(self, line):
        '''
        '''
        if line.strip().startswith('#'):
            return self._comment(line)
        self.install.append(line)
450528
def default(self):
        """"""
        output = ensure_unicode(self.git.log(
            '-1',
            '-p',
            '--no-color',
            '--format=%s',
        ).stdout)
        lines = output.splitlines()
        return u'\n'.join(
            itertools.chain(
                lines[:1],
                itertools.islice(
                    itertools.dropwhile(
                        lambda x: not x.startswith('+++'),
                        lines[1:],
                    ),
                    1,
                    None,
                ),
            )
        )