<jupyter_start><jupyter_text>Running Code *First* and foremost, the Jupyter Notebook is an interactive environment for writing and running code. The notebook is capable of running code in a wide range of languages. However, each notebook is associated with a single kernel.  This notebook is associated with the IPython kernel, therefore runs Python code.  Code cells allow you to enter and run code<jupyter_code>from IPython.display import IFrame

IFrame(src='https://s3.amazonaws.com/duhaime/blog/visualizations/isolation-forests.html', width=700, height=600)

from IPython.display import HTML

input_form = """
<div style="background-color:gainsboro; border:solid black; width:300px; padding:20px;">
Variable Name: <input type="text" id="var_name" value="foo"><br>
Variable Value: <input type="text" id="var_value" value="bar"><br>
<button onclick="set_value()">Set Value</button>
</div>
"""

javascript = """
<script type="text/Javascript">
    window.set_value = function (){
        document.getElementById('var_name').value = 'rebornix';
    }
</script>
"""

HTML(input_form + javascript)
b = input('type:'
print(b)<jupyter_output><empty_output><jupyter_text>There are two other keyboard shortcuts for running code:* `Alt-Enter` runs the current cell and inserts a new one below.* `Ctrl-Enter` run the current cell and enters command mode.  ipywidgets supportWidgets linking<jupyter_code>from ipywidgets import VBox, jsdlink, IntSlider, Button

s1, s2 = IntSlider(max=200, value=100), IntSlider(value=40)
jsdlink((s1, 'value'), (s2, 'max'))
VBox([s1, s2])<jupyter_output><empty_output><jupyter_text>Widgets sharing the same models<jupyter_code>VBox([s1, s2])<jupyter_output><empty_output><jupyter_text>Running Code *First* and foremost, the Jupyter Notebook is an interactive environment for writing and running code. The notebook is capable of running code in a wide range of languages. However, each notebook is associated with a single kernel.  This notebook is associated with the IPython kernel, therefore runs Python code.  Code cells allow you to enter and run code<jupyter_code>from IPython.display import IFrame

IFrame(src='https://s3.amazonaws.com/duhaime/blog/visualizations/isolation-forests.html', width=700, height=600)

from IPython.display import HTML

input_form = """
<div style="background-color:gainsboro; border:solid black; width:300px; padding:20px;">
Variable Name: <input type="text" id="var_name" value="foo"><br>
Variable Value: <input type="text" id="var_value" value="bar"><br>
<button onclick="set_value()">Set Value</button>
</div>
"""

javascript = """
<script type="text/Javascript">
    window.set_value = function (){
        document.getElementById('var_name').value = 'rebornix';
    }
</script>
"""

HTML(input_form + javascript)
b = input('type:'
print(b)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12429378531073447, 'fraction_numerical': 0.014124293785310734, 'mean_word_length': 6.282776349614396, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '513397', 'license': 'MIT', 'n_tokens_mistral': 911, 'n_tokens_neox': 873, 'n_words': 264, 'path': 'test/ipywidgets-scroll.test.ipynb', 'repo_name': 'xplusplus/vscode-notebook-testdata', 'size': '2832'}