Saravanan666/pypi-org huggingface dataset:
Package: yadoma
Edit 2023: yadoma was written by @esc a couple of years ago and ended up no
longer maintained. It seemed that I was the only user, so I’m taking over
maintenance. However, given the simplicity of the tool, I kept everything
largely the same, including this README. Hence, “I” refers to @esc rather than
myself. However, I’m changing the build process to tox (instead of the old
pybuilder), because pybuilder seemed to have problems with environment
separation that I wasn’t able to just quickly fix.yadoma: yet another dotfile managerThis is my personal take on a dotfile-manager.PrinciplesPile of symlinks approachDeclarative configurationComposableVersioning not baked inInfinitely hackablePrior Art (or why I decided to roll my own)vcshwritten in shell (yuck) and has git baked indewiwritten in perl (yuck) and didn’t grok how it workeddotfilemanagerhas weird conventions and strange configEdit: in 2018, I discovered that there are many more dotfile-managers out
there:https://dotfiles.github.io/ExampleGiven the yaml configconfig.yadomain the directoryconfig/public:example-prog:
  files:
    -
      src: .rc_with_src
      dest: .rc_with_src_dest
    -
      src: .rc_with_out_dest
    - .plainrcAnd, given the following files of the directory:.plainrc
.rc_with_src
.rc_with_out_destDoing:$ yadoma config/publicWill create the following symlinks in the users$HOMEfor the programexample-prog:.plainrc
.rc_with_src_dest
.rc_with_out_destTODO and IdeasMany.LicenseCopyright 2016-2019 Valentin Haenel <valentin@haenel.co>Licensed under the Apache License, Version 2.0 (the “License”); you may not use
this file except in compliance with the License. You may obtain a copy of the
License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
Package: ya.dotdict
Yet Another DotDictA Python library providing attribute access for dictionaries.
The library provides these classes:ya.dotdict.DotDictas a replacement fordictandcollections.defaultdictya.dotdict.DotDictMixin: a mixin class that can be used to add attribute-style access to any dict-like class.ya.dotdict.DotDictis implemented in terms of this mixin classAll the code examples assume:>>> from ya.dotdict import *Simple use case: access dictionary items as attributesDotDictcan be used as a replacement fordict:>>> d = DotDict()
>>> d['spam'] = 'eggs'
>>> d.spam
'eggs'
>>> d.spam = 100
>>> d['spam']
100Deleting attributes also works as expected:>>> del d.spam
>>> d.spam
Traceback (most recent call last):
   ...
AttributeError: spamCreate default values (likecollections.defaultdict)DotDictcan be used as a replacement fordefaultict:>>> d = DotDict(lambda: 'eggs')
>>> d.spam
'eggs'
>>> d.spam = 100
>>> d['spam']
100
>>> d._default_factory = lambda: 'foo'
>>> d.bar
'foo'If the default value factory takes an argument, then the key is passed to it:>>> d._default_factory = lambda key: [key, 1000]
>>> d.foo
['foo', 1000]If the default value factory takes more than one argument, a TypeError will be raised:>>> d._default_factory = lambda x, y: [x, y]
Traceback (most recent call last):
   ...
TypeError: defult_factory can only take zero or one argumentDotDictMixinA mixin class to provide attribute access to dict-like classes.DotDictis implemented usingDotDictMixinlike this:class DictClass(DotDictMixin, dict): pass
Package: yadr
Another common RPG die rolling syntax random number generator.Why did you do this?That’s a very good question. I guess the answer is that I started just
to see if I could, and it snowballed from there. In order to explore
Python, I had built a few packages in the past that would randomly
generate table top role playing game (TTRPG) characters. Each of them
had a version of a dice rolling module I had written, so I had this
code in a bunch of places.“I’ll make that a package!” I thought.But, wait, what if I want to use dice from different game systems? I
had run across Backus Naur form (BNF) descriptions of languages in the
past when looking into algorithms, and it seemed like writing a
parser to handle different dice systems seemed a reasonable way to go.
As reasonable as any thought involving, “I’ll use BNF here,” can be,
I guess. And so was born Yet Another Dice Notation (YADN) andyadr.For a description of YADN see:YADNDo we need another Python dice rolling package?No. Probably not. Unsurprisingly, there seems to be a lot of people who
play TTRPGs and write Python packages. This is yet another one.Hence the name.Does it support my game?Check through the YADN doc to see if the operations you need are described
there. If not, open an issue, and I’ll see what I can do.Why does it require Python 3.10?Another reason for this package is I wanted a project to explore the
newmatch casefeature in Python 3.10. I’d read that parsing is
one of the cases where it’s really useful.So, I implemented it.Then I removed it.The problem isn’t withmatch case. It worked well enough, and I
think the syntax was fairly clear. I’m not really sure it bought me
anything over usingif…elif…else, but I think that is because
everything I’m lexing or parsing is fairly simple. More complex cases
my see greater benefit frommatch…case.The problem is withmypy. It doesn’t supportmatch caseyet.
So, my options were:Ditchmypy,Mark all thematchblocks astype: ignore,Go back toif.Option 2 was just a mess in the code.My impression is thatmypyis still here to stay, so I want to try
to make things work with it.So, I went back toif, at least untilmypybetter supportsmatch
case.Since I removed thematch case, I can probably lower the Python
requirement to 3.7 or so. If anyone ever uses this, I’ll think about
it. For now, I’m only testing it under a 3.10 virtual environment, so
I’ll keep it at 3.10.How do I use this package?If you want to execute the package from the command line, you can
install the package usingpipor other Python package manager, and
run it as a module with the following:python -m yadr <YADN_string>If you want to import it into your own code, install and import the
package as usual. You can then use theroll()function in theyadrmodule to execute a string of YADN.:>>> import yadr
>>>
>>> yadn = '3d6'
>>> result = yadr.roll(yadn)How do I run the tests?I’m using thepytestlibrary for the unit tests. To just run those tests,
go to the root of your clone of theyadrrepository and use the following
command:python3 -m pytestThe full suite of style checks, mypy, and such I use can be run using a
shortcut I have set up in the Makefile:make pre
Package: yadsl
Yemen Net ADSL Internet Infoyadsl is a simple Python module to easily fetch data fromYemenNet ADSLofficial website.Featureseasy to usefetch data easily with Python.cookiesimport & export cookies, for long refresh time without captcha verifyInstallationYou can installyadslvia pip:pipinstallyadslUsagefromyadslimportYADSLyadsl=YADSL(user:str="xxxxxx",password:str="...")yadsl.login()yadsl.fetch_captcha()yadsl.verify(captcha:str="xxxx")yadsl.fetch_data(cookies:dict=None)LicenseThis project is licensed under theGPL3 License.Changelog
Package: yadupe
yadupeyadupeis yet another tool to find and remove duplicate files in a system.
It will recursively read a source directories, looking for duplicate files. Two files considered as duplicates if they have same size and content, though they could have different names.In search mode utility report duplicate files list.In deduplicate mode utility move duplicate files into the given destination directory. Only one file among group of duplicates is kept in the source directory. Also, report file contained all paths for moved diplicates will be saved in the destination directory.In the alternate mode utility move unique files into the given  destination. Only one file among group of duplicates is moved into destination directory.PrerequisitesPython 3.4+tqdmInstall% pip install yadupeIf you don't have pip it's also easy to install:https://pip.pypa.io/en/stable/installing/When yadupe installed it is availble on the CLI:% yadupe -hUsageSearch and remove duplicate files in directories/home/user/source_a,/home/user/source_b. Found duplicates will be moved into/home/user/duplicates, as well as report regarding moved files. Empty subfolders insource_aandsource_bremoved also.% yadupe /home/user/source_a /home/user/source_b -d -p -r /home/user/duplicatesSearch duplicates in directory/home/user/source_aand print duplicate list.% yadupe /home/user/source_aSearch and move unique files in directories/home/user/source_a,/home/user/source_b. Found uniques will be moved into/home/user/uniques, as well as report regarding moved files.% yadupe /home/user/source_a /home/user/source_b -u -p -r /home/user/uniquesThere are couple examples of using yadupe package in Python applications in theexamplesdirectory.Options% yadupe -h

usage: yadupe [-h] [-d] [-u] [-p] [-r PATH] PATH [PATH ...]

Recursively scan one or more given directories for duplicate files. Found
duplicates list could be saved into report or printed out in console. Also,
duplicates could be moved into destination directory in safe way, preserving
it relative path. In this case file name is written in the report, as well as
new path for the file. If empty sub-directories turn up after duplicates
removal, the could be deleted as well.

positional arguments:
  PATH                  Source path to search duplicated files.

optional arguments:
  -h, --help            show this help message and exit
  -d, --deduplicate     Scan and remove mode. Duplicates will be moved into
                        given directory.
  -u, --unique          Scan and move mode. Unique files will be moved into
                        given directory.
  -p, --purge           Remove empty subdirs after duplicates or uniques move.
  -r PATH, --result PATH
                        Path to report dir (optional for default search mode)
                        OR directory to move duplicated files into.TestingTo run unit tests intestdirectory first unziptest-data.ziparchive insidetest-datadirectory. It create required directory tree for tests.
Package: yaeb
Yet another event bus - yaeb for shortA simple typed event bus written in pure pythonInstallationInstall yaeb with pippipinstallyaebUsage/Examplesfromloggingimportinfofromyaeb.base.busimportBaseEventBusfromyaeb.base.eventsimportBaseEventfromyaeb.base.handlersimportBaseSyncEventHandlerfromyaeb.busimportDictEventHandlerRegistry,EventBusclassUserCreated(BaseEvent):user_id:intdef__init__(self,user_id:int)->None:self.user_id=user_idclassUserCreatedHandler(BaseSyncEventHandler[UserCreated]):defhandle_event(self,event:UserCreated,bus:BaseEventBus)->None:info('User with id=%dwas created!',event.user_id)if__name__=='__main__':bus=EventBus(event_handler_registry=DictEventHandlerRegistry())bus.register(event_type=UserCreated,event_handler=UserCreatedHandler())bus.emit(UserCreated(user_id=1))# prints log message with created user idRoadmapAdd coroutines support - AddedBaseAsyncEventHandlerAdd some kind of multithreading support. Though it can be implemented by handlers themselves 🤔 - AddedBaseExecutorEventHandler
Package: ya-ecs-ctl
Yet Another ECS CTL toolpip install ya-ecs-ctlAdds binary:ecsUsage: ecs [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  ci       Interact with Container Instances
  cluster  Interact with Cluster
  ec2      Interact with EC2 Instances
  repo     Interact with (Container) Repos
  service  Interact with Service
  task     Interact with TaskGetting StartedEnsure aws cli tool works and you have run aws configure. Uses boto3 and assumes the following ENVs are set:AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYYour default region should be set. Verify it withcat ~/.aws/config 

[default]
region=us-west-1Runecs service lsIt will first ask you to select a default cluster.
Currently this tool does not have a command to create one.This preference is saved here:cat .settings.conf 

{
    "cluster": "Dev-Apps"
}Lets try that again..ecs service ls

Cluster: Dev-Apps

+------------------------+---------------------------+-------------+---------+---------+---------+--------+--------------+----------------------------+
| Service Name           | Task Def                  | Launch Type | Desired | Running | Pending | Status | Created      | Deployments (des/pend/run) |
+------------------------+---------------------------+-------------+---------+---------+---------+--------+--------------+----------------------------+
| my-app                 | my-app:122                | EC2         | 2       | 2       | 0       | ACTIVE | 4 months ago | 2/0/2 6 days ago           |
| another-app            | another-app:1             | EC2         | 2       | 2       | 0       | ACTIVE | a day ago    | 2/0/2 a day ago            |
+------------------------+---------------------------+-------------+---------+---------+---------+--------+--------------+----------------------------+Service CommandsUsage: ecs service [OPTIONS] COMMAND [ARGS]...

  Interact with Service

Options:
  --help  Show this message and exit.

Commands:
  create    Create Service
  delete    Delete Service
  describe  Describe Service
  ls        List Services
  redeploy  Force redeployment of a Service
  scale     Scale Service
  tasks     List Tasks for Service
  update    Update ServiceSee "examples" folder for config structure of services.
Support is provided for FARGATE, Scheduled Tasks, etc.Alternatives..https://github.com/diegoacuna/ecs-ctlManage Amazon ECS like with kubectl.https://github.com/labd/ecs-deplojo/Deployment tool for Amazon ECS.https://github.com/fabfuel/ecs-deployecs-deploy simplifies deployments on Amazon ECS by providing a convinience CLI tool for complex actions, which are executed pretty often.https://github.com/cuttlesoft/ecs-deploy.pyPython script to instigate an automatic blue/green deployment using the Task Definition and Service entities in Amazon's ECS.https://github.com/boroivanov/ecs-toolsECS Tools cli aims to make deploying to ECS Fargate easier. It also provides an easy way to scale and update environment variables.
Package: yaenum
Yet Another Enumerator is an enum module that supports three different types of enumerations:sequence enums (0, 1, 2, 3, etc.)base 2 bitmask enums (0, 1, 2, 4, 8, etc.)string enums (‘top’,’bottom’,’left’,’right’, etc.)Each Enumeration is its own class, with instances of that class being singletons.  Besides being a value, enum instances can also have their own behavior (use case, anyone?).Creating an enum is as simple as:from yaenum import Enum, BitMaskEnum, UniqueEnum, enum

Enum.create('Color', 'red green blue', export=globals())or:class Color(BitMaskEnum):       # python 3+ only
    black
    red
    green
    blueand if that’s too magical for you:class Color(BitMaskEnum):
    black = enum()              # python 2: enum(value=0) etc.
    red   = enum()
    green = enum()
    blue  = enum()
Package: yaep
As the name says, this package enters the crowded field of
environment related packages.  The main goal of this package
is to provide you with the ability to populate your
environment with a a source (by default reading a .env file)
and then use a simple function in your configuration files
to read these values or use defaults.It’s worth noting that this software is under active
development and interfaces will change without warning.UsageUsage is simple. Early in the execution of your project, or
in a dedicated module for configuration, importpopulate_envfrom the yaep package.  Running this will populate your
environment with values from your .env file.  You can
alternatively set the env_file argument or the ENV_FILE
environment variable to read from another env file.from yaev import populate_env
populate_env()Now you can setup your configuration. For example, in a
settings.py or config.py:from yaev import env
DATABASE_URL = env(‘DATABASE_URL’, ‘sqlite://:memory:’)The env function has a few other useful tricks.  For example,
allowing for a default that is “sticky” - meaning if it is
employed it is set in the environment.os.getenv(‘foo’)  # Returns None
FOO = env(‘FOO’, ‘bar’, sticky=True)
os.getenv(‘FOO’)  # Returns ‘bar’Additionally, you can by default allow for boolean-like values
to be changed to booleans on the fly.os.getenv(‘SOMETHING’)  # Returns ‘True’
env(‘SOMETHING’)  # Returns TrueBy default a case-insensitive comparison to ‘True’ and ‘False’
is done, along with 1 and 0.  You can change the available
values by passing in a new boolean map:env(‘pony’, boolean_map={True: [‘True’, ‘1’, ‘Pony’]})
# Returns TrueOn the subject of 1s and 0s - you might consider that if
you are intending to get an integer that you will instead
end up with ‘True’ or ‘False’ - you can overcome this by
setting convert_booleans to False.  Additionally, you can
cast your return value explicitly by setting the type_class,
though note that if convert_booleans is True that will
override your type_class.  Some examples:# SOMETHING is set to ‘1’ in the environment
env(‘SOMETHING’) # Returns True
env(‘SOMETHING’, convert_booleans=False) # Returns ‘1’
env(‘SOMETHING’, convert_booleans=False, type_class=int) # Returns 1Finally, you can also raise an exception if a value is not
set in your environment:env(‘IMPORTANT’, default=yaep.exceptions.UnsetException)
# Raises yaep.exceptions.UnsetExceptionUsing Other Environment SourcesA goal of the project is to be able to override or add to the
default of pulling values in from an env file. Supporting
alternate sources such as credential servers is the goal.Work in this area is slated for a future release.A list of versions and changes to the project:v0.0.6 - Remove setup_requires dependency on pypandoc.v0.0.5 - Fix install error when installing from sdist (missing README)v0.0.4 - Fix issue with pypandoc usage.v0.0.3 - Fixed issue with boolean defaults, allow for type_class and UnsetExceptions.v0.0.2 - Fixed issue with ConfigParser lowercasing keys.v0.0.1 - Initial commit to GitHub.
Package: yaerrrr
IntroductionThe packages allows you to programmatically create ER diagrams.
The pacakges is simple, but it should help you generate ER diagrams like the one provided by Chen.Installationpip install yaerrrrExampleA single ER can be generated as follows:import yaerrrr


class TestEr(yaerrrr.AbstractYaerrrrScript):

    def generate_er(self, context: 'yaerrrr.YaerrrContext') -> "yaerrrr.ErDiagram":
        er = context.er

        er.add_entity(name="authors", fields=[
            er.generate_primary_id_key(),
        ])
        er.add_entity(name="books", fields=[
            er.generate_primary_id_key()
        ])
        er.add_1_to_0_n("authors", "books", "writes")

        return er


def main():
    x = TestEr()
    x.run("output.svg")


if __name__ == "__main__":
    main()and it outputs (for now):
Package: yaex
Yet Another EX command libraryThis is a library based on the ex command. So, it works the same way :)Usagefromyaeximport*result=yaex(append("Hello"),append("World"),)print(result)# >Hello# >World# >result=yaex(append("first line"),append("second line"),append("third line"),go_to(2),delete(),)print(result)# >first line# >third line# >result=yaex(append("first line"),append("second line"),append("third line"),move(-1),delete(),)print(result)# >first line# >third line# >result=yaex(append("first line"),append("second line"),append("third line"),search("second"),delete(),)print(result)# >first line# >third line# >result=yaex(append("# yaex\n\nThis is a library based on the ex command.\n"),go_to_first_line(),delete(),insert("# Yet Another EX command library"),)print(result)# ># Yet Another EX command library# ># >This is a library based on the ex command.# >result=yaex(append("first line\nsecond line\nthird line\nfourth line\nfifth line\nsixth line\n"),delete().from_range(search("second"),search("fifth")),)print(result)# >first line# >sixth line# >result=yaex(append("first line\nsecond line\nthird line\nfourth line\nfifth line\nsixth line\n"),substitute("line","LINE").from_range(go_to_first_line(),go_to_last_line()),)print(result)# >first LINE# >second LINE# >third LINE# >fourth LINE# >fifth LINE# >sixth LINE# >
Package: yafal
YAFALYou are fake labels! is a library which employs Large Language Models (LLMs)
to detect fake labels for text classification.It uses Huggingface Transformers library with the PyTorch backend.For more information, refer to the auto-generateddocumentationInstallationTo install it, just use:pip install yafalGenerating the DocsTo auto-generate the documentation you will also need the following importspip install sphinx numpydocCurrent LimitationsCurrently, these are the existing limitations, help is appreciated:Multi-label fake-label detection is only supported for the "binary" encoding method.Dataset Corruption:No data-conditioning exists, i.e. P(X, Y_corrupt) = P(X)P(Y_corrupt)There is no method to take into account a label-corruption confusion matrix: P(y_c | y))Export to ONNX yet to be doneSphinx DocumentationYAFALDocumentHandlerTest it on GPU settingsLicense - MITCopyright 2022, M. SerrasPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: ya-fattura-elettronica-generator
IntroductionThis package provides an alternative way to generate fatture elettroniche.
Actually, at the moment we provide only validations of them, and specifically only for the regime forfettario.
The reason is that I have that oneInstallationpip install ya-fattura-elettronica-generatorGuideya-fattura-elettronica-generator --helpValidationya-fattura-elettronica-generator validate forfettario --monthly --file "fattura.xml"We will perform some validations to ensure everything is fine.Known Bugsid fattura is still in WIP.
Package: yafcorse
Yet Another Flask CORS ExtensionpipinstallyafcorsefromflaskimportFlaskfromyafcorseimportYafcorsedefcreate_app():app=Flask(__name__)cors=Yafcorse({'origins':lambdaorigin:origin=='https://api.your-domain.space','allowed_methods':['GET','POST','PUT'],'allowed_headers':['Content-Type','X-Test-Header'],'allow_credentials':True,'cache_max_age':str(60*5)})cors.init_app(app)returnapp