Skip to content

Commit dd43d4e

Browse files
committed
Renamed Files in GO, JS and Python
1 parent 129f7bb commit dd43d4e

File tree

18 files changed

+122
-122
lines changed

18 files changed

+122
-122
lines changed

Go/port-scanner-go/Readme.md renamed to Go/Port_Scanner/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Go-lang script for scanning specific or all open ports of the device.
1010
# How to run
1111
Navigate to the project directory.
1212
```bash
13-
cd Rotten-Scripts/Go/port-scanner-go
13+
cd Rotten-Scripts/Go/Port_Scanner
1414
```
1515
```bash
1616
go run port_scanner.go
File renamed without changes.

JavaScript/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It enables interactive web pages and thus is an essential part of web applicatio
1616
| 3 | Base64 Encoder Decoder | [Click Here](Base64_Encoder_Decoder) | [Piyush Gupta](https://github.com/gupta-piyush19) |
1717
| 4 | Blog Image Finder | [Click Here](Blog_Image_Finder) | [Piyush Gupta](https://github.com/gupta-piyush19) |
1818
| 5 | Brute Force Admin | [Click Here](Brute_Force_Admin) | [Mohit Bhat](https://github.com/mbcse) |
19-
| 6 | Bulk LinkedIn Requests | [Click Here](Bulk_LinkedIn_requests) | [SANKET MHATRE](https://github.com/SANKET7738) |
19+
| 6 | Bulk LinkedIn Requests | [Click Here](Bulk_LinkedIn_Requests) | [SANKET MHATRE](https://github.com/SANKET7738) |
2020
| 7 | Citation_Text_Converter | [Click Here](Citation_Text_Converter) | [Soham Shah](https://github.com/sohamsshah) |
2121
| 8 | Cryptoprice | [Click Here](Cryptoprice) | [Mohit Bhat](https://github.com/mbcse) |
2222
| 9 | Download_All_Repos | [Click Here](Download_All_Repos) | [Mohit Bhat](https://github.com/mbcse) |
@@ -26,7 +26,7 @@ It enables interactive web pages and thus is an essential part of web applicatio
2626
| 13 | Github Graph Populator | [Click Here](GitHub_Graph_Populator) | [Hitesh Kumar](https://github.com/HeroicHitesh) |
2727
| 14 | Html to markdown | [Click Here](Html_to_Markdown) | [Kaustubh Gupta](https://github.com/kaustubhgupta) |
2828
| 15 | Instagram Like | [Click Here](Instagram_Like) | [Harsh Barshan Mishra](https://github.com/HarshCasper) |
29-
| 16 | ROT13 | [Click Here](ROT13) | [tej5169](https://github.com/tej5169) |
29+
| 16 | ROT13 | [Click Here](ROT13_Decryption) | [tej5169](https://github.com/tej5169) |
3030
| 17 | RSA Key Pair Generator | [Click Here](RSA_Key_Pair_Generator) | [Mohit Bhat](https://github.com/mbcse) |
3131
| 18 | Send emails | [Click Here](Send_Emails) | [Namya LG](https://github.com/Namyalg) |
3232
| 19 | Who don't follow you | [Click Here](Who_Don't_Follow_You) | [Harsh Barshan Mishra](https://github.com/HarshCasper) |
File renamed without changes.
File renamed without changes.
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
# Chrome Dino Game Automation Using Python
2-
3-
## Description
4-
This python scripts enables chrome dinosaur to play chrome dino game automatically.
5-
6-
7-
## Execution
8-
* Run `pip install -r requirements.txt` .
9-
* Run `python coordinates.py` for knowing the cooridnates of your screen.
10-
* Go to the `chrome://dino` in your Google Chrome Browser.
11-
* Run `python enemy_location_checker.py` to know the location of cactus and bird (obstacles for dino).
12-
* Now , Run `python main.py`
13-
* Then go to the `chrome://dino` in your Google Chrome Browser and press any key from keyboard to start the game.
14-
* See how it plays and press a key to interrupt/stop the game.
15-
16-
17-
## Features of files
18-
### Coordinates.py:
19-
To know the coordinates of screen first we need to find the X and Y locations of screen .
20-
21-
### enemy_location_checker.py:
22-
To make dino identify the cactus and bird , captured the image of two make a frame of it and trained dino to escape it.
23-
As , there are only three colors present in this game : black(for night) , white(for day) and gray(for obstacles and dino)
24-
So , To match the gray pixels of obstacle to make identify dino for obstacle and if obstacle is close to dino then make a jump.
25-
For this take a image with obstacles coming in between using **ImageGrab from pillow library** and then find out the pixels in which the obstacles are coming.
26-
27-
### main.py
28-
As game continues, search width has to be increased for bot.For this **time module from python** helps to simulate the dino acceleration.
29-
Also reverse the loop for dino to get searched from back of screenshot to identify obstacle and it will speed up the program.
30-
31-
32-
33-
#### All the requirements for this script is mentioned in **requirements.txt** file.
34-
35-
36-
37-
38-
39-
40-
![Demo of the Game](demo_dinogame.gif)
1+
# Chrome Dino Game Automation Using Python
2+
3+
## Description
4+
This python scripts enables chrome dinosaur to play chrome dino game automatically.
5+
6+
7+
## Execution
8+
* Run `pip install -r requirements.txt` .
9+
* Run `python coordinates.py` for knowing the cooridnates of your screen.
10+
* Go to the `chrome://dino` in your Google Chrome Browser.
11+
* Run `python enemy_location_checker.py` to know the location of cactus and bird (obstacles for dino).
12+
* Now , Run `python main.py`
13+
* Then go to the `chrome://dino` in your Google Chrome Browser and press any key from keyboard to start the game.
14+
* See how it plays and press a key to interrupt/stop the game.
15+
16+
17+
## Features of files
18+
### Coordinates.py:
19+
To know the coordinates of screen first we need to find the X and Y locations of screen .
20+
21+
### enemy_location_checker.py:
22+
To make dino identify the cactus and bird , captured the image of two make a frame of it and trained dino to escape it.
23+
As , there are only three colors present in this game : black(for night) , white(for day) and gray(for obstacles and dino)
24+
So , To match the gray pixels of obstacle to make identify dino for obstacle and if obstacle is close to dino then make a jump.
25+
For this take a image with obstacles coming in between using **ImageGrab from pillow library** and then find out the pixels in which the obstacles are coming.
26+
27+
### main.py
28+
As game continues, search width has to be increased for bot.For this **time module from python** helps to simulate the dino acceleration.
29+
Also reverse the loop for dino to get searched from back of screenshot to identify obstacle and it will speed up the program.
30+
31+
32+
33+
#### All the requirements for this script is mentioned in **requirements.txt** file.
34+
35+
36+
37+
38+
39+
40+
![Demo of the Game](demo_dinogame.gif)
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import pyautogui, sys
2-
3-
# To know the location of X and Y coordinates.
4-
print('Press Ctrl-C to quit.')
5-
try:
6-
while True:
7-
x, y = pyautogui.position()
8-
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
9-
print(positionStr, end='')
10-
print('\b' * len(positionStr), end='', flush=True)
11-
except KeyboardInterrupt:
12-
print('\n')
1+
import pyautogui, sys
2+
3+
# To know the location of X and Y coordinates.
4+
print('Press Ctrl-C to quit.')
5+
try:
6+
while True:
7+
x, y = pyautogui.position()
8+
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
9+
print(positionStr, end='')
10+
print('\b' * len(positionStr), end='', flush=True)
11+
except KeyboardInterrupt:
12+
print('\n')
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import pyautogui
2-
from PIL import Image, ImageGrab
3-
import time
4-
5-
# To check the obstacles
6-
while True:
7-
image = ImageGrab.grab().convert('L') # translating to greyscale (faster)
8-
data = image.load()
9-
10-
# cactus
11-
for i in range (275, 325):
12-
for j in range(563, 650):
13-
data[i, j] = 0
14-
15-
# bird
16-
for i in range (250, 300):
17-
for j in range(410, 563):
18-
data[i, j] = 200
19-
20-
image.show()
21-
break
1+
import pyautogui
2+
from PIL import Image, ImageGrab
3+
import time
4+
5+
# To check the obstacles
6+
while True:
7+
image = ImageGrab.grab().convert('L') # translating to greyscale (faster)
8+
data = image.load()
9+
10+
# cactus
11+
for i in range (275, 325):
12+
for j in range(563, 650):
13+
data[i, j] = 0
14+
15+
# bird
16+
for i in range (250, 300):
17+
for j in range(410, 563):
18+
data[i, j] = 200
19+
20+
image.show()
21+
break
Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
import pyautogui as gui
2-
import keyboard
3-
import time
4-
import math
5-
6-
# Screen Dimensions for screen of size 1920X1080
7-
top, left, width, height = 293, 0, 700, 465
8-
9-
# helper variables to calculate time
10-
last = 0
11-
total_time = 0
12-
13-
# the intervals where the bot will search for obstacles
14-
y_search_cactus, x_start, x_end = 350, 350, 380
15-
y_search_bird = 275 # for the birds
16-
17-
18-
time.sleep(4)
19-
while True:
20-
t1 = time.time()
21-
if keyboard.is_pressed('q'): # Emergency Button
22-
break
23-
24-
# increase the search width every second to simulate the dino acceleration
25-
if math.floor(total_time) != last:
26-
x_end += 4
27-
if x_end >= width:
28-
x_end = width
29-
last = math.floor(total_time)
30-
31-
# Get a screen shot
32-
screenshot = gui.screenshot(region=(left,top, width, height))
33-
pixels = screenshot.load()
34-
35-
background_color = pixels[440, 30]
36-
37-
for i in reversed(range(x_start, x_end)):
38-
if pixels[i, y_search_cactus] != background_color\
39-
or pixels[i, y_search_bird] != background_color:
40-
keyboard.press(' ') # jump
41-
break
42-
43-
t2 = time.time()-t1
44-
total_time += t2
1+
import pyautogui as gui
2+
import keyboard
3+
import time
4+
import math
5+
6+
# Screen Dimensions for screen of size 1920X1080
7+
top, left, width, height = 293, 0, 700, 465
8+
9+
# helper variables to calculate time
10+
last = 0
11+
total_time = 0
12+
13+
# the intervals where the bot will search for obstacles
14+
y_search_cactus, x_start, x_end = 350, 350, 380
15+
y_search_bird = 275 # for the birds
16+
17+
18+
time.sleep(4)
19+
while True:
20+
t1 = time.time()
21+
if keyboard.is_pressed('q'): # Emergency Button
22+
break
23+
24+
# increase the search width every second to simulate the dino acceleration
25+
if math.floor(total_time) != last:
26+
x_end += 4
27+
if x_end >= width:
28+
x_end = width
29+
last = math.floor(total_time)
30+
31+
# Get a screen shot
32+
screenshot = gui.screenshot(region=(left,top, width, height))
33+
pixels = screenshot.load()
34+
35+
background_color = pixels[440, 30]
36+
37+
for i in reversed(range(x_start, x_end)):
38+
if pixels[i, y_search_cactus] != background_color\
39+
or pixels[i, y_search_bird] != background_color:
40+
keyboard.press(' ') # jump
41+
break
42+
43+
t2 = time.time()-t1
44+
total_time += t2
File renamed without changes.

Python/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ S. No | Name of Script | Directory Link | Author | Tools Used |
3030
20 | Counting Days | [Click Here](/Python/Counting_Days) | [Dylan Corriveau](https://github.com/dcorriveau) | os, datetime
3131
21 | Create Word Cloud | [Click Here](/Python/Create_Word_Cloud) | [Prahitha](https://github.com/Prahitha) | argparse, wordcloud, numpy
3232
22 | Cricbuzz scrapper | [Click Here](/Python/CRICBUZZ%20scraper) | [Rutuja Dhanawade](https://github.com/rutujadhanawade) | bs4, urllib.request
33-
23 | Crypto Currency Converter | [Click Here](/Python/cryptocurrency_converter) | [Mohta Rahul Suresh](https://github.com/Rahul555-droid) | requests
33+
23 | Crypto Currency Converter | [Click Here](/Python/Cryptocurrency_Converter) | [Mohta Rahul Suresh](https://github.com/Rahul555-droid) | requests
3434
24 | CSV Splitter | [Click Here](/Python/CSV_Splitter) | [Vybhav Chaturvedi](https://github.com/vybhav72954) | os, csv
3535
25 | Currency Converter | [Click Here](/Python/Currency_Converter) | [Prahitha](https://github.com/Prahitha) | requests, argparse
3636
26 | Customized Blog Headers | [Click Here](/Python/Customized_blog_headers) | [Kaustubh Gupta](https://github.com/kaustubhgupta) | cv2, PIL, sys, os
37-
27 | Chrome Dinosaur Game | [Click Here](/Python/chromedino_script) | [Oshi Gupta](https://github.com/oshi36) | pyautogui , PIL , time
37+
27 | Chrome Dinosaur Game | [Click Here](/Python/Chrome_Dino_Script) | [Oshi Gupta](https://github.com/oshi36) | pyautogui , PIL , time
3838
28 | Desktop Notifier | [Click Here](/Python/Desktop_notifier) | [Anushka-S10](https://github.com/Anushka-S10) | feedparser, notify2, pygame
3939
29 | Desktop Time Tracker | [Click Here](/Python/Desktop_Time_Tracker) | [Abdallah Ahmed](https://github.com/abdallah1097) | os, subprocess, argparse
4040
30 | Discord Bot | [Click Here](/Python/Discord_bot) | [KILR](https://github.com/KILR007) | discord, json, datetime

0 commit comments

Comments
 (0)