diff --git a/.github/workflows/checker.yml b/.github/workflows/checker.yml
new file mode 100644
index 0000000..b78dcce
--- /dev/null
+++ b/.github/workflows/checker.yml
@@ -0,0 +1,38 @@
+name: PR has a valid Issue?
+
+on:
+ pull_request_target:
+ types: [ edited, synchronize, opened, reopened ]
+
+jobs:
+ checker:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Issue Validator
+ uses: HarshCasper/validate-issues-over-pull-requests@v0.1.1
+ id: validator
+ with:
+ prbody: ${{ github.event.pull_request.body }}
+ prurl: ${{ github.event.pull_request.url }}
+
+ - name: PR has a valid Issue
+ if: ${{ steps.validator.outputs.valid == 1 }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ PRNUM: ${{ github.event.pull_request.number }}
+ run: |
+ gh pr edit $PRNUM --add-label "PR:Ready-to-Review"
+ gh pr edit $PRNUM --add-label "hacktoberfest-accepted"
+ gh pr edit $PRNUM --remove-label "PR:No-Issue"
+
+ - name: PR has no valid Issue
+ if: ${{ steps.validator.outputs.valid == 0 }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ PRNUM: ${{ github.event.pull_request.number }}
+ run: |
+ gh pr comment $PRNUM --body "PR is not linked to any issue, please make the corresponding changes in the body."
+ gh pr edit $PRNUM --add-label "PR:No-Issue"
diff --git a/README.md b/README.md
index cd4b662..4c794a2 100644
--- a/README.md
+++ b/README.md
@@ -116,21 +116,28 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Montek
+
+
+
+
+ Samuel Jonathan
+
+ |
Agnish Ghosh
- |
+
+
Sawan Bhattacharya
- |
-
+
@@ -165,15 +172,15 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Dishant Nagpal
- |
+
+
Siddhesh Bhupendra Kuakde
- |
-
+
@@ -181,6 +188,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Aswin Shailajan
|
+
+
+
+
+ Null
+
+ |
@@ -195,6 +209,14 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Srinjoy Pati
|
+
+
+
+
+ Aarya Chopkar
+
+ |
+
@@ -215,8 +237,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Sarthak Roy
- |
-
+
@@ -237,14 +258,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Null
- |
-
-
-
-
- Null
-
- |
+
+
@@ -252,14 +267,20 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Yash Nilesh Brid
|
+
+
+
+
+ Michele Mazza
+
+ |
Null
- |
-
+
diff --git a/scripts/Crawl Google Results/README.md b/scripts/Crawl Google Results/README.md
new file mode 100644
index 0000000..17fe464
--- /dev/null
+++ b/scripts/Crawl Google Results/README.md
@@ -0,0 +1,9 @@
+# Crawl Google results
+This is a simple script that lets you collect results provided by Google.
+
+## Usage
+
+* 3 packages required requests, BeautifulSoup and fake_useragent
+* Use `pip install requests`, `pip install bs4` and `pip install fake_useragent`
+* Add path to your csv file and output excel file WITH EXTENSTION `.csv` and `.xlsx`
+* Run `python main.py "query search"`
diff --git a/scripts/Crawl Google Results/main.py b/scripts/Crawl Google Results/main.py
new file mode 100644
index 0000000..8937182
--- /dev/null
+++ b/scripts/Crawl Google Results/main.py
@@ -0,0 +1,24 @@
+import sys
+import webbrowser
+
+import requests
+from bs4 import BeautifulSoup
+from fake_useragent import UserAgent
+
+if __name__ == "__main__":
+ print("Googling.....")
+ url = "https://www.google.com/search?q=" + " ".join(sys.argv[1:])
+ res = requests.get(url, headers={"UserAgent": UserAgent().random})
+ # res.raise_for_status()
+ with open("project1a.html", "wb") as out_file: # only for knowing the class
+ for data in res.iter_content(10000):
+ out_file.write(data)
+ soup = BeautifulSoup(res.text, "html.parser")
+ links = list(soup.select(".eZt8xd"))[:5]
+
+ print(len(links))
+ for link in links:
+ if link.text == "Maps":
+ webbrowser.open(link.get("href"))
+ else:
+ webbrowser.open(f"http://google.com{link.get('href')}")
\ No newline at end of file
diff --git a/scripts/Image_resizer/readme.md b/scripts/Image_resizer/readme.md
new file mode 100644
index 0000000..b9d6920
--- /dev/null
+++ b/scripts/Image_resizer/readme.md
@@ -0,0 +1,21 @@
+# IMAGE RESIZER
+### Resize image to partiular dimensions.
+
+This python code takes image that needs to be resised and it uses Pillow module to resize the image by given dimensions entered by user and saves the resized image.
+
+#### Requirements:
+* Install Pillow module.
+* run `pip install pillow`
+
+### Usage
+* Clone the repo
+* open the `Image-resizer` folder
+* copy the image that you want to resize to this folder
+* open cmd in `image-resizer` folder
+##### for windows
+* run `python resize.py`
+##### for linux
+* run `python3 resize.py`
+* after that type the name of the image file in images folder (ex: img.jpg, pic.png...)
+* enter the dimensions in the format(eg 1024x720 , 600x300...)
+* now your resized image is saved in folder.
diff --git a/scripts/Image_resizer/resize.py b/scripts/Image_resizer/resize.py
new file mode 100644
index 0000000..16b38a4
--- /dev/null
+++ b/scripts/Image_resizer/resize.py
@@ -0,0 +1,11 @@
+from PIL import Image as img
+import os
+
+file_name = input("Enter anpe of file: ")
+name , ext = file_name.split('.')
+pic = img.open((os.path.join(os.path.dirname(os.path.abspath(__file__)),file_name)))
+
+ht, wt= input("Enter dimenstions(eg: 1024x720): ").split('x')
+dim = int(ht), int(wt)
+img_resize = pic.resize(dim)
+img_resize.save((os.path.join(os.path.dirname(os.path.abspath(__file__)),f'{name}_resized.{ext}')))
\ No newline at end of file
diff --git a/scripts/SnakeGame/SnakeGame.md b/scripts/SnakeGame/SnakeGame.md
new file mode 100644
index 0000000..0f67829
--- /dev/null
+++ b/scripts/SnakeGame/SnakeGame.md
@@ -0,0 +1,10 @@
+## Snake Game
+GUI based Snake game, where you can play it directly without installing any dependencies.
+
+## How to install?
+`1.` Download the file rock_paper_scissor.py
+`2.` Open CMD (Command Prompt)
+`3.` Run python rock_paper_scissor.py
+`4.` Follow the instructions and enjoy!
+
+Enjoy and play with your friends
\ No newline at end of file
diff --git a/scripts/SnakeGame/SnakeGame.py b/scripts/SnakeGame/SnakeGame.py
new file mode 100644
index 0000000..18825c2
--- /dev/null
+++ b/scripts/SnakeGame/SnakeGame.py
@@ -0,0 +1,175 @@
+import turtle
+import time
+import random
+
+delay = 0.1
+score = 0
+high_score = 0
+
+#Window Screen
+wn = turtle.Screen()
+wn.title("SNAKE GAME")
+wn.bgcolor("black")
+
+wn.setup(width=600,height=600)
+wn.tracer(0)
+
+#Head of Snake
+head = turtle.Turtle()
+head.shape("square")
+head.color("green")
+head.penup()
+head.goto(0, 0)
+head.direction = "stop"
+
+#Food in the game
+food = turtle.Turtle()
+food.speed(0)
+food.shape("circle")
+food.color("red")
+food.penup()
+food.goto(0, 100)
+
+#Score
+pen = turtle.Turtle()
+pen.speed(0)
+pen.shape("turtle")
+pen.color("white")
+pen.penup()
+pen.hideturtle()
+pen.goto(0, 250)
+pen.write("Score : 0 High Score : 0", align="center",
+ font=("Times New Roman", 24, "bold"))
+
+
+#Assigning key values
+def goup():
+ if head.direction != "down":
+ head.direction = "up"
+
+def godown():
+ if head.direction != "up":
+ head.direction = "down"
+
+def goright():
+ if head.direction != "left":
+ head.direction = "right"
+
+def goleft():
+ if head.direction != "right":
+ head.direction = "left"
+
+def move():
+ if head.direction == "up":
+ y = head.ycor()
+ head.sety(y+20)
+
+ if head.direction == "down":
+ y = head.ycor()
+ head.sety(y-20)
+
+ if head.direction == "right":
+ x = head.xcor()
+ head.setx(x+20)
+
+ if head.direction == "left":
+ x = head.xcor()
+ head.setx(x-20)
+
+wn.listen()
+wn.onkeypress(goup, "Up")
+wn.onkeypress(godown, "Down")
+wn.onkeypress(goleft, "Left")
+wn.onkeypress(goright, "Right")
+
+
+#Main Loop
+segments = []
+
+while True:
+ wn.update()
+ #for collisions with border
+ if head.xcor() > 290 or head.xcor() < -290 or head.ycor() > 290 or head.ycor() < -290:
+ time.sleep(1)
+ head.goto(0, 0)
+ head.direction = "stop"
+
+ #hiding segments of snake
+ for segment in segments:
+ segment.goto(1000,1000)
+ #clearing the segments
+ segments.clear()
+
+ #reset score
+ score = 0
+
+ #reset delay
+ delay = 0.1
+
+ pen.clear()
+ pen.write("Score : {} High Score : {} ".format(
+ score, high_score), align="center", font=("Times New Roman", 24, "bold"))
+
+ #checking collision with food
+ if head.distance(food) < 20:
+ x = random.randint(-270, 270)
+ y = random.randint(-270, 270)
+ food.goto(x, y)
+ d = ["red","yellow","blue"]
+ colors = random.choice(d)
+ food.color(colors)
+ e = ["circle","square","triangle"]
+ shapes = random.choice(e)
+ food.shape(shapes)
+
+
+ #adding new segment
+ new_segment = turtle.Turtle()
+ new_segment.speed(0)
+ new_segment.color("green")
+ new_segment.shape("square")
+ new_segment.penup()
+ segments.append(new_segment)
+
+ delay -= 0.001
+ score += 10
+
+ if score>high_score:
+ high_score = score
+ pen.clear()
+ pen.write("Score : {} High Score : {} ".format(
+ score, high_score), align="center", font=("Times New Roman", 24, "bold"))
+
+ #moving segments in reverse order
+ for i in range(len(segments)-1,0,-1):
+ x = segments[i-1].xcor()
+ y = segments[i-1].ycor()
+ segments[i].goto(x,y)
+ if len(segments) > 0:
+ x = head.xcor()
+ y = head.ycor()
+ segments[0].goto(x, y)
+
+ move()
+
+ #Checking collisions with body
+ for segment in segments:
+ if segment.distance(head) < 20:
+ time.sleep(1)
+ head.goto(0,0)
+ head.direction = "stop"
+
+ #hide segments
+ for segment in segments:
+ segment.goto(1000,1000)
+ segment.clear()
+
+ score = 0
+ delay = 0.1
+ pen.clear()
+ pen.write("Score : {} High Score : {} ".format(
+ score, high_score), align="center", font=("Times New Roman", 24, "bold"))
+ time.sleep(delay)
+
+turtle.done()
+
|