Skip to content

Commit

Permalink
Updated Linux/Windows conda
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedamen committed Mar 18, 2022
1 parent 5433053 commit a5383bc
Show file tree
Hide file tree
Showing 13 changed files with 843 additions and 4,785 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ You can also run some of the notebooks interactively with Binder too

# Coding log

* 18 Mar 2022
* Updated Windows and Linux conda environments for
* latest Dash (and gensim=3.8.5)
* fixed various versioning issues
* 03 Feb 2022
* Updated Windows conda environment (`environment_windows.yml`
& `create_conda_env_windows.bat`)
Expand Down
14 changes: 12 additions & 2 deletions pythoncourse/coursecode/utils/jupyter_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ def copy_files(source, destination, strip_file_name=None):

copyfile(source_path, destination_path)

def clean_text(text):
replace = [" #k", " #K", "#k", "#K"]

for rep in replace:
text = text.replace(rep, "")

return text

def strip_input_code_from_ipynb(input_file_list):

# get list of files (including wildcards)
Expand All @@ -69,14 +77,16 @@ def strip_input_code_from_ipynb(input_file_list):
pot_str = nb['cells'][i]['source'][j].strip()

if len(pot_str) >= 1:
if '#' == pot_str[0]:
if '#' == pot_str[0] or '#k' in pot_str.lower():
try:
pot2 = pot_str[1]
except:
pot2 = ''

if pot2 != '#':
new_source.append(nb['cells'][i]['source'][j])
new_source.append(clean_text(nb['cells'][i]['source'][j]))
else:
new_source.append("\n")

# print(nb['cells'][i]['source'][j])

Expand Down
11 changes: 6 additions & 5 deletions pythoncourse/installation/create_conda_env_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ mamba install pyarrow opencv=4.5.3 modin=0.9.1 \
redis-py python-blosc pathos textblob \
pyspark koalas vaex=4.7.0 pandas=1.2.3 scipy=1.6.1 numpy=1.19.1 \
spacy fastparquet python-snappy nodejs pystan fbprophet setuptools-git \
vispy datashader pyproj holoviews streamz quandl bqplot blpapi gensim \
textacy transformers pyldavis eikon=1.1.5 findspark celery \
vispy datashader pyproj holoviews streamz quandl bqplot blpapi gensim=3.8.3 \
textacy=0.10.0 transformers pyldavis eikon=1.1.5 findspark celery \
pytesseract tabula-py \
newspaper3k dtale \
sentencepiece jupyter_contrib_nbextensions \
Expand All @@ -53,12 +53,13 @@ mamba install pandas=1.2.3 scipy=1.6.1 numpy=1.19.1 -c anaconda --yes
pip install arctic==1.79.4 \
fxcmpy alpha_vantage yfinance twython seasonal pdfminer.six \
vaderSentiment rise requests_html \
cvlib \
cufflinks==0.17.3 plotly==4.14.3 kaleido wordcloud \
cvlib==0.2.6 \
cufflinks==0.17.3 plotly kaleido wordcloud \
dash dash-html-components dash-core-components \
dash-table jupyter-dash chart_studio pillow==9.0.1 \
dash-table jupyter-dash chart_studio Pillow==7.2.0 \
finmarketpy chartpy findatapy financepy==0.193 pandas==1.2.3

# plotly==4.14.3
# Hack for vaex!
pip uninstall progressbar2
pip install progressbar2
Expand Down
11 changes: 6 additions & 5 deletions pythoncourse/installation/create_conda_env_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ source activate py38class
mamba install anaconda scikit-learn matplotlib xlwings=0.23.0 tensorflow graphviz python-graphviz pytorch pyarrow fastparquet \
python-snappy holoviews datashader pystan pyspark nodejs numpy=1.19.1 opencv -c anaconda --yes
mamba install modin=0.9.1 koalas \
jupyter_contrib_nbextensions jupyter_nbextensions_configurator vaex numpy=1.19.1 -c conda-forge --yes
jupyter_contrib_nbextensions jupyter_nbextensions_configurator vaex numpy=1.19.1 gensim=3.8.3 -c conda-forge --yes
# conda install pandas=1.2.3 -c anaconda --yes

# Install database
Expand All @@ -46,15 +46,16 @@ pip install arctic==1.79.4 \
redis quandl prophet boto3 textblob \
spacy vispy pathos bqplot streamz pyproj \
celery celery[redis] celery[msgpack] msgpack-python \
fxcmpy alpha_vantage yfinance twython newspaper3k seasonal pdfminer.six vaderSentiment gensim wordcloud rise requests_html \
fxcmpy alpha_vantage yfinance twython newspaper3k seasonal pdfminer.six vaderSentiment wordcloud rise requests_html \
textacy sentencepiece tabula-py \
transformers==3.0.2 pytesseract cmdstanpy==0.9.5 \
cvlib \
cufflinks==0.17.3 plotly==4.14.3 kaleido \
dash==1.20.0 dash-html-components==1.1.3 dash-core-components==1.16.0 dash-table==4.11.3 jupyter-dash==0.4.0 chart_studio==1.1.0 \
cufflinks==0.17.3 plotly kaleido \
dash dash-html-components dash-core-components dash-table jupyter-dash chart_studio \
jupyter-book==0.10.2 jupyterbook-latex \
dtale==1.43.0 pyldavis \
finmarketpy chartpy findatapy financepy==0.193 findspark pandas==1.2.3 numpy==1.19.1 jedi==0.15.2 parso==0.8.2
finmarketpy chartpy findatapy financepy==0.193 findspark pandas==1.2.3 \
numpy==1.19.1 jedi==0.15.2 parso==0.8.2

# Hack for vaex
pip uninstall progressbar2
Expand Down
11 changes: 6 additions & 5 deletions pythoncourse/installation/create_conda_env_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ call mamba install pyarrow opencv=4.5.3 modin=0.9.1 ^
redis-py python-blosc pathos textblob ^
pyspark koalas vaex=4.7.0 pandas=1.2.3 scipy=1.6.1 numpy=1.19.1 ^
spacy fastparquet python-snappy nodejs pystan fbprophet setuptools-git ^
vispy datashader pyproj holoviews streamz quandl bqplot blpapi gensim ^
textacy transformers pyldavis eikon=1.1.5 findspark celery ^
vispy datashader pyproj holoviews streamz quandl bqplot blpapi gensim=3.8.3 ^
textacy=0.10.0 transformers pyldavis eikon=1.1.5 findspark celery ^
pytesseract tabula-py ^
newspaper3k dtale ^
sentencepiece jupyter_contrib_nbextensions ^
Expand All @@ -46,12 +46,13 @@ REM Install various graphics libraries
call pip install arctic==1.79.4 ^
fxcmpy alpha_vantage yfinance twython seasonal pdfminer.six ^
vaderSentiment rise requests_html ^
cvlib ^
cufflinks==0.17.3 plotly==4.14.3 kaleido wordcloud ^
cvlib==0.2.6 ^
cufflinks==0.17.3 plotly kaleido wordcloud ^
dash dash-html-components dash-core-components ^
dash-table jupyter-dash chart_studio pillow==9.0.1 ^
dash-table jupyter-dash chart_studio Pillow==7.2.0 ^
finmarketpy chartpy findatapy financepy==0.193 pandas==1.2.3

REM plotly==4.14.3
REM Hack for vaex!
call pip uninstall progressbar2
call pip install progressbar2
Expand Down
Loading

0 comments on commit a5383bc

Please sign in to comment.