a simle lib help you transfer data struct (array, hash array, array hash) to html table
This is improved from rails-settings, added caching. Settings is a plugin that makes managing a table of global key, value pairs easy. Think of it like a global Hash stored in you database, that uses simple ActiveRecord like methods for manipulation. Keep track of any global setting that you dont want to hard code into your rails app. You can store any kind of object. Strings, numbers, arrays, or any object. Ported to Rails 3!
This is improved from rails-settings, added caching. Settings plugin for Rails that makes managing a table of global key, value pairs easy. Think of it like a global Hash stored in you database, that uses simple ActiveRecord like methods for manipulation. Keep track of any global setting that you dont want to hard code into your rails app. You can store any kind of object. Strings, numbers, arrays, or any object.
This is not a serious project! It's just for fun! This is a simple key-value store that you can use just like a hash table, but it's also safed to you hard drive.
Settings is a plugin that makes managing a table of global key, value pairs easy. Think of it like a global Hash stored in you database, that uses simple ActiveRecord like methods for manipulation. Keep track of any global setting that you dont want to hard code into your rails app. You can store any kind of object. Strings, numbers, arrays, or any object. Ported to Rails 3!
# Procer **NOTE: Experimental. Use it to experience what a default `to_proc` could have been. For production code, I recommend an explicit transformation, like the one provided by the gem `jgomo3-func`**. A reasonable good default `to_proc` method for all objects. Install with: ``` gem install procer ``` When you require Procer, all objects will have a default `to_proc` method which will try to call one of the following methods, in the given order: - `call` - `[]` - `===` Many methods which receive a block, can benefit greatly from this because you can now pass an object to perform the block role. Think of the Enumerable module and all its methods. Many objects define `===`, but not `to_proc`. So they will be nicely usable in a `case/when` expression, but not in other contexts. This is the case of classes and ranges, which you can use in `case/when` expressions, but they don't define `to_proc`. Now they do define `to_proc` so they are useful in those contexts. Examples: ```ruby require 'procer' [1, 2, '3', '4', 5, 6].filter(&Numeric) # => [1, 2, 5, 6] [-10, 100, -2, 3, 20, -33].filter(&(0..50)) # => [3, 20] ``` Also, Hashes already implement `to_proc` and that is useful with Enumerator. We can use it as a transformation table with `map`: ```ruby table = { 1 => 'one', 2 => 'two', 3 => 'three' } [3, 1, 2].map(&table) # => ['three, 'one, 'two'] ``` Sadly, Arrays, even when they have the same interface as hashes as a function of indices, don't implement `to_proc` and so they can't be used in the same way. Until now. ```ruby table = ['zero', 'one', 'two'] [2, 0, 1].map(&table) # => ['two', 'zero', 'one'] ``` Alternatively, you could have used `values_at`: ```ruby table.values_at([3, 1, 2]) # In the Hash example table.values_at([2, 0, 1]) # In the Array example ``` But the map solution is more generic and `table` can be anything that implements `to_proc` and not something that necessarily implements `values_at`. Notice that if the object implements `[]` that will triumph over `===`. It was unexpected when I tried to use Integers as the object, as they implement `[]` as a way to access their binary form: ```ruby 5 # b101 [5[2], 5[1], 5[0]] # [1, 0, 1] ``` So the proc will work like that: ```ruby [2, 4, 5].map(&5) # Actual => [1, 0, 0] # I was expecting => [false, false, true] ```
Joins a list of hashes to the records of an ActiveRecord relation as a virtual table, selecting its values onto the records.
kiosk-pow-equihash is the shipped default proof-of-work backend for the Kiosk framework: a pure-Ruby Equihash (Biryukov & Khovratovich birthday- collision PoW) VERIFIER built on kiosk-pow, which holds the pure-Ruby BLAKE2b-256. The gem depends on neither kiosk-core nor Rails. `Kiosk::Pow::Equihash.verify(salt:, params:, nonce:)` recomputes the 2^k BLAKE2b-256 hashes named by the proof's indices, checks that they XOR to zero over all n bits, and walks the Wagner collision tree (per-level XOR cancellation plus the Zcash-canonical subtree ordering that pins one canonical form per solution). Difficulty is set by (n, k) alone — there is no post-hoc target check. Default parameters are n=168, k=7, chosen by the benchmark in bench/: the largest params whose reference solve stays inside a consumer-laptop budget (p95 ~10 s on one M-series laptop core, the only hardware the seconds have ever been measured on; the ~1.3 GiB peak is THIS solver's table, not the host's -- and not a floor (n, k) imposes on every implementation, since a memory-optimised solver trades it for time) while verify costs 128 BLAKE2b evaluations — ~22 ms and a few KB in pure Ruby without YJIT. That asymmetry is the point: the gem prices a request, it does not equalise hardware. Equihash is neither ASIC- nor GPU-proof (it was ASIC'd on Zcash); abuse resistance comes from the reputation policy's N-proofs knob and caps, not from this algorithm. Ships the provider-side verifier only. A reference Python + numpy solver (solve.py) rides along for parity testing and for assistants that need one; production solving is the client's concern.
Encodes Ruby hashes, arrays, dates and your own objects into TOON, the token-efficient format for LLM prompts: tables for uniform arrays, quotes only where needed. The only Ruby TOON gem that passes all of the current spec's encode fixtures; its version tracks the spec it implements, and anything it cannot represent raises an error so your data arrives complete.
MurmurHash generates fast, non-cryptographic hashes using the MurmurHash3 algorithm. Ideal for hash tables, data partitioning, bloom filters, and checksums where cryptographic security isn't needed.
Swiss Table hash map as a Ruby C extension
Format data as terminal tables with Unicode, ASCII, Markdown, or compact styles. Build from arrays, hashes, or CSV. Export to CSV and HTML. Sort, filter, and add rows incrementally, with column alignment, auto-sizing, truncation, and ANSI color-safe width calculation.
Lite3::DBM is an object that behaves like a Ruby Hash but stores its data in a SQLite3 database table. It is a drop-in replacement for DBM. Values are optionally serialized with YAML or Marshal, allowing (almost) any Ruby type to be stored. In addition, there is rudimentary support for transactions with emphasis on simplicity and safety. This is the JRuby version of dbmlite3; it is identical to the MRI version except for its dependencies.