Saravanan666/pypi-org huggingface dataset:
Package: useb
Unsupervised Sentence Embedding Benchmark (USEB)This repository hosts the data and the evaluation script for reproducing the results reported in the paper: "TSDAE: Using Transformer-based Sequential Denoising Auto-Encoder for Unsupervised Sentence Embedding Learning". This benchmark (USEB) contains four heterogeous, task- and domain-specific datasets: AskUbuntu, CQADupStack, TwitterPara and SciDocs. For details, pleasae refer to the paper.Installpipinstalluseb# Or git clone and pip install .python-museb.downloadingall# Download both training and evaluation dataUsage & ExampleAfter data downloading, one can either runpython-museb.examples.eval_sbertto evaluate an SBERT model on all the datasets (it needs ~8min on a GPU); or run this same code below:fromusebimportrunfromsentence_transformersimportSentenceTransformer# SentenceTransformer is an awesome library for providing SOTA sentence embedding methods. TSDAE is also integrated into it.importtorchsbert=SentenceTransformer('bert-base-nli-mean-tokens')# Build an SBERT model# The only thing needed for the evaluation: a function mapping a list of sentences into a batch of vectors (torch.Tensor)@torch.no_grad()defsemb_fn(sentences)->torch.Tensor:returntorch.Tensor(sbert.encode(sentences,show_progress_bar=False))results,results_main_metric=run(semb_fn_askubuntu=semb_fn,semb_fn_cqadupstack=semb_fn,semb_fn_twitterpara=semb_fn,semb_fn_scidocs=semb_fn,eval_type='test',data_eval_path='data-eval'# This should be the path to the folder of data-eval)assertround(results_main_metric['avg'],1)==47.6It is also supported to evaluate on a single dataset (please seeuseb/examples/eval_sbert_askubuntu.py):python-museb.examples.eval_sbert_askubuntuData Organization.
├──data-eval# For evaluation usage. One can refer to ./unsupse_benchmark/evaluators to learn about how to loading these data.│├──askubuntu
││├──dev.txt
││├──test.txt
││└──text_tokenized.txt
│├──cqadupstack
││├──corpus.json
││└──retrieval_split.json
│├──scidocs
││├──cite
│││├──test.qrel
│││└──val.qrel
││├──cocite
│││├──test.qrel
│││└──val.qrel
││├──coread
│││├──test.qrel
│││└──val.qrel
││├──coview
│││├──test.qrel
│││└──val.qrel
││└──data.json
│└──twitterpara
│├──Twitter_URL_Corpus_test.txt
│├──test.data
│└──test.label
├──data-train# For training usage.│├──askubuntu
││├──supervised# For supervised training. *.org and *.para are parallel files, each line are aligned and compose a gold relevant sentence pair (to work with MultipleNegativeRankingLoss in the SBERT repo).│││├──train.org
│││└──train.para
││└──unsupervised# For unsupervised training. Each line is a sentence.││└──train.txt
│├──cqadupstack
││├──supervised
│││├──train.org
│││└──train.para
││└──unsupervised
││└──train.txt
│├──scidocs
││├──supervised
│││├──train.org
│││└──train.para
││└──unsupervised
││└──train.txt
│└──twitter# For supervised training on TwitterPara, the float labels are also available (to work with CosineSimilarityLoss in the SBERT repo). As reported in the paper, using the float labels can achieve higher performance.│├──supervised
││├──train.lbl
││├──train.org
││├──train.para
││├──train.s1
││└──train.s2
│└──unsupervised
│└──train.txt
└──tree.txt
Package: use-breadcrumbs
breadcrumbs: keep track of what is going onThis library started with a rather simple objective in mind:
keep track of a sequence of transforming steps.It is extremely easy to use:>>>importbreadcrumbsasbc>>>crumb=bc.Crumb("start")>>>crumb.info.update(value=35)>>>crumb.info.update(other_value=70)>>>print(crumb.info){'value':35,'other_value':70}A Crumb can has three attributes: a name (hereStart), and two dicts (infoandextra)
to store additional information. You can also store dependent crumbs using theput_crumbmethod.‘What is the big deal?’ you might ask, ‘You are just writing a dict!’
True, but the cool thing is that it works a little bit like logging and
therefore you use it decoupled across you code:>>>deffunc1():...bc.info.update(value=35)>>>deffunc2():...bc.extra.update(other_value=70)>>>crumb=bc.Crumb("start")>>>withbc.context(crumb):...func2()...func1()>>>print(crumb.info){'value':35}>>>print(crumb.extra){'other_value':70}func1andfunc2now nothing aboutcrumbbut it just works.You can also decorate a function to do some things for you automatically.>>>@bc.aware()...deffunc1(x,y):...returnx+y>>>crumb=bc.Crumb("start")>>>withbc.context(crumb):...func1(1,2)>>>print(crumb.trail)(Crumb('func1',info={'x':1,y:'2'},extra={}))So in trail you can see thatfunc1has been called with certain parameters. You
can redact some parameters that might be memory intensive or pointless to store.>>>@bc.aware(redact_params='y')...deffunc1(x,y):...returnx+y>>>crumb=bc.Crumb("start")>>>withbc.context(crumb):...func1(1,2)>>>print(crumb.trail)(Crumb('func1',info={'x':1},extra={}))To redact more parameters, just pass an iterable.A useful feature is that aTrailMixinallows you to add object
specific notes and teach this to functions.>>>classMyCoolClass(bc.TrailMixin):...# Here goes your cool class...internal=10>>>@bc.aware(trail_param="obj")...deffunc1(obj,x,y):...return(x+y)*obj.internal>>>myobj=MyCoolClass()>>>func1(myobj,1,2)>>>print(myobj.trail)(Crumb('func1',info={'x':1,'y':2},extra={}))Quick InstallationTo install breadcrumbs, simply:$pipinstalluse-breadcrumbsand then simply enjoy it!It runs in Python 3.7+ with no other dependency. It is licensed under
BSD.breadcrumbs is maintained by a community. SeeAUTHORSfor a complete list.To review an ordered list of notable changes for each version of a project,
seeCHANGES
Package: use-case
Last update: 02/06/2023Steps:Anaconda environmentInstall poetry$conda install -c conda-forge poetryCreate project using poetry$poetry new use_caseAdd the required libraries$poetry add LIBRARYTest the libraryInstall Pytestpip install pytestRun the tests:$pytest -v .\tests\tests.pyPublish libraryBuild the projectpoetry buildPublish the projectpoetry publishInstall the created libraries (public access by default)$pip install use-caseIt will make only accessible the librariesMain features:PEP 8 --> Style GuidePyCharm nativeVSCode using Pylint (lastest python version supported 3.7)PEP 257 –> DocstyleNotebooksPyCharm visualizationVSCode visualization and executionRemote connectionPyCharm ???VSCode possiblePluginsLiveShareGitDockerCopilot (Kite)TestingPyCharm nativeVSCode ???MacrosPyCharm possibleEg, headingVSCode ???
Package: use-context
use-contextuse some vars in current context and try rollback state when exit the context.UsageBy default:fromuse_contextimportusels=[1,2,3]withuse(ls):ls.append(5)assertls==[1,2,3]For use ref (by name):a=15withuse(refs=['a'])asctx:assertnotctx.is_ref_changed('a')a=16asserta==16assertctx.is_ref_changed('a')asserta==15👍
Package: useDAVE
DAVE is a software package designed to make engineering more fun. DAVE will take care of calculations and book-keeping so that you can focus on designing the best solution.DescriptionDAVE is a python package for bookkeeping and visualization of floating, suspended and/or mechanical systems. It provides a general coordinates based geometry module and a graphical user interface.Assets are the main building blocks of a model. Assets are digital versions of physical objects and contain all information required to use the item in engineering.
Assets can be imported into a scene (a model). In a scene assets can be connected to eachother and external influences like wind and water can be added.Various solvers can then be used to investigate how a model behaves.
Static equilibrium can be calculated via the EquilibriumCore plugin. This core supports buoyancy based on linear hydrostatics or an imported shape.
The static equilibrium conditions allows for stability checks, static load distributions in lifting ropes, internal loads, static clearance checks and much more.Exporting to other software packages is possible. By default an export routine to Blender (3d visualization and animation) is included.
The design of DAVE is such that export to software such as dynamic simulation packages, simulation software or game engines can easily be added.
Package: useenv
useenvA tiny tool to manage values in your env file.
Useful in some rare circumstances e.g. swapping variables in local development,
when you don't want to maintain multiple separate env files.pipx install useenvCreate a.useenv.ymlconfig file in your project root.If this contains secret values then make sure to add.useenv.ymlto your project or global.gitignore.useenv <env_identifier>Example.useenv.ymlconfig file:env_file: .env
envs:
    foo:
        DATABASE_HOST: foo-host
        DATABASE_USER: foo-user
        DATABASE_PASSWORD: foo-pw
    bar:
        DATABASE_HOST: bar-host
        DATABASE_USER: bar-user
        DATABASE_PASSWORD: bar-pwModes--modeflag ormodefield of the config.merge(default)Values will be merged into the existing env file.createEnv file will be created/overwritten.In this case you may want to define a common set of values. YAML gives us the tools to do this:_common: &common
    DATABASE_USER: common-user
  
env_file: .env
mode: create
envs:
    foo:
        << : *common
        DATABASE_HOST: foo-host    
        DATABASE_PASSWORD: foo-pw
    bar:
        << : *common
        DATABASE_HOST: bar-host    
        DATABASE_PASSWORD: bar-pw1passwordIf you have the 1password CLI installed then you can pull values from 1password:...
envs:
    foo:
        DATABASE_PASSWORD: 1pw::<item-id>::<field>  # e.g. 1pw::abcdefqwerty::password
Package: useful
A collection of utilities of everyday use when writing
Python 3.x codeorDjango 3.2+ projects.Python 2.x support has been dropped.OverviewThis package is used by several living projects. The individual utilities
contained are usually not depending on each other. Their layout and API
are considered stable honouring the backward compatibility.The project is divided into two sections:General Python stuffDjango-related utils- located in thedjangopackageThe code is documented, please find the description and examples
in the docstring of each utility.InstallationInstall either using pip:pip install usefulor from source:git clone https://github.com/tuttle/python-useful src/useful
cd src/useful
python setup.py developIf you are about to use the Django features like the templatetags,
you can add toINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'useful.django',
)Please file an Issue on GitHub if you have bugreport, tip, anything.
Thank you!
Package: useful-decoration
DescriptionI wrote some decorators that are commonly used in my daily work. And I gave an example if the decorator is often used.InstallingInstall and update usingpip:pipinstalluseful-decorationSimplesfromuseful_decoration.decorationsimportelement_mappingclassPerson:def__init__(self,name):self.name=name@element_mapping(factor_name="factor")defcalculate(self):return10if__name__=='__main__':p=Person(name='frank')print(p.calculate())# {'factor': 10}ContributesWelcome, you can join this repo to  enhance this repo  together. you can pull request to me.
please don’t  hesitate to contact with  me if you have any questions .Linkspypi addresshttps://pypi.org/project/useful-decoration/Documentation:https://useful-decoration.readthedocs.io/en/latest/
Package: useful-funcs
useful_funcsUseful functions for various applicationsInstallationpipinstalluseful_funcsVersionsDetailed descriptions of changes in various versions is given belowVersionDate0.0.32024-01-220.0.22024-01-220.0.12024-01-22Version 0.0.3Added README.mdVersion 0.0.2Made basic improvementsVersion 0.0.1Added useful_calendarAdded useful_closestAdded useful_datetimeDevelopmentWant to contribute? Great!
Will be open to take suggestions soon.
Package: usefulfunctionsbyjoci
Package infothis package contains some useful functionsMade By Jocithis package is maked by jociFunctionsaverage() this is return averagediff() this is return difference of 2 numberisanagram()check is anagram or notispalindrome()check is palindrome or notisprime() check the number is prime or not, return a boollist_printer() list items from a listnearestpalindrome() nearest palindrome for integerfactorial(), return a factorial of numbercombination() return a combination of 2 numberpermutation() calculate 2 number permutationfind_files(filename,path) search a file in a given folderVersioncurrent version:0.0.2
Package: useful-functions-easier-life
Some useful stuff for functionsNamedFunctionpipinstalluseful-functions-easier-lifenamedfunctiontest=NamedFunction(name="myfunction",execute_function=execute_several_functions_insideout(lambdax:x*100,lambdax:x/10,lambdax:x*5,lambdax:x+1000),name_function=lambda:"This is my function",str_prefix="Surprise",print_before_execution="My function\n",str_suffix="Let's go!",ljust_prefix=10,rjust_prefix=30,ljust_suffix=20,rjust_suffix=10,)namedfunctiontestOut[3]:SurpriseThisismyfunctionLet's go!#Without namedfunction:#ca2#Out[7]: <function __main__.execute_several_functions_insideout.<locals>.deco(f)>namedfunctiontest(5)MyfunctionOut[6]:50250.0ignore_exceptions_decoratorfromrandomimportchoice@ignore_exceptions_decorator(print_exception=True,exception_value=False,disable=False)deftestest(number):ifnumber==0:returnTrueelifnumber==1:print(number/0)returnTruetestex=[testest(choice([0,1]))forxinrange(10)]divisionbyzerodivisionbyzerotestexOut[3]:[True,True,False,True,False,True,True,True,True,True]#https://stackoverflow.com/questions/5929107/decorators-with-parameters#Blueprint for other useful stuffexecute_several_functions_insideoutca2=execute_several_functions_insideout(lambdax:x*100,lambdax:x/10,lambdax:x*5,lambdax:x+1000)ca2(5)Out[6]:50250.0(1000+5)*5/10*100Out[18]:50250.0execute_several_functions_one_after_anotherallfunctions=lambdax:(x,isinstance(x,str)),lambdax:str(x)+'-1000',lambdax:x*5,lambdax:isinstance(x,str)ca=execute_several_functions_one_after_another(allfunctions)ca(101)Out[4]:[(101,False),'101-1000',505,False]ignore_exceptionstestex=[ignore_exceptions(divmod,50,choice([0,1]),exception_value=(0,0))forxinrange(10)]testexOut[7]:[(50,0),(0,0),(0,0),(0,0),(50,0),(50,0),(50,0),(50,0),(50,0),(0,0)]
Package: usefulgram
UsefulgramInstallation:pip install usefulgramA little history:angiogram is a wonderful framework. However, when working with it,
I came across the fact that I transfer many functions and
classes from project to project. First, common classes were created
for convenient transportation, then it grew
into a shared folder, and now into a separate project. I hope that this
small add-in will become a useful tool not only for me, but also for youWhat it includes:LazyEditor - this is a class aimed at handling any editing-related
errors. For example, the expiration of time, as well as much, much more.
Also, it unifies work with media (currently only photo and video are supported)LazySender - A class that unifies sending for callback and message types.
Partially similar in functionality to LazyEditingBuilder, Row, Button and its Reply analogs - classes for representing the keyboard
in a array-like formBasePydanticFilter - Base class, a somewhat developed version
the Callback Factory capable of type hints, supporting inheritance,
date time and pedantic classes within itself. It is indispensable
when used together with a plugin for pydantic hints in your IDETrottlingMiddleware - A class that allows you to prevent spam.
A slightly modified version ofthis codeStackerMiddleware - The class that adds all these classes to handlerscalendar_menager - A simple calendar menu built on library functionsAnd much more!Usage examples:Along the pathexamples -> fully_exampleyou will find most of the examples
of using the library. Over time, they will get biggerDocumentation:In development and will be available soonRoadmap:Improve the code ✔️Add more usage examples ✔️(~75% done)Translate all texts in the library into English ✔️(it can be painful in some places)Add documentation 🔨🔨🔨 (in progress)Add more comments to the code 🔨🔨🔨 (in progress)
Package: usefulib
usefulib v1.0.5A useful library for Python witha lotof assorted functions to make numerous small tasks easier.GitHub Page:https://github.com/hamdivazim/usefulibHow to installInstall with pip in your terminal, making sure Python is added to PATH:$ pip install usefulibAlternatively, you can use the git URL to do the same.$ pip install "git+https://github.com/hamdivazim/usefulib.git@pip-install#egg=usefulib"How to useAll you need to do is import the package, and all usefulibs that you may want will come along with it! As an example:importusefuliba_string="abcdef123456"reverse_string=usefulib.reverse_string(a_string)If all you need is one usefulib:fromusefulibimportreverse_stringa_string="abcdef123456"reverse_string=reverse_string(a_string)What can it do?As an open-source library and can be contributed to by anyone, it offers a lot of simple functions to make writing code easier and quicker. A complete list of all usefulibs that are available can be foundhere.Support usefulibusefulib is full of contributions from the community! We're beginner-friendly here, so read thecontributing guidelinesand give us your best usefulibs 😃!Viewthe siteRecently, usefulib's website launched athttps://hamdivazim.github.io/usefulib/, feel free to report bugs or give feature requests, using theweb-issuelabel. Or, take a look atthe discussion.Licenseusefulib is licensed under theGNU General Public License v3.0.
Package: useful-lva-sdk
Vision AI Live Video Analytics SDKUnofficial Vision AI SDK in Python.It's for building Live Video Analytics (LVA) program and CRUD LVA resources.Installationpip install useful-lva-sdkGet startedCreate an LVA program with this lib:fromuseful_lva_sdk.core.lva_graph_builderimportLvaGraphBuilderfromuseful_lva_sdk.core.operatorimport*graph=LvaGraphBuilder("test-analysis")\.add_analyzer(GcsVideoSource(),"gcs_source")\.add_analyzer(GcsProtoSink(),"gcs_sink")\.add_analyzer(OccupancyCounting(),"oc")\.connect("oc","gcs_sink")\.connect("gcs_source","oc")\.build()Create an analysis with this lib:fromuseful_lva_sdk.client.lva_clientimportLVAClientanalysis=graph.analysis()client=LVAClient(project="PROJECT_ID",location="LOCATION_ID",cluster="CLUSTER_ID",)client.create_analysis(analysis.name,analysis)
Package: useful-machines
usefulWe created Useful to streamline ETL and data drift resolution without sacrificing deployment pace or spending time test writing.At a glimpse, Useful encompasses:Anomaly detection on your Python codeAutomated ETL testing and notificationsObservability across all code changes, argument changes, and workflows within your ETLComparisons of new ETL developments against production runs… and much moreAll with one line of code.Here’s how it works:Starting with a Python ETL, include Useful checks in your code with a simple decorator.Every time your code runs, Useful logs your functions' information, allowing you to observe each function's behavior through its interface.Utilize the interface to explore statistics in depth, collaborate with your team to troubleshoot anomalous data, and save important statistics with bookmarks and notifications.Each Useful Check logs:Runtime statistics of the functionStatistics of the function’s return, auto-adapting to the return dtype of the functionCode and arguments fed to the functionWhere the function is within the traceback to define a bullet-proof function hierarchyGit information and workflow placement of jobs*users can disable any particular logging for a function.Then, behind the scenes, thousands of statistics are processed every second to identify anomalies and share results in the Useful dashboard.Our simple Python integration combines with a 2024-ready UI that lets you easily see everything in your ETL and pin down critical data drift at scale.We take privacy very seriously. The data ingested into Useful is core to your business, and we treat it as such.InstallationTo install Useful, you can run:poetryadduseful-machinespipinstalluseful-machinesFor the library to work successfully and to access the Useful tool, please reach out to us atliam@levelvc.com.
Package: useful-math-functions
useful-math-functionsuseful-math-functionsis a collection of useful mathematical functions with a
focus on:ease of use- the functions are designed to be as easy to use as possiblepure python- the functions are written in much python as possible and
only use external libraries when necessarydocumentation- the functions are documented in code itself with:ExamplesEquationsReferencesLinks to external resourcesInstallationThe package can be installed via pip:pipinstalluseful-math-functionsand for Visualizations:# matplotlibpipinstalluseful-math-functions[matplotlib]# plotlypipinstalluseful-math-functions[plotly]# all visualizationspipinstalluseful-math-functions[all]UsageThe package can be imported like any other python package:fromumf.core.createimportOptBenchres=OptBench(["DeJongN5Function"],dim=3)res.plot_type_3d="plot_surface"res.plot()res.save_as_image()DocumentationThe documentation can be foundhere.ContributingContributions are welcome. For major changes, please open an issue first to
discuss what you would like to change.LicenseThe project is licensed under theMITlicense.
Package: useful-prints
useful_printsNeeds to_precision by :William Rusnack github.com/BebeSparkelSparkel linkedin.com/in/williamrusnackwilliamrusnack@gmail.comEric Moyer github.com/epmoyereric@lemoncrab.comThomas Hladishhttps://github.com/tjhladishtjhladish@utexas.eduI am not able to add it to the requirements so please visitBitbucketorGitHubFunctions:pretty_print_dictlist_as_fitted_table_stringpretty_print_listpretty_print_sym_double_listprogress_printermain_and_sub_progress_printerLinksGitHub|PyPI
Package: usefulpy
UsefulPyThe most useful functions in everyday lifeInstallationUse the package managerpipto install usefulpy.pipinstallusefulpyUsagefromusefulpy.mathimportis_negative,is_tenis_ten(10)# returns 'True'is_ten(9)# returns 'False'is_negative(-1)# returns 'True'is_negative(1)# returns 'False'is_negative(0)# returns 'False'ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: useful-rdkit-utils
useful_rdkit_utilsA collection of useful RDKit functionsDownloadgitclonegit@github.com:PatWalters/useful_rdkit_utils.gitInstallationpipinstalluseful_rdkit_utilsInstalling the latest development versionpipinstallgit+https://github.com/PatWalters/useful_rdkit_utilsDocumentationhttps://useful-rdkit-utils.rtfd.ioDemosThe notebooks directory contains Jupyter notebooks that show how to use some of the functions in this collection.ContributingI'm very open to PRs with corrections and/or contributions.CopyrightCopyright (c) 2021, Pat WaltersLicenseThe code in this package is licensed under the MIT License.AcknowledgementsProject based on theComputational Molecular Science Python Cookiecutterversion 1.6.