Add samples in an iterable to this :class:`SampleSheet`.
490763
def add_samples(self, samples: Iterable[Sample]) -> None:
        """"""
        for sample in samples:
            self.add_sample(sample)
272004
public void addExamples(final String groupName, final ExampleData[] entries) {
		data.add(new ExampleMenuList(groupName, entries));
	}
309753
def add(self, title, values, **kwargs):
        """"""
        if not is_list_like(values) and not isinstance(values, dict):
            values = [values]
        kwargs['title'] = title
        self.raw_series.append((values, kwargs))
        return self
109244
def add_specimen(self, spec_name, samp_name=None, er_data=None, pmag_data=None):
        
        if samp_name:
            sample = self.find_by_name(samp_name, self.samples)
            if not sample:
                print("""-W- {} is not a currently existing sample.
Creating a new sample named: {} """.format(samp_name, samp_name))
                sample = self.add_sample(samp_name)
        else:
            sample = None

        specimen = Specimen(spec_name, sample, self.data_model, er_data, pmag_data)

        self.specimens.append(specimen)
        if sample:
            sample.specimens.append(specimen)
        return specimen
1266263
def insert_many(self, it):
        """"""
        unique_indexes = self._uniqueIndexes  # [ind for ind in self._indexes.values() if ind.is_unique]
        NO_SUCH_ATTR = object()
        new_objs = list(it)
        if unique_indexes:
            for ind in unique_indexes:
                ind_attr = ind.attr
                new_keys = dict((getattr(obj, ind_attr, NO_SUCH_ATTR), obj) for obj in new_objs)
                if not ind.accept_none and (None in new_keys or NO_SUCH_ATTR in new_keys):
                    raise KeyError("unique key cannot be None or blank for index %s" % ind_attr, 
                                    [ob for ob in new_objs if getattr(ob, ind_attr, NO_SUCH_ATTR) is None])
                if len(new_keys) < len(new_objs):
                    raise KeyError("given sequence contains duplicate keys for index %s" % ind_attr)
                for key in new_keys:
                    if key in ind:
                        obj = new_keys[key]
                        raise KeyError("duplicate unique key value '%s' for index %s" % (getattr(obj, ind_attr), ind_attr), 
                                       new_keys[key])
                    
        for obj in new_objs:
            self.obs.append(obj)
            for attr, ind in self._indexes.items():
                obval = getattr(obj, attr)
                ind[obval] = obj

        return self
583245
def extend(self, *args, **kwargs):
        """"""
        if len(args) > 1:
            raise TypeError('expected at most 1 arguments, got %d' % len(args))

        iterable = args[0] if args else None
        if iterable:
            if isinstance(iterable, Mapping) or hasattr(iterable, 'items'):
                for key, value in iterable.items():
                    self.append(key, value)
            elif hasattr(iterable, 'keys'):
                for key in iterable.keys():
                    self.append(key, iterable[key])
            else:
                for key, value in iterable:
                    self.append(key, value)

        for key, value in kwargs.items():
            self.append(key, value)
811765
def add(self, spec):
        
        for limit in spec.limit_to:
            if limit not in self.limit_to:
                self.limit_to.append(limit)
1146290
def sample(self, n_to_sample, **kwargs):
        
        n_to_sample = verify_positive(int(n_to_sample))

        n_remaining = self._max_iter - self.t_

        if n_remaining == 0:
            if (not self.replace) and (self._n_items == self._max_iter):
                raise Exception("All items have already been sampled")
            else:
                raise Exception("No more space available to continue sampling. "
                                "Consider re-initialising with a larger value "
                                "of max_iter.")

        if n_to_sample > n_remaining:
            warnings.warn("Space only remains for {} more iteration(s). "
                          "Setting n_to_sample = {}.".format(n_remaining, \
                          n_remaining))
            n_to_sample = n_remaining

        for _ in range(n_to_sample):
            self._iterate(**kwargs)
664328
def add_configurations(self, experiments):
        
        experiment_list = convert_to_experiment_list(experiments)
        for experiment in experiment_list:
            self._trial_generator = itertools.chain(
                self._trial_generator,
                self._generate_trials(experiment.spec, experiment.name))
348861
def setSample(self, sample):
        """"""
        if not isinstance(sample, RDD):
            raise TypeError("samples should be a RDD, received %s" % type(sample))
        self._sample = sample
372960
def itertypes(iterable):
    """"""
    seen = set()
    for entry in iterable:
        if isinstance(entry, tuple):
            for type_ in entry:
                if type_ not in seen:
                    seen.add(type_)
                    yield type_
        else:
            if entry not in seen:
                seen.add(entry)
                yield entry
88754
void addSample(StopwatchSample sample) {
		total += sample.getTotal();
		counter += sample.getCounter();

		if (min > sample.getMin()) {
			min = sample.getMin();
			minTimestamp = sample.getMinTimestamp();
		}

		if (max < sample.getMax()) {
			max = sample.getMax();
			maxTimestamp = sample.getMaxTimestamp();
		}

		active += sample.getActive();

		if (maxActive < sample.getMaxActive()) {
			maxActive = sample.getMaxActive();
			maxActiveTimestamp = sample.getMaxActiveTimestamp();
		}
	}
649836
def sample(name, reads_in_tuple):
    
    if name in [sample_x.get_name() for sample_x in __SAMPLES__]:
        rnftools.utils.error(
            "Multiple samples have the same name. Each sample must have a unique name.",
            program="RNFtools",
            subprogram="MIShmash",
            exception=ValueError,
        )

    Sample(
        name=name,
        reads_in_tuple=reads_in_tuple,
    )
    add_input(current_sample().fq_fns())
882990
def _create_examples(self, lines, set_type):
        """"""
        examples = []
        for (i, line) in enumerate(lines):
            if i == 0:
                continue
            guid = "%s-%s" % (set_type, i)
            text_a = line[3]
            text_b = line[4]
            label = line[0]
            examples.append(
                InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label))
        return examples
1328690
def addinstance(self, testfile, features, classlabel="?"):
        """"""

        features = self.validatefeatures(features)

        if self.delimiter in classlabel:
            raise ValueError("Class label contains delimiter: " + self.delimiter)


        f = io.open(testfile,'a', encoding=self.encoding)
        f.write(self.delimiter.join(features) + self.delimiter + classlabel + "\n")
        f.close()
1337845
def add_sample(self, **data):
        """"""
        missing_dimensions = set(data).difference(self.dimensions)

        if missing_dimensions:
            raise KeyError('Dimensions not defined in this series: %s'
                           % ', '.join(missing_dimensions))

        for dim in self.dimensions:
            getattr(self, dim).append(data.get(dim))
1213331
def add_extra_headers(self, sample_names):
        
        if not sample_names:
            return []
        full_headers = list(self.orient_data[sample_names[0]].keys())
        add_ons = []
        for head in full_headers:
            if head not in self.header_names:
                add_ons.append((head, head))
        return add_ons