Saravanan666/pypi-org huggingface dataset:
Package: train-track
Free group automorphisms and train-track representatives in python/sage.This is a Sage optional package. It contains code to handle free group
automorphisms (inversion, composition, etc.) and to compute
train-track representatives (absolute and relative, stable and
unstable) as defined by Bestvina and Handel. This includes the
computation of Nielsen paths and indices of iwip automorphisms and
much more. Convex cores of pairs of tree as defined by Guirardel also
appear.Installation:sage -pip install train_trackWarning: it seems that Mac OS X 10.13 and later has a security
conflict between SIP and SSL and does not succeed in downloading the
package fromhttps://pypi.python.org. To overcome this difficulty,
just download the tarball train_track-0.1.4.tar.gz fromhttps://pypi.python.org/simple/train_trackand run:sage -pip install /path/to/train_track-0.1.4.tar.gzWarning: if you lack intstallation privilege, you can install only for
yourself:sage -pip install --user train_trackOn Cocalc.com installation can be done either from a terminal as above
or from a cell:!sage -pip install train_trackWarning, Cocalc free accounts do not have access to internet, first
download the tarball then install.Usage:sage: from train_track import *After this command, you can play with free groups and their automorphisms:sage: FreeGroup('a,b,c')
Free Group on generators {a, b, c}
sage: FreeGroupAutomorphism('a->bCb,b->Bc,c->BcBa')
Automorphism of the Free Group on generators {a, b, c}: a->a*b,b->a*c,c->a
sage: free_group_automorphisms.Cohen_Lustig_1_6()
Automorphism of the Free Group on generators {a, b, c}: a->c^3*a*c^-3,b->c^-1*a*c^2*a^-1*b*c^-1,c->a*c^2*a^-1*b*c^2*a*c^-2*b^-1*a*c^-2*a^-1*c^4*a^-1*c^-3
Package: train-unet
Train UnetAim is to create a low-code easy to use python library for training CNN models using Unet architecture with custom metrics like IoU (Intersection over Union) for semantic segmentation of medical images/scans.Applications in Medical ImagingMany medical applications necessitates finding and accurately labeling things found in medical scans.This is often done using advanced software to assist medical technicians and doctos. However, this task still requires human intervention and such as, can be tedious,slow, expensive and prone to human error.There's huge initiative for use Computer Vision and Deep Learning to automate many of these tasks.Analyzing medical scans such asCAT scansX-raysUltra soundPETNMRU-net  - Image segmentation using CNN's.U-net has become very popular end-to-end encoder-decoder network for Semantic segmentation.It has a unique Up-down archtiecture which has a contracting path and an expansive path.U-NET archtiectURE:U-NET Structure:Intersection over union(IoU) metricsIoU is basically a measure of overlap.IoU = ^Size_of_union/_Size of IntersectionTypically IoU over 0.5 is acceptable.higher the IoU better the prediction.Installation and UsageGet the required packagesgit clone https://github.com/iamlmn/train-unet.git
cd train-unet
pip install -r requirements.txtor get the dependencies installedpandas
keras==2.2.4
tensorflow==1.13.1
numpy
spicy
scikit-image
tqdm
docoptInstall train_unet using pippip install train-unetTraining sets & test sets (.png) are expected to be in the below folder format.Input struct on single train and test set:Sameple dataset is in data folder. Finding the nuclei in Divergent images. #Spot Nuclei. Speed Cures. (The Kaggle Data Science bowl 2018 Challenge).use it from Python:# Configure training target imagesfromtrain_unetimportTrainUnet# set image/mask sizesIMG_WIDTH=128IMG_HEIGHT=128IMG_CHANNELS=3TRAIN_PATH='../data/U_NET/train/'TEST_PATH='../data/U_NET/validation/'MODEL_OUTPUT_PATH='py_model.h5'# Training and predictionunet_test=TrainUnet(TRAIN_PATH,TEST_PATH,IMG_HEIGHT,IMG_WIDTH,IMG_CHANNELS,MODEL_OUTPUT_PATH)# Create Unet objectX_train,Y_train=unet_test.resize_training_sets(combine_masks=True)# prep training dataX_test=unet_test.resize_target_sets()# prep Target setsunet_test.train_illustrate()# exports every 10th training and masked images - illustratesmodel_path=unet_test.train_model()# Traingpreds_train,preds_val,preds_test=unet_test.load_and_predict()# predictunet_test.plot_random_comparisons(preds_train_t,preds_val_t,preds_test,_save=True)# comparison plots on random imagesunet_test.classification_report(ix=25)TODOs and completed work :Base module classPypi setupdeploying to AWS as a Lambda serviceIdeate Model parameeter modification3d Segmentations?Unit tests
Package: trainy
Trainy on-demand profilerThis is the trainy CLI and daemon to setup on demand tracing for PyTorch in pure Python. This will allow you to extract traces in the middle of training.InstallationYou can either install from pypi or from source# install from pypi
pip install trainy

# install from source
git clone https://github.com/Trainy-ai/trainy
pip install -e trainyQuickstartIf you haven't already, set up ray head and worker nodes. This can configured to happen automatically using (Skypilot)[https://skypilot.readthedocs.io/en/latest/index.html] or K8s# on the head node 
$ ray start --head --port 6380

# on the worker nodes
$ ray start --address ${HEAD_IP}In your train code, initialize the trainy daemon before running your train loop.import trainy
trainy.init()
Trainer.train()While your model is training, to capture traces on all the nodes, run$ trainy trace --logdir ~/my-tracesThis saves the traces for each process locally into~/my-traces. It's recommended
you run a shared file system like NFS or an s3 backed store so that all of your traces
are in the same place. An example of how to do this and scale this up is under theexamples/resnet_mniston AWSHow It WorksTrainy registers a hook into whatever PyTorch optimizer is present in your code,
to count the optimizer iterations and registers the program with the head ray node.
A separate HTTP server daemon thread is run concurrently, which waits for a trigger
POST request to start profiling.Need helpWe offer support for both setting up trainy and analyzing program traces. If you are interested,
pleaseemail us
Package: traisms
TRAI SMS Template ReplacerReplace content in the TRAI SMS template with ease using this Python package. This library is designed to simplify the process of replacing placeholders in a TRAI SMS template with actual values. It's particularly useful for bulk SMS generation where you need to personalize messages based on dynamic data.InstallationYou can install thetraismslibrary using pip:pipinstalltraismsUsageTo get started, import the library and create an instance of theSMSTemplateclass:fromtraismsimportSMSTemplatetemplate='Hi,%%|name^{"inputtype" : "text", "maxlength" : "8"}%%has checked out at%%|time^{"inputtype" : "number", "maxlength" : "6"}%%PM from%%|place^{"inputtype" : "text", "maxlength" : "64"}%%'values=["Alice","2","Taj Hotel"]Then, simply replace the placeholders in the template with the provided values using thereplacemethod:try:result=SMSTemplate.replace(template,values)print(result)exceptExceptionase:print(e)Thereplacemethod will return the updated template with the values substituted in place of the placeholders. If there are any validation errors, the library will raise relevant exceptions:Invalid Template Error: This error is raised if a placeholder in the template is not valid.Invalid Number Found: This error is raised if a placeholder expects a numeric value but a non-numeric value is provided.Exceeded Max Length: This error is raised if a placeholder value exceeds its specified maximum length.Example Error Handling:# Output:# Invalid Number Found: Can not replace "1233" expecting numeric value# or# Output:# Exceeded Max Length: Can not replace "Alice" exceeding max length of 8Template SyntaxThe template follows a specific syntax for placeholders, which are enclosed within double percentage signs (e.g.,%%). Each placeholder should have the following format:%%|name^{"inputtype" : "text", "maxlength" : "8"}%%name: Placeholder ID{"inputtype" : "text", "maxlength" : "8"}: Placeholder attributes (optional)You can customize the placeholder attributes as needed.FeaturesEasy replacement of placeholders in TRAI SMS templates.Support for dynamic values provided in a list.Customizable placeholder attributes for flexibility.Validation and error handling for template placeholders.Suitable for bulk SMS generation and personalization.LicenseThis library is provided under theApache License 2.0.ContributionsContributions and feedback are welcome! If you encounter any issues or have suggestions for improvements, pleaseopen an issueor submit a pull request.Note: This library is not affiliated with TRAI (Telecom Regulatory Authority of India) but is designed to assist in formatting SMS messages according to TRAI guidelines.Happy SMS templating! 📱✉️
Package: trait_documenter
Trait-Documenter is an autodoc extension to allow trait definitions to be
properly rendered in sphinx.InstallationDevelopment versions can be found athttps://github.com/enthought/trait-documenter.The package requires a recent version ofsphinx,traitsandastorto function properly.UsageAdd the trait-documenter to the extensions variable in yourconf.py:extensions.append('trait_documenter')WarningUsing the TraitDocumenter in conjunction with the TraitsDoc package
is not advised.ExampleA class trait with a docstring:from traits.api import HasTraits, Float

class MyClass(HasTraits):

    #: A float number.
    number = Float(2.0)Will be rendered as:.. py:attribute:: number
   :annotation: = Float(2.0)

   A float number.
Package: traitlets-paths
traitlets_pathsTraitlets module for pathlibThis package definestraitletsfor all pathlib objects.Getting StartedInstall from pip:pip install traitlets_pathsBasic ExamplefromtraitletsimportHasTraits,defaultfromtraitlets_pathsimportPurePathclassFoo(HasTraits):path=PurePath()@default('path')def_default_path(self):return'path/to/foo'foo=Foo()foo.path# On Posix systems
PurePosixPath('path/to/foo')

# or on Windows systems
PureWindowsPath('path/to/foo')How to get a TraitErrorWhen we try passing a bad type:foo = Foo(path=5)we get a TraitError:TraitError: The 'path' trait of a Foo instance must be a pathlib.PurePath trait, but a value of 5 <class 'int'> was specified.DevelopingDownload and install this repo from source, and move into the base directory.git clone https://github.com/Zsailer/traitlets_paths
cd traitlets_pathsIf you usepipenv, you can install a developement version:pipenv install --devOtherwise you can install a development version using pippip install -e .LicensingThe code in this project is licensed under MIT license.
Package: traitlite
[![Build Status](https://travis-ci.org/lejar/traitlite.svg?branch=master)](https://travis-ci.org/lejar/traitlite)# traitliteTraitlite is a light-weight (MIT-licensed) package which provides certain [descriptors](https://docs.python.org/3/howto/descriptor.html) to help control the attributes in a class, such as making them read-only<sup>\*</sup> or providing type-checking whenever the value is set.Here's a quick example that shows what it does, but the documentation has examples for every trait, so check it out!```pythonfrom traitlite import ReadOnly, TypeCheckedclass Foo:bar = TypeChecked(int) + ReadOnly()def __init__(self, bar):self.bar = barFoo(3.0) # Raises exceptionfoo = Foo(3) # Okayfoo.b = 2 # Raises exception because of read-only```<sup>\*</sup> well, as read-only as you can get in python## InstallationThe easiest way to install traitlite is through pip:```bashpip install traitlite```## Running the testsTraitlite uses the builtin python unit testing framework, along with [hypothesis](https://hypothesis.works/). Additionally, [cosmic-ray](https://github.com/sixty-north/cosmic-ray) is used for mutation testing.To install the dependencies required to run the tests, run:```bashpip install -r unittest_requirements.txt```This will install both hypothesis and cosmic-ray.To run the tests, simply execute the following from the package directory:```bashpython setup.py test```To run mutation testing, execute:```bashpython setup.py crtest```If you want to get the [coverage](https://github.com/nedbat/coveragepy) of the tests, execute:```bashpython setup.py coverage```## DocumentationThe docs can be found [here](https://traitlite.readthedocs.io/en/latest/). Alternatively, if you want to build them yourself simply run```bashmake <target>```in the docs folder of the project. To see a list of all the different targets, simply run make without any arguments.
Package: traits
http://docs.enthought.com/traitsThe Traits project is at the center of all Enthought Tool Suite development
and has changed the mental model used at Enthought for programming in the
already extremely efficient Python programming language. We encourage everyone
to join us in enjoying the productivity gains from using such a powerful
approach.The Traits project allows Python programmers to use a special kind of type
definition called atrait, which gives object attributes some additional
characteristics:Initialization: A trait has adefault value, which is
automatically set as the initial value of an attribute before its
first use in a program.Validation: The type of a trait attribute isexplicitly declared. The
type is evident in the code, and only values that meet a
programmer-specified set of criteria (i.e., the trait definition) can
be assigned to that attribute.Delegation: The value of a trait attribute can be contained either
in the defining object or in another objectdelegatedto by the
trait.Notification: Setting the value of a trait attribute cannotifyother parts of the program that the value has changed.Visualization: User interfaces that allow a user tointeractively
modifythe value of a trait attribute can be automatically
constructed using the trait’s definition. (This feature requires that
a supported GUI toolkit be installed. If this feature is not used, the
Traits project does not otherwise require GUI support.)A class can freely mix trait-based attributes with normal Python attributes,
or can opt to allow the use of only a fixed or open set of trait attributes
within the class. Trait attributes defined by a class are automatically
inherited by any subclass derived from the class.DependenciesTraits requires Python >= 3.7.Traits has the following optional dependencies:NumPyto support the trait types
for arrays.TraitsUIto support GUI
Views.To build the full documentation one needs:Sphinxversion 2.1 or later.TheEnthought Sphinx Theme.
(A version of the documentation can be built without this, but
some formatting may be incorrect.)
Package: traitschema
traitschema===========.. image:: https://travis-ci.org/mivade/traitschema.svg?branch=master:target: https://travis-ci.org/mivade/traitschema.. image:: https://readthedocs.org/projects/traitschema/badge/?version=latest:target: http://traitschema.readthedocs.io/en/latest/?badge=latest:alt: Documentation Status.. image:: https://codecov.io/gh/mivade/traitschema/branch/master/graph/badge.svg:target: https://codecov.io/gh/mivade/traitschema.. image:: https://img.shields.io/github/release/mivade/traitschema.svg:target: https://github.com/mivade/traitschemaCreate serializable, type-checked schema using traits_ and Numpy. A typical usecase involves saving several Numpy arrays of varying shape and type... _traits: http://docs.enthought.com/traits/Defining schema---------------.. note::The following assumes a basic familiarity with the ``traits`` package. Seeits `documentation <http://docs.enthought.com/traits/>`_ for details.In order to be able to properly serialize data, non-scalar traits should bedeclared as a ``traits.api.Array`` type. Example:.. code-block:: pythonimport numpy as npfrom traits.api import Array, Stringfrom traitschema import Schemaclass NamedMatrix(Schema):name = String()data = Array(dtype=np.float64)matrix = NamedMatrix(name="name", data=np.random.random((8, 8)))For other demos, see the ``demos`` directory.Saving and loading------------------Data can be stored in the following formats:* HDF5 via ``h5py``* JSON via the standard library ``json`` module* Numpy ``npz`` formatMultiple schema can be saved at once to a zip file via:func:`traitschema.bundle_schema` and loaded with:func:`traitschema.load_bundle`.
Package: traitscli
Traits CLI is based onEnthought’s Traits library.Some benefits:Automatically set type (int/float/…) of command line argument.Help string generation.“Deep value”” configuration:
e.g.,--dict['a']['b']['c']=1is equivalent toobj.dict['a']['b']['c']= 1in Python code.Nested class configuration:
e.g.,--sub.attr=valis equivalent toobj.sub.attr = valin Python code.Parameter file support (ini/conf, json, yaml, etc.).
Load parameter from file then set attribute.LinksDocumentaions (at Read the Docs)Source code repository (at GitHub)Issue tracker (at GitHub)PyPITravis CIInstallationpip install traitscliDependenciestraitsargparse (for Python < 2.7)SampleSource code:from traitscli import TraitsCLIBase
from traits.api import Bool, Float, Int, Str, Enum


class SampleCLI(TraitsCLIBase):

    '''
    Sample CLI using `traitscli`.

    Example::

      %(prog)s --yes                # => obj.yes = True
      %(prog)s --string something   # => obj.string = 'string'
      %(prog)s --choice x           # => raise error (x is not in {a, b, c})

    '''

    # These variables are configurable by command line option
    yes = Bool(desc='yes flag for sample CLI', config=True)
    no = Bool(True, config=True)
    fnum = Float(config=True)
    inum = Int(config=True)
    string = Str(config=True)
    choice = Enum(['a', 'b', 'c'], config=True)

    # You can have "internal" attributes which cannot be set via CLI.
    not_configurable_from_cli = Bool()

    def do_run(self):
        names = self.class_trait_names(config=True)
        width = max(map(len, names))
        for na in names:
            print "{0:{1}} : {2!r}".format(na, width, getattr(self, na))


if __name__ == '__main__':
    # Run command line interface
    SampleCLI.cli()Example run:$ python sample.py --help
usage: sample.py [-h] [--choice {a,b,c}] [--fnum FNUM] [--inum INUM] [--no]
                 [--string STRING] [--yes]

Sample CLI using `traitscli`.

Example::

  sample.py --yes                # => obj.yes = True
  sample.py --string something   # => obj.string = 'string'
  sample.py --choice x           # => raise error (x is not in {a, b, c})

optional arguments:
  -h, --help        show this help message and exit
  --choice {a,b,c}  (default: a)
  --fnum FNUM       (default: 0.0)
  --inum INUM       (default: 0)
  --no              (default: True)
  --string STRING   (default: )
  --yes             yes flag for sample CLI (default: False)

$ python sample.py --yes --choice a
string : ''
no     : True
fnum   : 0.0
choice : 'a'
inum   : 0
yes    : True

$ python sample.py --inum invalid_argument
usage: sample.py [-h] [--choice {a,b,c}] [--fnum FNUM] [--inum INUM] [--no]
                 [--string STRING] [--yes]
sample.py: error: argument --inum: invalid int value: 'invalid_argument'
Package: traits-enaml
traits-enamlTraits-Enaml is an extension library to facilitate interoperation ofEnaml
>=0.8.9and above withTraitsand allow a programmer to drive enaml views
using traits models, enable/chaco components and mayavi 3D scenes.ReferencesEnaml:https://github.com/nucleic/enamlTraits:https://github.com/enthought/traitsEnable:https://github.com/enthought/enableMayavi:https://github.com/enthought/mayaviStatus
Package: traits-futures
Traits Futures allows a TraitsUI-based GUI application to execute one or more
background tasks without blocking the main GUI, and provides a mechanism
for that application tosafelyupdate the GUI in response to full or
partial results from the background tasks.Detailed descriptionGUI applications that want to perform a long-running task in response to user
interactions (for example, running a time-consuming calculation, or submitting
a complex search query to a remote database) face two major issues:If the task is executed directly on the main thread, it blocks the GUI event
loop, making the entire application appear unresponsive to the user.It’s not generally safe to update a GUI directly from a worker thread, so
a task run on a worker thread needs to find a way to safely communicate
events back to the main GUI thread.For TraitsUI-based applications, Traits Futures provides a solution to these
issues, similar in principle to the Python standard libraryconcurrent.futurespackage. Tasks are submitted to an executor, and on task
submission the executor immediately returns a “future” object. That “future”
object has observable attributes (“traits”) representing the application’s view
of the state of the background task. Rather than waiting on the future’s state,
an interested observer can listen to updates to those traits and update the GUI
state as necessary when changes occur. The Traits Futures machinery ensures
that updates to the future’s traits always occur on the main thread, freeing
observers from thread-safety concerns.For further information, see the documentation pages athttps://docs.enthought.com/traits-futures/.
Package: traits-stubs
Thetraits-stubspackage contains external type annotations for theTraitspackage. These annotations can be used with static type checkers likemypyto
type-check your Traits-using Python code.InstallationTo install from PyPI, simply usepip installtraits-stubs.To install from source, runpip install .from this directory.UsageYou’ll usually want to installmypy(or another type checker) into your Python
environment alongside these stubs. You can then usemypyfrom the command
line to check a file or directory, for example with:mypy <somefile.py>Alternatively, some IDEs (including VS Code and PyCharm) can be configured to
perform type checking as you edit.DevelopmentTo test traits stubs locally:Create a fresh venv and activate it, for example with:$ python -m venv --clear ~/.venvs/traits-stubs && source ~/.venvs/traits-stubs/bin/activateMake sure all build-related packages are up to date$ python -m pip install –upgrade pip setuptools wheelInstall the Traits library into the environment (non-editable install)$ python -m pip install .Install traits stubs in editable mode (from the repo, not from PyPI).$ python -m pip install -e traits-stubs/Install mypy (or your favourite type checker)$ python -m pip install mypyFrom the traits-stubs directory, run mypy on individual files in
traits_stubs_tests/examples with e.g.,$ python -m mypy traits_stubs_tests/examples/completeness.pyFrom the traits-stubs directory, run the test suite with:$ python -m unittest discover -v traits_stubs_testsNote: it’s easy to get confusing results if you accidentally use the wrong
version of mypy. To avoid that, you can make sure that youdon’thave mypy
installed globally, and/or always invoke mypy usingpython-mmypyfrom
within the environment.Note: the unittest run can give the wrong result in the presence of a stale.mypy_cache. If you’re getting a pass where you expect to get a failure
(or vice versa), try deleting the local cache and trying again.DependenciesThis package depends onTraits.