Skip to content

Instantly share code, notes, and snippets.

@umaimat
umaimat / understanding-word-vectors.ipynb
Created May 25, 2019 07:07 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@umaimat
umaimat / surprise_tutorial.py
Created October 14, 2019 06:43 — forked from mahermalaeb/surprise_tutorial.py
The easy guide for building python collaborative filtering recommendation system in 2017
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:
@umaimat
umaimat / flask_logging_requests.py
Created August 3, 2021 14:31 — forked from alexaleluia12/flask_logging_requests.py
Flask Logging (every request)
#/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
@umaimat
umaimat / log.py
Created August 4, 2021 11:44 — forked from nguyenkims/log.py
Basic example on how setup a Python logger
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)
{
"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",