<commit_before>package main

import (
	"archive/tar"
	"bufio"
	"compress/gzip"
	"crypto/sha256"
	"encoding/hex"
	"encoding/json"
	"errors"
	"fmt"
	"github.com/docker/docker/image"
	flag "github.com/docker/docker/pkg/mflag"
	"io"
	"io/ioutil"
	"os"
	"path"
	"strings"
)

var (
	verbose, help bool
	target        string
)

type BlobSum struct {
	Sum string `json:"blobSum"`
}

type Compat struct {
	Data string `json:"v1Compatibility"`
}

type Layer struct {
	Id, Parent string
	BlobSum    string
	Data       string
}

type LayerMap map[string]*Layer

type Manifest struct {
	Version      int       `json:"schemaVersion"`
	Name         string    `json:"name"`
	Tag          string    `json:"tag"`
	Architecture string    `json:"architecture"`
	Layers       []BlobSum `json:"fsLayers"`
	History      []Compat  `json:"history"`
}

func init() {
	flag.Bool([]string{"-h", "--help"}, false, "Display help")
	flag.BoolVar(&verbose, []string{"-v", "--verbose"}, false, "Switch to verbose output")
	flag.Parse()
}

func blobSumLayer(r *tar.Reader) (string, error) {
	sha := sha256.New()
	gw := gzip.NewWriter(sha)
	if n, err := io.Copy(gw, r); err != nil {
		return "", err
	}<commit_msg>unused variable fix<commit_after>package main

import (
	"archive/tar"
	"bufio"
	"compress/gzip"
	"crypto/sha256"
	"encoding/hex"
	"encoding/json"
	"errors"
	"fmt"
	"github.com/docker/docker/image"
	flag "github.com/docker/docker/pkg/mflag"
	"io"
	"io/ioutil"
	"os"
	"path"
	"strings"
)

var (
	verbose, help bool
	target        string
)

type BlobSum struct {
	Sum string `json:"blobSum"`
}

type Compat struct {
	Data string `json:"v1Compatibility"`
}

type Layer struct {
	Id, Parent string
	BlobSum    string
	Data       string
}

type LayerMap map[string]*Layer

type Manifest struct {
	Version      int       `json:"schemaVersion"`
	Name         string    `json:"name"`
	Tag          string    `json:"tag"`
	Architecture string    `json:"architecture"`
	Layers       []BlobSum `json:"fsLayers"`
	History      []Compat  `json:"history"`
}

func init() {
	flag.Bool([]string{"-h", "--help"}, false, "Display help")
	flag.BoolVar(&verbose, []string{"-v", "--verbose"}, false, "Switch to verbose output")
	flag.Parse()
}

func blobSumLayer(r *tar.Reader) (string, error) {
	sha := sha256.New()
	gw := gzip.NewWriter(sha)
	if _, err := io.Copy(gw, r); err != nil {
		return "", err
	}
{'fraction_non_alphanumeric': 0.1598984771573604, 'fraction_numerical': 0.005922165820642978, 'mean_word_length': 3.4371482176360226, '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': '1227212', 'n_tokens_mistral': 898, 'n_tokens_neox': 865, 'n_words': 211}