-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (38 loc) · 1.31 KB
/
Makefile
File metadata and controls
56 lines (38 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
ENV_NAME := nlp-intro
ifeq ($(OS),Windows_NT)
ACTIVATE := activate
else
ACTIVATE := . $(HOME)/anaconda3/bin/activate
# Darwin = OSX
UNAME_S := $(shell uname -s)
endif
update-env:
conda env update -n $(ENV_NAME) -f environment.yml
install-jupyterlab-ext:
$(ACTIVATE) $(ENV_NAME) && \
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build && \
jupyter labextension install jupyterlab-plotly --no-build && \
jupyter labextension install plotlywidget --no-build && \
jupyter labextension install @jupyterlab/toc --no-build && \
jupyter lab build
# Install python windows package manager to install wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/
install-polyglot:
ifeq ($(OS),Windows_NT)
$(ACTIVATE) $(ENV_NAME) && pip install pipwin
$(ACTIVATE) $(ENV_NAME) && pipwin install pyicu && pipwin install pycld2
else ifeq ($(UNAME_S),Darwin) # OSX
brew install icu4c
$(ACTIVATE) && pip install pyicu
endif
$(ACTIVATE) && pip install git+https://github.com/aboSamoor/polyglot.git
env: update-env install-jupyterlab-ext
remove-env:
conda remove -n $(ENV_NAME) --all
lab:
$(ACTIVATE) $(ENV_NAME) && jupyter lab
lab:
$(ACTIVATE) $(ENV_NAME) && jupyter notebook
notebooks:
$(ACTIVATE) $(ENV_NAME) && jupyter notebooks
get-data:
$(ACTIVATE) && python nlp_intro/diskusjon_no_scraper.py