<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# macports: uninstalls macports update
# https://github.com/bnomis/macports-update
# (c) <NAME>
from __future__ import print_function

import os
import os.path

def launchctl_unload(path):
    argv = ['launchctl', 'unload', path]
    try:
        p = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    except Exception as e:
        print('Exception running %s: %s' % (argv, e))
    else:
        stdout, stderr = p.communicate()
        if stdout:
            print(stdout.decode().strip())
        if stderr:
            print(stderr.decode().strip())
        p.wait()
        
def uninstall():
    launchctl_unload()
    
    fn = 'org.macports.update.plist'
    destdir = '/Library/LaunchDaemons'
    dest = os.path.join(destdir, fn)
    try:
        os.remove(dest)
    except Exception as e:
        print('Exception deleting %s: %s' % (dest, e))


if __name__ == '__main__':
    uninstall()
<commit_msg>pass the pass to unload<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# macports: uninstalls macports update
# https://github.com/bnomis/macports-update
# (c) <NAME>
from __future__ import print_function

import os
import os.path

def launchctl_unload(path):
    argv = ['launchctl', 'unload', path]
    try:
        p = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    except Exception as e:
        print('Exception running %s: %s' % (argv, e))
    else:
        stdout, stderr = p.communicate()
        if stdout:
            print(stdout.decode().strip())
        if stderr:
            print(stderr.decode().strip())
        p.wait()
        
def uninstall():
    
    fn = 'org.macports.update.plist'
    destdir = '/Library/LaunchDaemons'
    dest = os.path.join(destdir, fn)
    
    launchctl_unload(dest)
    
    try:
        os.remove(dest)
    except Exception as e:
        print('Exception deleting %s: %s' % (dest, e))


if __name__ == '__main__':
    uninstall()

{'fraction_non_alphanumeric': 0.13902681231380337, 'fraction_numerical': 0.0009930486593843098, 'mean_word_length': 2.5790408525754884, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4957996', 'n_tokens_mistral': 684, 'n_tokens_neox': 671, 'n_words': 158}