<commit_before>package main

import (
	"fmt"
	"github.com/ipfs-search/ipfs-search/crawler"
	"github.com/ipfs-search/ipfs-search/indexer"
	"github.com/ipfs-search/ipfs-search/queue"
	"github.com/ipfs/go-ipfs-api"
	"golang.org/x/net/context"
	"gopkg.in/olivere/elastic.v5"
	"gopkg.in/urfave/cli.v1"
	"log"
	"os"
	"time"
)

const (
	IPFS_API     = "localhost:5001"
	HASH_WORKERS = 140
	FILE_WORKERS = 120
	IPFS_TIMEOUT = 120 * time.Duration(time.Second)
	HASH_WAIT    = time.Duration(100 * time.Millisecond)
	FILE_WAIT    = HASH_WAIT
)

func main() {
	// Prefix logging with filename and line number: "d.go:23"
	// log.SetFlags(log.Lshortfile)

	// Logging w/o prefix
	log.SetFlags(0)

	app := cli.NewApp()
	app.Name = "ipfs-search"
	app.Usage = "IPFS search engine."

	app.Commands = []cli.Command{
		{
			Name:    "add",
			Aliases: []string{"a"},
			Usage:   "add `HASH` to crawler queue",
			Action:  add,
		},
		{
			Name:    "crawl",
			Aliases: []string{"c"},
			Usage:   "start crawler",
			Action:  crawl,
		},<commit_msg>Increase timeout for listings.<commit_after>package main

import (
	"fmt"
	"github.com/ipfs-search/ipfs-search/crawler"
	"github.com/ipfs-search/ipfs-search/indexer"
	"github.com/ipfs-search/ipfs-search/queue"
	"github.com/ipfs/go-ipfs-api"
	"golang.org/x/net/context"
	"gopkg.in/olivere/elastic.v5"
	"gopkg.in/urfave/cli.v1"
	"log"
	"os"
	"time"
)

const (
	IPFS_API     = "localhost:5001"
	HASH_WORKERS = 140
	FILE_WORKERS = 120
	IPFS_TIMEOUT = 360 * time.Duration(time.Second)
	HASH_WAIT    = time.Duration(100 * time.Millisecond)
	FILE_WAIT    = HASH_WAIT
)

func main() {
	// Prefix logging with filename and line number: "d.go:23"
	// log.SetFlags(log.Lshortfile)

	// Logging w/o prefix
	log.SetFlags(0)

	app := cli.NewApp()
	app.Name = "ipfs-search"
	app.Usage = "IPFS search engine."

	app.Commands = []cli.Command{
		{
			Name:    "add",
			Aliases: []string{"a"},
			Usage:   "add `HASH` to crawler queue",
			Action:  add,
		},
		{
			Name:    "crawl",
			Aliases: []string{"c"},
			Usage:   "start crawler",
			Action:  crawl,
		},
{'fraction_non_alphanumeric': 0.16449589966232514, 'fraction_numerical': 0.020260492040520984, 'mean_word_length': 3.2762886597938143, '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': '1123964', 'n_tokens_mistral': 965, 'n_tokens_neox': 884, 'n_words': 153}