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 pandas as pd | |
df = pd.DataFrame({ | |
'Name': ['Alice', 'Bob', 'Charlie'], | |
'Age': [25, 30, 35], | |
'City': ['Delhi', 'Mumbai', 'Bangalore'] | |
}) | |
html_template = """ | |
<!DOCTYPE html> |
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
# See https://github.com/facebookresearch/fastText/blob/master/get-wikimedia.sh | |
# | |
# From https://github.com/facebookresearch/fastText/issues/161: | |
# | |
# We now have a script called 'get-wikimedia.sh', that you can use to download and | |
# process a recent wikipedia dump of any language. This script applies the preprocessing | |
# we used to create the published word vectors. | |
# | |
# The parameters we used to build the word vectors are the default skip-gram settings, | |
# except with a dimensionality of 300 as indicated on the top of the list of word |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
from sklearn import linear_model | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from sklearn.feature_extraction.text import CountVectorizer | |
from sklearn.cross_validation import train_test_split | |
import sklearn | |
import json | |
from sklearn.externals import joblib | |
from sklearn.pipeline import make_pipeline | |
from sklearn.grid_search import GridSearchCV |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# CHALLENGE PROBLEM: | |
# | |
# Use your check_sudoku function as the basis for solve_sudoku(): a | |
# function that takes a partially-completed Sudoku grid and replaces | |
# each 0 cell with a number in the range 1..9 in such a way that the | |
# final grid is valid. | |
# | |
# There are many ways to cleverly solve a partially-completed Sudoku | |
# puzzle, but a brute-force recursive solution with backtracking is a | |
# perfectly good option. The solver should return None for broken |