@param string            $seed
@param NetworkInterface  $network

@return static
349388
public static function newMaster($seed, NetworkInterface $network)
    {
        // Per [BIP32], the seed must be in range [16, 64].
        if ((strlen($seed) < static::MIN_SEED_BYTES) || (strlen($seed) > static::MAX_SEED_BYTES)) {
            throw new \InvalidArgumentException(
                'Invalid seed length. Length should be between 16 and 64 bytes (32 recommended).'
            );
        }

        $I = hash_hmac('sha512', $seed, static::MASTER_KEY, true);
        $IL = substr($I, 0, (strlen($I) / 2));
        $IR = substr($I, -(strlen($I) / 2));

        $secretKey = str_pad(gmp_export(gmp_import($IL)), 32, "\x0", STR_PAD_LEFT);

        Curve::ensureUsableKey(gmp_import($secretKey));

        return new ExtendedKey($secretKey, $IR, 0, "\x00\x00\x00\x00", 0, $network, true);
    }
1071146
public function seed($seed = null)
    {  
        if($seed === null) {
            $seed = 0;
        }
        
        return $this->seed = abs(intval($seed)) % 9999999 + 1;  
    }
350629
public void setWebSeeds(List<WebSeedEntry> seeds) {
        web_seed_entry_vector v = new web_seed_entry_vector();

        for (WebSeedEntry e : seeds) {
            v.push_back(e.swig());
        }

        ti.set_web_seeds(v);
    }
479432
protected function getSeedPath(InputInterface $input, OutputInterface $output)
    {
        // First, try the non-interactive option:
        $path = $input->getOption('path');

        if (!empty($path)) {
            return $path;
        }

        $paths = $this->getConfig()->getSeedPaths();

        // No paths? That's a problem.
        if (empty($paths)) {
            throw new \Exception('No seed paths set in your Phinx configuration file.');
        }

        $paths = Util::globAll($paths);

        if (empty($paths)) {
            throw new \Exception(
                'You probably used curly braces to define seed path in your Phinx configuration file, ' .
                'but no directories have been matched using this pattern. ' .
                'You need to create a seed directory manually.'
            );
        }

        // Only one path set, so select that:
        if (1 === count($paths)) {
            return array_shift($paths);
        }

        // Ask the user which of their defined paths they'd like to use:
        $helper = $this->getHelper('question');
        $question = $this->getSelectSeedPathQuestion($paths);

        return $helper->ask($input, $output, $question);
    }
89302
protected function runSeed(String $className)
	{
		if (!class_exists($className)) {
			throw new SeederNotFoundException(
				sprintf(
					'[%s] seeder class not found.',
					$className
				)
			);
		}

		$seeder = new $className();
		return $seeder->run();
	}
724136
public function createFromNode(NodeInterface $node)
    {
        $item = $this->createItem($node->getName(), $node->getOptions());
        /* @var $childNode NodeInterface */
        foreach ($node->getChildren() as $childNode) {
            $item->addChild($this->createFromNode($childNode));
        }

        return $item;
    }
1163514
public static function fromPassphrase(string $passphrase, AbstractNetwork $network = null): string
    {
        return static::fromPrivateKey(PrivateKey::fromPassphrase($passphrase), $network);
    }
513796
public static function generate($length, $seed = self::ALNUM) {
        $return = '';
        $seed = (string) $seed;
        $totalChars = mb_strlen($seed) - 1;

        for ($i = 0; $i < $length; ++$i) {
            $return .= $seed[rand(0, $totalChars)];
        }

        return $return;
    }
283991
public static void seed(long seed) {
        System.out.println("SEED="+seed);
        Prng.seed = seed;
        curRandom.setSeed(seed);
    }
1226800
public function createImage($seed = '', $file = '')
    {
        if (!$seed) {
            $seed = mt_rand() . time();
        }
        $this->seed = $seed;

        // monochrome wanted?
        if($this->ismono) {
            $this->generateMonoColor();
        }

        // create
        $image = $this->createTransparentImage($this->fullsize, $this->fullsize);
        $arcwidth = $this->fullsize;
        for ($i = $this->rings; $i > 0; $i--) {
            $this->drawRing($image, $arcwidth);
            $arcwidth -= $this->ringwidth;
        }

        // resample for antialiasing
        $out = $this->createTransparentImage($this->size, $this->size);
        imagecopyresampled($out, $image, 0, 0, 0, 0, $this->size, $this->size, $this->fullsize, $this->fullsize);
        if ($file) {
            imagepng($out, $file);
        } else {
            header("Content-type: image/png");
            imagepng($out);
        }
        imagedestroy($out);
        imagedestroy($image);
    }
154387
public function afterNodeCreate(NodeInterface $node)
    {
        if (!($nodeType = $node->getNodeType())) {
            return;
        }
        // array with [beforeNodes, childNodes, afterNodes] keys
        $config = $this->getAssistanceConfigForNodeType($nodeType->getName());

        switch ($nodeType->getName()) {
            case 'TYPO3.Neos.NodeTypes:Image':
                $this->configureImage($node, $nodeType, $config);
                break;

            case 'M12.Foundation:GridRow1Col':
            case 'M12.Foundation:GridRow2Col':
            case 'M12.Foundation:GridRow3Col':
            case 'M12.Foundation:GridRow4Col':
                $this->configureGridRow($node, $nodeType);
                break;

            case 'M12.Foundation:GridColumn':
                break; // assistance text nodes are created from $this->configureGridRow()

            case 'M12.Foundation:RevealModal':
                $this->configureLinkingButton($node, $nodeType, $config, 'htmlDataRevealId');
                break;

            case 'M12.Foundation:Dropdown':
            case 'M12.Foundation:DropdownContent':
                $this->configureLinkingButton($node, $nodeType, $config, 'htmlDataDropdownId');
                break;

            default:
                $this->configureCreateAssistanceChildNodes($node, $nodeType, $config);
                break;
        }
    }
337473
public function create($type,$seed = null)
    {
        $type = strtolower($type);
        
        # check extension list
        
        if(isset(self::$types[$type]) === true) {
            # assign platform the full namespace
            if(class_exists(self::$types[$type]) === false) {
                throw new ReverseRegexException('Unknown Generator at::'.$type);    
            }
            
            $type = self::$types[$type];
            
        } else {
            throw new ReverseRegexException('Unknown Generator at::'.$type);
        }
       
        return new $type($seed);
    }
1101774
public static function search($email, ClientInterface $client = null)
    {

        $response = (new static([], $client))
            ->getClient()
            ->setResourceKey(static::RESOURCE_NAME)
            ->send('/v1/customers/search', 'GET', ['email' => $email]);

        return static::fromArray($response, $client);
    }
353920
public function boot($graph): NetworkInterface
    {
        switch (true) {
            case (is_a($graph, Graph::class)):
                break;
            case (is_file($graph)):
                $graph = Graph::loadFile($graph);
                break;
            case is_string($graph) && is_file($graph):
                $graph = Graph::loadFile($graph);
                break;
            case (is_string($graph)):
                $graph = Graph::loadString($graph);
                break;
            default:
                throw new InvalidTypeException(
                    "Graph has to be either a Graph object or a compatible definition file/string"
                );
        }

        $graph->on(self::EVENT_ADD, [$this, 'addNode']);
        $graph->on(self::EVENT_REMOVE, [$this, 'removeNode']);
        $graph->on(self::EVENT_ADD_EDGE, [$this, 'addEdge']);
        $graph->on(self::EVENT_REMOVE_EDGE, [$this, 'removeEdge']);

        /** @todo think of caching graphs here, maybe */
        $this->graph = $graph;
        $this->loadGraph($graph);

        return $this;
    }
765368
public function getSeed($env = null, $target = null, $seed = null)
    {
        $command = ['seed:run'];
        if ($env ?: $this->hasOption('environment')) {
            $command += ['-e' => $env ?: $this->getOption('environment')];
        }
        if ($this->hasOption('configuration')) {
            $command += ['-c' => $this->getOption('configuration')];
        }
        if ($this->hasOption('parser')) {
            $command += ['-p' => $this->getOption('parser')];
        }
        if ($target) {
            $command += ['-t' => $target];
        }
        if ($seed) {
            $seed = (array)$seed;
            $command += ['-s' => $seed];
        }

        return $this->executeRun($command);
    }
1270922
public static function shuffle($array, $seed = null)
    {
        if (\is_null($seed)) {
            shuffle($array);
        } else {
            srand($seed);

            usort($array, function () {
                return rand(-1, 1);
            });
        }

        return $array;
    }
768449
public function seedModule(ModuleContainerInterface $module, array $data = [])
    {
        $className = $module->getNamespace().'\\database\\seeds\\DatabaseSeeder';

        if (!class_exists($className)) {
            return false;
        }

        $seeder = app($className, $data);
        $seeder->run();

        $this->output(sprintf('<info>Seeded %s</info> ', $module));

        return $this;
    }