Skip to content

Instantly share code, notes, and snippets.

View yezz123's full-sized avatar
πŸ¦‰
Building

Yasser Tahiri yezz123

πŸ¦‰
Building
View GitHub Profile
@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;
# 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")