Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project4 #3246

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/Auto_Commentv2 .yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
name: Auto Commentv2
on: [issues, pull_request_target]
on: [issues, pull_request, pull_request_target] # Include pull_request here for commenting
jobs:
test:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v2
- name: 🚧 Install
- name: 🚧 Install
run: |
yarn
- name: 📦 Build
- name: 📦 Build
run: |
yarn build
- uses: ./
- uses: ./ # Ensure this points to the correct action path
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
issuesOpened: >
👋 @{{ author }}

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Thank you for raising an issue. We will investigate the matter and get back to you as soon as possible.

Please make sure you have given us as much context as possible.
pullRequestOpened: >
👋 @{{ author }}

Thank you for raising your pull request.

Please make sure you have followed our contributing guidelines. We will review it as soon as possible
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#### Name: [Ayushman Pal](https://github.com/WannaCry016)

- Place: Chennai, India
- Bio: Fullstack Developer | Mobile Game Developer | ML/AI Enthusiast
- GitHub: [WannaCry016](https://github.com/WannaCry016)

#### Name: [3mYouOL](https://github.com/3mYouOL)

- Place: Iloilo, Philippines
Expand Down
6 changes: 6 additions & 0 deletions PROJECTS/Download_images_from_websites.py/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Scrap images from URL

1. Dowmload Chrome Drive From Chrome.
2. Run scrap-img.py file `py scrap-img.py`
3. `Enter Path : E:\webscraping\chromedriver_win32\chromedriver.exe` <br/>
`Enter URL : https://dribbble.com/`
1 change: 1 addition & 0 deletions PROJECTS/Download_images_from_websites.py/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
selenium==3.141.0
59 changes: 59 additions & 0 deletions PROJECTS/Download_images_from_websites.py/scrap_img.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from selenium import webdriver
import requests as rq
import os
from bs4 import BeautifulSoup
import time

# path= E:\web scraping\chromedriver_win32\chromedriver.exe
path = input("Enter Path : ")

url = input("Enter URL : ")

output = "output"


def get_url(path, url):
driver = webdriver.Chrome(executable_path=r"{}".format(path))
driver.get(url)
print("loading.....")
res = driver.execute_script("return document.documentElement.outerHTML")

return res


def get_img_links(res):
soup = BeautifulSoup(res, "lxml")
imglinks = soup.find_all("img", src=True)
return imglinks


def download_img(img_link, index):
try:
extensions = [".jpeg", ".jpg", ".png", ".gif"]
extension = ".jpg"
for exe in extensions:
if img_link.find(exe) > 0:
extension = exe
break

img_data = rq.get(img_link).content
with open(output + "\\" + str(index + 1) + extension, "wb+") as f:
f.write(img_data)

f.close()
except Exception:
pass


result = get_url(path, url)
time.sleep(60)
img_links = get_img_links(result)
if not os.path.isdir(output):
os.mkdir(output)

for index, img_link in enumerate(img_links):
img_link = img_link["src"]
print("Downloading...")
if img_link:
download_img(img_link, index)
print("Download Complete!!")
19 changes: 19 additions & 0 deletions PROJECTS/Hashing Passwords/hashing_passwords.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- cofing: utf-8 -*-
import argparse
import hashlib

# parsing
parser = argparse.ArgumentParser(description='hashing given password')
parser.add_argument('password', help='input password you want to hash')
parser.add_argument('-t', '--type', default='sha256',choices=['sha256', 'sha512', 'md5'] )
args = parser.parse_args()

# hashing given password
password = args.password
hashtype = args.type
m = getattr(hashlib,hashtype)()
m.update(password.encode())

# output
print("< hash-type : " + hashtype + " >")
print(m.hexdigest())
1 change: 1 addition & 0 deletions PROJECTS/Info-Stealers
Submodule Info-Stealers added at 199f7e
24 changes: 24 additions & 0 deletions PROJECTS/Plagarism_Checker/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Plagarism checker

<!--Remove the below lines and add yours -->

Python script for checking the amount of similarity between two (or more) text files.

### Prerequisites

<!--Remove the below lines and add yours -->

Sklearn module
Installation:

```
$ pip install -U scikit-learn
```

### How to run the script

<!--Remove the below lines and add yours -->

```
$ python plag.py
```
36 changes: 36 additions & 0 deletions PROJECTS/Plagarism_Checker/plag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#pip install -U scikit-learn
#Make sure all the .txt files that need to be checked are in the same directory as the script
import os
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity

user_files = [doc for doc in os.listdir() if doc.endswith('.txt')]
user_notes = [open(_file, encoding='utf-8').read()
for _file in user_files]


def vectorize(Text): return TfidfVectorizer().fit_transform(Text).toarray()
def similarity(doc1, doc2): return cosine_similarity([doc1, doc2])


vectors = vectorize(user_notes)
s_vectors = list(zip(user_files, vectors))
plagiarism_results = set()


def check_plagiarism():
global s_vectors
for student_a, text_vector_a in s_vectors:
new_vectors = s_vectors.copy()
current_index = new_vectors.index((student_a, text_vector_a))
del new_vectors[current_index]
for student_b, text_vector_b in new_vectors:
sim_score = similarity(text_vector_a, text_vector_b)[0][1]
student_pair = sorted((student_a, student_b))
score = (student_pair[0], student_pair[1], sim_score)
plagiarism_results.add(score)
return plagiarism_results


for data in check_plagiarism():
print(data)
5 changes: 5 additions & 0 deletions PROJECTS/Plagarism_Checker/text1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Nature is the endless expanse of life forms, beauty, resources, peace and nourishment. Every bud that grows to a flower, every caterpillar that flies with the wings of a butterfly and every infant who faces the world as a human, owes its survival and sustenance to nature. In addition to providing resources for our daily needs of food, clothing and shelter, nature also contributes to different industries and manufacturing units. Paper, furniture, oil, gemstones, petrol, diesel, the fishing industry, electrical units, etc. all derive their basic components from nature.

It can be said that nature drives the process of converting everything that is natural on earth into most of the things that are artificial. Nature also maintains the continuity between the different spheres on Earth. Owing to the multiple elements obtained from nature, with a growing population, the need to meet demands is increasing every day. At an equal pace is rising the level of air, water, soil and noise pollution as a result of the universal dependence on technology.

While it is necessary to keep up with industrialization, it is an urgent need now to restore stability in nature. People are trying to curb the level of pollution and stop the exhaustion of natural resources. However, more awareness and implementation is a must at the individual and community levels. We must always remember it is us who depend on nature for survival and not the other way round.
5 changes: 5 additions & 0 deletions PROJECTS/Plagarism_Checker/text2.tx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Great lengths of mountains, thriving ecosystems, the ever-spreading sky together with the lithosphere, hydrosphere and atmosphere create a saga called “Nature”. Rich both in terms of its scenic beauty and replenishing resources, nature accounts for supporting life in different shapes and forms on our planet.

Every member of the living world obtains its life support from nature. Nature guides the cycling of air, water and life between the different constituents or spheres on Earth. The treasures in nature not only provide for our basic requirements of survival but also fuel the raw materials to support factories and industries on which the modern world primarily runs.

Since the population is increasing at an exponential rate largely in India and many parts of the world, the “use” of resources has now turned to depletion. Adding to this, are the excessive levels of atmospheric and environmental pollution. Industrial wastes, unchecked use of vehicles, illegal cutting of trees, poaching of animals, nuclear power plants and many more are contributing to the disruption of the natural systems and global warming.
16 changes: 16 additions & 0 deletions Python/Nmap_Scanner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import nmap

nm = nmap.PortScanner()

# scan a target host for open ports
nm.scan('localhost', arguments='-p 22,80,443')

# print the state of the ports
for host in nm.all_hosts():
print('Host : %s (%s)' % (host, nm[host].hostname()))
print('State : %s' % nm[host].state())
for proto in nm[host].all_protocols():
print('Protocol : %s' % proto)
ports = nm[host][proto].keys()
for port in ports:
print('port : %s\tstate : %s' % (port, nm[host][proto][port]['state']))
32 changes: 32 additions & 0 deletions profiles/Ayushman Pal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Ayushman Pal

### Location

Chennai, INDIA

### Academics

- Pursuing Btech in Chemical Engineering at Indian Institute of Technology, Madras

### Interests

- Learning Enthusiast
- Music
- Python
- HTML/CSS/JS
- DSA (C++)

### Skills

- DSA
- Typing(with speed more than 140WPM)
- Java
- Git & GitHub
- Python

### Projects
- [Smart FAQ Module](https://github.com/WannaCry016/SMARTFAQ-MODULE) - A Smart Faq Module that recommend Faqs based on search

### Profile Link

[Ayushman Pal](https://github.com/WannaCry016)
6 changes: 6 additions & 0 deletions scripts/hello_world_WannaCry016.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# LANGUAGE: Python
# ENV: Python 3
# AUTHOR: Ayushman Pal
# GITHUB: https://github.com/WannaCry016

print("Hello World")
Loading