├── .github ├── 1cap1.png └── yash.jpeg ├── CONTRIBUTING.md ├── E-commerce ├── index.html └── style.css ├── README.md ├── Task2 ├── Comp_coding │ ├── 1_Count_Common_Factor.py │ ├── 2_Does_it_Divide.py │ ├── 3_Stocks.py │ ├── 4_MorganStanley.py │ ├── Does_it_Divide.cpp │ ├── Famous C++ algorithms │ │ └── bubble_sort.cpp │ ├── Max-Subarray_sum.c │ ├── MorganStanley.cpp │ ├── Stocks.cpp │ ├── armstrong_range.c │ └── remove_duplicates.py ├── DataStructures │ ├── C++ │ │ └── RemoveDuplicateUnsortedLL.cpp │ └── Python │ │ ├── BubbleSort.py │ │ ├── Dijkstra.py │ │ ├── Tower_of_hanoi.py │ │ ├── TreeTraversals.py │ │ ├── binary_tree.py │ │ ├── bubble_sort.py │ │ ├── insertion_sort.py │ │ ├── merge_sort.py │ │ └── selection_sort.py ├── Famous C++ algorithms │ ├── binary_search.cpp │ ├── merge_sort.cpp │ └── quick_sort.cpp ├── Projects │ ├── GUI_Calculator_Python │ │ └── Calculator.py │ └── HelloWorldInDiffLang │ │ ├── Hello_world.c │ │ ├── Hello_world.cpp │ │ ├── Hello_world.java │ │ ├── Hello_world.js │ │ ├── Hello_world.py │ │ └── hello_world.rb └── README.md ├── assets ├── favicon-16x16.png ├── favicon-32x32.png └── hlogo.svg ├── gitfetch.js ├── index.html └── style.css /.github/1cap1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boltjazz/Hacktober23/f21d37903fb6cf41ea06e53528fc444265da5f8a/.github/1cap1.png -------------------------------------------------------------------------------- /.github/yash.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boltjazz/Hacktober23/f21d37903fb6cf41ea06e53528fc444265da5f8a/.github/yash.jpeg -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We, the contributors and maintainers, pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | - **Respectful and Inclusive Language:** Using inclusive language and being respectful of differing viewpoints and experiences. 12 | - **Being Welcoming:** Creating an environment where people of all backgrounds feel welcome to participate. 13 | - **Being Open to Feedback:** Being open to constructive feedback and working collaboratively with others. 14 | - **Showing Empathy:** Striving to understand and respect other people's perspectives and experiences. 15 | 16 | Examples of unacceptable behavior by participants include: 17 | 18 | - **Harassment and Discrimination:** Any form of harassment, discrimination, or unwelcome conduct based on any of the characteristics mentioned above. 19 | - **Trolling and Insults:** Deliberately trolling, insulting, or derogatory comments, whether online or offline. 20 | - **Disruptive Behavior:** Any disruptive behavior that interferes with a positive and welcoming community environment. 21 | - **Unsolicited Advancements:** Unsolicited and inappropriate advances, whether online or offline. 22 | 23 | ## Our Responsibilities 24 | 25 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 26 | 27 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that do not align with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 28 | 29 | ## Scope 30 | 31 | This Code of Conduct applies both within the project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. 32 | 33 | ## Enforcement 34 | 35 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated, and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality regarding the reporter of an incident. 36 | 37 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 38 | 39 | ## Attribution 40 | 41 | This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). 42 | 43 | For answers to common questions about this code of conduct, please see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). 44 | 45 | --- 46 | 47 | We encourage all participants to help create a safe and positive community. Let's work together to foster a welcoming environment for everyone. 48 | -------------------------------------------------------------------------------- /E-commerce/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Best Online Food Delivery Service in India | SiddhantTheProvider.com 10 | 11 | 12 | 13 | 14 | 15 | 16 | 28 | 29 |
30 | 31 |

Welcome to Siddhant_The_Provider

32 |

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Perferendis dolorum numquam minus.

33 |

Lorem ipsum dolor sit amet consectetur, adipisicing elit.

34 | 35 |
36 | 37 |
38 |

Our Services

39 |
40 |
41 | 42 |

Food Catering

43 |

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem, culpa suscipit error 44 | Lorem ipsum dolor sit, amet consectetur adipisicing elit. Et qui, repudiandae similique nam, recusandae quidem ab asperiores ex, aut fugit labore veritatis facere? 45 | sint delectus ab dolorum nam. Debitis facere, incidunt voluptates eos, mollitia voluptatem iste sunt 46 | voluptas beatae facilis labore, omnis sint quae eum.

47 |
48 |
49 | 50 |

Bulk Ordering

51 |

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem, culpa suscipit error 52 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde laudantium a incidunt animi ad, ab dignissimos vero? Unde numquam odit repudiandae perferendis nisi. 53 | 54 | sint delectus ab dolorum nam. Debitis facere, incidunt voluptates eos, mollitia voluptatem iste sunt 55 | voluptas beatae facilis labore, omnis sint quae eum.

56 |
57 |
58 | 59 |

Food Ordering

60 |

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem, culpa suscipit error 61 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Necessitatibus provident fugiat aliquam minima at explicabo. Earum eveniet quaerat, sunt molestias nesciunt quas! Quis. 62 | sint delectus ab dolorum nam. Debitis facere, incidunt voluptates eos, mollitia voluptatem iste sunt 63 | voluptas beatae facilis labore, omnis sint quae eum.

64 |
65 |
66 |
67 |
68 |

Our Clients

69 |
70 |
71 | Our Client 72 | 73 | 74 | 75 |
76 |
77 | Our Client 78 |
79 | 80 |
81 | Our Client 82 |
83 |
84 | Our Client 85 |
86 |
87 | 88 |
89 | 90 |
91 |

Contact Us

92 |
93 |
94 |
95 | 96 | 97 |
98 |
99 | 100 | 101 |
102 |
103 | 104 | 105 |
106 |
107 | 108 | 109 |
110 |
111 |
112 |
113 | 114 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /E-commerce/style.css: -------------------------------------------------------------------------------- 1 | /* CSS Reset */ 2 | *{ 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | html{ 8 | scroll-behavior: smooth; 9 | } 10 | 11 | /* CSS Variables */ 12 | :root{ 13 | --navbar-height: 59px; 14 | } 15 | 16 | /* Navigation Bar */ 17 | #navbar{ 18 | display: flex; 19 | align-items: center; 20 | position: sticky; 21 | top: 0px; 22 | } 23 | 24 | #navbar::before{ 25 | content: ""; 26 | background-color: black; 27 | position: absolute; 28 | top:0px; 29 | left:0px; 30 | height: 100%; 31 | width:100%; 32 | z-index: -1; 33 | opacity: 0.7; 34 | } 35 | 36 | /* Navigation Bar: Logo and Image */ 37 | #logo{ 38 | margin: 10px 34px; 39 | } 40 | 41 | #logo img{ 42 | height: 59px; 43 | margin: 3px 6px; 44 | } 45 | 46 | 47 | /* Navigation Bar: List Styling */ 48 | 49 | #navbar ul{ 50 | display: flex; 51 | font-family: 'Baloo Bhai', cursive; 52 | } 53 | 54 | #navbar ul li{ 55 | list-style: none; 56 | font-size: 1.3rem; 57 | } 58 | 59 | #navbar ul li a{ 60 | color: white; 61 | display: block; 62 | padding: 3px 22px; 63 | border-radius: 20px; 64 | text-decoration: none; 65 | } 66 | 67 | #navbar ul li a:hover{ 68 | color: black; 69 | background-color: white; 70 | } 71 | 72 | /*.container{ 73 | background: black; 74 | width: 100%; 75 | height: 100vh; 76 | display: flex; 77 | align-items: center; 78 | justify-content: center; 79 | } 80 | 81 | nav{ 82 | background:white; 83 | border-radius: 50px; 84 | padding: 10px; 85 | box-shadow:0 25px 20px -20px rgba(0,0,0,0.4); 86 | } 87 | 88 | nav ul li{ 89 | list-style: none; 90 | display: inline-block; 91 | padding: 13px 35px; 92 | margin: 10px; 93 | font-size: 18px; 94 | font-weight: 500; 95 | color: #777; 96 | cursor: pointer; 97 | position: relative; 98 | z-index: 2; 99 | transition: color 0.5s; 100 | } 101 | 102 | nav ul li::after{ 103 | content: ''; 104 | background: #fb5858; 105 | width: 100%; 106 | height: 100%; 107 | border-radius: 30px; 108 | position: absolute; 109 | top: 100%; 110 | left: 50%; 111 | transform: translate(-50%, -50%); 112 | z-index:-1; 113 | opacity: 0; 114 | transition: top 0.5s, opacity 0.5s; 115 | } 116 | 117 | nav ul li:hover{ 118 | color: white; 119 | } 120 | 121 | nav ul li:hover::after{ 122 | top:50%; 123 | opacity: 1; 124 | } */ 125 | 126 | /* Home Section */ 127 | #home{ 128 | display: flex; 129 | flex-direction: column; 130 | padding:3px 200px; 131 | height: 550px; 132 | justify-content: center; 133 | align-items: center; 134 | } 135 | 136 | #home::before{ 137 | content: ""; 138 | position: absolute; 139 | background: url('../images/bg3.jpg') no-repeat center center/cover; 140 | height: 642px; 141 | top:0px; 142 | left:0px; 143 | width: 100%; 144 | z-index: -1; 145 | opacity:0.89; 146 | } 147 | 148 | #home h1{ 149 | color:black; 150 | text-align: center; 151 | font-family: 'Bree Serif', serif; 152 | } 153 | 154 | #home p{ 155 | color:black; 156 | text-align: center; 157 | font-size: 1.5rem; 158 | font-family: 'Bree Serif', serif; 159 | } 160 | /* Services Section */ 161 | #services{ 162 | margin: 34px; 163 | display: flex; 164 | background: url('../images/bg1.jpg'); 165 | } 166 | #services .box{ 167 | border: 2px solid brown; 168 | padding: 34px; 169 | margin: 2px 55px; 170 | border-radius: 28px; 171 | background: #f2f2f2; 172 | margin-bottom: 20px; 173 | } 174 | 175 | #services .box img{ 176 | height: 160px; 177 | margin: auto; 178 | display: block; 179 | } 180 | 181 | #services .box p{ 182 | font-family: 'Bree Serif', serif; 183 | 184 | } 185 | 186 | /* Clients Section */ 187 | #client-section{ 188 | position: relative; 189 | } 190 | 191 | #client-section::before{ 192 | content: ""; 193 | position: absolute; 194 | background: url('../images/bg.jpg'); 195 | width: 100%; 196 | height: 100%; 197 | z-index: -1; 198 | opacity: 0.3; 199 | } 200 | 201 | #clients{ 202 | display: flex; 203 | justify-content: center; 204 | align-items: center; 205 | } 206 | 207 | .client-item{ 208 | padding: 34px; 209 | } 210 | 211 | #clients img{ 212 | height: 124px; 213 | } 214 | 215 | 216 | /* Contact Section */ 217 | #contact{ 218 | position: relative; 219 | } 220 | #contact::before{ 221 | content: ""; 222 | position: absolute; 223 | width: 100%; 224 | height: 100%; 225 | z-index: -1; 226 | opacity: 0.7; 227 | background: url('../images/contact.jpg') no-repeat center center/cover; 228 | 229 | } 230 | #contact-box{ 231 | display: flex; 232 | justify-content: center; 233 | align-items: center; 234 | padding-bottom: 34px; 235 | } 236 | #contact-box input, 237 | #contact-box textarea{ 238 | width: 100%; 239 | padding: 0.5rem; 240 | border-radius: 9px; 241 | font-size: 1.1rem; 242 | } 243 | 244 | #contact-box form{ 245 | width: 40%; 246 | } 247 | 248 | #contact-box label{ 249 | font-size: 1.3rem; 250 | font-family: 'Bree Serif', serif; 251 | 252 | } 253 | 254 | 255 | footer{ 256 | background: black; 257 | color: white; 258 | padding: 9px 20px; 259 | } 260 | 261 | /* Utility Classes */ 262 | .h-primary{ 263 | font-family: 'Bree Serif', serif; 264 | font-size: 3.8rem; 265 | padding: 12px; 266 | } 267 | 268 | .h-secondary{ 269 | font-family: 'Bree Serif', serif; 270 | font-size: 2.3rem; 271 | padding: 12px; 272 | } 273 | 274 | .btn{ 275 | padding: 6px 20px; 276 | border: 2px solid white; 277 | background-color: brown; 278 | color: white; 279 | margin: 17px; 280 | font-size: 1.5rem; 281 | border-radius: 10px; 282 | cursor:pointer; 283 | } 284 | 285 | .center{ 286 | text-align: center; 287 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🧙‍♂️ Hacktober Fest 2023 `Good First` (●'◡'●) 2 | ![hacktoberFest2023](.github/1cap1.png) 3 | 4 | # World of Open Sorcery Awaits! 🗺️🧙‍♂️ 5 | 6 | ☄🌠 This year Marks the 10th anniversary of Hacktoberfest, and we all can Celebrate🎉 7 | 8 | 🎯 Sign up for Hacktober, Learn and contribut towards Open Source, Fork repos make pull requests etc, and win digital swags and get a tree planted 🎄 9 | 10 | 🎆 Open Sorcery Hacktoberfest 2023: Contribute to open source, learn. Beginner-friendly. Explore issues, fork, code, and make a global impact. Let's collaborate! 11 | 12 | 🎐 Submit your first contribution to a participating project to get started with Hacktoberfest2023! 13 | 14 | # [Register For Hacktoberfest 2023](https://hacktoberfest.com/participation/) 👈 15 | 16 | # Task 1.0 `Initiation` 17 | Lets Contribute, Follow the instruction mentioned and make yourself Known. 18 | 19 | ## 👨‍💻INSTRUCTIONS👩‍💻 20 | 21 | - Fork this Repository using the button at the top on right corner. 22 | 23 | ![img_fork](https://github.com/syed7086/Hacktober23/assets/85676664/228965f8-6d47-47c1-895c-f932bd1533a3) 24 | 25 | 26 | - Clone this repo to you local Machine `git clone https://github.com/Boltjazz/Hacktober23.git` 27 | 28 | ![img_fork](https://github.com/Boltjazz/Hacktober23/assets/110303755/c342820b-2c10-46f3-94d4-c202b79052df) 29 | 30 | - Carve your own path with a new branch for your modifications and you can also do google search of how to push and open pull requests, this is a learning process (ie. `git branch new-user` or simply do `git checkout -b new-user`, Check all branches `git branch` to see all branches) 31 | 32 | - Add youself by navigating to `gitfetch.js` file and scroll to line 55, copy the above code and add you Github & Linkedin user id, the api will fetch everything 33 | 34 | ![Gitfetch.js](https://github.com/Boltjazz/Hacktober23/assets/110303755/ab49befc-452c-4f78-80ef-056bc31e6773) 35 | 36 | - If everything works Congratulations you are just 1 step away from you first Contribution 37 | 38 | - The 🧙‍♂️ wizard once said `If it works Don't touch it` 😐 39 | 40 | - Now just use either the Gui interface of `vscode` or `git teminal` for commiting changes `git add .`, `git commit -m "Hacking Wizards"`, the `git push origin ` `main or new-user` 41 | 42 | - Before creating a pull request check if your forked branch is behind the main, update your branch 43 | 44 | - Create a pull request 45 | 46 | - Wait for the request to be accepted or contact me 47 | 48 | - Star this repository 49 | 50 | 51 | ## 📢 [Do checkout Task 2](https://github.com/Boltjazz/Hacktober23/tree/main/Task2)🐱‍🏍 52 | 53 | - Read the md file for instructions , Enjoy the process. 54 | 55 | - Add famous Algorithms, Problems, Leetcode Solutions etc 56 | 57 | 58 | 59 | # 🔥2023 Wizards🧙‍♂️ 60 |
61 | 62 | 63 | 64 | 65 |
66 | -------------------------------------------------------------------------------- /Task2/Comp_coding/1_Count_Common_Factor.py: -------------------------------------------------------------------------------- 1 | def count_common_factors(a, b): 2 | # Initialize a counter variable to keep track of the number of common factors 3 | count = 0 4 | # Iterate over all possible factors of a and b 5 | for i in range(1, min(a, b)+1): 6 | # If i is a factor of both a and b, increment the counter 7 | if a % i == 0 and b % i == 0: 8 | count += 1 9 | # Return the final count of common factors 10 | return count 11 | 12 | # Prompt the user to enter two numbers 13 | a = int(input("Enter the first number: ")) 14 | b = int(input("Enter the second number: ")) 15 | 16 | # Call the count_common_factors function with the user's input and print the result 17 | print("The number of common factors are: ", count_common_factors(a, b)) -------------------------------------------------------------------------------- /Task2/Comp_coding/2_Does_it_Divide.py: -------------------------------------------------------------------------------- 1 | Problem Statement: Consider a permutation of numbers from 1 to N written on a paper. Let’s denote the product of its element as ‘prod’ and the sum of its elements as ‘sum’. Given a positive integer N, your task is to determine whether ‘prod’ is divisible by ‘sum’ or not. 2 | 3 | Input Format: First input will be an integer T. It depicts a number of test cases. Followed by the value for each test case. Each test case will contain an integer N (1<= N <=10^9). It is nothing but the length of the permutation. 4 | 5 | Output Format: For each test case, print “YEAH” if ‘prod’ is divisible by ‘sum’, otherwise print “NAH”. 6 | 7 | Input: 8 | 9 | 2 10 | 2 11 | 3 12 | 13 | Output: 14 | 15 | YEAH 16 | NAH 17 | 18 | 19 | "You can solve the code in any language you want just change the extenshion of the file and make sure it run , you can the 20 | commit the code" 21 | ------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Task2/Comp_coding/3_Stocks.py: -------------------------------------------------------------------------------- 1 | This competitive coding question is asked in Goldman Sachs.: 2 | 3 | Problem Statement: Suppose you have given the stock prices for respective days like (100, 180, 260, 310, 40, 535, 695). The stock price for the 1st day is 100, the 2nd day it is 180 and so on. Write a Python program to determine what days the user should buy and sell the stocks to get the maximum profit. 4 | 5 | In the above case, in the following scenarios user will get maximum profit. 6 | 7 | Buy stock on 1st day (100) 8 | Sell stock on 4th day (310) 9 | Buy stock on 5th day (100) 10 | Sell stock on 7th day (695) 11 | Algorithm steps: 12 | 13 | Find the local minima (buying stock) 14 | Find local maxima (selling stock) 15 | Repeat until all days are covered. 16 | 17 | Output: 18 | 19 | buy stock on day 1 100 20 | sell stock on day 4 310 21 | buy stock on day 5 40 22 | sell stock on day 7 695 23 | 24 | "You can solve the code in any language you want just change the extenshion of the file and make sure it run , you can the 25 | commit the code" 26 | 27 | --- 28 | -------------------------------------------------------------------------------- /Task2/Comp_coding/4_MorganStanley.py: -------------------------------------------------------------------------------- 1 | Problem statement: 2 | 3 | You have given an array (list in the case of Python). Find the index of the element in the array such that the sum of all the elements left to the index is equal to the sum of all the elements right to the index. 4 | 5 | This question can also be asked as 6 | 7 | Split the array into equal sum subarrays. 8 | 9 | Example: 10 | 11 | Input (given array list): 12 | [2, 4, 5, 1, 2, 3] 13 | 14 | Output: 15 | 2 16 | 17 | Explanation: 18 | The left and right sub array for the index "2" is [2, 4] and [1, 2, 3]. The sum of both the sub array is 6. 19 | There are multiple ways to find the index of the array such that the sum of the left and right subarray is equal. 20 | 21 | "You can solve the code in any language you want just change the extenshion of the file and make sure it run , you can the 22 | commit the code" , at that time comment the whole question accourding to the language working with. 23 | ---------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /Task2/Comp_coding/Does_it_Divide.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int T; // Number of test cases 5 | std::cin >> T; // Input the number of test cases 6 | 7 | while (T--) { // Loop through each test case 8 | int N; // The value for each test case 9 | std::cin >> N; // Input the value 10 | 11 | long long sum = 0; // Initialize a variable to store the sum 12 | long long prod = 1; // Initialize a variable to store the product 13 | 14 | // Calculate the sum and product from 1 to N 15 | for (int i = 1; i <= N; ++i) { 16 | sum += i; // Add i to the sum 17 | prod *= i; // Multiply i to the product 18 | } 19 | 20 | // Check if the product is divisible by the sum 21 | if (prod % sum == 0) { 22 | std::cout << "YEAH" << std::endl; // If divisible, print "YEAH" 23 | } else { 24 | std::cout << "NAH" << std::endl; // If not divisible, print "NAH" 25 | } 26 | } 27 | 28 | return 0; // Exit the program 29 | } 30 | -------------------------------------------------------------------------------- /Task2/Comp_coding/Famous C++ algorithms/bubble_sort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | void bubbleSort(int arr[], int n) 5 | { 6 | int i, j; 7 | bool swapped; 8 | for (i = 0; i < n - 1; i++) 9 | { 10 | swapped = false; 11 | for (j = 0; j < n - i - 1; j++) 12 | { 13 | if (arr[j] > arr[j + 1]) 14 | { 15 | swap(arr[j], arr[j + 1]); 16 | swapped = true; 17 | } 18 | } 19 | 20 | if (swapped == false) 21 | break; 22 | } 23 | } 24 | 25 | int main() 26 | { 27 | int arr[] = {64, 34, 25, 12, 22, 11, 90}; 28 | int N = sizeof(arr) / sizeof(arr[0]); 29 | bubbleSort(arr, N); 30 | cout << "Sorted array: \n"; 31 | 32 | int i; 33 | for (i = 0; i < size; i++) 34 | cout << " " << arr[i]; 35 | 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /Task2/Comp_coding/Max-Subarray_sum.c: -------------------------------------------------------------------------------- 1 | #Given an array of integers, find the maximum subarray sum, where a subarray is defined as a contiguous subset of the array. 2 | 3 | #include 4 | 5 | int maxSubarraySum(int arr[], int n) { 6 | int maxSum = arr[0]; // Initialize maxSum with the first element of the array 7 | int currentSum = arr[0]; // Initialize currentSum with the first element of the array 8 | 9 | for (int i = 1; i < n; i++) { 10 | // Choose the maximum of the current element or the current element + currentSum 11 | currentSum = (arr[i] > currentSum + arr[i]) ? arr[i] : currentSum + arr[i]; 12 | 13 | // Update maxSum if currentSum becomes larger 14 | maxSum = (currentSum > maxSum) ? currentSum : maxSum; 15 | } 16 | 17 | return maxSum; 18 | } 19 | 20 | int main() { 21 | int n; 22 | scanf("%d", &n); 23 | 24 | int arr[n]; 25 | for (int i = 0; i < n; i++) { 26 | scanf("%d", &arr[i]); 27 | } 28 | 29 | int result = maxSubarraySum(arr, n); 30 | printf("Maximum subarray sum is: %d\n", result); 31 | 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /Task2/Comp_coding/MorganStanley.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int findEqualSumIndex(std::vector& arr) { 5 | int n = arr.size(); 6 | 7 | 8 | int totalSum = 0; 9 | for (int i = 0; i < n; i++) { 10 | totalSum += arr[i]; 11 | } 12 | 13 | int leftSum = 0; 14 | 15 | for (int i = 0; i < n; i++) { 16 | 17 | totalSum -= arr[i]; 18 | 19 | if (leftSum == totalSum) { 20 | return i; 21 | } 22 | 23 | leftSum += arr[i]; 24 | } 25 | 26 | 27 | return -1; 28 | } 29 | 30 | int main() { 31 | std::vector arr = {2, 4, 5, 1, 2, 3}; 32 | 33 | int equalSumIndex = findEqualSumIndex(arr); 34 | 35 | if (equalSumIndex != -1) { 36 | std::cout << "Index where the sum of left and right subarrays is equal: " << equalSumIndex << std::endl; 37 | } else { 38 | std::cout << "No such index found." << std::endl; 39 | } 40 | 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /Task2/Comp_coding/Stocks.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int findMaxProfit(std::vector& prices, std::vector& buyDays, std::vector& sellDays) { 5 | int n = prices.size(); 6 | int i = 0; 7 | int maxProfit = 0; 8 | 9 | while (i < n - 1) { 10 | 11 | while (i < n - 1 && prices[i + 1] <= prices[i]) { 12 | i++; 13 | } 14 | 15 | if (i == n - 1) { 16 | break; 17 | } 18 | 19 | int buy = i++; 20 | 21 | 22 | while (i < n && prices[i] >= prices[i - 1]) { 23 | i++; 24 | } 25 | 26 | int sell = i - 1; 27 | 28 | int profit = prices[sell] - prices[buy]; 29 | maxProfit += profit; 30 | 31 | buyDays.push_back(buy + 1); 32 | sellDays.push_back(sell + 1); 33 | } 34 | 35 | return maxProfit; 36 | } 37 | 38 | int main() { 39 | std::vector prices = {100, 180, 260, 310, 40, 535, 695}; 40 | std::vector buyDays; 41 | std::vector sellDays; 42 | 43 | int maxProfit = findMaxProfit(prices, buyDays, sellDays); 44 | 45 | std::cout << "Maximum Profit: " << maxProfit << std::endl; 46 | 47 | for (int i = 0; i < buyDays.size(); i++) { 48 | std::cout << "Buy stock on day " << buyDays[i] << " (" << prices[buyDays[i] - 1] << ")\n"; 49 | std::cout << "Sell stock on day " << sellDays[i] << " (" << prices[sellDays[i] - 1] << ")\n"; 50 | } 51 | 52 | return 0; 53 | } -------------------------------------------------------------------------------- /Task2/Comp_coding/armstrong_range.c: -------------------------------------------------------------------------------- 1 | /* Write a program in C to display Armstrong numbers in a range */ 2 | 3 | 4 | #include 5 | #include 6 | 7 | void main() { 8 | int n1,n2,i,num_copy,num1_copy,p,digits = 0,sum = 0; 9 | 10 | printf("Enter the lower limit: "); 11 | scanf("%d",&n1); 12 | 13 | printf("Enter the upper limit: "); 14 | scanf("%d",&n2); 15 | 16 | for (i = n1; i <= n2; i++) { 17 | num_copy = i; 18 | num1_copy = i; 19 | while(num_copy > 0) { 20 | num_copy/=10; 21 | digits++; 22 | } 23 | while(num1_copy > 0) { 24 | p = num1_copy%10; 25 | sum += pow(p,digits); 26 | num1_copy/=10; 27 | } 28 | 29 | if (sum == i) { 30 | printf("%d\t",i); 31 | } 32 | digits = 0; 33 | sum = 0; 34 | 35 | } 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /Task2/Comp_coding/remove_duplicates.py: -------------------------------------------------------------------------------- 1 | ''' 2 | Given a SORTED array, remove all the duplicates from the array. 3 | 4 | Input - [0,0,1,1,1,2,2,3,3,4] 5 | Output - [0,1,2,3,4] 6 | ''' 7 | 8 | def Remove_Duplicates(L1): 9 | 10 | i = 1 11 | check = L1[0] 12 | 13 | while i < len(L1): 14 | 15 | if check == L1[i]: 16 | L1.pop(i) 17 | i -= 1 18 | 19 | else: 20 | check = L1[i] 21 | 22 | i += 1 23 | 24 | print(L1) 25 | 26 | Remove_Duplicates( [0, 0, 1, 1, 1, 2, 2, 3, 3, 4] ) -------------------------------------------------------------------------------- /Task2/DataStructures/C++/RemoveDuplicateUnsortedLL.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | class Node 6 | { 7 | public: 8 | int data; 9 | Node *next; 10 | 11 | Node(int d) 12 | { 13 | this->data = d; 14 | this->next = NULL; 15 | } 16 | }; 17 | 18 | void insertAtHead(Node *&head, int d) 19 | { 20 | if (head == NULL) 21 | { 22 | Node *newNode = new Node(d); 23 | // newNode->next = head; 24 | head = newNode; 25 | } 26 | 27 | else 28 | { 29 | Node *newNode = new Node(d); 30 | newNode->next = head; 31 | head = newNode; 32 | } 33 | } 34 | 35 | Node *removeDuplicates(Node *head) 36 | { 37 | 38 | if (head == NULL) 39 | { 40 | return NULL; 41 | } 42 | unordered_map visited; 43 | Node *prev = NULL; 44 | Node *temp = head; 45 | 46 | while (temp != NULL) 47 | { 48 | if (visited.find(temp->data) != visited.end()) 49 | { 50 | prev->next = temp->next; 51 | delete (temp); 52 | } 53 | else 54 | { 55 | // traverse 56 | visited[temp->data] = true; 57 | prev = temp; 58 | } 59 | temp = prev->next; 60 | } 61 | 62 | return head; 63 | } 64 | 65 | void print(Node *head) 66 | { 67 | Node *temp = head; 68 | while (temp != NULL) 69 | { 70 | cout << temp->data << " "; 71 | temp = temp->next; 72 | } 73 | cout << endl; 74 | } 75 | int main() 76 | { 77 | 78 | Node *head = NULL; 79 | 80 | insertAtHead(head, 8); 81 | insertAtHead(head, 9); 82 | insertAtHead(head, 4); 83 | insertAtHead(head, 8); 84 | insertAtHead(head, 9); 85 | insertAtHead(head, 7); 86 | print(head); 87 | 88 | removeDuplicates(head); 89 | 90 | print(head); 91 | 92 | return 0; 93 | } -------------------------------------------------------------------------------- /Task2/DataStructures/Python/BubbleSort.py: -------------------------------------------------------------------------------- 1 | # Python program for implementation of Bubble Sort 2 | 3 | def bubbleSort(arr): 4 | n = len(arr) 5 | # optimize code, so if the array is already sorted, it doesn't need 6 | # to go through the entire process 7 | swapped = False 8 | # Traverse through all array elements 9 | for i in range(n-1): 10 | # range(n) also work but outer loop will 11 | # repeat one time more than needed. 12 | # Last i elements are already in place 13 | for j in range(0, n-i-1): 14 | 15 | # traverse the array from 0 to n-i-1 16 | # Swap if the element found is greater 17 | # than the next element 18 | if arr[j] > arr[j + 1]: 19 | swapped = True 20 | arr[j], arr[j + 1] = arr[j + 1], arr[j] 21 | 22 | if not swapped: 23 | # if we haven't needed to make a single swap, we 24 | # can just exit the main loop. 25 | return 26 | 27 | 28 | # Driver code to test above 29 | arr = [64, 34, 25, 12, 22, 11, 90] 30 | 31 | bubbleSort(arr) 32 | 33 | print("Sorted array is:") 34 | for i in range(len(arr)): 35 | print("% d" % arr[i], end=" ") 36 | -------------------------------------------------------------------------------- /Task2/DataStructures/Python/Dijkstra.py: -------------------------------------------------------------------------------- 1 | # Dijkstra's Algorithm in python to find the shortest path 2 | # with minimum edges in a graph 3 | def Dijkstra(Graph, _s, _d): 4 | row = len(Graph) 5 | col = len(Graph[0]) 6 | dist = [float("Inf")] * row 7 | Blackened =[0] * row 8 | pathlength =[0] * row 9 | parent = [-1] * row 10 | dist[_s]= 0 11 | for count in range(row-1): 12 | u = MinDistance(dist, Blackened) 13 | 14 | # if MinDistance() returns INFINITY, then the graph is not 15 | # connected and we have traversed all of the vertices in the 16 | # connected component of the source vertex, so it can reduce 17 | # the time complexity sometimes 18 | # In a directed graph, it means that the source vertex 19 | # is not a root 20 | if u == float("Inf"): 21 | break 22 | else: 23 | 24 | # Mark the vertex as Blackened 25 | Blackened[u]= 1 26 | for v in range(row): 27 | if Blackened[v]== 0 and Graph[u][v] and dist[u]+Graph[u][v]", _d,end='') 48 | def MinDistance(dist, Blackened): 49 | min = float("Inf") 50 | for v in range(len(dist)): 51 | if not Blackened[v] and dist[v]',fin) #terminal definition 4 | else: 5 | # move n-1 disks from A to B, with C as temp 6 | toh(n-1, init, fin, temp) 7 | #move disk from A to C, with B as temp 8 | toh(1, init, temp, fin) 9 | # move n-1 disks from B to C, with A as temp 10 | toh(n-1, temp, init, fin) 11 | # Tower of hanoi 12 | k=int(input('number of disks: \n')) 13 | toh(k,'A','B','C') 14 | -------------------------------------------------------------------------------- /Task2/DataStructures/Python/TreeTraversals.py: -------------------------------------------------------------------------------- 1 | class TreeNode: 2 | def __init__(self, value): 3 | self.value = value 4 | self.left = None 5 | self.right = None 6 | 7 | def inorder_traversal(node): 8 | if node: 9 | inorder_traversal(node.left) 10 | print(node.value, end=" ") 11 | inorder_traversal(node.right) 12 | 13 | def preorder_traversal(node): 14 | if node: 15 | print(node.value, end=" ") 16 | preorder_traversal(node.left) 17 | preorder_traversal(node.right) 18 | 19 | def postorder_traversal(node): 20 | if node: 21 | postorder_traversal(node.left) 22 | postorder_traversal(node.right) 23 | print(node.value, end=" ") 24 | 25 | def build_binary_tree(): 26 | value = input("Enter the value for the root node: ") 27 | root = TreeNode(value) 28 | stack = [root] 29 | 30 | while stack: 31 | current_node = stack.pop() 32 | left_value = input(f"Enter the left child value of {current_node.value} (or 'None'): ") 33 | if left_value.lower() != 'none': 34 | current_node.left = TreeNode(left_value) 35 | stack.append(current_node.left) 36 | 37 | right_value = input(f"Enter the right child value of {current_node.value} (or 'None'): ") 38 | if right_value.lower() != 'none': 39 | current_node.right = TreeNode(right_value) 40 | stack.append(current_node.right) 41 | 42 | return root 43 | 44 | # Build a binary tree based on user input 45 | root = build_binary_tree() 46 | 47 | print("\nInorder Traversal:") 48 | inorder_traversal(root) 49 | 50 | print("\nPreorder Traversal:") 51 | preorder_traversal(root) 52 | 53 | print("\nPostorder Traversal:") 54 | postorder_traversal(root) 55 | -------------------------------------------------------------------------------- /Task2/DataStructures/Python/binary_tree.py: -------------------------------------------------------------------------------- 1 | class Node: 2 | """ 3 | A class representing a node in a binary tree. 4 | """ 5 | def __init__(self, value): 6 | """ 7 | Initializes a new instance of the Node class. 8 | 9 | :param value: The value of the node. 10 | """ 11 | self.value = value 12 | self.left = None 13 | self.right = None 14 | 15 | class BinaryTree: 16 | """ 17 | A class representing a binary tree. 18 | """ 19 | def __init__(self): 20 | """ 21 | Initializes a new instance of the BinaryTree class. 22 | """ 23 | self.root = None 24 | 25 | def insert(self, value): 26 | """ 27 | Inserts a new node with the given value into the binary tree. 28 | 29 | :param value: The value of the node to insert. 30 | """ 31 | if self.root is None: 32 | self.root = Node(value) 33 | else: 34 | self._insert(value, self.root) 35 | 36 | def _insert(self, value, node): 37 | """ 38 | Helper method for inserting a new node with the given value into the binary tree. 39 | 40 | :param value: The value of the node to insert. 41 | :param node: The current node being evaluated. 42 | """ 43 | direction = input(f"Do you want to insert {value} to the left or right of {node.value}? (l/r): ") 44 | if direction.lower() == "l": 45 | if node.left is None: 46 | node.left = Node(value) 47 | else: 48 | self._insert(value, node.left) 49 | elif direction.lower() == "r": 50 | if node.right is None: 51 | node.right = Node(value) 52 | else: 53 | self._insert(value, node.right) 54 | else: 55 | print("Invalid direction. Please enter 'l' or 'r'.") 56 | self._insert(value, node) 57 | def _delete(self, value, node): 58 | """ 59 | Helper method for deleting the node with the given value from the binary tree. 60 | 61 | :param value: The value of the node to delete. 62 | :param node: The current node being evaluated. 63 | """ 64 | if node is None: 65 | print(f"{value} not found in tree.") 66 | elif value < node.value: 67 | node.left = self._delete(value, node.left) 68 | elif value > node.value: 69 | node.right = self._delete(value, node.right) 70 | else: 71 | if node.left is None: 72 | return node.right 73 | elif node.right is None: 74 | return node.left 75 | else: 76 | temp = self._find_min(node.right) 77 | node.value = temp.value 78 | node.right = self._delete(temp.value, node.right) 79 | return node 80 | 81 | def _find_min(self, node): 82 | """ 83 | Helper method for finding the node with the minimum value in a subtree. 84 | 85 | :param node: The root of the subtree to search. 86 | :return: The node with the minimum value in the subtree. 87 | """ 88 | while node.left is not None: 89 | node = node.left 90 | return node 91 | 92 | def traverse_inorder(self): 93 | """ 94 | Traverses the binary tree in inorder. 95 | 96 | :return: A list of the values of the nodes in the binary tree in inorder. 97 | """ 98 | return self._traverse_inorder(self.root, []) 99 | 100 | def _traverse_inorder(self, node, result): 101 | """ 102 | Helper method for traversing the binary tree in inorder. 103 | 104 | :param node: The current node being evaluated. 105 | :param result: The list of values of the nodes visited so far. 106 | :return: A list of the values of the nodes in the binary tree in inorder. 107 | """ 108 | if node is not None: 109 | self._traverse_inorder(node.left, result) 110 | result.append(node.value) 111 | self._traverse_inorder(node.right, result) 112 | return result 113 | 114 | 115 | if __name__ == "__main__": 116 | tree = BinaryTree() 117 | 118 | root_value = int(input("Enter the value of the root node: ")) 119 | tree.insert(root_value) 120 | 121 | while True: 122 | choice = input("Do you want to add another node? (y/n): ") 123 | if choice.lower() == "n": 124 | break 125 | 126 | value = int(input("Enter the value of the node: ")) 127 | tree.insert(value) 128 | 129 | print("Inorder traversal:", tree.traverse_inorder()) 130 | 131 | while True: 132 | choice = input("Do you want to delete a node? (y/n): ") 133 | if choice.lower() == "n": 134 | break 135 | 136 | value = int(input("Enter the value of the node to delete: ")) 137 | node = tree.find(value) 138 | if node is None: 139 | print(f"{value} not found in tree.") 140 | else: 141 | confirm = input(f"Are you sure you want to delete {value}? (y/n): ") 142 | if confirm.lower() == "y": 143 | tree.delete(value) 144 | print(f"{value} deleted from tree.") 145 | else: 146 | print(f"{value} not deleted from tree.") 147 | 148 | print("Inorder traversal:", tree.traverse_inorder()) -------------------------------------------------------------------------------- /Task2/DataStructures/Python/bubble_sort.py: -------------------------------------------------------------------------------- 1 | def bubble_sort(arr): 2 | n = len(arr) 3 | 4 | for i in range(n): 5 | for j in range(0, n-i-1): 6 | 7 | if arr[j] > arr[j+1]: 8 | arr[j], arr[j+1] = arr[j+1], arr[j] 9 | 10 | my_list = [64, 34, 25, 12, 22, 11, 90] 11 | bubble_sort(my_list) 12 | 13 | print("Sorted array is:", my_list) -------------------------------------------------------------------------------- /Task2/DataStructures/Python/insertion_sort.py: -------------------------------------------------------------------------------- 1 | def insertion_sort(arr): 2 | 3 | for i in range(1, len(arr)): 4 | key = arr[i] 5 | j = i-1 6 | while j >= 0 and key < arr[j]: 7 | arr[j+1] = arr[j] 8 | j -= 1 9 | 10 | arr[j+1] = key 11 | 12 | my_list = [64, 34, 25, 12, 22, 11, 90] 13 | insertion_sort(my_list) 14 | 15 | print("Sorted array is:", my_list) -------------------------------------------------------------------------------- /Task2/DataStructures/Python/merge_sort.py: -------------------------------------------------------------------------------- 1 | def merge_sort(arr): 2 | if len(arr) > 1: 3 | mid = len(arr) // 2 4 | left_half = arr[:mid] 5 | right_half = arr[mid:] 6 | 7 | merge_sort(left_half) 8 | merge_sort(right_half) 9 | 10 | i = j = k = 0 11 | 12 | while i < len(left_half) and j < len(right_half): 13 | if left_half[i] < right_half[j]: 14 | arr[k] = left_half[i] 15 | i += 1 16 | else: 17 | arr[k] = right_half[j] 18 | j += 1 19 | k += 1 20 | 21 | while i < len(left_half): 22 | arr[k] = left_half[i] 23 | i += 1 24 | k += 1 25 | 26 | while j < len(right_half): 27 | arr[k] = right_half[j] 28 | j += 1 29 | k += 1 30 | 31 | my_list = [64, 34, 25, 12, 22, 11, 90] 32 | merge_sort(my_list) 33 | 34 | print("Sorted array is:", my_list) -------------------------------------------------------------------------------- /Task2/DataStructures/Python/selection_sort.py: -------------------------------------------------------------------------------- 1 | def selection_sort(arr): 2 | 3 | for i in range(len(arr)): 4 | min_index = i 5 | for j in range(i+1, len(arr)): 6 | if arr[j] < arr[min_index]: 7 | min_index = j 8 | 9 | arr[i], arr[min_index] = arr[min_index], arr[i] 10 | 11 | my_list = [64, 34, 25, 12, 22, 11, 90] 12 | selection_sort(my_list) 13 | 14 | print("Sorted array is:", my_list) -------------------------------------------------------------------------------- /Task2/Famous C++ algorithms/binary_search.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boltjazz/Hacktober23/f21d37903fb6cf41ea06e53528fc444265da5f8a/Task2/Famous C++ algorithms/binary_search.cpp -------------------------------------------------------------------------------- /Task2/Famous C++ algorithms/merge_sort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void merge(std::vector& vec, int left, int middle, int right) { 5 | int n1 = middle - left + 1; 6 | int n2 = right - middle; 7 | 8 | 9 | std::vector leftArray(n1); 10 | std::vector rightArray(n2); 11 | 12 | 13 | for (int i = 0; i < n1; i++) 14 | leftArray[i] = vec[left + i]; 15 | for (int i = 0; i < n2; i++) 16 | rightArray[i] = vec[middle + 1 + i]; 17 | 18 | 19 | int i = 0, j = 0, k = left; 20 | while (i < n1 && j < n2) { 21 | if (leftArray[i] <= rightArray[j]) { 22 | vec[k] = leftArray[i]; 23 | i++; 24 | } else { 25 | vec[k] = rightArray[j]; 26 | j++; 27 | } 28 | k++; 29 | } 30 | 31 | while (i < n1) { 32 | vec[k] = leftArray[i]; 33 | i++; 34 | k++; 35 | } 36 | 37 | while (j < n2) { 38 | vec[k] = rightArray[j]; 39 | j++; 40 | k++; 41 | } 42 | } 43 | 44 | void mergeSort(std::vector& vec, int left, int right) { 45 | if (left < right) { 46 | 47 | int middle = left + (right - left) / 2; 48 | 49 | mergeSort(vec, left, middle); 50 | mergeSort(vec, middle + 1, right); 51 | 52 | merge(vec, left, middle, right); 53 | } 54 | } 55 | 56 | int main() { 57 | std::vector arr = {12, 11, 13, 5, 6, 7}; 58 | int size = arr.size(); 59 | 60 | std::cout << "Original Array: "; 61 | for (int i = 0; i < size; i++) { 62 | std::cout << arr[i] << " "; 63 | } 64 | 65 | mergeSort(arr, 0, size - 1); 66 | 67 | std::cout << "\nSorted Array: "; 68 | for (int i = 0; i < size; i++) { 69 | std::cout << arr[i] << " "; 70 | } 71 | 72 | return 0; 73 | } 74 | -------------------------------------------------------------------------------- /Task2/Famous C++ algorithms/quick_sort.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int partition(std::vector& arr, int low, int high) { 5 | int pivot = arr[high]; 6 | int i = low - 1; 7 | 8 | for (int j = low; j < high; j++) { 9 | if (arr[j] <= pivot) { 10 | i++; 11 | std::swap(arr[i], arr[j]); 12 | } 13 | } 14 | std::swap(arr[i + 1], arr[high]); 15 | return i + 1; 16 | } 17 | 18 | void quickSort(std::vector& arr, int low, int high) { 19 | if (low < high) { 20 | int pi = partition(arr, low, high); 21 | quickSort(arr, low, pi - 1); 22 | quickSort(arr, pi + 1, high); 23 | } 24 | } 25 | 26 | int main() { 27 | std::vector arr = {10, 7, 8, 9, 1, 5}; 28 | int n = arr.size(); 29 | 30 | std::cout << "Original array: "; 31 | for (int i = 0; i < n; i++) 32 | std::cout << arr[i] << " "; 33 | std::cout << std::endl; 34 | 35 | quickSort(arr, 0, n - 1); 36 | 37 | std::cout << "Sorted array: "; 38 | for (int i = 0; i < n; i++) 39 | std::cout << arr[i] << " "; 40 | std::cout << std::endl; 41 | 42 | return 0; 43 | } -------------------------------------------------------------------------------- /Task2/Projects/GUI_Calculator_Python/Calculator.py: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | root = Tk() 3 | root.geometry('350x400') 4 | root.title("Calculator") 5 | 6 | def click(Event): 7 | global calci 8 | text = Event.widget.cget("text") 9 | if text == "=": 10 | if calci.get().isdigit(): 11 | value = (int(calci.get())) 12 | else: 13 | value = eval(calci.get()) 14 | calci.set(value) 15 | ent.update() 16 | elif text == "C": 17 | calci.set("") 18 | ent.update() 19 | else: 20 | calci.set(calci.get()+text) 21 | ent.update() 22 | 23 | 24 | calci = StringVar() 25 | calci.set("") 26 | 27 | ent = Entry(root, textvariable=calci, width=40, font=("Arial Bold", 40)) 28 | ent.pack(fill=X, padx=10, pady=10) 29 | 30 | f = Frame(bg="pink") 31 | b = Button(f, text="C", padx=10, font=("Arial Bold", 20)) 32 | b.pack(side=LEFT, padx=10, pady=10) 33 | b.bind("", click) 34 | 35 | b = Button(f, text="9", padx=10, font=("Arial Bold", 20)) 36 | b.pack(side=LEFT, padx=10, pady=10) 37 | b.bind("", click) 38 | 39 | 40 | b = Button(f, text="8", padx=10, font=("Arial Bold", 20)) 41 | b.pack(side=LEFT, padx=10, pady=10) 42 | b.bind("", click) 43 | 44 | 45 | b = Button(f, text="7", padx=10, font=("Arial Bold", 20)) 46 | b.pack(side=LEFT, padx=10, pady=10) 47 | b.bind("", click) 48 | f.pack() 49 | 50 | f = Frame(bg="pink") 51 | b = Button(f, text="+", padx=10, font=("Arial Bold", 20)) 52 | b.pack(side=LEFT, padx=12, pady=10) 53 | b.bind("", click) 54 | 55 | b = Button(f, text="6", padx=10, font=("Arial Bold", 20)) 56 | b.pack(side=LEFT, padx=10, pady=10) 57 | 58 | b.bind("", click) 59 | 60 | 61 | b = Button(f, text="5", padx=10, font=("Arial Bold", 20)) 62 | b.pack(side=LEFT, padx=10, pady=10) 63 | b.bind("", click) 64 | 65 | 66 | b = Button(f, text="4", padx=10, font=("Arial Bold", 20)) 67 | b.pack(side=RIGHT, padx=10, pady=10) 68 | b.bind("", click) 69 | f.pack() 70 | 71 | 72 | f = Frame(bg="pink") 73 | b = Button(f, text="-", padx=12, font=("Arial Bold", 20)) 74 | b.pack(side=LEFT, padx=13, pady=10) 75 | b.bind("", click) 76 | 77 | b = Button(f, text="3", padx=10, font=("Arial Bold", 20)) 78 | b.pack(side=LEFT, padx=9, pady=10) 79 | b.bind("", click) 80 | 81 | 82 | b = Button(f, text="2", padx=10, font=("Arial Bold", 20)) 83 | b.pack(side=LEFT, padx=11, pady=10) 84 | b.bind("", click) 85 | 86 | 87 | b = Button(f, text="1", padx=10, font=("Arial Bold", 20)) 88 | b.pack(side=LEFT, padx=11, pady=10) 89 | b.bind("", click) 90 | f.pack() 91 | 92 | f = Frame(bg="pink") 93 | 94 | 95 | b = Button(f, text="*", padx=13, font=("Arial Bold", 20)) 96 | b.pack(side=LEFT, padx=10, pady=10) 97 | b.bind("", click) 98 | 99 | b = Button(f, text="/", padx=10, font=("Arial Bold", 20)) 100 | b.pack(side=LEFT, padx=10, pady=10) 101 | b.bind("", click) 102 | 103 | 104 | b = Button(f, text="%", padx=10, font=("Arial Bold", 20)) 105 | b.pack(side=LEFT, padx=10, pady=10) 106 | b.bind("", click) 107 | 108 | 109 | b = Button(f, text="=", padx=10, font=("Arial Bold", 20)) 110 | b.pack(side=LEFT, padx=10, pady=10) 111 | b.bind("", click) 112 | f.pack() 113 | 114 | 115 | root.mainloop() 116 | -------------------------------------------------------------------------------- /Task2/Projects/HelloWorldInDiffLang/Hello_world.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main(void) 3 | { 4 | printf("Hello, World!"); 5 | } -------------------------------------------------------------------------------- /Task2/Projects/HelloWorldInDiffLang/Hello_world.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | int main() 4 | { 5 | cout << "Hello, World!"; 6 | return 0; 7 | } -------------------------------------------------------------------------------- /Task2/Projects/HelloWorldInDiffLang/Hello_world.java: -------------------------------------------------------------------------------- 1 | public class Hello_World { 2 | public static void main(String[] args) { 3 | System.out.println("Hello, World!"); 4 | } 5 | } -------------------------------------------------------------------------------- /Task2/Projects/HelloWorldInDiffLang/Hello_world.js: -------------------------------------------------------------------------------- 1 | console.log("Hello, World!"); -------------------------------------------------------------------------------- /Task2/Projects/HelloWorldInDiffLang/Hello_world.py: -------------------------------------------------------------------------------- 1 | print("Hello World!") -------------------------------------------------------------------------------- /Task2/Projects/HelloWorldInDiffLang/hello_world.rb: -------------------------------------------------------------------------------- 1 | puts "Hello, World!" 2 | 3 | -------------------------------------------------------------------------------- /Task2/README.md: -------------------------------------------------------------------------------- 1 | # Task 2 2 | 3 | - This task consistes of 3 folders in which u can contribut by looking in the issues section 4 | 5 | - You can add Folders with codes eg - `Famous C++ algorithms`, `Dynamic Programming` codes etc 6 | 7 | ## Competitive Coding 8 | - `Comp_coding` In this you con either solve the questiones metioned or add your own competitive question 9 | 10 | ## Data Structures 11 | - `DataStructures` Is for begineers who wish to contribute by coding different DSA question in any language just create a sub folder and code, `python` folder is already there you can add your own 12 | 13 | ## Projects 14 | - `Projects` Here anyone who wish to contribute by their projects can make a pull request be it AI/ML project or a Phone book, `It must be working` 15 | 16 | - try to make as many projects and you can ask to be assigned a project in Issues 17 | 18 |
19 |

Happy Open Sorcery

20 |
21 | -------------------------------------------------------------------------------- /assets/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boltjazz/Hacktober23/f21d37903fb6cf41ea06e53528fc444265da5f8a/assets/favicon-16x16.png -------------------------------------------------------------------------------- /assets/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Boltjazz/Hacktober23/f21d37903fb6cf41ea06e53528fc444265da5f8a/assets/favicon-32x32.png -------------------------------------------------------------------------------- /gitfetch.js: -------------------------------------------------------------------------------- 1 | // GO TO LINK 57 AND ADD YOURSELF AFTER THE LAST PERSON 2 | 3 | const githubIcon = ` 4 | 5 | 6 | `; 7 | 8 | const linkedinIcon = ` 9 | 10 | 11 | `; 12 | // Function to add a user profile with GitHub username and LinkedIn ID 13 | function addProfile() { 14 | const githubUsername = document.getElementById("githubUsername").value; 15 | const linkedinID = document.getElementById("linkedinID").value; 16 | 17 | // Check if both GitHub username and LinkedIn ID are provided 18 | if (githubUsername && linkedinID) { 19 | fetchGitHubData(githubUsername, linkedinID); 20 | } else { 21 | alert("Please enter both GitHub username and LinkedIn ID."); 22 | } 23 | } 24 | 25 | // Function to fetch and display GitHub user data 26 | async function fetchGitHubData(username, linkedinID) { 27 | try { 28 | const response = await fetch(`https://api.github.com/users/${username}`); 29 | if (!response.ok) { 30 | throw new Error("GitHub API request failed"); 31 | } 32 | const data = await response.json(); 33 | 34 | // Create a card for the user 35 | const card = document.createElement("div"); 36 | card.className = "card"; 37 | card.innerHTML = ` 38 | Profile Picture 41 |
${data.name || username}
42 | 46 | `; 47 | document.getElementById("profileContainer").appendChild(card); 48 | } catch (error) { 49 | console.error(error); 50 | alert("Failed to fetch GitHub data for " + username); 51 | } 52 | } 53 | 54 | // : Fetch GitHub data for multiple usernames with LinkedIn IDs add your git hub username and linkedin user id 55 | const profiles = [ 56 | { githubUsername: "boltjazz", linkedinID: "boltjazz" }, 57 | { githubUsername: "Ananyasingh2002 ", linkedinID: "ananya-singh-29b304224" }, 58 | { githubUsername: "Shambsri21", linkedinID: "savita-srivastava-9b81b3288" }, 59 | { githubUsername: "Rishabh0097", linkedinID: "rishabh-kumar-7a762928a" }, 60 | { githubUsername: "DomeT99", linkedinID: "domenico-tenace" }, 61 | { githubUsername: "adityagupta19", linkedinID: "adityagupta11219" }, 62 | { githubUsername: "msami625", linkedinID: "muhammad-sami-bhat" }, 63 | { githubUsername: "digvijaysinghh", linkedinID: "digvijaysinghh" }, 64 | { 65 | githubUsername: "chrishenderson07", 66 | linkedinID: "christopher-henderson-633495241", 67 | }, 68 | { githubUsername: "Rythm18", linkedinID: "ridham-khandar-a71841227" }, 69 | { 70 | githubUsername: "farukhfrk", 71 | linkedinID: "mahammad-farukh-uddin-aa16381ba", 72 | }, 73 | { githubUsername: "bkpecho", linkedinID: "bkpecho" }, 74 | { githubUsername: "Amit41z", linkedinID: "amit-kumar-ghosh-185165199" }, 75 | { githubUsername: "SyedSumaimaly", linkedinID: "syed-sumaim-al" }, 76 | { 77 | githubUsername: "SalamanderCtesiphon", 78 | linkedinID: "shannon-brookshire-817577265", 79 | }, 80 | { githubUsername: "nmnarora600", linkedinID: "namanarora600" }, 81 | { githubUsername: "Ravipandey24", linkedinID: "ravi-pandey-610971183" }, 82 | { githubUsername: "sophiya02", linkedinID: "sophiya02" }, 83 | { githubUsername: "darshitdudhaiya", linkedinID: "darshitdudhaiya" }, 84 | { githubUsername: "27Shri03", linkedinID: "shriram-bhardwaj-b08791220" }, 85 | { githubUsername: "vaibhavsahu1290", linkedinID: "vaibhav-sahu-ba5a8528b" }, 86 | { githubUsername: "Rimjhim-mm", linkedinID: "rimjhim-tiwari-a391a7253" }, 87 | { githubUsername: "Ayus3h", linkedinID: "ayush-yadav-57134728b" }, 88 | { githubUsername: "drifterDev", linkedinID: "mateo-álvarez-murillo-34679b259" }, 89 | { githubUsername: "Beast2792", linkedinID: "mateo-álvarez-murillo-34679b259" }, 90 | 91 | // Add more profiles as needed 92 | 93 | // Add more profiles as needed 94 | ]; 95 | 96 | profiles.forEach((profile) => { 97 | fetchGitHubData(profile.githubUsername, profile.linkedinID); 98 | }); 99 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Hacktober 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 |

Hacktober Fest Hackers...

22 |

2023

23 |
24 |
25 |
26 |
27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Lato'); 2 | @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,600;0,700;0,800;1,800&display=swap"); 3 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Martian+Mono:wght@300;400&family=Space+Mono:wght@400;700&display=swap'); 4 | 5 | *{ 6 | margin: 0px; 7 | padding: 0; 8 | box-sizing: border-box; 9 | } 10 | /* .bg { 11 | width: 100%; 12 | height: 100vh; 13 | display: flex; 14 | align-items: center; 15 | justify-content: center; 16 | background-size: 300% 300%; 17 | background-image: linear-gradient(-45deg, #E92EFB 0%, #FF2079 25%, #04005E 51%, #440B04 100%); 18 | -webkit-animation: AnimateBG 20s ease infinite; 19 | animation: AnimateBG 20s ease infinite; 20 | } */ 21 | .bg { 22 | width: 100%; 23 | min-height: 100vh; /* Use min-height instead of height , intna to rahe hi baki jitna ho jaaye */ 24 | display: flex; 25 | align-items: center; 26 | justify-content: center; 27 | background-size: 300% 300%; 28 | background-image: linear-gradient(-45deg, #E92EFB 0%, #FF2079 25%, #e074e0 51%, #440B04 100%); 29 | -webkit-animation: AnimateBG 20s ease infinite; 30 | animation: AnimateBG 20s ease infinite; 31 | position: fixed; /* Keep the background fixed , jaane nahi deena hai*/ 32 | top: 0; 33 | left: 0; 34 | z-index: -1; /* To Place it below other content , neeche to deekho*/ 35 | } 36 | .viewport { 37 | display: flex; 38 | flex-direction: column; 39 | align-items: center; 40 | justify-content: center; 41 | position: relative; 42 | z-index: 1; 43 | } 44 | @-webkit-keyframes AnimateBG { 45 | 0% { 46 | background-position: 0% 50%; 47 | } 48 | 50% { 49 | background-position: 100% 50%; 50 | } 51 | 100% { 52 | background-position: 0% 50%; 53 | } 54 | } 55 | 56 | @keyframes AnimateBG { 57 | 0% { 58 | background-position: 0% 50%; 59 | } 60 | 50% { 61 | background-position: 100% 50%; 62 | } 63 | 100% { 64 | background-position: 0% 50%; 65 | } 66 | } 67 | #logo { 68 | width: 20vw; 69 | height: 10vh; 70 | position: absolute; 71 | top: 10px; 72 | left: 10px; 73 | } 74 | .github { 75 | position: absolute; 76 | top: 20px; 77 | right: 40px; 78 | z-index: 9999; 79 | } 80 | .github a { 81 | text-decoration: none; 82 | color: #000; 83 | } 84 | /* .title{ ye wala original hai 85 | width: 50%; 86 | margin:auto; 87 | padding-left:0px; 88 | padding-bottom:0px; 89 | } */ 90 | .title { 91 | display: block; 92 | /* background-color: rgba(0, 0, 0, 0.5); */ 93 | padding: 10px 0; 94 | text-align: center; 95 | width: 100%; 96 | position: fixed; 97 | top: 0; 98 | left: 0; 99 | } 100 | h1{ 101 | /* font-family: JetBrains Mono,monospace; */ 102 | font-family: Martian Mono,monospace; 103 | color:white; 104 | font-weight: 900; 105 | font-size:35px; 106 | line-height:90%; 107 | padding-bottom:5px; 108 | padding-top: 89px; 109 | position:relative; 110 | text-align:center; 111 | } 112 | h2{ 113 | font-family: JetBrains Mono,monospace; 114 | color:white; 115 | font-weight: 600; 116 | font-size:35px; 117 | position:relative; 118 | text-align:center; 119 | } 120 | 121 | 122 | 123 | /* Style for the card container, jo bhi deen chaaye globally */ 124 | :root { 125 | --card-bg-color: #fff; /* Default card background color */ 126 | --card-text-color: #333; /* Default text color */ 127 | --card-font-family: Arial, sans-serif; /* Default font family */ 128 | } 129 | /* .card-container { 130 | display: flex; 131 | flex-wrap: wrap; 132 | justify-content: center; 133 | } */ 134 | 135 | .card-container { 136 | display: flex; 137 | flex-wrap: wrap; 138 | justify-content: center; 139 | padding: 20px; 140 | margin-top: 180px; 141 | position: relative; 142 | z-index: 1; 143 | /* background-color: rgba(255, 255, 255, 0.1); */ 144 | backdrop-filter: blur(10px); 145 | opacity: 0.9; 146 | margin-bottom: 20px; /* Add margin at the bottom to separate from the footer , lag hi nahi raha footer*/ 147 | } 148 | 149 | .card { 150 | border-radius: 5px; 151 | padding: 20px; 152 | margin: 10px; 153 | width: 300px; 154 | /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */ 155 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 0, 0, 0.1); 156 | display: flex; 157 | flex-direction: column; 158 | align-items: center; 159 | text-align: center; 160 | background-color: rgba(255, 255, 255, 0.1); 161 | color: var(--card-text-color); 162 | font-family: var(--card-font-family); 163 | backdrop-filter: blur(10px); 164 | opacity: 0.9; /* Adjust opacity for the glass effect */ 165 | transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; 166 | } 167 | .card:hover { 168 | background-color: rgba(255, 255, 255, 0.2); /* Change to the desired hover background color meeri marzi */ 169 | transform: scale(1.05); /* Increase the size of the card on hover karna hin nahi */ 170 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow on hover background se dikh hi ni ra*/ 171 | } 172 | 173 | /* Style for the person's name naam likhoo*/ 174 | .name { 175 | font-family: lato; 176 | color: white; 177 | font-size: 20px; 178 | font-weight: bold; 179 | margin-top: 10px; 180 | } 181 | 182 | /* Style for the profile picture auto*/ 183 | .profile-pic { 184 | width: 150px; 185 | height: 150px; 186 | border-radius: 50%; 187 | margin-top: 10px; 188 | } 189 | 190 | /* Style for the links */ 191 | .links { 192 | margin-top: 10px; 193 | } 194 | 195 | /* Style for GitHub and LinkedIn links */ 196 | .links a { 197 | display: inline-block; 198 | margin-right: 10px; 199 | text-decoration: none; 200 | color: #007BFF; 201 | } 202 | 203 | /* Hover effect for links */ 204 | .links a:hover { 205 | text-decoration: underline; 206 | } 207 | --------------------------------------------------------------------------------