<commit_before>import React from 'react';
import Router from 'react-router';
import {Provider} from 'react-redux';
import Store from './js/store'
import Login from './js/login';
import Dashboard from './js/dashboard';
import Problems from './js/problems';
import Problem from './js/problem';
import Ranking from './js/ranking';
import Announcements from './js/announcements';
import Main from './js/main';
import {Top} from './js/top';
var remote = require('remote');
var clipboard = remote.require('clipboard');
var DefaultRoute = Router.DefaultRoute;
var Link = Router.Link;
var Route = Router.Route;

var routes = (
		<Route path="/" handler={Top}>
			<Route path="/login" handler={Login} />
			<Route name="main" handler={Main}>
				<Route name="dashboard" handler={Dashboard}/>
				<Route name="problems" path="/problems" handler={Problems}>
				</Route>
					<Route name="problem" path="/problems/:id" handler={Problem}/>
				<Route name="ranking" handler={Ranking}/>
				<Route name="announcements" handler={Announcements}/>
				<DefaultRoute handler={Dashboard}/>
			</Route>
			<DefaultRoute handler={Login}/>
		</Route>
		);

// Patch for Electron on OS X Copy/Paste bug
function CopyPasteFunc(e){
	if (e.ctrlKey != e.metaKey && !e.altKey && !e.shiftKey) {
		if (e.keyCode === 67) {
			var selectedText = window.getSelection().toString();
			if (selectedText) {
				clipboard.writeText(selectedText);
			}
		} else if (e.keyCode === 86){
			var activeElement = document.activeElement;
			var clipboardText = clipboard.readText();
			if (clipboardText && activeElement && activeElement.type == "text") {
				var currentText = activeElement.value;
				var cursorPosition = activeElement.selectionStart;<commit_msg>Delete linux/win support of clipboard patch<commit_after>import React from 'react';
import Router from 'react-router';
import {Provider} from 'react-redux';
import Store from './js/store'
import Login from './js/login';
import Dashboard from './js/dashboard';
import Problems from './js/problems';
import Problem from './js/problem';
import Ranking from './js/ranking';
import Announcements from './js/announcements';
import Main from './js/main';
import {Top} from './js/top';
var remote = require('remote');
var clipboard = remote.require('clipboard');
var DefaultRoute = Router.DefaultRoute;
var Link = Router.Link;
var Route = Router.Route;

var routes = (
		<Route path="/" handler={Top}>
			<Route path="/login" handler={Login} />
			<Route name="main" handler={Main}>
				<Route name="dashboard" handler={Dashboard}/>
				<Route name="problems" path="/problems" handler={Problems}>
				</Route>
					<Route name="problem" path="/problems/:id" handler={Problem}/>
				<Route name="ranking" handler={Ranking}/>
				<Route name="announcements" handler={Announcements}/>
				<DefaultRoute handler={Dashboard}/>
			</Route>
			<DefaultRoute handler={Login}/>
		</Route>
		);

// Patch for Electron on OS X Copy/Paste bug
function CopyPasteFunc(e){
	// Command key presses
	if (!e.ctrlKey && e.metaKey && !e.altKey && !e.shiftKey) {
		if (e.keyCode === 67) {
		// and key 'C' pressed
			var selectedText = window.getSelection().toString();
			if (selectedText) {
				clipboard.writeText(selectedText);
			}
		} else if (e.keyCode === 86){
		// and key 'V' pressed
			var activeElement = document.activeElement;
			var clipboardText = clipboard.readText();
			if (clipboardText && activeElement && activeElement.type == "text") {
				var currentText = activeElement.value;
				var cursorPosition = activeElement.selectionStart;
{'fraction_non_alphanumeric': 0.15948154409692872, 'fraction_numerical': 0.0022541561003099463, 'mean_word_length': 4.282738095238095, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '7505985', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1075, 'n_words': 301}