Code to help with adding a tree structure to Contentful models.
This gem takes English words, converts them to their IPA equivalent, and then uses a tree data structure to query a database and identify other English words that have a similar phonetic makeup. It uses RubyTree which has the following license: "RubyTree is licensed under the BSD license. Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Anupam Sengupta (anupamsg@gmail.com). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." It also uses string_to_ipa which includes the following license from Carnegie Mellon University: "The Carnegie Mellon University Pronouncing Dictionary was used in the creation of this gem. Their copyright notice follows: Copyright (C) 1993-2015 Carnegie Mellon University. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. The contents of this file are deemed to be source code 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This work was supported in part by funding from the Defense Advanced Research Projects Agency, the Office of Naval Research and the National Science Foundation of the United States of America, and by member companies of the Carnegie Mellon Sphinx Speech Consortium. We acknowledge the contributions of many volunteers to the expansion and improvement of this dictionary. THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY 'AS IS' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
Executable to restructure .xcodeproj directory structures to match the .pbxproj tree.
Traverses your directory structure, starting at a specified location, and creates an HTML tree of your git repositories. Will also link to the origin remote if it exists.
A tree structure for NoBrainer documents using the materialized path pattern
Digests and lists all the paths through a nested dictionary
Tree and flattened array data structures for traversing an ActiveRecord model graph
Extract subtrees from XML trees, making sure that the overall structure is preserved.
The `blockify` gem solves some of the problems associated with complex hierarchical nested arrays and hashes. It is possible to represent an HTML file as a series of Arrays and Hashes with very deep levels of Hashes within Arrays within Hashes. Traversing such a tree is tricky at best. The methods of the `blockify` gem are included in Array, and Hash using a naming convention that should not compete with anything. We don't need to concern ourselves with the complexity of the structure and can instead focus on the base elements wherever they may be.
A jekyll generator which creates a site-tree consisting of all the files in the output (built) path of a jekyll website. For a site with a structure like: - /foo.md - /bar.html - /posts/2019/15/10/hello-world.md - /posts/2019/15/10/lo-and-behold.md - /assets/styles/main.scss You'll recieve an XML unordered list like: - foo - bar - posts/2019/15/10 - hello-world - lo-and-behold - assets/styles - main
This small gem contains several data structures that I have implemented in Ruby to learn how they work. Sometimes it is not enough to read the description of a data structure and accompanying pseudo-code. Actually implementing it is often helpful in understanding what is going on. It is also usually fun. The gem contains basic implementions of Disjoint Union, Heap, Priority Search Tree, and Segment Tree. See the homepage for more details.
A Splay Tree is a self adjusting binary search tree with the additional property that recently accessed elements are quick to access again. This makes it useful for caches because the most commonly accessed elements will be the fastest ones to access. This tree has an additional feature that allows it's maximum size to be restricted. When it exceeds it's maximum size, it will drop all of the nodes which are at the terminal ends of the tree structure, leaving many of the more commonly accessed nodes intact. This implementation is written in C++ with a Ruby wrapper.
In computer science, a disjoint-set data structure, also called a union–find data structure or merge–find set, is a data structure that keeps track of a set of elements partitioned into a number of disjoint (non-overlapping) subsets. It provides near-constant-time operations (bounded by the inverse Ackermann function) to add new sets, to merge existing sets, and to determine whether elements are in the same set. In addition to many other uses (see the Applications section), disjoint-sets play a key role in Kruskal's algorithm for finding the minimum spanning tree of a graph. A disjoint-set forest consists of a number of elements each of which stores an id, a parent pointer, and, in efficient algorithms, a value called the "rank". The parent pointers of elements are arranged to form one or more trees, each representing a set. If an element's parent pointer points to no other element, then the element is the root of a tree and is the representative member of its set. A set may consist of only a single element. However, if the element has a parent, the element is part of whatever set is identified by following the chain of parents upwards until a representative element (one without a parent) is reached at the root of the tree. Forests can be represented compactly in memory as arrays in which parents are indicated by their array index. Disjoint-set data structures model the partitioning of a set, for example to keep track of the connected components of an undirected graph. This model can then be used to determine whether two vertices belong to the same component, or whether adding an edge between them would result in a cycle. The Union–Find algorithm is used in high-performance implementations of unification. This data structure is used by the Boost Graph Library to implement its Incremental Connected Components functionality. It is also a key component in implementing Kruskal's algorithm to find the minimum spanning tree of a graph. Note that the implementation as disjoint-set forests doesn't allow the deletion of edges, even without path compression or the rank heuristic. Sharir and Agarwal report connections between the worst-case behavior of disjoint-sets and the length of Davenport–Schinzel sequences, a combinatorial structure from computational geometry.
Sycamore is an unordered tree data structure.
Multiroot_tree has some of the functions of a typical tree data structure. It can be used to model process, dependencies, and prerequisites.
Sycamore is an unordered tree data structure.
Allows you to create tree structures with ActiveRecord
A unified interface to store and access persisted settings of tree-structured objects
MarkdownTree is designed for developers and teams who need a simple and flexible way to document the structure of their projects. Whether you are preparing a README, documenting a codebase, or generating a project overview, MarkdownTree allows you to create a clear and organized representation of your directory structure in Markdown format. With MarkdownTree, you can: - Exclude specific folders or files from the generated structure. - Define the root directory from which to start generating the structure. - Customize the output file name to fit your documentation standards. MarkdownTree integrates seamlessly with Rails and other Ruby applications, offering an initializer for easy configuration. It is a valuable tool for maintaining clear and up-to-date project documentation.
Red-Black Tree Data Structure for Ruby
This gem for data structures
Partially Persistent Tree, based on Okasaki's 'Purely Functional Data Structures'
Awesome Data Structures such as Trees, Graphs etc