-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes for cudf_pandas_opencellid_demo.ipynb #39
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@raybellwaves thanks for creating this PR, just left a couple of comments! |
Can't see your comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a couple of comments
"import os\n", | ||
"import subprocess\n", | ||
"\n", | ||
"file_name = \"opencellid_downloader.py\"\n", | ||
"file_url = f\"https://raw.githubusercontent.com/rapidsai-community/showcase/main/getting_started_tutorials/{file_name}\"\n", | ||
"\n", | ||
"if os.path.exists(file_name):\n", | ||
" print(f\"The file '{file_name}' exists in the current directory.\")\n", | ||
"else:\n", | ||
" print(f\"The file '{file_name}' does not exist in the current directory. Downloading it now...\")\n", | ||
" try:\n", | ||
" subprocess.run([\"wget\", file_url], check=True)\n", | ||
" print(f\"Successfully downloaded '{file_name}'.\")\n", | ||
" except subprocess.CalledProcessError as e:\n", | ||
" print(f\"Failed to download the file. Error: {e}\")\n", | ||
" except FileNotFoundError:\n", | ||
" print(\"The 'wget' command is not found. Please ensure it's installed and in your system PATH.\")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of checking if the file exists before downloading, can be done in an inline way as well to keep the cell size small:
!test -f opencellid_downloader.py || wget https://raw.githubusercontent.com/rapidsai-community/showcase/main/getting_started_tutorials/opencellid_downloader.py
Apologies, can you see them now, @raybellwaves ? |
Co-authored-by: Ajay Thorve <[email protected]>
! pip install -q hvplot pydeck panel holoviews=1.18.3
givesERROR: Invalid requirement: 'holoviews=1.18.3': Expected end or semicolon (after name and no valid version specifier)
holoviews=1.18.3
^
Hint: = is not a valid operator. Did you mean == ?
Added
jupyter_bokeh
in install to avoidI also adjusted the part to check if the script exists before downloading