<commit_before><commit_msg>Added a test binary to test README.md code<commit_after>package main

import (
	"github.com/docker/libnetwork"
	"github.com/docker/libnetwork/pkg/options"
	"github.com/docker/libnetwork/sandbox"
)

func main() {
	// Create a new controller instance
	controller := libnetwork.New()

	option := options.Generic{}
	driver, err := controller.NewNetworkDriver("simplebridge", option)
	if err != nil {
		return
	}

	netOptions := options.Generic{}
	// Create a network for containers to join.
	network, err := controller.NewNetwork(driver, "network1", netOptions)
	if err != nil {
		return
	}

	// For a new container: create a sandbox instance (providing a unique key).
	// For linux it is a filesystem path
	networkPath := "/var/lib/docker/.../4d23e"
	networkNamespace, err := sandbox.NewSandbox(networkPath)
	if err != nil {
		return
	}

	// For each new container: allocate IP and interfaces. The returned network
	// settings will be used for container infos (inspect and such), as well as
	// iptables rules for port publishing.
	_, sinfo, err := network.CreateEndpoint("Endpoint1", networkNamespace.Key(), "")
	if err != nil {
		return
	}

	// Add interfaces to the namespace.
	for _, iface := range sinfo.Interfaces {
		if err := networkNamespace.AddInterface(iface); err != nil {
			return
		}
	}

	// Set the gateway IP
	if err := networkNamespace.SetGateway(sinfo.Gateway); err != nil {
		return
	}
}
{'fraction_non_alphanumeric': 0.12011173184357542, 'fraction_numerical': 0.0034916201117318434, 'mean_word_length': 3.776666666666667, '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': '3087795', 'n_tokens_mistral': 463, 'n_tokens_neox': 438, 'n_words': 140}