<commit_before>var AppDispatcher = require('../dispatcher/AppDispatcher');
var FluxChatConstants = require('../constants/FluxChatConstants');
var EventEmitter = require('events').EventEmitter;
var merge = require('react/lib/merge');

var CHANGE_EVENT= 'change';

// 'private' functions

var initialize = function () {
  // Global for now
  PushStream.LOG_LEVEL = 'debug';
  var pushstream = window.pushstream = new PushStream({
    host: window.location.hostname,
    port: 8080, //window.location.port,
    modes: "websocket|eventsource|stream"
  });

  pushstream.onmessage = manageEvent;
  pushstream.onstatuschange = statusChange;

};

var manageEvent = function (event) {
  console.log("me", event);
};

var statusChange = function (status) {
  console.log("sc", status);
};

var connect = function (channel) {
  pushstream.removeAllChannels();

  try {
    pushstream.addChannel(channel);
    pushstream.connect(channel);
  } catch (e) {
    alert(e);
  }

  console.log("connecting...");
};

var sendMessage = function (message) {
  console.log("sending message", message);
};

var FluxChatStore = merge(EventEmitter.prototype, {

  // 'public' functions
  emitChange: function () {
    this.emit(CHANGE_EVENT);
  }

});

AppDispatcher.register(function (payload) {
  var action = payload.action;

  switch (action.actionType) {<commit_msg>messages come out the other side<commit_after>var AppDispatcher = require('../dispatcher/AppDispatcher'),
    FluxChatConstants = require('../constants/FluxChatConstants'),
    EventEmitter = require('events').EventEmitter,
    merge = require('react/lib/merge');

var CHANGE_EVENT= 'change',
    pushstream;


// 'private' functions

var initialize = function () {

  //Global for now TODO convert to commonJS
  PushStream.LOG_LEVEL = 'debug';

  pushstream = window.pushstream = new PushStream({
    host: window.location.hostname,
    port: 8080, //window.location.port,
    modes: "websocket|eventsource|stream"
  });

  pushstream.onmessage = manageEvent;
  pushstream.onstatuschange = statusChange;

};

var manageEvent = function (event) {
  console.log("me", event);
};

var statusChange = function (status) {
  console.log("sc", status);
};

var connect = function (channel) {
  pushstream.removeAllChannels();

  try {
    pushstream.addChannel(channel);
    pushstream.connect(channel);
  } catch (e) {
    alert(e);
  }

  console.log("connecting...");
};

var sendMessage = function (message) {
  pushstream.sendMessage(message);
};

var FluxChatStore = merge(EventEmitter.prototype, {

  // 'public' functions
  emitChange: function () {
    this.emit(CHANGE_EVENT);
  }

});

AppDispatcher.register(function (payload) {
  var action = payload.action;

  switch (action.actionType) {
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.0029154518950437317, 'mean_word_length': 4.208728652751423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1764808', 'n_tokens_mistral': 862, 'n_tokens_neox': 840, 'n_words': 178}