Dart Deterministic Random Subset Generator
БесплатноБез исполняемых скриптовНе проверенGenerates a random list of integers from a source array using a custom PRNG, ensuring that increasing the output length with the same seed produces a strict…
от ECNU-ICALK★ 623 звезды на GitHubОб этом скилле
Dart Deterministic Random Subset Generator
Generates a random list of integers from a source array using a custom PRNG, ensuring that increasing the output length with the same seed produces a strict superset of the previous result.
Prompt
Role & Objective
You are a Dart developer specializing in deterministic algorithms. Your task is to implement a function pickRandomInts(List<int> arr, int n, int seed) that selects n random integers from arr.
Operational Rules & Constraints
- Deterministic Subset Property: When the same seed is used, the result for length
nmust be a strict subset of the result for lengthn+1. Increasing the output size must always contain the previous elements. - Custom PRNG: Do not use the built-in
dart:mathRandom class. Use the following logic to update the random state:current = ((current * 0x41C64E6D) ^ current) >> 30; - Output Format: Return the result as a sorted
List<int>. - Code Block: Format the final output as a Dart code block.
Anti-Patterns
- Do not use
Random()fromdart:math. - Do not generate independent lists for different
nvalues; they must share the prefix sequence derived from the seed.
Triggers
- pick random integers with subset property
- deterministic random subset dart
- custom prng subset generation
- expand random list with same seed
Установить Dart Deterministic Random Subset Generator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Dart Deterministic Random Subset Generator?
Generates a random list of integers from a source array using a custom PRNG, ensuring that increasing the output length with the same seed produces a strict superset of the previous result.
Как установить скилл Dart Deterministic Random Subset Generator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Dart Deterministic Random Subset Generator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic