<commit_before>{CompositeDisposable} = require 'atom'

fs = require 'fs'
zmq = require 'zmq'
_ = require 'lodash'

KernelManager = require './kernel-manager'
ConfigManager = require './config-manager'
ResultView = require './result-view'
SignalListView = require './signal-list-view'
WatchSidebar = require './watch-sidebar'
WatchLanguagePicker = require './watch-language-picker'
AutocompleteProvider = require './autocomplete-provider'

module.exports = Hydrogen =
    config:
        languageMappings:
            title: "Language Mappings"
            description: 'Some packages may change the name of the grammar for
                          a language (e.g. "Python" -> "Python Django"). That
                          leaves Hydrogen unable to figure out what kernel to
                          use for your code.

                          This field should be valid JSON mapping a nonstandard
                          language name to a standard one, e.g.

                          {"Python Django": "python", "Ruby (Rails)": "ruby"}'
            type: 'string'
            default: '{}'
        grammarToKernel:
            description: 'JSON mappings between specific kernel and a
                          language/grammar. This value is updated automatically
                          by the "switch kernel" command. If you switch from
                          python2 to python3, python3 will be used the next time
                          you open a Python file. You probabbly shouldn\'t
                          change this by hand.'
            type: 'string'
            default: '{}'


    subscriptions: null
    statusBarElement: null
    statusBarTile: null
    editor: null
    markerBubbleMap: {}

    activate: (state) ->
        @subscriptions = new CompositeDisposable

        @subscriptions.add atom.commands.add 'atom-text-editor',
            'hydrogen:run': => @run()
            'hydrogen:show-kernel-commands': => @showKernelCommands()
            'hydrogen:toggle-watches': => @toggleWatchSidebar()
            'hydrogen:select-watch-kernel': => @showWatchLanguagePicker()
            'hydrogen:add-watch': => @watchSidebar.addWatchFromEditor()
            'hydrogen:remove-watch': => @watchSidebar.removeWatch()

        @subscriptions.add atom.commands.add 'atom-workspace',
            'hydrogen:clear-results': => @clearResultBubbles()

        @subscriptions.add(atom.workspace.observeActivePaneItem(
            @updateCurrentEditor.bind(this)))

        @editor = atom.workspace.getActiveTextEditor()<commit_msg>fix typo<commit_after>{CompositeDisposable} = require 'atom'

fs = require 'fs'
zmq = require 'zmq'
_ = require 'lodash'

KernelManager = require './kernel-manager'
ConfigManager = require './config-manager'
ResultView = require './result-view'
SignalListView = require './signal-list-view'
WatchSidebar = require './watch-sidebar'
WatchLanguagePicker = require './watch-language-picker'
AutocompleteProvider = require './autocomplete-provider'

module.exports = Hydrogen =
    config:
        languageMappings:
            title: "Language Mappings"
            description: 'Some packages may change the name of the grammar for
                          a language (e.g. "Python" -> "Python Django"). That
                          leaves Hydrogen unable to figure out what kernel to
                          use for your code.

                          This field should be valid JSON mapping a nonstandard
                          language name to a standard one, e.g.

                          {"Python Django": "python", "Ruby (Rails)": "ruby"}'
            type: 'string'
            default: '{}'
        grammarToKernel:
            description: 'JSON mappings between specific kernel and a
                          language/grammar. This value is updated automatically
                          by the "switch kernel" command. If you switch from
                          python2 to python3, python3 will be used the next time
                          you open a Python file. You probably shouldn\'t
                          change this by hand.'
            type: 'string'
            default: '{}'


    subscriptions: null
    statusBarElement: null
    statusBarTile: null
    editor: null
    markerBubbleMap: {}

    activate: (state) ->
        @subscriptions = new CompositeDisposable

        @subscriptions.add atom.commands.add 'atom-text-editor',
            'hydrogen:run': => @run()
            'hydrogen:show-kernel-commands': => @showKernelCommands()
            'hydrogen:toggle-watches': => @toggleWatchSidebar()
            'hydrogen:select-watch-kernel': => @showWatchLanguagePicker()
            'hydrogen:add-watch': => @watchSidebar.addWatchFromEditor()
            'hydrogen:remove-watch': => @watchSidebar.removeWatch()

        @subscriptions.add atom.commands.add 'atom-workspace',
            'hydrogen:clear-results': => @clearResultBubbles()

        @subscriptions.add(atom.workspace.observeActivePaneItem(
            @updateCurrentEditor.bind(this)))

        @editor = atom.workspace.getActiveTextEditor()
{'fraction_non_alphanumeric': 0.09925752246971473, 'fraction_numerical': 0.0011723329425556857, 'mean_word_length': 2.065269461077844, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3254905', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1246, 'n_words': 364}