Make a lazy connection.
174704
def connection
      @options[:path] =API_VERSION1+ @options[:path]
      @options[:headers] = HEADERS.merge(@options[:headers])

      Megam::Log.debug("HTTP Request Data:")
      Megam::Log.debug("> HTTP #{@options[:scheme]}://#{@options[:host]}")
      @options.each do |key, value|
        Megam::Log.debug("> #{key}: #{value}")
      end
      Megam::Log.debug("End HTTP Request Data.")
      @connection = Excon.new("#{@options[:scheme]}://#{@options[:host]}",@options)
    end
813184
def connection_made(self, transport):
        """"""
        self.port = transport.serial.port
        logger.debug('connection_made: `%s` `%s`', self.port, transport)
        self.transport = transport
        self.connected.set()
        self.disconnected.clear()
1297421
def connect(self):
        """"""
        self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self._socket.settimeout(self._connect_timeout)
        SocketError.wrap(self._socket.connect, (self.host, self.port))
        self._socket.settimeout(None)
        self._socket_file = self._socket.makefile('rb')
348100
def work():
    """"""
    with rq.Connection(create_connection()):
        worker = rq.Worker(list(map(rq.Queue, listen)))
        worker.work()
594212
def connect(*args, **kwargs):
    """"""
    from .connections import Connection
    conn = Connection(*args, **kwargs)
    yield conn.connect()
    raise gen.Return(conn)
29689
async def startup(self, app):
        """"""
        if self.cfg.fake:
            if not FakeConnection:
                raise PluginException('Install fakeredis for fake connections.')

            self.conn = await FakeConnection.create()
            if self.cfg.pubsub:
                self.pubsub_conn = self.conn

        else:
            try:
                if self.cfg.poolsize <= 1:
                    self.conn = await asyncio.wait_for(
                        asyncio_redis.Connection.create(
                            host=self.cfg.host, port=self.cfg.port,
                            password=self.cfg.password, db=self.cfg.db,
                        ), self.cfg.timeout)
                else:
                    self.conn = await asyncio.wait_for(asyncio_redis.Pool.create(
                        host=self.cfg.host, port=self.cfg.port,
                        password=self.cfg.password, db=self.cfg.db,
                        poolsize=self.cfg.poolsize,
                    ), self.cfg.timeout)
                if self.cfg.pubsub:
                    self.pubsub_conn = await asyncio.wait_for(
                        asyncio_redis.Connection.create(
                            host=self.cfg.host, port=self.cfg.port,
                            password=self.cfg.password, db=self.cfg.db,
                        ), self.cfg.timeout
                    )
            except asyncio.TimeoutError:
                raise PluginException('Muffin-redis connection timeout.')

        if self.cfg.pubsub:
            self.pubsub_subscription = await self.pubsub_conn.start_subscribe()
            self.pubsub_reader = ensure_future(self._pubsub_reader_proc(), loop=self.app.loop)
992183
def reverse_lazy_with_query(named_url,**kwargs):
    ""
    q = QueryDict('',mutable=True)
    q.update(kwargs)
    return '{}?{}'.format(reverse_lazy(named_url),q.urlencode())
101276
def connection_made(self, transport):
        """"""
        super().connection_made(transport)
        if hasattr(self.transport, 'serial'):
            _LOGGER.info('Connected to %s', self.transport.serial)
        else:
            _LOGGER.info('Connected to %s', self.transport)
474422
def _connect(self, sock, addr, timeout):
        """"""
        if self.connection:
            raise SocketClientConnectedError()

        if self.connector:
            raise SocketClientConnectingError()

        self.connect_deferred = Deferred(self.loop)
        self.sock = sock
        self.addr = addr
        self.connector = Connector(self.loop, sock, addr, timeout)
        self.connector.deferred.add_callback(self._connected)
        self.connector.deferred.add_errback(self._connect_failed)
        self.connector.start()

        return self.connect_deferred
211198
def connection_made(self, address):
        """"""
        logger.info("connection made to {}".format(address))
        self.count = 0
        self.connected = True
        self.transport.write(b'Echo Me')
828368
def steady_connection(self):
        """"""
        return SteadyPgConnection(self._maxusage, self._setsession, True,
                                  *self._args, **self._kwargs)
295525
def lazy_translations(cls):
        """"""
        return {
            cloudfiles.errors.NoSuchContainer: errors.NoContainerException,
            cloudfiles.errors.NoSuchObject: errors.NoObjectException,
        }
629289
def reconnect(self):
		""""""
		self.lock.acquire()
		if self.use_ssl:
			self.client = http.client.HTTPSConnection(self.host, self.port, context=self.ssl_context)
		else:
			self.client = http.client.HTTPConnection(self.host, self.port)
		self.lock.release()
786504
private void lazyLoad()
  {
    if (_major > 0)
      return;

    try {
      if (_url == null)
        throw new IllegalStateException();
      
      try (InputStream is = _url.openStream()) {
      //ReadStream rs = VfsOld.openRead(is);
        _major = 1;

        ByteCodeParser parser = new ByteCodeParser();
        parser.setClassLoader(_loader);
        parser.setJavaClass(this);

        parser.parse(is);
      }
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
684911
private void lazyInit() {

    if (mStartSpace != null) {
      return;
    }

    Map<String, Integer> mStartSpace = new HashMap<>();
    Map<String, Integer> mStartNoSpace = new HashMap<>();
    Map<String, String> mFull = new HashMap<>();

    try (InputStream stream = JLanguageTool.getDataBroker().getFromResourceDirAsStream(filename)) {
      List<String> posTokens = loadWords(stream);
      for (String posToken : posTokens) {
        String[] tokenAndTag = posToken.split("\t");
        if (tokenAndTag.length != 2) {
          throw new RuntimeException("Invalid format in " + filename + ": '" + posToken + "', expected two tab-separated parts");
        }
        boolean containsSpace = tokenAndTag[0].indexOf(' ') > 0;
        String firstToken;
        String[] firstTokens;
        if (!containsSpace) {
          firstTokens = new String[tokenAndTag[0].length()];
          firstToken = tokenAndTag[0].substring(0, 1);
          for (int i = 1; i < tokenAndTag[0].length(); i++) {
            firstTokens[i] = tokenAndTag[0].substring(i - 1, i);
          }
          if (mStartNoSpace.containsKey(firstToken)) {
            if (mStartNoSpace.get(firstToken) < firstTokens.length) {
              mStartNoSpace.put(firstToken, firstTokens.length);
            }
          } else {
            mStartNoSpace.put(firstToken, firstTokens.length);
          }
        } else {
          firstTokens = tokenAndTag[0].split(" ");
          firstToken = firstTokens[0];

          if (mStartSpace.containsKey(firstToken)) {
            if (mStartSpace.get(firstToken) < firstTokens.length) {
              mStartSpace.put(firstToken, firstTokens.length);
            }
          } else {
            mStartSpace.put(firstToken, firstTokens.length);
          }
        }
        mFull.put(tokenAndTag[0], tokenAndTag[1]);
      }
    } catch (IOException e) {
      throw new RuntimeException(e);
    }

    this.mStartSpace = mStartSpace;
    this.mStartNoSpace = mStartNoSpace;
    this.mFull = mFull;
  }
978158
def on_connect(self, connection):
        ""
        self._sock = connection._sock
        self._buffer = SocketBuffer(self._sock, self.socket_read_size)
        self.encoder = connection.encoder
443050
function LazyRelayInReq(conn, reqFrame) {
    this.channel = null;
    this.conn = null;
    this.start = null;
    this.remoteAddr = null;
    this.logger = null;
    this.peer = null;
    this.outreq = null;
    this.reqFrame = null;
    this.id = null;
    this.serviceName = null;
    this.callerName = null;
    this.timeout = null;
    this.alive = null;
    this.operations = null;
    this.timeHeapHandle = null;
    this.endpoint = null;
    this.error = null;
    this.tracing = null;
    this.reqContFrames = [];
    this.hasRead = null;
    this.waitForIdentSlot = null;

    this.boundExtendLogInfo = extendLogInfo;
    this.boundOnIdentified = onIdentified;

    var self = this;

    function extendLogInfo(info) {
        return self.extendLogInfo(info);
    }

    function onIdentified(err) {
        // The ident descriptor will be cleared out of the peer when the ident
        // comes back, so this slot id will be invalid once ident happens.
        self.waitForIdentSlot = -1;

        if (err) {
            self.onError(err);
        } else {
            self.onIdentified();
        }
    }
}