-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix: Updates to Code Execution Notebook #1604
Conversation
holtskinner
commented
Jan 6, 2025
- Change Code output to use Language syntax highlighting
- Change Code output to use Language syntax highlighting
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Hi @holtskinner and reviewers,
I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary of the changes for you and other reviewers to get up to speed:
This pull request, titled "fix: Updates to Code Execution Notebook", aims to improve the code execution notebook by making several updates. The primary change is to update the code output to use language syntax highlighting.
Here's a breakdown of the changes:
- Removed BigQuery Studio link: The link to open the notebook in BigQuery Studio has been removed from
gemini/code-execution/intro_code_execution.ipynb
(lines 51-53). - Updated execution counts: The
execution_count
values ingemini/code-execution/intro_code_execution.ipynb
have been updated tonull
in several code cells (lines 140, 187, 232, 247, 267, 314, 338, 360, 422, 521, 586, 608, 662, 714, 842, 892, 1023, 1073, 1233, 1323). This likely reflects a clean state for the notebook. - Added
HTML
import: TheIPython.display.HTML
import was added togemini/code-execution/intro_code_execution.ipynb
(line 195) along with the addition ofToolCodeExecution
to the imports (line 197). - Updated execution count values: Several code cells'
execution_count
values were adjusted ingemini/code-execution/intro_code_execution.ipynb
(lines 232, 247, 267, etc.). - Simplified CSS function: The
set_css_in_cell_output
function ingemini/code-execution/intro_code_execution.ipynb
was simplified (lines 274-296), removing unnecessary imports and lines of code. - Removed redundant HTML output: Redundant HTML output related to CSS styling was removed from cells in
gemini/code-execution/intro_code_execution.ipynb
(lines 311-321, 335-346). - Updated code execution tool: The
code_execution_tool
ingemini/code-execution/intro_code_execution.ipynb
was updated to useToolCodeExecution
(line 344). - Improved code formatting: The markdown code blocks in
gemini/code-execution/intro_code_execution.ipynb
were updated to use ````py` for Python code (lines 458, 500, 750, 928, 1109, 1540, 1747). This improves readability. - Improved output formatting: The output of code execution results in
gemini/code-execution/intro_code_execution.ipynb
is now wrapped in backticks for better formatting (lines 578, 827, 1008, 1205, 1298). - Updated sample time series data: The sample time series data generation and output in
gemini/code-execution/intro_code_execution.ipynb
has been updated (lines 755-773, 785-796, 934-954, 966-977, 1115-1147, 1159-1174). The time range, temperature profile, and noise generation have been modified, resulting in different sample data. A moving average filter was added to the example. - Added markdown separators: Several markdown separators (
---
) were added to the notebook's output section (lines 1619-1876). This improves the visual structure of the notebook's output.
I hope this helps!
Small changes, big impact,
Code flows like a river,
Syntax shines so bright.
Gemini encountered an error creating the review. You can try again by commenting |
Gemini encountered an error creating the summary. You can try again by commenting |