<commit_before>package main

import (
	"bytes"
	"crypto/sha1"
	"encoding/base64"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"strings"

	"github.com/garyburd/redigo/redis"
	"launchpad.net/goamz/aws"
	"launchpad.net/goamz/s3"
)

var docomputersdream *s3.Bucket

func dial() (redis.Conn, error) {
	return redis.Dial("tcp", "127.0.0.1:6379")
}

func classify(out io.Writer, data []byte) {
	// do the classification first
	resp, err := http.Post("http://localhost:3350/convnet/classify?model=image-net", "image/unknown", bytes.NewReader(data))
	if err != nil {
		return
	}
	defer resp.Body.Close()
	io.Copy(out, resp.Body)
}

func face(out io.Writer, data []byte) {
	resp, err := http.Post("http://localhost:3350/bbf/detect.objects?model=face&max_dimension=800", "image/unknown", bytes.NewReader(data))
	if err != nil {
		return
	}
	defer resp.Body.Close()
	io.Copy(out, resp.Body)
}

func car(out io.Writer, data []byte) {
	resp, err := http.Post("http://localhost:3350/dpm/detect.objects?model=car&max_dimension=800", "image/unknown", bytes.NewReader(data))
	if err != nil {
		return
	}
	defer resp.Body.Close()
	io.Copy(out, resp.Body)
}

func pedestrian(out io.Writer, data []byte) {
	resp, err := http.Post("http://localhost:3350/icf/detect.objects?model=pedestrian&max_dimension=800", "image/unknown", bytes.NewReader(data))<commit_msg>upgrade to support new ccv pretrained model<commit_after>package main

import (
	"bytes"
	"crypto/sha1"
	"encoding/base64"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"strings"

	"github.com/garyburd/redigo/redis"
	"launchpad.net/goamz/aws"
	"launchpad.net/goamz/s3"
)

var docomputersdream *s3.Bucket

func dial() (redis.Conn, error) {
	return redis.Dial("tcp", "127.0.0.1:6379")
}

func classify(out io.Writer, data []byte) {
	// do the classification first
	resp, err := http.Post("http://localhost:3350/convnet/classify?model=image-net-2010", "image/unknown", bytes.NewReader(data))
	if err != nil {
		return
	}
	defer resp.Body.Close()
	io.Copy(out, resp.Body)
}

func face(out io.Writer, data []byte) {
	resp, err := http.Post("http://localhost:3350/bbf/detect.objects?model=face&max_dimension=800", "image/unknown", bytes.NewReader(data))
	if err != nil {
		return
	}
	defer resp.Body.Close()
	io.Copy(out, resp.Body)
}

func car(out io.Writer, data []byte) {
	resp, err := http.Post("http://localhost:3350/dpm/detect.objects?model=car&max_dimension=800", "image/unknown", bytes.NewReader(data))
	if err != nil {
		return
	}
	defer resp.Body.Close()
	io.Copy(out, resp.Body)
}

func pedestrian(out io.Writer, data []byte) {
	resp, err := http.Post("http://localhost:3350/icf/detect.objects?model=pedestrian&max_dimension=800", "image/unknown", bytes.NewReader(data))
{'fraction_non_alphanumeric': 0.17882265827471308, 'fraction_numerical': 0.03109959274342836, 'mean_word_length': 4.798283261802575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2053569', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1050, 'n_words': 189}