Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use the MOSS script?

Tags:

perl

I am trying to run MOSS on my Mac OS X and I don't know what mistake I am making. I am not sure whether I am running the command properly or not. I downloaded this file as 'moss', gave this execution permissions and tried to run following:

./moss -l python -c "Assignment 1" -d assignment1/

I got the response as

Checking files . . . 
OK

Which is wrong. The assignment1 directory has 4 python scripts. Two files are exactly similar, in one I have rearranged the code and in another I have changed the variable names.

I have sent the email for registration and I have not received any reply. So I am running the code with default user ID.

I also tried running it with sending each of those python files instead of working on a directory, still I get same response.

./moss -l python -c "Assignment 1" 1.py 2.py 3.py 4.py
like image 842
avi Avatar asked Jan 03 '14 13:01

avi


2 Answers

Steps to get going with MOSS on your Mac:

  1. Send an email at [email protected] with the mail body containing the email you want to register. Eg: registeruser mail "username@domain" <-- your email

  2. You will then get a reply containing the script that you will need to save as “moss.pl”. Just make sure that your Mac has the “perl” folder within the “/usr/bin/“ folder. Else, change the path of the perl folder on the very first line of the script to be compatible to your machine.

  3. Now set the execute permission using the command “chmod ug+x moss.pl”. This should allow you to send your queries to the Stanford server. If you were to not execute this command then you may be denied the permission to submit any queries.

  4. Now submit the query to the server using the command similar to the following (note the command is not restricted to a single flag (i.e. -l)….refer the comments in the script for USAGE instructions): “./moss.pl -l python file_1.py file_2.py

The result on submitting a query such as above would be:

Checking files . . . OK Uploading file_1.py ...done. Uploading file_2.py ...done. Query submitted. Waiting for the server's response. http://moss.stanford.edu/results/282371307.


Just review if you have followed all the steps above. I, then, don't see you having any issues getting the results. Maybe you were facing issues bcoz you were not registered initially.

like image 123
Aditya Pulekar Avatar answered Oct 16 '22 16:10

Aditya Pulekar


Seems one should be registered to use it, instructions weren't clear on the site. I received the email finally with userid and ran the script, this time it worked.

like image 20
avi Avatar answered Oct 16 '22 16:10

avi