<commit_before>package zeroutine

import (
	zmq "github.com/alecthomas/gozmq"
)

type Zeroutine struct {
	PubAddr         string // Publisher Endpoint Address 
	SubAddr         string // Subscriber Endpoint Address
	BufferSize      int    // Memory buffer size
	SubscribeFilter string
}

// Run runs a broker for this zeroutine configuration.
func (z Zeroutine) Run() error {
	broker, err := NewBroker(z)
	if err == nil {
		err = broker.Run()
	}
	return err
}

// Subscribe returns a subscription (channel) for given filters.
func (z Zeroutine) Subscribe(filters ...string) *Subscription {
	return newSubscription(z.SubAddr, filters)
}

func (z Zeroutine) NewPublisher() (*Publisher, error) {
	sock, err := newPubSocket(z.BufferSize)
	if err != nil {
		return nil, err
	}
	if err = sock.Connect(z.PubAddr); err != nil {<commit_msg>Subscribe requires at least one argument<commit_after>package zeroutine

import (
	zmq "github.com/alecthomas/gozmq"
)

type Zeroutine struct {
	PubAddr         string // Publisher Endpoint Address 
	SubAddr         string // Subscriber Endpoint Address
	BufferSize      int    // Memory buffer size
	SubscribeFilter string
}

// Run runs a broker for this zeroutine configuration.
func (z Zeroutine) Run() error {
	broker, err := NewBroker(z)
	if err == nil {
		err = broker.Run()
	}
	return err
}

// Subscribe returns a subscription (channel) for given filters.
func (z Zeroutine) Subscribe(filters ...string) *Subscription {
	if len(filters) == 0 {
		panic("Subscribe requires at least one filter")
	}
	return newSubscription(z.SubAddr, filters)
}

func (z Zeroutine) NewPublisher() (*Publisher, error) {
	sock, err := newPubSocket(z.BufferSize)
	if err != nil {
		return nil, err
	}
	if err = sock.Connect(z.PubAddr); err != nil {
{'fraction_non_alphanumeric': 0.10532276330690826, 'fraction_numerical': 0.0005662514156285391, 'mean_word_length': 3.6015625, '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': '6502942', 'n_tokens_mistral': 578, 'n_tokens_neox': 573, 'n_words': 184}