karimmerhom
Software Engineer at Cypod Solutions Graduated from Computer Science Engineering from GUC.
Cypod solutionsCairo, Egypt
Pinned Repositories
-Database-I-GUCommerce2
This was a database-I project were we implemented a web application and database of an eCommerce . In branch "master", you will find a web application done in aspen.net c# visual studios. In branch "Procedures and Table SQL" you will find the procedures and table creation sql files.
-Spring-Boot-Microservices-Level-1
This course introduces you to building microservices with Spring Boot and Spring cloud.
60-sec-FPGA-Counter
About This was a group project for a Digital system design course. It was implemented using VHDL
Cart-Recommendation-System
The cart recommendation system,based on amazon's recommendation system , was done using haskell a functional paradigm programming language. This project was an academic group project
CoffeeApp
This is a personal project in my journey to learn flutter and firebase.
compilers-lab-1
Task1: This task is the implementation of a deterministic finite automaton (DFA) abstract data type. Recall that a DFA is a quintuple (Q, Σ, δ, q0, F): Q is a non-empty, finite set of states; Σ is non-empty, finite set of symbols (an alphabet); δ : Q × Σ −→ Q is the transition function; q0 ∈ Q is the start state; and F ⊆ Q is the set of accept states. A DFA accepts a string w = w1w2 · · · wn ∈ Σ ∗ if there is a sequence r0, r1, . . ., rn of states such that (i) r0 = q0, (ii) rn ∈ F, and (iii) δ(ri , wi+1) = ri+1, for every 0 ≤ i < n. Task2: This task is the implementation of the classical algorithm for constructing a deterministic finite automaton (DFA) equivalent to a non-deterministic finite automaton (NFA). Recall that an NFA is a quintuple (Q, Σ, δ, q0, F): Q is a non-empty, finite set of states; Σ is non-empty, finite set of symbols (an alphabet); δ : Q × (Σ ∪ {ε}) −→ P(Q) is the transition function; q0 ∈ Q is the start state; and F ⊆ Q is the set of accept states. Given a description of an NFA, you need to construct an equivalent DFA. Task4: This task is the implementation of a fallback deterministic finite automaton with actions (FDFA) abstract data type. Recall that an FDFA is a sextuple (Q, Σ, δ, q0, F, A): Q is a nonempty, finite set of states; Σ is non-empty, finite set of symbols (an alphabet); δ : Q×Σ −→ Q is the transition function; q0 ∈ Q is the start state; F ⊆ Q is the set of accept states; and A is function that maps every state in Q to an action. Refer to the slides of Lecture 2 of CSEN1003 for more details about the operation of FDFA. Task5: This task is the implementation of the context-free grammar (CFG) left-recursion elimination algorithm introduced in Lecture 3 of CSEN1003. Recall that a CFG is a quadruple (V, Σ, R, S) where V and Σ are disjoint alphabets (respectively, containing variables and terminals), R ⊆ V × (V ∪ Σ)∗ is a set of rules, and S ∈ V is the start variable. Task6: This task is the implementation of the algorithms computing the functions First and Follow, introduced in Lecture 4 of CSEN1003, for the variables of a given context-free grammar. Recall that a CFG is a quadruple (V, Σ, R, S) where V and Σ are disjoint alphabets (respectively, containing variables and terminals), R ⊆ V ×(V ∪ Σ)∗ is a set of rules, and S ∈ V is the start variable. Task7: This task is the implementation of an LL(1) parser using pushdown automata (PDA) and predictive parsing tables. Given an input context-free grammar G = (V, Σ, R, S), along with the First and Follow sets for all rules, you need to (i) construct the predictive parsing table for G, (ii) construct the PDA equivalent to G, and (iii) implement an LL(1) parser for G which makes use of the table and the PDA to direct its decisions. Given an input string w, the parser should signal an error if w /∈ L(G) and produce a derivation of w from S if w ∈ L(G).
compilers_lab_2
Task8: Implement of an ANTLR lexical analyzer for a fallback DFA. (The fallback DFA is encoded as in the Task 4 description document.). Task9: Using ANTLR to implement the SDD appearing below for a CFG that generates the language a *c *b * . S −→ ACB A −→ aA1 A −→ ε B −→ bB1 B −→ ε C −→ cC1 C −→ ε S.check = equals(A.n, B.n) ∗ equals(A.n, C.n) A.n = A1.n + 1 A.n = 0 B.n = B1.n + 1 B.n = 0 C.n = C1.n + 1 C.n = 0
computer-vision-1
The main aim of this assignment is to generate the indexed image of a colored image which includes the index map (Data Matrix) and the color map. Moreover, apply different quantization levels to the colored image using the indexed image to diffuse some of the colors. Therefore, the assignment is structured as follows: 1. Task 1: Indexed Image a. Index Map b. Color Map 2. Task 2: Applying Different Quantization Levels. Reducing the number of quantization levels results in false contours in the image. Generating a colored image with a reduced number of quantization levels can be achieved by first representing the colors as 3-dimensional vectors, where the 3 values correspond to the Red, Green and Blue components. Second, vectors that are similar could be then considered to represent a single quantization level in the reduced quantization levels image. Similarity could be determined based on differences between the vectors in a difference range of +/- some constant value to be added or subtracted to the Red, Green and Blue components. Note: The run time differs according to the different numbers of colors. Also, by increasing the difference range to be added or subtracted, the run time also increases.
computer-vision-2
The main aim of this assignment is to perform face detection by using the integral image. This is to be done by detecting eye area in faces through convolving a kernel that is designed to detect that area. The assignment is structured as follows: 1. Calculate the integral image and calculate the local sum 2. Detect the eye area. Detect Eye Area In this part, you are asked to implement two functions as follows: 1. DetectEye: • Input: the integral image and the kernel width. • Output: Coordinates (i, j) which represent the position of the maximum score achieved after convoluting the kernel. • Description: This method is responsible for calculating the local sums for the kernel provided in order to detect the eyes in the face image, where it gives the maximum score in the area where the eyes are present through convolving that kernel. To convolve the kernel, the width of the kernel is provided as an input parameter and the height of the kernel is calculate from the width by the equation: m = 0.15*n, where m defines the height of the kernel and n defines the kernel width. Next, calculate the maximum score while convolving the kernel by calculating the different local sums of the different areas in the kernel and then save the position of the maximum score. ➢ The kernel is shown below including the points representing each area (P1 … P14) in order to calculate seven different local sums (LS1 … LS7). The kernel is designed to match the area of the face showing the eyes, the eye brows and the forehead. ➢ The gray color refers to a neglection area (zeros), the white color refers to ones in the kernel and the black area refers to negative ones in the kernel.2. ExtractDetectedEye: • Input: Takes the image itself, the maximum position retrieved from DetectEye method and the kernel width size • Output: a 2D array representing the image drawn. • Description: This method is responsible to extract the eye area itself as detected from the first method. As we have the position of the maximum score, then draw around that position the same kernel size that detects the eye from the whole image. So, it is only retrieving the pixels of interest which are the eyes in the same range of the kernel size in terms of width and height.
Invincible-Runner
Invincible Runner game with Unity3D game engine. The aim is to generate an endless running game, which allows the players getting points by keep moving on the ground and colleting coins that appear during the game. In addition, the players need to dodge the enemies. The game created is able to function well during the gameplay. All functions have displayed in game. The game also works on laptops and phones by building apks for android phones.
karimmerhom's Repositories
karimmerhom/computer-vision-2
The main aim of this assignment is to perform face detection by using the integral image. This is to be done by detecting eye area in faces through convolving a kernel that is designed to detect that area. The assignment is structured as follows: 1. Calculate the integral image and calculate the local sum 2. Detect the eye area. Detect Eye Area In this part, you are asked to implement two functions as follows: 1. DetectEye: • Input: the integral image and the kernel width. • Output: Coordinates (i, j) which represent the position of the maximum score achieved after convoluting the kernel. • Description: This method is responsible for calculating the local sums for the kernel provided in order to detect the eyes in the face image, where it gives the maximum score in the area where the eyes are present through convolving that kernel. To convolve the kernel, the width of the kernel is provided as an input parameter and the height of the kernel is calculate from the width by the equation: m = 0.15*n, where m defines the height of the kernel and n defines the kernel width. Next, calculate the maximum score while convolving the kernel by calculating the different local sums of the different areas in the kernel and then save the position of the maximum score. ➢ The kernel is shown below including the points representing each area (P1 … P14) in order to calculate seven different local sums (LS1 … LS7). The kernel is designed to match the area of the face showing the eyes, the eye brows and the forehead. ➢ The gray color refers to a neglection area (zeros), the white color refers to ones in the kernel and the black area refers to negative ones in the kernel.2. ExtractDetectedEye: • Input: Takes the image itself, the maximum position retrieved from DetectEye method and the kernel width size • Output: a 2D array representing the image drawn. • Description: This method is responsible to extract the eye area itself as detected from the first method. As we have the position of the maximum score, then draw around that position the same kernel size that detects the eye from the whole image. So, it is only retrieving the pixels of interest which are the eyes in the same range of the kernel size in terms of width and height.
karimmerhom/Invincible-Runner
Invincible Runner game with Unity3D game engine. The aim is to generate an endless running game, which allows the players getting points by keep moving on the ground and colleting coins that appear during the game. In addition, the players need to dodge the enemies. The game created is able to function well during the gameplay. All functions have displayed in game. The game also works on laptops and phones by building apks for android phones.
karimmerhom/compilers-lab-1
Task1: This task is the implementation of a deterministic finite automaton (DFA) abstract data type. Recall that a DFA is a quintuple (Q, Σ, δ, q0, F): Q is a non-empty, finite set of states; Σ is non-empty, finite set of symbols (an alphabet); δ : Q × Σ −→ Q is the transition function; q0 ∈ Q is the start state; and F ⊆ Q is the set of accept states. A DFA accepts a string w = w1w2 · · · wn ∈ Σ ∗ if there is a sequence r0, r1, . . ., rn of states such that (i) r0 = q0, (ii) rn ∈ F, and (iii) δ(ri , wi+1) = ri+1, for every 0 ≤ i < n. Task2: This task is the implementation of the classical algorithm for constructing a deterministic finite automaton (DFA) equivalent to a non-deterministic finite automaton (NFA). Recall that an NFA is a quintuple (Q, Σ, δ, q0, F): Q is a non-empty, finite set of states; Σ is non-empty, finite set of symbols (an alphabet); δ : Q × (Σ ∪ {ε}) −→ P(Q) is the transition function; q0 ∈ Q is the start state; and F ⊆ Q is the set of accept states. Given a description of an NFA, you need to construct an equivalent DFA. Task4: This task is the implementation of a fallback deterministic finite automaton with actions (FDFA) abstract data type. Recall that an FDFA is a sextuple (Q, Σ, δ, q0, F, A): Q is a nonempty, finite set of states; Σ is non-empty, finite set of symbols (an alphabet); δ : Q×Σ −→ Q is the transition function; q0 ∈ Q is the start state; F ⊆ Q is the set of accept states; and A is function that maps every state in Q to an action. Refer to the slides of Lecture 2 of CSEN1003 for more details about the operation of FDFA. Task5: This task is the implementation of the context-free grammar (CFG) left-recursion elimination algorithm introduced in Lecture 3 of CSEN1003. Recall that a CFG is a quadruple (V, Σ, R, S) where V and Σ are disjoint alphabets (respectively, containing variables and terminals), R ⊆ V × (V ∪ Σ)∗ is a set of rules, and S ∈ V is the start variable. Task6: This task is the implementation of the algorithms computing the functions First and Follow, introduced in Lecture 4 of CSEN1003, for the variables of a given context-free grammar. Recall that a CFG is a quadruple (V, Σ, R, S) where V and Σ are disjoint alphabets (respectively, containing variables and terminals), R ⊆ V ×(V ∪ Σ)∗ is a set of rules, and S ∈ V is the start variable. Task7: This task is the implementation of an LL(1) parser using pushdown automata (PDA) and predictive parsing tables. Given an input context-free grammar G = (V, Σ, R, S), along with the First and Follow sets for all rules, you need to (i) construct the predictive parsing table for G, (ii) construct the PDA equivalent to G, and (iii) implement an LL(1) parser for G which makes use of the table and the PDA to direct its decisions. Given an input string w, the parser should signal an error if w /∈ L(G) and produce a derivation of w from S if w ∈ L(G).
karimmerhom/computer-vision-1
The main aim of this assignment is to generate the indexed image of a colored image which includes the index map (Data Matrix) and the color map. Moreover, apply different quantization levels to the colored image using the indexed image to diffuse some of the colors. Therefore, the assignment is structured as follows: 1. Task 1: Indexed Image a. Index Map b. Color Map 2. Task 2: Applying Different Quantization Levels. Reducing the number of quantization levels results in false contours in the image. Generating a colored image with a reduced number of quantization levels can be achieved by first representing the colors as 3-dimensional vectors, where the 3 values correspond to the Red, Green and Blue components. Second, vectors that are similar could be then considered to represent a single quantization level in the reduced quantization levels image. Similarity could be determined based on differences between the vectors in a difference range of +/- some constant value to be added or subtracted to the Red, Green and Blue components. Note: The run time differs according to the different numbers of colors. Also, by increasing the difference range to be added or subtracted, the run time also increases.
karimmerhom/-Database-I-GUCommerce2
This was a database-I project were we implemented a web application and database of an eCommerce . In branch "master", you will find a web application done in aspen.net c# visual studios. In branch "Procedures and Table SQL" you will find the procedures and table creation sql files.
karimmerhom/-Spring-Boot-Microservices-Level-1
This course introduces you to building microservices with Spring Boot and Spring cloud.
karimmerhom/60-sec-FPGA-Counter
About This was a group project for a Digital system design course. It was implemented using VHDL
karimmerhom/Cart-Recommendation-System
The cart recommendation system,based on amazon's recommendation system , was done using haskell a functional paradigm programming language. This project was an academic group project
karimmerhom/CoffeeApp
This is a personal project in my journey to learn flutter and firebase.
karimmerhom/compilers_lab_2
Task8: Implement of an ANTLR lexical analyzer for a fallback DFA. (The fallback DFA is encoded as in the Task 4 description document.). Task9: Using ANTLR to implement the SDD appearing below for a CFG that generates the language a *c *b * . S −→ ACB A −→ aA1 A −→ ε B −→ bB1 B −→ ε C −→ cC1 C −→ ε S.check = equals(A.n, B.n) ∗ equals(A.n, C.n) A.n = A1.n + 1 A.n = 0 B.n = B1.n + 1 B.n = 0 C.n = C1.n + 1 C.n = 0
karimmerhom/Computer-Architecture-ALU-Design
simulation of the CPU ALU operations which are simple addition, subtraction, multiplication, division, and logic operations, such as OR and AND. The memory stores the program’s instructions and data.
karimmerhom/Computer-Architecture-Simulation
Fetch-decode-execute cycle The main job of the CPU is to execute programs using the fetch-decode-execute cycle (also known as the instruction cycle). This cycle begins as soon as you turn on a computer. To execute a program, the program code is copied from secondary storage into the main memory. The CPU's program counter is set to the memory location where the first instruction in the program has been stored, and execution begins. The program is now running. In a program, each machine code instruction takes up a slot in the main memory. These slots (or memory locations) each have a unique memory address. The program counter stores the address of each instruction and tells the CPU in what order they should be carried out. When a program is being executed, the CPU performs the fetch-decode-execute cycle, which repeats over and over again until reaching the STOP instruction. Summary of the fetch-decode-execute cycle The processor checks the program counter to see which instruction to run next. The program counter gives an address value in the memory of where the next instruction is. The processor fetches the instruction value from this memory location. Once the instruction has been fetched, it needs to be decoded and executed. For example, this could involve taking one value, putting it into the ALU, then taking a different value from a register and adding the two together. Once this is complete, the processor goes back to the program counter to find the next instruction. This cycle is repeated until the program ends.
karimmerhom/Computer-Architetcture-Instruction-Memory-and-Registers-File
simulation of the computer architecture instruction memory and registers.
karimmerhom/Detecting-Redundancies-in-Code
Code cloning refers to the duplication of source code, which is the most common way of reusing existing code fragments across projects between software developers, as some developers refer to copy-paste programming instead of implementing a new code from scratch. The copy-paste method saves a lot of time and energy and helps spread good coding practices and patterns. However, if a bug is detected, then all the replicated codes should be checked for the same bug. A clone detection tool is required to save time and energy, and ease the process of reusing source code between software developers. The tool also detects the clones across singular or multiple projects, which eases the process of fixing bugs and overall software maintenance. The main purpose of this paper is to gain insight into the research available in the area of clone detection and management, as well as identify the research gaps to work upon. Despite a decade of active research, there is a noticeable lack of clone detectors that measure to very large repositories of source code, specifically for detecting near-miss clones where noteworthy-editing activities may take place in the cloned code. This paper presents a token-based clone detection tool that targets all the clone types using Python Sequence Matcher that is tested to detect clones across a single project, as well as across multiple projects using different data sets. The output of the tool has shown the correct detection of cloned methods whether they are syntactically identical, similar or dissimilar clones across a project or several projects according to a preset threshold. VI
karimmerhom/DPCV_Assignment_1
task1: Creating images for evaluating the segmentation process. task2: Implement the K-means algorithm. task3: Implementation of the EM algorithm for gray-level images. task4: Apply the quantization step on a selected color and gray level images. task5: Implement a binary class Naïve Bayes classifier algorithm.
karimmerhom/Fire-Alarm-System
The aim of the project is to design a fire alarm system. The system has two input sensors( flame sensor and smoke and gas sensor) and two outputs(a buzzer and a servo motor (we may add a water pump)). There also exists a stop push button in order to stop the system manually. The code consists of a process with a sensitivity list
karimmerhom/GUC-Portal-backend
Advanced Computer and Media Lab, Winter term 2020-2021 GUC PORTAL Project Description In this project, you are required to implement a GUC portal that provides GUC staff members with multiple useful functionalities. Out of the GUC staff members, our portal targets academic members including (teaching assistants, course instructors, course coordinators, head of departments (HOD)) and HR members. The exact functionalities that are needed for the project will be stated in the milestone description document. 1 Teaching System In the GUC, there are multiple faculties. Each faculty contains one or more department. One of the academic staff of each department should be assigned as the head of department. Each department offers different courses. Each course should have one or more instructor and one or more teaching assistant. One of the teaching assistants should be assigned as a course coordinator. Each course should have a specific number of teaching slots. These teaching slots could be lectures, tutorials and/or labs. These slots are assigned to academic members. Course coverage is defined as how many slots are assigned to academic members, relative to the total number of slots in this course. A course is fully covered when it reaches a coverage of 100% Each academic staff member should have a working schedule. In GUC, there are five slots per each working day. For each slot in the schedule, the timing of the slot, course taught in and the location of the slot should be known (in case teaching activity or replacement is done during the slot). 2 Core Functionalities Some of the core functionalities that the portal offers to each staff member is to track his/her attendance and request different types of leaves. Below is how these two features should work. 2.1 Attendance System The attendance system is applied on all GUC staff members, with the following rules: 1 • Each staff member has one day off in addition to Friday. • Each staff member should spend at least 8 hours, 24 minutes per the five remaining days. • Those 8:24 hours are accumulated by the end of the month. That is, it is acceptable for a staff member to spend 7:24 hours a day, then compensate for the missing hour by spending extra time on single/multiple days(as long as it’s the same month). • Missing days (not attending any of the five working days) can’t be compensated unless a compensation leave is requested(explained below). Attending extra 8 hours 24 minutes (either on a single/multiple days) will not compensate for the missing day. • Multiple sign in and sign out within the same day is allowed. How ever any sign in not followed by a sign out, or a sign out not preceded with a sign in will not be calculated. • Hours spent each day are only counted from 7:00 AM to 7:00 PM. Any hours spent before/after this time interval are neglected. • If a staff member signed in on his/her day off, these hours are accumulated in the current month’s hours. • The attendance of each month starts by the 11th day of the month, and ends by the 10th day of the following month. • If a staff member missed up to 2 hours 59 minutes in any month’s attendance, no deduction will be applied on this month’s salary. • Any shortage of hours or days will result in salary deduction. • Salary deduction is calculated as follows: – In case of missing days: For each missing day: staff’s salary/60 will be deducted. – In case of missing hours: If a staff member has more than 2 hours 59 minutes, then the deduction goes as follows: ∗ For each missing hour: staff’s salary/180 will be deducted. ∗ For each missing minute: staff’s salary/180 * 60 will be deducted. 2.2 Leaves System Each staff member has an annual leave balance, that he/she can use to apply for different leaves. Each month, 2.5 days are added to each staff annual leaves balance. This 0.5 day can’t be used unless accumulated with another 0.5 day from another month. 2.2.1 Annual Leaves • Annual leaves should be submitted before the targeted day. • If a staff member wishes to take a day off from his annual balance, and he/she has teaching obligations on this day, then he/she should find a replacement member from the same department teaching the same course. • The replacement staff member has to be notified. In case of acceptance, then the requesting staff member should be notified that the replacement accepted their request. 2 • After the requesting staff member is notified by the acceptance, he/she can then submit the request (stating in the request who is the replacement staff member) to the HOD. • In case the staff didn’t find a replacement, he can still send the request and the decision of acceptance/rejection would be upon the head of department. 2.2.2 Accidental Leaves • Each staff member has up to six days for accidental leaves. • Accidental leaves can be submitted after the targeted day. • Accidental leaves are consumed from the annual leave balance. 2.2.3 Sick Leaves • Sick leaves are not consumed from the annual leaves balance. This leave can be submitted by maximum three days after the sick day. • Sick leaves have no day limits. • Proper documents should be submitted with the leave request to prove the medical condition. 2.2.4 Maternity Leaves • Maternity leaves are not consumed from the annual leaves balance. • Maternity leaves should only be submitted by female staff members. • Proper documents should be submitted with the leave request to prove the maternity condition. 2.2.5 Compensation Leaves In case a staff member is absent on a working day, he can request a compensation leave in order to avoid salary deduction. In order for the request to be valid, the staff member should attend his day off during the same month which he was absent in.
karimmerhom/machine-learning-1
Fisher’s Linear Discriminant classification algorithm that can recognize images of three classes (airplane, automobile and frog). These classes are part of the machine learning benchmark CIFAR-10 dataset. The data is available on the GitHub assignment (https://classroom.github.com/a/viOLYlS). In the Data folder, you will find two folders: “train” and “test”. The “train” folder contains 3 subfolders named “airplane”, “automobile” and “frog”, with each one containing 5000 different images of the respective classes. The “test” folder also contains the same 3 subfolders with 1000 different images of each class. The images in the “train” folder should be used to train a classifier for each class using the method given at the bottom of slide 18 in Lecture 3.pdf. After the classifiers are trained, test each classifier using the images given in the “test” folder. Use the following equation for Fisher’s Linear Discriminant w = S𝑊 −1 (m2 − m1 ). The bias term should be computed as explained in the lecture and Problem Set 3 using the equation w0 = -w T (m1 + m2)/2. You will examine Fisher’s Linear Discriminant twice. Once dealing with the provided RGB images, and once after converting them to gray-scale.
karimmerhom/machine-learning-2
Naïve Bayes classifier that can recognize images of three classes (airplane, automobile and frog). These classes are part of the machine learning benchmark CIFAR-10 dataset. The data is available on the GitHub assignment https://classroom.github.com/a/FRXkLpPg. In the Data folder, you will find two folders: “train” and “test”. The “train” folder contains 3 sub-folders named “airplane”, “automobile” and “frog”, with each one containing 5000 different images of the respective classes. The “test” folder also contains the same 3 subfolders with 1000 different images of each class. The images in the “train” folder should be used to train a classifier for each class using the method given at the bottom of slide 18 in Lecture 3.pdf. After the classifiers are trained, test each classifier using the images given in the “test” folder. Assume that each pixel is distributed according to a Gaussian distribution whose parameters should be identified in the training phase of the Naïve Bayes classifier. In this assignment, you will apply the classifier to RGB images only. Repeat the same process for the images when resized to 16 by 16, 8 by 8 and 4 by 4.
karimmerhom/machine-learning-3
K-means clustering algorithm to cluster the images provided in the dataset available on https://classroom.github.com/a/pCY-PkJx. These images are part of the machine learning benchmark CIFAR-10 dataset for three types (airplane, bird and truck). You need to implement the following steps: 1. Apply your K-means algorithm with K = 3 to the data provided in the train folder. One important aspect of K-means that changes the results significantly is the initialization. In your implementation, you should run K-means 10 different times starting with a different random initialization each time. 2. Use the Davis Bouldin index to choose the best outcome out of the 10 outcomes you obtained in Step 1. 3. For each class of images (airplane, bird and truck), identify the cluster to which the majority of images belong and, hence the corresponding center in this case. For instance, if the 1 st 5K images were clustered as (500 in Cluster 1, 1000 in Cluster 2,3500 in Cluster 3), this means that the majority of images belonging to the airplane class were clustered into Cluster 3. Thus, Cluster 3 should be considered the cluster representing the airplane class and the center of cluster 3 should be used in Step 4. 4. Use the cluster centers identified in Step 3 to classify the images in the test folder to one of the three types (airplane, bird or truck) based on the shortest Euclidean distance to the centers.
karimmerhom/Movie-Database-Web-Application
This was an academic project for Networks course. It was implemented using HTML ,CSS, EXPRESS, NODE.JS
karimmerhom/react-course-project
karimmerhom/react-course-project-2
karimmerhom/React_Native
Demo for react native to learn
karimmerhom/roboClaim-hiring-task
karimmerhom/Simple-App-For-Begginers-
This is a personal project in my journey to learn flutter.
karimmerhom/Single-Datapath-Simulation
Single Datapath simulation as a Computer Architecture. Single Cycle Datapaths : Single Datapaths is equivalent to the original single-cycle datapath The data memory has only one Address input. The actual memory operation can be determined from the MemRead and MemWrite control signals. There are separate memories for instructions and data.
karimmerhom/The-Helsinki-Puzzle
The helsinki puzzle solved using prolog. This was an academic group project.
karimmerhom/The_Matrix_Escaped
Project Description: The year is 2200 and the machines took over the world after a long and grueling battle the likes of which were never seen before. Most of humanity was defeated and they got their memories erased and then put into deep sleep. In this state, their brains are used as a huge neural network by the machines. To harness the power of the humans’ brains, the machines created a simulation called the matrix where humans who are asleep think that in fact they are alive in. After the war, a very few number of humans were able to escape the wrath of the machines and they started planning how to avenge their loss and save the human race. A prophecy was told that there will come someone from within the matrix who will be the chosen savior of humanity. This person is called Neo. The living were able to get to the matrix and they were able to locate Neo and get him finally awake. Now, Neo get in and out of the matrix when he can to save other humans. The machines started noticing a weird pattern of behavior in the matrix and hence they created a virus called agent Smith that should track Neo and kill him whenever he sees him in the matrix. In order to do so, agent Smith made a lot of copies of himself and decided to set a trap for Neo. They (the copies of agent Smith) took some of the humans Neo would save as hostages and injected them with a slow spreading chemical that would eventually kill them and turn them into agents. If a human dies in the matrix their brain stops and they die in real life. Hence, Neo, on sensing that some humans are dying, rushed to the matrix in order to save the humans. The agents do not know that Neo has special skills and that he foresaw the agents’ plan. As such, Neo planted a number of pills that would restore his health and the health of the hostages once activated and a number of launching pads that will let him fly from one to the other. Also, Neo (on carrying a hostage) can stop the spread of the virus from turning the hostages into agents upon dying. However, he can not stop them from dying. Hence, in order to limit the influence of the machines, Neo’s goal is to take as many humans as possible alive to a special location called the telephone booth where they can get out of the matrix. However, if hostages die and turn into agents, Neo would have to kill these agents. Further, if a hostage dies while being carried by Neo, Neo would also return it to the telephone booth so that the body would not become an agent in the future. The area the hostages are held in can be thought of as an m × n grid of cells where 5 ≤ m, n ≤ 15. Initially, a grid cell is either free or contains one of the following: Neo, a hostage, a pill, a pad, an agent, or the telephone booth. It is also worth noting that initially there will not be any overlapping in a single cell. Meaning, a single cell will 1This project’s theme is based on the Matrix move franchise. 1 contain only one type of object. Put simply, there will not be a case where Neo starts from the same place as the telephone booth, or a hostage is at the same cell as a pill and so on. Neo can not be at the same cell as an agent but can enter all other cells. In this project, you will use search to help Neo complete his mission. Neo’s mission is to end up at the telephone booth with all hostages that did not turn agents returned (whether dead or alive) and, in the case hostages die and turn into agents, each hostage that turned into an agent killed. Neo can: • Move in all four directions as long as there are no agents in the cell Neo is heading towards. • Carry a hostage only if both of them are in the same cell. Once a hostage is carried, it can only be dropped in the telephone booth. • Drop all hostages currently being carried at the telephone booth only if Neo is in the same cell where the telephone booth lies. • kill all agents at neighboring cells to Neo. Neighboring cells are the top, the bottom, the left, and the right cells. Diagonal cells are not neighboring cells. • Take a pill to increase his health and the health of all currently living hostages. A pill could be taken only once. • Fly from one launching pad to the next. Neo can only carry up to c hostages at a time. Accordingly, Neo might have to make multiple trips to the telephone booth to transport all the hostages. The hostages, will continue to incur damage with every passing time step. A time step is the duration taken by Neo to complete one action. With every time step, the damage of any hostage increases by 2. If the damage of a hostage reaches 100, the hostage dies. There are two cases to a hostage dying: • If a hostage was never carried by Neo dies, this hostage turns into an agent and then Neo must kill this agent. • If a hostage is being carried by Neo dies, this hostage will not turn into an agent and Neo will keep carrying its dead body. Every time Neo performs a kill action (regardless of the number of agents killed by this action), Neo’s damage increases by 20. Every time Neo takes a pill the damage of Neo and all living hostages decreases by 20. Note that in this case where the action is taking a pill, the damage of living hostages will not increase by 2 then decrease by 20 leading in a decrease of 18, it will be simply a decrease of 20. Note that damage should not get below zero. If Neo’s damage reaches 100 he dies and the game is over. Using search you should formulate a plan that Neo can follow to complete the mission. An optimal plan is one where the deaths (of hostages) are at a minimum as a first condition. Given two plans with the same number of deaths, the more optimal plan is the one where the total number of agents killed is minimal. The following search strategies will be implemented and each will be used to help Neo: a) Breadth-first search. b) Depth-first search. c) Iterative deepening search. d) Uniform-cost search. 2 e) Greedy search with at least two heuristics. f) A∗ search with at least two admissible heuristics. Each of the aforementioned strategies should be tested and compared in terms of RAM usage, CPU utilization, and the number of search tree nodes expanded. You must only use Java 8 to implement this project. Your implementation should have two main functions genGrid and solve: • genGrid() generates a random grid. The dimensions of the grid, the starting position of Neo and the telephone booth, as well as the number and locations of the hostages, agents, pills, and pads are to be randomly generated. You need to make sure that the dimensions of the generated grid is between 5×5 and 15×15 and the number of generated hostages is between 3 and 10. For every hostage, a random starting damage between 1 and 99 should also be generated. Also, pads come in pairs. Meaning, pad P1 must be generated with another pad P2 where Neo can fly from P1 to P2 and vice versa. The number of hostages Neo can carry c should be randomly generated as well where c ≤ 4. The number of pills should be less than or equal to the number of hostages. There are no restrictions on the maximum number of agents or pads (as long as no overlapping occurs and there are enough cells in the grid). • solve(String grid, String strategy, boolean visualize) uses search to try to formulate a winning plan: – grid is a string representing the grid to perform the search on. This string should be in the following format: M,N; C; NeoX,NeoY; TelephoneX,TelehoneY; AgentX1,AgentY1, ...,AgentXk,AgentYk; PillX1,PillY1, ...,PillXg,PillYg; StartPadX1,StartPadY1,FinishPadX1,FinishPadY1,..., StartPadXl ,StartPadYl ,FinishPadXl ,FinishPadYl ; HostageX1,HostageY1,HostageDamage1, ...,HostageXw,HostageYw,HostageDamagew where: ∗ M and N represent the width and height of the grid respectively. ∗ C is the maximum number of members Neo can carry at a time. ∗ NeoX and NeoY represent the x and y starting positions of Neo. ∗ TelephoneX and TelephoneY represent the x and y positions of the telephone booth. ∗ AgentXi ,AgentYi represent the x and y position of agent i where 1 ≤ i ≤ k and k is the total number of agents. ∗ PillXi ,PillYi represent the x and y position of pill i where 1 ≤ i ≤ g and g is the total number of pills. ∗ StartPadXi ,StartPadYi represent the x and y position of pad i where 1 ≤ i ≤ l and l is the total number of pads. Moreover FinishPadXi ,FinishPadYi represent the x and y position of the target pad stated by StartPadXi and StartPadYi . For example, if StartPadX = 1, StartPadY = 2, FinishPadX = 3, and FinishPadY = 4, this means that Neo can fly directly from cell (1, 2) to cell (3, 4). Further, if 1, 2, 3, 4 is in the string, then the string must also contain 3, 4, 1, 2. That is, Neo could fly from cell (3, 4) to cell (1, 2) instantly. A pad lets Neo fly to only one other pad. 3 ∗ HostageXi ,HostageYi ,HostageDamagei represent the x and y position and current damage of hostage i where 1 ≤ i ≤ w and w is the total number of hostages. Note that the string representing the grid does not contain any spaces or new lines. It is just formatted this way to make it more readable. All x and y positions are assuming 0-indexing. – strategy is a symbol indicating the search strategy to be applied: ∗ BF for breadth-first search, ∗ DF for depth-first search, ∗ ID for iterative deepening search, ∗ UC for uniform cost search, ∗ GRi for greedy search, with i ∈ {1, 2} distinguishing the two heuristics, and ∗ ASi for A∗ search, with i ∈ {1, 2} distinguishing the two heuristics. – visualize is a boolean parameter which, when set to true, results in your program’s side-effecting a visual presentation of the grid as it undergoes the different steps of the discovered solution (if one was discovered). A GUI is not mandatory (though welcomed), printing in the console would suffice. The function returns a String of the following format: plan;deaths;kills;nodes where – plan is a string representing the operators Neo needs to follow separated by commas. The possible operator names are: up, down, left, right, carry, drop, takePill, kill, and fly. – deaths is a number representing the number of dead hostages in the found goal state (whether they turned into agents or not). – kills is a number representing the number of killed agents in the found goal state (including the number of agents that were hostages before). – nodes is the number of nodes chosen for expansion during the search
karimmerhom/World-Time-Application
This is a personal project in my journey to learn flutter.