Full featured fast rolling windows and time based rolling windows
A node.js version of unix's `tail -f` command
Tooltip and Popover Positioning Engine
Bare bones Promises/A+ implementation
A rolling time window
Rate limiter that supports a rolling window, either in-memory or backed by Redis
Throttle the parallelism of an asynchronous (promise returning) function / functions
WebRTC for React Native
Detect global variables in JavaScript using acorn
🚀 The Animated Digits component for React Native seamlessly blends a sophisticated number rotation effect with dynamic value updates, creating an engaging and interactive experience that enhances your user interfaces with a touch of elegance and exciteme
FarmHash functions compiled using Rust and WebAssembly to make them easy to use in node.js and the browser
Convert Windows backslash paths to slash paths
WebRTC for React Native
Rolling statistics
Lightweight Babel AST traversal
file streams that roll over when size limits, or dates are reached
Universal filesystem path utils
Parse JavaScript one character at a time to look for snippets in Templates. This is not a validator, it's just designed to allow you to have sections of JavaScript delimited by brackets robustly.
Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)
A simple file-logger for React Native
Returns true if the platform is windows. UMD module, works with node.js, commonjs, browser, AMD, electron, etc.
Tooltip and Popover Positioning Engine
Utilities for working with Windows Subsystem for Linux (WSL)
Rolling ball baseline correction
Compositional discrete-time state machines, after MIT 6.01 chapter 4.
Core domain models and analytics primitives for the Orderflow engine
Runtime orchestration and health supervision for the Orderflow engine
Real-time market data streaming primitives — 100K+ ticks/second ingestion pipeline
Weight-based backtesting engine for quantitative trading
Runtime intelligence for Solana: TUI + embedded HTTP/MCP server for live transaction monitoring, CU profiling, and security detection.
Transaction classification rules used by GulfWatch.
Core types, detections, and alert engine for GulfWatch.
Solana WebSocket ingest pipeline and IDL registry for GulfWatch.
HTTP, WebSocket, and Prometheus surface for GulfWatch.
Rolling maximum, minimum, and sum for streams of numerical data.
Experimental Rust implementation of the Millrace runtime.
Often Redis is used for rate limiting purposes. Usually the rate limit packages available count how many times something happens on a certain second or a certain minute. When the clock ticks to the next minute, rate limit counter is reset back to the zero. This might be problematic if you are looking to limit rates where hits per integration time window is very low. If you are looking to limit to the five hits per minute, in one time window you get just one hit and six in another, even though the average over two minutes is 3.5. This package allows you to implement a correct rolling window of threshold that's backed by ATOMIC storage in Redis meaning you can use this implementation across multiple machines and processes.
Circuit Breaker library with support for rolling-window absolute/percentage thresholds
a timeout with a rolling window that can be moved forward
In-memory Tree-like structure to store counters with rolling frame/window.
ProcessWatcher is a cross platform interface for running subprocesses safely. Unlike backticks or popen in Ruby 1.8, it will not invoke a shell. Unlike system, it will permits capturing the output. Unlike rolling it by hand, it runs on Windows.
Lumina builds packages for Linux, OS X, and Windows by bundling all the necessary tools in a native package. For Linux it builds DEB or RPM packages which require the requisite dependencies, for OS X it builds a self-contained runnable which can be placed in Applications, for Windows it rolls a Ruby interpreter and all the necessary libraries into an installer.
# StudioGame (Alec) Jogo de terminal em Ruby com **jogadores, dados, tesouros e variações de jogadores** (Clumsy e Berserk), empacotado como gem. > Nome do gem (exemplo): `studio_game_alec` --- ## 🚀 Instalação e execução ### Rodando direto do código-fonte No diretório do projeto: ```bash ruby bin/studio_game ``` Se você não passar um arquivo de jogadores via CLI, o script usa o `players.csv` que fica em `bin/` por padrão. Também funciona passando um CSV na linha de comando: ```bash ruby bin/studio_game my_favorite_players.csv ``` ### Como gem (local) Empacote e instale localmente: ```bash gem build studio_game.gemspec gem install studio_game_alec-<versao>.gem ``` Depois rode: ```bash studio_game ``` > No Windows, o executável será resolvido pelo RubyGems. Se preferir, rode: `ruby bin/studio_game`. --- ## 📁 Estrutura do projeto ``` games/ ├─ bin/ │ ├─ studio_game # script principal (tem shebang) │ └─ players.csv # CSV padrão (nome,vida) ├─ lib/ │ └─ studio_game/ │ ├─ auditable.rb │ ├─ berserk_player.rb │ ├─ clumsy_player.rb │ ├─ die.rb │ ├─ game.rb │ ├─ game_turn.rb │ ├─ loaded_die.rb │ ├─ playable.rb │ ├─ player.rb │ └─ treasure_trove.rb ├─ spec/ │ └─ studio_game/ # specs RSpec ├─ LICENSE ├─ README.md └─ studio_game.gemspec ``` - **Namespace:** todo o código vive dentro do módulo `StudioGame` para evitar colisões. - **bin/studio_game:** script CLI com shebang (`#!/usr/bin/env ruby`). Faz _fallback_ do `$LOAD_PATH` para `lib` quando usado fora da gem. - **lib/studio_game/**: código da biblioteca (classes/módulos). - **spec/**: testes RSpec. --- ## 🧩 Conceitos principais - **Player** (`player.rb`): representa um jogador com `name`, `health`, coleta tesouros e calcula `score` (= `health` + `points`). Inclui o mixin **Playable**. - **Playable** (`playable.rb`): mixin com `w00t`, `blam` e `strong?` (altera/consulta `health` via getters/setters). - **TreasureTrove** (`treasure_trove.rb`): define `Treasure = Struct.new(:name,:points)` e a constante `TREASURES`; possui `.random`. - **Die/LoadedDie** (`die.rb`, `loaded_die.rb`): rolam valores (o carregado favorece 1,1,2,5,6,6). Ambos incluem **Auditable**. - **Auditable** (`auditable.rb`): imprime “Rolled a X (DieClass)” após cada rolagem. - **Game** (`game.rb`): agrega jogadores, carrega CSV, executa rodadas, soma pontos e salva _high scores_. - **GameTurn** (`game_turn.rb`): executa a lógica de um turno para um jogador (rola dado, aplica `blam/w00t/skip` e concede tesouro). - **ClumsyPlayer / BerserkPlayer**: variações de `Player` que modificam comportamento de `w00t` e de coleta de tesouros. --- ## 🧪 Testes Rode todos os testes: ```bash rspec ``` Principais coisas testadas: - Ordenação de jogadores por `score` (usa `<=>` em `Player`). - Cálculo de `points` e `score` (soma de tesouros + vida). - Efeitos de `w00t`/`blam` e força (`strong?`). - Lógica de turno com _stubs_ de dado (`allow_any_instance_of(LoadedDie).to receive(:roll).and_return(n)`). - Comportamentos de `ClumsyPlayer` e `BerserkPlayer`. --- ## 📦 CSVs e caminhos - `bin/studio_game` resolve o CSV padrão assim: ```ruby default_player_file = File.join(File.dirname(__FILE__), 'players.csv') game.load_players(ARGV.shift || default_player_file) ``` - Você pode passar um arquivo `.csv` via CLI como primeiro argumento. Formato do CSV: ``` Moe,100 Larry,60 Curly,125 ``` --- ## 🧾 High Scores Após sair do loop, o jogo grava `high_score.txt` com as entradas ordenadas. Cada linha é formatada por `Game#high_score_entry`: ``` <nome com padding de pontos> <score> ``` --- ## 🛠️ Dicas de desenvolvimento - Use `require 'studio_game/arquivo'` quando a gem estiver instalada. - No script binário, o `begin/rescue LoadError` faz _fallback_ para `$LOAD_PATH` local, útil fora da gem. - Para debugar I/O em testes, o spec redireciona `STDOUT` (`$stdout = StringIO.new`). --- ## 📚 Licença MIT – veja o arquivo `LICENSE`.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.