<commit_before>// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
	"log"

	"github.com/spf13/cobra"
)

// gulpCmd represents the gulp command
var gulpCmd = &cobra.Command{
	Use:   "gulp",
	Short: "Feed data to Infux DB",
	Run: func(cmd *cobra.Command, args []string) {
		c, err := Conf(true)
		if err != nil {
			log.Fatal(err)
		}

		points := Ruminate(c, false)

		l.Infow("Going to create InfluxDB client")
		i, err := NewInflux(c.Gulp.Host, c.Gulp.Proto, c.Gulp.Db, c.Gulp.User, c.Gulp.Pass, c.Gulp.Series, c.Gulp.Indicator, c.Gulp.Port)
		if err != nil {
			l.Fatal("Could net create InfluxDB client", "error", err.Error())
		}

		l.Infof("Saving %d data points to InfluxDB", len(points))
		err = i.Write(points)
		if err != nil {
			l.Fatalw("Could not write data to InfluxDB", "error", err.Error())
		}
		l.Infow("Data points saved")

	},
}

func init() {
	RootCmd.AddCommand(gulpCmd)
}<commit_msg>fixed typos<commit_after>// Copyright © 2017 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package cmd

import (
	"log"

	"github.com/spf13/cobra"
)

// gulpCmd represents the gulp command
var gulpCmd = &cobra.Command{
	Use:   "gulp",
	Short: "Feed data to Infux DB",
	Run: func(cmd *cobra.Command, args []string) {
		c, err := Conf(true)
		if err != nil {
			log.Fatal(err)
		}

		points := Ruminate(c, false)

		l.Infow("Going to create InfluxDB client")
		i, err := NewInflux(c.Gulp.Host, c.Gulp.Proto, c.Gulp.Db, c.Gulp.User, c.Gulp.Pass, c.Gulp.Series, c.Gulp.Indicator, c.Gulp.Port)
		if err != nil {
			l.Fatalw("Could not create InfluxDB client", "error", err.Error())
		}

		l.Infof("Saving %d data points to InfluxDB", len(points))
		err = i.Write(points)
		if err != nil {
			l.Fatalw("Could not write data to InfluxDB", "error", err.Error())
		}
		l.Infow("Data points saved")

	},
}

func init() {
	RootCmd.AddCommand(gulpCmd)
}
{'fraction_non_alphanumeric': 0.1337386018237082, 'fraction_numerical': 0.006754474839581222, 'mean_word_length': 3.4208955223880597, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6293956', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1000, 'n_words': 347}