-
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Kushal997-das:main' into main
- Loading branch information
Showing
48 changed files
with
8,144 additions
and
241 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
Desktop Application/Basic/Python/Selenium-Automated-Cookie-PlayerGame/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# **Selenium Automated Cookie player game** | ||
It automates gameplay for the popular browser game **Cookie Clicker**. Using the power of Selenium, it strategically clicks upgrade buttons, making your cookie production skyrocket! | ||
|
||
### **How it Works:** | ||
|
||
* **Target Acquired**: The script launches the game at [Cookie game](https://orteil.dashnet.org/experiments/cookie/). | ||
|
||
* **Upgrade Identification**: It uses Selenium to locate upgrade buttons for various in-game elements like cursors, grandmas, and factories. | ||
|
||
* **Strategic Clicks**: The script analyzes your current cookie count and clicks the most efficient upgrade button based on its cost. | ||
|
||
### **Requirements:** | ||
|
||
* Selenium library (install using pip install selenium) | ||
A WebDriver for your browser (download from https://www.selenium.dev/downloads/) | ||
Setup: | ||
|
||
* Download and install the appropriate WebDriver for your browser (e.g., ChromeDriver which is compativle with your Chrome version from her: https://googlechromelabs.github.io/chrome-for-testing/) | ||
|
||
* Place the WebDriver in a directory accessible to your Python script or add it to your path variables (Recommended). | ||
|
||
|
||
|
||
https://github.com/PiyushBagde/Project-Guidance/assets/100503136/f26114bb-7419-4ca1-aaa6-6262c0db3519 | ||
|
65 changes: 65 additions & 0 deletions
65
Desktop Application/Basic/Python/Selenium-Automated-Cookie-PlayerGame/main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import time | ||
|
||
from selenium import webdriver | ||
from selenium.webdriver.common.by import By | ||
|
||
chrome_option = webdriver.ChromeOptions() | ||
chrome_option.add_experimental_option('detach', True) | ||
|
||
driver = webdriver.Chrome(options=chrome_option) | ||
driver.get("https://orteil.dashnet.org/experiments/cookie/") | ||
|
||
cookie_button = driver.find_element(By.ID, value='cookie') | ||
store = driver.find_elements(By.CSS_SELECTOR, value="#store div b") | ||
|
||
end_time = time.time() + 5 * 60 | ||
|
||
while time.time() < end_time: | ||
money = int(driver.find_element(By.ID, value='money').text) | ||
|
||
time_machine = driver.find_element(By.CSS_SELECTOR, value="div[id='buyAlchemy lab'] b") | ||
portal = driver.find_element(By.CSS_SELECTOR, value="div #buyPortal b") | ||
alchemy = driver.find_element(By.CSS_SELECTOR, value="div[id='buyAlchemy lab'] b") | ||
shipment = driver.find_element(By.CSS_SELECTOR, value="div #buyShipment b") | ||
mine = driver.find_element(By.CSS_SELECTOR, value="div #buyMine b") | ||
factory = driver.find_element(By.CSS_SELECTOR, value="div #buyFactory b") | ||
grandma = driver.find_element(By.CSS_SELECTOR, value="div #buyGrandma b") | ||
cursor = driver.find_element(By.CSS_SELECTOR, value="div #buyCursor b") | ||
|
||
time_machine_amount = int(time_machine.text.split()[-1].replace(",", "")) | ||
portal_amount = int(portal.text.split()[-1].replace(",", "")) | ||
alchemy_amount = int(alchemy.text.split()[-1].replace(",", "")) | ||
shipment_amount = int(shipment.text.split()[-1].replace(",", "")) | ||
mine_amount = int(mine.text.split()[-1].replace(",", "")) | ||
factory_amount = int(factory.text.split()[-1].replace(",", "")) | ||
grandma_amount = int(grandma.text.split()[-1].replace(",", "")) | ||
cursor_amount = int(cursor.text.split()[-1].replace(",", "")) | ||
|
||
if money >= time_machine_amount: | ||
time_machine.click() | ||
time.sleep(0.1) | ||
elif money >= portal_amount: | ||
portal.click() | ||
time.sleep(0.1) | ||
elif money >= alchemy_amount: | ||
alchemy.click() | ||
time.sleep(0.1) | ||
elif money >= shipment_amount: | ||
shipment.click() | ||
time.sleep(0.1) | ||
elif money >= mine_amount: | ||
mine.click() | ||
time.sleep(0.1) | ||
elif money >= factory_amount: | ||
factory.click() | ||
time.sleep(0.1) | ||
elif money >= grandma_amount: | ||
grandma.click() | ||
time.sleep(0.1) | ||
elif money >= cursor_amount: | ||
cursor.click() | ||
time.sleep(0.1) | ||
|
||
cookie_button.click() | ||
|
||
print("one minute finished") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Machine Learning and Data Science/Intermediate/Crop Recommedation using ML/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
streamlit==1.31.0 | ||
scikit-learn==1.2.2 | ||
scikit-learn==1.5.0 | ||
streamlit_option_menu== 0.3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Todo CRUD app - MERN stack | ||
|
||
The full form of CRUD is Create, Read, Update, and Delete. These are the four basic operations that can be performed on data in a database or any persistent storage system. | ||
|
||
- **Create**: This operation adds new data to the database. For example, adding a new record in a table. | ||
- **Read**: This operation retrieves data from the database. For example, fetching records from a table. | ||
- **Update**: This operation modifies existing data in the database. For example, changing values of an existing record. | ||
- **Delete**: This operation removes data from the database. For example, deleting a record from a table. | ||
These operations are fundamental to managing and manipulating data in a database, ensuring that users can interact with the data effectively. | ||
|
||
This is a simple todo app, demonstrates CRUD operations in MERN stack. | ||
|
||
| Task | HTTP Method | Route Path | | ||
|----------|----------|----------| | ||
| Get all tasks | ![GET](https://img.shields.io/badge/GET-blue) | `/todo/all` | | ||
| Get task by id | ![GET](https://img.shields.io/badge/GET-blue) | `/todo/{id}` | | ||
| Create a task | ![POST](https://img.shields.io/badge/POST-green) | `/todo/new` | | ||
| Edit a task | ![PUT](https://img.shields.io/badge/PUT-yellow) | `/todo/{id}` | | ||
| Delete a task | ![DELETE](https://img.shields.io/badge/DELETE-red)| `/todo/{id}` | | ||
|
||
|
||
## How to run the app? | ||
|
||
1. Fork the repository. | ||
|
||
2. Clone the Repository. | ||
|
||
``` | ||
git clone repository-url | ||
``` | ||
|
||
3. Go to root of project directory. | ||
|
||
``` | ||
cd repository-directory | ||
``` | ||
|
||
4. Navigate to server | ||
``` | ||
cd server/ | ||
``` | ||
|
||
5. Install server dependecies | ||
``` | ||
npm install | ||
``` | ||
|
||
6. Run the server | ||
``` | ||
npm start | ||
``` | ||
|
||
7. Navigate to client | ||
``` | ||
cd client/ | ||
``` | ||
|
||
8. Install server dependecies | ||
``` | ||
npm install | ||
``` | ||
|
||
9. Run the server | ||
``` | ||
npm run dev | ||
``` | ||
|
||
## Screeanshots | ||
|
||
![image](https://github.com/DharshiBalasubramaniyam/Project-Guidance/assets/139672976/5ac007d3-3259-490e-b740-09b2f0d0cb68) | ||
|
||
![image](https://github.com/DharshiBalasubramaniyam/Project-Guidance/assets/139672976/f38b0309-0d4e-4e47-9847-c7d9d0c588e7) | ||
|
||
![image](https://github.com/DharshiBalasubramaniyam/Project-Guidance/assets/139672976/09121f07-49ca-4bc7-afba-7f878c35802d) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# React + Vite | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
||
Currently, two official plugins are available: | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>MyToDo</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.