<commit_before>fs = require 'fs'
lead = require 'lead.js'
lead.enable_codemirror()
notebook = lead.require 'notebook'
React = require 'react'

script = fs.readFileSync './examples/random_walks.coffee', encoding: 'utf-8'

notebook.create_notebook(imports: ['builtins', 'compat'], module_names: ['graph'])
.done (nb) ->
  input = notebook.add_input_cell nb, code: script
  notebook.run input
  setTimeout ->
    console.log React.renderComponentToStaticMarkup nb.component
    process.exit()
  , 500<commit_msg>relative filename for example script<commit_after>fs = require 'fs'
lead = require 'lead.js'
notebook = lead.require 'notebook'
React = require 'react'

script = fs.readFileSync __dirname + '/../random_walks.coffee', encoding: 'utf-8'

notebook.create_notebook(imports: ['builtins', 'compat'], module_names: ['graph'])
.done (nb) ->
  input = notebook.add_input_cell nb, code: script
  notebook.run input
  setTimeout ->
    console.log React.renderComponentToStaticMarkup nb.component
    process.exit()
  , 500
{'fraction_non_alphanumeric': 0.13418217433888344, 'fraction_numerical': 0.007835455435847209, 'mean_word_length': 4.941860465116279, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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}}
{'dir': 'git-commits-cleaned', 'id': '2241839', 'n_tokens_mistral': 343, 'n_tokens_neox': 332, 'n_words': 79}