Giter VIP home page Giter VIP logo

resplit's Introduction

ReSplit

An algorithm that re-splits Jupyter notebooks by merging and splitting their cells.

Repository structure

The repository has the following structure:

/resplitter/ — the implementation of ReSplit.

/data/— the storage for the datasets.

/analysis/ — the notebooks for running ReSplit and analysing the results.

/experiment/ — the code for generating the sample for the user study that we used to evaluate the algorithm.

/jupyter_experiment/ — the generated data and the code for hosting the Jupyter server for the experiment. Additionally, in survey.pdf you can find the form with the questions from the survey.

How to use

  1. Install the requirements by running

    pip install -r requirements.txt

  2. Download the data from Zenodo, unzip it, and place it in the data folder in the repository.

  3. Currently, one can run ReSplit on the entire dataset of notebooks. To start, you need to create the NotebokProcessor object and specify whеther to preform splitting, merging, or both.

    nbp = NotebookProcessor({'merge': True, 'split': True})

  4. Then, you can process a dataset using the process_notebook_dataset method or process a single notebook with the process_notebook method. For the first method, you need to provide a path for the dataset. For the second method, you need to provide the notebook as DataFrame. For both formats, please look into the provided data files.

How this works

ReSplit uses the definition-usage chain analysis of the code to find candidates to merge or split, as well as a number of heuristics to select the best among them. To see find out more about how the algorithm works, please refer to our SANER'22 paper.

Examples

TBD: we will add a number of examples here to highlight the operation of ReSplit.

Contacts

If you have any questions or suggestions about the work, feel free to create an issue or contacnt Sergey Titov at [email protected].

resplit's People

Contributors

areyde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

saeedsiddik

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.