Skip to content

Commit

Permalink
Merge pull request #80 from Anuraj-IND/main
Browse files Browse the repository at this point in the history
fixing issue #77 and #79
  • Loading branch information
Rajansharma44 authored Oct 31, 2024
2 parents 5c01275 + 629bf75 commit 9e26ee6
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 17 deletions.
65 changes: 65 additions & 0 deletions CodeOFConduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 🌟 Community Code of Conduct 🌟

Welcome to our project! We’re thrilled to have you here, whether you’re fixing a bug, proposing a new feature, improving documentation, or just exploring. To make this a safe and positive environment for everyone, we have some guidelines that all participants agree to follow.

## 🎉 Our Pledge

We are committed to making this project a friendly, inclusive space for all. No matter your background, identity, or experience level, you belong here! Our goal is to create a respectful community where everyone feels encouraged to contribute.

## 🤝 Our Values

We believe in:
- **Respect** – Acknowledge and celebrate differing opinions and experiences.
- **Collaboration** – Work together to make things better.
- **Growth** – Embrace feedback as a tool for learning and improvement.
- **Kindness** – Approach all interactions with empathy and positivity.

## 🚫 Unacceptable Behavior

To keep things welcoming, here’s what we avoid:
- **Harassment and Discrimination** – Respect everyone’s personal space and boundaries.
- **Trolling and Insults** – Keep it constructive! Critique ideas, not people.
- **Disrespecting Privacy** – Don’t share private info without permission.

## 🔧 Role of Maintainers

Our maintainers are here to support a positive experience by setting and enforcing these standards. They’re responsible for:
- Clarifying what’s acceptable behavior
- Moderating comments, commits, and other contributions that don’t align with this Code of Conduct
- Addressing reported incidents with respect and confidentiality

## 🌎 Where This Code Applies

This Code of Conduct applies to **all project spaces**: GitHub, discussions, and events, as well as any public spaces where someone represents the project (social media, conferences, etc.).

## 📢 Reporting Issues

If you experience or witness any behavior that doesn’t meet our standards, please reach out! You can report issues . We’ll review each report with confidentiality and act promptly.

## 🛠 Enforcement Process

Our maintainers follow these guidelines to handle violations:

1. **Gentle Reminder**
*Impact:* Minor, first-time missteps.
*Outcome:* A friendly note about our standards.

2. **Formal Warning**
*Impact:* Repeated behavior or moderate concerns.
*Outcome:* A clear warning about expected behavior, plus possible time out from the project.

3. **Temporary Ban**
*Impact:* Serious or repeated violations.
*Outcome:* Temporary suspension from the project’s spaces.

4. **Permanent Ban**
*Impact:* Patterns of harmful behavior.
*Outcome:* Permanent removal from all community spaces.

## 💬 Let’s Build Together!

Let’s work as a team to make this project a space for learning, creativity, and community. Thanks for helping us keep it a fun and respectful place for all!

---

*Adapted from the [Contributor Covenant](https://www.contributor-covenant.org) version 2.1.*
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,6 @@ It's super easy! You don't need to be a coding expert. Just follow these steps t

> Feel free to upload your coded projects in the **Codes Directory**! 📁
---

## 📜 Code of Conduct

**Examples of positive behavior:**
- Using welcoming and inclusive language 🤗
- Accepting constructive criticism gracefully ✨
- Focusing on what is best for the community 💖
- Respecting differing viewpoints and experiences 🌈

**Examples of unacceptable behavior:**
- Trolling, insulting/derogatory comments, or personal attacks 🚫
- Public or private harassment 🔒
- Publishing others' private information without explicit permission 🚷

---

## 🎯 Objectives

The main goal of this repository is to assist individuals in making their contributions during Hacktoberfest 2024. Together, let's make open source accessible and enjoyable for everyone! 🙌
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions python/csv to excel/csv2excel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pandas as pd

def csv_to_excel(csv_file, excel_file):
# Read the CSV file
data = pd.read_csv(csv_file)

# Write to an Excel file
data.to_excel(excel_file, index=False)

if __name__ == "__main__":
# Specify the CSV file and the desired Excel file name
csv_file = 'day.csv' # Replace with your input CSV file name
excel_file = 'days.xlsx' # Replace with your desired output Excel file name

# Convert CSV to Excel
csv_to_excel(csv_file, excel_file)
print(f"Converted {csv_file} to {excel_file}")
15 changes: 15 additions & 0 deletions python/csv to excel/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Prerequisites
. Make sure you have pandas and openpyxl installed. You can install them using pip if you haven't already:

# bash
Copy code
. pip install pandas openpyxl
# How to Use
. Replace 'input.csv' with the path to your CSV file.
. Replace 'output.xlsx' with the desired output Excel file name.
. Run the script.
# Specific destination?
replace 'days.csv' with the desired input path and use double backslashes instead
e.g. 'C:\\Users\\anura\\Downloads\\day.csv'
same goes for days.xlsx replace it with the desired output path
e.g. 'C:\\Users\\anura\\Downloads\\days.xlsx'
19 changes: 19 additions & 0 deletions python/image resizer/image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from PIL import Image

def resize_image(input_path, output_path, size):
# Open an image file
with Image.open(input_path) as img:
# Resize the image
resized_img = img.resize(size)
# Save the resized image
resized_img.save(output_path)

if __name__ == "__main__":
# Specify the input image path and output image path
input_image = 'image.jpg' # Change this to your input image path
output_image = 'output_image.jpg' # Change this to your desired output path
new_size = (800, 600) # Specify the new size as (width, height)

# Resize the image
resize_image(input_image, output_image, new_size)
print(f"Resized image saved to {output_image}")
15 changes: 15 additions & 0 deletions python/image resizer/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Prerequisites
. Make sure you have Pillow installed. You can install it using pip:

# bash
Copy code
pip install Pillow
# How to Use
. Replace 'image.jpg' with the path to your image file.
. Replace 'output_image.jpg' with the desired output image file name and path.
. Run the script.
# Specific destination?
replace 'image.jpg' with the desired input path and use double backslashes instead
e.g. 'C:\\Users\\anura\\Downloads\\image.jpg'
same goes for 'output_image.jpg' replace it with the desired output path
e.g. 'C:\\Users\\anura\\Downloads\\output_image.jpg'
48 changes: 48 additions & 0 deletions python/qr code reader/qr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import cv2
from pyzbar.pyzbar import decode

# Open the camera
cap = cv2.VideoCapture(0)

qr_code_detected = False # To track if a QR code has been successfully read

while not qr_code_detected:
# Capture frame-by-frame
ret, frame = cap.read()

# Decode the QR codes in the frame
decoded_objects = decode(frame)

for obj in decoded_objects:
# Draw a rectangle around the QR code
points = obj.polygon
if len(points) > 4:
hull = cv2.convexHull(np.array([point for point in points], dtype=np.float32))
points = hull

n = len(points)
for j in range(0, n):
cv2.line(frame, tuple(points[j]), tuple(points[(j + 1) % n]), (0, 255, 0), 3)

# Get the QR code data
qr_data ="\n"+obj.data.decode('utf-8')
print(f"Data: {qr_data}")

# Save QR code data to a text file
with open('qr code reader\\qr_code_data.txt', 'a') as file:
file.write( qr_data)

# Mark that a QR code was successfully read
qr_code_detected = True
break # Exit the loop after reading the QR code

# Display the frame
cv2.imshow("QR Code Scanner", frame)

# Exit if 'q' is pressed
if cv2.waitKey(1) & 0xFF == ord('q'):
break

# Release the camera and close windows after QR code is read
cap.release()
cv2.destroyAllWindows()
5 changes: 5 additions & 0 deletions python/qr code reader/qr_code_data.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

https://youtu.be/Q5Lt8h_0PBI
https://youtu.be/dQw4w9WgXcQ

Lor 1 8 3
12 changes: 12 additions & 0 deletions python/qr code reader/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Prerequisites
. Make sure you have opencv-python pyzbar installed. You can install it using pip:

# bash
Copy code
pip install opencv-python pyzbar
# How to Use
. Run the script.
. show qr code in camera window
# Specific destination?
'qr_code_data.txt' # Default path
'C:\\Users\\YourUser\\Documents\\qr_code_data.txt' # Custom path on Windows

0 comments on commit 9e26ee6

Please sign in to comment.