Skip to content

Conflicts #788

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

Merged
merged 7 commits into from
Feb 27, 2021
Merged
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
2 changes: 1 addition & 1 deletion Go/port-scanner-go/Readme.md → Go/Port_Scanner/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Go-lang script for scanning specific or all open ports of the device.
# How to run
Navigate to the project directory.
```bash
cd Rotten-Scripts/Go/port-scanner-go
cd Rotten-Scripts/Go/Port_Scanner
```
```bash
go run port_scanner.go
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions JavaScript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It enables interactive web pages and thus is an essential part of web applicatio
| 3 | Base64 Encoder Decoder | [Click Here](Base64_Encoder_Decoder) | [Piyush Gupta](https://github.com/gupta-piyush19) |
| 4 | Blog Image Finder | [Click Here](Blog_Image_Finder) | [Piyush Gupta](https://github.com/gupta-piyush19) |
| 5 | Brute Force Admin | [Click Here](Brute_Force_Admin) | [Mohit Bhat](https://github.com/mbcse) |
| 6 | Bulk LinkedIn Requests | [Click Here](Bulk_LinkedIn_requests) | [SANKET MHATRE](https://github.com/SANKET7738) |
| 6 | Bulk LinkedIn Requests | [Click Here](Bulk_LinkedIn_Requests) | [SANKET MHATRE](https://github.com/SANKET7738) |
| 7 | Citation_Text_Converter | [Click Here](Citation_Text_Converter) | [Soham Shah](https://github.com/sohamsshah) |
| 8 | Cryptoprice | [Click Here](Cryptoprice) | [Mohit Bhat](https://github.com/mbcse) |
| 9 | Download_All_Repos | [Click Here](Download_All_Repos) | [Mohit Bhat](https://github.com/mbcse) |
Expand All @@ -26,7 +26,7 @@ It enables interactive web pages and thus is an essential part of web applicatio
| 13 | Github Graph Populator | [Click Here](GitHub_Graph_Populator) | [Hitesh Kumar](https://github.com/HeroicHitesh) |
| 14 | Html to markdown | [Click Here](Html_to_Markdown) | [Kaustubh Gupta](https://github.com/kaustubhgupta) |
| 15 | Instagram Like | [Click Here](Instagram_Like) | [Harsh Barshan Mishra](https://github.com/HarshCasper) |
| 16 | ROT13 | [Click Here](ROT13) | [tej5169](https://github.com/tej5169) |
| 16 | ROT13 | [Click Here](ROT13_Decryption) | [tej5169](https://github.com/tej5169) |
| 17 | RSA Key Pair Generator | [Click Here](RSA_Key_Pair_Generator) | [Mohit Bhat](https://github.com/mbcse) |
| 18 | Send emails | [Click Here](Send_Emails) | [Namya LG](https://github.com/Namyalg) |
| 19 | Who don't follow you | [Click Here](Who_Don't_Follow_You) | [Harsh Barshan Mishra](https://github.com/HarshCasper) |
Expand Down
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added Python/Automate_LinkedIN/login.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Python/Automate_LinkedIN/work.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added Python/Automate_Telegram/code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Python/Automate_Telegram/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Python/Automate_Telegram/send.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# Chrome Dino Game Automation Using Python
## Description
This python scripts enables chrome dinosaur to play chrome dino game automatically.
## Execution
* Run `pip install -r requirements.txt` .
* Run `python coordinates.py` for knowing the cooridnates of your screen.
* Go to the `chrome://dino` in your Google Chrome Browser.
* Run `python enemy_location_checker.py` to know the location of cactus and bird (obstacles for dino).
* Now , Run `python main.py`
* Then go to the `chrome://dino` in your Google Chrome Browser and press any key from keyboard to start the game.
* See how it plays and press a key to interrupt/stop the game.
## Features of files
### Coordinates.py:
To know the coordinates of screen first we need to find the X and Y locations of screen .
### enemy_location_checker.py:
To make dino identify the cactus and bird , captured the image of two make a frame of it and trained dino to escape it.
As , there are only three colors present in this game : black(for night) , white(for day) and gray(for obstacles and dino)
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.
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.
### main.py
As game continues, search width has to be increased for bot.For this **time module from python** helps to simulate the dino acceleration.
Also reverse the loop for dino to get searched from back of screenshot to identify obstacle and it will speed up the program.
#### All the requirements for this script is mentioned in **requirements.txt** file.
![Demo of the Game](demo_dinogame.gif)
# Chrome Dino Game Automation Using Python

## Description
This python scripts enables chrome dinosaur to play chrome dino game automatically.


## Execution
* Run `pip install -r requirements.txt` .
* Run `python coordinates.py` for knowing the cooridnates of your screen.
* Go to the `chrome://dino` in your Google Chrome Browser.
* Run `python enemy_location_checker.py` to know the location of cactus and bird (obstacles for dino).
* Now , Run `python main.py`
* Then go to the `chrome://dino` in your Google Chrome Browser and press any key from keyboard to start the game.
* See how it plays and press a key to interrupt/stop the game.


## Features of files
### Coordinates.py:
To know the coordinates of screen first we need to find the X and Y locations of screen .

### enemy_location_checker.py:
To make dino identify the cactus and bird , captured the image of two make a frame of it and trained dino to escape it.
As , there are only three colors present in this game : black(for night) , white(for day) and gray(for obstacles and dino)
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.
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.

### main.py
As game continues, search width has to be increased for bot.For this **time module from python** helps to simulate the dino acceleration.
Also reverse the loop for dino to get searched from back of screenshot to identify obstacle and it will speed up the program.



#### All the requirements for this script is mentioned in **requirements.txt** file.






![Demo of the Game](demo_dinogame.gif)
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import pyautogui, sys
# To know the location of X and Y coordinates.
print('Press Ctrl-C to quit.')
try:
while True:
x, y = pyautogui.position()
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
print(positionStr, end='')
print('\b' * len(positionStr), end='', flush=True)
except KeyboardInterrupt:
print('\n')
import pyautogui, sys

# To know the location of X and Y coordinates.
print('Press Ctrl-C to quit.')
try:
while True:
x, y = pyautogui.position()
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
print(positionStr, end='')
print('\b' * len(positionStr), end='', flush=True)
except KeyboardInterrupt:
print('\n')
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import pyautogui
from PIL import Image, ImageGrab
import time
# To check the obstacles
while True:
image = ImageGrab.grab().convert('L') # translating to greyscale (faster)
data = image.load()
# cactus
for i in range (275, 325):
for j in range(563, 650):
data[i, j] = 0
# bird
for i in range (250, 300):
for j in range(410, 563):
data[i, j] = 200
image.show()
break
import pyautogui
from PIL import Image, ImageGrab
import time

# To check the obstacles
while True:
image = ImageGrab.grab().convert('L') # translating to greyscale (faster)
data = image.load()

# cactus
for i in range (275, 325):
for j in range(563, 650):
data[i, j] = 0

# bird
for i in range (250, 300):
for j in range(410, 563):
data[i, j] = 200

image.show()
break
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
import pyautogui as gui
import keyboard
import time
import math
# Screen Dimensions for screen of size 1920X1080
top, left, width, height = 293, 0, 700, 465
# helper variables to calculate time
last = 0
total_time = 0
# the intervals where the bot will search for obstacles
y_search_cactus, x_start, x_end = 350, 350, 380
y_search_bird = 275 # for the birds
time.sleep(4)
while True:
t1 = time.time()
if keyboard.is_pressed('q'): # Emergency Button
break
# increase the search width every second to simulate the dino acceleration
if math.floor(total_time) != last:
x_end += 4
if x_end >= width:
x_end = width
last = math.floor(total_time)
# Get a screen shot
screenshot = gui.screenshot(region=(left,top, width, height))
pixels = screenshot.load()
background_color = pixels[440, 30]
for i in reversed(range(x_start, x_end)):
if pixels[i, y_search_cactus] != background_color\
or pixels[i, y_search_bird] != background_color:
keyboard.press(' ') # jump
break
t2 = time.time()-t1
total_time += t2
import pyautogui as gui
import keyboard
import time
import math

# Screen Dimensions for screen of size 1920X1080
top, left, width, height = 293, 0, 700, 465

# helper variables to calculate time
last = 0
total_time = 0

# the intervals where the bot will search for obstacles
y_search_cactus, x_start, x_end = 350, 350, 380
y_search_bird = 275 # for the birds


time.sleep(4)
while True:
t1 = time.time()
if keyboard.is_pressed('q'): # Emergency Button
break

# increase the search width every second to simulate the dino acceleration
if math.floor(total_time) != last:
x_end += 4
if x_end >= width:
x_end = width
last = math.floor(total_time)

# Get a screen shot
screenshot = gui.screenshot(region=(left,top, width, height))
pixels = screenshot.load()

background_color = pixels[440, 30]

for i in reversed(range(x_start, x_end)):
if pixels[i, y_search_cactus] != background_color\
or pixels[i, y_search_bird] != background_color:
keyboard.press(' ') # jump
break

t2 = time.time()-t1
total_time += t2
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added Python/Discord_Bot/image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added Python/Execution_Time/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added Python/IMDB_Scrapper/sample.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Python/Linkedin_Post_Emails_Scrapper/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added Python/Markov_Memes/markovmeme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
Binary file added Python/Merge_2_PFDs/MergedFiles.pdf
Binary file not shown.
74 changes: 37 additions & 37 deletions Python/mergetwopdf/Readme.MD → Python/Merge_2_PFDs/Readme.MD
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# Merge two pdf Files
### Third Party Libraries Required :
1.PyPDF2
### How to install above Library
```
import PyPDF2
```
### How to use it :
1. Download or clone the repository
2. Install Required Libraries
3. Run merge.py by giving pdf file through command line
sample statement for running the file
python merge.py pdf1 pdf2
4. you will get the merged pdf in the same directory
### Output
I have added the merged pdf file named as MergedFiles.pdf which is formed from pdf1.pdf pdf2.pdf .
You can check the final output in MergedFiles.pdf File
### PDF File 1
![pdf1](https://media.giphy.com/media/oUoIpReh0bV67tvVbF/giphy.gif)
### PDF File 2
![pdf1](https://media.giphy.com/media/5AiytDDSxCOQrhFylS/giphy.gif)
### Merged File
![MERGED](https://media.giphy.com/media/q03Je7x4uy85VeNvcT/giphy.gif)
![built with love](https://forthebadge.com/images/badges/built-with-love.svg)
Check out my Github profile [Tejas1510!](https://github.com/Tejas1510)
# Merge two pdf Files

### Third Party Libraries Required :
1.PyPDF2

### How to install above Library
```
import PyPDF2
```

### How to use it :
1. Download or clone the repository
2. Install Required Libraries
3. Run merge.py by giving pdf file through command line
sample statement for running the file
python merge.py pdf1 pdf2
4. you will get the merged pdf in the same directory

### Output
I have added the merged pdf file named as MergedFiles.pdf which is formed from pdf1.pdf pdf2.pdf .
You can check the final output in MergedFiles.pdf File

### PDF File 1

![pdf1](https://media.giphy.com/media/oUoIpReh0bV67tvVbF/giphy.gif)

### PDF File 2

![pdf1](https://media.giphy.com/media/5AiytDDSxCOQrhFylS/giphy.gif)

### Merged File

![MERGED](https://media.giphy.com/media/q03Je7x4uy85VeNvcT/giphy.gif)

![built with love](https://forthebadge.com/images/badges/built-with-love.svg)

Check out my Github profile [Tejas1510!](https://github.com/Tejas1510)
Loading