Open a Terminal window.
Open your zsh config file:
code ~/.zshrc| REQUIRED=('pytest' 'pylint' 'ipdb' 'PyYAML' 'nbresult' 'autopep8' 'flake8' 'yapf' 'lxml' 'requests' 'bs4' 'jupyterlab' 'pandas' 'matplotlib' 'seaborn' 'plotly' 'scikit-learn' 'tensorflow' 'nbconvert' 'xgboost' 'statsmodels' 'pandas-profiling' 'jupyter-resource-usage' 'dtale') | |
| PACKAGES=$(pip freeze) | |
| PACKS=() | |
| while read -r line; do | |
| PACKS+=("$line") | |
| done <<< "$PACKAGES" | |
| missing=() | |
| for r in ${REQUIRED[@]}; do | |
| present=0 | |
| for p in ${PACKS[@]}; do |
| print('Loading pandas...') | |
| import pandas as pd | |
| df = pd.DataFrame({'pandas':['OK']}) | |
| df.shape | |
| print('✅ pandas OK') | |
| print('Loading Scikit-learn...') | |
| from sklearn.decomposition import PCA | |
| pca = PCA() | |
| print('✅ Scikit-learn OK') | |
| print('Loading TensorFlow...') |
| REQUIRED=('pytest' 'pylint' 'ipdb' 'PyYAML' 'nbresult' 'autopep8' 'flake8' 'yapf' 'lxml' 'requests' 'bs4' 'jupyterlab' 'pandas' 'matplotlib' 'seaborn' 'plotly' 'scikit-learn' 'tensorflow' 'nbconvert' 'xgboost' 'statsmodels' 'pandas-profiling' 'jupyter-resource-usage' 'dtale') | |
| PACKAGES=$(pip freeze) | |
| PACKS=() | |
| while read -r line; do | |
| PACKS+=("$line") | |
| done <<< "$PACKAGES" | |
| missing=() | |
| arch_name="$(uname -m)" | |
| if [ "${arch_name}" = "x86_64" ]; then | |
| if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]; then |
| import os | |
| import pandas as pd | |
| class Olist: | |
| def get_data(self): | |
| """ | |
| This function returns a Python dict. | |
| Its keys should be 'sellers', 'orders', 'order_items' etc... |
| from time import sleep | |
| class Trainer: | |
| def run(self): | |
| print("Training launched.") | |
| print("Training running...") | |
| sleep(2) | |
| print("Taining finished.") | |
| if __name__ == '__main__': |
| pytest | |
| pylint | |
| ipdb | |
| jupyterlab | |
| numpy | |
| pandas | |
| matplotlib | |
| seaborn | |
| scikit-learn | |
| packgenlite @ git+https://github.com/krokrob/packgenlite.git@master |
| import os | |
| import pandas as pd | |
| class Olist: | |
| def get_data(self): | |
| """ | |
| 01-01 > This function returns all Olist datasets | |
| as DataFrames within a Python dict. |