Saravanan666/pypi-org huggingface dataset:
Package: effcossim
Efficient Pairwise Cosine Similarity ComputationThe (i, j)-entry of the output matrix is the cosine distance between the i-th row of A and the j-th row of B. This function is only a wrapper, it uses the implementation of cosine_similarity from scikit-learn and the  implementation of awesome_cossim_topn from sparse_dot_topn.
For more details, please check:https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.cosine_similarity.htmlhttps://github.com/ing-bank/sparse_dot_topnTo install this package:pipinstalleffcossimSample code:fromnumpyimportarrayfromeffcossim.pcsimportpairwise_cosine_similarity,pp_pcsA=array([[1,2,3],[0,1,2],[5,1,1]])B=array([[1,1,2],[0,1,2],[5,0,1],[0,0,4]])# scikit-learn implementationM1=pairwise_cosine_similarity(A=A,B=B,efficient=False,dense_output=True)# sparse_dot_topn implementationM2=pairwise_cosine_similarity(A=A,B=B,efficient=True,n_top=4,lower_bound=0.5,n_jobs=2,dense_output=True)Whenefficient=True, in each row of the output matrix only the topn_topentries abovelower_boundare retained (lower memory impacts). Furthermore, ifn_jobsis larger than 1, parallel computations are applied (higher speed).If multiple comparisons are required, the parallel implementation can be used.l1=[random(m=10000,n=1000,density=0.3,)for_inrange(6)]l2=[random(m=10000,n=1000,density=0.3,)for_inrange(6)]L=pp_pcs(l1=l1,l2=l2,n_workers=2,efficient=True,n_top=10,lower_bound=0.3,n_jobs=2,dense_output=False)The output is a list where the k-th element is the output ofpairwise_cosine_similarity(l1[k],l2[k])For further examples, check the notebook.
Package: effect-edc
EFFECT EdcThe EFFECT TrialFluconazole plus flucytosine vs. fluconazole alone for cryptococcal antigen-positive patients identified through screening:
A phase III randomised controlled trial(EFFECT - Efficacy of Flucytosine and Fluconazole as Early Cryptococcal Treatment)https://www.isrctn.com/ISRCTN30579828See alsohttps://github.com/clinicedc/edcInstallationTo setup and run a test server locallyYou’ll need mysql. Create the databasemysql-Bse'create database effect character set utf8;'Create a virtualenv, clone the main repo and checkout mastercondacreate-nedcpython=3.11condaactivateedcClone the main repo and checkout mastermkdir~/projectscdprojectshttps://github.com/effect-trial/effect-edc.gitcd~/projects/effect-edcgitcheckoutmainCopy the test environment filecd~/projects/effect-edcgitcheckoutmaincp.env.tests.envEdit the environment file (.env) to include your mysql password in theDATABASE_URL.# look for and update this lineDATABASE_URL=mysql://user:password@127.0.0.1:3306/effectContinue with the installationcd~/projects/effect-edcgitcheckoutmainpipinstall.pipinstall-U-rrequirements.txtpythonmanage.pymigratepythonmanage.pyimport_randomization_listpythonmanage.pyimport_holidaysCreate a user and start uprunservercd~/projects/effect-edcgitcheckoutmainpythonmanage.pycreatesuperuserpythonmanage.pyrunserverLogin:http://localhost:8000
Package: effector
EffectorDocumenation|Global Effect|Regional Effect|API|TutorialsEffectoris a python package for global and regional effect analysis.InstallationEffectoris compatible withPython 3.7+. We recommend to first create a virtual environment withconda:condacreate-neffectorpython=3.7
condaactivateeffectorand then installEffectorviapip:pipinstalleffectorMethods and PublicationsMethodsEffectorimplements the following methods:MethodGlobal EffectRegional EffectPDPPDPRegionalPDPd-PDPDerivativePDPRegionalDerivativePDPALEALERegionalALERHALERHALERegionalRHALESHAP-DPSHAPDependenceRegionalSHAPPublicationsThe methods above are based on the following publications:Global Effect:PDP and d-PDP:Friedman, Jerome H. "Greedy function approximation: a gradient boosting machine." Annals of statistics (2001): 1189-1232.ALE:Apley, Daniel W. "Visualizing the effects of predictor variables in black box supervised learning models." arXiv preprint arXiv:1612.08468 (2016).RHALE:Gkolemis, Vasilis, "RHALESHAP-DP:Lundberg, Scott M., and Su-In Lee. "A unified approach to interpreting model predictions." Advances in neural information processing systems. 2017.Regional Effect:REPID: Regional Effect Plots with implicit Interaction DetectionDecomposing Global Feature Effects Based on Feature InteractionsRegionally Additive Models: Explainable-by-design models minimizing feature interactions
Package: effects
classesSmart, pythonic, ad-hoc, typed polymorphism for Python.FeaturesProvides a bunch of primitives to write declarative business logicEnforces better architectureFully typed with annotations and checked withmypy,PEP561 compatibleAllows to write a lot of simple code without inheritance or interfacesPythonic and pleasant to write and to read (!)Easy to start: has lots of docs, tests, and tutorialsInstallationpipinstallclassesYou also need toconfiguremypycorrectly and install our plugin
to fixthis existing issue:# In setup.cfg or mypy.ini:[mypy]plugins=classes.contrib.mypy.typeclass_pluginWithout this step, your project will report type-violations here and there.We also recommend to use the samemypysettingswe use.Make sure you know how to get started,check out our docs!ExampleImagine, that you want to bound implementation to some particular type.
Like, strings behave like this, numbers behave like that, and so on.The good realworld example isdjangorestframework.
It is build around the idea that different
data types should be converted differently to and fromjsonformat.What is the "traditional" (or outdated if you will!) approach?
To create tons of classes for different data types and use them.That's how we end up with classes like so:classIntField(Field):deffrom_json(self,value):returnvaluedefto_json(self,value):returnvalueIt literally has a lot of problems:It is hard to type this code. How can I be sure that myjsonwill be parsed by the given schema?It contains a lot of boilerplateIt has complex API: there are usually several methods to override, some fields to adjust. Moreover, we use a class, not a callableIt is hard to extend the default library for new custom types you will have in your own projectThere should be a better way of solving this problem!
And typeclasses are a better way!How would new API look like with this concept?>>>fromtypingimportUnion>>>fromclassesimporttypeclass>>>@typeclass...defto_json(instance)->str:..."""This is a typeclass definition to covert things to json."""...>>>@to_json.instance(int)...@to_json.instance(float)...def_to_json_int(instance:Union[int,float])->str:...returnstr(instance)...>>>@to_json.instance(bool)...def_to_json_bool(instance:bool)->str:...return'true'ifinstanceelse'false'...>>>@to_json.instance(list)...def_to_json_list(instance:list)->str:...return'[{0}]'.format(...', '.join(to_json(list_item)forlist_itemininstance),...)...See how easy it is to works with types and implementation?Typeclass is represented as a regular function, so you can use it like one:>>>to_json(True)'true'>>>to_json(1)'1'>>>to_json([False,1,2])'[false, 1, 2]'And it easy to extend this typeclass with your own classes as well:>>># Pretending to import the existing library from somewhere:>>># from to_json import to_json>>>importdatetimeasdt>>>@to_json.instance(dt.datetime)...def_to_json_datetime(instance:dt.datetime)->str:...returninstance.isoformat()...>>>to_json(dt.datetime(2019,10,31,12,28,00))'2019-10-31T12:28:00'That's how simple, safe, and powerful typeclasses are!
Make sure tocheck out our docsto learn more.LicenseBSD 2-Clause
Package: effect-size-analysis
Effect size packagePython package to calculate affect sizes (Cohen's δ, Hedge's g, Cliff's δ and Vargha-Delaney's A)At the moment, only Cliff's delta is implemented. The other effect sizes will be added soon.Usagefromeffect_size_analysisimportcliff_deltafromnumpy.randomimportrandx:ndarray=rand(100)y:ndarray=rand(100)cliff_delta(s1=x,s2=y,alpha=0.05,accurate_ci=True)(0.0136, (-0.1455859031658134, 0.17209949612394954))The first value is the delta value, while the second tuple represents the confidence interval al 95%.
Package: effectus
What?You provide it with a series of numbers.
It tells you whether a pareto distribution is present.Why?Mean,MedianandMost likely valueregularly hide that a
minority of causes provokes a majority of effects.The Fallacy of the Arithmetic Meanexplains the situation in-depth.How?First, install it:$pip3installeffectusThen, in your Python shell do:fromeffectusimportEffectsEffects([789,621,109,65,45,30,27,15,12,9])<paretopresent[0.707]:1/5causes=>4/5effects[total∆:2.3%]>If you want 80% of results, you need only 20% of causes.» Documentation
Package: efficiency
efficiencyThis is a package of useful one-line logging functions made by Zhijing.InstallationRequirement: Python 3pip install --upgrade  git+https://github.com/zhijing-jin/efficiency.gitLogging ShortcutsObtain time:>>>fromefficiency.logimportshow_time,fwrite>>>time_stamp=show_time()time:11241933-41>>>time_stamp'11241933'# means: Nov 24th, 19:33Writing out to files by one line:>>>text="This is handy!">>>fwrite(text,"temp.txt")Printing out variables (name + value) easily:>>>num1=7>>>num2=2>>>num3=9>>>show_var(["num1","num2","num3"])num1:7num2:2num3:9ML-Related>>>fromefficiency.logimportgpu_mem>>>gpu_mem(gpu_id=0)4101# Currently, GPU Memory of GPU #0 is 4101 MiB>>>fromefficiency.functionimportset_seed>>>set_seed(0)[Info]seedsetto:0# set the seed for random, numpy and pytorchUseful Functions>>>fromefficiency.functionimportshell>>>stdout,stderr=shell("cat temp.txt")>>>stdoutb'This is handy!'Miscellaneous FunctionsFormatting README.md BetterThis is the way to automatically generate table of contents for an .md file usingmarkdown_toc:# Step 1. download the file to your local execution path `/usr/local/bin/`
curl \
  https://raw.githubusercontent.com/alexharv074/markdown_toc/master/mdtoc.rb -o \
  /usr/local/bin/mdtoc.rb

# Step 2. generate the ToC in the "copy" mode
mdtoc.rb README.md

# Alternatively, you can automatically add the content to your copyboard and paste it to your .md
mdtoc.rb README.md | pbcopy
Package: efficient-apriori
Efficient-AprioriAn efficient pure Python implementation of the Apriori algorithm. Works with Python 3.7+.The apriori algorithm uncovers hidden structures in categorical data.
The classical example is a database containing purchases from a supermarket.
Every purchase has a number of items associated with it.
We would like to uncover association rules such as{bread, eggs} -> {bacon}from the data.
This is the goal ofassociation rule learning, and theApriori algorithmis arguably the most famous algorithm for this problem.
This repository contains an efficient, well-tested implementation of the apriori algorithm as described in theoriginal paperby Agrawal et al, published in 1994.The code is stable and in widespread use.It's cited in the book "Mastering Machine Learning Algorithms" by Bonaccorso.The code is fast.See timings inthis PR.ExampleHere's a minimal working example.
Notice that in every transaction witheggspresent,baconis present too.
Therefore, the rule{eggs} -> {bacon}is returned with 100 % confidence.fromefficient_aprioriimportaprioritransactions=[('eggs','bacon','soup'),('eggs','bacon','apple'),('soup','bacon','banana')]itemsets,rules=apriori(transactions,min_support=0.5,min_confidence=1)print(rules)# [{eggs} -> {bacon}, {soup} -> {bacon}]If your data is in a pandas DataFrame, you mustconvert it to a list of tuples.
Do you havemissing values, or does the algorithmrun for a long time? Seethis comment.More examples are included below.InstallationThe software is available through GitHub, and throughPyPI.
You may install the software usingpip.pipinstallefficient-aprioriContributingYou are very welcome to scrutinize the code and make pull requests if you have suggestions and improvements.
Your submitted code must be PEP8 compliant, and all tests must pass.
See list of contributorshere.More examplesFiltering and sorting association rulesIt's possible to filter and sort the returned list of association rules.fromefficient_aprioriimportaprioritransactions=[('eggs','bacon','soup'),('eggs','bacon','apple'),('soup','bacon','banana')]itemsets,rules=apriori(transactions,min_support=0.2,min_confidence=1)# Print out every rule with 2 items on the left hand side,# 1 item on the right hand side, sorted by liftrules_rhs=filter(lambdarule:len(rule.lhs)==2andlen(rule.rhs)==1,rules)forruleinsorted(rules_rhs,key=lambdarule:rule.lift):print(rule)# Prints the rule and its confidence, support, lift, ...Transactions with IDsIf you need to know which transactions occurred in the frequent itemsets, set theoutput_transaction_idsparameter toTrue.
This changes the output to containItemsetCountobjects for each itemset.
The objects have amembersproperty containing is the set of ids of frequent transactions as well as acountproperty.
The ids are the enumeration of the transactions in the order they appear.fromefficient_aprioriimportaprioritransactions=[('eggs','bacon','soup'),('eggs','bacon','apple'),('soup','bacon','banana')]itemsets,rules=apriori(transactions,output_transaction_ids=True)print(itemsets)# {1: {('bacon',): ItemsetCount(itemset_count=3, members={0, 1, 2}), ...
Package: efficientbioai
EfficientBioAIThis package mainly focus on the efficiency of BioImage AI tasks. For the moment we just implemented quantization algorithm.Introduction:The whole project contains two parts: quantization and inference. In the quantization step, we quantize the pretrained model into int8 precision and transform them to the format suitable to the inference engine. The next step is to run the inference on the inference engine and do the analysis. The inference engine that we choose isopenvinofor intel CPU andtensorrtfor nvidia GPU.We support several popular bioimage AI tools like(mmv_im2im,cellpose). Also user-defined pytorch models are supported.Installation:pip:First create a virtual environment using conda:condaconfig--addchannelsconda-forge
condacreate-nefficientbioaipython=3.8setuptools=59.5.0Then we need to install the dependencies:gitclonegit@github.com:ModelTC/MQBench.gitcdMQBench
pythonsetup.pyinstallcd..Then install theefficientbioaipackage:gitclonegit@github.com:MMV-Lab/EfficientBioAI.gitcdEfficientBioAI
pipinstall-e.[cpu/gpu/all]# for intel cpu, nvidia gpu or bothdocker:(recommended)We use different docker images for both cpu and gpu. Assume that you are in the root directory of the project.for CPU:cddocker/cpu
bashinstall.sh# if not install docker, run this command firstbashbuild_docker.sh# build the docker imagecd../..
bashdocker/cpu/run_container.sh#run the docker containerfor GPU:cddocker/gpu
bashinstall.sh# if not install docker, run this command firstbashbuild_docker.sh# build the docker imagecd../..
bashdocker/gpu/run_container.sh#run the docker containerHow to run it:Use scripts:compression:pythonefficientbioai/compress.py--configpath/to/the/config.yaml--exp_pathexperiment/save_pathinference:pythonefficientbioai/inference.py--configpath/to/the/config.yamlUse functions:There is a simpleexampleNote that pretrained model and data should be placed in themodelanddatafolders, respectively. You can download our mmv_im2im pretrained model fromnextcloud. All the intermediate files will be saved in theexperimentfolder.
Package: efficient-det
EfficientDetEfficientDet Implementation in Keras focused on clean code and
readability.
Training will be logged with Tensorboard.
To take a look at the training progress do:tensorboard --logdir logsThis repo also includes the option of using wandb.ai for experiment tracking.InstallationVia PIP (recommended)Split into 3 ways to install. This is due to the way tensorflow needs
to be installed to correctly work with CUDA. The first installation
does not include tensorflow and is recommended to use.pipinstallefficient-detYou can include a [cpu] or [gpu] tag to include the respective tensorflow
version.
Includes tensorflow dependency:Via DockerRuns with tensorflow:2.3.0-gpu.
Depending on system CUDA version you might need to use
another version.See this for more info.Install docker and nvidia container toolkit on host systemsudoapt-getinstall-ydocker.ionvidia-container-toolkitBuild Docker Imagesudodockerbuild.-tedetFrom SourceClone Repositorygitclonegit@git.hhu.de:zeboz100/efficientdet.gitBuild itpipinstall-rrequirements.txtUsagePIPTrainingpython3-mefficient_det.run_training--dataset_path/path/to/datasetRun a Hyperparameter Search:python3-mefficient_det.run_hyper_parameter_search--dataset_path/path/to/dataset--num_tries100--gpus_per_trial0.5SourceExecute all commands inefficientdet/Set PYTHONPATH :exportPYTHONPATH="$PWD/src"Trainingpython3src/efficient_det/train.py--dataset_path/path/to/dataset/Hyperparameter Search:python3src/efficient_det/train.py--dataset_path/path/to/dataset/DockerRun Containersudodockerrun--gpusall-itedetbashand then proceed with the PIP instructions.To run all testspython3-munittestTo test loaded modelYou can test the loaded model via notebook or from a script.Notebook in examples/visualize_rsults.ipynbYou need to set dataset pathYou need to set path to trained modelExecute Script from efficientdet/python3example/visualize_results.py
Package: efficient-first-stage-retrieval
Efficient First Stage Retrieval using Dense Representations and KNNSummary description here.This file will become your README and also the index of your documentation.testInstallpip install efficient_first_stage_retrievalHow to useUse calculate_score to calculate MAP and MRR from actual qrels in fn_qrels and from predictions in predictioncalculate_score(fn_qrels='data/robust/qrels.robust2004.txt',prediction="score.txt")Use do_run to calculate predictions from 'searcher' and queries 'topic' and used time and store it in file and 'time-' + filedo_run(file,topics,searcher)
Package: efficientformers
EfficientFormersEfficientFormersis a library which contains some SOTA efficient transformer architectures. Be note that, effcientformers only indexlight-weighted and fasttransformer models.Currently supported models:efficientformer - 2022;will add:EcoFormer - 2022;Please star and fork! Contribution are very welcomed.Installpip install efficientformersUsagefromefficientformers.efficientformerimportEfficientFormermodel=EfficientFormer()
Package: efficientnet-lite0-pytorch-model
efficientnet-lite0-pytorch-modelPretrained Pytorch model file for EfficientNet Lite0Installationpip install efficientnet_lite0_pytorch_modelBasic Usagefrom efficientnet_lite0_pytorch_model import EfficientnetLite0ModelFile
print( 'model file path is %s' % ( EfficientnetLite0ModelFile.get_model_file_path() ) )CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template._Cookiecutter:https://github.com/audreyr/cookiecutter_audreyr/cookiecutter-pypackage:https://github.com/audreyr/cookiecutter-pypackage
Package: efficientnet-lite1-pytorch-model
efficientnet-lite1-pytorch-modelPretrained Pytorch model file for EfficientNet Lite1Installationpip install efficientnet_lite1_pytorch_modelBasic Usagefrom efficientnet_lite1_pytorch_model import EfficientnetLite1ModelFile
print( 'model file path is %s' % ( EfficientnetLite1ModelFile.get_model_file_path() ) )CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Cookiecutter:https://github.com/audreyr/cookiecutteraudreyr/cookiecutter-pypackage:https://github.com/audreyr/cookiecutter-pypackagecookiecutter-ml-model-files:https://github.com/ml-illustrated/cookiecutter-ml-model-files
Package: efficientnet-lite2-pytorch-model
efficientnet-lite2-pytorch-modelPretrained Pytorch model file for EfficientNet Lite2Installationpip install efficientnet_lite2_pytorch_modelBasic Usagefrom efficientnet_lite2_pytorch_model import EfficientnetLite2ModelFile
print( 'model file path is %s' % ( EfficientnetLite2ModelFile.get_model_file_path() ) )Actual UsageInstall the model package fromEfficientNet-Lite-PyTorch:pip install efficientnet_lite_pytorchLoad the model with pretrained weights:from efficientnet_lite_pytorch import EfficientNet

from efficientnet_lite2_pytorch_model import EfficientnetLite2ModelFile
weights_path = EfficientnetLite2ModelFile.get_model_file_path()

lite2_model = EfficientNet.from_pretrained('efficientnet-lite2', weights_path = weights_path )CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Cookiecutter:https://github.com/audreyr/cookiecutteraudreyr/cookiecutter-pypackage:https://github.com/audreyr/cookiecutter-pypackagecookiecutter-ml-model-files:https://github.com/ml-illustrated/cookiecutter-ml-model-files
Package: efficient-test
efficient-testtestdata include chinese personal four element and offen use datetime测试数据包含随机生成的中国公民四要素，及常用的日期时间shell命令执行方法封装，以及常用的文件处理方法swagger2case通过读取swagger文档，生成规则的测试用例，如-全参数，不传，传空。仅必填项和必填项逐个校验占未实现，敬请期待。jmeter规范性能测试项目，实现无人值守执行多场景
Package: effluent
effluentEffluent is a python package for simulating the dispersion of effluent
discharges from wastewater pipes. The underlying model is based on
Lee, Joseph H. W., and Chu, Vincent H.:Turbulent Jets and Plumes.
Boston, MA: Springer US, 2003.doi:10.1007/978-1-4615-0407-8.The package is mainly intended for research purposes, and does not contain
any convenience plotting or statistics functionality. It is expected that
these analyses are conducted in post-processing stages using other packages.InstallationThe package is installed using pip:pip install effluentAlternatively, the package can be installed to an isolated conda environment
using the in-repo fileenvironment.ymlas follows:conda env create -f environment.ymlUsageThe software is invoked as a command line script:effluent config.tomlwhereconfig.tomlis the configuration file specifying the simulation
setup. Examples of valid configuration files are given in the repository
directorydocs/source/examples, and in theonline documentation.CitationIf you use the software in a publication or report, please cite it as follows:Sævik, P. N., (2023).Effluent: A Python package for modelling effluent discharge.
Journal of Open Source Software,8(89),https://doi.org/10.21105/joss.05554.Consider also citing the work which this package is based on:Lee, J. H. W., and Chu, V. H. (2003).Turbulent Jets and Plumes - A Lagrangian Approach. Boston, MA: Springer US.https://doi.org/10.1007/978-1-4615-0407-8.DocumentationCheck out theonline documentationfor a
detailed description of the algorithm and software features.How to contributeUse the GitHub issue tracking system to report problems with the software, seek
support, or suggest improvements. Code contributions can be suggested using
GitHub pull requests. Check documentation for details.
Package: effmap
EffmapEffmap is the python library, which introduces two classes: hydro-static transmission (HST) and regression models (Regressor). The former serves to initialize an HST object for a certain displacement, oil and an engine. Included methods allow to size, to calculate efficiencies as well as performance characteristics for a given operational regime and to create, print and save an efficiency map - a contour or a surface plot for ranges of speeds and torques required.The latter class loads the collected catalogue data of displacements, speeds and masses of axial-piston machines from the data.csv file. Then it fits regression models to the data in order to provide inter- and extrapolating predictions. The data and the regression models could then be printed and saved.Installationpip install effmapUsagefrom effmap.hst import HST
from effmap.regressor import Regressor

hst = HST(displ)
hst.compute_sizes()
hst.compute_speed_limit(models['pump_speed'])
hst.load_oil()
hst.plot_oil()
hst.compute_eff(input_speed, pressure_discharge)
hst.compute_loads(pressure_discharge)
hst.plot_eff_maps(max_speed, max_pressure)Web apphttps://effmap.herokuapp.com/Code for the web app:https://github.com/ivanokhotnikov/effmap_demo