All Projects → mdsol → comprehend

mdsol / comprehend

Licence: MIT license
No description or website provided.

Programming Languages

ruby
36898 projects - #4 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to comprehend

dice bag
DiceBag is a library of rake tasks for configuring web apps in the style of The Twelve-Factor App.
Stars: ✭ 19 (+46.15%)
Mutual labels:  platform, patient-mgmt
neptune-mlflow
Neptune integration with MLflow
Stars: ✭ 27 (+107.69%)
Mutual labels:  platform
hoffnung3000
Platform for decentralized, anonymized, self-curated festivals
Stars: ✭ 27 (+107.69%)
Mutual labels:  platform
openapi-generator-go
An opinionated OpenAPI v3 code generator for Go. Use this to generate API models and router scaffolding.
Stars: ✭ 42 (+223.08%)
Mutual labels:  platform
OpenIoT
Open source IoT platform for makers
Stars: ✭ 31 (+138.46%)
Mutual labels:  platform
dash-network-deploy
Tools for Dash networks deployment and testing
Stars: ✭ 17 (+30.77%)
Mutual labels:  platform
linkin
Linkin is a customizable self hosted link tree platform.
Stars: ✭ 62 (+376.92%)
Mutual labels:  platform
nebulous
The Kubefirst Open Source Platform
Stars: ✭ 122 (+838.46%)
Mutual labels:  platform
Motoro
Smart contracts for decentralized rentals of vehicles.
Stars: ✭ 96 (+638.46%)
Mutual labels:  platform
geokey
Platform for participatory mapping
Stars: ✭ 53 (+307.69%)
Mutual labels:  platform
hex
An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Stars: ✭ 48 (+269.23%)
Mutual labels:  platform
actlist
📦 Actlist is a utility platform to execute your own action list easily and simply.
Stars: ✭ 85 (+553.85%)
Mutual labels:  platform
notify
Send emails and text messages to your users if you work in Australian government
Stars: ✭ 15 (+15.38%)
Mutual labels:  platform
skeleton
Project template for starting your new project based on the Sulu content management system
Stars: ✭ 180 (+1284.62%)
Mutual labels:  platform
hapi-rate-limiter
No description or website provided.
Stars: ✭ 17 (+30.77%)
Mutual labels:  platform
hurtrade
An Open Source Forex Trading Platform
Stars: ✭ 22 (+69.23%)
Mutual labels:  platform
hermes-protocol
Definition of the Hermes protocol used by the Snips platform
Stars: ✭ 38 (+192.31%)
Mutual labels:  platform
porter
Multi-region blue-green Docker deployments and a whole lot more
Stars: ✭ 43 (+230.77%)
Mutual labels:  platform
Multiplatform-Log
Kotlin Multi Platform Logger, for android an ios : Logcat & print
Stars: ✭ 49 (+276.92%)
Mutual labels:  platform
github-cli
A CLI Tool to automate the creation of github repositories
Stars: ✭ 18 (+38.46%)
Mutual labels:  platform

Deprecated

This repository is deprecated.

The information below is left only as a reference.

comprehend

[1,2,3].comprehend{ |i| i.to_s if i<3 } == ["1","2"]

[{:type => :dog, :sound => "woof"},{:type => :tree}, {:type => :cat, :sound => "meow"}].comprehend do |o|
  o[:sound]
end == ["woof", "meow"]

Comprehend is a tiny gem that defines Array#comprehend and Array#comprehend!. Comprehend accepts 0 arguments and requires a block. It invokes the block for each element of self and returns an array of all non-nil results.

comprehend(&block) is equivalent to map(&block).compact, but is slightly faster because it only iterates once over the array. For blocks that do not modify the array in place, the result is also equivalent to select(&block).map(&block).

Array#comprehend! comprehends the array in place. Its return value is either the modified array or nil if no compacting was done, equivalent to map!(&block).compact!.

Usage

require "comprehend"

Tested on ruby-mri 1.9.3 and 2.0.0, not compatible with lower versions.

Why "comprehend"?

Invocations of comprehend will often look like Python list comprehensions. Compare the first example above to

[str(i) for i in [1,2,3] if i<3] == ['1', '2']

License

Copyright (C) 2013 Medidata Solutions Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].