Saravanan666/pypi-org huggingface dataset:
Package: codx
CODXcodxis a python package that allow retrieval of exons data from NCBI RefSeqGene database.InstallationpipinstallcodxUsage Python PackageThe package uses gene id in order to retrieve exons data from NCBI RefSeqGene database. The gene id can be obtained from the Uniprot database using the accession id of the gene. Theget_geneids_from_uniprotfunction can be used to obtain the gene id from RefSeqGene database of NCBI.# if you only have accession id, you must first use the get_geneids_from_uniprot function to get the gene id from Uniprotfromcodx.componentsimportget_geneids_from_uniprotgene_ids=get_geneids_from_uniprot(["P35568","P05019","Q99490","Q8NEJ0","Q13322","Q15323"])# the result will be a set of gene ids that can be obtained from the Uniprot database using the list of Uniprot accession above# Import the create_db function to create a sqlite3 database with gene and exon data from NCBIfromcodx.componentsimportcreate_db# 120892 is the gene id for LRRK2 genedb=create_db(["120892"],entrez_email="your@email.com")# You need to provide an email address to use the NCBI API# From the database object, you can retrieve a gene object using its gene namegene=db.get_gene("LRRK2")# From the gene objects you can retrieve exons data from the blocks attribute each exon object has its start and end location as well as the associated sequenceforexoningene.blocks:print(exon.start,exon.end,exon.sequence)# Using the gene object it is also possible to create all possible ordered combinations of exons# This will be a generator object that yield a SeqRecord object for each combination# There however may be a lot of combinations so depending on the gene, you may not want to use this with a very large gene unless there are no other optionsforexon_combinationingene.shuffle_blocks():print(exon_combination)# To create six frame translation of any sequence, you can use the three_frame_translation function twice, one with and one without the reverse complement option enable# Each output is a dictionary with the translatable sequence as value and the frame as keyfromcodx.componentsimportthree_frame_translationforexon_combinationingene.shuffle_blocks():three_frame=three_frame_translation(exon_combination.seq,only_start_at_atg=True)three_frame_complement=three_frame_translation(exon_combination.seq,only_start_at_atg=True,reverse_complement=True)Usage Command LineIn addition to the python API, installation also provide a cli interface that can be used for the same purposeUsage:codx[OPTIONS]IDS

Options:-o,--outputTEXTOutputfile-i,--include-intronIncludeintron-u,--uniprotInputisUniprotaccessionids-t,--translateTranslatetoprotein-3,--three-frame-translationTranslatetoproteinin3frames-6,--six-frame-translationTranslatetoproteinin6frames(3forwardand3reversecomplement)--helpShowthismessageandexit.Here IDS positional argument are a list of gene ids or uniprot accession ids delimited by,.Example usage can be seen belowcodx-ooutput.fasta-uP35568,P05019,Q99490,Q8NEJ0,Q13322,Q15323codx-ooutput.fasta1190,120892
Package: cody-adapter-transformers
adapter-transformersA friendly fork of HuggingFace'sTransformers, adding Adapters to PyTorch language modelsadapter-transformersis an extension ofHuggingFace's Transformerslibrary, integrating adapters into state-of-the-art language models by incorporatingAdapterHub, a central repository for pre-trained adapter modules.💡 Important: This library can be used as a drop-in replacement for HuggingFace Transformers and regularly synchronizes new upstream changes.
Thus, most files in this repository are direct copies from the HuggingFace Transformers source, modified only with changes required for the adapter implementations.Installationadapter-transformerscurrently supportsPython 3.6+andPyTorch 1.3.1+.
Afterinstalling PyTorch, you can installadapter-transformersfrom PyPI ...pip install -U adapter-transformers... or from source by cloning the repository:git clone https://github.com/adapter-hub/adapter-transformers.git
cd adapter-transformers
pip install .Getting StartedHuggingFace's great documentation on getting started withTransformerscan be foundhere.adapter-transformersis fully compatible withTransformers.To get started with adapters, refer to these locations:Colab notebook tutorials, a series notebooks providing an introduction to all the main concepts of (adapter-)transformers and AdapterHubhttps://docs.adapterhub.ml, our documentation on training and using adapters withadapter-transformershttps://adapterhub.mlto explore available pre-trained adapter modules and share your own adaptersExamples folderof this repository containing HuggingFace's example training scripts, many adapted for training adaptersImplemented MethodsCurrently, adapter-transformers integrates all architectures and methods listed below:MethodPaper(s)Quick LinksBottleneck adaptersHoulsby et al. (2019)Bapna and Firat (2019)Quickstart,NotebookAdapterFusionPfeiffer et al. (2021)Docs: Training,NotebookMAD-X,Invertible adaptersPfeiffer et al. (2020)NotebookAdapterDropRücklé et al. (2021)NotebookMAD-X 2.0,Embedding trainingPfeiffer et al. (2021)Docs: Embeddings,NotebookPrefix TuningLi and Liang (2021)DocsParallel adapters,Mix-and-Match adaptersHe et al. (2021)DocsCompacterMahabadi et al. (2021)DocsSupported ModelsWe currently support the PyTorch versions of all models listed on theModel Overviewpagein our documentation.CitationIf you use this library for your work, please consider citing our paperAdapterHub: A Framework for Adapting Transformers:@inproceedings{pfeiffer2020AdapterHub,
    title={AdapterHub: A Framework for Adapting Transformers},
    author={Pfeiffer, Jonas and
            R{\"u}ckl{\'e}, Andreas and
            Poth, Clifton and
            Kamath, Aishwarya and
            Vuli{\'c}, Ivan and
            Ruder, Sebastian and
            Cho, Kyunghyun and
            Gurevych, Iryna},
    booktitle={Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations},
    pages={46--54},
    year={2020}
}
Package: codycd
Cody is our lightweight microservice that you can install on your
machines to automate deploy with a simple POST request using Gitlab 🦊!
You’ll receive the results on SlackInstallationpip install codycdBefore startingEnsure you have port11001openufw allow 11001Ensure you havecody.shscript file inside your project where you
define your CD instructions! Then runCodyusingStart Codycody startAfter configuration, try to execute a deploycurl -H "X-Gitlab-Token: MY_PROJECT_TOKEN" -X POST http://localhost:11001/api/deployStop Codycody stopShow configurationcody showconfigIt returns the current configurationProject name: Projectname
Project path: /var/www/lotrek/myproject
Token: f4k3t0k3n3v3rywH3r3
Slack hook: https://hooks.slack.com/F4k3/W3BH00k
Package: coeden
Coeden for pythonCoeden is a library to make work with tree data structures ergonimic and ideomatic in python.DisclaimerThis library is in an early alpha stage, expect major changes in the API in subsequent versions.Getting startedRequirementsPython >= 3.10.xInstallYou can install it with pip:python3 -m pip install coedenDocumentationCreate a treeIn coeden there is no tree object, the trees are made of nodes and from every node you can create new leafs (nodes without childs).Let's create a simple tree with 3 levels of depth:from coeden import node

color_tree = Node("colors")and this node can grow new leafscolor_tree["colors"].new_leaf("red")
color_tree["colors"].new_leaf("blue")
color_tree["colors"].new_leaf("green")thenbluecan grow a couple of leafs or typing the whole chaincolor_tree["colors"]["blue"].new_leaf("marine")
color_tree["colors"]["blue"].new_leaf("celeste")also, the red node can be stored in a variable and grow some leafs from itred = color_tree["colors]["red"]
red.new_leaf["dark"]
red.new_leaf["velvet"]The current tree can be printed like thiscolor_tree.print_tree()

# Output
colors
  red
    dark
    velvet
  blue
    marine
    celeste
  greenbut as all nodes are the starting point of their own tree blue can print its own tree, that happens to be a subtree of colors because blue belong to colorsblue.print_tree()

# Output
blue
  marine
  celesteTraversing the treeTrees are traversed using the index operator[]. Using the brackets you can traverse the previous tree from the root to the velvet node for exampleif color_tree["red"]["velvet"] != None:
    ...this is kind of a nested dictionary (and they are internaly nested dictionaries indeed) but it hides some interesting features that normal dicts do not.Traverse inexistent nodesImagine you want to check the existance of "dark gray" in the tree with dictionaries you have to do something like:if color_tree["gray"] != None and color_tree["gray"]["dark"] != None:
    ...or at least wrap it in a try/except. But coeden allows to make free test for existanceif color_tree["gray"]["dark"] != None:
    print("Nice color!")
else:
    print("Nah, not a real color")

# Output
Nah, not a real coloror even better you can create al the inexistent nodes in one call withcolor_tree["gray"]["dark"].create_all()
color_tree.print_tree()

# Output
colors
  red
    dark
    velvet
  blue
    marine
    celeste
  green
  gray
    darkWildcardsWilcards allow to consider every node of a level, for instance, we can search for marine node without knowing it is blue.marine = color_tree["__*__"]["marine"]  # Marine is an iterable set of nodesbut wildcards return sets of nodes and not nodes so there are two options, if you know that there is going to be only one node you can use the special key"__?__"that converts the set to a node again if its length is exactly one. If there are more the sets can be iterated in a loop.marine = color_tree["__*__"]["marine"]["__?__"]  # Now it is the node 
print("marine parent: " + marine.parent.key)

for node in color_tree["__*__"]["dark"]:
   print("dark parent: " + node.key)

# Output
marine parent: blue
dark parent: red
dark parent: gray
Package: coelho
Candango Coelho AMPQ ToolkitCoelho is a AMPQ Toolkit based on pika developed by Candango Open Source Group.The objective of this project is provide easy to use tools to design AMPQ based
applications that runs over Firenado and Tornado frameworks.What Coelho means?The word coelho(kuh-way-lee-ou) is rabbit in Portuguese.LicenseApache License V2.0Copyright © 2019-2020 Flavio Garcia
Package: coelog2db
Logging Utility to DatabaseUtility to write logging to database in order to gather some application stats.Free software: MIT licenseFeaturesFunciton can be extended to different database in future.A helper to log information to InfluxDB2 for further report purpose.The functions here catch the errors, if anything goes wrong it still return and won’t break main program logic. But the information won’t be recorded in InfluxDB.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Developer’s CausionThis package is hosted by pypi public. Do not include any sensitive information in this project.UsageInstallInstallationpip install coelog2dbUsage:import logging
from log2db.log2db import Log2DB
from log2db.log2influx import Log2Influx

log2 = Log2DB.get_instance(Log2Influx,conf=conf["influxdb"],user="cronjob")
log2.log(log_level=logging.INFO,message="Loading started") # log this message before acture logic starts

try:
    # main code
    # make sure throw except in your code if you catched them in subprocess

    pass
except Exception as ex:
        log2.log(logging.ERROR,message="download job failed. " + str(ex))History0.1.1 (2022-06-01)First release on PyPI.
Package: coep-package
This is a Python package which will help do 2 things
1. Create a csv file for the MCQ format questions
2. It will give Latex formatter functionChange Log0.0.2 (1/4/2021)-Added feature to create a textfile
-Added a feature to check duplicate values0.0.3 (2/4/2021)-Modified the csv_module to handle duplicates of Image format questions.0.0.4 (3/4/2021)-Modified putInCsv function such that it will append the new entries in the variation file0.0.5 (5/1/2021)-Introduced utf-8 encoding to the module.0.0.6 (24/6/2021)-discarded0.0.7 (24/6/2021)-discarded0.0.8 (24/6/2021)-Introduced drive API as drive_api
-added new CSV attribute to putInCsv0.0.9 (25/6/2021)-discarded0.1.0 (26/6/2021)-removed colab bug0.1.1 (29/6/2021)-discarded0.1.2 (29/6/2021)-discarded0.1.3 (29/6/2021)-discarded0.1.4 (29/6/2021)-Remove Duplicates Bugfix
Package: coercion
This library provides functions that coerce datastructures into
normalized forms.  For example, converting an arbitrarydictinto a form that is suitable for passing tojson.dumps.Thetornadoframework has a function calledrecursive_unicodein thetornado.escapemodule.  It is a very simple recursive
walk of datastructure that switches on type and transforms string
values into unicode strings.  I use this in production software
regularly and it works like a charm.  Or at least it did until my
software encountered a deeply nested dictionary and I received aRuntimeError: maximum recursion depth exceedederror in my
service log.  This is one of the exceptions that strikes fear into
most engineers when it rears it’s head in production.That is the primary reason for this library existing.  It provides
the same simple string encoding function iteratively instead of
recursively.  At the same time, the need to coerce values into a
normalized string form is something that I’ve had to do repeatedly
so it might as well be plopped into a reusable library.ExamplesThe following example shows one of the underlying reasons that this
library was created.  The commonly used msgpack implementation for
python returns everything as byte strings which is problematic if
you want to dump it as JSON since it will raise aTypeErrorif
dictionary keys are not strings.  (This is whererecursive_unicodewas so handy.)>>>importjson>>>importcoercion>>>importmsgpack>>>bin_msg=msgpack.packb({u'\u00DCnicode':b'bytes',b'bytes':'str'})>>>decoded=msgpack.unpackb(bin_msg)>>>decoded{b'bytes':b'str',b'\xc3\x9cnicode':b'bytes'}>>>json.dumps(decoded)Traceback(mostrecentcalllast):File"<stdin>",line1,in<module>File"/Users/daveshawley/opt/lib/python3.5/json/__init__.py",line230,indumpsreturn_default_encoder.encode(obj)File"/Users/daveshawley/opt/lib/python3.5/json/encoder.py",line199,inencodechunks=self.iterencode(o,_one_shot=True)File"/Users/daveshawley/opt/lib/python3.5/json/encoder.py",line257,initerencodereturn_iterencode(o,0)TypeError:keysmustbeastring>>>json.dumps(coercion.normalize_collection(decoded))'{"bytes": "str", "\\u00dcnicode": "bytes"}'
Package: coeur
CoeurA simple service framework for python applications.IntroductionWhen creating python based applications, there is typically some core business logic. There are countless ways to organise this logic, including by using functions, or by building the business logic into other frameworks. For example, in a Flask application one may put the business logic directly into aView, or in Django Rest Framework, one might put the business logic into theSerializer.For smaller applications, coupling the business logic with the main framework you are using isn't problematic, but in larger applications it can become a limitation. For example, if you have a single interface to the business logic that is a REST API, then having the business logic in the views/serializers isn't problematic, but if your application grows and you end up having CLIs, or celery workers that also need to interface with the business logic, then the business logic can't be coupled with the framework used by one of the interfaces.The purpose of this library is to a create a service framework that allows the different interfaces to consume the core business logic.Practically speaking, the Flask and DRF examples would be as follows:Flask: View will call the ServiceDRF: ViewSet will either call the Service, or will call a Serializer that calls the ServiceCelery: Task will call the service directlyServiceActionActionA service action is a method on a service that can have any number of validations.A service action is defined as a class attribute. The action is then used as a decorator to set the permissions, validators, and the method that will be called.When the service is called, the permissions will be checked, then each validator will be called in order of definition, and if all of those pass, the action method will be called.classMyService:@actiondefcreate_something(self,data):# The method that will be called from service.action()...# Optionally specify a validator context factory@action.validator_contextdefmake_context(self,data):# The return value will be passed to each validatorreturnMyContext()@create_something.validatedefvalidate_creation(self,context,data):# Perform some validation...The action can be initialised with validators directly, or any combination thereof.classMyService:@action(validator_context_factory=make_context,validators=[validate_something])defcreate_something(self,data):# The method that will be called from service.action()...ValidatorsA service action can have multiple validators, defined using:@my_action.validatedefmy_validation_function(self,data):# Perform the validation...The validators are called in the order of definition, and the validation function shouldn't mutate the data (any returned value is be discarded). The framework can work in conjunction with more powerful validation specific libraries such asMarshmallow, for example:classOrderService:@actiondefcreate(self,data:dict):# Do something@create.validatedefvalidate_order_creation(self,data:dict):OrderMarshmallowSchema().load(data)
Package: coeusfactory
Coeus Factory - Database Connector FactoryA Database Connector interface that follows a factory model pattern.Installation# if using poetry# highly recommendedpoetryaddcoeusfactory# also works with standard pippipinstallcoeusfactoryThen add necessary database interfaces as necessary. Below are the libraries that works with Coeus Factory.DatabasePython LibraryStatusMongoDBpymongoDynamoDBboto3Getting StartedFor every first step for any database, initialization and connections will come first. As long as it is supported in the factory, you can pass the parameters you normally handle in supported databse interfaces.fromcoeusfactoryimportConnectorFactorycf=ConnectorFactory(interface="<database>",db="<database-name>"# other config or auth params for the dbusername="",password="")# db initcf.handler.initialize()cf.handler.connect()Connector MethodsGetting / Creating a modelUsers=cf.get_model("Users")Carts=cf.get_model("Carts")CustomerReviews=cf.get_model("CustomerReviews")RetrievalUsers.get_by_id(0)Users.get({"name":"Test User"})InsertionUsers.add({"name":"Test User"})DeletionUsers.delete_by_id(0)Users.delete({"name":"Test User"})ModificationUsers.update_by_id(0,{"name":"New Name"})Users.update({"name":"Test User"},{"name":"New Name"})Entry CountUsers.count()AuthorAlmer Mendoza
Package: coeus-test
coeuscoeusis a python client implementation of the json-message protocol for remote (Tcp) integration tests.Installationcoeusis meant to be added as a requirement to your python unit-test project. Simply add a reference tocoeus-test.pip install coeus-testGetting StartedGlossaryClient: A class for connecting via TCP to the server application.Message: A specific json format (prototcol) defining the communication.TestEntity: An abstract concept for anentitythat exists in the server application. Usually accessed via it's ID.Client SetupThe client must connect to the server application via an IP and port. You can invoke a connection as follows:importclientcli=client.Client(tcp_port=31203)cli.connect()By default, it will attempt to connect with ip:127.0.0.1.CommandsCommands are specific blocking calls that are sent to the server, then waits to receive a message. Every command has a response.Commands do not handle any validation of message received from unity client.importcommandsQuery Commandsquery_entity_is_registeredThis command asks the unity application about the state of an entity.Usageresult=commands.query_entity_is_registered(cli,"myEntityId")Response{"type":"query.entity.isRegistered","payload":{"result":true|false}}Await Commandsawait_entity_registeredThis command blocks until a specific state is reached for the entitiy. By default, it will block until the entity was registered. If the command exceeds the specified timeout, it continue with a failure.Usage//is_registered,timeout_secondsoptional...result=commands.await_entity_registered(cli,"myEntityId",is_registered=True,timeout_seconds=60)Response{"type":"await.continue","payload":{"success":true|false}}Fetch Commandsfetch_entityThis command asks the server to serialize the TestEntity and send it.Usageresult=commands.fetch_entity(cli,"myEntityId")Success Response{"type":"fetch.entity","payload":{"test_entity":{...}|null}}Invoke Commandsinvoke_entity_methodThis command allows the python unit-test to invoke a method on the server"s TestEntity and return the result.Usageparameters={"statName":"score"}result=commands.invoke_entity_method(cli,"myEntityId","GetPlayerStat",parameters)In the C# code, this will look for a method with the following signature:publicintGetPlayerStat(IDynamicObjectparameters){varstatName=parameters.GetValue<string>("statName");...returnstat;}Response{"type":"invoke.entity.method","payload":{"is_error":false,"error_message":null,"result":32}}If there is a C# exception, then theerror_messagewill contain the exceptions message.AssertionsThe commands do not validate the response from the server. To easily do this, use the assertions.importassertions...# Fails assert if False returned from response...assertions.assert_entity_is_registered(cli,"myEntityId")# Fails if timeout exceeded...assertions.assert_await_entity_registered(cli,"myEntityId")# Fails if the test_entity is None...result=assertions.assert_fetch_entity(cli,"myEntityId")# Fails if is_error == True, AssertException with message provided...result=assert_invoke_entity_method(cli,"myEntityId","GetPlayerStat",...)
Package: coeus-test-appium
Coeus-Appium-BindingsAboutA set of wrappers to simplify the setup, and usage of appium calls to tap, swip, and send key events.SetupSimply install the requirement into your package.pipinstallcoeus-test-appiumAppiumDriverUtilize the AppiumDriver class to create a connection to the server.driver=AppiumDriver.AppiumDriver("ios"|"android")# add additional capabilities...driver.capabilities['app']="/my/Path/to/apk"driver.connect()# send commands to device...driver.tap(23,400)driver.swipe(23,400,100,400)