Skip to content

Instantly share code, notes, and snippets.

View MohamedSondo's full-sized avatar

Mohamed Sondo MohamedSondo

View GitHub Profile
@MohamedSondo
MohamedSondo / hql
Created November 8, 2018 20:36
movielensquey
```
#Hadoop
# Upload data into HDFS
hadoop fs -mkdir /user/movies
hadoop fs -put movies/u.data /user/movies
hadoop fs -put movies/u.item /user/movies
#Hive
# Load Hive
@MohamedSondo
MohamedSondo / rootshell.php
Last active May 13, 2018 23:01
rootshell for file upload websec capstone spain
<!--
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ................jdWMMMMMNk&,...JjdMMMHMMHA+................ */
/* .^.^.^.^.^.^..JdMMMBC:vHMMNI..`dMMM8C`ZMMMNs...^^.^^.^^.^^. */
/* ..^.^..^.....dMMMBC`....dHNn...dMNI....`vMMMNy.........^... */
/* .....^..?XMMMMMBC!..dMM@MMMMMMM#MMH@MNZ,^!OMMHMMNk!..^...^. */
/* ^^.^..^.`??????!`JdN0??!??1OUUVT??????XQy!`??????!`..^..^.^ */
/* ..^..^.....^..^..?WN0`` ` +llz:` .dHR:..^.......^..^... */
/* ...^..^.^.^..^...`?UXQQQQQeyltOOagQQQeZVz`..^.^^..^..^..^.. */
/* ^.^..^..^..^..^.^..`zWMMMMH0llOXHMMMM9C`..^.....^..^..^..^. */
@MohamedSondo
MohamedSondo / md
Created March 16, 2018 21:30
search
Agents
======
- Agent perceives its **environment** therough **sensors** and acts upon that environment through **actuators**.
- A **percept** refers to the agent's perceptual inputs at any given instant.
- An agent's **percept sequence** is the complete history of everything the agent has ever perceived.
- A **performance measure** evaluates any given sequence of environment states. It captures the notion of desirability.
Rationality
-----------
@MohamedSondo
MohamedSondo / LexicalAnalyzer.cpp
Last active March 21, 2023 07:52
Program for Lexical Analyzer in C++. very simple lexical analyzer which reads source code from file and then generate tokens.
#include<iostream>
#include<fstream>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
using namespace std;
int isKeyword(char buffer[]){
@MohamedSondo
MohamedSondo / .c
Created May 1, 2017 19:03
treetraversal
// C program for different tree traversals
#include <stdio.h>
#include <stdlib.h>
/* A binary tree node has data, pointer to left child
and a pointer to right child */
struct node
{
int data;
struct node* left;
@MohamedSondo
MohamedSondo / .c
Created May 1, 2017 19:00
iterative merge sort
/* Iterative C program for merge sort */
#include<stdlib.h>
#include<stdio.h>
/* Function to merge the two haves arr[l..m] and arr[m+1..r] of array arr[] */
void merge(int arr[], int l, int m, int r);
// Utility function to find minimum of two integers
int min(int x, int y) { return (x<y)? x :y; }
@MohamedSondo
MohamedSondo / .c
Last active May 1, 2017 18:58
Recursive merge sort
/* Recursive C program for merge sort */
#include<stdlib.h>
#include<stdio.h>
/* Function to merge the two haves arr[l..m] and arr[m+1..r] of array arr[] */
void merge(int arr[], int l, int m, int r);
/* l is for left index and r is right index of the sub-array
of arr to be sorted */
void mergeSort(int arr[], int l, int r)
@MohamedSondo
MohamedSondo / 4bit-Ripple Carry Adder
Last active October 12, 2023 22:34
Ripple Carry Adder adds 2 n-bit number plus carry input and gives n-bit sum and a carry output. The Main operation of Ripple Carry Adder is it ripple the each carry output to carry input of next single bit addition. Each single bit addition is performed with full Adder operation (A, B, Cin) input and (Sum, Cout) output. The 4-bit Ripple Carry Ad…
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Ripple_Adder is
Port ( A : in STD_LOGIC_VECTOR (3 downto 0);
B : in STD_LOGIC_VECTOR (3 downto 0);
Cin : in STD_LOGIC;
S : out STD_LOGIC_VECTOR (3 downto 0);
Cout : out STD_LOGIC);
end Ripple_Adder;