<commit_before>package main

import (
	"encoding/json"
	"fmt"
	"os"
)

var cmdLogin = &Command{
	Exec:        runLogin,
	UsageLine:   "login [options] ORGANIZATION TOKEN",
	Description: "Login generates a configuration file containing credentials",
	Help: `Login generates a configuration file in '/home/$USER/.scwrc'
containing credentials used to interact with the Scaleway API. This
configuration file is automatically used by the 'scw' command.`,
}

func runLogin(cmd *Command, args []string) {
	if len(args) != 2 {
		fmt.Fprintf(os.Stderr, "usage: scw %s\n", cmd.UsageLine)
		os.Exit(1)
	}
	cfg := &Config{
		APIEndPoint:  "https://api.cloud.online.net/",
		Organization: args[0],
		Token:        args[1],
	}
	scwrc_path, err := GetConfigFilePath()
	if err != nil {
		fmt.Fprintf(os.Stderr, "can't get scwrc config file path: %v\n", err)
		os.Exit(1)
	}
	scwrc, err := os.OpenFile(scwrc_path, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0644)
	if err != nil {
		fmt.Fprintf(os.Stderr, "can't create scwrc config file: %v\n", err)
		os.Exit(1)<commit_msg>Moved API endpoint to https://api.scaleway.com/<commit_after>package main

import (
	"encoding/json"
	"fmt"
	"os"
)

var cmdLogin = &Command{
	Exec:        runLogin,
	UsageLine:   "login [options] ORGANIZATION TOKEN",
	Description: "Login generates a configuration file containing credentials",
	Help: `Login generates a configuration file in '/home/$USER/.scwrc'
containing credentials used to interact with the Scaleway API. This
configuration file is automatically used by the 'scw' command.`,
}

func runLogin(cmd *Command, args []string) {
	if len(args) != 2 {
		fmt.Fprintf(os.Stderr, "usage: scw %s\n", cmd.UsageLine)
		os.Exit(1)
	}
	cfg := &Config{
		APIEndPoint:  "https://api.scaleway.com/",
		Organization: args[0],
		Token:        args[1],
	}
	scwrc_path, err := GetConfigFilePath()
	if err != nil {
		fmt.Fprintf(os.Stderr, "can't get scwrc config file path: %v\n", err)
		os.Exit(1)
	}
	scwrc, err := os.OpenFile(scwrc_path, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0644)
	if err != nil {
		fmt.Fprintf(os.Stderr, "can't create scwrc config file: %v\n", err)
		os.Exit(1)
{'fraction_non_alphanumeric': 0.14332706766917294, 'fraction_numerical': 0.009398496240601503, 'mean_word_length': 4.0570071258907365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '4363639', 'n_tokens_mistral': 831, 'n_tokens_neox': 793, 'n_words': 215}