<commit_before>import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { isNull } from 'lodash/util'
import toArray from 'lodash/toArray'
import map from 'lodash/map'
import filter from 'lodash/filter'
import extend from 'lodash/extend'
import sortBy from 'lodash/sortBy'
import reverse from 'lodash/reverse'
import take from 'lodash/take'
import DocumentTitle from 'react-document-title'
import { loadLatestPublicModels } from '../actions/model'
import NavHeader from './NavHeader'
import ModelList from '../components/ModelList'
import Footer from '../components/Footer'
import Radium from 'radium'
import styles from '../styles'

class IndexPage extends Component {
  componentWillMount() {
    if (!this.props.latestModelsFetchedOnce) {
      this.props.loadLatestPublicModels()
    }
  }

  render() {
    const { authUser,
            latestModels,
            latestModelsFetching,
            latestModelsFetchError } = this.props

    return (
      <DocumentTitle title="Gradientzoo: pre-trained neural network models">
      <div className="container" style={styles.page}>
        <NavHeader activeTab="home" />

        <div className="jumbotron">
          <h1>Version and share your trained neural network models</h1>
          <p className="lead">Built-in support for Keras, Tensorflow, Lasagne, and Theano. Or integrate directly with our HTTP API.</p>
          <p>
          {authUser ? 
            <Link className="btn btn-lg btn-success"
                  to="/start-model"
                  htmlRole="button">
              Start a model
            </Link> :
            <Link className="btn btn-lg btn-success"
                  to="/register"
                  htmlRole="button">
              Sign up today
            </Link>}
          {' '}
          {authUser ?
            <Link className="btn btn-lg btn-default"
                  to={'/' + authUser.username}
                  htmlRole="button">
              Go to your profile &raquo;
            </Link> : null}
          </p>
        </div>

        <div className="row">
          <div className="col-lg-12">
            <h4>Most Downloaded Public Datasets</h4>
            <ModelList models={latestModels}
                       fetching={latestModelsFetching}
                       error={latestModelsFetchError} />
          </div>
        </div>

        <div className="row">
          <div className="col-lg-12">
            <h4>Latest Public Datasets</h4>
            <ModelList models={latestModels}
                       fetching={latestModelsFetching}
                       error={latestModelsFetchError} />
          </div>
        </div>

        <div className="row">
          <div className="col-lg-12">
            <h4>Subheading</h4>
            <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>

            <h4>Subheading</h4>
            <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>

            <h4>Subheading</h4>
            <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
          </div>
        </div>

        <Footer />
      </div>
      </DocumentTitle>
    )
  }
}

IndexPage.propTypes = {<commit_msg>Pedantic wording change<commit_after>import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { isNull } from 'lodash/util'
import toArray from 'lodash/toArray'
import map from 'lodash/map'
import filter from 'lodash/filter'
import extend from 'lodash/extend'
import sortBy from 'lodash/sortBy'
import reverse from 'lodash/reverse'
import take from 'lodash/take'
import DocumentTitle from 'react-document-title'
import { loadLatestPublicModels } from '../actions/model'
import NavHeader from './NavHeader'
import ModelList from '../components/ModelList'
import Footer from '../components/Footer'
import Radium from 'radium'
import styles from '../styles'

class IndexPage extends Component {
  componentWillMount() {
    if (!this.props.latestModelsFetchedOnce) {
      this.props.loadLatestPublicModels()
    }
  }

  render() {
    const { authUser,
            latestModels,
            latestModelsFetching,
            latestModelsFetchError } = this.props

    return (
      <DocumentTitle title="Gradientzoo: pre-trained neural network models">
      <div className="container" style={styles.page}>
        <NavHeader activeTab="home" />

        <div className="jumbotron">
          <h1>Version and share your trained neural network models</h1>
          <p className="lead">Built-in support for Keras, Tensorflow, Lasagne, and Theano. Or integrate directly with our HTTP API.</p>
          <p>
          {authUser ? 
            <Link className="btn btn-lg btn-success"
                  to="/start-model"
                  htmlRole="button">
              Start a model
            </Link> :
            <Link className="btn btn-lg btn-success"
                  to="/register"
                  htmlRole="button">
              Sign up today
            </Link>}
          {' '}
          {authUser ?
            <Link className="btn btn-lg btn-default"
                  to={'/' + authUser.username}
                  htmlRole="button">
              Go to your profile &raquo;
            </Link> : null}
          </p>
        </div>

        <div className="row">
          <div className="col-lg-12">
            <h4>Most Downloaded Public Models</h4>
            <ModelList models={latestModels}
                       fetching={latestModelsFetching}
                       error={latestModelsFetchError} />
          </div>
        </div>

        <div className="row">
          <div className="col-lg-12">
            <h4>Latest Public Models</h4>
            <ModelList models={latestModels}
                       fetching={latestModelsFetching}
                       error={latestModelsFetchError} />
          </div>
        </div>

        <div className="row">
          <div className="col-lg-12">
            <h4>Subheading</h4>
            <p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>

            <h4>Subheading</h4>
            <p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>

            <h4>Subheading</h4>
            <p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
          </div>
        </div>

        <Footer />
      </div>
      </DocumentTitle>
    )
  }
}

IndexPage.propTypes = {
{'fraction_non_alphanumeric': 0.11104459742592038, 'fraction_numerical': 0.005387608500448967, 'mean_word_length': 1.974187805963507, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3375651', 'n_tokens_mistral': 1922, 'n_tokens_neox': 1853, 'n_words': 498}