Saravanan666/pypi-org huggingface dataset:
Package: dss-python-backend
DSS-Python: Backenddss_python_backendprovides low-level bindings for an implementation of EPRI's OpenDSS, usingCFFIand ourDSS C-API library and headers. It contains the native libraries (and DLLs) required by DSS-Python. This is considered an implementation detail.This is not intended for direct usage,see DSS-PythonandOpenDSSDirect.pyinstead!After several years integrated into DSS-Python, this package was created in April 2023 to make the maintenance easier. Seehttps://github.com/dss-extensions/dss_python/issues/51This package includes:CFFI modules for DSS C-APICFFI modules for user-models (only the code for generator user-models is being compiled nowadays)DSS C-API libraries, DLLs, and headers
Package: ds-sqlwhat
sqlwhatsqlwhatenables you to write Submission Correctness Tests (SCTs) for interactive SQL exercises on DataCamp.If you are new to teaching on DataCamp, check outhttps://authoring.datacamp.com.If you want to learn what SCTs are and how they work, visitthis articlespecifically.For more information about writing SCTs for SQL exercises, consulthttps://sqlwhat.readthedocs.io.Installingpip install sqlwhat     # install from pypi
make install            # install from sourceReferenceAPI Docs:https://sqlwhat.readthedocs.ioAST viewer:https://ast-viewer.datacamp.comExtensions:https://github.com/datacamp/sqlwhat-extRaising issues with how SQL is parsedPlease raise an issue on the respsective parser repo:antlr-tsqlantlr-psqlBasic Usefromtcs_sqlwhat2.StateimportState# State holds info needed for testsfromtcs_sqlwhat2.ReporterimportReporterfromtcs_sqlwhat2.checksimport*# imports all SCTsfromsqlalchemyimportcreate_enginecode="SELECT * FROM artists WHERE id < 100"state=State(student_code=code,solution_code=code,pre_exercise_code="",student_conn=create_engine('sqlite:///'),solution_conn=create_engine('sqlite:///'),student_result={'id':[1,2,3],'name':['greg','jon','martha']},solution_result={'id':[1,2,3],'name':['toby','keith','deb']},reporter=Reporter())# test below passes, since code is equal for student and solutionhas_equal_ast(state)# test below raises a TestFail error, since 'name' col of results# doesn't match between student and solution resultscheck_result(state)# shows error datastate.reporter.build_payload()# can also be done using a chainfromtcs_sqlwhat2.sct_syntaximportExEx(state).check_result()Running unit testspytest-m"not backend"If you also want to run the backend tests, you need to set aGITHUB_TOKENenvironment variable with access to the (private)sqlbackendrepository.
After this, you can:makeinstall
pytestRules of testingRunning queries is the backend's jobIf a test doesn't run queries, it doesn't need the backendVery few tests should run queriesBuilding DocsInstall sqlwhat and run ..cd docs
make html
Package: dsssample
A sample Python projectA sample project that exists as an aid to thePython Packaging User
Guide'sTutorial on Packaging and Distributing
Projects.This project does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.The source for this project is available here.Most of the configuration for a Python project is done in thesetup.pyfile,
an example of which is included in this project. You should edit this file
accordingly to adapt this sample project to your needs.This is the README file for the project.The file should use UTF-8 encoding and can be written usingreStructuredTextormarkdownwith the appropriatekey set. It will be used to generate the project webpage on PyPI and will be
displayed as the project homepage on common code-hosting services, and should be
written for that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not a
good idea, although a simple “What's New” section for the most recent version
may be appropriate.
Package: ds-stack
Data Structure :- StackThis python module can use the different functions of Stack Data Structurelike:1.isempty()2.push(,<item_needed_to_be_added_to_the_stack>)3.pop()4.peek()5.display()To Install:pip install ds_stackUseage:(1) .isempty function returns True or false , Must input a list and store return value in a variable in main code(2) .push function returns the stack,top , Must input a list,an value to push in the stack  and store return value in a variable in main code(3) pop function prints the error(or) returns the stack,the removed item, The top .Must input a list and store return value in a variable in main code(4) .peek function returns the error(or)top's value . Must input a list and store return value in a variable in main code(5) .display function returns the error(or)stack in order . Must input a list and direct exection in main codeExamples:(1) .isempty():import ds_stack as stack

 a=[2,3,4,5,6] #stack

 x=stack.isempty(a)

 print(x)  



 #O/P

 #True(2) .push(,<item_needed_to_be_added_to_the_stack>):import ds_stack as stack

 a=[2,3,4,5,6]

 a,t=stack.push(a,9)

 print(a)

 print(t)  



 #O/P

 #SUCCESS

 #[2,3,4,5,6,9]

 #5(3) .pop():import ds_stack as stack

 a=[2,3,4,5,6] #stack

 a,t,i =stack.pop(a)

 print(a)  

 print(t)

 print(i)



 #O/P

 #[2,3,4,5]

 #3

 #6(4) .peek():import ds_stack as stack

 a=[2,3,4,5,6] #stack

 t=stack.peek(a)

 print(t)  



 #O/P

 #6(5) .display():import ds_stack as stack

 a=[2,3,4,5,6] #stack

 stack.display(a) 



 #O/P

 #6 <---top

 #5

 #4

 #3

 #2=========================================================================😊😊😊 HAPPY CODING😊😊😊=========================================================================Kindly point out any error or a feature that needs to be added
Package: ds-stats-mexico
DocumentaciÃ³nInstalaciÃ³nPara poder ejecutar el proyecto es necesario tener instalado Python 3.7.4 y las siguientes librerÃ­as:matplotlibpip install matplotlib ds-stats-mexicoUsoImporte la librerÃ­a:import ds_stats_mexico as dsmPara obtener los datos de los 10 paÃ­ses mÃ¡s ricos del mundo:dsm.grafica_barras_paises_ricos()Para obtener los datos del Ã­ndice de envejecimiento de la poblaciÃ³n de MÃ©xico:dsm.grafica_lineal_envejecimiento_mexico()Para obtener los datos de mortalidad en menores de un aÃ±o en MÃ©xico:dsm.grafica_pastel_mortalidad_infantil_mexico_causas()por sexo:dsm.grafica_pastel_mortalidad_infantil_mexico_sexo()Creado por Erick Flores
Package: ds-store
What is this?ds_storelets you examine and modify.DS_Storefiles from Python
code; since it is written in pure Python, it is portable and will run on any
platform, not just Mac OS X.Credit is due to Wim Lewis, Mark Mentovai and Yvan Barthélemy for
reverse-engineering the .DS_Store file format. SeeWim Lewis’ excellent documentation on CPANfor more information.
Package: ds-suite
DataScience SuiteEste pacote tem o objetivo de agregar os diversos códigos autorais que criamos para todo o pipeline de produção dos modelos.
Atualmente é apenas um teste e possui apenas a library dssuite(ring.py) com algumas funções que facilitam leitura, tuning e avaliação dos modelos.Documentação rudimentarSampleStress(Classe)Classe que permite fazer brute force de dataset para identificar melhor amostra de treino, razão de True/False e melhores Hyperparametros.
É composta por 3 funções construtoras e utiliza várias outras presentes dentro desse pacote.
Para avaliar o modelo é possível usar função de scoring do próprio Sklearn ou criar o seu próprio parametro de avaliação. Para fazer isso, ver maiores informações na documentação do sklearn:https://scikit-learn.org/stable/modules/generated/sklearn.metrics.make_scorer.htmlDentro desse pacote temos a custom_confusion que foi feita para ser usada no maker_scorer do SKlearnAlgumas explicações de parâmetros da classe:model:Modelo a ser otimizadoiterations: Número de rodadas de iteração a serem realizadas, quanto mais rodadas mais tempo vai demorar!(exponencial)ratio: ritmo de evolução da proporção True/False entre as iterações. Ex.: Iterações = 10, ratio = 1 então ao todo 10 tamanhos de amostras serão testadas e para cada uma dessas 10 amostras, 10 razões de proporção entre True/False vão ser testadas. Total de rodadas de otimização do exemplo: 100scorer: Aceita 'recall', 'precision', 'f1' e etc.. Aceita função própria.regression: A classe de sample_stressing, por padrão, foca em modelos de classificação porém é possível usar ela para modelos de regressão também.drop: Lista de colunas a serem dropadas do dataset final, se não existir nenhuma só ignorar.ResampleFunção usada pela classe SampleStress para gerar as amostras com diferentes tamanhos e razões de targetdefresample(dataframe,sample_ratio=1,sample_size=0):header=dataframe.columnspositives=(dataframe.loc[dataframe['target']==1]).to_numpy()pos_ratio=int(sample_size/(sample_ratio+1))ifsample_size>0:ifpos_ratio<len(positives):positives=positives[:pos_ratio]else:iterations=int(pos_ratio/len(positives))r=int(((pos_ratio/len(positives))%1)*len(positives))temp=positivesforiinrange(iterations-1):temp=np.append(temp,positives,axis=0)positives=np.append(temp,positives[:r],axis=0)sample_size=len(positives)else:sample_size=len(positives)positives=pd.DataFrame(positives)positives.columns=headerneg_ratio=sample_size*sample_rationegatives=(dataframe.loc[dataframe['target']==0])[:neg_ratio].to_numpy()negatives=pd.DataFrame(negatives)negatives.columns=headerreturnnegatives.append(positives).reset_index().drop(columns=['index'])DataBuilderPara datasets muito grandes, construí essa classe que tem duas funções que iteram pelo dataframe e fazem o tratamento dos dados para tornar o dataset mais leve e reduzir o consumo de memória ram. Isso acelera muito o tempo de manipulação dos dados pois impede que os dados vazem para armazenamento mais lento como HD/SSDA classe ainda está "especializada" para o caso que foi construída, isso é rápido de ajeitar e é o próximo passo para ela. Por esse motivo ainda não vou colocar mais detalhes.
Package: dssystem
About this packageThe basic conceptSAW methodis to find the sum of the weighted performance rating for each alternative on all attributes.SAWmethod requires aprocessof normalizing the decision matrix (X) to a scale that can be compared with all the ratings of existing alternatives.DepedenciesPython >= 3numpypandasFunctioninit (data,weights, non_beneficial = None)Initializer provides 2 required parameters and 1 optional parameter, data is the dataset with DataFrame format, weights is the values that provided to get a optimal alternative, non_beneficial is the column that has type "cost", not benefit.getDecisionMatrixFunction that return formatted matrix from datasetnormalizeFunction that return normalized matrix from decision matrixcreateDecisionFunction that return the list of alternative's scoregetChosenOneByIndexFunction that return the chosen one from the alternativesExample caseWe will simulate "Selection of land - Water resources management" which has 4 criteria(s) : Rainfall, Drainage, Usage of land, Tophography. Usage of land is the only one non beneficial criteria.In this case we'll use the weight values like this :[0.25, 0.25, 0.25, 0.25]The example dataset that we had[[25,  67,  7,  20],[21,  78,  6,  24],[19,  53,  5,  33],
[22,  25,  2,  31]]Example of codefrom dssystem.method import SimpleAdditiveWeighted
import numpy as np
import pandas as pd
dataset = pd.DataFrame({"Rainfall" : [25, 21, 19, 22],
						"Drainage" : [67, 78, 53, 25],
						"Usage of land" : [7, 6, 5, 2],
						"Tophography" : [20, 24, 33, 31]}, 
						index=["L1","L2","L3","L4"])
						
method = SimpleAdditiveWeighted(dataset, [.25, .25 , .25, .25], ["Usage of land"])
print(method.getChosenOneByIndex()) #to get chosen alternative name
print(method.getDecisionMatrix()) #to get decision matrix
print(method.normalize()) #to get normalized decision matrix
print(method.createDecision()) #to get list of alternative's scoreExample of outputL4 #L4 is the chosen one

#output of the decision matrix
[[25 67  7 20]
 [21 78  6 24]
 [19 53  5 33]
 [22 25  2 31]]

#output of normalized decision matrix
[[1.   0.86 0.29 0.61]
 [0.84 1.   0.33 0.73]
 [0.76 0.68 0.4  1.  ]
 [0.88 0.32 1.   0.94]]

#output of list of alternative's score
[0.69 0.72 0.71 0.79]
Package: dstack
Orchestrate GPU workloads effortlessly on any cloudDocs•Examples•Discorddstackis an open-source engine for running GPU workloads on any cloud.
It works with a wide range of cloud GPU providers (AWS, GCP, Azure, Lambda, TensorDock, Vast.ai, etc.)
as well as on-premises servers.Latest news ✨[2024/01]dstack 0.15.1: Kubernetes integration preview(Release)[2024/01]dstack 0.15.0: Resources, authentication, and more(Release)[2024/01]dstack 0.14.0: OpenAI-compatible endpoints preview(Release)[2023/12]dstack 0.13.0: Disk size, CUDA 12.1, Mixtral, and more(Release)InstallationBefore usingdstackthrough CLI or API, set up adstackserver.Install the serverThe easiest way to install the server, is viapip:pipinstall"dstack[all]"-UConfigure backendsIf you have default AWS, GCP, or Azure credentials on your machine, thedstackserver will pick them up automatically.Otherwise, you need to manually specify the cloud credentials in~/.dstack/server/config.yml.For further details on setting up the server, refer toinstallation.Start the serverTo start the server, use thedstack servercommand:$dstackserver

Applying~/.dstack/server/config.yml...

Theadmintokenis"bbae0f28-d3dd-4820-bf61-8f4bb40815da"Theserverisrunningathttp://127.0.0.1:3000/NoteIt's also possible to run the server viaDocker.CLI & APIOnce the server is up, you can use eitherdstack's CLI or API to run workloads.
Below is a live demo of how it works with the CLI.Dev environmentsDev environments allow you to quickly provision a machine with a pre-configured environment, resources, IDE, code, etc.TasksTasks are perfect for scheduling all kinds of jobs (e.g., training, fine-tuning, processing data, batch inference, etc.)
as well as running web applications.ServicesServices make it very easy to deploy any model or web application as a public endpoint.More informationFor additional information and examples, see the following links:DocsExamplesDiscordLicenceMozilla Public License 2.0
Package: dstack-factory
dstack-factory consists of two components: (1)factoryand (2)runtime.factoryis a service that builds (or downloads) python wheels from a pip requirements file or from a wheel package uploaded to the wheelhouse. If a python package is already available as wheel package, it is cached. Otherwise the source is downloaded from pip, git or any other source supported by pip and compiled/packaged as a wheel file.Examples of python packages that currently still need to be build are:psycopg2lxmlpycryptopillowweasyprint (and it’s dependencies)anything hosted on GitHub, e.g. forks of python packages or unreleased versionsruntimeis a base docker image that contains all the necessary libraries to run most popular python packages with external dependencies. For example pandas, matplotlib, weasyprint, etc. all require non-python libraries.
In addition to the base runtime docker image,dstack-factoryalso provides three entry point Dockerfiles to support different workflows for building and deploying docker and python based applications.DocumentationThe documentation can be found at:https://pythonhosted.org/dstack-factory/
Package: dstack-tasks
dstack-tasksdstack-tasks is a collection of invoke tasks that wrap common tools and services to make it easier to deploy code.Tools wrapped:- docker
- docker-compose
- postgresql (backup and restore)
- mysql (backup and restore)
- awscli (s3 only for now)
- git
- python
- django manage.pyThe tasks are designed to run as a standalone console script (dstack) or as a collection of tasks to build on in
your invoke and fabric2* tasks.InstallationTo install, use pip:pip install --pre dstack-tasksOnce installed, you can use it from within your project directory. The console script uses a.envfile to configure itself. At the moment, some tasks still require environmental variables before it can be used.Example usageTo see list of tasks, usedstack –list. To see the help text of each task, usedstack <task name> –help. See below
for example usage:# Backs-up database
dstack postgres backup --tag local-dev

# Release new version of app and publish to S3 (requires ~/.aws/credentials to be set up
dstack release_code --upload --not-staticdstack-tasks can also be used as a base library for yourinvokeandfabric2tasks:pip install https://github.com/fabric/fabric/archive/v2.zipAll tasks can be run in “dry” mode or in a specific environment. To see what a tasks will execute, run it indrymode:dstack dry postgres backupTo give your task additional context, you can use the specialetask to load environmental variables
from a.envfile:dstack e release_codeThis can be used to for example specify a different Github repo etc.NotesIt is important to note that dstack-tasks is console script build on top of invoke and is thus primarily meant for
executing tasks locally. However, dstack-tasks fully supports being used as a library in your fabric (version 2)
fabfile.py. Simply import all tasks fromdstack_tasksin your fabfile and you can execute them on a remote server
using something likefab -H example.com e deploy –version 1.0.0.At it’s core however, invoke just wraps bash commands and executes them on the server. This means that for advanced uses
it might be worthwhile to install dstack-tasks on the server to allow complex tasks to be written in python instead of
bash. So, instead of runningls -alvia fabric 2 on the remote server and trying to capture and parse the output, you
can use an appropriate python package to get a list of files in a directory.Known Issuesdstack-tasks does not yet include a generic task that can be used to call itself on the server. There is also currently
an issue with setting runtime environmental variables using Fabric2 to run tasks remotely.
Package: dstart
dstart - Docker startCommand to select services to start with docker-composeInstallpip3 install dstartUsage>dstartSPACEBAR to select servicesENTER to start selected services$dstart--help
usage:dstart[-h][-fFILE][--print-only][--extra...]Commandtoselectservicestostartwithdocker-compose.

optionalarguments:-h,--helpshowthishelpmessageandexit-fFILE,--fileFILESpecifyanalternatecomposefile(default:docker-compose.yml)--print-onlyJustprintdocker-composecommandandexit--extra...Extraargumentswillbepassedto`docker-composeup`commandHow does it workIt usesdocker-composecommand to list all running container thendocker-compose up <SERVICES>to start themSee alsodkill- Docker Kill
Package: dstate
dstate - distributed state machinesdstate is the library for distributed finite state machines. Library's mission is to add more clarity and maintainability to distributed applications, which can go finite state machine approach. It adds persistence and locks on the powerfulpython-statemachine. With future releases timers support will be added.Install./shell/install-local.py# orpoetryinstall--withdev--withpython-statemachine--withdriverUsagePretty unstable. No examples yet.Tests fileDev./shell/ruff.sh
./shell/black.sh
./shell/pytest-smoke.sh
./shell/flake8.sh
./shell/mypy.shAlso the same set is supported withpre-commit:pre-commitinstallFast smoke pytests with watcher:./shell/ptw.shFull environment tests requiredocker compose:./full_tests/shell/beg-mongo.sh
./shell/pytest-full.sh
./full_tests/shell/end-mongo.sh
Package: dstat-plugins
AboutDstat is a versatile replacement for vmstat, iostat, mpstat, netstat and
ifstat. Dstat overcomes some of their limitations and adds some extra
features, more counters and flexibility. Dstat is handy for monitoring
systems during performance tuning tests, benchmarks or troubleshooting.This is a fork of dstat’s plugins intended to maintain full compatibility
version 1.7 of dstat, and any future released versions.LicensingDstat and its plugins are licensed under the GNU GPL v2. As such,
new plugins written here will be licensed that way to allow simpler
distribution with dstat.  You can find a copy of the GPLv2 in COPYING.The testing code in this repository, however, is licensed under the
Apache 2.0 license. This code can be found under the filename LICENSE.
Package: dst-enc
1.Simple Encode & Decode>>> # How To Encode
>>> import dst_enc
>>> dst_enc.encode('CodeInHere')>>> # How To Decode
>>> import dst_enc
>>> dst_enc.decode('CodeEncode')2.Modifing base64 encode function>>> # How To Encode
>>> import dst_enc
>>> bs=dst_enc.base_dst()
>>> bs.bs64encode('CodeInHere')>>> # How To Decode
>>> import dst_enc
>>> bs=dst_enc.base_dst()
>>> bs.bs64decode('CodeEncode')
Package: dstk-x250
DSTKFree software: Apache Software License 2.0OverviewDSTKest une libraire haut-niveau pour faciliter le développement et le déploiment d'outil de machine learning. Il s'articule essentiellement autour de 2 outils :PyTorch ;Scikit-Learn.L'ancien nom x250 faisait référence au code boite X250 qui est le code boite de datalabs/IA Factory. Le développement de ce package est étroitement lié au développement du template data science (qui aujourd'hui a fusionné avec le socle Python).DTSKest compatible avecPython >= 3.5, maisPython >= 3.8est fortement recommandé.DocumentationUne documentation Sphinx hébergée par Read the Docs est disponible.InstallationPour installer DSTK utiliser la commande :pip install dstk-x250.Release Notes3.0Changement de nom,la librairie x250 devient DSTKafin d'être rendu publique sur PyPi dans un premiet temps et sur conda dans un second.2.0Résolutions de bugs diverses.Concept de Callback pour x250.pytorch permettant de rendre la partie entraînement plus modulaire et lisible.Intégration du concept de SWA (Stochastic Weight Averaging) pour rendre les modèles plus robuste à l'inférence.1.0Séparation du template data science et des _utils.py afin d'être intégré au socle Python d'Arkéa.Création du package x250 restructurant les _utils.py.Intégration de l'utilitaire PyTorch permettant de wrapper un réseau profond à Scikit-Learn simplement.0.1Intégration de fonctions et classes utilitaires au template dans des fichiers _utils.py à différent niveau de la structure du template.0.0Création du squelette template data science.
Package: dstl
DataSet TransLation (DSTL) provides utilities to translate annotated natural language data from one language to another.Documentation:https://kabirkhan.github.io/dstlSource Code:https://github.com/kabirkhan/dstlType Hints: Comprehensive Typing system based on Python 3.6+ Type HintsRequirementsPython 3.6+Installation$pipinstalldstl---> 100%Successfully installed dstlLicenseThis project is licensed under the terms of the MIT license.