language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def get_datatable(self, **kwargs): """ Gathers and returns the final :py:class:`Datatable` instance for processing. """ if hasattr(self, '_datatable'): return self._datatable datatable_class = self.get_datatable_class() if datatable_class is None: class AutoMeta:...
python
def __sort_stats(self, sortedby=None): """Return the stats (dict) sorted by (sortedby).""" return sort_stats(self.stats, sortedby, reverse=glances_processes.sort_reverse)
java
public static List<Entry<String, Double>> toEntryList(Set<Tuple> set) { if (set == null || set.isEmpty()) { return null; } List<Entry<String, Double>> result = new ArrayList<Entry<String, Double>>(); for (Tuple tuple : set) { String element = tuple.getElement(); Double score = tuple.getScore(); ...
java
public final void setAttribute(String currentElement, StringBuilder contentBuffer) { if (currentElement.equalsIgnoreCase(GPXTags.TIME)) { setTime(contentBuffer); } else if (currentElement.equalsIgnoreCase(GPXTags.MAGVAR)) { setMagvar(contentBuffer); } else if (currentElem...
python
def has_swapped(self): """ Check whether any swapping occured on this system since this instance was created. @return a boolean value """ new_values = self._read_swap_count() for key, new_value in new_values.items(): old_value = self.swap_count.get(key, 0) ...
python
def directory_to_pif(directory, **kwargs): """ Convert a directory to a pif :param directory: Directory to convert to a pif :param kwargs: any additional keyword arguments. (See `files_to_pif`) :return: the created pif """ # Get the files files = [os.path.join(directory, f) for f in os....
python
def kube_node_status_condition(self, metric, scraper_config): """ The ready status of a cluster node. v1.0+""" base_check_name = scraper_config['namespace'] + '.node' metric_name = scraper_config['namespace'] + '.nodes.by_condition' by_condition_counter = Counter() for sample in...
java
public static String getStateStyle(Item resourceItem) { String result = ""; if (resourceItem != null) { if ((resourceItem.getItemProperty(PROPERTY_INSIDE_PROJECT) == null) || ((Boolean)resourceItem.getItemProperty(PROPERTY_INSIDE_PROJECT).getValue()).booleanValue()) { ...
java
public Set<Integer> getOutlinkIDs() { Set<Integer> tmpSet = new HashSet<Integer>(); Session session = wiki.__getHibernateSession(); session.beginTransaction(); session.buildLockRequest(LockOptions.NONE).lock(hibernatePage); tmpSet.addAll(hibernatePage.getOutLinks()); session.getTransaction().commit(); ...
python
def get_payload(self): """Return Payload.""" ret = bytes([self.session_id >> 8 & 255, self.session_id & 255]) ret += bytes([self.index_id]) ret += bytes([self.node_parameter]) ret += bytes([self.seconds >> 8 & 255, self.seconds & 255]) return ret
python
def truncate_loc(self, character, location, branch, turn, tick): """Remove future data about a particular location Return True if I deleted anything, False otherwise. """ r = False branches_turns = self.branches[character, location][branch] branches_turns.truncate(turn)...
java
protected void parseMetaDataLine(final ParserData parserData, final String line, int lineNumber) throws ParsingException { // Parse the line and break it up into the key/value pair Pair<String, String> keyValue = null; try { keyValue = ProcessorUtilities.getAndValidateKeyValuePair(li...
python
def route(self, path=None, method='GET', callback=None, name=None, apply=None, skip=None, **config): """ A decorator to bind a function to a request URL. Example:: @app.route('/hello/<name>') def...
python
def _GetPredicate(self, pred_str, test_attr=False): """ The user's predicates are consulted first, then the default predicates. """ predicate, args, func_type = self.predicates.LookupWithType(pred_str) if predicate: pred = predicate, args, func_type else: ...
java
public Jar setListAttribute(String name, Collection<?> values) { return setAttribute(name, join(values)); }
python
def _fast_memory_load_bytes(self, addr, length): """ Perform a fast memory loading of some data. :param int addr: Address to read from. :param int length: Size of the string to load. :return: A string or None if the address does not exist. :rtype: bytes ...
python
def pan(self, value): """Pan translation.""" assert len(value) == 2 self._pan[:] = value self._constrain_pan() self.update()
python
def index(self, corpus=None, clear_buffer=True): """ Permanently index all documents previously added via `buffer`, or directly index documents from `corpus`, if specified. The indexing model must already exist (see `train`) before this function is called. """ if...
java
private void convertToMentsuComp(List<Mentsu> winCandidate) throws IllegalMentsuSizeException { //全て0かチェック if (isAllZero(handStocks)) { canWin = true; winCandidate.addAll(inputtedMentsuList); MentsuComp mentsuComp = new MentsuComp(winCandidate, last); if (...
java
private void failWithMessage(String errorMessage) { AssertionError assertionError = Failures.instance().failureIfErrorMessageIsOverridden(info); if (assertionError == null) { // error message was not overridden, build it. String description = MessageFormatter.instance().format(info.descripti...
python
def initLogging(self): """Configures the logger.""" verbose_levels = { 0: logging.WARNING, 1: logging.INFO, 2: logging.DEBUG, } logging.basicConfig( level=verbose_levels[self.verbose], format="[%(asctime)-15s] %(module)-9s %(lev...
java
public VarTensor getMarginal(VarSet vars, boolean normalize) { VarSet margVars = new VarSet(this.vars); margVars.retainAll(vars); VarTensor marg = new VarTensor(s, margVars, s.zero()); if (margVars.size() == 0) { return marg; } IntIter iter =...
java
public final void entryRuleAbstractToken() throws RecognitionException { try { // InternalXtext.g:421:1: ( ruleAbstractToken EOF ) // InternalXtext.g:422:1: ruleAbstractToken EOF { before(grammarAccess.getAbstractTokenRule()); pushFollow(FollowSets00...
java
@BetaApi public final Operation deleteInstancesRegionInstanceGroupManager( String instanceGroupManager, RegionInstanceGroupManagersDeleteInstancesRequest regionInstanceGroupManagersDeleteInstancesRequestResource) { DeleteInstancesRegionInstanceGroupManagerHttpRequest request = Delet...
python
def handle(self): """ The required handle method. """ logger = StreamHandler.logger logger.debug("handling requests with message handler %s " % StreamHandler.message_handler.__class__.__name__) message_handler = StreamHandler.message_handler try: whi...
java
public static Registry run(String type, String test) { Registry registry = createRegistry(type); TESTS.get(test).accept(registry); return registry; }
java
public static <T> T assertSame(T exp, T was, String message) { assertNotNull(exp, message); assertNotNull(was, message); assertTrue(exp == was, message); return was; }
python
def combine(a1, a2): ''' Combine to argument into a single flat list It is used when you are not sure whether arguments are lists but want to combine them into one flat list Args: a1: list or other thing a2: list or other thing Returns: list: a flat list contain a1 and a2 ...
python
def enumerate(self): """ Enumerate top MaxSAT solutions (from best to worst). The method works as a generator, which iteratively calls :meth:`compute` to compute a MaxSAT model, blocks it internally and returns it. :returns: a MaxSAT model ...
java
public void setLibs(final CUtil.StringArrayBuilder libs) throws BuildException { if (isReference()) { throw tooManyAttributes(); } this.libnames = libs.getValue(); // // earlier implementations would warn of suspicious library names // (like libpthread for pthread or kernel.lib for kernel)...
java
public static synchronized boolean updateAdvertisingIdClientInfo(Context context) { ApptentiveLog.v(ADVERTISER_ID, "Updating advertiser ID client info..."); AdvertisingIdClientInfo clientInfo = resolveAdvertisingIdClientInfo(context); if (clientInfo != null && clientInfo.equals(cachedClientInfo)) { return fals...
python
def _read_opt_pdm(self, code, *, desc): """Read HOPOPT PDM option. Structure of HOPOPT PDM option [RFC 8250]: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+...
python
def has_enumerated_namespace_name(self, namespace: str, name: str) -> bool: """Check that the namespace is defined by an enumeration and that the name is a member.""" return self.has_enumerated_namespace(namespace) and name in self.namespace_to_terms[namespace]
python
def ParseMultiple(self, stats, unused_file_obj, unused_kb): """Identify the init scripts and the start/stop scripts at each runlevel. Evaluate all the stat entries collected from the system. If the path name matches a runlevel spec, and if the filename matches a sysv init symlink process the link as a ...
java
@Override public int nextDoc() throws IOException { resetQueue(); noMorePositions = false; return (spans.nextDoc() == NO_MORE_DOCS) ? NO_MORE_DOCS : toMatchDoc(); }
java
public static String getRandomHexString(int length){ byte[] bytes = new byte[length/2]; new Random().nextBytes(bytes); return DatatypeConverter.printHexBinary(bytes); }
python
def mk_metadata_csv(filedir, outputfilepath, max_bytes=MAX_FILE_DEFAULT): """ Make metadata file for all files in a directory. :param filedir: This field is the filepath of the directory whose csv has to be made. :param outputfilepath: This field is the file path of the output csv. :param m...
java
public boolean getStatusAgg(byte[] row, byte[] col) throws IOException { Get g = new Get(row); g.addColumn(Constants.INFO_FAM_BYTES, col); Table rawTable = null; Cell cell = null; try { rawTable = hbaseConnection .getTable(TableName.valueOf(Constants.HISTORY_RAW_TABLE)); Result...
python
def _validate_netengine(self): """ call netengine validate() method verifies connection parameters are correct """ if self.backend: try: self.netengine.validate() except NetEngineError as e: raise ValidationError(e)
java
static TypeName arrayComponent(TypeName type) { return type instanceof ArrayTypeName ? ((ArrayTypeName) type).componentType : null; }
java
@SuppressWarnings("unchecked") @Override public EList<IfcOrganizationRelationship> getRelates() { return (EList<IfcOrganizationRelationship>) eGet(Ifc4Package.Literals.IFC_ORGANIZATION__RELATES, true); }
java
public void createUpdate4Trigger(String tableName, String geometryColumnName, String idColumnName) { String sqlName = GeoPackageProperties.getProperty(TRIGGER_PROPERTY, TRIGGER_UPDATE4_NAME); executeSQL(sqlName, tableName, geometryColumnName, idColumnName); }
python
def _center(X, w, s, mask=None, const=None, inplace=True): """ Centers the data. Parameters ---------- w : float statistical weight of s inplace : bool center in place Returns ------- sx : ndarray uncentered row sum of X sx_centered : ndarray row sum...
python
def build(self, builder): """Build XML by appending to builder""" params = dict(OID=self.oid) if self.user_type: params.update(dict(UserType=self.user_type.value)) builder.start(self.__class__.__name__, params) # build the children for child in ('login_name', ...
python
async def patch_entries(self, entry, **kwargs): """ PATCH /api/entries/{entry}.{_format} Change several properties of an entry :param entry: the entry to 'patch' / update :param kwargs: can contain one of the following title: string tags: a list of tags ...
java
public static String convertToLevel3(final String biopaxData) { String toReturn = ""; try { ByteArrayOutputStream os = new ByteArrayOutputStream(); InputStream is = new ByteArrayInputStream(biopaxData.getBytes()); SimpleIOHandler io = new SimpleIOHandler(); io.mergeDuplicates(true); Model model = ...
python
def OnSearchFlag(self, event): """Event handler for search flag toggle buttons""" for label in self.search_options_buttons: button_id = self.label2id[label] if button_id == event.GetId(): if event.IsChecked(): self.search_options.append(label)...
java
private static int[] determineSeparatorCounts(String from, int single_quote) { int[] result = new int[separators.length]; byte[] bits = from.getBytes(); boolean in_quote = false; for( int j=0; j< bits.length; j++ ) { byte c = bits[j]; if( (c == single_quote) || (c == CHAR_DOUBLE_QUOTE) ) ...
java
public static KeyStore getInstance(String type, String provider) throws KeyStoreException, NoSuchProviderException { if (provider == null || provider.length() == 0) throw new IllegalArgumentException("missing provider"); try { Object[] objs = Security.getImpl(type, "K...
python
def inline(sconf): """ Return config in inline form, opposite of :meth:`config.expand`. Parameters ---------- sconf : dict Returns ------- dict configuration with optional inlined configs. """ if ( 'shell_command' in sconf and isinstance(sconf['shell_co...
java
private boolean fillBuffer(int offset) throws IOException { int maxReadLength = this.readBuffer.length - offset; // special case for reading the whole split. if (this.splitLength == FileInputFormat.READ_WHOLE_SPLIT_FLAG) { int read = this.stream.read(this.readBuffer, offset, maxReadLength); if (read == -1) ...
java
public void setNotificationTransitionEnabled(boolean enable) { if (mTransitionEnabled != enable) { if (DBG) Log.v(TAG, "transition enable - " + enable); mTransitionEnabled = enable; } }
java
public static double copySign(double magnitude, double sign) { return Math.copySign(magnitude, (Double.isNaN(sign)?1.0d:sign)); }
java
private void gc() { I_CmsLruCacheObject currentObject = m_listTail; while (currentObject != null) { if (m_objectCosts < m_avgCacheCosts) { break; } currentObject = currentObject.getNextLruObject(); removeTail(); } }
java
@Override @Transactional(enabled = false) public CommerceNotificationQueueEntry createCommerceNotificationQueueEntry( long commerceNotificationQueueEntryId) { return commerceNotificationQueueEntryPersistence.create(commerceNotificationQueueEntryId); }
python
def _EscapeGlobCharacters(path): """Escapes the glob characters in a path. Python 3 has a glob.escape method, but python 2 lacks it, so we manually implement this method. Args: path: The absolute path to escape. Returns: The escaped path string. """ drive, path = os.path.splitdrive(path) retu...
java
@Override public UpdateNotificationSettingsResult updateNotificationSettings(UpdateNotificationSettingsRequest request) { request = beforeClientExecution(request); return executeUpdateNotificationSettings(request); }
java
protected RunnerResult doRun(Class<? extends LaJob> jobType, LaJobRuntime runtime) { // similar to async manager's process arrangeThreadCacheContext(runtime); arrangePreparedAccessContext(runtime); arrangeCallbackContext(runtime); final Object variousPreparedObj = prepareVariousC...
python
def contains(self, other): """ Returns True if offset vector @other can be found in @self, False otherwise. An offset vector is "found in" another offset vector if the latter contains all of the former's instruments and the relative offsets among those instruments are equal (the absolute offsets need not b...
java
public static nshttpprofile get(nitro_service service, String name) throws Exception{ nshttpprofile obj = new nshttpprofile(); obj.set_name(name); nshttpprofile response = (nshttpprofile) obj.get_resource(service); return response; }
python
def get_field_type(field): """ Returns field type/possible values. """ if isinstance(field, core_filters.MappedMultipleChoiceFilter): return ' | '.join(['"%s"' % f for f in sorted(field.mapped_to_model)]) if isinstance(field, OrderingFilter) or isinstance(field, ChoiceFilter): return...
java
public void checkCloudSdk(CloudSdk cloudSdk, String version) throws CloudSdkVersionFileException, CloudSdkNotFoundException, CloudSdkOutOfDateException { if (!version.equals(cloudSdk.getVersion().toString())) { throw new RuntimeException( "Specified Cloud SDK version (" + version...
java
public static TravelingSalesman of(int stops, double radius) { final MSeq<double[]> points = MSeq.ofLength(stops); final double delta = 2.0*PI/stops; for (int i = 0; i < stops; ++i) { final double alpha = delta*i; final double x = cos(alpha)*radius + radius; final double y = sin(alpha)*radius + radius; ...
python
def pixel_coord(self): """ Return the coordinates of the source in the cutout reference frame. @return: """ return self.get_pixel_coordinates(self.reading.pix_coord, self.reading.get_ccd_num())
python
def available_modes_with_ids(self): """Return list of objects containing available mode name and id.""" if not self._available_mode_ids: all_modes = FIXED_MODES.copy() self._available_mode_ids = all_modes modes = self.get_available_modes() try: ...
python
def predict(self, X): """ Predict the less costly class for a given observation Note ---- The implementation here happens in a Python loop rather than in some NumPy array operations, thus it will be slower than the other algorithms here, even though in th...
python
def get_doc_types(cls, exclude_base=False): """Returns the doc_type of this class and all of its descendants.""" names = [] if not exclude_base and hasattr(cls, 'search_objects'): if not getattr(cls.search_objects.mapping, "elastic_abstract", False): names.append(cls....
java
public void setDatasourceParams(JdbcDatabase database, com.mysql.jdbc.jdbc2.optional.MysqlDataSource dataSource) { String strURL = database.getProperty(SQLParams.JDBC_URL_PARAM); if ((strURL == null) || (strURL.length() == 0)) strURL = database.getProperty(SQLParams.DEFAULT_JDBC_URL_PARA...
python
def bytes2human(n, fmt='%(value).1f %(symbol)s', symbols='customary'): """ Convert n bytes into a human readable string based on format. symbols can be either "customary", "customary_ext", "iec" or "iec_ext", see: http://goo.gl/kTQMs """ n = int(n) if n < 0: raise ValueError("n < 0")...
java
public ICriterion<ReferenceClientParam> hasAnyOfIds(String... theIds) { Validate.notNull(theIds, "theIds must not be null"); return hasAnyOfIds(Arrays.asList(theIds)); }
python
def get_value(self, element): """ | Returns the given element value. | If multiple elements with the same name exists, only the first encountered will be returned. Usage:: >>> plist_file_parser = PlistFileParser("standard.plist") >>> plist_file_parser.parse() ...
java
protected Object invoke(final Object obj, final String method, final Object[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { final Class<?>[] c = new Class<?>[args.length]; for (int i = 0; i < c.length; ++i) { c[i] = args[i].getClass(); if (c[i] == Integer.class) ...
python
def cmd(self, value): """ setter for final 'CMD' instruction in final build stage """ cmd = None for insndesc in self.structure: if insndesc['instruction'] == 'FROM': # new stage, reset cmd = None elif insndesc['instruction'] == 'CMD': ...
python
def summary(self, h): """ Summarize the results for each model for h steps of the algorithm Parameters ---------- h : int How many steps to run the aggregating algorithm on Returns ---------- - pd.DataFrame of losses for each model ...
python
def restore_descriptor(self, converted_descriptor): """Restore descriptor rom BigQuery """ # Convert fields = [] for field in converted_descriptor['fields']: field_type = self.restore_type(field['type']) resfield = { 'name': field['name'],...
java
public void switchReadOnlyConnection(Boolean mustBeReadOnly) throws SQLException { if (urlParser.getOptions().assureReadOnly && currentReadOnlyAsked != mustBeReadOnly) { proxy.lock.lock(); try { // verify not updated now that hold lock, double check safe due to volatile if (currentReadOn...
python
def load_data(self, filename, *args, **kwargs): """ Load parameterized data from different sheets. """ # load parameterized data data = super(ParameterizedXLS, self).load_data(filename) # add parameter to data parameter_name = self.parameterization['parameter']['n...
java
public Scope[] getChildren() { if (mChildren == null) { return new Scope[0]; } else { return mChildren.toArray(new Scope[mChildren.size()]); } }
java
public boolean isEOF() { boolean bFlag = ((m_iRecordStatus & DBConstants.RECORD_AT_EOF) != 0); if (this.isTable()) { // If this is a table, it can't handle starting and ending keys.. do it manually if (bFlag) return bFlag; if (this.getRecord().getKey...
java
protected boolean convertToBoolean(final Object fromStack) throws ParseException { if (fromStack instanceof Number) /* * 0 is the only number that is false, all others are true. */ return ((Number) fromStack).intValue() != 0; if (fromStack instanceof...
python
def DeleteStoredProcedure(self, sproc_link, options=None): """Deletes a stored procedure. :param str sproc_link: The link to the stored procedure. :param dict options: The request options for the request. :return: The deleted Stored Procedure. ...
java
private static int matchString(String str, CharSequence src, int begin, int end) { final int patternLength = str.length(); int i = 0; for (; (i < patternLength) && ((begin + i) < end); i++) { final char exp = str.charAt(i); final char enc = src.charAt(begin + i); if (exp != enc) return Pat...
java
public final void restoreDefaults() { SharedPreferences sharedPreferences = getPreferenceManager().getSharedPreferences(); if (getPreferenceScreen() != null) { restoreDefaults(getPreferenceScreen(), sharedPreferences); } }
python
def post_process_images(self, doctree): """Pick the best candidate for all image URIs.""" super(AbstractSlideBuilder, self).post_process_images(doctree) # figure out where this doctree is in relation to the srcdir relative_base = ( ['..'] * doctree.attributes.ge...
python
def configparser_to_backend_config(cp_instance): """ Return a config dict generated from a configparser instance. This functions main purpose is to ensure config dict values are properly typed. Note: This can be used with any ``ConfigParser`` backend instance not just the default one i...
java
protected void addLinkAndOptionsHttpHeaders(final FedoraResource resource) { // Add Link headers addResourceLinkHeaders(resource); addAcceptExternalHeader(); // Add Options headers final String options; if (resource.isMemento()) { options = "GET,HEAD,OPTIONS,...
java
private COFFFileHeader loadCOFFFileHeader(PESignature pesig, RandomAccessFile raf) throws IOException { // coff header starts right after the PE signature long offset = pesig.getOffset() + PESignature.PE_SIG.length; logger.info("COFF Header offset: " + offset); // read bytes,...
java
public static <T> T fromJSON(final Class<T> targetClass, final String json) { if (targetClass.equals(JsonObject.class)) { return (T) JsonObject.from(N.fromJSON(Map.class, json)); } else if (targetClass.equals(JsonArray.class)) { return (T) JsonArray.from(N.fromJSON(List.class...
java
public boolean save() { filter(FILTER_BY_SAVE); Config config = _getConfig(); Table table = _getTable(); StringBuilder sql = new StringBuilder(); List<Object> paras = new ArrayList<Object>(); config.dialect.forModelSave(table, attrs, sql, paras); // if (paras.size() == 0) return false; // T...
python
def prepare(self): """Check that the file exists, optionally downloads it. Checks that the file is indeed an SQLite3 database. Optionally check the MD5.""" if not os.path.exists(self.path): if self.retrieve: print("Downloading SQLite3 database...") ...
python
def _get_pod_by_metric_label(self, labels): """ :param labels: metric labels: iterable :return: """ pod_uid = self._get_pod_uid(labels) return get_pod_by_uid(pod_uid, self.pod_list)
python
def _escape_identifiers(self, item): """ This function escapes column and table names @param item: """ if self._escape_char == '': return item for field in self._reserved_identifiers: if item.find('.%s' % field) != -1: _str = "%s%s...
python
def login(config, api_key=""): """Store your Bugzilla API Key""" if not api_key: info_out( "If you don't have an API Key, go to:\n" "https://bugzilla.mozilla.org/userprefs.cgi?tab=apikey\n" ) api_key = getpass.getpass("API Key: ") # Before we store it, let's ...
java
protected void createLayers2() { this.mapView2.getLayerManager() .getLayers().add(AndroidUtil.createTileRendererLayer(this.tileCaches.get(1), this.mapView2.getModel().mapViewPosition, getMapFile2(), getRenderTheme2(), false, true, false)); }
java
public static <A, EA extends A, A1, A2, A3> DecomposableMatchBuilder3<Tuple1<A>, A1, A2, A3> tuple1( DecomposableMatchBuilder3<EA, A1, A2, A3> a) { List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.any()); return new DecomposableMatchBuilder1<Tuple1<A>, EA>(matchers, 0, new Tuple1FieldExtractor<>...
python
def gfm(text): """ Prepare text for rendering by a regular Markdown processor. """ def indent_code(matchobj): syntax = matchobj.group(1) code = matchobj.group(2) if syntax: result = ' :::' + syntax + '\n' else: result = '' # The last lin...
java
@ForOverride String getCode(int startingIndent) { FormattingContext initialStatements = new FormattingContext(startingIndent); initialStatements.appendInitialStatements(this); FormattingContext outputExprs = new FormattingContext(startingIndent); if (this instanceof Expression) { outputExprs.ap...
java
public static Element svgCircleSegment(SVGPlot svgp, double centerx, double centery, double angleStart, double angleDelta, double innerRadius, double outerRadius) { final DoubleWrapper tmp = new DoubleWrapper(); // To return cosine double sin1st = FastMath.sinAndCos(angleStart, tmp); double cos1st = tmp.val...
python
def _bokeh_quants(self, inf, sup, chart_type, color): """ Draw a chart to visualize quantiles """ try: ds2 = self._duplicate_() qi = ds2.df[ds2.y].quantile(inf) qs = ds2.df[ds2.y].quantile(sup) ds2.add("sup", qs) ds2.add("inf", ...
python
def _move_content_to(self, other_tc): """ Append the content of this cell to *other_tc*, leaving this cell with a single empty ``<w:p>`` element. """ if other_tc is self: return if self._is_empty: return other_tc._remove_trailing_empty_p() ...