Simplify usage of fixed width text based data structures as one generally finds used in older apps written in languages like COBOL
BlackHoleStruct is a data structure similar to an OpenStruct allowing autovivification.
The package contains a functionality related to the C source code generation, including generation of the strongly-typed data structures (vectors, lists, maps etc.) in a manner provided by the C++'s STL library.
BitStream is a mixin to write data structures of bit streams such as picture, music, movie files, and e.t.c.. You can refer contents of bit streams even when you are defining the data structures. With the function, you can write a data structure easily that the header contains the data length of the body field.
Deeply access nested Hash/Array data structures without checking for the existence of every node along the way.
DataStructures101 is a simple gem that groups several implementations of common data structures usually taught in Computer Science courses.
A ruby implementation of the canonical serialization for the Libra network. Canonical serialization guarantees byte consistency when serializing an in-memory data structure. It is useful for situations where two parties want to efficiently compare data structures they independently maintain. It happens in consensus where independent validators need to agree on the state they independently compute. A cryptographic hash of the serialized data structure is what ultimately gets compared. In order for this to work, the serialization of the same data structures must be identical when computed by independent validators potentially running different implementations of the same spec in different languages.
Rulix lets you fold complex rulesets onto complex data structures; useful for validation, data sanitization, and mutation.
Dump and restore PostgreSQL's structure and data.
A Rope is a convenient data structure for manipulating large amounts of text. This implementation is inspired by http://www.rubyquiz.com/quiz137.html and https://rubygems.org/gems/cord
An ActiveModel extension to model your semi-structured data using embedded associations
Meta Reports provides a meta language and data structure to create a 'meta' report. This report can then be exported into any format desired. MR provides HTML, PDF, and XLSX exports built in.
The aim of this project is to provide some basic rails helpers to render structured data inside web-pages.
Parse a 3D obj file to a ruby data structure. Can compute tangent per vertex. Can merge vertice, normals, and textures indexes into a single index for OpenGL use case.
API data structure generated from Markdown files
==== Topic Maps for Rails (rtm-rails) RTM-Rails is the Rails-Adapter for Ruby Topic Maps. It allows simple configuration of topicmaps in config/topicmaps.yml. ==== Overview From a developer's perspective, RTM is a schema-less database management system. The Topic Maps standard (described below) on which RTM is based provides a way of creating a self-describing schema just by using it. You can use RTM as a complement data storage to ActiveRecord in your Rails apps. ==== Quickstart - existing Rails project jruby script/generate topicmaps Run the command above after installing rtm-rails. This will create * a minimal default configuration: config/topicmaps.yml and * a file with more examples and explanations config/topicmaps.example.yml * a file README.topicmaps.txt which contains more information how to use it and where to find more information * an initializer to load the topicmaps at startup * a rake task to migrate the topic maps backends in your rails application. ==== Quickstart - new Rails project For a new Rails application these are the complete initial steps: jruby -S rails my_topicmaps_app cd my_topicmaps_app jruby -S script/generate jdbc jruby -S script/generate topicmaps # The following lines are necessary because Rails does not have a template # for the H2 database and Ontopia does not support the Rails default SQLite3. sed -e "s/sqlite3/h2/" config/database.yml > config/database.yml.h2 mv config/database.yml.h2 config/database.yml # Prepare the database and then check if all is OK jruby -S rake topicmaps:migrate_backends jruby -S rake topicmaps:check ==== Usage inside the application When everything is fine, let's create our first topic: jruby -S script/console TM[:example].get!("http://example.org/my/first/topic") # and save the topic map TM[:example].commit Access the configured topic maps anywhere in your application like this: TM[:example] To retrieve all topics, you can do TM[:example].topics To retrieve a specific topic by its subject identifier: TM[:example].get("http://example.org/my/topic") Commit the changes to the database permanently: TM[:example].commit ... or abort the transaction: TM[:example].abort More information can be found on http://rtm.topicmapslab.de/ ==== Minimal configuration default: topicmaps: example: http://rtm.topicmapslab.de/example1/ The minimal configuration creates a single topic map, named :example with the locator given. This topic map will be persisted in the same database as your ActiveRecord connection if not specified otherwise. The default backend is OntopiaRDBMS (from the rtm-ontopia gem). A more complete configuration can be found in config/topicmaps.example.yml after running "jruby script/generate topicmaps". It also includes how to specifiy multiple connections to different data stores and so on. ==== Topic Maps Topic Maps is an international industry standard (ISO13250) for interchangeably representing information about the structure of information resources used to define topics, and the relationships between topics. A set of one or more interrelated documents that employs the notation defined by this International Standard is called a topic map. A topic map defines a multidimensional topic space - a space in which the locations are topics, and in which the distances between topics are measurable in terms of the number of intervening topics which must be visited in order to get from one topic to another, and the kinds of relationships that define the path from one topic to another, if any, through the intervening topics, if any. In addition, information objects can have properties, as well as values for those properties, assigned to them. The Topic Maps Data Model which is used in this implementation can be found on http://www.isotopicmaps.org/sam/sam-model/. ==== License Copyright 2009 Topic Maps Lab, University of Leipzig. Apache License, Version 2.0
redis-structured-multi is an extension to the redis gem's Redis#multi that allows data structures to be built from the as-yet-unreturned values of the calls to Redis that occur within the #multi block.
Generate and produce ranges in scale data structures in the graph
Have you ever wanted to YAML dump, Zlib compress, and Blowfish encrypt your data structures? YOU HAVE!? Well...
Lulu merges the closest overlapping pair of map markers into a one whose area is the sum of the original two, located at their centroid. It repeats this until no overlaps remain. Some interesting data structures make this quite fast for all but pathologically bad data. Markers can be circles or squares. The user may provide a scale factor allowing the marker radius to have a different scale than distance between markers.
Parse BgMax transaction files from Bankgirot and return a simple data structure
Examples of immutable data structures and functional programming in Ruby
Representation of an error as a data structure
Forester is a library to work with tree data structures.
Forestify brings a tree data-structure to your Active Record models
Union Find is an algorithm that uses a disjoint-set data structure. It allows us to efficiently connect any items of a given list and to efficiently check whether two items of this list are connected (any degree of separation) or not.
A Ruby library of functions to access and manipulate hash data structures.
FLVTool2 is a manipulation tool for Macromedia Flash Video files (FLV). It can calculate a lot of meta data, insert an onMetaData tag, cut FLV files, add cue points (onCuePoint), show the FLV structure and print meta data information in XML or YAML.
Check for differences between two JSON strings (or Ruby data structures parsed from them), now in an RSpec matcher
# Chef Data Region ## Description Chef Data Region extends the `Chef::DSL::DataQuery` module's `data_bag_item` method with the ability to dynamically expand the data bag name in a configurable, environment-specific manner. ## Motivation This gem exists to address the following scenario: An organization maintains data in Chef data bag items. The data is deployed to several data center environments and is stored in data bags whose names reference the environments. The organization wants to write environment-agnostic recipes that access the data bags without explicitly referencing the data bags by their environment names. As a concrete example, imagine the organization maintains encrypted data for three deployment environments: development, staging, and production. It maintains this data in three data bags, one for each environment, with data for services named `gadget` and `widget` in items: | Environment | Bag | Item | |-------------+----------------+--------| | Development | secure-dev | gadget | | Development | secure-dev | widget | | Production | secure-prod | gadget | | Production | secure-prod | widget | | Staging | secure-staging | gadget | | Staging | secure-staging | widget | The items are encrypted with a key unique to that environment to maximize security. Now consider how a recipe would access these bags. When then recipe is running, it needs to know the data center environment in order to construct the bag name. The organization would most likely assign the enviroment name to a node attribute. In a naive implementation, each recipe would include logic that examined the attribute's value to determine which bag to load. This would obviously duplicate code. Imagine instead that the organization wants to reference the bag by the name `secure` and rely on an _abstraction_ to translate `secure` into the environment-specific bag name. This gem provides that abstraction. ## Features This gem overrides the `data_bag_item` method with configurable logic that dynamically decides which bag to load. It retains API compatibility with `Chef::DSL::DataQuery#data_bag_item`, so existing recipes that call `data_bag_item` work without modification. The gem imposes no constraints on data bag item structure. ## Configuration Assign the region name to a node attribute that varies by environment: node.default['local'][region'] = 'staging' Add the following configuration to Chef Client's `client.rb` file. * Require the gem: require 'chef/data_region' * Configure the gem with a hash that maps a bag name to an expansion pattern: Chef::DataRegion.add( 'secure', { attribute: %w(local region), pattern: 'secure-%<attribute>s' } ) ## Bag name expansion The gem expands bag names using Ruby's `format` method. _More pending..._
Parses APC (Advanced PHP Cache) HTML status output from apc.php, included in a recent versions of PHP, into a data structure that is usable by ruby.
Hitsuji is a library that implements a tree data structure, where each node is represented by a value, points to other values, or performs a function on some values. When the tree is updated, the inputs to the functions will change, hence changing the outputs, eventually propagating the update through the entire tree. Data structures can also be exported to disk, allowing for wide applications of this software, e.g. handling big data, managing content, etc.
Plist is a library to manipulate Property List files, also known as plists. It can parse plist files into native Ruby data structures as well as generating new plist files from your Ruby objects.
Pure Ruby YANG parser and tree structure data store implementation
The gem contains various implementations of known and uknown data structures and algorithms. /Currently the gem contains: #stack, #queue, #deque, #binary_heap, #priority_queue, #linked_list, #double_linked_list/
Bubble is a library for creating HTML from basic Ruby data structures.
Interval Tree Data Structure
Shared data structures and logic for interacting with the Twistage Stats service
Generate fake brazilian company structure names
Calculates algorithms and data structures for sorting and searching. Selects best one to use for particular data set. Currently supports: Bubble Sort, Insertion Sort, Selection Sort, Merge Sort, Quick Sort, Heap Sort, Stack, Queue, Linked List, Binary Search Tree
Grants equal rights for Hash like other Ruby data structures: Array, String, Integer, and Float.
An n-dim matrix data structure with fast loop, search and access
Hari is a tool to abstract complex relationships between Ruby objects onto Redis data structures. It allows for expressive querying of those relationships as well, in an easy way. It is mostly geared towards typical social networking concepts like news feeds, activity logs, friends of friends, mutual friends, and so on.
Complex documents can be challenging to author, and time-consuming to achieve high levels of internal consistency. This gem offers a Domain Specific Language to embed structured data in a markdown document and then render it into configurable tables. Note: See security implications below.
Bloom filters are fast, compact, probabalistic data structures that allow set filtering with a configurable rate of false positives. This plugin adds .bloom_filter.uniq, .bloom_filter.only([collection]), and .bloom_filter.except([collection]) to the available routes methods in Pacer.
Use this gem to specify the structure of some tabular data you want to process. The input data can be in CSV, LibreOffice, and Excel. Each row can then be passed to a block of code you define. The gem can thus be used to check, process, import data. We use it to import data into Rails application, but the gem can used in any Ruby application. The gem should be relatively easy to use, despite its name. (Dread stands for *d*ata *r*eader)
A simple gem that provides several useful implementations of data structures. Contribute at github.com/kswang2400/data-struct
The XBD gem allows you to create, load and save XBD files. XBD files are arbitrary, self-describing, hierarchical, binary data structures consisting of "tags", "attributes", and "sub-tags".
== README.md: #ScheduledResource This gem is for displaying how things are used over time -- a schedule for a set of "resources". You can configure the elements of the schedule and there are utilities and protocols to connect them: - Configuration (specification and management), - Query interfaces (a REST-like API and internal protocols to query the models), and - A basic Rails controller implementation. We have a way to configure the schedule, internal methods to generate the data, and a way to retrieve data from the client. However this gem is largely view-framework agnostic. We could use a variety of client-side packages or even more traditional Rails view templates to generate HTML. In any case, to get a good feel in a display like this we need some client-side code. The gem includes client-side modules to: - Manage <b>time and display geometries</b> with "infinite" scroll along the time axis. - <b>Format display cells</b> in ways specific to the resource models. - <b>Update text justification</b> as the display is scrolled horizontally. ## Configuration A **scheduled resource** is something that can be used for one thing at a time. So if "Rocky & Bullwinkle" is on channel 3 from 10am to 11am on Saturday, then 'channel 3' is the <u>resource</u> and that showing of the episode is a <u>resource-use</u> block. Resources and use-blocks are typically Rails models. Each resource and its use-blocks get one row in the display. That row has a label to the left with some timespan visible on the rest of the row. Something else you would expect see in a schedule would be headers and labels -- perhaps one row with the date and another row with the hour. Headers and labels also fit the model of resources and use-blocks. Basic timezone-aware classes (ZTime*) for those are included in this gem. ### Config File The schedule configuration comes from <tt>config/resource_schedule.yml</tt> which has three top-level sections: - ResourceKinds: A hash where the key is a Resource and the value is a UseBlock. (Both are class names), - Resources: A list where each item is a Resource Class followed by one or more resource ids, and - visibleTime: The visible timespan of the schedule in seconds. The example file <tt>config/resource_schedule.yml</tt> (installed when you run <tt>schedulize</tt>) should be enough to display a two-row schedule with just the date above and the hour below. Of course you can monkey-patch or subclass these classes for your own needs. ### The schedule API The 'schedule' endpoint uses parameters <tt>t1</tt> and <tt>t2</tt> to specify a time interval for the request. A third parameter <tt>inc</tt> allows an initial time window to be expanded without repeating blocks that span those boundaries. The time parameters _plus the configured resources_ define the data to be returned. ### More About Configuration Management The <b>ScheduledResource</b> class manages resource and use-block class names, id's and labels for a schedule according to the configuration file. A ScheduledResource instance ties together: 1. A resource class (eg TvStation), 2. An id (a channel number in this example), and 3. Strings and other assets that will go into the DOM. The id is used to - select a resource _instance_ and - select instances of the _resource use block_ class (eg Program instances). The id _could_ be a database id but more often is something a little more suited to human use in the configuration. In any case it is used by model class method <tt>(resource_use_block_class).get_all_blocks()</tt> to select the right use-blocks for the resource. A resource class name and id are are joined with a '_' to form a tag that also serves as an id for the DOM. Once the configuration yaml is loaded that data is maintained in the session structure. Of course having a single configuration file limits the application's usefulness. A more general approach would be to have a user model with login and configuration would be associated with the user. ## Installation Add this line to your application's Gemfile: ```ruby gem 'scheduled_resource' ``` And then execute: $ bundle Or install it yourself as: $ gem install scheduled_resource Then from your application's root execute: $ schedulize . This will install a few image placeholders, client-side modules and a stylesheet under <tt>vendor/assets</tt>, an example configuration in <tt>config/resource_schedule.yml</tt> and an example controller in <tt>app/controllers/schedule_controller.rb</tt>. Also, if you use $ bundle show scheduled_resource to locate the installed source you can browse example classes <tt>lib/z_time_*.rb</tt> and the controller helper methods in <tt>lib/scheduled_resource/helper.rb</tt> ## Testing This gem also provides for a basic test application using angularjs to display a minimal but functional schedule showing just the day and hour headers in two different timezones (US Pacific and Eastern). Proceed as follows, starting with a fresh Rails app: $ rails new test_sr As above, add the gem to the Gemfile, then $ cd test_sr $ bundle $ schedulize . Add lines such as these to <tt>config/routes.rb</tt> get "/schedule/index" => "schedule#index" get "/schedule" => "schedule#schedule" Copy / merge these files from the gem source into the test app: $SR_SRC/app/views/layouts/application.html.erb $SR_SRC/app/views/schedule/index.html.erb $SR_SRC/app/assets/javascripts/{angular.js,script.js,controllers.js} and add <tt>//= require angular</tt> to application.js just below the entries for <tt>jquery</tt>. After you run the server and browse to http://0.0.0.0:3000/schedule/index you should see the four time-header rows specified by the sample config file. ## More Examples A better place to see the use of this gem is at [tv4](https://github.com/emeyekayee/tv4). Specifically, models <tt>app/models/event.rb</tt> and <tt>app/models/station.rb</tt> give better examples of implementing the ScheduledResource protocol and adapting to a db schema organized along somewhat different lines. ## Contributing 1. Fork it ( https://github.com/emeyekayee/scheduled_resource/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
Outrider's purpose is to provide an easy-to-use programming interface and organisational structure, to create and run tasks that can automatically visit, interact with and test websites and also that process, clean and store data, and tools for statistical analysis.