Skip to content

Instantly share code, notes, and snippets.

View MayankFawkes's full-sized avatar
🎓
Open to work on github projects

Mayank Gupta MayankFawkes

🎓
Open to work on github projects
View GitHub Profile
@MayankFawkes
MayankFawkes / ISO3166-1.alpha2.json
Created April 11, 2022 07:10
json of country codes (ISO 3166-1 alpha-2) and corresponding names
{
"AF": "Afghanistan",
"AX": "Aland Islands",
"AL": "Albania",
"DZ": "Algeria",
"AS": "American Samoa",
"AD": "Andorra",
"AO": "Angola",
"AI": "Anguilla",
"AQ": "Antarctica",
@MayankFawkes
MayankFawkes / world-inline.json
Last active April 30, 2022 16:03
world country states json all in one
This file has been truncated, but you can view the full file.
{"AF": {"Badakhshan": {"data": [["Arghanj Khw\u0101h", "arghanj khwh"], ["Arg\u014d", "arg"], ["Bah\u0101rak", "bahrak"], ["Dar\u0101yim", "daryim"], ["Darw\u0101z-e B\u0101l\u0101", "darwz e bl"], ["Darw\u0101z-e P\u0101\u2019\u012bn", "darwz e pn"], ["Fa\u012b\u1e95\u0101b\u0101d", "fabd"], ["Ishk\u0101shim", "ishkshim"], ["Jurm", "jurm"], ["Kh\u0101sh", "khsh"], ["Khw\u0101h\u0101n", "khwhn"], ["Kishim", "kishim"], ["K\u014dhist\u0101n", "khistn"], ["K\u016bf \u0100b", "kf b"], ["Kuran Wa Munjan", "kuran wa munjan"], ["R\u0101ghist\u0101n", "rghistn"], ["Shahr-e Buzurg", "shahr e buzurg"], ["Shighnan District", "shighnan district"], ["Shik\u012b", "shik"], ["Shuhad\u0101", "shuhad"], ["Tag\u0101b", "tagb"], ["Tashk\u0101n", "tashkn"], ["W\u0101kh\u0101n", "wkhn"], ["Ward\u016bj", "wardj"], ["Yaftal-e Sufl\u00e1", "yaftal e sufla"], ["Yamg\u0101n", "yamgn"], ["Y\u0101w\u0101n", "ywn"], ["Zayb\u0101k", "zaybk"]], "real": "badakhshan"}, "Badghis": {"data": [["\u0100b-e Kamar\u012b", "b e kamar"], ["Gh\u014drm
@MayankFawkes
MayankFawkes / docker-nosudo.sh
Last active December 4, 2021 07:33
Install docker in single script
apt-get remove docker docker-engine docker.io containerd runc
apt-get update
apt-get -y install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get -y install docker-ce docker-ce-cli containerd.io
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
@MayankFawkes
MayankFawkes / Mscript.js
Last active November 7, 2021 09:25
A Simple clone of jQuery.
(function() {
var document = window.document;
var version = "0.1.0";
var arr = [];
var isFunction = function isFunction( obj ) {
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
typeof obj.item !== "function";
};
var isWindow = function isWindow( obj ) {
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo curl -L "https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
@MayankFawkes
MayankFawkes / permissions.py
Last active September 19, 2021 03:03
Permission based on bits
from typing import (
Any,
TypeVar,
ClassVar,
Dict,
Type,
Optional
)
FV = TypeVar('FV', bound='Flag')
@MayankFawkes
MayankFawkes / main.py
Last active July 27, 2022 20:11
Stremio 1337x addon python single file, https://1337x.mayankfawkes.repl.co
#!/usr/bin/env python3
from flask import Flask, Response, jsonify, url_for, abort
import requests, re, unicodedata
from bs4 import BeautifulSoup, element
import concurrent.futures, sys
from functools import lru_cache
import gunicorn.app.wsgiapp
MAX_CONCURRENT_WORKERS = 10
@MayankFawkes
MayankFawkes / sudoku.py
Created April 18, 2021 12:55
A simple sudoku solver.
'''
A simple sudoku solver
'''
from typing import List
from typing import Tuple
from typing import Union
class sudoku:
def __init__(self, puzzel:List[List[int]]):
self.puzzel = puzzel
@MayankFawkes
MayankFawkes / shows.py
Last active April 5, 2021 04:44
Indian shows script watch before anyone. working in ubuntu
import requests, re
from subprocess import run
class Shows:
showl_list = {
"Shaurya Aur Anokhi Ki Kahani":"https://saathnibhanasaathiya2.com/shaurya-aur-anokhi-ki-kahani-grs/",
"Ghum Hai Kisi Ke Pyar Mein":"https://saathnibhanasaathiya2.com/ghum-hai-kisi-ke-pyar-mein/",
"Imlie":"https://saathnibhanasaathiya2.com/imlie-rthj/",
"Anupama": "https://saathnibhanasaathiya2.com/anupama/",
}
@MayankFawkes
MayankFawkes / series.py
Created February 8, 2021 12:52
Find next number in series.
'''
Predict The next number from the series
ser = series([0,2,4])
numbers = ser.series(next=5)
for number in numbers:
print(number)
>>> 6
>>> 8