All Projects → hopsoft → pipe_envy

hopsoft / pipe_envy

Licence: MIT license
Elixir style pipe operator for Ruby

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to pipe envy

data-algorithms-with-spark
O'Reilly Book: [Data Algorithms with Spark] by Mahmoud Parsian
Stars: ✭ 34 (-26.09%)
Mutual labels:  data-transformation
daany
Daany - .NET DAta ANalYtics .NET library with the implementation of DataFrame, Time series decompositions and Linear Algebra routines BLASS and LAPACK.
Stars: ✭ 49 (+6.52%)
Mutual labels:  data-transformation
tutorials
Short programming tutorials pertaining to data analysis.
Stars: ✭ 14 (-69.57%)
Mutual labels:  data-transformation
optimus
🚚 Agile Data Preparation Workflows made easy with Pandas, Dask, cuDF, Dask-cuDF, Vaex and PySpark
Stars: ✭ 1,351 (+2836.96%)
Mutual labels:  data-transformation
datapackage-m
Power Query M functions for working with Tabular Data Packages (Frictionless Data) in Power BI and Excel
Stars: ✭ 26 (-43.48%)
Mutual labels:  data-transformation
zingg
Scalable identity resolution, entity resolution, data mastering and deduplication using ML
Stars: ✭ 655 (+1323.91%)
Mutual labels:  data-transformation
serializer-benchmark
A PHP benchmark application to compare PHP serializer libraries
Stars: ✭ 14 (-69.57%)
Mutual labels:  data-transformation
cq
Clojure Command-line Data Processor for JSON, YAML, EDN, XML and more
Stars: ✭ 111 (+141.3%)
Mutual labels:  data-transformation
bamboolib binder template
bamboolib - template for creating your own binder notebook
Stars: ✭ 19 (-58.7%)
Mutual labels:  data-transformation
dry-transformer
Data transformation toolkit
Stars: ✭ 59 (+28.26%)
Mutual labels:  data-transformation
pycsvw
A tool to read CSV files with CSVW metadata and transform them into other formats.
Stars: ✭ 32 (-30.43%)
Mutual labels:  data-transformation
php-serializer
Serialize PHP variables, including objects, in any format. Support to unserialize it too.
Stars: ✭ 47 (+2.17%)
Mutual labels:  data-transformation
dynamic.yaml
DEPRECATED: YAML-based data transformations
Stars: ✭ 14 (-69.57%)
Mutual labels:  data-transformation
LDWizard
A generic framework for simplifying the creation of linked data.
Stars: ✭ 17 (-63.04%)
Mutual labels:  data-transformation
gallia-core
A schema-aware Scala library for data transformation
Stars: ✭ 44 (-4.35%)
Mutual labels:  data-transformation
clojure-dsl-resources
A curated list of Clojure resources for dealing with domain-specific languages.
Stars: ✭ 99 (+115.22%)
Mutual labels:  data-transformation
naas
⚙️ Schedule notebooks, run them like APIs, expose securely your assets: Jupyter as a viable ⚡️ Production environment
Stars: ✭ 219 (+376.09%)
Mutual labels:  data-transformation
richflow
A Node.js and JavaScript synchronous data pipeline processing, data sharing and stream processing library. Actionable & Transformable Pipeline data processing.
Stars: ✭ 17 (-63.04%)
Mutual labels:  data-transformation
wrangler
Wrangler Transform: A DMD system for transforming Big Data
Stars: ✭ 63 (+36.96%)
Mutual labels:  data-transformation
fastverse
An Extensible Suite of High-Performance and Low-Dependency Packages for Statistical Computing and Data Manipulation in R
Stars: ✭ 123 (+167.39%)
Mutual labels:  data-transformation

Lines of Code Code Status Dependency Status Build Status Coverage Status Downloads

Sponsor

PipeEnvy

WARNING

This lib is experimental & is probably not a good idea.

PipeEnvy overrides the pipe operator | on Array & Integer. It also adds it to Object.

Fun Stuff

Elixir's pipe operator is very cool & supports intuitive reasoning about data transformations similar to Unix pipelines.

"Elixir Rocks" |> String.upcase |> String.split # => ["ELIXIR", "ROCKS"]

Rubyists can now enjoy this same mental model of data transformation.

gem install pipe_envy
require "pipe_envy"

# refinements that apply extensions to Object, Array, & Integer in the current scope
using PipeEnvy

"Ruby Rocks" | :upcase | :split # => ["RUBY", "ROCKS"]

Here's a more sophisticated albeit contrived example. Notice that methods which require arguments are piped as Arrays.

magic = (1..100) \
  | :to_a \
  | [:select!, -> (i) { i.even? }] \
  | [:map, -> (i) { i ** 10 }] \
  | :sum \
  | Math.method(:sqrt) \
  | :to_s \
  | :chars \
  | :reverse \
  | [:[], 3] \
  | :to_i

# => 7

Be sure to check out Chainable Methods which offers similar behavior.

Here's another example similar to the one on the chainable_methods repo.

magic = "foo bar http://github.com/hopsoft/pipe_envy foo bar" \
  | URI.method(:extract) \
  | :first \
  | URI.method(:parse) \
  | :open \
  | :readlines \
  | :join \
  | Nokogiri::HTML.method(:parse) \
  | [:css, "h1"] \
  | :first \
  | :text \
  | :strip

# => "hopsoft/pipe_envy"
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].