<commit_before>package gmail

import (
	"bytes"
	"encoding/base64"
	"errors"
	"io"
	"log"
	"net/mail"
	"os"
	"path"
	"sort"
	"sync"
	"time"

	"github.com/danmarg/outtake/lib"
	"github.com/danmarg/outtake/lib/maildir"
	"github.com/danmarg/outtake/lib/oauth"
	gmail "github.com/google/google-api-go-client/gmail/v1"
	"golang.org/x/net/context"
	"golang.org/x/oauth2"
)

const (
	// What X- header to use for storing labels.
	labelsHeader = "X-Keywords"
	// Cache filename.
	cacheFile = ".outtake"
	// Parallelism.
	messageBufferSize   = 128
	concurrentDownloads = 8
	maxQps              = 250
)

var (
	// Errors.
	unknownMessage   = errors.New("unknown message")
	alreadyExists    = errors.New("already exists")
	fullSyncRequired = errors.New("full sync required")
)

// Gmail represents a Gmail client Maildir.
type Gmail struct {<commit_msg>Lower max QPS to 240.<commit_after>package gmail

import (
	"bytes"
	"encoding/base64"
	"errors"
	"io"
	"log"
	"net/mail"
	"os"
	"path"
	"sort"
	"sync"
	"time"

	"github.com/danmarg/outtake/lib"
	"github.com/danmarg/outtake/lib/maildir"
	"github.com/danmarg/outtake/lib/oauth"
	gmail "github.com/google/google-api-go-client/gmail/v1"
	"golang.org/x/net/context"
	"golang.org/x/oauth2"
)

const (
	// What X- header to use for storing labels.
	labelsHeader = "X-Keywords"
	// Cache filename.
	cacheFile = ".outtake"
	// Parallelism.
	messageBufferSize   = 128
	concurrentDownloads = 8
	maxQps              = 240
)

var (
	// Errors.
	unknownMessage   = errors.New("unknown message")
	alreadyExists    = errors.New("already exists")
	fullSyncRequired = errors.New("full sync required")
)

// Gmail represents a Gmail client Maildir.
type Gmail struct {
{'fraction_non_alphanumeric': 0.14243498817966904, 'fraction_numerical': 0.014775413711583925, 'mean_word_length': 3.4088541666666665, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1731888', 'n_tokens_mistral': 693, 'n_tokens_neox': 657, 'n_words': 132}