Saravanan666/pypi-org huggingface dataset:
Package: connect-telegram-bot
Connect Telegram BotIntroductionConnect Telegram Botis the base class which helps to build custom commands for the django models. It allows getting historical data from django models, as well as develop custom pre-defined filters and execute custom django management commands (i.e. those which are executed throughpython manage.py $command)InstallConnect Telegram Botrequires python 3.8 or later and has the following dependencies:python-telegram-bot >=13.3django>=2.2.19Connect Telegram Botcan be installed frompypi.orgusing pip:$ pip install connect-telegram-botRunning The BotDefine your command class extending the baseFor example:from myapp.models import MyAppModel

from telegram_bot.telegram_conversation import TelegramConversation


class MyAppConversation(TelegramConversation):
    COMMANDS_DIR = '/app/myapp/management/commands'

    def __init__(self, logger, suffix):
        super().__init__(logger, suffix)
        self.model = MyAppModel

    @property
    def saved_filters(self):
        return [
            'count',
        ]

    def get_count(self, update):
        amount = self._get_initial_queryset().count()
        self._reply(update, amount)
        self._default_query_context()Create a directory in your project where these conversation implementations will be placed.Connect Telegram Botrequires multiple environment variables to be setup before executing:VariableDescriptionTELEGRAM_BOT_TOKENTelegram Token for the bot. Please refer tohttps://core.telegram.org/botson how to create a bot.DJANGO_SETTINGS_MODULEDjango settings package for current project.TELEGRAM_BOT_HANDLERSDirectory where custom conversations (handlers) were placed, i.e. where we would put ourMyAppConversationfrom aboveTELEGRAM_BOT_COMMAND_SUFFIXIn case of having multiple instances of the bot (with the same commands) we want to add some suffix to the commands, so that only specific bot is getting the command, so command becomesmyappconversation_${SUFFIX}. If there is no need to have multiple instances of the same bot in the chat -- just leave this undefined.Running The Botexport TELEGRAM_BOT_TOKEN='....'; export DJANGO_SETTINGS_MODULE='settings.common'; export TELEGRAM_BOT_HANDLERS='/app/telegram_bot/conversation_handlers/'; export TELEGRAM_BOT_COMMAND_SUFFIX='suf1'; python telegram_bot/bot.pyTestingCreate virtualenvInstall project dependenciespython -m pip install --upgrade pip
pip install poetry
poetry updateRun testspoetry run pytestLicenseConnect Telegram Botis released under theApache License Version 2.0.
Package: connect-umls
Super light UMLS connection. The goal is to feel similar to the UMLS browser.
Requires no downloading, but the UMLS rest connection is somewhat slow so user beware.
You need to make an account with UMLS.importconnect_umlsasumumls=um.UMLS(apikey)Your api key can be found here:https://documentation.uts.nlm.nih.gov/rest/authentication.htmlYou only need to supply the api key in step 1. We take care of all the ticket nonsense.Example:#get top 10 search resultsresults=umls.search("joint pain hip",k=10)#"CUI"|"Term"|"Code" default Term. CUI - the cui. Term - the text words. Code - the code.forresultinresults:code=result.cui()# the CUIname=result.name()# the main namesynonyms=result.synonyms()# all the different names of the atomsifresult.hasMapping("LNC"):# check if this result maps to a certain codeset, eg. SNOMED-CT.## Note: you will need to give the UMLS short hand version of the codeset name.## e.g. "LNC" not "LOINC"print("There is a map to LOIN-C!")
Package: connecty
ᵛᶦᵐᵛᶦᵐ'ˢ ConnectyOverviewInstall python (Windows or debian)Install connectySetup manuallly or using GUIStart connectyInstall python on WindowsInstall PythonGet the installerhere.
Although you installed python, you will not run python directly, but use the cmd/terminal/powershellInstall python on DebianGet python 3 through your package managersudo apt-get install python3Install ConnectyInstall connectypython3 -m pip install connectyManual SetupCreate a config fileSave a new text file with your config. You can save it anywhere on your computer.
The file must be in the .ini format and contain your token and all your connections.[BOT]token=tokengoeshere[my_connection_1]channels=123456789 123456789 123456789[my_connection_2]channels=123456789 123456789 123456789The first section should be called[BOT]and contain your token.
Each subsequent section is a different connection.
The exact name doesn't matter so name them something memorable.Run the botRun this command in cmd/terminalpython3 -m connecty path/to/config.iniGUI SetupRun this command in cmd/terminalpython3 -m connectyThe window below will appearThis lets you manage your config file and run the bot. Start by clicking theNewbutton and
choosing a file to save to. Enter a name for your first connection into boxAand click theAddbutton above it.
Enter the channel ID for your first channel into boxCand click theAddbutton above it.
Select an existing connection by picking it from boxB. Select an existing channel by picking it from boxD.
Into boxFenter your token. Finally click theRunbutton.
Second time you run the bot, click theLoadbutton and select the file you saved earlier.GUI + Manual SetupUse the-iflag to open the GUI with a config file already loaded.python3 -m connecty path/to/config.ini -i
Package: conneg-by-p
This small library module assists with tasks related toContent Negotiation by Profile, which is aW3C Standardabouthow Internet clients may negotiate for content provided by servers based on data profiles to which the content conforms.Library StructureThe library really only consists of a few classes:LinkHeaderParserparsesLinkheaders, of the sort generated by Conneg by P HTTPFunctional Profile-compliant systemscan separate out profiles, described as per the Conneg by P HTTP’slist profilesfunctioncan separate out profile URI/token mappings, as per the Conneg by PLink Attributesspecification.AcceptProfileHeaderParserparsesAccept-Profileheaders, of the sort needed to be supplied by clients when requesting content by profile according to Conneg by P’s HTTPFunctional ProfileSee the code itself for class and method documentation!LicenceThis is licensed under GNU General Public License (GPL) v3.0. See thelicense deedfor more details.ContactsLead Developer:Nicholas CarData Systems ArchitectSURROUND Australia Pty Ltd<nicholas.car@surroundaustralia.com><http://orcid.org/0000-0002-8742-7730>
Package: connegp
This small library module assists with tasks related toContent Negotiation by Profile, which is aW3C Standardabouthow Internet clients may negotiate for content provided by servers based on data profiles to which the content conforms.Library StructureThe library really only consists of a few classes:LinkHeaderParserparsesLinkheaders, of the sort generated by Conneg by P HTTPFunctional Profile-compliant systemscan separate out profiles, described as per the Conneg by P HTTP’slist profilesfunctioncan separate out profile URI/token mappings, as per the Conneg by PLink Attributesspecification.AcceptProfileHeaderParserparsesAccept-Profileheaders, of the sort needed to be supplied by clients when requesting content by profile according to Conneg by P’s HTTPFunctional ProfileSee the code itself for class and method documentation!LicenceThis is licensed under GNU General Public License (GPL) v3.0. See thelicense deedfor more details.ContactsLead Developer:Nicholas CarData Systems ArchitectSURROUND Australia Pty Ltd<nicholas.car@surroundaustralia.com><http://orcid.org/0000-0002-8742-7730>
Package: connex
ConnexConnex is aJAXlibrary built onEquinoxthat allows for fine-grained, dynamic control of neural network topology. With Connex, you canTurn any directed acyclic graph (DAG) into a trainable neural network.Add and remove both connections and neurons at the individual level.Set and modify dropout probabilities for all neurons individually.Easily toggle techniques such as normalization, adaptive activations, and self-attention.Export a trained network to a NetworkX weighted digraph for network analysis.InstallationpipinstallconnexUsageAs a tiny pedagogical example, let's create a trainable neural network from the following DAGwith input neuron 0 and output neurons 3 and 11 (in that order) and ReLU activation for the hidden neurons:importconnexascnximportjax.nnasjnn# Create the graph dataadjacency_dict={0:[1,2,3],1:[4],2:[4,5],4:[6],5:[7],6:[8,9],7:[10],8:[11],9:[11],10:[11]}# Specify the input and output neuronsinput_neurons=[0]output_neurons=[3,11]# Create the networknetwork=cnx.NeuralNetwork(adjacency_dict,input_neurons,output_neurons,jnn.relu)That's it! Aconnex.NeuralNetworkis a subclass ofequinox.Module, so it can be trained as such:importequinoxaseqximportjaximportjax.numpyasjnpimportoptax# Initialize the optimizeroptim=optax.adam(1e-3)opt_state=optim.init(eqx.filter(network,eqx.is_array))# Define the loss function@eqx.filter_value_and_graddefloss_fn(model,x,y):preds=jax.vmap(model)(x)returnjnp.mean((preds-y)**2)# Define a single training step@eqx.filter_jitdefstep(model,opt_state,x,y):loss,grads=loss_fn(model,x,y)updates,opt_state=optim.update(grads,opt_state,model)model=eqx.apply_updates(model,updates)returnmodel,opt_state,loss# Toy datax=jnp.expand_dims(jnp.linspace(0,2*jnp.pi,250),1)y=jnp.hstack((jnp.cos(x),jnp.sin(x)))# Training loopn_epochs=500forepochinrange(n_epochs):network,opt_state,loss=step(network,opt_state,x,y)print(f"Epoch:{epoch}Loss:{loss}")Now suppose we wish to add connections 1 → 6 and 2 → 11, remove neuron 9, and set the dropout probability of all hidden neurons to 0.1:# Add connectionsnetwork=cnx.add_connections(network,[(1,6),(2,11)])# Remove neuronnetwork=cnx.remove_neurons(network,[9])# Set dropout probabilitynetwork=cnx.set_dropout_p(network,0.1)That's all there is to it.  The new connections have been initialized with untrained parameters, and the neurons in the original network that have not been removed (along with their respective incoming and outgoing connections) have retained their trained parameters.For more information about manipulating connectivity structure and theNeuralNetworkbase class, please see the API section of the documentation. For examples of subclassingNeuralNetwork, please seeconnex.nn.Citation@software{gleyzer2023connex,author={Leonard Gleyzer},title={{C}onnex: Fine-grained Control over Neural Network Topology in {JAX}},url={http://github.com/leonard-gleyzer/connex},year={2023},}
Package: connexion-auth-paths-extd
Connexion Auth Paths ExtendedSmall connexion extension to add authentication into spec routesTheconnexion frameworkit's possible to use a parameter calledauth_all_paths(inFlaskAppandAioHttpApp), which in your documentation (link) is defined as::param auth_all_paths: whether to authenticate not defined paths
:type auth_all_paths: boolAnd it can be used this way, during app initialization:fromconnexionimportFlaskApp# or AioHttpAppconnexion_app=FlaskApp(__name__,specification_dir='swagger/',auth_all_paths=True)But the only routes added to the authentication are the404 Error route(link) routes, but there are other routes that should also be treated:/openapi.json/openapi.yamlopenapi_spec_pathThe idea of this extension is to apply the default authentication on these routes, without changing the behavior of anything else.Why?This was once a requirement requested by the security team in an internal project. The API documentation provides very detailed technical information for theattackersexternal world, sometimes including email addresses, internal application’s url, API’s structure, and other stuffs. Think that specification it’s like a map, It's also very helpful for them to dig for vulnerabilities and detect targets.What about the SwaggerUI (/ui/) route?It is not necessary, as it does not make much sense to ask for a auth/token on a page that will be accessed by the browser. And if some kind of authentication is required, it must be provided to consume the routes through the interface.InstallationInstall withpip:pipinstallconnexion-auth-paths-extdorpipinstallconnexion-auth-paths-extd[aiohttp]Usage/Examplesfromconnexion.extended.auth_paths_extdimportFlaskApp# or AioHttpAppconnexion_app=FlaskApp(__name__,specification_dir='swagger/',auth_all_paths=True)Almost the same, we just change where we are importing theFlaskAppclass from. Theauth_paths_extd.FlaskAppobject works exactly the same asconnexion.FlaskApp, same methods, attributes and initialization. No extra parameters are needed, just passauth_all_pathsasTrue.No dependencies are required in addition to theconnexionitself.A better exemple is onexamples folder.
Package: connexion-code-generator
connexion-code-generatorconnexion-code-generatoris a code CLI tool that generates Abstract or Protocol class definitions
based on your openapi.yaml specification. These class definitions then will be used to make sure our
connexion MethodViews are compatible with our API definition using static type checkers likemypyorpyright.It currently only supportsOpenAPI 3.0.Table of ContentsInstallationUsageLicenseInstallationconnexion-code-generatoris available on PyPi, so you can install it using the following command.pip install connexion-code-generatorKeep in mind that this project in beta stage so please pin the minor version of the package,
as there will be no backward incompatible changes in patch versions with the same minor version,
but there's no backward compatibility and API stability guaranteed between minor versions.UsageTo run it with its default config simply run theconnexion-protocol-generator generatecommand
in the same directory as youropenapi.yamlfile. It will create anapipython module with aview.pyfile inside it.Usingdatamodel-code-generatorto generate DTOsconnexion-code-generatordoes not care about the way you convert your OpenAPI object schemas to python
classes, it just assumes that any object defined in your schema has an equivalent python class in theapi.dtosmodule. As the convention for schema names in OpenAPI are snake-case but the convention for
class names in python is PascalCase, it assumes the conversion has been done, i.g: an schema with the namesome-api-requestshould have a class namedSomeApiRequest.This is done to prevent re-inventing the wheel as there are many good library and CLI applications that
achieve this conversion task with a high quality.We usedatamodel-code-generatorfor this. We first rundatamodel-code-generatoron our schema and store its
result in theapi.dtosmodule, then we runconnexion-code-generator.Advance optionsconnexion-code-generatorprovides the following options (available to you by runningconnexion-code-generator generate -h):-i, --inputOpenAPI specification file, defaults to./openapi.yaml-d, --dto-module-pathDTOs module name, defaults toapi.dtos-o, --outputOutput file path, default to./api/views.py-e, --error-typeThe DTO type for unknown error responses, defaults toErrorResponse--abstractGenerate abstract class instead of protocol class--syncGenerate sync methods instead of async methodsLicenseconnexion-code-generatoris distributed under the terms of theMITlicense.
Package: connexion-compose
Connexion ComposePurposeCreate Connexion schema composed from several files in a nested directory structure.Resulting schema automatically includes common defaults, which you can use or override.Requires Python 3.7+Installationpip install connexion-composeUsagefromconnexion_composeimportcompile_schemaspec_dir='some/dir'schema=compile_schema(spec_dir)Thecompile_schemafunction traverses the specification directory and all subdirectories,
creating YAML attributes according to the directory structure.
The bottom level files are "headers" and top level features, usually all contained in headers.py.For example, given the following directory structure:├── 10-header.yml
├── 90-footer.yml
├── definitions
│   └── 50-whatever.yml
├── parameters
│   ├── 10-par1.yml
│   └── 20-par2.yml
└── x
    └── y
        └── z.ymlThe resulting object will correspond to the following YAML input:[contents of 10-header.yml]
[contents of 90-footer.yml]
definitions:
  [contents of 50-whatever.yml]
parameters:
  [contents of 10-par1.yml]
  [contents of 20-par2.yml]
x:
  y:
    [contents of z.yml]Defaultsswagger:'2.0'info:contact:{name:Please add a contact name}description:Please add a descriptiontitle:Please add a titleversion:0.0.0x-visibility:unlistedbasePath:/schemes:[https]consumes:[application/json]produces:[application/json]definitions:Currency:{format:iso_4217,type:string}Decimal:{format:decimal,type:string}Path:{format:path,type:string}Timestamp:{format:rfc_3339,type:string}URL:{format:url,type:string}UUID:{format:uuid,type:string}
Package: connexion_sql_utils
Connexion Sqlalchemy UtilsSqlalchemy, Postgres, Connexion utilityDocumentation:https://connexion-sql-utils.readthedocs.io.FeaturesHelps create REST api’s quickly withConnexion,Sqlalchemy,
andPostgresqlRunning example api in DockerBy cloning the repo:gitclonehttps://github.com/m-housh/connexion_sql_utils.gitcd./connexion_sql_utilsdocker-composeupWithout cloning the repo:dockerpullmhoush/connexion_sql_utilsdockerpullpostgres/alpinedockerrun-d--namesome_postgres\-ePOSTGRES_PASSWORD=postgres\postgres:alpinedockerrun--rm-it--linksome_postgres:postgres\-eDB_HOST=postgres\-eDB_PASSWORD=postgres\-p"8080:8080"\mhoush/connexion_sql_utilsCheck out the example api athttp://localhost:8080/uiCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-03-08)First release on PyPI.0.1.3Added ability to pass a session into BaseMixin database methods.Addeddump_methoddecorator to allow custom methods to be called while
creating the json representation.0.1.4Added the ability to dump as dict instead of always being a json string.
Package: connio
connioA python concurrency agnostic communication library.Pass a URL to the single point API functionconnio.connection_for_url()and it will return a communication object with a common generic API.Helpful when dealing with instrumentation which work over serial line or TCP
(and in future USB) with simple REQ-REP communication protocols (example:SCPI).The request for a communication object is forwarded to the correspondingserialioorsockiolibraries depending on the
URL you give.Written in asyncio with support for different concurrency models:asyncioclassic blocking APIfuture based APIpython 2 compatible blocking API (for those pour souls stuck with python 2)InstallationFrom within your favorite python environment:pip install connioUsageimportasynciofromconnioimportconnection_for_urlasyncdefmain():# A local async serial linesl=connection_for_url("serial:///dev/ttyS0",parity="E")print(awaitsl.write_readline(b"*IDN?\n"))# An async serial line over telnet serversl=connection_for_url("rfc2217://moxa.acme.org:7890",parity="E")print(awaitsl.write_readline(b"*IDN?\n"))# An async TCP connectiontcp=connection_for_url("tcp://gepace.acme.org:5025")print(awaittcp.write_readline(b"*IDN?\n"))# An sync TCP connectiontcp=connection_for_url("tcp://gepace.acme.org:5025",concurrency="sync")print(tcp.write_readline(b"*IDN?\n"))asyncio.run(main())
Package: connman-dispatcher
# DescriptionRun scripts on network state changes# Installpip install connman-dispatcher [--user]# Usage$ connman-dispatcher -husage: connman-dispatcher [-h] -p PATHScripts are run from folders setted in -p argument.One can set more than one folder.When network state changes, each script is executed with either `up` or `down`argument, depening on the current network state.For example, if connman-dispatcher was run like this:connman-dispatcher -p /etc/connman-dispatcherAnd we have some scripts in bash in this folder, something like:```bashup() {# handle up state}down() {# handle down state}state="$1"case $state inup)up;;down)down;;esac```When network state changes from `down` to `up`, each script in `/etc/connman-dispatcher`will be executed with `up` argument, like this:/etc/connman-dispatcher/10_handle_network_state_change.sh up/etc/connman-dispatcher/some_other_executable upScripts, as well as script folders are sorted by name.
Package: connorama
Connoramacolours for python terminal
includestextandbackgroundcolouring
also includesstyle/font formattingInstructionsInstall:pip install connoramaInitialise in project:fromconnoramaimportText,Back,StyleUse the features!print(Text.red+Back.light_black+Style.bold+Style.underlined+"Hello world!"+Style.RESET_ALL)OptionsText + Backblack, white, red, green, yellow, blue, magenta, cyanlight_black, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyanRESET:removes any colouringStylebold:thicker textdim:dim text (same thickness as normal)underlined:underline under the textreverse:swithches the text's Text and Back colourshidden:hidden textRESET_ALL:removes Text, Back and StyleRESET_(style):removes the specific style
Package: connotati
ConnotatiConnotati(Italian forsalient characteristics and markings) is a small stupidpython 3.xscript for GNU/Linux or other POSIX systems supported by GTK+ (and supported byxdotoolandxpropfor windows pattern matching feature) to start GTK+ applications with given theme and variant.InstallationConnotatiis available through thePython Package Index (PyPI). Pip is already installed if you are using Python 3 >=3.4 downloaded frompython.org; if you're using a GNU/Linux distribution, you can find how to install it on thispage.
After setting up pip, you can installconnotatiby simply typing in your terminalpip3 install connotatiUsageThe script source code is heavily documented; you can access the command line help withconnotati --helpAboutThis program is licensed underGNU General Public License v3 or laterbyPellegrino Prevete. If you find this program useful, consider offering me abeer, a newcomputeror a part time remotejobto help me pay the bills.
Package: connPFM
connPFMA template repo to use for new repositories.Installationgit clone https://github.com/SPiN-Lab/connPFM.git
    cd connPFM
    pip3 install -e .[all]InstructionsReplaceconnPFMwith the new repo name across the whole repository.Enable the GitHub repository on Zenodo.Set up the GitHub repository on CircleCI.Set up the GitHub repository on ReadTheDocs.Make the first release on GitHub.The PyPi deployment Action will fail.Deploy to PyPi (instructions below based onthis page):pip install twinepython setup.py sdist bdist_wheelUpload to TestPyPi:twine upload --repository-url https://test.pypi.org/legacy/ dist/*Enter TestPyPi usernameEnter TestPyPi passwordUpload to PyPi (if TestPyPi worked):twine upload dist/*Enter PyPi usernameEnter PyPi passwordFuture GitHub releases should now deploy to PyPi via the Action without issue.Update the Zenodo badge now that there's a real release.You must do thisafterdeploying to PyPi because any new commits
after the first release will change the versioneer-managed version string.Add all important CI steps to the branch protection rules for themainbranch.Add Integrations for the following:AllContributorsWelcomeCodeCovcircleci-artifacts-redirectorRelease Drafter? Not sure if the Action can suitably replace the Integration.Information about this configurationContinuous integration via CircleCIThe default configuration uses CircleCI and make to manage testing.
After tests are run, code coverage information is pushed to CodeCov.
CircleCI will also build the documentation as part of CI, and an artifact redirector
(circleci-artifacts-redirector) is necessary to view the rendered documentation from each PR easily.Versioning with versioneerVersioneer is used to automatically track and update version strings.Linting with flake8, black, and isortflake8, black, and isort are used to manage code style.Reference management with duecreditduecredit is used to build reference lists for the codebase.
duecredit is included as a required dependency.Documentation with Sphinx and ReadTheDocsThe package documentation is built with Sphinx and we assume that the documentation will be hosted by ReadTheDocs.Deployment to PyPiThe package is designed to be pip installable and hosted on PyPi.
New releases are pushed to PyPi automatically via a GitHub Action.