<commit_before>// cmd_probes.go

package main

import (
	"fmt"
	"github.com/codegangsta/cli"
	"github.com/keltia/ripe-atlas"
	"os"
	"strconv"
	"log"
)

// probeList displays all probes
func probesList(c *cli.Context) error {
	q, err := atlas.GetProbes()
	if err != nil {
		fmt.Printf("err: %v", err)
		os.Exit(1)
	}
	fmt.Printf("q: %#v\n", q)

	return nil
}

// probeInfo is information about one probe
func probeInfo(c *cli.Context) error {
	args := c.Args()
	id, _ := strconv.ParseInt(args[0], 10, 32)

	p, err := atlas.GetProbe(int(id))
	if err != nil {
		fmt.Printf("err: %v", err)
		os.Exit(1)
	}
	fmt.Printf("p: %#v\n", p)

	return nil
}

// shortcuts

// cmdIP is a short for displaying the IPs for one probe
func cmdIP(c *cli.Context) error {
	log.Printf("flags ipv4(%v) & ipv6(%v)", want4, want6)

	// By default we want both
	if !want4 && !want6 {
		want6, want4 = true, true
	}
	args := c.Args()
	id, _ := strconv.ParseInt(args[0], 10, 32)

	p, err := atlas.GetProbe(int(id))
	if err != nil {
		fmt.Printf("err: %v", err)
		os.Exit(1)
	}

	var str string = ""

	if want4 {
		str = fmt.Sprintf("%sIPv4: %s ", str, p.AddressV4)
	}

	if want6 {
		str = fmt.Sprintf("%sIPv6: %s ", str, p.AddressV6)
	}

	fmt.Println(str)
	return nil
}
<commit_msg>Remove debug for flags.<commit_after>// cmd_probes.go

package main

import (
	"fmt"
	"github.com/codegangsta/cli"
	"github.com/keltia/ripe-atlas"
	"os"
	"strconv"
	"log"
)

// probeList displays all probes
func probesList(c *cli.Context) error {
	q, err := atlas.GetProbes()
	if err != nil {
		fmt.Printf("err: %v", err)
		os.Exit(1)
	}
	fmt.Printf("q: %#v\n", q)

	return nil
}

// probeInfo is information about one probe
func probeInfo(c *cli.Context) error {
	args := c.Args()
	id, _ := strconv.ParseInt(args[0], 10, 32)

	p, err := atlas.GetProbe(int(id))
	if err != nil {
		fmt.Printf("err: %v", err)
		os.Exit(1)
	}
	fmt.Printf("p: %#v\n", p)

	return nil
}

// shortcuts

// cmdIP is a short for displaying the IPs for one probe
func cmdIP(c *cli.Context) error {
	// By default we want both
	if !want4 && !want6 {
		want6, want4 = true, true
	}
	args := c.Args()
	id, _ := strconv.ParseInt(args[0], 10, 32)

	p, err := atlas.GetProbe(int(id))
	if err != nil {
		fmt.Printf("err: %v", err)
		os.Exit(1)
	}

	var str string = ""

	if want4 {
		str = fmt.Sprintf("%sIPv4: %s ", str, p.AddressV4)
	}

	if want6 {
		str = fmt.Sprintf("%sIPv6: %s ", str, p.AddressV6)
	}

	fmt.Println(str)
	return nil
}

{'fraction_non_alphanumeric': 0.18074735987002438, 'fraction_numerical': 0.020308692120227456, 'mean_word_length': 3.231958762886598, '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': '2846938', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1072, 'n_words': 266}