<commit_before><?php

namespace Mailman2Wrapper;
use Curl\Curl;
use \Exception;

class Client {

    private $host;
    private $group;
    private $curl;

    function __construct($host, $group, $password){
        $this->host = $host;
        $this->group = $group;
        $this->curl = new Curl;
        $this->login($password);
    }

    private function login($password){
        $this->curl->post($this->host . '/admin/' . $this->group, array(
            'admlogin' => 'Let+me+in...',
            'adminpw' => $password
        ));
        // Handle 401, 403, 500
        if($this->curl->error){
            throw new Exception($this->curl->httpErrorMessage, $this->curl->httpError);
        }
        $this->curl->setCookie('groups.neiist.rp+admin', $this->curl->getCookie('groups.neiist.rp+admin'));
        return true;
    }
    <commit_msg>Added functionality to unsubscribe member<commit_after><?php

namespace Mailman2Wrapper;
use Curl\Curl;
use \Exception;

class Client {

    private $host;
    private $group;
    private $curl;

    function __construct($host, $group, $password){
        $this->host = $host;
        $this->group = $group;
        $this->curl = new Curl;
        $this->login($password);
    }

    private function login($password){
        $this->curl->post($this->host . '/admin/' . $this->group, array(
            'admlogin' => 'Let+me+in...',
            'adminpw' => $password
        ));
        // Handle 401, 403, 500
        if($this->curl->error){
            throw new Exception($this->curl->httpErrorMessage, $this->curl->httpError);
        }
        $this->curl->setCookie('groups.neiist.rp+admin', $this->curl->getCookie('groups.neiist.rp+admin'));
        return true;
    }
    
    private function unsubscribe($email){
        $this->curl->post($this->host . '/options/' . $this->group . '/' . $email, array(
            'unsub' => 'Unsubscribe',
            'unsubconfirm' => 1
        ));
        // Handle 401, 403, 500
        if($this->curl->error){
            throw new Exception($this->curl->httpErrorMessage, $this->curl->httpError);
        }
        return true;
    }

{'fraction_non_alphanumeric': 0.1733644859813084, 'fraction_numerical': 0.014018691588785047, 'mean_word_length': 2.209895052473763, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 55, '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': '454236', 'n_tokens_mistral': 699, 'n_tokens_neox': 649, 'n_words': 129}