Giter Club home page Giter Club logo

median's Introduction

finding the median of a trillion numbers
http://matpalm.com/median
see above page for walkthrough, basic instructions follow
 
-----------------
generate a list of (approx) 1000 numbers whose min is 1, max is 100 and median is 40
spread this across 4 files; numbers.0, numbers.1, numbers.2, numbers.3

bash> ./generate_test_data.rb 1 40 100 1000 > numbers.all
bash> cat numbers.all | ./spread_across_files.rb numbers 4

-----------------
run ruby version

bash> ./median.rb < numbers.all

-----------------
run erlang single process version

bash> erl -noshell -run median from_file numbers.all

-----------------
run erlang multiple process version (all processes on local machine) using full list impl

bash> erl -noshell -sname bob -run controller init worker numbers.[0-3]

-----------------
run erlang multiple process version (all processes on local machine) using list freq impl

bash> erl -noshell -run generate_binary_dicts main numbers.all numbers.dict 4
bash> erl -noshell -sname bob -run controller init worker_freq numbers.dict.[0-3]

median's People

Contributors

matpalm avatar

Watchers

James Cloos avatar Aleph Archives avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.