code
stringlengths
3
6.57k
addBook()
input(enterToGo)
os.system(clean_the_screen)
searchBookISBN()
input(enterToGo)
os.system(clean_the_screen)
searchBookName()
input(enterToGo)
os.system(clean_the_screen)
checkOutBook()
input(enterToGo)
os.system(clean_the_screen)
listStudents()
print("-" * 80)
input(enterToGo)
os.system(clean_the_screen)
topThreeBook()
print("-" * 80)
input(enterToGo)
os.system(clean_the_screen)
topThreeStudents()
print("-" * 80)
input(enterToGo)
os.system(clean_the_screen)
addStudent()
print("-" * 80)
input(enterToGo)
os.system(clean_the_screen)
searchBookAuthor()
print("-" * 80)
input(enterToGo)
os.system(clean_the_screen)
checkInBook()
print("-" * 80)
input(enterToGo)
print("Saving all the changes...")
time.sleep(3)
os.system(clean_the_screen)
print("See you soon!\n")
exit()
print("Please enter a number in menu. (1-12)
input(enterToGo)
load_dotenv()
os.environ.get("ID")
os.environ.get("TOKEN")
Manager(ID, TOKEN)
print(manager.test_api()
Episode(**{'title': "test upload"})
manager.post_episode(ep, 'testfile.mp3', None)
print(res)
logging.getLogger(__name__)
parse_media_id(request: Request)
isinstance(server_name, bytes)
server_name.decode("utf-8")
media_id.decode("utf8")
len(request.postpath)
urllib.parse.unquote(request.postpath[-1].decode("utf-8")
respond_404(request: Request)
cs_error("Not found %r" % (request.postpath,)
logger.debug("Responding with %r", file_path)
os.path.isfile(file_path)
os.stat(file_path)
add_file_headers(request, media_type, file_size, upload_name)
open(file_path, "rb")
make_deferred_yieldable(FileSender()
beginFileTransfer(f, request)
finish_request(request)
respond_404(request)
_quote(x)
urllib.parse.quote(x.encode("utf-8")
media_type.lower()
request.setHeader(b"Content-Type", content_type.encode("UTF-8")
is (essentially)
because (a)
and (b)
_can_encode_filename_as_token(upload_name)
_quote(upload_name)
request.setHeader(b"Content-Disposition", disposition.encode("ascii")
request.setHeader(b"Cache-Control", b"public,max-age=86400,s-maxage=86400")
request.setHeader(b"Content-Length", b"%d" % (file_size,)
request.setHeader(b"X-Robots-Tag", "noindex, nofollow, noarchive, noimageindex")
_can_encode_filename_as_token(x: str)
character (octets 0 - 127)
DEL (127)
ord(c)
ord(c)
respond_404(request)
logger.debug("Responding to media request with responder %s", responder)
add_file_headers(request, media_type, file_size, upload_name)
responder.write_to_consumer(request)
logger.warning("Failed to write to consumer: %s %s", type(e)
request.unregisterProducer()
finish_request(request)
write_to_consumer(self, consumer: IConsumer)
__enter__(self)
__exit__(self, exc_type, exc_val, exc_tb)
server_name (str)
file_id (str)
url_cache (bool)
thumbnail (bool)