Code Monkey home page Code Monkey logo

reproseed's Introduction

reproseed

A POSIX shell script to assist in guaranteeing reproducible non-deterministic computation(s).

Rationale

Many computational tools initialize some parts of computation based on random numbers. Typically the Pseudo Random Number Generators (RNG) used for that purpose could be pre-seeded, thus often (but not always, if e.g. computation is also parallelized and results depend on the order of the elements in the reduction step) making results reproducible. Typically such tools allow to specify the seed integer for their RNGs via some environment variable, but there is no agreement on the name of such a variable.

That is where reproseed comes to help. You can either specify your desired random seed in environment variable REPROSEED or it will generate a new random one. In either of those cases, it will then display that seed (so you could use it later to reproduce the results), and export corresponding environment variables with its value for other tools it is aware about (e.g., PyMVPA, AFNI, ANTs).

HOWTO

Just download reproseed.sh to your computer or install within your container, and either

  • source reproseed.sh (or . reproseed.sh) in your script before running your computation

  • execute your computation script via reproseed, e.g.

    ./reproseed.sh myscript -param1 arg1
    

reproseed's People

Contributors

yarikoptic avatar

Watchers

James Cloos avatar  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.