Saravanan666/pypi-org huggingface dataset:
Package: crontab
Copyright 2011-2021 Josiah CarlsonReleased under the LGPL license version 2.1 and version 3 (you can choose
which you’d like to be bound under).DescriptionThis package intends to offer a method of parsing crontab schedule entries and
determining when an item should next be run. More specifically, it calculates
a delay in seconds from when the .next() method is called to when the item
should next be executed.Comparing the below chart tohttp://en.wikipedia.org/wiki/Cron#CRON_expressionyou will note that W and # symbols are not supported.Field NameMandatoryAllowed ValuesDefault ValueAllowed Special CharactersSecondsNo0-590* / , -MinutesYes0-59N/A* / , -HoursYes0-23N/A* / , -Day of monthYes1-31N/A* / , - ? LMonthYes1-12 or JAN-DECN/A* / , -Day of weekYes0-6 or SUN-SATN/A* / , - ? LYearNo1970-2099* / , -If your cron entry has 5 values, minutes-day of week are used, default seconds
is and default year is appended. If your cron entry has 6 values, minutes-year
are used, and default seconds are prepended.As such, only 5-7 value crontab entries are accepted (and mangled to 7 values,
as necessary).Sample individual crontab fieldsExamples of supported entries are as follows:*
*/5
7/8
3-25/7
3,7,9
0-10,30-40/5For month or day of week entries, 3 letter abbreviations of the month or day
can be used to the left of any optional / where a number could be used.For days of the week:mon-fri
sun-thu/2For month:apr-jul
mar-sep/3Installationpip install crontabExample uses>>> from crontab import CronTab
>>> from datetime import datetime
>>> # define the crontab for 25 minutes past the hour every hour
... entry = CronTab('25 * * * *')
>>> # find the delay from when this was run (around 11:13AM)
... entry.next()
720.81637899999998
>>> # find the delay from when it was last scheduled
... entry.next(datetime(2011, 7, 17, 11, 25))
3600.0NotesAt most one of ‘day of week’ or ‘day of month’ can be a value other than ‘?’
or ‘*’. We violate spec here and allow ‘*’ to be an alias for ‘?’, in the case
where one of those values is specified (seeing as some platforms don’t support
‘?’).This module also supports the convenient aliases:@yearly
@annually
@monthly
@weekly
@daily
@hourlyExample full crontab entries and their meanings:30 */2 * * * -> 30 minutes past the hour every 2 hours
15,45 23 * * * -> 11:15PM and 11:45PM every day
0 1 ? * SUN -> 1AM every Sunday
0 1 * * SUN -> 1AM every Sunday (same as above)
0 0 1 jan/2 * 2011-2013 ->
    midnight on January 1, 2011 and the first of every odd month until
    the end of 2013
24 7 L * * -> 7:24 AM on the last day of every month
24 7 * * L5 -> 7:24 AM on the last friday of every month
24 7 * * Lwed-fri ->
    7:24 AM on the last wednesday, thursday, and friday of every month
Package: crontab-py
Crontab_pyIntroductionCrontab_py is a Python module designed to simplify the management of cron jobs. It enables easy addition, removal, and listing of scheduled tasks.Examplefromcrontab_pyimportCrontabct=Crontab()ct.add_job(cmd="echo 'hello world'",frequency="* * * * *",path_to_log="/tmp/crontab.log",id="my_job",description="my job")Sphinx DocumentationExplore thecomplete documentationfor detailed usage instructions and advanced features.Get StartedFor installation and additional details, refer to theofficial websiteor check out theAPI Guide.Feel free to contribute, report issues, or suggest improvements byraising an issue
Package: crontabula
Crontabula 🧛Crontabula is a small library for parsing Crontab expressions into Python objects. The usage is simple:importcrontabulacrontab=crontabula.parse("*/10 3,6 * * 1-4")print(crontab.next)# datetime.datetime(...)InstallationInstall with:pip install crontabulaCLICrontabula comes with a small utility to print debug information about a crontab expression. Make sure you install the
library with thecliextra (pip install "crontabula[cli]").$ crontabula "*/15 * 1,15 * 1-5,6"
minute         0 15 30 45
hour           0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
day of month   1 15
month          1 2 3 4 5 6 7 8 9 10 11 12
day of week    1 2 3 4 5 6
next time      2022-04-19 17:30:00 (in 0:03:59.987874)ContributingConfigure the environment and run the tests usingPoetry:$ poetry install
$ poetry run pre-commit install  # Optional, for linting with black
$ poetry run pytest
Package: cron-times
Cron-times is the timetable for your cronjobs.
It shows you when your cronjobs are running, in a human-friendly way.Quick startInstall from PyPI:pipinstallcron-timesRun:flask--appcron_timesinit-dbflask--appcron_timesrunThe app will be available athttp://localhost:5000Add cronjobsYou can describe your cronjobs in TOML format:# Always starts with [[job]]# You can add multiple jobs in one file[[job]]# unique key within the group for each job# this field is invisible to users and only used for internal reference# if not set, it will use job name as the keykey="custom-key-01"# [required] job namename="Sample job"# [required] cronjob schedule, in crontab formatschedule="0 10/3 * * *"# timezone, default to UTCtimezone="Asia/Taipei"# job descriptiondescription="""
In the description, you *can* use `markdown`
"""# flag to indicate if the job is enabledenabled=true# labelslabels=["foo",]# metadata# you can use this field to store any extra information[job.metadata]"extra field"="can be anything"pi=3.14"reference url"="https://example.com"After the TOML file is ready, you can import it with the following command:flask--appcron_timesread-file/path/to/jobs.tomlBuilt-in job adaptersCron-times comes with some built-in job adapters.
You can use them by running the following commands and it will read the job list from the specified location.dbt cloudReads schedule job list fromdbt cloud:flask--appcron_timesread-dbt-cloud--helpArgo workflowReadsCron WorkflowsfromArgo Workflows:flask--appcron_timesread-argo-workflow--helpConfigurationCron-times usesFlaskas the web framework, and adapts Flask’s configuration system.Set the environment variable to the path of that file:exportCRON_TIMES_SETTINGS=/path/to/settings.cfgYou can set the following options:# Site name to be used for the page titleSITE_NAME="My cronjobs"# Time range to show in the timetable based on current time, in secondsTIMETABLE_LOOKBEHIND_SECONDS=86400# 1dayTIMETABLE_LOOKAHEAD_SECONDS=172800# 2days# Max number of items to show in the timetable# If there are more items than this number, it would only return the jobs that is closest to the current time# Note that the more items you show, the slower the page will be loadedTIMETABLE_MAX_ITEMS=512
Package: crontip
CrontipCrontip is a tool uesd for backup and install of crontab.InstallationYou can install crontip by:pip install crontip(please use latest pip to install)Layoutcrontip
|- crontip.py
|- config.yaml
|- backup # store the backup of crontab
|- ready # store the crontab that ready to be installUsageBackup the Current Crontabbackup into default destinationcrontip -borcrontip --backupwill backup the current crontab and save it into thebackup_folder.appointe the destination with-ocrontip -b -o ./this_is_a_backupsave the backup into./this_is_a_backupEdit the Prepared Copy of Backupcrontip -eorcrontip --editThe editing processautomaticallythrough two steps:copy the latest backup into ready foldercp backup/latest.bk ready/latest.bkopen file with vimvim ready/latest.bk
Package: crontools
crontoolsis a library that allows you to parse crontab expression and iterate over scheduled fire times.Features:crontab expression parseroptional seconds field supportoptional year field supportcrontab fire time sequential iteration supportInstallationYou can install crontools with pip:$pipinstallcrontoolsQuickstartGet next cron fire time:>>>importdatetimeasdt>>>importcrontoolsasct>>>>>>tz=dt.timezone.utc>>>now=dt.datetime.fromisoformat('2020-02-29 23:59:59.999+00:00')>>>ct=ct.Crontab.parse(...'* * * * * * *',...seconds_ext=True,...years_ext=True,...tz=tz,...)>>>>>>print(f"Next fire time:{ct.next_fire_time(now=now)}")Nextfiretime:2020-03-0100:00:00+00:00Iteration over cron fire times starting from now:>>>importcrontoolsasct>>>>>>tz=dt.timezone.utc>>>now=dt.datetime.fromisoformat('2021-02-01 00:00:00+00:00')>>>ct=ct.Crontab.parse(...'30 30 12-16/2 1,2 JAN SAT,SUN *',...seconds_ext=True,...years_ext=True,...tz=tz,...)>>>>>>cron_iter=ct.iter(start_from=now)>>>forn,fire_datetimeinzip(range(1,31),cron_iter):...print("{n:2}:{dt}".format(n=n,dt=fire_datetime))......1:2022-01-0112:30:30+00:002:2022-01-0114:30:30+00:003:2022-01-0116:30:30+00:004:2022-01-0212:30:30+00:005:2022-01-0214:30:30+00:006:2022-01-0216:30:30+00:007:2022-01-0812:30:30+00:008:2022-01-0814:30:30+00:009:2022-01-0816:30:30+00:0010:2022-01-0912:30:30+00:0011:2022-01-0914:30:30+00:0012:2022-01-0916:30:30+00:0013:2022-01-1512:30:30+00:0014:2022-01-1514:30:30+00:0015:2022-01-1516:30:30+00:0016:2022-01-1612:30:30+00:0017:2022-01-1614:30:30+00:0018:2022-01-1616:30:30+00:0019:2022-01-2212:30:30+00:0020:2022-01-2214:30:30+00:0021:2022-01-2216:30:30+00:0022:2022-01-2312:30:30+00:0023:2022-01-2314:30:30+00:0024:2022-01-2316:30:30+00:0025:2023-01-0112:30:30+00:0026:2023-01-0114:30:30+00:0027:2023-01-0116:30:30+00:0028:2023-01-0212:30:30+00:0029:2023-01-0214:30:30+00:0030:2023-01-0216:30:30+00:00
Package: crontzconvert
Change cron between timezonesGives a crontab expression, source and target timezones, return a new crontab expression that times change according to the given timezones.Installpip3installcrontzconvertUsageconvert(cron_expression,source_timezone,target_timezone)>>fromcrontzconvertimportconvert>>convert('* 0/12 * * *','Asia/Shanghai','UTC')# UTC+8 to UTC'* 16/12 * * *'TODOChange day and week when switch timezone
Package: cronus-eater
Cronus Eater: A simple tool to get time series from spreadsheetsExtract and normalize time series from any spreadsheet with differents patterns.Where is the data I want?There's just one place to get the data I want, but ... it's mess! I need to spend some time to normalize this times series.importpandasaspdraw_dataframe=pd.read_excel('historical_series_3Q22.xlsx',sheet_name='random_sheet')raw_dataframe.head()01234567890NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN1NaNHoldings Ltd.NaNNaNNaNNaNNaNNaNNaNNaN2NaNNaNNaNNaN3Q222Q22NaN1Q222022NaN3NaNAmounts in thousands of R$NaNNaNR$R$NaNR$R$NaN4NaNCash FlowNaNNaN$500.23$302.81NaN$106.12$900.00NaNLet's devours this times seriesNo need to worry. You just need to bring the raw dataframe to Cronus Eater and you are ready to start the analysis.
This way, you spend more time on what is really important for you.importcronus_eatertimes_series_df=cronus_eater.extract(raw_dataframe)times_series_df.head()Numeric IndexLabel IndexTable OrderTimeValue04Cash Flow13Q22500.2314Cash Flow12Q22302.8124Cash Flow11Q22106.1234Cash Flow12022900.00But If I need to consume a lot of dataframes from a spreedsheet?We got you, just use "extract_many"raw_dataframes=pd.read_excel('historical_series_3Q22.xlsx',sheet_name=None)times_series_df=cronus_eater.extract_many(raw_dataframes)times_series_df.head()Numeric IndexLabel IndexTable OrderTimeValueSheet Name04Cash Flow13Q22500.23random_sheet14Cash Flow12Q22302.81random_sheet27ROE11Q22106.12random_sheet_237ROE12022900.00random_sheet_2Where to get itThe source code is currently hosted on GitHub at:https://github.com/breno-jesus-fernandes/cronus-eaterBinary installers for the latest released version is going to available at thePython Package Index (PyPI).# Through pippipinstallcronus-eater# Through poetrypoetryaddcronus-eaterLicenseMITContributing to Cronus EaterAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. Seehttps://github.com/breno-jesus-fernandes/cronus-eater/tree/main/docsfor instructions.
Package: cronus-mcmc
cronuscronusis a Python tool designed to facilitateMarkov Chain Monte Carlo (MCMC)andNested Sampling (NS)in large supercomputing clusters.It relies on the powerful MCMC samplerzeusto do the heavy-lifting and incorporates various MPI features
along with a suite of automatedConvergence Diagnostics.cronusis designed to be used via the terminal using parameter files and it is particularly suited for
Astrophysical and Cosmological applications.DocumentationRead the docs atcronus-mcmc.readthedocs.ioAttributionPlease cite X if you find this code useful in your research.LicenceCopyright 2020 Minas Karamanis and contributors.cronusis free software made available under the GPL-3.0 License.
Package: cronut
Cronutcronutis a barebones event processing library using Kafka.QuickstartfromcollectionsimportdequeimportjsonfromcronutimportAppd=deque(maxlen=30)app=App('myapp',broker='kafka://localhost:9096')@app.process('topic1')defstateless(message):event=json.loads(message.value())print(event)@app.process('topic2',state=d)defstateful(message,state):event=json.loads(message.value())state.appendleft(event)@app.timer(interval=0.1,state=d)defretrieve(state):event=state.pop()print(event)@app.timer(interval=0.1)defgreet():print('howdy')app.start()
Package: cron-validator
Cron ValidatorFeaturesValidate unix cron expressionMatch unit cron expression with specific datetimeGenerate match datetime between two datetimeSchedule tasksInstallpipinstallcron-validatorRun Tests1. Install test requirementspipinstall-rrequirements/test.txt2. Run tests (with coverage if wished)pytest--cov=.test/Sample1. Validate unix cron expressionfromcron_validatorimportCronValidatorassertCronValidator.parse('* * * * *')isnotNone# validassertCronValidator.parse('*/3 * * * *')isnotNone# validassertCronValidator.parse('*/61 * * * *')isNone# invalid2. Match unit cron expression with specific datetimefromcron_validatorimportCronValidatorfromcron_validator.utilimportstr_to_datetimedt_str='2019-04-23 1:00'dt=str_to_datetime(dt_str)assertCronValidator.match_datetime("* * * * *",dt)assertCronValidator.match_datetime("* * * 4 *",dt)assertCronValidator.match_datetime("* * * 5 *",dt)isFalseassertCronValidator.match_datetime("* * * 1-5 *",dt)assertCronValidator.match_datetime("* * * 1-3 *",dt)isFalseassertCronValidator.match_datetime("* * * 1/5 *",dt)isFalseassertCronValidator.match_datetime("* * * * *",dt)assertCronValidator.match_datetime("0 * * * *",dt)assertCronValidator.match_datetime("0-30 * * * *",dt)assertCronValidator.match_datetime("0/30 * * * *",dt)3. Generate match datetime between two datetimefromcron_validatorimportCronValidatorfromcron_validator.utilimportstr_to_datetimefrom_str='2019-04-22 00:00'to_str='2019-04-23 23:59'fordtinCronValidator.get_execution_time("0 0 * * *",from_dt=str_to_datetime(from_str),to_dt=str_to_datetime(to_str)):print(dt)# Output:# 2019-04-22 00:00:00+00:00# 2019-04-23 00:00:00+00:004. Use scheduler for repetitive taskfromcron_validatorimportCronSchedulercron_string="*/1 * * * *"scheduler=CronScheduler(cron_string)whileTrue:ifscheduler.time_for_execution():# Get's called every full minute (excluding first iteration)print("Now is the next scheduled time.")5. Use extended cron rules based on AWS EventBridge rules(from v1.0.6)The cron validator supports partially extended rules based on the Amazon EvenBridge rule set.More info.Currently we support:'L' for day of the month and day of the week'W' for day of the week.fromcron_validatorimportCronValidatorfromcron_validator.utilimportstr_to_datetimefromcron_validator.regexesimportVersiondt_str='2023-04-28 1:00'dt=str_to_datetime(dt_str)assertCronValidator.match_datetime("* * * * 30W",dt,version=Version.EB)assertCronValidator.match_datetime("* * * * 5L",dt,version=Version.EB)dt_str="2022-02-28 1:00"dt=str_to_datetime(dt_str)assertCronValidator.match_datetime("* * L * *",dt,version=Version.EB)LicenseThis project is licensed under the MIT License - see theLICENSE.txtfile for details
Package: cronwhen
cronwhenPython package to compute next execution date of a cron expression.# Simple example:

import datetime
from cronwhen import cronwhen

base_point = datetime.datetime(2019,10,3,12,49)

expression = cronwhen.CronExpression('59 10-20/3 1,2,6 * *')
expression.get_next_occurrence(base_point)
# --> datetime.datetime(2019,10,6,10,59)
Package: cronwrap
Basic example of usage:##Will print out help
$ cronwrap -h

    usage: cronwrap [-h] [-c CMD] [-e EMAILS] [-t TIME] [-v [VERBOSE]]

    A cron job wrapper that wraps jobs and enables better error reporting and command timeouts.

    optional arguments:
      -h, --help            show this help message and exit
      -c CMD, --cmd CMD     Run a command. Could be `cronwrap -c "ls -la"`.
      -e EMAILS, --emails EMAILS
                            Email following users if the command crashes or
                            exceeds timeout. Could be `cronwrap -e
                            "johndoe@mail.com, marcy@mail.com"`. Uses system's
                            `mail` to send emails. If no command (cmd) is set a
                            test email is sent.
      -t TIME, --time TIME  Set the maximum running time.If this time is passed an
                            alert email will be sent.The command will keep running
                            even if maximum running time is exceeded.The default is
                            1 hour `-t 1h`. Possible values include: `-t 2h`,`-t
                            2m`, `-t 30s`.
      -v [VERBOSE], --verbose [VERBOSE]
                            Will send an email / print to stdout on successful run.


##Will send out a timeout alert to cron@my_domain.com:
$ cronwrap -c "sleep 2" -t "1s" -e cron@my_domain.com

##Will send out an error alert to cron@my_domain.com:
$ cronwrap -c "blah" -e cron@my_domain.com

#Will not send any reports:
$ cronwrap -c "ls" -e cron@my_domain.com

#Will send a successful report to cron@my_domain.com:
$ cronwrap -c "ls" -e cron@my_domain.com -v
Package: cronwrap3
Basic example of usage:##Will print out help
$ cronwrap -h

    usage: cronwrap3 [-h] [-c CMD] [-e EMAILS] [-t TIME] [-v [VERBOSE]]

    A cron job wrapper that wraps jobs and enables better error reporting and command timeouts.

    optional arguments:
      -h, --help            show this help message and exit
      -c CMD, --cmd CMD     Run a command. Could be `cronwrap -c "ls -la"`.
      -e EMAILS, --emails EMAILS
                            Email following users if the command crashes or
                            exceeds timeout. Could be `cronwrap -e
                            "johndoe@mail.com, marcy@mail.com"`. Uses system's
                            `mail` to send emails. If no command (cmd) is set a
                            test email is sent.
      -t TIME, --time TIME  Set the maximum running time.If this time is passed an
                            alert email will be sent.The command will keep running
                            even if maximum running time is exceeded.The default is
                            1 hour `-t 1h`. Possible values include: `-t 2h`,`-t
                            2m`, `-t 30s`.
      -v [VERBOSE], --verbose [VERBOSE]
                            Will send an email / print to stdout on successful run.


##Will send out a timeout alert to cron@my_domain.com:
$ cronwrap -c "sleep 2" -t "1s" -e cron@my_domain.com

##Will send out an error alert to cron@my_domain.com:
$ cronwrap -c "blah" -e cron@my_domain.com

#Will not send any reports:
$ cronwrap -c "ls" -e cron@my_domain.com

#Will send a successful report to cron@my_domain.com:
$ cronwrap -c "ls" -e cron@my_domain.com -v
Package: crony
# CronyCron monitoring tool. It works well with cronitor.io & sentry.io
Cronitor.io can help you know if the tool doesn’t start or end correctly. Or if it takes an
abnormally long time to complete.
Sentry.io helps debugging by giving stack traces when your cron code fails.## Getting StartedThis tool currently requires Python 3.6 or higher. There’s a current issue to add Python 2
support.If you’re on a Mac, it’s as simple as running` brew install python3 `Or using whatever package manager for your system.### PrerequisitesTo get the benefit of [Cronitor.io](https://cronitor.io) integration. You’ll need to sign up for
an account with them and setup a new “Cron job” monitor. When you setup your monitor, you’ll
receive a link like`https://cronitor.link/6gVGE7/{ENDPOINT}`The alphanumeric string after “https://cronitor.link/” and before the endpoint is your Cronitor
unique identifier. You’ll need to pass that tocronywith –cronitor to integrate the cron
monitoring with cronitor.io.To integration crony with Sentry.io for debugging & error tracking, you’ll need to create an
account at [Sentry.io](https://sentry.io). After creating an account, you can setup a project
for your crons. Sentry will give you a DSN url that you’ll need to integration with crony.
You can then specify your DSN when callingcronywith--dsn, or with a SENTRY_DSN
environment variable, or by placing it inside a config file.### InstallingSimply install with` pip install crony `To get a list of options use` crony--help`Crony can wrap any shell command, try this` crony echo "hello world" `View the [wiki](https://github.com/youversion/crony/wiki) for environment variables and
configuration file options.## Running the testsThere’s a current issue to write unit tests.### And coding style testsNew commits must pass pep8 & flake8 standards.
The only allowed exception is [pep8 line length](https://www.python.org/dev/peps/pep-0008/#maximum-line-length)
is allowed to be up to 99 characters.` pep8 .--max-line-length=99`Should yield 0 errors.` flake8 . `Should also yield 0 errors.## Built With[Raven](https://github.com/getsentry/raven-python) - Python client for Sentry[Requests](http://docs.python-requests.org/en/master/) - Requests: HTTP for Humans## ContributingPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process
for submitting pull requests.## VersioningIdeally we’ll use [SemVer](http://semver.org/) for versioning.
For the versions available, see the [tags on this repository](https://github.com/youversion/crony/tags).## AuthorsBrad Belyeu-Initial work- [bbelyeu](https://github.com/bbelyeu)## LicenseThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.## AcknowledgmentsThanks to [PurpleBooth](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2) for the README templateThanks to [Jan-Philip](https://gehrcke.de/2014/02/distributing-a-python-command-line-application/) for the great blog post.