Skip to content

Instantly share code, notes, and snippets.

View Omi98's full-sized avatar
🏠
Working from home

Omama K. Omi98

🏠
Working from home
View GitHub Profile
@Omi98
Omi98 / coke.py
Created August 27, 2022 15:15
cs50p Coke
# list of valid inputs
valid_input = [5, 10, 25]
# due amount
amount = 50
print("Amount Due:", amount)
# while loop
while True:
# ask user for input
@Omi98
Omi98 / meal.py
Created August 1, 2022 10:08
meal.py code for cs50p - pset1
def main():
time = input("What time is it? ")
# call convert func
meal_time = convert(time)
# returns and assigns meal_time
# print(meal_time)
# defining ranges for
# - breakfast time
@Omi98
Omi98 / edge.c
Created July 15, 2020 09:27
Edge Detection filter
// Detect edges
void edges(int height, int width, RGBTRIPLE image[height][width])
{
RGBTRIPLE temp[height][width];
/*creating another temp array and
storing all the original pixels in it
so that the original image pixels
are not changed/altered during the
calculations.*/
@Omi98
Omi98 / Bootstrap.html
Last active July 3, 2020 05:29
Links to Bootstrap codes
<!DOCTYPE html>
<html>
<body>
<h1>HTML Links</h1>
<p><a href="https://github.com/Omi98/bs-alerts">Bootstrap Alerts</a></p>
<p><a href="https://github.com/Omi98/bs-badges.git">Bootstrap Badges</a></p>
@Omi98
Omi98 / blur.c
Last active July 15, 2020 09:28
Blur filter
// Blur image
void blur(int height, int width, RGBTRIPLE image[height][width])
{
float avg1 = 0.00;
float avg2 = 0.00;
float avg3 = 0.00;
RGBTRIPLE temp[height][width];
for (int h = 0; h < height; h ++)
@Omi98
Omi98 / BinarySearch.cpp
Last active August 3, 2018 09:40
Binary Search Algorithm
// Binary Search Algorithm
/*
1. ask user the size of array
2. declare the array
3. ask user the limit and range of random numbers
4. initialize the array with random numbers
5. print the array
6. sort the array in ascending order
7. print sorted array