language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def map_to_data_element(self, resource): """ Maps the given resource to a data element tree. """ trv = ResourceTreeTraverser(resource, self.as_pruning()) visitor = DataElementBuilderResourceTreeVisitor(self) trv.run(visitor) return visitor.data_element
java
public static WebDriver getWrappedDriver(final WebDriver webDriver) { if (webDriver instanceof EventFiringWebDriver) { return ((EventFiringWebDriver) webDriver).getWrappedDriver(); } return webDriver; }
python
def _t_of_e(self, a0=None, t_start=None, f0=None, ef=None, t_obs=5.0): """Rearranged versions of Peters equations This function calculates the semi-major axis and eccentricity over time. """ if ef is None: ef = np.ones_like(self.e0)*0.0000001 beta = 64.0/5.0*self.m...
python
def _get_previous_mz(self, mzs): '''given an mz array, return the mz_data (disk location) if the mz array was not previously written, write to disk first''' mzs = tuple(mzs) # must be hashable if mzs in self.lru_cache: return self.lru_cache[mzs] # mz not recognized ...
python
def rpc_v2(self, cmd, arg_format, result_format, *args, **kw): """Send an RPC call to this module, interpret the return value according to the result_type kw argument. Unless raise keyword is passed with value False, raise an RPCException if the command is not successful. v2 en...
java
public void deleteTemporaryFiles() { if (!shouldReap()) { return; } for (File file : temporaryFiles) { try { FileHandler.delete(file); } catch (WebDriverException e) { // ignore; an interrupt will already have been logged. } } }
python
def run_total_dos(self, sigma=None, freq_min=None, freq_max=None, freq_pitch=None, use_tetrahedron_method=True): """Calculate total DOS from phonons on sampling mesh. Parameters -------...
java
@Override public void setTypeMap(Map<String, Class<?>> arg0) throws SQLException { internalConn.setTypeMap(arg0); }
python
def _fit(self, df): """Private fit method of the Estimator, which trains the model. """ simple_rdd = df_to_simple_rdd(df, categorical=self.get_categorical_labels(), nb_classes=self.get_nb_classes(), features_col=self.getFeaturesCol(), label_col=self.getLabel...
python
def eol_distance_next(self, offset=0): """Return the amount of characters until the next newline.""" distance = 0 for char in self.string[self.pos + offset:]: if char == '\n': break else: distance += 1 return distance
java
protected WxCpXmlOutMessage service(WxCpXmlMessage wxMessage, WxCpService wxCpService, WxSessionManager sessionManager, WxErrorExceptionHandler exceptionHandler) { try { Map<String, Object> context = new HashMap<String, Object>(); // 如果拦截器不通过 for (WxCpMessageInterceptor interce...
java
public static <A> Set<A> set(A... elements) { final Set<A> set = new HashSet<A>(elements.length); for (A element : elements) { set.add(element); } return set; }
python
def delvlan(self, vlanid): """ Function operates on the IMCDev object. Takes input of vlanid (1-4094), auth and url to execute the delete_dev_vlans method on the IMCDev object. Device must be supported in the HPE IMC Platform VLAN Manager module. :param vlanid: str of VLANId ( va...
python
def _index_target(self, target_adaptor): """Instantiate the given TargetAdaptor, index it in the graph, and return a Target.""" # Instantiate the target. address = target_adaptor.address target = self._instantiate_target(target_adaptor) self._target_by_address[address] = target for dependency i...
python
def eval_linear_approx(self, Dxy, gradY): r"""Compute term :math:`\langle \nabla f(\mathbf{y}), \mathbf{x} - \mathbf{y} \rangle` (in frequency domain) that is part of the quadratic function :math:`Q_L` used for backtracking. Since this class computes the backtracking in the DFT,...
python
def save_response(self, service, operation, response_data, http_response=200): """ Store a response to the data directory. The ``operation`` should be the name of the operation in the service API (e.g. DescribeInstances), the ``response_data`` should a value you wa...
python
def invoke_contract(self, contract_hash, params, id=None, endpoint=None): """ Invokes a contract Args: contract_hash: (str) hash of the contract, for example 'd7678dd97c000be3f33e9362e673101bac4ca654' params: (list) a list of json ContractParameters to pass along with the...
python
def search(self, **params): """ For compatibility with generic star catalog search. """ self.logger.debug("search params=%s" % (str(params))) ra, dec = params['ra'], params['dec'] if not (':' in ra): # Assume RA and DEC are in degrees ra_deg = flo...
python
def abspath(self): "Absolute path to the local storage" return Path(os.path.abspath(os.path.expanduser(str(self.path))))
java
protected CmsBrokenLinkBean createSitemapBrokenLinkBean(CmsResource resource) throws CmsException { CmsProperty titleProp = m_cms.readPropertyObject(resource, CmsPropertyDefinition.PROPERTY_TITLE, true); String typeName = OpenCms.getResourceManager().getResourceType(resource).getTypeName(); ...
java
public void beforeClose(PBStateEvent event) { /* arminw: this is a workaround for use in managed environments. When a PB instance is used within a container a PB.close call is done when leave the container method. This close the PB handle (but the real instance is still...
python
def get_rackspace_info(server_id, region, access_key_id, secret_access_key, username): """ queries Rackspace for details about a particular server id """ nova = connect_to_rackspace(region, access_key_id, secret_acce...
java
public static UserGroupInformation getHadoopAndHiveTokensForProxyUser(final State state, Optional<File> tokenFile, UserGroupInformation ugi, IMetaStoreClient client, String targetUser) throws IOException, InterruptedException { final Credentials cred = new Credentials(); ugi.doAs(new PrivilegedExceptionAc...
python
def colorchannelmixer(stream, *args, **kwargs): """Adjust video input frames by re-mixing color channels. Official documentation: `colorchannelmixer <https://ffmpeg.org/ffmpeg-filters.html#colorchannelmixer>`__ """ return FilterNode(stream, colorchannelmixer.__name__, kwargs=kwargs).stream()
java
public Gather<Entry<K, V>> entryGather() { return Gather.from(delegate.get().entrySet()); }
python
def get_vnetwork_portgroups_output_vnetwork_pgs_datacenter(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") get_vnetwork_portgroups = ET.Element("get_vnetwork_portgroups") config = get_vnetwork_portgroups output = ET.SubElement(get_vnetwork_portgr...
java
private static File getDataDir() { File rval = null; // First check to see if a data directory has been explicitly configured via system property String dataDir = System.getProperty("apiman.bootstrap.data_dir"); //$NON-NLS-1$ if (dataDir != null) { rval = new File(dataDir); ...
python
def out(*output, **kwargs): """Writes output to stdout. :arg wrap: If you set ``wrap=False``, then ``out`` won't textwrap the output. """ output = ' '.join([str(o) for o in output]) if kwargs.get('wrap') is not False: output = '\n'.join(wrap(output, kwargs.get('indent', ''))) e...
java
public void addTargettingAlias(DestinationHandler aliasDestinationHandler) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "addTargettingAlias", aliasDestinationHandler); if (aliasesThatTargetThisDest == null) { aliasesThatTargetThisDest = new java.util.ArrayL...
python
def register_child(cls, prop, child_cls): """ Register a new :class:`XMLStreamClass` instance `child_cls` for a given :class:`Child` descriptor `prop`. .. warning:: This method cannot be used after a class has been derived from this class. This is for consistency:...
java
@Override public void destroy() throws ManagedProcessException { // // if destroy() is ever giving any trouble, the org.openqa.selenium.os.ProcessUtils may be // of // interest // if (!isAlive) { throw new ManagedProcessException(getProcLongName() ...
java
public String invokeService(Long processId, String ownerType, Long ownerId, String masterRequestId, String masterRequest, Map<String,String> parameters, String responseVarName, Map<String,String> headers) throws Exception { return invokeService(processId, ownerType, ownerId, masterReques...
java
protected void hookPreparedMessage(Postcard postcard, final SMailPostingMessage message) { if (SMailCallbackContext.isExistPreparedMessageHookOnThread()) { final SMailCallbackContext context = SMailCallbackContext.getCallbackContextOnThread(); final SMailPreparedMessageHook hook = contex...
java
private Optional<Object> toStringOrEqualsOrHashCode( String method, Class<?> serviceInterface, Object... args) { switch (method) { case "toString": return Optional.of(serviceInterface.toString()); case "equals": return Optional.of(serviceInterface.equals(args[0])); case "has...
python
def list_nodes(call=None): ''' Return a list of the VMs that are managed by the provider CLI Example: .. code-block:: bash salt-cloud -Q my-proxmox-config ''' if call == 'action': raise SaltCloudSystemExit( 'The list_nodes function must be called with -f or --funct...
java
@Override public T decrypt(final T encypted) throws Exception { T result = encypted; for (final Decryptor<T, T> encryptor : decryptors) { result = encryptor.decrypt(result); } return result; }
java
public String get(String key) { addToDefaults(key, null); unrequestedParameters.remove(key); return data.get(key); }
python
def perform_command(self): """ Perform command and return the appropriate exit code. :rtype: int """ if len(self.actual_arguments) < 4: return self.print_help() text_format = gf.safe_unicode(self.actual_arguments[0]) if text_format == u"list": ...
java
public void printMatrixSize(MatrixSize size) { format(Locale.ENGLISH, "%10d %10d %19d%n", size.numRows(), size.numColumns(), size.numEntries()); }
python
def _align_with_substrings(self, chains_to_skip = set()): '''Simple substring-based matching''' for c in self.representative_chains: # Skip specified chains if c not in chains_to_skip: #colortext.pcyan(c) #colortext.warning(self.fasta[c]) ...
python
def _time_to_json(value): """Coerce 'value' to an JSON-compatible representation.""" if isinstance(value, datetime.time): value = value.isoformat() return value
java
private VisitorState createVisitorState(Context context, DescriptionListener listener) { ErrorProneOptions options = requireNonNull(context.get(ErrorProneOptions.class)); return VisitorState.createConfiguredForCompilation( context, listener, scanner().severityMap(), options); }
java
public final EObject entryRuleMethodCall() throws RecognitionException { EObject current = null; EObject iv_ruleMethodCall = null; try { // InternalSimpleExpressions.g:593:2: (iv_ruleMethodCall= ruleMethodCall EOF ) // InternalSimpleExpressions.g:594:2: iv_ruleMethodCa...
python
def match_route(self, url): # type: (str) -> MatchResult """Match the url against known routes. This method takes a concrete route "/foo/bar", and matches it against a set of routes. These routes can use param substitution corresponding to API gateway patterns. For exam...
python
def render_like(parser, token): """ {% likes user as like_list %} <ul> {% for like in like_list %} <li>{% render_like like %}</li> {% endfor %} </ul> """ tokens = token.split_contents() var = tokens[1] return LikeRenderer(var)
java
public List<ProteinType.Domain> getDomain() { if (domain == null) { domain = new ArrayList<ProteinType.Domain>(); } return this.domain; }
python
def outdated(self): """True if at least one of the |Cythonizer.pysourcefiles| is newer than the compiled file under |Cythonizer.pyxfilepath|, otherwise False. """ if hydpy.pub.options.forcecompiling: return True if os.path.split(hydpy.__path__[0])[-2].endswith...
java
protected Configuration[] loadConfigurations() throws Exception { String[] names = _configurationClassNames; //if this webapp does not have its own set of configurators, use the defaults if (null==names) names = ((Server)getHttpServer()).getWebApplicationConfigurationCla...
java
public String getHeader( final String name ) { List<String> headerVals = getRequestInfo().getHeader(name); if( headerVals != null && !headerVals.isEmpty() ) { return headerVals.get(0); } return null; }
java
public Map<String, ManagedObjectReference> inContainerByType(ManagedObjectReference folder, String morefType, RetrieveOptions retrieveOptions) throws InvalidPropertyFaultMsg, Run...
java
public void marshall(ListVirtualRoutersRequest listVirtualRoutersRequest, ProtocolMarshaller protocolMarshaller) { if (listVirtualRoutersRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(list...
java
public synchronized void stop() { // Mark us closed stopped = true; try { // Kick the server accept loop serverSocket.close(); // acquire all semaphores so that we wait for all connections to finish before we report back as closed semaphore.acquireUninterruptibly(MAXIMUM_CONCURRENT_READERS); } catc...
python
def right_click(self, x, y, n=1, pre_dl=None, post_dl=None): """Right click at ``(x, y)`` on screen for ``n`` times. at begin. **中文文档** 在屏幕的 ``(x, y)`` 坐标处右键单击 ``n`` 次。 """ self.delay(pre_dl) self.m.click(x, y, 2, n) self.delay(post_dl)
python
def prune(self): """ Prune the scenario ephemeral directory files and returns None. "safe files" will not be pruned, including the ansible configuration and inventory used by this scenario, the scenario state file, and files declared as "safe_files" in the ``driver`` configurati...
python
def _check_ver_range(self, version, ver_range): """Check if version is included in ver_range """ lower, upper, lower_inc, upper_inc = ver_range #If the range extends over everything, we automatically match if lower is None and upper is None: return True if ...
java
public void buildEnvironment(@Nonnull Run<?,?> build, @Nonnull Map<String,String> env) { if (build instanceof AbstractBuild) { buildEnvVars((AbstractBuild)build, env); } }
java
public RegressionSuite regressionSuite(String name, RegressionPlan regressionPlan, Map<String, Object> attributes) { RegressionSuite regressionSuite = new RegressionSuite(instance); regressionSuite.setName(name); regressionSuite.setRegressionPlan(regressionPlan); addAttributes(regressio...
java
public BoundRequestBuilder createRequest() throws HttpRequestCreateException { BoundRequestBuilder builder = null; getLogger().debug("AHC completeUrl " + requestUrl); try { switch (httpMethod) { case GET: builder = client.prepareGet(requestU...
java
private void add(State[] stack, State state) { if (stackElements != 0) { System.arraycopy(stack, 0, stack, 1, stackElements); } stack[0] = state; stackElements++; }
python
def read_datanommer_entries_from_filedump(): """ Read in all datanommer entries from a file created with: $ datanommer-dump > myfile.json """ # TODO -- un-hardcode this filename when I need to run this next time. #filename = "../myfile.json" filename = "../datanommer-dump-2012-11-22.json" ...
java
private void createSegment() throws IOException { segmentsAttempted = 0; bytesWritten = 0; boolean success = false; while (!success) { Path path = workOutputPath.suffix(String.format(extensionFormat, segmentsCreated, segmentsAttempted)); FileSystem fs = path.getF...
java
private int jOfI(InfoTree it, int aI, int aSubtreeWeight, int aSubtreeRevPre, int aSubtreePre, int aStrategy, int treeSize) { return aStrategy == LEFT ? aSubtreeWeight - aI - it.info[POST2_SIZE][treeSize - 1 - (aSubtreeRevPre + aI)] : aSubtreeWeight - aI - it.info[POST2_SIZE][it.info[RPOST2_POS...
java
@Override public ContainerModel setScanInterval(Long scanInterval) { String si = scanInterval != null ? scanInterval.toString() : null; setModelAttribute("scanInterval", si); return this; }
java
public static String unwrap(final String str, final String wrapToken) { if (isEmpty(str) || isEmpty(wrapToken)) { return str; } if (startsWith(str, wrapToken) && endsWith(str, wrapToken)) { final int startIndex = str.indexOf(wrapToken); final int endIndex = s...
python
def create_toc(headlines, hyperlink=True, top_link=False, no_toc_header=False): """ Creates the table of contents from the headline list that was returned by the tag_and_collect function. Keyword Arguments: headlines: list of lists e.g., ['Some header lvl3', 'some-header-lvl3', 3] ...
python
def set_app_os_tag(self, os_tag, app_tag, update_os, update_app): """Update the app and/or os tags.""" update_os = bool(update_os) update_app = bool(update_app) if update_os: self.os_info = _unpack_version(os_tag) if update_app: self.app_info = _unpack_...
java
public MockSubnet createSubnet( final String cidrBlock, final String vpcId) { MockSubnet ret = new MockSubnet(); ret.setCidrBlock(cidrBlock); ret.setSubnetId( "subnet-" + UUID.randomUUID().toString().substring(0, SUBNET_ID_POSTFIX_LENGTH)); ret.setVpcId(vpcI...
java
protected void initDefaultWidget(Element element) { m_defaultWidget = element.attributeValue(APPINFO_ATTR_WIDGET); m_defaultWidgetConfig = element.attributeValue(APPINFO_ATTR_CONFIGURATION); try { m_defaultWidgetInstance = (I_CmsComplexWidget)(Class.forName(m_defaultWidget).newInsta...
python
def restore(self): """ Set the values of whatever attributes are recoverable from the pickle file. Populate the attributes (the __dict__) of the EgStore object from the attributes (the __dict__) of the pickled object. If the pickled object has attributes that have b...
python
def delay_on(self): """ The `timer` trigger will periodically change the LED brightness between 0 and the current brightness setting. The `on` time can be specified via `delay_on` attribute in milliseconds. """ # Workaround for ev3dev/ev3dev#225. # 'delay_on' and...
python
def _simsearch_to_simresult(self, sim_resp: Dict, method: SimAlgorithm) -> SimResult: """ Convert owlsim json to SimResult object :param sim_resp: owlsim response from search_by_attribute_set() :param method: SimAlgorithm :return: SimResult object """ sim_ids = ...
python
def flux(self, a, b): r"""The flux network for the reaction from A=[0,...,a] => B=[b,...,M]. Parameters ---------- a : int State index b : int State index Returns ------- flux : (M, M) ndarray Matrix of flux va...
python
def update_datatype(self, datatype, w=None, dw=None, pw=None, return_body=None, timeout=None, include_context=None): """ Sends an update to a Riak Datatype to the server. This operation is not idempotent and so will not be retried automatically. ...
java
@Override public EClass getIfcActor() { if (ifcActorEClass == null) { ifcActorEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers() .get(2); } return ifcActorEClass; }
java
protected NodeData getBaseVersionData(final NodeData node, final SessionImpl session) throws RepositoryException { NodeTypeDataManager ntManager = session.getWorkspace().getNodeTypesHolder(); if (ntManager.isNodeType(Constants.MIX_VERSIONABLE, node.getPrimaryTypeName(), node.getMixinTypeNames())) ...
java
private void setCalendarLocale(ULocale locale) { ULocale calLocale = locale; if (locale.getVariant().length() != 0 || locale.getKeywords() != null) { // Construct a ULocale, without variant and keywords (except calendar). StringBuilder buf = new StringBuilder(); buf...
java
public static void tagToJson(JsonGenerator gen, Tag tag) throws IOException { final String key = tag.getKey(); if (RELAXED_GROUP_KEYS.contains(key)) { gen.writeStringField(key, toValidCharsetTable(CHARS_ALLOWED_GROUPS, tag.getValue())); } else { gen.writeStringField(toValidCharset(tag.getKey()),...
python
def from_env_vars(self) -> None: """Load values from environment variables. Keys must start with `KUYRUK_`.""" for key, value in os.environ.items(): if key.startswith('KUYRUK_'): key = key[7:] if hasattr(Config, key): try: ...
java
public void marshall(Voice voice, ProtocolMarshaller protocolMarshaller) { if (voice == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(voice.getGender(), GENDER_BINDING); protocolMarshall...
java
private static boolean isLowerBoundsCompatible(final WildcardType one, final WildcardType two) { boolean res = true; final Type[] oneLower = one.getLowerBounds(); final Type[] twoLower = two.getLowerBounds(); if (oneLower.length > 0 && twoLower.length > 0) { res = isCompatibl...
java
public static OffsetTime time(EvaluationContext ctx, Object hours, Object minutes, Object seconds) { int _hours = Conversions.toInteger(hours, ctx); int _minutes = Conversions.toInteger(minutes, ctx); int _seconds = Conversions.toInteger(seconds, ctx); LocalTime localTime = LocalTime.of(...
python
def available_formats(): """ Get a list of all available loaders Returns ----------- loaders : list Extensions of available loaders i.e. 'stl', 'ply', 'dxf', etc. """ loaders = mesh_formats() loaders.extend(path_formats()) loaders.extend(compressed_loaders.keys()) ...
java
@Override public void aggregate() { final ArrayOfDoublesSketch update = selector.getObject(); if (update == null) { return; } synchronized (this) { union.update(update); } }
java
protected void parse() { // have we already parsed the input? if (_parsed) return; _parsed = true; try { // initialize _parts = new MultiMap<>(); // if its not a multipart request, don't parse it if (_contentType == null || !_...
python
def root(path: Union[str, pathlib.Path]) -> _Root: """ Retrieve a root directory object from a path. :param path: The path string or Path object. :return: The created root object. """ return _Root.from_path(_normalise_path(path))
java
public void marshall(ResultSet resultSet, ProtocolMarshaller protocolMarshaller) { if (resultSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(resultSet.getRows(), ROWS_BINDING); prot...
python
def register_preprocessed_file(self, infile, pmid, extra_annotations): """Set up already preprocessed text file for reading with ISI reader. This is essentially a mock function to "register" already preprocessed files and get an IsiPreprocessor object that can be passed to the IsiProces...
java
public static Object invokeStaticMethod(Class<?> objectClass, String methodName, Object[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { if (args == null) { args = EMPTY_OBJECT_ARRAY; } int arguments = args.length; Class<?>...
java
public Collection<String> getParticipantNodes() throws Exception { return LockInternals.getParticipantNodes(internals.getClient(), basePath, internals.getLockName(), internals.getDriver()); }
java
@Override public void doExecute() throws MojoExecutionException { getLog().info(" "); getLog().info(LINE_SEPARATOR); getLog().info(" P E R F O R M A N C E T E S T S"); getLog().info(LINE_SEPARATOR); getLog().info(" "); if (!testFilesDirectory.exists()) { ...
java
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (_elemDesc == null) // element is a Class _annotElem = _elemClass; else { int argsIndex = _elemDesc.indexOf('('); ...
java
public void setType(String type) throws ApplicationException { type = type.toLowerCase().trim(); if (type.equals("page")) this.type = lucee.runtime.exp.Abort.SCOPE_PAGE; else if (type.equals("request")) this.type = lucee.runtime.exp.Abort.SCOPE_REQUEST; else throw new ApplicationException("attribute type has an inv...
java
private void handleSelection(@Nullable View view, Item item, int position) { //if this item is not selectable don't continue if (!item.isSelectable()) { return; } //if we have disabled deselection via click don't continue if (item.isSelected() && !mAllowDeselection) ...
java
private Map<SessionStatus, MetricsTimeVaryingInt> createSessionStatusToMetricsMap() { Map<SessionStatus, MetricsTimeVaryingInt> m = new HashMap<SessionStatus, MetricsTimeVaryingInt>(); for (SessionStatus endState : SESSION_END_STATES) { String name = endState.toString().toLowerCase() + "_sessions"...
java
protected Double eval(final Object[] _value) { final Double ret; if (_value == null) { ret = null; } else if ((_value[0] instanceof String) && (((String) _value[0]).length() > 0)) { ret = Double.parseDouble((String) _value[0]); } else if (_value[0] instanceof...
python
def runSearchFeatureSets(self, request): """ Returns a SearchFeatureSetsResponse for the specified SearchFeatureSetsRequest object. """ return self.runSearchRequest( request, protocol.SearchFeatureSetsRequest, protocol.SearchFeatureSetsResponse, ...
java
public void updateFile(int fileId, FileUpdate update) { getResourceFactory().getApiResource("/file/" + fileId) .entity(update, MediaType.APPLICATION_JSON_TYPE).put(); }
java
public ArrayList<Long> serviceName_tasks_GET(String serviceName, OvhActionType action, OvhTaskStateEnum status) throws IOException { String qPath = "/license/worklight/{serviceName}/tasks"; StringBuilder sb = path(qPath, serviceName); query(sb, "action", action); query(sb, "status", status); String resp = exe...
python
def mergeValues(self, iterator): """ Combine the items by creator and combiner """ # speedup attribute lookup creator, comb = self.agg.createCombiner, self.agg.mergeValue c, data, pdata, hfun, batch = 0, self.data, self.pdata, self._partition, self.batch limit = self.memory_limit...
python
def UpdateTaskAsPendingMerge(self, task): """Updates the task manager to reflect the task is ready to be merged. Args: task (Task): task. Raises: KeyError: if the task was not queued, processing or abandoned, or the task was abandoned and has a retry task. """ with self._lock...