image
Kamal Shkeir
  • A propos
  • CV
  • Blog
  • Contact
© 2022 All rights reserved.
image
Kamal Shkeir
Korm Go Framework Author
Python Developer
Golang/Go Developer
Fullstack Developer

Kamal Shkeir

Passionné de nouvelles technologies et autodidacte, je suis développeur Fullstack (en Python ou Golang) et bénéficie de compétences en gestion de projet global. Je maitrise les différentes étapes de construction d’un site ou d’une application web.

Téléchargez CV

What I Do

Backend Python ou Go

J'ai commencer avec Python et j'adore coder avec Go.

Architecture Microservice

J'aime apprendre toujours plus sur les nouvelles technologies comme Docker, Kubernetes, webRTC, gRPC...

Docker et K8s

Docker et Kubernetes sont crée avec le langage Go, ensemble sont devenu un moyen indispensable pour tester et déployer sur le cloud.

Progressive Web Apps

J'utilise du pure Javascript pour construire des PWA, télechargeable et fonctionne hors ligne.

Application Temps réel

Des applications en temps réel qui utilisent les Websockets (ex: multi curseur google docs).

Web Design

J'adore transformer une maquette Figma ou Xd en un site web fonctionnel.

CV

3 Years of Experience

Experience

Bedrock Streaming
since 2025

Senior Go Fullstack Software Engineer

  • Fullstack dev Go
  • Migration code Php -> Go
  • Implementation nouvelles features + réparation bugs
Ringover Group
since 2023

Développeur Golang/Go

  • Développeur Backend Go
  • Implementation nouvelles features + réparation bugs

Stack:

  • Go Gin Framework
  • Tyk Gateway + Traefik
  • SQL + WebRTC
  • Jira, Agile
OVH Cloud
2021-2023

Développeur Go et Perl

  • Migration legacy code Perl -> Go
  • Fullstack dev: correction et implementation des nouvelles features back(Go/Perl) et front(AngularJs)

Stack:

  • Go Gin Framework
  • AngularJS
  • Perl
  • Jira
Open Source
2022

Autheur de Korm Framework

Korm est un framework batterie très similaire a Django avec un espace administrateur, un shell interactive, ORM très puissant, et beaucoup plus ici : Korm Docs

Newday Care
2021

Stage Développeur Fullstack (Python)

  • Mettre en place le premier design Figma du site web
  • Développement API en Django/Python
  • Intégration du design finale en pure HTML, CSS et Javascript
Personal Projects
2018-2020

Développement Web Python en Autodidacte (soukbaalbeck.com) + Go (go.soukbaalbeck.com)

Education

2020-2021
Université Lumière Lyon2

LICENCE PRO CONDUITE DE PROJET WEB

* Conception et animation de contenus (écrits, vidéos, sonores)

* Les aspects juridiques et économiques d’Internet

* SEO et SEA

* Les principes d’accessibilité et d’ergonomie des sites Web

2016-2017
University Claude Bernard Lyon1

M1 Mécanique

* simulation numérique mécanique des fluides

* calculs des contraintes mécanique des structures

* Projet M1 : programme python qui traite des données excel, trace les graphes et calculs les contraintes, gradient linéaire,...

Design Skills

Web Design

65%

Integration Design

70%

Coding Skills

Golang

85%

Python

80%

Javascript

75%

Perl

75%

HTML / CSS

80%
Télechargez CV

Blog

Blog
14 Dec 2024

Django Python OTP and TOTP tokens

14 Dec 2024

Benchmark Functions Decorator Python

14 Dec 2024

Python Threading and Multi Processing

14 Dec 2024

CRONS

Django Python OTP and TOTP tokens

CreatedAt : 14 Dec 2024

UpdatedAt : 14 Dec 2024

#################################  One Time TOKEN  ##################################################

from django.contrib.auth.tokens import PasswordResetTokenGenerator

from six import text_type



class OneTimeToken(PasswordResetTokenGenerator):

    def __make_hash_value(self, user, timestamp):

        return (text_type(user.is_active)+text_type(user.pk)+text_type(timestamp))



one_time_token = OneTimeToken()

#one_time_token_generator.make_token(user)

#one_time_token_generator.check_token(user, token)

####################################################################################################


################################## TOTP TOKEN ####################################################

import pyotp

import qrcode

from qrcode.image.svg import SvgImage

from io import BytesIO

from django.http import JsonResponse





class TOTP_Token:

    def __get_qrcode_svg(self,uri):

        stream = BytesIO()

        img = qrcode.make(uri, image_factory = SvgImage)

        img.save(stream)

        return stream.getvalue().decode()



    def create_totp_token(self,user):

        key = user.profile.otp_key

        #create token

        totp = pyotp.totp.TOTP(key)

        #create uri

        totp_uri = pyotp.totp.TOTP(key).provisioning_uri(user.username,issuer_name="Souk Baalbeck")

        svg = __get_qrcode_svg(totp_uri)

        return svg



    def verify_totp_token(self,user, token):

        user_key = user.profile.otp_key

        #create token

        totp = pyotp.totp.TOTP(user_key)

        #verify if token and user match

        if token == totp.now():

            return True

        else:

            return False

totp_token = TOTP_Token()

#######################################################################################################




Benchmark Functions Decorator Python

CreatedAt : 14 Dec 2024

UpdatedAt : 14 Dec 2024

You can call this decorator by using @benchmark like below:


import cProfile, pstats, io 



def benchmark(fnc):

    def inner(*args, **kwargs):

        pr = cProfile.Profile()

        pr.enable()

        original_fnc = fnc(*args,**kwargs)

        pr.disable()

        s = io.StringIO()

        ps = pstats.Stats(pr, stream=s).sort_stats('cumulative')

        ps.print_stats()

        print('benchmark result = ', s.getvalue())

        return original_fnc

    return i



Simple example on how to use it:


@benchmark

def testfunction(number):

    numbers = []

    for i in range(number):

        numbers.append(i)

    return numbers





testfunction(1000000)

Python Threading and Multi Processing

CreatedAt : 14 Dec 2024

UpdatedAt : 14 Dec 2024

Threading

Here u will find 2 ways: (Class or functionnal):

import threading




class sendActivationUrlThread(threading.Thread):



    def __init__(self, email):

        self.email = email

        threading.Thread.__init__(self)



    def run(self):

        self.email.send(fail_silently=False)





def sendEmail(email):

    email.send(fail_silently=False)







def sendActivationUrl(request, user):

    uidb64 = urlsafe_base64_encode(force_bytes(user.pk))

    domain=get_current_site(request).domain

    the_aes_token = aes_token.AESencrypt({'user_id':user.pk})

    link = reverse('authentification:activate', kwargs={

        'token':one_time_token.make_token(user),

        'aestoken':the_aes_token

        })

    activate_url = 'http://'+domain+link



    email_subject = "Validate Your Email"

    email_body = "Hi " + user.username + ". Please use this link to verify your account\n"+activate_url

    email = EmailMessage(

        email_subject,

        email_body,

        'noreply@bookmarker.com',

        [user.email]

    )

    #sendActivationUrlThread(email).start()

    my_thread = threading.Thread(target=sendEmail, args=[email,])

    my_thread.start()


Multiprocessing


import multiprocessing



#args ne prend pas request

p = multiprocessing.Process(target = blabla , args = [])

p.start()

p.join()

CRONS

CreatedAt : 14 Dec 2024

UpdatedAt : 24 May 2025

Special characterMeaningExample
*Selects every value in a fieldAn asterisk "*" in the day of the week field means every day.
,Separates items in a listA comma "1,3" in the day of the week field means just Mondays (day 1) and Wednesdays (day 3).
-Specifies a rangeA hyphen "10-12" in the hour field means a range that includes the hours 10, 11, and 12.
/Specifies an incrementA slash "*/10" in the minutes field means an increment of every 10 minutes.


ExpressionDescriptionruns at
0 * * * * *every minute09:00:00; 09:01:00; 09:02:00; … 10:00:00
0 */5 * * * *every 5 minutes09:00:00; 09:05:00
0 0 * * * *every hour (hourly)09:00:00; 10:00:00; 11:00:00
0 0 */6 * * *every 6 hours06:00:00; 12:00:00; 18:00:00; 00:00:00
0 0 8-18 * * *every hour between 8-1808:00:00; 09:00:00; … 18:00:00; 08:00:00
0 0 0 * * *every day (daily)Mar 1, 2017 00:00:00; Mar 2, 2017 00:00:00
0 0 10 * * *every day at 10:00:00Mar 1, 2017 10:00:00; Mar 2, 2017 10:00:00
0 0 * * * 1-5every hour on workdaysMar 3 (FRI), 2017 22:00:00; Mar 3 (FRI), 2017 23:00:00; Mar 6 (MON), 2017 00:00:00
0 0 0 * * 0every sunday (weekly)Mar 5 (SUN), 2017 00:00:00; Mar 12 (SUN), 2017 00:00:00
0 0 9 * * MONevery monday at 09:00:00Mar 6 (MON), 2017 09:00:00; Mar 13 (MON), 2017 09:00:00
0 0 0 1 * *every 1st of month (monthly)Mar 1, 2017 00:00:00; Apr 1, 2017 00:00:00; May 1, 2017 00:00:00
0 0 0 1 1 *every 1st of january (yearly)Jan 1, 2017 00:00:00; Jan 1, 2018 00:00:00; Jan 1, 2019 00:00:00
0 0 * * * SUNevery hour on sundayMar 5 (SUN), 2017 23:00:00; Mar 12 (SUN), 2017 00:00:00; Mar 12 (SUN), 2017 01:00:00
0 0 0 * * SAT,SUNevery saturday and sundayMar 3 (SUN), 2017 00:00:00; Mar 11 (SAT) 00:00:00; Mar 12 (SUN), 2017 00:00:00
0 0 0 * * 6,0every saturday and sundayMar 3 (SUN), 2017 00:00:00; Mar 11 (SAT) 00:00:00; Mar 12 (SUN), 2017 00:00:00
0 0 0 1-7 * SUNevery first sunday of the month at 00:00:00Mar 5 (SUN), 2017 00:00:00; Apr 2 (SUN), 2017 00:00:00
11 5 23 * * *daily at 23:05:11Mar 1, 2017 23:05:11; Mar 2, 2017 23:05:11
30 5 /6 * * *every 6 hours at 5 minutes and 30 seconds06:05:30; 12:05:30; 18:05:30; 00:05:30
*/15 * * * * *every 15 seconds09:00:15; 09:00:30; … 09:03:30; 09:03:45; 09:04:00

Contact

Get in Touch

Lyon, France

kamalshkeir@gmail.com

How Can I Help You?