language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public static double[] toDouble(float[] a) { double[] d = new double[a.length]; for (int i = 0; i < a.length; i++) { d[i] = a[i]; } return d; }
java
static public WorkSheet unionWorkSheetsRowJoin(String w1FileName, String w2FileName, char delimitter, boolean secondSheetMetaData) throws Exception { WorkSheet w1 = WorkSheet.readCSV(w1FileName, delimitter); WorkSheet w2 = WorkSheet.readCSV(w2FileName, delimitter); return unionWorkSheetsRowJoin(w1, w2, secondShee...
java
static public void uncompileQuoter(final StringBuilder out, final String value) { out.append("'"); if (value != null) out.append(value.replaceAll("'", "\\\\'").replaceAll("\"", "\\\\\"")); out.append("'"); }
java
public boolean searchSIF(Model model, OutputStream out, SIFToText stt) { Set<SIFInteraction> inters = searchSIF(model); if (!inters.isEmpty()) { List<SIFInteraction> interList = new ArrayList<SIFInteraction>(inters); Collections.sort(interList); try { boolean first = true; OutputStreamWriter...
java
public void setAssociatedS3Resources(java.util.Collection<S3Resource> associatedS3Resources) { if (associatedS3Resources == null) { this.associatedS3Resources = null; return; } this.associatedS3Resources = new java.util.ArrayList<S3Resource>(associatedS3Resources); }
java
@Override public String getNamespaceURI(String prefix) { // per javax.xml.namespace.NamespaceContext doc if (prefix == null) throw new IllegalArgumentException("Cannot get namespace URI for null prefix"); if (XMLConstants.XML_NS_PREFIX.equals(prefix)) return XMLConstants.XML_NS_URI; if (XM...
java
protected void writeOnceTuple( TupleRef tuple) { writer_ .element( ONCE_TAG) .content( () -> toStream( tuple.getVarBindings()).forEach( this::writeVarBinding)) .write(); }
java
private void dumpObjs(Object[][] objs, PrintStream out ) { for (int i = 0; i < objs.length; ++i) { for (int j = 0; j < objs[i].length; ++j) { out.println(i + " " + j + " " + objs[i][j]); } // for j } // for i }
python
def index_of_item(self, item): """Get the index for the given TreeItem :param item: the treeitem to query :type item: :class:`TreeItem` :returns: the index of the item :rtype: :class:`QtCore.QModelIndex` :raises: ValueError """ # root has an invalid index...
java
public static <T> Stream<T> skipWhile(Stream<T> source, Predicate<T> condition) { return StreamSupport.stream(SkipUntilSpliterator.over(source.spliterator(), condition.negate()), false) .onClose(source::close); }
java
public boolean addAll(Collection<? extends E> c) { if (!(c instanceof JumboEnumSet)) return super.addAll(c); JumboEnumSet<?> es = (JumboEnumSet<?>)c; if (es.elementType != elementType) { if (es.isEmpty()) return false; else thr...
java
@Override public ZKData<byte[]> getZKByteData(String path, Watcher watcher) throws InterruptedException, KeeperException { Stat stat = new Stat(); return new ZKData<byte[]>(getData(path, watcher, stat), stat); }
java
public OvhBinaryFirewallLink serviceName_firewall_binary_link_GET(String serviceName, String binaryName) throws IOException { String qPath = "/dedicated/server/{serviceName}/firewall/binary/link"; StringBuilder sb = path(qPath, serviceName); query(sb, "binaryName", binaryName); String resp = exec(qPath, "GET", ...
java
private static String getContentType(String fileExtension) { if (fileExtension == null) { return null; } String contentType = null; fileExtension = fileExtension.toLowerCase(); if ("html".equals(fileExtension)) { contentType = "t...
java
protected void toStringFields(final StringBuffer buffer) { buffer.append("<managedConnectionFactory="); buffer.append(_managedConnectionFactory); buffer.append("> <coreConnection="); buffer.append(_coreConnection); buffer.append("> <localTransaction="); buffer.append(_lo...
java
public static Writer createWriter(OutputStream outputStream,String encoding) { //get encoding String updatedEncoding=IOHelper.getEncodingToUse(encoding); //create writer Writer writer=null; try { writer=new OutputStreamWriter(outputStream,updatedE...
java
public static HiveMetastoreClientPool get(final Properties properties, final Optional<String> metastoreURI) throws IOException { synchronized (HiveMetastoreClientPool.class) { if (poolCache == null) { poolCache = createPoolCache(properties); } } try { return poolCache.get(met...
java
@Override protected MkTabEntry createNewDirectoryEntry(MkTabTreeNode<O> node, DBID routingObjectID, double parentDistance) { return new MkTabDirectoryEntry(routingObjectID, parentDistance, node.getPageID(), node.coveringRadiusFromEntries(routingObjectID, this), node.kNNDistances()); }
python
def derive_and_set_name_fields_and_slug( self, set_name_sort=True, set_slug=True ): """ Derive subordinate name_* field values from the `name_full` field unless these fields are set in their own right. This method is called during `save()` """ # name_full...
java
protected Integer getFontSizeForZoom(double zoom) { double lower = -1; for (double upper : this.zoomToFontSizeMap.keySet()) { if (lower == -1) { lower = upper; if (zoom <= lower) return this.zoomToFontSizeMap.get(upper); continue; }...
python
def macaroon(self, version, expiry, caveats, ops): ''' Takes a macaroon with the given version from the oven, associates it with the given operations and attaches the given caveats. There must be at least one operation specified. The macaroon will expire at the given time - a time_before...
java
public void setSelectableDateRange(Date min, Date max) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } if (max == null) { maxSelectableDate = defaultMaxSelectableDate; } else { maxSelectableDate = max; } if (maxSelectableDate.before(minSel...
python
def rm_job(user, path, mask, cmd): ''' Remove a incron job for a specified user. If any of the day/time params are specified, the job will only be removed if the specified params match. CLI Example: .. code-block:: bash salt '*' incron.rm_job root /path ...
python
def parse(self, stream): """Parses the keys and values from a config file.""" yaml = self._load_yaml() try: parsed_obj = yaml.safe_load(stream) except Exception as e: raise ConfigFileParserException("Couldn't parse config file: %s" % e) if not isinstance...
python
def get_messages(self, queue_name, num_messages=None, visibility_timeout=None, timeout=None): ''' Retrieves one or more messages from the front of the queue. When a message is retrieved from the queue, the response includes the message content and a pop_receipt val...
java
public int getRow(float y) { int row = 0; y += h(padTop); int i = 0, n = cells.size(); if (n == 0) return -1; if (n == 1) return 0; if (cells.get(0).widgetY < cells.get(1).widgetY) { // Using y-down coordinate system. ...
java
@Override public ContentSerializer getContentSerializerForContentType(String contentType) { for (ContentSerializer renderer : serializers) { if (renderer.getContentType().equals(contentType)) { return renderer; } } LoggerFactory.getLogger(this.getClass...
python
def average_build_duration(connection, package): """ Return the average build duration for a package (or container). :param connection: txkoji.Connection :param package: package name :returns: deferred that when fired returns a datetime.timedelta object """ if isinstance(package, str) and p...
python
def enable_evb(self): """Function to enable EVB on the interface. """ if self.is_ncb: self.run_lldptool(["-T", "-i", self.port_name, "-g", "ncb", "-V", "evb", "enableTx=yes"]) ret = self.enable_gpid() return ret else: ...
java
public static Double toDouble(Object value, Double defaultValue) { return convert(Double.class, value, defaultValue); }
java
public static String jqPlotToJson(ChartConfiguration<?> jqPlot) { XStream xstream = new XStream(new JsonHierarchicalStreamDriver() { @Override public HierarchicalStreamWriter createWriter(Writer writer) { return new JqPlotJsonMapHierarchicalWriter(writer, JsonWriter.DRO...
python
def fill_data_brok_from(self, data, brok_type): """ Add properties to 'data' parameter with properties of this object when 'brok_type' parameter is defined in fill_brok of these properties :param data: object to fill :type data: object :param brok_type: name of brok_type...
java
@RequestMapping(value = "/scripts", method = RequestMethod.GET) public String scriptView(Model model) throws Exception { return "script"; }
java
public DescribeCacheSubnetGroupsResult withCacheSubnetGroups(CacheSubnetGroup... cacheSubnetGroups) { if (this.cacheSubnetGroups == null) { setCacheSubnetGroups(new com.amazonaws.internal.SdkInternalList<CacheSubnetGroup>(cacheSubnetGroups.length)); } for (CacheSubnetGroup ele : cach...
python
def _attach_dim_scales(self): """Attach dimension scales to all variables.""" for name, var in self.variables.items(): if name not in self.dimensions: for n, dim in enumerate(var.dimensions): var._h5ds.dims[n].attach_scale(self._all_h5groups[dim]) ...
java
public String getBaselineStartText(int baselineNumber) { Object result = getCachedValue(selectField(TaskFieldLists.BASELINE_STARTS, baselineNumber)); if (result == null) { result = getCachedValue(selectField(TaskFieldLists.BASELINE_ESTIMATED_STARTS, baselineNumber)); } if (!(r...
python
def _handle_candles(self, ts, chan_id, data): """ Stores OHLC data received via wss in self.candles[chan_id] :param ts: timestamp, declares when data was received by the client :param chan_id: int, channel id :param data: list of data received via wss :return: """...
java
Location append(String relativeURI) { relativeURI = encodeIllegalCharacters(relativeURI); if (uri.toString().endsWith("/") && relativeURI.startsWith("/")) { relativeURI = relativeURI.substring(1); } if (!uri.toString().endsWith("/") && !relativeURI.startsWith("/")) { ...
python
def create_table(db, schema_name, table_name, columns): """ Create a table, schema_name.table_name, in given database with given list of column names. """ table = '{0}.{1}'.format(schema_name, table_name) if schema_name else table_name db.execute('DROP TABLE IF EXISTS {0}'.format(table)) columns...
java
public void write(Pointer _str, final int _len) { int len = _len; byte[] bstr = _str.buffer; int str = _str.start; if(this.buffer == null) { clear(); } int at = this.marker; if(len + at >= this.bufsize - 1) { flush(0); for(;;)...
python
def _request_get(self, path, params=None, json=True, url=BASE_URL): """Perform a HTTP GET request.""" url = urljoin(url, path) headers = self._get_request_headers() response = requests.get(url, params=params, headers=headers) if response.status_code >= 500: backoff ...
python
def lgammln(xx): """ Returns the gamma function of xx. Gamma(z) = Integral(0,infinity) of t^(z-1)exp(-t) dt. (Adapted from: Numerical Recipies in C.) Usage: lgammln(xx) """ coeff = [76.18009173, -86.50532033, 24.01409822, -1.231739516, 0.120858003e-2, -0.536382e-5] x = xx - 1.0 tmp ...
java
protected AccessControlGroup group(String groupId, String... permissionIds) { return group(groupId, Collections.<AccessControlGroup> emptyList(), permissionIds); }
java
protected PortletRenderResult doRenderReplayCachedContent( IPortletWindow portletWindow, HttpServletRequest httpServletRequest, CacheState<CachedPortletData<PortletRenderResult>, PortletRenderResult> cacheState, PortletOutputHandler portletOutputHandler, Rende...
java
public static void updateBeanValue(final WComponent component, final boolean visibleOnly) { // Do not process if component is invisble and ignore visible is true. Will ignore entire branch from this point. if (!component.isVisible() && visibleOnly) { return; } if (component instanceof WBeanComponent) { (...
java
double collectGraphLastValue(String graph) throws IOException { final URL lastValueUrl = new URL(url.toString() + '&' + HttpParameter.PART + '=' + HttpPart.LAST_VALUE + '&' + HttpParameter.GRAPH + '=' + graph); return collectForUrl(lastValueUrl); }
java
public static NumberData max(SoyValue arg0, SoyValue arg1) { if (arg0 instanceof IntegerData && arg1 instanceof IntegerData) { return IntegerData.forValue(Math.max(arg0.longValue(), arg1.longValue())); } else { return FloatData.forValue(Math.max(arg0.numberValue(), arg1.numberValue())); } }
python
def _apply_projection(self, Av): r'''Computes :math:`\langle C,M_lAM_rV_n\rangle` efficiently with a three-term recurrence.''' PAv, UAp = self.projection.apply_complement(Av, return_Ya=True) self._UAps.append(UAp) c = UAp.copy() rhos = self.rhos if self.iter > 0: ...
java
public After<PartialResponseInsertType<T>> getOrCreateAfter() { Node node = childNode.getOrCreate("after"); After<PartialResponseInsertType<T>> after = new AfterImpl<PartialResponseInsertType<T>>(this, "after", childNode, node); return after; }
java
public static Map<String, BeanProperty> getAllProperties(Class clazz) { synchronized (cPropertiesCache) { Map<String, BeanProperty> properties; SoftReference<Map<String, BeanProperty>> ref = cPropertiesCache.get(clazz); if (ref != null) { properties = ref.get(...
java
void onStop(final Throwable exception) { LOG.log(Level.FINE, "Stop Runtime: RM status {0}", this.resourceManager.getServiceState()); if (this.resourceManager.getServiceState() == Service.STATE.STARTED) { // invariant: if RM is still running then we declare success. try { this.reefEventHa...
java
private String newStorageID() { String newID = null; while (newID == null) { newID = "DS" + Integer.toString(r.nextInt()); if (datanodeMap.get(newID) != null) { newID = null; } } return newID; }
python
def ml(line, cell=None): """Implements the datalab cell magic for MLWorkbench operations. Args: line: the contents of the ml command line. Returns: The results of executing the cell. """ parser = google.datalab.utils.commands.CommandParser( prog='%ml', description=textwrap.dedent("""\ ...
python
def as_dict(self): """ Json-serializable dict representation of CompleteDos. """ d = {"@module": self.__class__.__module__, "@class": self.__class__.__name__, "efermi": self.efermi, "structure": self.structure.as_dict(), "energies": list(self.energi...
python
def set_data(self, index, value): """Uses given data setter, and emit modelReset signal""" acces, field = self.get_item(index), self.header[index.column()] self.beginResetModel() self.set_data_hook(acces, field, value) self.endResetModel()
java
protected void persistSessionId(String location, String identifier, Long ksessionId) { if (location == null) { return; } FileOutputStream fos = null; ObjectOutputStream out = null; try { fos = new FileOutputStream(location + File.separator + identifier + "...
python
def alias_name(): """ Returns list of alias name by query paramaters --- tags: - Query functions parameters: - name: alias_name in: query type: string required: false description: 'Other names used to refer to a gene' default: 'peptidase nexin-...
python
def init(opts): ''' This function gets called when the proxy starts up. For login the protocol and port are cached. ''' log.debug('Initting esxcluster proxy module in process %s', os.getpid()) log.debug('Validating esxcluster proxy input') schema = EsxclusterProxySchema.serialize() l...
python
def p_Dictionary(p): """Dictionary : dictionary IDENTIFIER Inheritance "{" DictionaryMembers "}" ";" """ p[0] = model.Dictionary(name=p[2], parent=p[3], members=p[5])
java
protected synchronized void removeAdminObjectService(ServiceReference<AdminObjectService> reference) { String id = (String) reference.getProperty(ADMIN_OBJECT_CFG_ID); if (id != null) { removeAdminObjectService(reference, id, false); String jndiName = (String) reference.getPrope...
java
private HashMap<String, String> parseProgressInfoLine(String line) { HashMap<String, String> table = null; Matcher m = PROGRESS_INFO_PATTERN.matcher(line); while (m.find()) { if (table == null) { table = new HashMap<>(); } S...
java
public ValidationMappingDescriptor addNamespace(String name, String value) { model.attribute(name, value); return this; }
java
@Override protected void doGet(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException { LOG.debug("Entering"); final AtomHandler handler = createAtomRequestHandler(req, res); final String userName = handler.getAuthenticatedUsername(); if (us...
java
private TaskOperationProtocol getTaskManagerProxy() throws IOException { if (this.taskManager == null) { this.taskManager = RPC.getProxy(TaskOperationProtocol.class, new InetSocketAddress(getInstanceConnectionInfo().address(), getInstanceConnectionInfo().ipcPort()), NetUtils.getSocketFactory()); } ...
java
public static void error(final Object message, final Throwable t) { errorStream.println(APP_ERROR + message.toString()); errorStream.println(stackTraceToString(t)); }
java
public void forEachOrderedInt(final IntConsumer consumer) { for (@DoNotSub int i = 0; i < size; i++) { consumer.accept(elements[i]); } }
python
def main(): """Shows useful information about how-to configure alias on a first run and configure automatically on a second. It'll be only visible when user type fuck and when alias isn't configured. """ settings.init() configuration_details = shell.how_to_configure() if ( configur...
java
public static ChunksManifestType createChunksManifestElementFrom( ChunksManifestBean manifest) { ChunksManifestType manifestType = ChunksManifestType.Factory .newInstance(); populateElementFromObject(manifestType, manifest); return manifestType; }
python
def get_path_components(directory): """Breaks a path to a directory into a (drive, list-of-folders) tuple :param directory: :return: a tuple consisting of the drive (if any) and an ordered list of folder names """ drive, dirs = os.path.splitdrive(directory) folders = [] previou...
java
public static Stream<DynamicTest> packageScan(String ... packagesToScan) { List<DynamicTest> tests = new ArrayList<>(); for (String packageScan : packagesToScan) { try { for (String fileNamePattern : Citrus.getXmlTestFileNamePattern()) { Resource[] fileRe...
java
public static cacheforwardproxy[] get(nitro_service service) throws Exception{ cacheforwardproxy obj = new cacheforwardproxy(); cacheforwardproxy[] response = (cacheforwardproxy[])obj.get_resources(service); return response; }
java
@SuppressWarnings("WeakerAccess") public static <T> T createClientProxy(ClassLoader classLoader, Class<T> proxyInterface, final JsonRpcClient client, Socket socket) throws IOException { return createClientProxy(classLoader, proxyInterface, client, socket.getInputStream(), socket.getOutputStream()); }
java
public void add(Model child) { if(child == null) throw new IllegalArgumentException("cannot add what is null"); //TODO: refactor this method MetaModel childMetaModel = metaModelOf(child.getClass()); MetaModel metaModel = metaModelLocal; if (getId() != null) { if (m...
java
public ConditionCheck withExpressionAttributeNames(java.util.Map<String, String> expressionAttributeNames) { setExpressionAttributeNames(expressionAttributeNames); return this; }
python
def field_name_exist(self, field_name): """Check if there is already a field_name field in the current class It is useful before allowing to rename a field to check name does not already exist. """ fields = self.class_item.get_fields() for f in fields: ...
python
def normalize_ip(ip): """ Transform the address into a fixed-length form, such as:: 192.168.0.1 -> 192.168.000.001 :type ip: string :param ip: An IP address. :rtype: string :return: The normalized IP. """ theip = ip.split('.') if len(theip) != 4: raise ValueError(...
python
def delete(self, *args, **kwargs): """ This method implements retries for object deletion. """ count = 0 max_retries=3 while True: try: return super(BaseModel, self).delete(*args, **kwargs) except django.db.utils.OperationalError: ...
python
def clone_data( self, source ): """Clone data from another Block. source Block instance to copy from. """ klass = self.__class__ assert isinstance( source, klass ) for name in klass._fields: self._field_data[name] = getattr( source, name )
python
def parseReaderConfig(self, confdict): """Parse a reader configuration dictionary. Examples: { Type: 23, Data: b'\x00' } { Type: 1023, Vendor: 25882, Subtype: 21, Data: b'\x00' } """ ...
python
def handle_request(self, request, **resources): """ Call RPC method. :return object: call's result """ if request.method == 'OPTIONS': return super(RPCResource, self).handle_request( request, **resources) payload = request.data try: ...
java
public void getEventsForJob(final JobID jobID, final List<AbstractEvent> eventList, final boolean includeManagementEvents) { synchronized (this.collectedEvents) { List<AbstractEvent> eventsForJob = this.collectedEvents.get(jobID); if (eventsForJob != null) { final Iterator<AbstractEvent> it = eventsFo...
python
def traverse(self): """Traverse the tree yielding the direction taken to a node, the co-ordinates of that node and the directions leading from the Node. Yields ------ (direction, (x, y), {:py:class:`~rig.routing_table.Routes`, ...}) Direction taken to reach a Node in...
python
def shap_values(self, X, **kwargs): """ Estimate the SHAP values for a set of samples. Parameters ---------- X : numpy.array or pandas.DataFrame or any scipy.sparse matrix A matrix of samples (# samples x # features) on which to explain the model's output. nsamples ...
java
public UserManagedCacheBuilder<K, V, T> using(Service service) { UserManagedCacheBuilder<K, V, T> otherBuilder = new UserManagedCacheBuilder<>(this); if (service instanceof SizeOfEngineProvider) { removeAnySizeOfEngine(otherBuilder); } otherBuilder.services.add(service); return otherBuilder; ...
python
def _format_firewall_stdout(cmd_ret): ''' Helper function to format the stdout from the get_firewall_status function. cmd_ret The return dictionary that comes from a cmd.run_all call. ''' ret_dict = {'success': True, 'rulesets': {}} for line in cmd_ret['stdout'].splitlin...
python
def is_opened(components): """ Checks if all components are opened. To be checked components must implement [[IOpenable]] interface. If they don't the call to this method returns true. :param components: a list of components that are to be checked. :return: true if all...
python
def Iaax(mt, x, *args): """ (Iä)x : Returns the present value of annuity-certain at the beginning of the first year and increasing linerly. Arithmetically increasing annuity-anticipatory """ return Sx(mt, x) / Dx(mt, x)
python
def import_(module, objects=None, via=None): """ :param module: py3 compatiable module path :param objects: objects want to imported, it should be a list :param via: for some py2 module, you should give the import path according the objects which you want to imported :return: object or modul...
python
def application(cls, f): """Decorate a function as responder that accepts the request as first argument. This works like the :func:`responder` decorator but the function is passed the request object as first argument and the request object will be closed automatically:: @Re...
python
def get_plate_stock(self, plate_code): """ 获取特定板块下的股票列表 :param plate_code: 板块代码, string, 例如,”SH.BK0001”,”SH.BK0002”,先利用获取子版块列表函数获取子版块代码 :return: (ret, data) ret == RET_OK 返回pd dataframe数据,data.DataFrame数据, 数据列格式如下 ret != RET_OK 返回错误字符串 ...
python
def _get_cached_time(self): """Method that will allow for consistent modified and archived timestamps. Returns: self.Meta.datetime: This method will return a datetime that is compatible with the current class's datetime library. """ if not self._cache...
python
def interm_size(self)-> Sequence[Sequence[int]]: '''The size of each intermediate fluent in canonical order. Returns: Sequence[Sequence[int]]: A tuple of tuple of integers representing the shape and size of each fluent. ''' fluents = self.domain.intermediate_flue...
java
public void assertNonExisting(CryptoPath cleartextPath) throws FileAlreadyExistsException, IOException { try { CiphertextFileType type = getCiphertextFileType(cleartextPath); throw new FileAlreadyExistsException(cleartextPath.toString(), null, "For this path there is already a " + type.name()); } catch (N...
java
public void findInPackage(final Test test, String packageName) { packageName = packageName.replace('.', '/'); final ClassLoader loader = getClassLoader(); Enumeration<URL> urls; try { urls = loader.getResources(packageName); } catch (final IOException ioe) { ...
python
def sign_in(user, user_type=None, date=None, time_in=None): """Add a new entry to the timesheet. :param user: `models.User` object. The user to sign in. :param user_type: (optional) Specify whether user is signing in as a `'student'` or `'tutor'`. :param date: (optional) `datetime.date` object. Specify...
java
@Override public void mousePressed(MouseEvent event) { lastClick = event.getButton(); clicks[lastClick] = true; final Integer key = Integer.valueOf(lastClick); if (actionsPressed.containsKey(key)) { final List<EventAction> actions = actionsPressed.get(key); ...
python
def compute_node_deps(): """ - returns the full dependency graph of ALL ops and ALL tensors Map<string,list<string>> where key=node name, values=list of dependency names If an Op takes in a placeholder tensor that is the ouput of a PythonOp, we need to replace that Placeholder with the PythonOp. """ deps={} g...
python
def register_mime(shortname, mime_types): """ Register a new mime type. Usage example: mimerender.register_mime('svg', ('application/x-svg', 'application/svg+xml',)) After this you can do: @mimerender.mimerender(svg=render_svg) def GET(... ... """ if shortname...
java
public static nslimitidentifier_nslimitsessions_binding[] get_filtered(nitro_service service, String limitidentifier, filtervalue[] filter) throws Exception{ nslimitidentifier_nslimitsessions_binding obj = new nslimitidentifier_nslimitsessions_binding(); obj.set_limitidentifier(limitidentifier); options option = ...
python
def transform_search_hit(self, pid, record_hit, links_factory=None): """Transform search result hit into an intermediate representation. :param pid: The :class:`invenio_pidstore.models.PersistentIdentifier` instance. :param record_hit: A dictionary containing a ``'_source'`` key wit...