This file contains hidden or 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
| # MangaDex API v1.0 | |
| # | |
| # Requires python3.7 with the following packages installed | |
| # - aiofiles 0.5.0 | |
| # - aiohttp 3.6.2 | |
| # - Pillow 7.2.0 | |
| # - requests 2.24.0 | |
| import aiofiles | |
| import aiohttp |
This file contains hidden or 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 requests | |
| import sys | |
| from PIL import Image | |
| # Put the name of ebook you want to download | |
| book_name = 'peepee' | |
| pdf_file = book_name + '.pdf' | |
| link = f'https://www.webassign.net/ebooks/{book_name}/docs/{book_name.upper()}.pdf' | |
| starting_pageno = 1 |
This file contains hidden or 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
| ; $ nasm -f elf64 factorial.asm && gcc -m64 -no-pie -o factorial factorial.o && ./factorial | |
| bits 64 | |
| global main | |
| extern putchar, getchar, exit | |
| section .text | |
| main: | |
| push rbp | |
| xor rbx, rbx | |
| add rbx, 1 |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # Copyright (c) 2020, Jimmy Yang | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # | |
| # * Redistributions of source code must retain the above copyright notice, | |
| # this list of conditions and the following disclaimer. |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # Copyright (c) 2020, Jimmy Yang | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # | |
| # * Redistributions of source code must retain the above copyright notice, | |
| # this list of conditions and the following disclaimer. |
This file contains hidden or 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 uhm(f): | |
| class Wrapper: | |
| def __getitem__(self, arg): | |
| if arg is None: | |
| return f() | |
| elif isinstance(arg, tuple): | |
| return f(*arg) | |
| else: | |
| return f(arg) | |
| return Wrapper() |
This file contains hidden or 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
| /* gcc mandelbrot.c -o mandelbrot -lgdi32 -Wl,-subsystem,windows */ | |
| #include <math.h> | |
| #include <stdlib.h> | |
| #include <windows.h> | |
| typedef struct | |
| { | |
| double real; | |
| double imag; |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # A simple Python script for downloading videos from PH. | |
| # | |
| # Usage: python ph.py <PH URL> | |
| # where <PH URL> is a url of a PH video | |
| # | |
| # TODO Speed up download code, it's too slow, define regex patterns in variables with meaningful names | |
| import os |
NewerOlder