Skip to content

Instantly share code, notes, and snippets.

View yezz123's full-sized avatar
🦀
Rusty

Yasser Tahiri yezz123

🦀
Rusty
View GitHub Profile
# importing the library
from covid import Covid
# initializing
covid = Covid()
# printing data for the world
print("Total active cases in world:", covid.get_total_active_cases())
print("Total recovered cases in world:", covid.get_total_recovered())
print("Total deaths in world:", covid.get_total_deaths())
# getting data according to country wise
cases = covid.get_status_by_country_name("us")
@yezz123
yezz123 / simple-pagination.js
Last active July 10, 2021 19:20 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@yezz123
yezz123 / Exploitation.md
Created May 24, 2021 12:09
Pentesting-Exploitation
@yezz123
yezz123 / Class_from_module.py
Last active June 26, 2021 02:15
Here i will post my Helpful script can be used 🚀
import importlib
def get_class_from_module(module_class):
"""Get Class from a module"""
module_name, class_name = module_class.rsplit('.', 1)
return getattr(importlib.import_module(module_name), class_name)
@yezz123
yezz123 / continent.py
Created June 18, 2021 00:05
Django Module for Country Data
from django.db import models
from django.utils.translation import pgettext_lazy
from utility.models import BaseModel, BaseModelAdmin
class Continent(BaseModel):
name = models.CharField(max_length=255,
primary_key=True,
verbose_name=pgettext_lazy('Continent',
def nth_fibonacci(n):
a = 0
b = 1
if n < 0:
print("Incorrect input")
elif n == 0:
return a
elif n == 1:
return b
else:
@yezz123
yezz123 / Security.py
Created June 25, 2021 11:24
A Json Web Token Context using Python Jose for a FastAPI File core.
from datetime import datetime, timedelta
from typing import Any, Union
from jose import jwt
from passlib.context import CryptContext
from core.config import settings
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
@yezz123
yezz123 / Pwd_Handler.py
Created August 22, 2021 14:28
A little Password Handler using Crypto Cipher and Hashlib and Bcrypt 🛠
import typing
import hashlib
from binascii import b2a_hex, a2b_hex
import bcrypt
from Crypto.Cipher import AES
class AesCrypto:
def __init__(self, key: str, key_length: int = 16):