Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Data processing: remove intermediate diffs

Anastasiia.Birillo edited this page Dec 7, 2020 · 3 revisions

Description

This module allows to remove intermediate diffs in the files. This means deleting all intermediate code snapshots that are collected during the writing of a code fragment.

For example, if we have three consecutive snapshots:

  • ...
  • prin
  • print
  • print(5)
  • …,

we would like to delete the first 2 fragments because these are not final states. The final state is a completed row entered by the user.

Usage

Use remove_intermediate_diffs method from intermediate_diffs_removing.py.

Argument Description
path path to a directory with files in a single language
output_directory_prefix the output directory name prefix. The default value is remove_intermediate_diffs

An example of the root input directory structure before usage:

-root
  --python
   ---task1
    ----user_N1_files
  --cpp
   ---task1
    ----user_N2_files

Clone this wiki locally