Run the node local server
352214
def _start_server(self, *args):
        """"""

        self.log("Starting server", args)
        secure = self.certificate is not None
        if secure:
            self.log("Running SSL server with cert:", self.certificate)
        else:
            self.log("Running insecure server without SSL. Do not use without SSL proxy in production!", lvl=warn)

        try:
            self.server = Server(
                (self.host, self.port),
                secure=secure,
                certfile=self.certificate  # ,
                # inherit=True
            ).register(self)
        except PermissionError:
            self.log('Could not open (privileged?) port, check '
                     'permissions!', lvl=critical)
819531
public void run() {
        while(running.get()) {
            try {
                Thread.sleep(gossipInterval);
            } catch(InterruptedException e) {
                Thread.currentThread().interrupt();
            }
            Node node = selectPeer();
            adminClient.setAdminClientCluster(metadataStore.getCluster());

            if(logger.isDebugEnabled())
                logger.debug("Starting gossip with " + node);

            for(String key: MetadataStore.GOSSIP_KEYS) {
                try {
                    gossipKey(node, key);
                } catch(VoldemortException e) {
                    logger.warn("Unable to Gossip key " + key + " with " + node, e);
                }
            }
        }
    }
972570
def serve(self, host='127.0.0.1', port=5000):
        """"""
        from meinheld import server, middleware
        # self.app.run(host=host, port=port)
        server.listen((host, port))
        server.run(middleware.WebSocketMiddleware(self.app))
742967
def runserver(app=None, reloader=None, debug=None, host=None, port=None):
    """"""
    debug = debug or app.config.get('DEBUG', False)
    reloader = reloader or app.config.get('RELOADER', False)
    host = host or app.config.get('HOST', '127.0.0.1')
    port = port or app.config.get('PORT', 5000)
    app.run(
        use_reloader=reloader,
        debug=debug,
        host=host,
        port=port
    )
146398
def run():
    '''  '''
    
    # Grab server args
    args = client_helper.grab_server_args()

    # Start up workbench connection
    workbench = zerorpc.Client(timeout=300, heartbeat=60)
    workbench.connect('tcp://'+args['server']+':'+args['port'])

    # Call help methods
    print workbench.help()
    print workbench.help('basic')
    print workbench.help('commands')
    print workbench.help('store_sample')
    print workbench.help('workers')
    print workbench.help('meta')

    # Call a test worker
    print workbench.test_worker('meta')
1341383
def server(port):
    """"""
    args = ['python', 'manage.py', 'runserver']
    if port:
        args.append(port)
    run.main(args)
907113
function main(args) {
  process.on("uncaughtException", onUncaughtException)

  var opts  = getOpts.parse(args).opts

  var webServer = http.createServer(onRequest)

  utils.log("version: " + utils.VERSION)
  utils.log("server starting")
  webServer.listen(opts.port, function() {
    utils.log("server started on http://localhost:" + opts.port)
  })

  var config = {
    httpServer: webServer
  }

  var rserver = ragentsServer.createServer(config)
  rserver.start()
}
1052962
def run(self):
        """"""
        # self.log("ready to receive.")
        # we use a runloop instead of synchronous recv so stopping the node mid-recv is possible
        read_ready = None

        while self.keep_listening:
            try:
                read_ready, w, x = select.select([self.recv_socket], [], [], 0.01)
            except Exception:
                # catch timeouts
                pass

            if read_ready:
                packet, addr = read_ready[0].recvfrom(4096)
                if addr[1] == self.port:
                    # for each address listening to this link
                    for mac_addr, recv_queue in self.inq.items():
                        recv_queue.put(packet)  # put packet in node's recv queue
                else:
                    pass
1068257
def run(self):
        """"""
        self.logger.info("Running main flask method on port " +
                         str(self.settings['FLASK_PORT']))
        self.app.run(host='0.0.0.0', port=self.settings['FLASK_PORT'])
882958
def run(self, daemon=False):
        
        from aiida.engine import launch

        # If daemon is True, submit the process and return
        if daemon:
            node = launch.submit(self.process, **self.inputs)
            echo.echo_info('Submitted {}<{}>'.format(self.process_name, node.pk))
            return

        # Otherwise we run locally and wait for the process to finish
        echo.echo_info('Running {}'.format(self.process_name))
        try:
            _, node = launch.run_get_node(self.process, **self.inputs)
        except Exception as exception:  # pylint: disable=broad-except
            echo.echo_critical('an exception occurred during execution: {}'.format(str(exception)))

        if node.is_killed:
            echo.echo_critical('{}<{}> was killed'.format(self.process_name, node.pk))
        elif not node.is_finished_ok:
            arguments = [self.process_name, node.pk, node.exit_status, node.exit_message]
            echo.echo_warning('{}<{}> failed with exit status {}: {}'.format(*arguments))
        else:
            output = []
            echo.echo_success('{}<{}> finished successfully\n'.format(self.process_name, node.pk))
            for triple in sorted(node.get_outgoing().all(), key=lambda triple: triple.link_label):
                output.append([triple.link_label, '{}<{}>'.format(triple.node.__class__.__name__, triple.node.pk)])
            echo.echo(tabulate.tabulate(output, headers=['Output label', 'Node']))
154313
def run(self):
        
        # Bind the socket to the port
        logging.info("Server starts socket on {addr}".format(addr=self.server_address))

        # Create a UDS socket
        if six.PY2:
            sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
            self.listen(sock)
            sock.close()
        else:
            with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock:
                self.listen(sock)
        try:
            os.unlink(self.server_address)
        except OSError:
            if os.path.exists(self.server_address):
                raise
        return
877857
def run
      if PryDebugger.current_remote_server
        raise 'Already running a pry-remote session!'
      else
        PryDebugger.current_remote_server = self
      end

      setup
      Pry.start @object, {
        :input  => client.input_proxy,
        :output => client.output
      }
    end
936034
def run():
    """"""

    # NOTE(kiennt): Until now, this example isn't finished yet,
    #               because we don't have any completed driver

    # Get a network client with openstack driver.

    network_client = client.Client(version=_VERSION,
                        resource=_RESOURCES[0], provider=_PROVIDER)
    # net = network_client.create('daikk', '10.0.0.0/24')
    # list_subnet = network_client.list()
    # network_client.show(list_subnet[0].get("id"))
    network_client.delete("4b983028-0f8c-4b63-b10c-6e8420bb7903")
806113
function run() {
    generator.load(function(err) {
      if (err) return log(err);

      if (opts.outputOnly) {
        generator.outputPages(function(err, result) {
          if (err) { log(err); }
          log('output %s generated pages', u.flatten(result).length);
        });

        var statics = require('./server/serve-statics')(opts, function(){
          statics.outputAll();
        });
        require('./server/serve-scripts')(opts).outputAll(generator);
        generator.unload();
        return;
      }

      if (opts.logPages) {
        generator.logPages();
        generator.unload();
        return;
      }

      require('./server/watch-sources')(generator);
      generator.listen(true);

      if (!opts['no-server']) { expressApp(); }
    });
  }
1054617
def run():
    """"""
    _parser_options()
    set_verbose(args["verbose"])
    
    if _check_global_settings():
        _load_db()
    else:
        exit(-1)

    #Check the server configuration against the script arguments passed in.
    _setup_server()

    if args["rollback"]:
        _server_rollback()
        okay("The server rollback appears to have been successful.")
        exit(0)

    _server_enable()    
    _list_repos()
    _handle_install()
    
    #This is the workhorse once a successful installation has happened.
    _do_cron()
902232
def run():
    """"""
    
    # Grab server args
    args = client_helper.grab_server_args()

    # Start up workbench connection
    workbench = zerorpc.Client(timeout=300, heartbeat=60)
    workbench.connect('tcp://'+args['server']+':'+args['port'])
    
    # Grab all the filenames from the data directory
    data_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),'../data')
    file_list = all_files_in_directory(data_dir)

    # Upload the files into workbench
    md5_list = []
    for path in file_list:

        # Skip OS generated files
        if '.DS_Store' in path: 
            continue

        with open(path,'rb') as f:
            filename = os.path.basename(path)

            # Here we're going to save network traffic by asking
            # Workbench if it already has this md5
            raw_bytes = f.read()
            md5 = hashlib.md5(raw_bytes).hexdigest()
            md5_list.append(md5)
            if workbench.has_sample(md5):
                print 'Workbench already has this sample %s' % md5
            else:
                # Store the sample into workbench
                md5 = workbench.store_sample(raw_bytes, filename, 'unknown')
                print 'Filename %s uploaded: type_tag %s, md5 %s' % (filename, 'unknown', md5)

    # Okay now explode any container types
    zip_files = workbench.generate_sample_set('zip')
    _foo = workbench.set_work_request('unzip', zip_files); list(_foo) # See Issue #306
    pcap_files = workbench.generate_sample_set('pcap')
    _foo = workbench.set_work_request('pcap_bro', pcap_files); list(_foo) # See Issue #306
    mem_files = workbench.generate_sample_set('mem')
    _foo = workbench.set_work_request('mem_procdump', mem_files); list(_foo) # See Issue #306


    # Make sure all files are properly identified
    print 'Info: Ensuring File Identifications...'
    type_tag_set = set()
    all_files = workbench.generate_sample_set()
    meta_all = workbench.set_work_request('meta', all_files)
    for meta in meta_all:
        type_tag_set.add(meta['type_tag'])
        if meta['type_tag'] in ['unknown', 'own']:
            print meta
    pprint.pprint(type_tag_set)
401789
def run(self, *nodes):
        
        nodes = nodes or self.nodes
        self._prelude(*nodes)

        @write_yaml_report
        def _run():
            self._build_installer()
            runner = functools.partial(run_on_host, self.campaign)
            if self.campaign.network.max_concurrent_runs > 1:
                pool = Pool(self.campaign.network.max_concurrent_runs)
                pool.map(runner, nodes)
            else:
                for node in nodes:
                    runner(node)
            return nodes

        with pushd(self.campaign_path):
            _run()