You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a command-line interface (CLI) tool that provides secure file encryption and decryption functionalities. The tool allows users to encrypt sensitive files using a strong encryption algorithm, making the contents unreadable to unauthorized individuals. It also enables users to decrypt encrypted files, restoring them to their original state.
Install Dependencies
Step 1 : Clone the Repository
Step 2 : Change directory to File-Encrypter
cd Amazing-Python-Scripts/File-Encrypter
Step 3: run the command
pip install -r requirements.txt
Usage
Create a file with the content you want to encrypt in the same directory as the script, the run -
python script.py <file_name> encrypt
Congratulations ! The file is encrypted. You would notice that your original file is gone and replaced with a .encrypted file of the same name. To decrypt it run -
python script.py <file_name.encrypted> decrypt
For more info, run this -
python script.py --help
secret.key
This is a crucial file generated automatically when you first encrypt your file. It contained the main Encryption Key. It needs to be present in the same folder too. If you're really planning to hide some important data, better move this file somewhere else. But dont lose it.
Copy file name to clipboardExpand all lines: Plagiarism-Checker/README.md
+21-11Lines changed: 21 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,29 @@
1
-
<h3align="center">Plagiarism Checker</h3>
1
+
<h1align="center">Plagiarism Checker</h1>
2
2
3
-
## How it works <br><br>
4
-
-In order to compute the simlilarity between two text documents, the textual raw data is transformed into vectors.
5
-
-Then it is transformed into arrays of numbers and then from that by using a basic knowledge vector to compute the the similarity between them.
3
+
## Introduction <br>
4
+
-Plagiarism checking/detection is the identification of similarities between texts and establishing if one text is derived from another, and it may be used to spot situations of academic dishonesty or unauthorised copying.
5
+
-This code analyses the textual data and looks for possible instances of plagiarism using TF-IDF (Term Frequency-Inverse Document Frequency) vectorization and cosine similarity.
1. There are four text documents in the repository.
12
+
2. The paths to text files that are located in the same directory as the code file are loaded at the beginning of the code. It recognises and records the paths of all files with the **.txt** extension in the **student_files** list.
13
+
3. Next, the code reads the contents of each text file and stores them in the **student_notes** list.
14
+
4.**The TfidfVectorizer** class from scikit-learn is used by the **vectorize** function to perform TF-IDF vectorization on a list of text documents. The relative relevance of each term in a document in relation to the corpus of texts is captured by the TF-IDF, a numerical representation of textual data. The function returns arrays of numbers that represent the documents' TF-IDF vectors.
15
+
5. The **similarity** function computes the cosine similarity between two document vectors. Cosine similarity measures the cosine of the angle between two vectors and is commonly used to compare the similarity of documents represented as vectors. The function returns the similarity score between the two input vectors.
16
+
6. The code with the help of the **vectorize** function vectorizes the textual data, converting it to numerical arrays using TF-IDF representation.
17
+
7. The vectorized data is then paired with their corresponding student files and stored in the **s_vectors** list.
18
+
8. The **check_plagiarism** function compares the vectorized documents of each pair of students using cosine similarity. It iterates through each student's vector and compares it with the vectors of all other students. For each pair of students, it computes the similarity score using the **similarity** function and stores the student pair and their similarity score in the **plagiarism_results** set.
19
+
9. And at last the code loops through the **plagiarism_results** set and prints the student pairings along with their similarity ratings.
11
20
12
-
## Running the app <br>
13
-
- There are four text documents in the repository.
14
-
- Basically the code will compare all the .txt files and check for any similarity.
21
+
- $ python plagiarism.py
15
22
16
-
$ python plagiarism.py
23
+
## Notes <br>
24
+
- Please make sure the text files are readable and contain textual processable data.
25
+
- The text files must be in the same directory as the code file.
26
+
- If not need to provide the appropriate path in the **student_files** section of the code.
0 commit comments