Returns SplitGenerators.
485886
def _split_generators(self, dl_manager):
    """"""
    path = dl_manager.manual_dir
    train_path = os.path.join(path, _TRAIN_DIR)
    val_path = os.path.join(path, _VALIDATION_DIR)

    if not tf.io.gfile.exists(train_path) or not tf.io.gfile.exists(val_path):
      msg = ("You must download the dataset folder from CheXpert"
             "website manually and place it into %s." % path)
      raise AssertionError(msg)

    return [
        tfds.core.SplitGenerator(
            name=tfds.Split.TRAIN,
            num_shards=100,
            gen_kwargs={
                "imgs_path": path,  # Relative img path is provided in csv
                "csv_path": os.path.join(path, _TRAIN_LABELS_FNAME)
            },
        ),
        tfds.core.SplitGenerator(
            name=tfds.Split.VALIDATION,
            num_shards=10,
            gen_kwargs={
                "imgs_path": path,
                "csv_path": os.path.join(path, _VALIDATION_LABELS_FNAME)
            },
        ),
    ]
923413
def _split(string, splitters):
    """"""
    part = ''
    for character in string:
        if character in splitters:
            yield part
            part = ''
        else:
            part += character
    yield part
1340700
def split_tokens(self):
        """"""
        if not self._split_tokens_calculated:
            # split into items (whitespace split)
            self._split_tokens = self._line_str.split()
            self._split_tokens_calculated = True

        return self._split_tokens
311495
def split(examples, ratio=0.8):
        
        split = int(ratio * len(examples))
        return examples[:split], examples[split:]
527085
def get_possible_splits(n):
    
    get_bin = lambda x, n: x >= 0 and str(bin(x))[2:].zfill(n) or "-" + str(bin(x))[3:].zfill(n)
    possible_splits = []
    for i in range(2**(n - 1)):
        possible_splits.append(get_bin(i, n - 1))
    return possible_splits
699776
def splits(cls, fields, root=".data", train="train.txt",
               test="test.txt", validation_frac=0.1, **kwargs):
        

        train, test = super(CoNLL2000Chunking, cls).splits(
            fields=fields, root=root, train=train,
            test=test, separator=' ', **kwargs)

        # HACK: Saving the sort key function as the split() call removes it
        sort_key = train.sort_key

        # Now split the train set
        # Force a random seed to make the split deterministic
        random.seed(0)
        train, val = train.split(1 - validation_frac, random_state=random.getstate())
        # Reset the seed
        random.seed()

        # HACK: Set the sort key
        train.sort_key = sort_key
        val.sort_key = sort_key

        return train, val, test
797762
public static <A, B> FeatureGenerator<A, B> combinedFeatureGenerator(
      FeatureGenerator<A, B>... generators) {
    return FeatureGenerators.combinedFeatureGenerator(Arrays.asList(generators));
  }
157241
def splits(self):
        "  "
        result = []

        def collect(split):
            result.append(split)

            for item in split:
                if isinstance(item, (HSplit, VSplit)):
                    collect(item)

        collect(self.root)
        return result
856047
private Iterable<PersistentNoSqlIdentifierGenerator> getPersistentGenerators() {
		Map<String, EntityPersister> entityPersisters = factory.getMetamodel().entityPersisters();

		Set<PersistentNoSqlIdentifierGenerator> persistentGenerators = new HashSet<PersistentNoSqlIdentifierGenerator>( entityPersisters.size() );
		for ( EntityPersister persister : entityPersisters.values() ) {
			if ( persister.getIdentifierGenerator() instanceof PersistentNoSqlIdentifierGenerator ) {
				persistentGenerators.add( (PersistentNoSqlIdentifierGenerator) persister.getIdentifierGenerator() );
			}
		}

		return persistentGenerators;
	}
72572
def splitlines(self, keepends=False):
        
        return [self.__class__(l) for l in self.value_colors.splitlines(keepends)]
751988
public Iterator<T> getInputSplits() {

		final InputSplitProvider provider = getEnvironment().getInputSplitProvider();

		return new Iterator<T>() {

			private T nextSplit;

			@Override
			public boolean hasNext() {

				if (this.nextSplit == null) {

					final InputSplit split = provider.getNextInputSplit();
					if (split != null) {
						@SuppressWarnings("unchecked")
						final T tSplit = (T) split;
						this.nextSplit = tSplit;
						return true;
					} else {
						return false;
					}
				} else {
					return true;
				}
			}

			@Override
			public T next() {
				if (this.nextSplit == null && !hasNext()) {
					throw new NoSuchElementException();
				}

				final T tmp = this.nextSplit;
				this.nextSplit = null;
				return tmp;
			}

			@Override
			public void remove() {
				throw new UnsupportedOperationException();
			}
		};
	}
393825
public static <A, B> FeatureGenerator<A, List<B>> productFeatureGenerator(
      FeatureGenerator<A, B>... generators) {
    return FeatureGenerators.productFeatureGenerator(Arrays.asList(generators));
  }
1128142
public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException {
    setFormat(job);
    job.setLong("mapred.min.split.size", Long.MAX_VALUE);
    return root.getSplits(job, numSplits);
  }
469817
def get_iterator(self, data, axis=0):
        
        splitter = self._get_splitter(data, axis=axis)
        keys = self._get_group_keys()
        for key, (i, group) in zip(keys, splitter):
            yield key, group
580169
def split_model(model:nn.Module=None, splits:Collection[Union[nn.Module,ModuleList]]=None):
    ""
    splits = listify(splits)
    if isinstance(splits[0], nn.Module):
        layers = flatten_model(model)
        idxs = [layers.index(first_layer(s)) for s in splits]
        return split_model_idx(model, idxs)
    return [nn.Sequential(*s) for s in splits]
491119
public static Iterable<SplitPath> getSplits(final Configuration config, Path[] paths) {
        final int splitSize = getSplitSize(config);

        return FluentIterable.from(Arrays.asList(paths))
                .transformAndConcat(new Function<Path, Iterable<? extends SplitPath>>() {
                    @Override
                    public Iterable<? extends SplitPath> apply(Path path) {
                        try {
                            EmoInputSplittable emoFs = (EmoInputSplittable) path.getFileSystem(config);
                            return emoFs.getInputSplits(config, path, splitSize);
                        } catch (IOException e) {
                            throw Throwables.propagate(e);
                        }
                    }
                });
    }
1343759
def splitterfields(data, commdct):
    """"""
    objkey = "Connector:Splitter".upper()
    fieldlists = splittermixerfieldlists(data, commdct, objkey)
    return extractfields(data, commdct, objkey, fieldlists)