Coder Social home page Coder Social logo

plagcheck's Introduction

PlagCheck โœ…

The MOSS interface package for CodeClassroom

Installation ๐Ÿ”ฎ

  1. Create virtual environment.

    Linux/MacOS

    virtualenv -p python3 venv && cd venv && source bin/activate

    Windows (PowerShell)

    py -m venv venv; .\venv\Scripts\activate;
  2. Clone the repository.

    git clone https://github.com/codeclassroom/PlagCheck.git
  3. Install dependencies.

    pip install -r requirements.txt
  4. Set-up virtual environment variables.

    1. Create a file named .env in the root directory & add the following contents.

      USER_ID = 'moss-user-id'
      
    2. For USER_ID read instructions on Moss.

  5. Run demo.py for demo.

Usage

Import the check method from PlagCheck.

import os
import pprint
from plagcheck import plagcheck

program_files = ["testfiles/test_python.py", "testfiles/test_python3.py"]
language = "python"
userid = os.environ["USER_ID"]

url, results = plagcheck.check(program_files, language, userid)


print(url)
pprint.pprint(results)

Read Documentation.

TODO

Fetch the URL and gather following results:

  • Percentage of Code Matches

  • Number of Lines Matched

  • URL itself

  • Lines Matched*

  • Return a list of dictionaries containing:

    [
      {
        "file1":"filename1.py",
        "file2":"filename2.py",
        "percentage": 34,
        "no_of_lines_matched": 3,
        "lines_matched":[["2-3", "10-11"]]
      },
    ....
    ]

Author

๐Ÿ‘ฅ Bhupesh Varshney

plagcheck's People

Contributors

bhupesh-v avatar vhsw avatar

Watchers

 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.