Saravanan666/pypi-org huggingface dataset:
Package: daemonflux
daemonflux: DAta-drivEn and MuOn-calibrated Neutrino fluxDaemonflux is a tabulated/splined version of the an atmospheric flux model calibrated on muon spectrometer data. For the details about how daemonflux is built and calibrated to muon datathe following publication.@article{Yanez:2023lsy,
    author = "Ya\~nez, Juan Pablo and Fedynitch, Anatoli",
    title = "{daemonflux: DAta-drivEn MuOn-calibrated Neutrino Flux}",
    eprint = "2303.00022",
    archivePrefix = "arXiv",
    primaryClass = "hep-ph",
    month = "2",
    year = "2023"
}RequirementsPython > 3.7,numpy,scipymatplotlibfor examplesInstallationa) From PyPi:pip install daemonfluxb) From source in editable mode, so the package gets updated after eachgit pull:$gitclonehttps://github.com/mceq-project/daemonflux
$cddaemonflux
$python3-mpipinstall-e.QuickstartTo see more features and a detailed example, refer to theexamplenotebook. In summary, the process of calculating calibrated fluxes from the provided tables is as follows:from daemonflux import Flux
import numpy as np
import matplotlib.pyplot as plt

daemonflux = Flux(location='generic')
egrid = np.logspace(0,5) # Energy in GeV

fl = daemonflux.flux(egrid, '15', 'numuflux')
err = daemonflux.error(egrid, '15', 'numuflux')
plt.loglog(egrid, fl, color='k')
plt.fill_between(egrid, fl + err, fl - err,
    color='r', alpha=.3, label=r'1$\sigma$ error')
...Resulting in the following figure:Explanation of quantities and unitsForneutrinos, the methodsFlux.fluxandFlux.errorreturn values in the units of $(E/\text{GeV})^3/(\text{GeV }\text{s }\text{sr }\text{cm}^2)$, i.e. multiplied by $E^3$. Formuon quantitiesare reported as a function of total momentum instead of energy, i.e. the units are  $(p/\text{(GeV/c)})^3/(\text{(GeV/c) } \text{s }\text{sr }\text{cm}^2)$. Natural units $\hbar=c=1$ are used everywhere.The quantities are:muons:muflux,muratio,mu+,mu-,muon neutrinos:numuflux,numuratio,numu,antinumu,flavorratioelectron neutrinos:nueflux,nueratio,nue,antinue,flavorratioThose titled XXXflux are the sum of particle and antiparticle fluxesnumuflux = numu + antinumu, the ratio isnumuratio = numu/antinumu, and the is defined asflavorratio = (numu + antinumu)/(nue + antinue).Thetotal_quantities, such astotal_muflux, represent the total flux, which includes both conventional and prompt atmospheric fluxes. However, unlike the conventional flux, the prompt flux is not calibrated using the daemonflux method, as surface muons are not sensitive to prompt fluxes. As a result, the prompt component does not include correction parameters or errors. It is important to note, however, that the conventional part of the flux remains calibrated, so the total_ flux is simply the sum of the calibrated conventional and uncalibrated prompt fluxes.LICENSEBSD 3-Clause License
Package: daemonless-queuing
Daemonless QueuingSimple and reliable Redis queuing utilities.Install$pipinstalldaemonless-queuingUsageQueuingimportredisfromdaemonless_queuingimportsetup,shutdowninstance=redis.Redis(host='localhost',port=6379)enqueue=setup(instance,{'queues':['TESTCHAN_1','TESTCHAN_2']})# the third positional parameter is a integer (or None) representing the timeout in seconds# after the timeout is reached the function subprocess will be killedenqueue('TESTCHAN_1','my_package.my_module.func_name'0)enqueue('TESTCHAN_2','my_package.my_module.func_name',0,'positional argument',42,named_arg='Hey!')# ...# do some blocking stuffshutdown()Lockingimportredisfromdaemonless_queuingimportmake_lockinstance=redis.Redis(host='localhost',port=6379)lock=make_lock(instance,'SOMETHING_ONGOING')withlock():# will raise if you try to run this scope again before the lock gets released...Why?I couldn't find a better suiting solution for what I needed (enqueuing stuff in multiple queues then running the jobs in parallel). Existing solutions (rq,Celery) are hard to setup and require a daemon/broker to work. Of course this is a much simpler version of these libraries, but some don't need more than that.CaveatsFunctions must be provided as Python import pathsFunction parameters must be JSON-serializableReturn values can't be accessedRace conditionThe function returned bymake_lockis susceptible to race condition at the moment.
Make sure your asynchronous function won't be called twice at the same time.LicenseThis library isMIT licensed.
Package: daemon-loop
Daemon LoopDaemon loop is simple and clean CLI utility to run programs periodically.It's better alternative to running commands like:whiletrue;dodate>>date.log;sleep5;done(or even running such commands in screen/tmux sessions)Installationpip3 install daemon-loopUsageusage: loop [-h] [-n N] [-p PERIOD] [--log FILENAME] [-e] [-v] [-d]
            command [command ...]

Run command in loop (with features)

positional arguments:
  command               command with arguments

optional arguments:
  -h, --help            show this help message and exit
  -n N                  Run N times and exit (default: 0 = infinite)
  -p PERIOD, --period PERIOD
                        Run every N seconds (default: 60)
  --log FILENAME        Write command stdout to this file
  -e, --err             Write command stderr to logfile)
  -v, --verbose         Write loop technical info to logfile)
  -d, --daemon          Work as daemonExample usageSimple and almost useless - rundateevery second until Ctrl-C:$loopdate
SunDec2005:18:21+072020SunDec2005:19:21+072020SunDec2005:20:21+072020^CRundate +%s(print unixtime) 3 times every 10 seconds and quit$loop-p10-n3--date+%s160841648516084164951608416505And now something more useful - make ourdateprogram a daemon!$loop-dvep10--log/tmp/loop.log--date+%s
$pidof-xloop25934-d: run as daemon-v: include technical info about time of start/stop, status code and daemon pid-e(--err): include stderr to logfile-p(--period): period is 10 seconds--log: logfilelog file will look like this:# 2020-12-20 05:39:01 my pid: 25934 run: date +%s
1608417541
# 2020-12-20 05:39:01 finished with status 0

# 2020-12-20 05:39:11 my pid: 25934 run: date +%s
1608417551
# 2020-12-20 05:39:11 finished with status 0CaveatsIf--daemonused, loop will chdir to '/'. Loop will automatically adjust path to logfile and executable, but you should care about other parameters. For example, commandloop -d -- touch myfilestarted from user home will touch/myfile(in root), and most likely will fail.
Package: daemon-process
Daemon python processClassDaemonallow to run python script like a daemon process.To run a process as a daemon you must inherit fromDaemon.Daemonhas abstractmethoddaemon. The code to run in
the background must be placed in thedaemonmethod.TheDaemonclass constructor contains the required parameterpid_filewhich is the path to the storage location of
the file with the daemon's pid. Also the constructor also has parameters for determining the path for thestdoutandstderrfiles.startmethod used to run daemon.stopmethod used to stop daemon.restartmethod used to restart daemon.Process to background (note)Calling setsid is usually one of the steps a process goes through when becoming a so called daemon process. (We are talking about Linux/Unix OS).
With setsid the association with the controlling terminal breaks. This means that the process will be NOT affected by a logout.
There are other way how to survive a logout, but the purpose of this 'daemonizing' process is to create a background process as independent from the outside world as possible.
That's why all inherited descriptors are closed; cwd is set to an appropriate directory, often the root directory; and the process leaves the session it was started from.
A double fork approach is generally recommended. At each fork the parent exits and the child continues. Actually nothing changes except the PID, but that's exactly what is needed here.
First fork before the setsid makes sure the process is not a process group leader. That is required for a succesfull setsid.
The second fork after the setsid makes sure that a new association with a controlling terminal won't be started merely by opening a terminal device.SourcestackoverflowКраткая суть в том что необходимо создать копию процесса через fork, сделать его максимально независимым от внешнего
мира и создание еще одной копии процесса через fork, это делается для смена PID.
Package: daemontools
Python modules for forking the application, single instance behavior, and sending logs over http POST.These are the tools related to various daemon functionality, reused at various projects over time.
Daemonize is useful for dropping privileges after the resources have been acquired as root.
AppInstance does just that, provides information on whether the application is already started or not.
Tachyon Sender tracks the log file and sends it over HTTP POST. Today, Tachyon Sender could possibly be replaced
with generic applications, such as nxlog or Logstash. Tachyon Sender was written as a complement for Tachyon Application
written bybeli-sk.The project is licensed under LGPLv3.
Package: daemux
Daemux uses tmux to let you start, stop, restart and check daemons.InstallationTo install use pip:$ pip3 install daemuxOr clone the repo:$ git clonehttps://github.com/edouardklein/daemux$ python3 setup.py installUsageDocumentationRead the documentationhttps://daemux.readthedocs.io/to understand how to use daemux.In the cloned repoHelper targetsTo build the documentation, run:$ make docTo run the test, run:$ make testTo check the code’s superficial cleanliness run:$ make lintDev cycleOne branch derived from latest master per new feature or bug fix.When this branch is complete:
- Merge master back in it$ git merge masterMake sure all tests pass, the code is clean and the doc compiles:$ makeBump the version appropriately (no tags):$ bumpversion (major|minor|patch) –commit –no-tagRebase everything in order to make one commit (if more are needed, talk the the maintainer). To avoid catastrophic failure, create another branch that won’t be rebased first. Keep bumpversion’s commit message somewhere in the rebased commit message, but not always on the first line.$ git branch <my_feature>_no_rebase$ git rebase -i masterMake a pull request, or, if you are the maintainer, switch to master$ git checkout masterIf you are the maintainer, merge the feature branch:$ git merge <my_feature>If you are the maintainer, make sure everything works as it shouldIf you are the maintainer, close the relevent issues (by adding fix… in the commit message with –amend)If you are the maintainer, create the appropriate tag$ git tag <version>If you are the maintainer, push the code to any relevant remote$ git pushIf you are the maintainer, upload the code to PyPI$ python3 setup.py sdist$ twine upload dist/* –skip-existingIf you are the maintainer, check that the docs are updated <http://daemux.readthedocs.io/en/latest/>If you are the maintainer or the devops guy, deploy the new code to all relevant machines
Package: daenerys
## Getting started```python❯ git clone https://github.com/dongweiming/daenerys❯ cd daenerys❯ virtualenv venv❯ source venv/bin/activate❯ pip install -r requirements.txt# 安装配置Redis和MongoDB❯ cd demo❯ python worker.py # 启动worker(默认5个进程)❯ python beat.py  # 新开启一个终端，启动Beat服务生成任务❯ ipython  # 发布一个需要获取执行结果的任务In [1]: from messaging import sync_getIn [2]: sync_get('flask')PUT flaskOut[2]:{u'author': u'Armin Ronacher',u'download_url': u'https://pypi.python.org/packages/24/6e/11b9c57e46f276a8a8da85a2fa7ada62b0463b68693616c7ab5df356fa/Flask-0.12.1.tar.gz',u'name': u'flask',u'version': u'0.12.1'}```
Package: daeploy
DaeployDaeploy is a software deployment tool that is perfect for smaller applications where Time-to-Market and ease of use is more important than scalability to tens of thousands of users and requests.Daeploy strives to make writing and deploying services (small applications) as quick and easy as possible without requiring much, or any, prior knowledge and experience. We want Data Scientists and Algorithm Engineers to spend their time doing what they love and less time writing Flask API:s and dockerfiles.You can find the documentation here:vikinganalytics.github.io/daeploy-docs/Our public issue tracker can be found here:github.com/vikinganalytics/daeploy-issues/projects/1For more information, visitdaeply.comor contact us oninfo@daeploy.com
Package: daepy
DAEpyDAEpy is a Python library for solving boundary value problems of differential algebraic equations with advanced and retarded (forward and backward) delays. It also contains routines for parameter continuation. The numerical method is based on collocation. This library was developed in theLaboratory for Computation and Visualization in Mathematics and MechanicsatEPFL.InstallationDAEpy can be installed using pippip install daepyIt is recommended, but not necessary, to also install scikit-umfpack which contains a routine for solving sparse linear systems.pip install scikit-umfpackDocumentationDocumentationis available online, includingbasic usageand someexamples.
Package: daexy
daexyThis is a simple proxy program to system init scriptsIt has been designed to be used together with supervisord to launch
daemons handling signals their own way, using their init script.HowToGetting startedSimply rundaexy-i/etc/init.d/couchdbThen -/etc/init.d/couchdb startwill be called at program startup -SIGINTandSIGTERMwill cause a call to/etc/init.d/couchdb stop-SIG_IGNandSIGHUPwill cause a
call to/etc/init.d/couchdb reloadCustomize actionsAdd--<SignalName>=<Action>option to map any signal to the desired
init action.Adding an option of--SIG_IGN=gracefulto the previous command will
map theSIG_IGNsignal to call/etc/init.d/couchdb graceful
Package: dafact
dafactEncodes data as ASP facts.dafactsolves the reiterative task of encoding a dataset into a set of Answer Set Programming facts. The resulting ASP program, which can be partially personalized, can be encoded aspython clingoobjects directly or as plain text, and it handles floating point numbers automatically.Data can be fed intodafactthrough CSV files,numpyarrays,pandasDataFrames and other typical formats.It can be used both as a python library and as a command line tool.InstallationThe tool is easily installable throughpip:python3 -m pip install dafactShort usageA more detailed usage guide can be found here.PythonDafacterpython class provides all the funcionality. Once fed with data, aDafacterobject provides two main methods for obtaining a logic program:fromdafactimportDafacterdafacter=Dafacter("data/haberman.csv",have_names=True)# Fed data into the objectclingo_facts=dafacter.as_clingo_facts()# Returns a list of clingo.Function objectsprogram_text=dafacter.as_program_string()# Returns the program as plain textThe following piece of code loads thehabermandataset from a csv file and encodes it as a logic program.# examples/usage_csv.pyfromdafactimportDafacterdafacter=Dafacter("data/haberman.csv",have_names=True)print(dafacter.as_program_string())The result of that code would be:feature("age"). feature("op_year"). feature("nodes"). feature("survival").
instance(0). value(0,"age",30). value(0,"op_year",64). value(0,"nodes",1). value(0,"survival",1).
instance(1). value(1,"age",30). value(1,"op_year",62). value(1,"nodes",3). value(1,"survival",1).
(. . .)The encoded style can also be tweaked easily, and it accepts different kind of data sources fromnumpyarrays topandasDataFrames. A more detailed guide on usage of the python library can be found inexamples folder.Command line toolOnce installed throughpipusers can usedafactfor directly obtain a logic program from csv files through the use of thecommand line tool. The usage of the tool is the same to the use of theDafacterpython class for csv files.~/$ dafact --help
usage: dafact [-h] [--feature-names [FEATURE_NAMES [FEATURE_NAMES ...]]] [--factor FACTOR]
              [--numerical-columns [NUMERICAL_COLUMNS [NUMERICAL_COLUMNS ...]]] [--have-names] [--omit-names] [--delimiter DELIMITER]
              infile outfile

Dafact CLI Encodes data as ASP facts.

positional arguments:
  infile                Input csv file.
  outfile               Ouput ASP program.

optional arguments:
  -h, --help            show this help message and exit

Options:
  --feature-names [FEATURE_NAMES [FEATURE_NAMES ...]]
                        Feature names for the csv columns.
  --factor FACTOR       factor help
  --numerical-columns [NUMERICAL_COLUMNS [NUMERICAL_COLUMNS ...]]
                        Indexes for numerical columns.
  --have-names          Must be if csv have the name of the columns in the first line.
  --omit-names          Used together with --have-names for omitting the names in the file.
  --delimiter DELIMITER
                        Field delimiter for the csv file.
Package: daffi-terminals
Daffi TerminalsSimple web based application designed to facilitate the connection to remote terminals.PreviewHow it worksGet startedInstall this app, run commandpip install daffi-terminalsStart a router, run commanddterm start-router --rpc-host=0.0.0.0 --rpc-port=9999 --web-host=0.0.0.0 --web-port=8888Connect worker to router, run commanddterm start-worker --rpc-host=0.0.0.0 --rpc-port=9999(you can connect as many workers as you want)Navigatehttp://localhost:8888in your browserstart-routerargumentsArgumentDescriptionRequired--rpc-hosthost for communication between router and workersYes--rpc-portport for communication between router and workersYes--web-hosthost for serving web serverYes--web-portport for serving web serverYes--ssl-certssl certificate for connection encryption between router and workersNo--ssl-keyssl key for connection encryption between router and workersNostart-workerargumentsArgumentDescriptionRequired--rpc-hostrouter rpc hostYes--rpc-portrouter rpc portYes--nameworker name. This name must be unique across all workers. If not provided then random name will be assignedNo--ssl-certssl certificate for connection encryption between router and workersNo--ssl-keyssl key for connection encryption between router and workersNo
Package: dafits
da-fitsRead/write FITS files to/from Dask Arrays. Currently a very simple implementation.NOTE: Astropy can't write from a Dask array to FITS in parallel (see#11159). As a workaround, I write to a temporary Zarr file (which supports parallel write), and then copy to a FITS file in serial. Keep this in mind for very large files!Inspired by:https://github.com/sunpy/sunpy/issues/2715https://github.com/ska-sa/xarray-fitsInstallationInstall from PyPipip install dafitsOr, from GitHub:pip install git+https://github.com/AlecThomson/da-fits.gitExample usageimportdafits# See doctstringhelp(dafits.read)# Help on function read in module dafits.core:# read(file: str, ext=0, memmap=True, mode='denywrite', chunks='auto', return_header=False) -> Tuple[dask.array.core.Array, Optional[Dict]]#     Read FITS file to DataArray.#     Args:#         file (str): FITS file to read.#         ext (int, optional): FITS extension to read. Defaults to 0.#         memmap (bool, optional): Use memmap. Defaults to True.#         mode (str, optional): Read mode. Defaults to "denywrite".#         chunks (str, optional): Dask array chunks. Defaults to "auto".#         return_header (bool, optional): Optionally return the FITS header. Defaults to False.#     Returns:#         typing.Tuple[da.Array, typing.Optional[typing.Dict]]: DataArray and (optionally) FITS header.# Read a file with headerdata,header=dafits.read('/path/to/file.fits',return_header=True)# Get data in memorydata.compute()# Do some kind of mathsnew_data=data.mean(axis=0)# Write to disk (via Zarr)# See doctstringhelp(dafits.write)# Help on function write in module dafits.core:# write(file: str, data: dask.array.core.Array, header=None, verbose=True, **kwargs) -> None#     Write DataArray to FITS file (via Zarr).#     Args:#         file (str): Output filename.#         data (da.Array): Input data.#         header (header, optional): FITS header. Defaults to None.#         verbose (bool, optional): Verbose output. Defaults to True.#         **kwargs: Additional keyword arguments passed onto fits.writeto.dafits.write('/path/to/new_file.fits',new_data,header=header,overwrite=True)
Package: daflsim
TheDAta FLow SIMulator- DAFLSIM (“daffle sim”) simulates the flow
of data given a data-flow diagram.It requires Python 3.4.You provide a dataflow-diagram (ingraphvizformat) The diagram must be annotated with a few special values in the graphviz “tooltip” attribute.  Thedaflsimprogram reads the diagram and runs a Descrete Event Simulation on it.Try these examples:dfsim.py –summarize end  –profile tests/graphviz-sample1.dot
dfsim.py –summarize NSA  tests/sdm-dci-dataflow.dot
dfsim.py –summarize NSA –summarize NOWHERE1 –profile tests/sdm-dci-dataflow.dotQuick test, execute:./tests/smoke.sh
Package: dafne
DafneDeep Anatomical Federated Network is a program for the segmentation of medical images. It relies on a server to provide deep learning models to aid the segmentation, and incremental learning is used to improve the performance. Seehttps://www.dafne.network/for documentation and user information.Windows binary installationPlease install the Visual Studio Redistributable Package under windows:https://aka.ms/vs/16/release/vc_redist.x64.exeThen, run the provided installerMac binary installationInstall the Dafne App from the downloaded .dmg file as usual. Make sure to download the archive appropriate for your architecture (x86 or arm).Linux binary installationThe Linux distribution is a self-contained executable file. Simply download it, make it executable, and run it.pip installationDafne can also be installed with pippip install dafneCitingIf you are writing a scientific paper, and you used Dafne for your data evaluation, please cite the following paper:Santini F, Wasserthal J, Agosti A, et al.Deep Anatomical Federated Network (Dafne): an open client/server framework for the continuous collaborative improvement of deep-learning-based medical image segmentation. 2023 doi:10.48550/arXiv.2302.06352.Notes for developersdafneRun:python dafne.py <path_to_dicom_img>Notes for the DL modelsApply functionsThe input of the apply function is:dict({
    'image': np.array (2D image)
    'resolution': sequence with two elements (image resolution in mm)
    'split_laterality': True/False (indicates whether the ROIs should be split in L/R if applicable)
    'classification': str - The classification tag of the image (optional, to identify model variants)
})The output of the classifier is a string.
The output of the segmenters is:dict({
    roi_name_1: np.array (2D mask),
    roi_name_2: ...
})Incremental learn functionsThe input of the incremental learn functions are:training data: dict({
    'resolution': sequence (see above)
    'classification': str (see above)
    'image_list': list([
        - np.array (2D image)
        - np.array (2D image)
        - ...
    ])
})

training outputs: list([
    - dict({
        roi_name_1: np.array (2D mask)
        roi_name_2: ...
    })
    - dict...Every entry in the training outputs list corresponds to an entry in the image_list inside the training data.
Solen(training_data['image_list']) == len(training_outputs).AcknowledgmentsInput/Output is based onDOSMA- GPLv3 licenseThis software includes theSegment Anything Model (SAM)- Apache 2.0 licenseOther packages required for this project are listed in requirements.txt
Package: dafni-cli
The DAFNI CLIIntroductionThis package provides a command line interface for theDAFNI platform.Installation and basic usageWith python andpipinstalled and available on the command line use the following to install the CLI.pipinstalldafni-cliOnce installed all commands will be accessible viadafni. For example you can usedafni--helpto view a list of all of the available sub commands. Use--helpon any unfamiliar command to receive more information about it.For further documentation on usagesee the page here.