This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a wrapper for my API that scrapes Yify (yts.mx) | |
# Import the API | |
from YifyAPI.yify import search_yify as search # pip install YifyAPI | |
# Import the table | |
from tabulate import tabulate # pip install tabulate | |
# Import other utilities | |
import click, os # pip install click |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup # pip install bs4 | |
import re | |
with open(r"PATH/TO/CHAPTERS/XML/FILE.xml", 'r') as f: | |
soup = BeautifulSoup(f.read(), 'html.parser') | |
chapters = soup.select('editionentry > chapteratom') | |
chapters_array = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2021 ArjixWasTaken | |
const isArray = (obj) => Array.isArray(obj); | |
const isDict = (obj) => { | |
if (typeof obj === "object" && !isArray(obj)) return true; | |
return false; | |
}; | |
const isDictEmpty = (obj) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def escape(string): | |
if ('"' in string): | |
return '"""{}"""'.format(string) | |
return '"{}"'.format(string) | |
def listToListOf(list_): | |
out = [] | |
for x in list_: | |
if type(x) in (int, float): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import click | |
import json | |
import sys | |
import os | |
class Configurer: | |
executable = os.path.abspath(sys.argv[0]) | |
def save(func, *args, **kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
from itertools import cycle | |
from os import system as run_cmd | |
def get_player_id(): | |
id = 1 | |
while 1: | |
yield id | |
id += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const func = ` | |
private static i(int arg0, boolean arg1) { //(IZ)Z | |
iconst_3 | |
istare2 | |
ilosasd | |
asdauishd | |
asdasd | |
goto L2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
import socket | |
from time import sleep | |
from pprint import pprint | |
PACKET_GROUPS: dict[bytes, int] = {} | |
class Packet: | |
source_port_number: int | |
destination_port_number: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() -> Result<Smth, Smth> { | |
let value = get_smth()?; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioj |
OlderNewer