Saravanan666/pypi-org huggingface dataset:
Package: atomically
atomically[!NOTE]
This library is for experimenting and prototyping at this point and may change considerably until it reaches version 1.0.0. Please be cautious about relying on this library at this point.Write the smallest possible OpenAPI and generate the rest. Read more about this approach in theAtomically repository.InstallationYou can use pipx to install this tool.You can usepipxto install this tool.Install pipxRunpipx install atomicallyYou can also usepip:pipinstallatomicallyUsageAs CLIRunatomically --helpto see all options.To generate an OpenAPI from from an atomic file, run:atomicallygeneratepath-to-atomic-file.ymlRead theAtomically repositoryto see how to write atomic files. Check thetests/atomic_filesdirectory in this repo to see examples.As Python libraryfromatomicallyimportAtomicallyopenapi=Atomically.from_file("atomically.yaml").generate()withopen("openapi.yaml","w")asf:f.write(openapi.to_yaml())DevelopmentTo contribute to this library, first checkout the code. Then create a new virtual environment:cdatomically
python-mvenvvenvsourcevenv/bin/activateNow install the dependencies and test dependencies:pipinstall-e'.[test]'To run the tests:pytest
Package: atomicapp-builder
Atomicapp Builder=================An application to build application images from [Nulecule](https://github.com/projectatomic/nulecule).Usage:```atomicapp-builder build [-h] [--cccp-index CCCP_INDEX][--build-image BUILD_IMAGE][--docker-registry DOCKER_REGISTRY][--registry-insecure] [-q | -v]PATH | cccp:<app-id>positional arguments:PATH | cccp:<app-id>  Path to directory with Nulecule file to build or app id prefixed by "cccp:"optional arguments:-h, --help            show this help message and exit--cccp-index CCCP_INDEXURI of raw cccp index file (can be file:// for local file), defaults tohttps://raw.githubusercontent.com/kbsingh/cccp-index/master/index.yml--build-image BUILD_IMAGEName of image that Dock should use to build images (defaults to "buildroot")--docker-registry DOCKER_REGISTRYURL of Docker registry to poll for existing images andpush built images to. Must be without http/httpsscheme.--registry-insecure   If used, plain http will be used to connect toregistry instead of https-q, --quiet           Only output names of built images after build is done-v, --verbose         Print lots of debugging information```Requires `anymarkup`, `requests` and `dock`. You can get the first two just by typing`pip install --user -r requirements.txt` and you can get `dock` fromhttps://github.com/DBuildService/dock. This also requires `dock`'s build image. Youcan either get one by `docker pull slavek/buildroot` or build one yourself.You can get stable versions from PyPI by using```pip install --user --process-dependency-links atomicapp-builder```Note: you *must* use `--process-dependency-links` so that pip installs the correct `dock` package.
Package: atomic-cloud
Atomic CloudThis is a Python Library intended to simplify interactions with different cloud environments.AWS Design ApproachFor AWS, we are using CloudFormation to define and build the various resources.  It is a convenient mechanism because we can then delete those resources conveniently by deleting
the stacks that were created with CloudFormation.The vast majority of this library will consist of querying what resources exist in AWS.It is just easier to do query, filter and extract data using Python rather than using the
command line interface.Getting StartedThe complete documentation can be found here:http://atomic-cloud.docs.simoncomputing.com/.  You can follow the links at the bottom left of each page to step through all the features.
Package: atomic-counter
Atomic CounterOverviewatomic-counteris a rust library for generating a monotonically increasing sequence of integers. Depending on the particular configuration of the counter, the generated sequence will be produce unique numbers down to the nanosecond, regardless of memory state.
E.g. if you quit the process and recreate a new counter>1nslater, your sequence is guaranteed to still be monotonically increasing (but with a gap).Usagefromatomic_counterimportCounterc=Counter(offset_in_nanos,base_in_nanos)c.next()# generate next number in sequenceHere,baseis the counter's0value (e.g. a epoch in nanos to consider the0point, to keep numbers as small as possible if you do not need to go back to 1970).offsetis the number of nanos sincebaseat which to start.If unset,basewill be2010-01-01in nanos,offsetwill be0, which means the counter will start at(now - 2010/01/01) as nanos.To create e.g. a daily counter, pass inbase=today in nanos. As this is a common occurrence for sequences that reset daily, a convenience functiondef daily() -> Counter:is provided.
Package: atomicdataMB
Atomicdata functions for nexoclom and general usePackage ContentsDocumentation athttps://atomicdatamb.readthedocs.io/en/latest/.Installation>>> pip install atomicdataMBLicenseThis project is Copyright (c) Matthew Burger and licensed under
the terms of the BSD 3-Clause license. This package is based upon
theAstropy package templatewhich is licensed under the BSD 3-clause licence. See the licenses folder for
more information.ContributingWe love contributions! atomicdataMB is open source,
built on open source, and we’d love to have you hang out in our community.Imposter syndrome disclaimer: We want your help. No, really.There may be a little voice inside your head that is telling you that you’re not
ready to be an open source contributor; that your skills aren’t nearly good
enough to contribute. What could you possibly offer a project like this one?We assure you - the little voice in your head is wrong. If you can write code at
all, you can contribute code to open source. Contributing to open source
projects is a fantastic way to advance one’s coding skills. Writing perfect code
isn’t the measure of a good developer (that would disqualify all of us!); it’s
trying to create something, making mistakes, and learning from those
mistakes. That’s how we all improve, and we are happy to help others learn.Being an open source contributor doesn’t just mean writing code, either. You can
help out by writing documentation, tests, or even giving feedback about the
project (and yes - that includes giving feedback about the contribution
process). Some of these contributions may be the most valuable to the project as
a whole, because you’re coming to the project with fresh eyes, so you can see
the errors and assumptions that seasoned contributors have glossed over.Note: This disclaimer was originally written byAdrienne Lowefor aPyCon talk, and was adapted by
atomicdataMB based on its use in the README file for theMetPy project.
Package: atomicfile
Writeable file object that atomically updates a file.All writes will go to a temporary file. Callclose()explicitly when you are done writing, and AtomicFile will rename the temporary copy to the original name, making the changes visible. If the object is destroyed without being closed, all your writes are discarded.AtomicFile is friendly towithstatement.from atomicfile import AtomicFile

with AtomicFile("panic.txt", "w") as f:
    f.write(json.dumps(big_data_array_100MB, sort_keys=True, indent=4))InstallTo install AtomicFile, simply:pip install atomicfile
Package: atomicity
atomicityAtomicity is a simple library that provides atomic operation to python's synchronization primitives used in multi-threading application.*** Note: This is at a very early stage and is subject to changes.  Use at your own risk. ***It includes an atomic lock and counter class, ensuring (somewhat) thread-safety and prevention of race conditions in concurrent programming.
Everything is entirely lock-free and is backed by Rust's atomic types.FeaturesTBDInstallationBinary wheels are provided for Python 3.8 and above on Linux, macOS, and Windows:pipinstallatomicityOn Windows systems, TheLLVM Compiler Infrastructureis requiredUsageSee thedocumentationfor more information. Here's a quick overview:Atomic CounterfromatomicityimportAtomicCounter# Create an atomic integer with an initial value of 0atom=AtomicCounter()# Perform atomic operationsatom.set(10)value=atom.get()print(f"Value:{value}")previous_value=atom.add(20)print(f"Previous Value:{previous_value}")atom.sub(5)print(f"Result after addition:{atom}")# Increment and decrement operationsatom.increment()atom.decrement()Atomic LockfromatomicityimportAtomicLock# Create an atomic boolean with an initial value of Falseatom=AtomicLock(False)# Perform atomic operationsatom.store(True)value=atom.acquire()previous_value=atom.release()LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.AcknowledgmentsTheatomicitylibrary is heavily dependent on and inspired by the Ruststd::sync::atomicmodule.
Package: atomic-lines
Atomic-LinesIntroA toy project, wrapping asynchronous one byte readers into a sane(?) readline semantic.
If no end of line is found the request is considered timedout, and the data is kept in the buffer,
otherwise lines are returned (without the EOL character) for further processing.The main goal is to help wrap i.e. serial access or other apis which consume data if readline times out.For more userfriendly documentation seehttps://maltevesper.github.io/atomiclines/.Logging configurationLogging can be configured by pointing the environment variableATOMICLINES_LOG_CONFIGto a yaml file.ATOMICLINES_LOG_CONFIG=logging_configuration.yaml pytestThe yaml file, should contain a logging dict. Example file:version: 1
disable_existing_loggers: true

formatters:
    standard:
        format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
    error:
        format: "%(levelname)s <PID %(process)d:%(processName)s> %(name)s.%(funcName)s(): %(message)s"

handlers:
    console:
        class: logging.StreamHandler
        level: DEBUG
        formatter: standard
        stream: ext://sys.stdout

loggers:
    atomiclines:
        level: INFO
        handlers: [console]
        propogate: noFor DevelopersBash Completion for pytestpip install argcomplete # is a dev dependency too
activate-global-python-argcomplete
Package: atomiclong
Sometimes you need to increment some numbers
… atomically
… in python.AtomicLongwas born out of the need for fast thread-safe counters in python.It usesCFFIto bindGCC’s Atomic Builtins.Its value is a Clongwhich can be incremented, decremented, and set
atomically.  It is inspired by Java’sjava.util.concurrent.atomic.AtomicLong.Example:>>> from atomiclong import AtomicLong
>>> a = AtomicLong(0)
>>> a += 1
>>> a.value
1
>>> a += 10
>>> a.value
11
>>> a.value = 1000
>>> a.value
1000
>>> a -= 100
>>> a.value
900
Package: atomicloop
show example|jump to docsCreate atomic loop iterations (let the current iteration finish even when interrupted).A simple context manager that asynchronously listens to potentialSIGINTandSIGTERMand provides you withplain boolean flagthat can be
used to control the iteration flow of awhileloop based on whether or not
an interrupt/terminate signal was received.This was formerly built for reinforcement learning library that trains its agents
in iterations and has to gracefully finish the current running episode every time
the training is interrupted.It will be most useful in similar use cases, but can be actually used for anything
else. Technically, any block of code that needs to run without an interruption.Note that you will still be able to kill the running process usingSIGKILL.Getting Startedpip3installatomicloopThe following example loop runs 3 iterations, each lasting three seconds.
You can try interrupting one of the steps by pressingCtrl+C(which sendsSIGINTto the process). You will see the signal feedback but the program
will wait for the current iteration to finish and exitsafterthe loop
iteration is done.Moreover, you can see the context manager is aware whether or not it finished
due to an interruption.importtimefromatomicloopimportAtomicLoop# Optional callback handlers ----------------------------------------defon_signal(signal,frame):print(f'  Received signal:{signal}')print('  Finishing current step before terminating')defon_exit(was_interrupted):print('  Ended training')print(f'  Interrupted?{was_interrupted}')# Running the loop --------------------------------------------------goal_steps=3withAtomicLoop(on_signal,on_exit)asloop:step_no=0whileloop.runandstep_no<goal_steps:print(f'Starting training step #{step_no}')time.sleep(3)# simulating some code executionprint(f'Finished training step #{step_no}')print('----------------------------------\n')step_no+=1Documentationatomicloop.AtomicLoop(on_signal=None, on_end=None)The main and only class that creates the desired context manager.on_signalis a callable that gets invoked on incomingSIGINTorSIGTERM. It is called with 2 arguments:
the signal number and the current stack frame. For details
on the arguments, please consulthandlerpart inofficial signal.signal documentation.on_endis a callable that gets invokedafterexiting
the context (afterwithblock). It is called with
a single boolean argument stating whether or not the
execution was interrupted.AtomicLoop()returns a new instance. To access the boolean
flag for flow control, you have to read the flag as the instance’s
attribute.The.runboolean flag states whether or not the program should
continue its execution. It isTrueby default and switches toFalsewhen an interruption signal was received.You can also use one of many synonymous attributes:loop.runloop.looploop.moveloop.contloop.keeploop.keep_goingloop.uninterrupted
Package: atomic-loop-pkg-test
Atomic loop pkg testThis is a beta phase project package demonstrating how to create and publish a python module to pypi.How to Download the package ?download the package usingpipinstallatomic-loop-pkg-testHow to import the package ?To import the package :For ex.fromatomic_loop_pkg_testimportfunctions# create instance for the class and then specify the value of the n1 and n2 to perform the values# i is the instancei=functions.MathFunctions(3,2)result=i.sum()print(result)Thank You !!
Package: atomic-operator-art
atomic-operator Atomic Red TeamFeaturesTODORequirementsTODOInstallationYou can installatomic-operator Atomic Red TeamviapipfromPyPI:$pipinstallatomic-operator-artUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,atomic-operator Atomic Red Teamis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: atomic-queue
atomic-queueA thread-safe, lock-free queue implementation based on the LMAX Disruptor, with crititcal parts written in C++.This queue supports multiple producers and consumers. Producers are responsible for managing their own threads,
while consumer threads are managed by the queue and are required to implement the EventHandler interface.ExampleInitialise an atomic queue instance with the buffer capacity and a wait strategy. The buffer capacity must be a power of 2 integer.from atomicqueue import AtomicQueue, BUSY_SPIN_WAIT_STRATEGY

queue = AtomicQueue(256, wait_strategy=BUSY_SPIN_WAIT_STRATEGY)Define how the events will be consumed. In the example below event handler "h_one" and "h_two" can overrun each other but can not overrun the publishers, while event handler "h_three" can only consume events after "h_one" and "h_two" have finished consuming them.queue.handle_events_with(NoOpEventHandler("h_one"), NoOpEventHandler("h_two")).then(NoOpEventHandler("h_three"))Once configured the queue can be started with the following command.queue.start()To publish to the queue, simply call publish_event on the queue.queue.publish_event(event)Stop the queue by calling stop().queue.stop()
Package: atomic-red-team
atomic_red_teamThis python package is used to execute Atomic Red Team tests (Atomics) across multiple operating system environments.Getting StartedTODOPrerequisitesWhat things you need to install the software and how to install themGive examplesInstallingA step by step series of examples that tell you how to get a development env runningSay what the step will beGive the exampleAnd repeatuntil finishedEnd with an example of getting some data out of the system or using it for a little demoRunning the testsExplain how to run the automated tests for this systemBreak down into end to end testsExplain what these tests test and whyGive an exampleAnd coding style testsExplain what these tests test and whyGive an exampleDeploymentAdd additional notes about how to deploy this on a live systemBuilt Withcarcass- Python packaging templateContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.VersioningWe useSemVerfor versioning.AuthorsJosh Rickard -Initial work-MSAdministratorSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsAcknowledgmentsHat tip to anyone whose code was usedInspirationetc
Package: atomic-sequence
Atomic SequenceA lock-free, thread-safe sequence/counter which uses the C++ atomic library under the hood. This gives a ~5-10x speed up compared to threading locks.Installpip install atomic-sequenceUsagefromatomicsequenceimportSequencesequence=AtomicSequence(0)# set current sequence value to 1sequence.set(1)# get current valuevalue=sequence.get()# increment the sequence value and get the new valuevalue=sequence.increment_and_get(1)# increment the sequence value and get the value directly preceding the operationvalue=sequence.get_and_increment(1)TestingTo run unittests and benchmarks use tox:pipenv install --dev
pipenv run tox
Package: atomicswap
Atomic file swappingSadly, this is not a nuclear-powered utility to swap files.atomicswapis a Python module that implements the swapping of two files on a filesystem
in a single operation that can't be broken up; either the entire operation
completes correctly or none of it completes. This prevents the filesystem
from being left in an inconsistent state and avoids certain race conditions.The API is very simple; only a singleswap()function is provided.  The
function takes two file paths for the two files to be swapped. In the event
that either path is a relative path, you may also provide file descriptors
for directories that the relative paths should start from; if either is
missing then the path is relative to the current working directory. Paths
can be provided either as Python strings orpathlibpaths.InstallationThe latest stable version ofatomicswapcan be installed from thePython
Package Indexusingpipin the normal manner:pip install atomicswapIf you want to try out the latest code then you can install it from the
GitHub repository:pip install atomicswap@git+https://github.com/nickovs/atomicswap.gitExampleSwapping the files/etc/something/activeand/etc/something/standbyin
a single operation can be performed as follows:fromatomicswapimportswap...swap("/etc/something/active","/etc/something/standby")Alternatively, if usingPathobjects, this could be implemented as:frompathlibimportPathfromatomicswapimportswap...base_dir=Path("/etc/something")swap(base_dir/"active",base_dir/"standby")Platform supportCurrentlyatomicswapsupports Linux, macOS and Windows. Note that the Windows
implementation does not support specifying the base directories for relative paths
using directory file descriptors.DependenciesOn both macOS and Linuxatomicswapis not dependent on any non-standard
libraries or third party packages. On Windows it requirespywin32.Implementation detailsBoth Linux and macOS have kernel system calls that provide the simultaneous,
atomic swapping of the names of two files. On Linux the system call is namedrenameat2while on macOS it is namedrenameatx_np, but the operation is
much the same: passing a specific flag to the extended version of the rename
function causes it to swap the names of two existing files rather than just
changing the name of one file. On macOS therenameatx_npis exposed in the
standard C library and can be called directly. Not all Linux distributions expose
therenameat2system call in their C library so thesyscallwrapper function
is used instead.While there is no equivalent single function to perform the same operation on
Windows, it is possible to perform an atomic swap operation using the WindowsKernel Transaction ManagerandTransactional NTFS.
Unfortunately Microsoft have stated that"TxF may not be available in future versions of
Microsoft Windows", which potentially limits the utility of this sort of
implementation.Licenseatomicswapis released under the MIT license. See LICENSE.md for details.
Package: atomict
Atomic Tessellator - CLI packageInstallationpip install atomictCLI Usage# Show available public datasets

    > at list_datasets

# Download a dataset

    > at download_dataset tox21SDK Usagefrom atomict.datasets import get

df = get('tox21')RoadmapCLIDownload Public DatasetsLocal dataset cachingAuthenticationReality Server API endpoints - Simulations
Package: atomic-weights
py-atomic-weights: Python Module for Standard atomic weights of the elementsFeaturesIUPAC Atomic Weightsinfloatanddecimal.DecimalformatsUsagepip install atomic-weights>>>importatomic_weightsasatw>>>print(atw.Fe)55.845>>>print(atw.decimal.Fe)55.845>>>type(atw.Fe)<class'float'>>>>type(atw.decimal.Fe)<class'decimal.Decimal'>
Package: atomicx
atomicxatomicx is an easy-to-use atomics library for Python, providing atomic integer and boolean operations. It allows you to perform atomic operations on shared variables, ensuring thread-safety and preventing race conditions in concurrent programming. Everything is entirely lock-free and is backed by Rust's atomic types.FeaturesAtomic integer operations: load, store, add, subtract, swap, compare and exchange, multiply, divide, increment, decrement.Atomic boolean operations: load, store, swap, compare and exchange, flip.InstallationBinary wheels are provided for Python 3.7 and above on Linux, macOS, and Windows:pipinstallatomicxUsageSee thedocumentationfor more information. Here's a quick overview:Atomic IntegerfromatomicximportAtomicInt# Create an atomic integer with an initial value of 0atom=AtomicInt()# Perform atomic operationsatom.store(10)value=atom.load()print(f"Value:{value}")previous_value=atom.swap(20)print(f"Previous Value:{previous_value}")atom.add(5)print(f"Result after addition:{atom}")# Increment and decrement operationsatom.inc()atom.dec()Atomic BooleanfromatomicximportAtomicBool# Create an atomic boolean with an initial value of Falseatom=AtomicBool()# Perform atomic operationsatom.store(True)value=atom.load()print(f"Value:{value}")previous_value=atom.swap(False)print(f"Previous Value:{previous_value}")result=atom.compare_exchange(False,True)print(f"Swap Result:{result}")# Flip the value of the atomic booleanatom.flip()LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.AcknowledgmentsTheatomicxlibrary is heavily dependent on and inspired by the Ruststd::sync::atomicmodule.