<jupyter_start><jupyter_text>TensorFlow.js on Colab<jupyter_code>#@title ## Setup JavaScript Kernel
#@markdown This cell will install ``ijavascript`` a Javascript kernel 
#@markdown Jupyter notebooks. 

#@markdown ---
#@markdown **IMPORTANT:** Once the installation is completed, you must reload 
#@markdown this page in order to apply the changes.
#@markdown 
#@markdown Press ``F5`` to reload this page.
#@markdown 
#@markdown ---

%%shell
npm install -g npm@latest -q

# !npm install -g npm@latest -q
# !npm cache verify -q
# !npm install -g --unsafe-perm ijavascript -q
# !ijsinstall --install=global
# !jupyter-kernelspec list
var { spawn } = require('child_process');
var sh = (cmd) => { 
    $$.async();
    var sp = spawn(cmd, { cwd: process.cwd(), stdio: 'pipe', shell: true, encoding: 'utf-8' });
    sp.stdout.on('data', data => console.log(data.toString()));
    sp.stderr.on('data', data => console.error(data.toString()));
    sp.on('close', () => $$.done());
};
var run_async = async (pf) => {
  $$.async();
  await pf();
  $$.done();
};
sh('npm init -y');
!npm install -g npm@latest
!npm cache verify
!npm install -g --unsafe-perm ijavascript
!ijsinstall --install=global
!jupyter-kernelspec list
var { spawn } = require('child_process');
var sh = (cmd) => { 
    $$.async();
    var sp = spawn(cmd, { cwd: process.cwd(), stdio: 'pipe', shell: true, encoding: 'utf-8' });
    sp.stdout.on('data', data => console.log(data.toString()));
    sp.stderr.on('data', data => console.error(data.toString()));
    sp.on('close', () => $$.done());
};
var run_async = async (pf) => {
  $$.async();
  await pf();
  $$.done();
};
sh('npm init -y');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2027348394768133, 'fraction_numerical': 0.0017835909631391202, 'mean_word_length': 4.069277108433735, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '577989', 'license': 'Apache-2.0', 'n_tokens_mistral': 611, 'n_tokens_neox': 582, 'n_words': 163, 'path': 'tensorflow-js/tensorflow-js-colab-kernel.ipynb', 'repo_name': 'martin-fabbri/colab-notebooks', 'size': '1682'}