Skip to content

Instantly share code, notes, and snippets.

View eteresh's full-sized avatar

Tereshchenko Evgenii eteresh

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# coding=utf-8
import re
from collections import defaultdict
from tqdm import tqdm_notebook as tqdm
import numpy as np
from scipy.sparse import lil_matrix
def load_data(max_films=None):
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.

Работа с виртуальным окружением

Создание виртуального окружения

Создать виртуальное окружение можно командой virtualenv. Устновка в Ubuntu:

sudo apt-get install python-virtualenv

Команде virtualenv необходимо передать имя директории с виртуальным окружением и, опционально, версию интерпретатора питона. Например, так:

virtualenv ~/venv --python=python3.4
from pywFM import FM
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
from scipy.stats import norm
iris = datasets.load_iris()
X = iris.data
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.
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.