the public API is over
768061
function forwardSearch() {
      cameFrom = open1Set.pop();
      if (cameFrom.closed) {
        return;
      }

      cameFrom.closed = true;

      if (cameFrom.f1 < lMin && (cameFrom.g1 + f2 - heuristic(from, cameFrom.node)) < lMin) {
        graph.forEachLinkedNode(cameFrom.node.id, forwardVisitor);
      }

      if (open1Set.length > 0) {
        // this will be used in reverse search
        f1 = open1Set.peek().f1;
      } 
    }
1129067
function selfapi (/* parent, …overrides, child */) {
  // Parent API instance or root server app.
  var parent = null;

  // Child API overrides.
  var path = null;
  var title = null;
  var description = null;

  // Child API instance.
  var child = null;

  if ((this instanceof API) || isServerApp(this)) {
    // Called from parent, e.g. `var api = parent.api(…)`.
    parent = this;
  } else if ((arguments[0] instanceof API) || isServerApp(arguments[0])) {
    // First argument is parent, e.g. `var api = selfapi(parent…)`.
    parent = [].shift.call(arguments);
  }

  if (typeof arguments[0] === 'string' /* || instanceof RegExp */) {
    // Next argument is path, e.g. `api(…path…)`.
    path = [].shift.call(arguments);
    if (typeof arguments[0] === 'string') {
      // Next argument is title, e.g. `api(…path, title…)`.
      title = [].shift.call(arguments);
      if (typeof arguments[0] === 'string') {
        // Next argument is description, e.g. `api(…path, title, description…)`.
        description = [].shift.call(arguments);
      }
    }
  }

  if (arguments[arguments.length - 1] instanceof API) {
    // Last argument is child API instance, e.g. `selfapi(…api)`.
    child = [].pop.call(arguments);
  } else if (typeof arguments[arguments.length - 1] === 'object') {
    // Last argument is parameters object, e.g. `selfapi(…parameters)`.
    var parameters = [].pop.call(arguments);
    child = new API(parameters);
  } else {
    // No further useful argument.
    child = new API({});
  }

  // Apply any overrides.
  if (path) {
    child.path = path;
  }
  if (title) {
    child.title = title;
  }
  if (description) {
    child.description = description;
  }

  // Associate child and parent, triggering the `set parent` function if needed.
  if (parent) {
    child.parent = parent;
  }

  return child;
}
107268
def get_public_events(self):
        
        return github.PaginatedList.PaginatedList(
            github.Event.Event,
            self._requester,
            self.url + "/events/public",
            None
        )
234389
function () {
            if (this._tplcfg) {
                var tplcfg = this._tplcfg;
                var toDispose = tplcfg.toDispose;
                if (toDispose) {
                    var toDisposeLength = toDispose.length;
                    for (var i = 0; i < toDisposeLength; i++) {
                        toDispose[i].$dispose();
                    }
                }
                tplcfg.toDispose = null;
                tplcfg.tplDiv = null;
                tplcfg.div = null;
                tplcfg.data = null;
                this._tplcfg = null;
            }
        }
1228211
function destroy(publicAPI, model = {}) {
  const previousDestroy = publicAPI.destroy;

  if (!model.subscriptions) {
    model.subscriptions = [];
  }

  publicAPI.destroy = () => {
    if (previousDestroy) {
      previousDestroy();
    }
    while (model.subscriptions && model.subscriptions.length) {
      model.subscriptions.pop().unsubscribe();
    }
    Object.keys(model).forEach((field) => {
      delete model[field];
    });

    // Flag the instance beeing deleted
    model.deleted = true;
  };
}
186977
def post_public(self, path, data, is_json=True):
        ''''''
        return self._post(path, data, is_json)
431378
function API (parameters) {
  // Own API resource prefix (e.g. '/resource').
  this.path = parameters.path || null;

  // Own documentation.
  this.title = parameters.title || null;
  this.description = parameters.description || null;

  // Own test setup functions.
  this.beforeEachTest = parameters.beforeEachTest || null;
  this.afterEachTest = parameters.afterEachTest || null;

  // Parent API resource (or root server app).
  this.parent = parameters.parent || null;

  // API sub-resources (API instances) by relative path (e.g. '/subresource').
  this.children = {};

  // Own request handlers (handler parameters) by method (e.g. 'post').
  this.handlers = {};
}
370004
function fetch(publicAPI, model, name) {
  let fetchCallback = null;
  const requestQueue = [];

  publicAPI[`set${capitalize(name)}FetchCallback`] = (fetchMethod) => {
    if (requestQueue.length) {
      fetchMethod(requestQueue);
    }
    fetchCallback = fetchMethod;
  };

  return {
    addRequest(request) {
      requestQueue.push(request);
      if (fetchCallback) {
        fetchCallback(requestQueue);
      }
    },
    resetRequests(requestList) {
      while (requestQueue.length) {
        requestQueue.pop();
      }
      if (requestList) {
        // Rebuild request list
        requestList.forEach((req) => {
          requestQueue.push(req);
        });
        // Also trigger a request
        if (fetchCallback) {
          fetchCallback(requestQueue);
        }
      }
    },
  };
}
49767
def unload(self):
        

        if self.loaded:
            self.loaded = False
            self._openalprpy_lib.dispose(self.alpr_pointer)
648942
public void finishMapJson(final Object... objs) {
        this.contentType = this.jsonContentType;
        if (this.recycleListener != null) this.output = objs;
        finish(request.getJsonConvert().convertMapTo(getBodyBufferSupplier(), objs));
    }
341641
async function api(endpoint, token) {
	token = token ? `&access_token=${token}` : '';
	const response = await fetch(`https://api.github.com/repos/${endpoint}${token}`);
	return response.json();
}
32546
JobSubmissionResult finalizeExecute() throws ProgramInvocationException {
		return client.run(detachedPlan, jarFilesToAttach, classpathsToAttach, userCodeClassLoader, savepointSettings);
	}
13874
function createApi () {
  api = {
    eth: {
      blockNumber: sinon.stub().resolves(new BigNumber(2)),
      gasPrice: sinon.stub().resolves(GASPRICE)
    },
    parity: {
      gasPriceHistogram: sinon.stub().resolves(HISTOGRAM)
    }
  };

  return api;
}
227863
def delete_simple_httpauth_read_api(
        request,
        database_name,
        collection_name,
        slug):
    """"""
    ss = get_object_or_404(HTTPAuthReadAPI, database_name=database_name,
                           collection_name=collection_name, slug=slug)
    ss.delete()
    messages.success(request, _("Simple HTTP Auth Read API deleted."))
    return HttpResponseRedirect(
        reverse('djmongo_show_apis',
                args=(ss.database_name, ss.collection_name)))
926370
function finalize( &$package, $http, &$persistentData )
    {
        $this->createPackage( $package, $http, $persistentData, $cleanupFiles );

        $objectHandler = eZPackage::packageHandler( 'ezcontentobject' );
        $nodeList = $persistentData['node_list'];
        $options = $persistentData['object_options'];

        foreach( $nodeList as $nodeInfo )
        {
            $objectHandler->addNode( $nodeInfo['id'], $nodeInfo['type'] == 'subtree' );
        }
        $objectHandler->generatePackage( $package, $options );

        $package->setAttribute( 'is_active', true );
        $package->store();
    }
718781
async function apiDemo () {
    try {
        // Grab the volume
        const volume = await api.volume ();
        console.log ("Current volume: " + volume);

        // Skip to next track
        await api.next ();
        console.log ("Skipped to next track.");

        // View current track
        const track = await api.currentTrack ();
        console.log (`Playing: ${track.artist} - ${track.name}`);

        // Jump to the middle
        const midTime = track.duration / 2;
        await api.position (midTime);
        console.log ("Jumped to the middle of the track");

        // Where are we at now?
        const position = await api.position ();
        console.log ("We're now at " + position + " seconds");

        // Lets play some Calvin Harris
        await api.play ("spotify:track:5bcTCxgc7xVfSaMV3RuVke");
        console.log ("Played Calvin Harris");

        // Pause da tunes
        await api.pause ();
        console.log ("Pausing the playback...");

        // Continue playing
        await api.play ();
        console.log ("Aand resuming. The music is important!");

        // Mute
        await api.mute ();
        console.log ("Muted the client");

        // And unmute
        await api.unmute ();
        console.log ("But we want to hear the music!");

        // Now open the window, we might want to do a search
        await api.focusWindow ();
        console.log ("Gotta open this window right here");

        // Or, enable shuffling
        await api.setShuffling (true);
        // or setRepeat (true)

        // Are we repeating?
        const repeatState = await api.repeating ();
        console.log ("We are " + ((repeatState) ? "" : "not ") + "repeating!");
    } catch (err) {
        console.log (err.stack);
    }
}
1012988
CompletableFuture<Void> close() {
    return closeClient()
        .exceptionally(v -> null)
        .thenCompose(v -> closeServer())
        .exceptionally(v -> null);
  }