Saravanan666/pypi-org huggingface dataset:
Package: anysearch
AnySearchis aElasticsearchandOpenSearchcompatibility library.
It provides utility functions for smoothing over the differences between the
Python libraries with the goal of writing Python code that is compatible on
both (including the*searchand*search-dslpackages).See the documentation for more information on what is provided.DocumentationDocumentation is available onRead the Docs.PrerequisitesPython 3.6, 3.7, 3.8, 3.9 and 3.10.InstallationInstall latest stable version from PyPI:pipinstallanysearchor latest stable version from GitHub:pipinstallhttps://github.com/barseghyanartur/anysearch/archive/main.tar.gzConfigurationAnySearchautomatically detects whether you useElasticsearchorOpenSearchby looking at which packages are installed.
However, if you have both packages installed, you can instructAnySearchwhich one do you actually want to use. The way to do that is to set theANYSEARCH_PREFERRED_BACKENDenvironment variable to eitherElasticsearchorOpenSearch.ForElasticsearch:importosos.environ.setdefault("ANYSEARCH_PREFERRED_BACKEND","Elasticsearch")ForOpenSearch:importosos.environ.setdefault("ANYSEARCH_PREFERRED_BACKEND","OpenSearch")Usageelasticsearch/opensearchHow-toWithelasticsearchyou would do:fromelasticsearchimportConnection,ElasticsearchWithopensearchyou would do:fromopensearch_pyimportConnection,OpenSearchWithanysearchyou would change that to:fromanysearch.searchimportConnection,AnySearchelasticsearch-dsl/opensearch-dslHow-toWithelasticsearch-dslyou would do:fromelasticsearch_dslimportAggsProxy,connections,Keywordfromelasticsearch_dsl.documentimportDocumentWithopensearch-dslyou would do:fromopensearch_dslimportAggsProxy,connections,Keywordfromopensearch_dsl.documentimportDocumentWithanysearchyou would change that to:fromanysearch.search_dslimportAggsProxy,connections,Keywordfromanysearch.search_dsl.documentimportDocumentTestingProject is covered with tests.To test with all supported Python versions type:toxTo test against specific environment, type:tox-epy39To test just your working environment type:pytestTo run a single test in your working environment type:pytesttest_anysearch.pyTo run a single test class in a given test module in your working environment
type:pytesttest_anysearch.py::AnySearchTestCaseIt’s assumed that you have eitherelasticsearch-dsloropensearch-dslinstalled. If not, install the requirements first.Writing documentationKeep the following hierarchy.=====
title
=====

header
======

sub-header
----------

sub-sub-header
~~~~~~~~~~~~~~

sub-sub-sub-header
^^^^^^^^^^^^^^^^^^

sub-sub-sub-sub-header
++++++++++++++++++++++

sub-sub-sub-sub-sub-header
**************************LicenseMITSupportFor any security issues contact me at the e-mail given in theAuthorsection.
For overall issues, go toGitHub.AuthorArtur Barseghyan <artur.barseghyan@gmail.com>
Package: anysell
anysellWelcome! Sell anything on multiple platforms at once.Features:generate item configcreates posts on bazossupports imagesmobile 2famultiple at onceTODO:fb marketplaceworks only with "clothes", maybe add all/more categoriesinstall & usagepip3installanysellThere are 2 config files we're gonna use:main config file- stores important global info (name, email etc.)items config file- stores info about items you want to sell, at one place. then anysell will propagate it in multiple placescfg fileYou can provide main config file by passing--config-pathoption to commands. Default path for
your config is~/.config/anysell/.cfg. Go ahead, create and fill the file.name=
password=  # some tmp password, e.g. for edit on bazos
phone=
email=
psc=
img_path=/Users/bla/Desktop/img_clothes  # generate-cfg cmd will use structure to create yaml 
item_config_path=/Users/bla/cfg.yaml  # sell cmd use this to create the item postsTo start quickly, do:anysell generate-cfg --config-path /my/cfg/path/.cfgThis will generate the file based on structure inimg_path. It's good to have folder per item and
images for items in that folder. Folder names needs to be unique.Open file onitem_config_pathand fill it:damske_cierne_nohavice_sportove__40:
  category: 'Športové oblečenie'
  price: '8'
  filepaths:
    - /img/folder/damske_cierne_nohavice_sportove__40.jpg
    - /img/folder/damske_cierne_nohavice_sportove_detail__40.jpg
  title: 'Damske Sportove Cierne Nohavice'
  description: 'Daju sa odopinat na tristvrtove. Velkost 40.'
damske_siroky_golier__detail__36_38:
  category: ''  # fill
  description: ''  # fill
  filepaths:  # fill
    - /img/anotherfolder/damske_siroky_golier__detail__36_38.jpg
  price: ''  # fill
  title: ''  # fillNow, you have the items config (no need to use generate command, you can create your own if you want)Runanysell sell --config-path /my/cfg/path/.cfgThis will read the item config file usingitem_config_pathkey in your main config and
create all the posts based on that.Note - this will prompt you for doing auth. E.g. 2fa with mobile key. When you fill it first time
key will be cached and reused for 1hr.bazosThese are keys you can use for categories.["Blúzky","Bundy a Kabáty","Čiapky, Šatky","Doplnky","Džínsy","Funkčné prádlo","Hodinky","Kabelky","Košele","Kožené oblečenie","Mikiny","Nohavice","Obleky, Saká","Plavky","Plecniaky a kufre","Rukavice a Šály","Rúška","Šaty, Kostýmy","Šortky","Šperky","Spodná bielizeň","Športové oblečenie","Sukne","Svadobné šaty","Svetre","Tehotenské oblečenie","Topánky, obuv","Tričká, roláky, tielka","Ostatné"]
Package: anyser
anyserCommon interfaces for multiple serialization formats.APIdumps(obj, format: str, **options) -> strdumpb(obj, format: str, **options) -> bytesloads(s: str, format: str, **options) -> objectloadb(b: bytes, format: str, **options) -> objectformat canbe:FormatData formatrequiresjsonjson,.jsonpicklepicklexmlxml,.xmljson5json5,.json5installanyser[json5]tomltoml,.tomlinstallanyser[toml]yamlyaml,.yaml,.ymlinstallanyser[yaml]
Package: any-serde
AnySerdeAnySerde is a Python package that simplifies the task of converting Python variables to and from serializable data. Whether you need to serialize Python objects to JSON, YAML, or other common formats, or deserialize data from these formats back into Python objects, AnySerde has got you covered.The main difference from other serialization libraries is that AnySerde does not require any changes to your existing codebase such as adding decorators or adding parent classes.InstallationYou can easily install AnySerde using pip:pipinstallany_serdeMore package details on thePyPI page:UsageUsing AnySerde is straightforward. Here's a quick overview of how to get started:Converting Python Objects to DataTo convert a Python variable to a data format (e.g., JSON or YAML), you can use theto_datafunction. Here's an example with a dataclass:fromdataclassesimportdataclassimportyamlfromany_serdeimportto_data@dataclassclassSampleDataclass:foo:intbar:strbaz:dict[str,list[bool]]sample=SampleDataclass(foo=2,bar="some text",baz={"0":[],"8":[True,False,False]},)sample_data=to_data(SampleDataclass,sample)withopen("sample.yaml","wt")asf:yaml.dump(sample_data,f)This example dumps the data as yaml to a file, but you could easily use json or xml or any other format you want.Converting Data to Python ObjectsConversely, if you have data in a specific format and want to convert it back to a Python object, you can use thefrom_datafunction. Here's a continuation of the previous example that turns the yaml file back into a python variable:fromany_serdeimportfrom_datawithopen("sample.yaml","rt")asf:sample_data=yaml.load(f,Loader=yaml.SafeLoader)sample=from_data(SampleDataclass,sample_data)Again, you can replace'json'with the desired format.Supported Object TypesRight now, AnySerde can convert these types to data:All python primitives exceptcomplexdictionarieslistssetstuplesunion types (but be careful of ambiguous serialization)DataclassesEnumsAs of writing this, AnySerde plans to support these types (but doesn't yet):NamedTuplePathDatetimeall other builtin python typesuser-defined types (with user-defined to_data and from_data methods)ContributingContributions to AnySerde are welcome! If you find a bug, have a feature request, or want to contribute code, please open an issue or submit a pull request on theGitHub repository.LicenseAnySerde is available for any use (including commercial) and is distributed under the Apache License 2.0. See theLICENSEfile for more details.
Package: anyserver
Simple Python ServerSimple and generic python web server, designed with simplicity and extendability in mind.Background & motivationI really like the simplicity and elegance of frameworks likeFastAPI,Flask,Express.jsandKoa.js.# Typical usage for defining routesapp=FastAPI()# Or some other framework like flask@app.get("/")asyncdefroot():return{"message":"Hello World"}What I don't like, for very simple use cases, is theboilerplateand dependencies.All of the above frameworks have some requirements and dependencies, meaning its not completely portable to all environments, without the need to download dependencies from the internet.At its core, this project was designed with the following features in mind:HandleHTTProutes with a simplerequest-responsemodel.Support ways to serve static content from a folder (eg: HTML, CSS, JS).A zero-dependencyserver.pythat just works out of the box as a simple web server.Supports multiple response types, with ability to render custom templated responses.With these basic requirements in place, rapid prototyping is possible with very little overhead.
Package: anysocks
anysocksThis library implementsthe WebSocket protocolbased on theSans-IO library wsproto.
I/O is handled by theanyio projectwhich makes this library compatible to asyncio, trio and curio.InstallationThis library requires Python 3.5+. You can install it directly from PyPI:python3-mpipinstall-UanysocksIf you want the cutting edge development version instead, install it directly from GitHub:python3-mpipinstall-Ugit+https://github.com/clamor-py/anysocks@master#egg=anysocksDocumentationThis README only provides a short overview, see the full documentationhere.Exampleimportanyiofromanysocksimportopen_connectionasyncdefmain():asyncwithopen_connection('wss://echo.websocket.org')ascon:print('Connection established!')# First, let's send some text to the server.text=input('What to send? ')awaitcon.send_message(text)# Now, we receive and verify the server's response.message=awaitcon.get_message()assertmessage==text,"Received{}, expected{}".format(message,text)print('Connection closed with code{}',con.close_code.value)anyio.run(main)
Package: anysql
AnySQLLightweight, Thread-Safe, Version-Agnostic, SQL Client Implementation
inspired byDatabasesFeaturesLightweight- no use of sqlalchemy or other massive frameworksThreadSafe- implements threadsafe features for fearless concurrent usageFlexible- acts as a standard frontend for a wide variety of SQL backendsPowerful- simple API design with powerful utilities and quality-of-life featuresInstallationpip install anysqlSecurityIt should be noted that anysql implements its own query parameterization to
allow for greater API flexibility and performance, rather than rely on
individual sql backends or relying on massive frameworks like sqlalchemy to
handle query generation.The existing parameterization has been thoroughly tested withsqlmap, the world standard of
sql pentesting-tools, to prevent and detect any possible sql-injection
vulnerabilities.The test-suite used is publically available within the source-code repo
within thetestsfolder.Example# Create a database instance, and connect to it.fromanysqlimportDatabasedatabase=Database('sqlite://:memory:')database.connect()# Create a table.query="""CREATE TABLE HighScores (id INTEGER PRIMARY KEY, name VARCHAR(100), score INTEGER)"""database.execute(query=query)# Insert some data.query="INSERT INTO HighScores(name, score) VALUES (:name, :score)"values=[{"name":"Daisy","score":92},{"name":"Neil","score":87},{"name":"Carol","score":43},]database.execute_many(query=query,values=values)# Run a database query.query="SELECT * FROM HighScores"rows=database.fetch_all(query=query)print('High Scores:',rows)
Package: anysqlite
anysqliteAnysqlite provides anasync/awaitinterface to the standardsqlite3library and supports bothtrioandasynciobackends using the power ofAnyio.Installationpip install anysqliteBasic usage>>>importanysqlite>>>>>>conn=awaitanysqlite.connect(":memory:")>>>cursor=awaitconn.execute("SELECT DATETIME()")>>>>>>response=awaitcursor.fetchone()>>>print(response)[('2023-10-02 13:42:42',)]
Package: anystore
anystoreStore anything anywhere. A wrapper around wrappers to avoid boilerplate code (because we are lazy).anystorehelps you to transfer data from and to a various range of sources (local filesystem, http, s3, redis, sql, ...) with a unified high-level interface. It's main use case is to store data pipeline outcomes in a distributed cache, so that different programs or coworkers can access intermediate results based on different settings (e.g. testing: use local cache store, production: cache to s3 bucket)Why?In our several data engineering projectswe always wrote boilerplate code that handles the featureset ofanystorebut not in a reusable way.This library shall be a thin and stable foundation for data wrangling related python programs.Overviewanystoreis built on top offsspecand provides an easy wrapper for reading and writing content from and to arbitrary locations:command lineanystore-i./local/foo.txt-os3://mybucket/other.txtecho"hello"|anystore-osftp://user:password@host:/tmp/world.txt

anystore-ihttps://investigativedata.io>index.htmlpythonfromanystore.ioimportsmart_read,smart_writedata=smart_read("s3://mybucket/data.txt")smart_write(".local/data",data)Simple key/value storeanystorecan use a configurable store:command lineanystore--store.cacheputfoo"bar"anystore--store.cachegetfoo# "bar"pythonfromanystoreimportStore# pass through `fsspec` configuration for specific storage backend:store=Store(uri="s3://mybucket/data",backend_config={"client_kwargs":{"aws_access_key_id":"my-key","aws_secret_access_key":"***","endpoint_url":"https://s3.local"}})store.get("/2023/1.txt")store.put("/2023/2.txt",my_data)Decorate your functionsWhen working on scripts, one sometimes wants just a simple cache setup. Maybe it should be persistent, maybe even somewhere in the cloud so that another coworker can take over. Maybe we want a different storage during testing our scripts... everything easily handled byanystore:fromanystoreimportanycache# use decorator@anycache(uri="s3://mybucket/cache")defdownload_file(url):# a very time consuming taskreturnresult# 1. time: slowres=download_file("https://example.com/foo.txt")# 2. time: fast, as now cachedres=download_file("https://example.com/foo.txt")Installpip install anystoredevelopmentThis package is usingpoetryfor packaging and dependencies management, so firstinstall it.Clone this repository to a local destination.Within the root directory, runpoetry install --with devThis installs a few development dependencies, includingpre-commitwhich needs to be registered:poetry run pre-commit installBefore creating a commit, this checks for correct code formatting (isort, black) and some other useful stuff (see:.pre-commit-config.yaml)testmake test
Package: anystringtolower
===
TRANSFORM ANY STRING TO LOWERTransform any string with accent and without accent to lower caseDetailed documentation is in the "docs" directory.Quick startInstall the module:pip install anystrintolowerEXAMPLEfrom anystringtolower.job import stringToLowerstring= 'Ã Ã©ÃªÃ¶HELLO'lower_string = stringToLower(string)print(lower_string)You should have something like this in outpout :aeeohello
Package: any-template
Any TemplateA faster easier to Quick start any programming project.Installationpip3 install any-templateFeaturesNo third party dependencies.Templates are not stored locally.UsageCreate a folder where you want all the file to be generated, andcdinto it.Using a templateanytemp use python-simple-packageAlso initialize a git repoanytemp use python-simple-package --gitListing all the available templatesanytemp lsListing all the templates that contains a specific wordanytemp ls -c pythonContributingContributing is the only way by which this package can grow. So if you have some sort of templates that you use on a daily basis feel free to add it here.
Package: anything
Defines theAnythingandSomethingconstants.Anythingcompares true with any other object:>>> Anything == 42
True
>>> 'hello' == Anything
TrueYou can use it to check that specific values in a data structure
have a value, but it doesn’t matter what they are,
for example in a unit test:>>> [1, 2, 3] == [1, Anything, 3]
True
>>> {'x': 10, 'y': -3} == {'x': 10, 'y': Anything}
True
>>> {'x': 10} == {'x': 10, 'y': Anything}
FalseInequality behaves consistently with equality:>>> 'hello' != Anything
FalseEven None is considered equal to Anything:>>> Anything == None
TrueIf you want to make sure that a value is not None, useSomethinginstead:>>> Something == None
False
>>> Something == 1
True
>>> 1 == Something
True
>>> Something != None
True
>>> Something != 'foo'
FalseSomethingonly checks for None specifically, i.e. it does not accept any
falsy value:>>> Something == False
True
>>> Something != False
FalseEquality between the two constants works as you probably expect:>>> Anything == Anything
True
>>> Something == Something
True
>>> Anything == Something
True
>>> Something == Anything
TrueUsage in TestsExample: Creating a user and making sure its data is returned.
As the generated ID can be anything, we can’t check it’s value,
but this makes sure it is returned:import unittest

class MyTest(unittest.TestCase):
    def test_create_user(self):
        data = create_user(name='Mary')
        self.assertEqual({
            'name': 'Mary',
            'id': Anything
        }, data)
Package: anything-conversion
anything-conversionHello Pythoniers!...... this package is used to convert from one to another...Currently WeightConversion,VolumeConversion,CurrencyConversion,TemperatureConversion,AreaConversionA lot more yet to come in future.....Need your blessings...If you like my content..please give a star **************Developed by sairamdgr8 (c) 2021Examples of How To Use (anything-conversion)Installing anything-convertor packagepip install anything-conversionfromanything_conversion.converterimportWeightConverter,AreaConverterx=WeightConverter.kilogram_gram(120)print(x)output: 120000fromanything_conversion.CurrencyConversionimportCurrencyConvertery1=CurrencyConverter.currency_conversion("USD","INR",54)print("currency_conversion: ",y1)output: currency_conversion:  ('current_currency=USD', 'convert_currency=INR', 'convert_amount=54.0 USD', 'final_converted_amount=4063.04 INR')fromanything_conversion.TemperatureConversionimportTemperatureConvetery2=TemperatureConveter.Fahrenheit_Celsius(100)print("TemperatureConveter.Fahrenheit_Celsius: ",y2)output: TemperatureConveter.Fahrenheit_Celsius:  37.77777777777778
Package: anythumbnailer
anythumbnailer=======================A CLI utility/Python library to create thumbnails for different file types(including PDF, mp4 videos and Microsoft Office documents aka docx/xlsx/pptx).All the heavy-lifting is done by commonly-used tools such as LibreOffice/unoconv,ffmpeg, poppler and ImageMagick so format support is limited by what these toolscan process.I built the library as I could not find a project which satisfied my needs(as detailed in my question on StackOverflow [1]). However as I wrote somethingfrom scratch the project has quite a few limitations:- I'm using it only on Linux (Fedora, CentOS 6+7 to be exact). Paths to otherprograms are hard-coded.- I never tried running this on any other system such as Windows or OS X.Very likely you will have to tweak the code in case this project is useful foranyone but me. That being said I'm interested in making the configuration lesshard-coded (e.g. by introducing a config file with sensible syntax) andautomated tests.Installation / Usage-----------------------$ python setup.py develop$ anythumbnail SOURCEFILE [OUTPUTFILE][1] http://stackoverflow.com/questions/21511974/is-there-a-python-library-to-create-thumbnails-for-various-document-file-formats
Package: anytime
INSTALLATION:sudo -H pip3 install anytimeUSAGE EXAMPLE:"""

The following example program gets a very large vector

and tries to find the largest element in the vector.

It stops after a pre-specified time, and returns the largest element found so far.

"""



import random, numpy as np

from AnytimeAlgorithm2 import AnytimeAlgorithm



class MaximumFinder(AnytimeAlgorithm):

    def __init__(self, vector):

        self.vector = vector

        self.currentMaximum = 0



    def update(self):

        i = random.randint(0,len(self.vector)-1)

        if self.vector[i]>self.currentMaximum:

            self.currentMaximum = self.vector[i]

            print("self",self,"result",self.currentMaximum)



    def result(self):

        return self.currentMaximum



v = np.random.rand(10000000)

finder = MaximumFinder(v)

print(finder.result_after(0.0001))  # seconds

print(finder.result_after(0.001))  # seconds

print(finder.result_after(0.01)) # secondsKeywords: anytime algorithms
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Package: anytop
Overviewanytopis a tool for viewing frequency distributions over streaming input.
It reads input line by line, and shows the top elements in the distribution as
they stream in. It is inspired by the excellent command-line tools available
for the Varnish web accelerator.anytopis designed to work within a shell flow, allowing you to easily
modify the data streaming in with tools such ascut,sedandtr.
Get usage help by typinganytop--help. To exitanytop, type CTRL-C.Example: dictionary wordsGet the distribution of word starting with each different letter from the
dictionary:cut -c 1-1 /usr/share/dict/words | tr [:upper:] [:lower:] | anytopLooks likes,pandchave the most words.Example: file typesWork out the relative distribution of file extensions in a source tree:ack -f | fgrep . | awk -F . '{print $NF}' | anytopLooks like a PHP codebase for a web app.Example: shell commandsSee what commands you use most often in bash:cut -d ' ' -f 1 .bash_history | xargs -n 1 basename | anytopDeveloper toolsvim,gitandj(autojump) feature pretty prominently.  Maybe I typelsa little too much.As you can see,anytoplends itself handily to shell pipelines, allowing
it to be useful in a wide variety of situations.Memory usageAnytop uses memory proportional to the number of distinct lines in the input.
If the input keyspace is bounded, then anytop will use limited memory, no
matter how many lines or how long it runs.When the input keyspace is not bounded, memory use can still be bounded by
only displaying statistics on a fixed-size window of lines with the-loption.
Package: anyvc
ReadmeAnyvc is an abstraction library for all version control systems. Although
primarily a library, there is a command line tool (vc) to use with it.DevelopmentMain Repository:hg clone http://bitbucket.org/RonnyPfannschmidt/anyvc/To easy_install the latest tip using:easy_install anyvc==devThe link ishttp://bitbucket.org/RonnyPfannschmidt/anyvc/get/tip.zip#egg=anyvc-devDependenciesmercurial:mercurial>=1.2subversion:subvertpygit:dulwichChangelogfrom 0.3.7 to 0.3.7.1quickfix for issue 21from 0.3.6 to 0.3.7fix documentation buildingtemporary removal of the draco themefrom 0.3.5 to 0.3.6kill bzr backendbetter checking for existing modules for backendsfix bugs in MercurialRevision.isdirinitial clone from remote support, still hackishuse py.io.Terminalwriter for cli diff/status coloringsupport to iterate backends by featurs