<commit_before>
atd package
===========

`atd` 


Submodules
==========


atd module
==============

at(command, when, queue='a')

   Execute command at when.

   command may be anything interpreble by /bin/sh. If you need
   features specific to another shell, create a script and then make
   the command <path to shell> <path to script>.

   when may be a datetime.timedelta, a datetime.datetime or a timespec
   str. If a string is provided, it is assumed that it's a valid
   timespec. See  *timespec* doc in `at`'s documentation.

atrm(*atjobs)

   Cancel one or more AtJobs. Takes an AtJob instance returned by
   at(). You may also choose to save the at job ID in a database, and
   pass its ID to cancel().
<commit_msg>More docs<commit_after>
atd package
===========

`at` is the companion of `cron`. While `cron` says "execute command every 5
minutes", `at` says, "execute command once at exactly 2:00 PM". `at` is the
original Unix scheduler. 

This Python module aims to support all `at` operations in a safe way.

After installing with `python2 setup.py install`, it's recommended to run the
tests to make sure `at` is configured properly.

Simple usage example
====================

::
    from atd import atd

    print 'Create some jobs...'
    job1 = atd.at("echo lol >> /tmp/lolol", datetime.datetime.now() + 
            datetime.timedelta(minutes = 2))
    job2 = atd.at("rm /tmp/lolol", datetime.timedelta(minutes=5))

    print "Job 1: {0}".format(job1)
    print "Job 2: {0}".format(job2)

    print 'All right, free up those vars...'
    del job1; del job2

    print 'Check our atd queue for our jobs (`atq`)'
    atq = atd.AtQueue()
    print [str(job) for job in atq.jobs]

    print 'Cancel all our jobs.'
    print [atrm(job) for job in atq.jobs]

    print 'Refresh the AtQueue...'
    atq.refresh()

    print 'Poof!'
    print [str(job) for job in atq.jobs]

    #print 'All right, let\'s have some more fun. Performance test, create'+\
        #' 1,024 jobs.'

    #for i in xrange(1,1024):
        #at("echo lol >> /tmp/lolol", "now + 24 hours")

    #print 'Created 1,024 jobs.'

    #atq.refresh()

    #print 'Counted {0} jobs.'.format(len(atq.jobs))

    #for job in atq.jobs: atrm(job)

    #print 'Deleted {0} jobs.'.format(len(atq.jobs))


Submodules
==========


atd module
==============

at(command, when, queue='a')

   Execute command at when.

   command may be anything interpreble by /bin/sh. If you need
   features specific to another shell, create a script and then make
   the command <path to shell> <path to script>.

   when may be a datetime.timedelta, a datetime.datetime or a timespec
   str. If a string is provided, it is assumed that it's a valid
   timespec. See  *timespec* doc in `at`'s documentation.

atrm(*atjobs)

   Cancel one or more AtJobs. Takes an AtJob instance returned by
   at(). You may also choose to save the at job ID in a database, and
   pass its ID to cancel().

{'fraction_non_alphanumeric': 0.13030200203596878, 'fraction_numerical': 0.01153715643026807, 'mean_word_length': 3.123076923076923, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '1135051', 'n_tokens_mistral': 992, 'n_tokens_neox': 914, 'n_words': 394}