<commit_before>package cmd

import (
	"archive/tar"
	"compress/gzip"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"os"
	"path/filepath"
	"runtime"
	"strings"

	"github.com/koding/kite/kitekey"
)

type Install struct{}

func NewInstall() *Install {
	return &Install{}
}

func (*Install) Definition() string {
	return "Install a kite from repository. Example: github.com/cenkalti/math.kite"
}

const S3URL = "http://koding-kites.s3.amazonaws.com/"

func (*Install) Exec(args []string) error {
	if len(args) != 1 {
		return errors.New("You should give a URL. Example: github.com/cenkalti/math.kite")
	}

	repoName := args[0]

	// Download manifest
	fmt.Println("Downloading manifest file...")
	manifest, err := getManifest(repoName)
	if err != nil {
		return err
	}

	version, err := getVersion(manifest)
	if err != nil {
		return err
	}

	fmt.Printf("Found version: %s\n", version)

	binaryURL, err := getBinaryURL(manifest)
	if err != nil {
		return err<commit_msg>s3 is not used anymore<commit_after>package cmd

import (
	"archive/tar"
	"compress/gzip"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"os"
	"path/filepath"
	"runtime"
	"strings"

	"github.com/koding/kite/kitekey"
)

type Install struct{}

func NewInstall() *Install {
	return &Install{}
}

func (*Install) Definition() string {
	return "Install a kite from repository. Example: github.com/cenkalti/math.kite"
}

func (*Install) Exec(args []string) error {
	if len(args) != 1 {
		return errors.New("You should give a URL. Example: github.com/cenkalti/math.kite")
	}

	repoName := args[0]

	// Download manifest
	fmt.Println("Downloading manifest file...")
	manifest, err := getManifest(repoName)
	if err != nil {
		return err
	}

	version, err := getVersion(manifest)
	if err != nil {
		return err
	}

	fmt.Printf("Found version: %s\n", version)

	binaryURL, err := getBinaryURL(manifest)
	if err != nil {
		return err
{'fraction_non_alphanumeric': 0.15124740124740124, 'fraction_numerical': 0.0036382536382536385, 'mean_word_length': 3.948586118251928, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1146467', 'n_tokens_mistral': 753, 'n_tokens_neox': 723, 'n_words': 180}