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
{ | |
"public_identifier": "umaimatinwala", | |
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/umaimatinwala/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230524%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230524T064146Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=426d44dd74effe5edf008ff4f6fab9da83343a6b4644f7d8918fd6ccd42781a4", | |
"background_cover_image_url": null, | |
"first_name": "Umaima", | |
"last_name": "Tinwala(Surti)", | |
"full_name": "Umaima Tinwala(Surti)", | |
"follower_count": null, | |
"occupation": "Solution Architect Consultant", | |
"headline": "Solution Architect || Data Science Enthusiast || Learner || Mentor || Mother", |
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 logging | |
import sys | |
from logging.handlers import TimedRotatingFileHandler | |
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
LOG_FILE = "my_app.log" | |
def get_console_handler(): | |
console_handler = logging.StreamHandler(sys.stdout) | |
console_handler.setFormatter(FORMATTER) |
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/python | |
# http://exploreflask.com/en/latest/views.html | |
# https://stackoverflow.com/questions/51691730/flask-middleware-for-specific-route | |
# https://dev.to/rhymes/logging-flask-requests-with-colors-and-structure--7g1 | |
import logging | |
from logging.handlers import RotatingFileHandler | |
from flask import Flask, request, jsonify | |
from time import strftime |
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 zipfile | |
from surprise import Reader, Dataset, SVD, evaluate | |
# Unzip ml-100k.zip | |
zipfile = zipfile.ZipFile('ml-100k.zip', 'r') | |
zipfile.extractall() | |
zipfile.close() | |
# Read data into an array of strings | |
with open('./ml-100k/u.data') as f: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.