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 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: |
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
Setting Up A Localhost Self-signed Certificate For Local Https Development | |
========================================================================== | |
- GENERATE THE CERTIFICATE | |
# 1. generate key | |
- create an 'ssl' folder somewhere | |
- cd to it |
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
<?php | |
/** | |
* Get the ordinal suffix of an int (e.g. th, rd, st, etc.) | |
* | |
* @param int $n | |
* @param bool $return_n Include $n in the string returned | |
* @return string $n including its ordinal suffix | |
*/ | |
function ordinal_suffix($n, $return_n = true) { |