Skip to content

Instantly share code, notes, and snippets.

View Med-ELOMARI's full-sized avatar

Mohamed El Omari Med-ELOMARI

View GitHub Profile

Keybase proof

I hereby claim:

  • I am Med-ELOMARI on github.
  • I am medelomari (https://keybase.io/medelomari) on keybase.
  • I have a public key whose fingerprint is 4F92 2584 2075 E6F7 9AAD 339B E3A3 34D7 7033 1E69

To claim this, I am signing this object:

@Med-ELOMARI
Med-ELOMARI / layomkin.py
Created September 6, 2019 10:30
just playing around with decorators and remembered the old days when we were in primary school , we can't de substraction and get negative numbers , aka layomkin
import functools
def layomkin(func):
"""
A Decorator For the Golden days ,
aka not possible to substitute and get negatives (layomkin)
:param func: the function to decorate
:return: the check of "layomkin"
"""
@Med-ELOMARI
Med-ELOMARI / PLL.py
Last active September 10, 2019 10:17
A phase-locked loop or phase lock loop (PLL) is a control system that generates an output signal whose phase is related to the phase of an input signal. There are several different types; the simplest is an electronic circuit consisting of a variable frequency oscillator and a phase detector in a feedback loop. The oscillator generates a periodi…
# 2015/02/25 FST Settat , with a friend aka oussama
import matplotlib.pyplot as plot
from numpy import exp, angle, conj, sqrt
# initialisation des parametres de la PLL
constante_VCO = 0.01
phase_out = 0.0
frequnece_out = 1
VCO_sortie = exp(1j * phase_out)
phase_difference = 0.0
@Med-ELOMARI
Med-ELOMARI / get_ip_infos.py
Last active September 10, 2019 10:18
ip-api.com provides free usage of its Geo IP API through multiple response formats. And This is an exemple of using it with python with Response format Json You are free to use ip-api.com for non-commercial use. they do not allow commercial use without prior approval. -Mohamed EL omari
#!/usr/bin/env python
import json
import sys
import urllib2
def get_ip(host):
trac = "http://ip-api.com/json/"
header = {'User-Agent': 'Mozilla/5.0'}
try :
@Med-ELOMARI
Med-ELOMARI / ETTools (filterer-Joiner-spliter) v3 .cpp
Last active April 16, 2017 22:18
Text files that contains Emails can be filtered Joined splited by this C++ programme
/*
Name: Email Tools (filtring - Joining - spliting ... and more ! )
Copyright: Venus 2016
Author: MOHAMED EL OMARI
Date: 20/08/16 02:39 , reviewed 16/04/17 22:44
Description: this Project is personal and free not for sell
*/
#include <string>
#include <ctime>
#include <cstdlib>