<commit_before>package main

import (
	"fmt"
	"os"
	"path/filepath"

	"github.com/masci/flickr.go/flickr"
)

func main() {
	// retrieve Flickr credentials from env vars
	apik := os.Getenv("FLICKRGO_API_KEY")
	apisec := os.Getenv("FLICKRGO_API_SECRET")
	token := os.Getenv("FLICKRGO_OAUTH_TOKEN")
	tokenSecret := os.Getenv("FLICKRGO_OAUTH_TOKEN_SECRET")

	// do not proceed if credentials were not provided
	if apik == "" || apisec == "" || token == "" || tokenSecret == "" {
		fmt.Fprintln(os.Stderr, "Please set FLICKRGO_API_KEY, FLICKRGO_API_SECRET "+
			"and FLICKRGO_OAUTH_TOKEN env vars")
		os.Exit(1)
	}

	// create an API client with credentials
	client := flickr.NewFlickrClient(apik, apisec)
	client.OAuthToken = token
	client.OAuthTokenSecret = tokenSecret

	path, _ := filepath.Abs("examples/upload/gopher.jpg")
	id, err := flickr.UploadPhoto(client, path, nil)

	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println("Photo uploaded, id:", id)
	}

	params := flickr.NewUploadParams()
	params.Title = "A Gopher"
	id, err = flickr.UploadPhoto(client, path, params)

	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println("Photo uploaded, id:", id)
	}
}<commit_msg>upload with some params<commit_after>package main

import (
	"fmt"
	"os"
	"path/filepath"

	"github.com/masci/flickr.go/flickr"
)

func main() {
	// retrieve Flickr credentials from env vars
	apik := os.Getenv("FLICKRGO_API_KEY")
	apisec := os.Getenv("FLICKRGO_API_SECRET")
	token := os.Getenv("FLICKRGO_OAUTH_TOKEN")
	tokenSecret := os.Getenv("FLICKRGO_OAUTH_TOKEN_SECRET")

	// do not proceed if credentials were not provided
	if apik == "" || apisec == "" || token == "" || tokenSecret == "" {
		fmt.Fprintln(os.Stderr, "Please set FLICKRGO_API_KEY, FLICKRGO_API_SECRET "+
			"and FLICKRGO_OAUTH_TOKEN env vars")
		os.Exit(1)
	}

	// create an API client with credentials
	client := flickr.NewFlickrClient(apik, apisec)
	client.OAuthToken = token
	client.OAuthTokenSecret = tokenSecret

	path, _ := filepath.Abs("examples/upload/gopher.jpg")

	params := flickr.NewUploadParams()
	params.Title = "A Gopher"

	id, err := flickr.UploadPhoto(client, path, params)

	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println("Photo uploaded, id:", id)
	}
}
{'fraction_non_alphanumeric': 0.14470745868691381, 'fraction_numerical': 0.0008932559178204555, 'mean_word_length': 4.371702637889689, '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': '3183553', 'n_tokens_mistral': 891, 'n_tokens_neox': 858, 'n_words': 177}