Saravanan666/pypi-org huggingface dataset:
Package: indexherbariorum
index-herbariorum-python-client=====================A python client library for the `Index Herbariorum https://github.com/nybgvh/IH-API/wiki` API.To contribute code to this project, please submit a pull request to the repo on github:https://github.com/jlramirez/index-herbariorum-python-clientInstallation------------.. code-block::pip install indexherbariorumUsage-----------Get all available countries.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()countries_result = ih.countries()Search for an institution by code.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()institution_result = ih.institution('ala')Search institutions by matching a specified query.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()institutions_result = ih.institutions(rq={'state': 'california', 'city': 'los angeles'})Search staff by matching a specified query.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()staff_result = ih.staff(rq={'state': 'new york', 'correspondent': 'yes'})Get number of countries.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()count = ih.count_countries()Get number of institution records based on search.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()count = ih.count_institutions(rq={'country': 'colombia', 'city': 'medellin'})Get number of staff records based on search.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()count = ih.count_staff(rq={'state': 'texas', 'correspondent': 'yes'})Download CSV file.. code-block:: pythonimport indexherbariorumih = indexherbariorum.init()ih.download('staff', rq={'state': 'new york', 'correspondent': 'yes'}, filename='ny_staff.csv')
Package: indexhr
index-hrindex.hr basic news content in the terminalInstallationAvailable via PyPi, compatible with Python 2.7.x and 3.6.x.pipinstallindexhrUsageIn terminal asindex-hr.
Navigation using up/down arrows. Clicking enter will open the selected in the new tab of your browser.
Available options:--raw (-r) [get just the parsed data without TUI]from indexhr.scrapper import scrapped_data[scrapped data in your code]ExampleLicenseMIT.
Package: indexhtmlappender
OverviewFor each html file you encounter, add the suffix "/index.html" to each relative urlThis project was generated withcookiecutterusingjacebrowning/template-python.SetupRequirementsPython 0.0+InstallationInstall it directly into an activated virtual environment:$ pip install indexhtmlappenderor add it to yourPoetryproject:$ poetry add indexhtmlappenderUsageAfter installation, the package can be imported:$ python
>>> import indexhtmlappender
>>> indexhtmlappender.__version__
Package: indexical-sdk
Indexical Python SDKThe Indexical SDK for Python makes it easier to use the Indexical APIfor Python projects that are interacting with an existing codebase. It primarily contains helper functions that can extract the appropriate sources from code/configuration files, for use in Indexical API calls.Currently, the SDK supports analyzing projects written in JS/TS or in Python. Specifically, the SDK can extract sources in the following ways:In JS/TS projects:Analyzing a JS/TS source file (extract_sources_from_js)Analyzing a package.json file (extract_sources_from_package_json)Analyzing a package-lock.json file (extract_sources_from_package_lock_json)In Python projects:Analyzing a Python JS/TS source file (extract_sources_from_py)Analyzing a requirements.txt file (extract_sources_from_requirements_txt)Installationpipinstallindexical_sdkUsageAllextract_sources_from_...functions expect a single argument (the input file's contents, as a string), and return a Dict that can be combined with the body of your API request (containing either thenpmor thepypikey, depending on the type of project being analyzed). The Indexical SDK is meant to work with whatever library you're currently using for accessing file contents and making API calls. The example here usesrequestsand python'spathlib, but could easily be adapted for any other choice:importindexical_sdkfrompathlibimportPathimportrequestsimportospackage_file_contents=Path("/path/to/package.json").read_text()prompt="your prompt here"npm=indexical_sdk.extract_sources_from_package_json(package_file_contents)["npm"]API_KEY=os.getenv('INDEXICAL_API_KEY')response=requests.post("https://api.indexical.dev/context",json={"npm":npm,"prompt":prompt},headers={"Authorization":f"Bearer{API_KEY}"})# see https://indexical.dev/docs for API docs on the expected responseThe same example applies for using any of the SDK's included extractors (listed above, in the first section of the README).
Package: indexify
Indexify Python ClientInstallationThis is the Python client for interacting with the Indexify service.To install it, simply run:pipinstallindexifyUsageSee thegetting startedguide for examples of how to use the client.
Look at theexamplesdirectory for more examples.DevelopmentTo install the client from this repository for development:cd"path to this repository"pipinstall-e.Install and run thepoetrypackage manager:pipinstallpoetry
poetryinstallMore information athttps://python-poetry.org/docs/.Environment VariablesIndexifyClient uses httpx under the hood, so there are many environment variables that can be used to configure the client. More information on supported environment variables can be foundhere.
Package: indexify-extractor-sdk
Indexify Extractor SDKIndexify Extractor SDK is for developing new extractors to extract information from any unstructured data sources.We already have a few extractors here -https://github.com/tensorlakeai/indexifyIf you don't find one that works for your use-case use this SDK to build one.Install the SDKInstall the SDK from PyPivirtualenvvesourceve/bin/activate
pipinstallindexify-extractor-sdkImplement the extractor SDKImplement the extractor interfaceclassMyExtractor(Extractor):input_mime_types=["text/plain","application/pdf","image/jpeg"]def__init__(self):super().__init__()defextract(self,content:Content,params:InputParams)->List[Content]:return[Content.from_text(text="Hello World",features=[Feature.embedding(values=[1,2,3]),Feature.metadata(json.loads('{"a": 1, "b": "foo"}')),],labels={"url":"test.com"},),Content.from_text(text="Pipe Baz",features=[Feature.embedding(values=[1,2,3])],labels={"url":"test.com"},),]defsample_input(self)->Content:returnContent.from_text("hello world")Test the extractorYou can run the extractor locally using the command line tool attached to the SDK like this, by passing some arbitrary text or a file.indexify-extractorlocalmy_extractor.py:MyExtractor--text"hello"Deploy the extractorOnce you are ready to deploy the new extractor and ready to build pipelines with it. Package the extractor and deploy as many copies you want, and point it to the indexify server. Indexify server has two addresses, one for sending your extractor the extraction task, and another endpoint for your extractor to write the extracted content.indexify-extractor join my_extractor.py:MyExtractor --coordinator-addr localhost:8950 --ingestion-addr:8900
Package: indexify-langchain
Indexify LangchainThis package contains our LangChain Retriever component, which leverages LLMs to fetch data with langchain. In order to use this retriever you must have Indexify, to read more about getting started with indexify you can read ourgetting started documentation.RequirementsIndexifyIndexify Python ClientIndexify Retriever RAG ExampleBelow is an example on how you can use our indexify client and langchain retriever with OpenAI in a basic RAG example.fromindexify_langchainimportIndexifyRetriever# Initialize Indexify clientclient=IndexifyClient.create_namespace("test-langchain")client.add_extraction_policy("tensorlake/minilm-l6","minilml6",)# Add Documentsclient.add_documents("Lucas is from Atlanta Georgia")# Initialize retrieverparams={"name":"minilml6.embedding","top_k":9}retriever=IndexifyRetriever(client=client,params=params)# Setup Chat Prompt Templatefromlangchain.promptsimportChatPromptTemplatetemplate="""You are an assistant for question-answering tasks.Use the following pieces of retrieved context to answer the question.If you don't know the answer, just say that you don't know.Use three sentences maximum and keep the answer concise.Question:{question}Context:{context}Answer:"""prompt=ChatPromptTemplate.from_template(template)# Ask llm question with retriever contextfromlangchain_openaiimportChatOpenAIfromlangchain.schema.runnableimportRunnablePassthroughfromlangchain.schema.output_parserimportStrOutputParserllm=ChatOpenAI(model_name="gpt-3.5-turbo",temperature=0)rag_chain=({"context":retriever,"question":RunnablePassthrough()}|prompt|llm|StrOutputParser())# Ask LLM Questionquery="Where is Lucas from?"print(rag_chain.invoke(query))
Package: indexnow
Info:An IndexNow URL submitter for Python.Author:Ajit Jasrotia (http://github.com/ajitjasrotia,http://twitter.com/ajitjasroti)IndexNow is an easy way for websites owners to instantly inform search engines about latest content changes on their website.InstallationYou can get IndexNow by using pip:$ pip install indexnowYou can get IndexNow by using poetry:$ poetry shell
$ poetry add indexnowIf you want to install it from source, grab the git repository from GitHub and run setup.py:$ git clone git@github.com:ajitjasrotia/indexnow.git
$ cd indexnow
$ python setup.py installDocumentationThe key features are:Support for DjangoSupport for FastAPIMore information on Getting-StartedGuidefromindexnowimportIndexNowindex_now=IndexNow(key="57e85df435cd43bb",host="example.com")status=index_now.index(["https://www.example.com"])print(f"IndexNow Response:{status}")IndexNowResponse:200Getting InvolvedOpen Source projects can always use more help. Fixing a problem, documenting a feature, adding
translation in your language. If you have some time to spare and like to help us, here are the places to do so:GitHub:https://github.com/ajitjasrotia/indexnowMailing list:https://groups.google.com/group/indexnowSupportIndexNow is free and always will be. It is developed and maintained by developers in an Open Source manner.
Any support is welcome. You could help by writing documentation, pull-requests, report issues and/or translations.Please remember that nobody is paid directly to develop or maintain IndexNow so we do have to divide our time
between putting food on the table, family, this project and the rest of life :-)
Package: indexPy
indexPyindexPy is a Python3 module designed for working with PyPI API; an API for viewing Python package data.InstallationThe easiest way to installindexPyis through PIP.pip install indexPyorpip3 install indexPyBefore installing, ensure your Python version is 3.6 or above.UsageWithindexPy, you can access data from a package like it's package name, author,
contact information, URLs, releases, etc.The following example demonstrates the standard use ofindexPy.# Example 1fromindexPy.apiimportPackageInfo# Import the modulepkg=PackageInfo("requests")# Save the informationpkg.author>>>'Kenneth Reitz'pkg.name>>>'requests'# Example 2fromindexPy.apiimportPackageInfo# Import the modulepkg=PackageInfo("indexPy")# Save the informationpkg.author>>>'Angel Carias'pkg.name>>>'indexPy'
Package: index.py
中文
|English一个易用的高性能异步 web 框架。Index.py 文档Index.py 实现了ASGI3接口，并使用 Radix Tree 进行路由查找。是最快的 Python web 框架之一。一切特性都服务于快速开发高性能的 Web 服务。大量正确的类型注释灵活且高效的路由系统能作用于任意路由及路由分组上的路由中间件适用于中间件与视图的依赖注入可视化 API 接口与在线调试支持Server-sent events与 WebSocket自带一键部署命令 (基于 uvicorn 与 gunicorn)可使用任何标准 ASGI 生态Installpipinstall-Uindex.py或者直接从 Github 上安装最新版本（不稳定）pipinstall-Ugit+https://github.com/abersheeran/index.py@setup.py中国大陆内的用户可从 Gitee 上的镜像仓库拉取pipinstall-Ugit+https://gitee.com/abersheeran/index.py.git@setup.py
Package: indexr
A general purpose indexer written in Python. Licensed under the MIT license.FeaturesTheindexr.buildrpackage is capable of constructing an inverted index.Theindexr.utilspackage contains utilities, such as a tokenization method for converting a text to tokens.SetupThis package can be installed using pip:pip install indexrExamplesIn this example, an indexer is constructed for 3 files. The example uses the following 3 files:0.txt:The0thdocument.1.txt:The1stdocument.2.txt:The2nddocument.Somewords:repeat,repeat,repeat.The following code sample can be found in the demo directory (demo/buildr.py).# Build the indexindex=build_index(files,'index',force_rebuild=True,indexer=SPIMI(show_progress=True))# Try to find the word "1st"print('All found occurrences of "1st":')print(index.find('1st',frequencies=True),"\n")# Try to find the word "The"print('All found occurrences of "The":')print(index.find('The',frequencies=True),"\n")# Try to find the word "repeat"print('All found occurrences of "repeat":')print(index.find('repeat',frequencies=True),"\n")It gives the following output:>>>Allfoundoccurrencesof"1st":>>>{'1.txt':1}>>>>>>Allfoundoccurrencesof"The":>>>{'0.txt':1,'1.txt':1,'2.txt':1}>>>>>>Allfoundoccurrencesof"repeat":>>>{'2.txt':3}So indeed, it finds 1 occurrence of “1st”, 3 occurrences of “The” (1 occurrence in each file) and 3 occurrences of “repeat” (3 occurrences in one file).Documentationhttps://indexr.readthedocs.orgCreditsTools used in rendering this package:Cookiecuttercookiecutter-pypackageHistory1.0.1 (2015-12-07)First release, including the BSB algorithm and the SPIMI algorithm.0.1.0 (2015-12-04)First release on PyPI.
Package: index-safe
index_safeA set of Python utilities for downloading Sentinel-1 Burst data and metadata via S3 with minimalGETrequests and data
download:The main innovation of these utilities is that they allow downloading of burst datawithout downloading the
surrounding data from the swath they're contained in. These has been difficult becauseDEFLATEcompressed data is
not set up for random read access. This innovation is made possible by thezran.cutility created by Mark Adler and its
implementation in Paul McCarthy'sindexed_gzippackage.InstallationInstall the requirements using Mamba or Conda using the command:mamba create -f envirnoment.ymlorconda env create -f envirnoment.ymlActivate the environment:mamba (or conda) activate burstsThen, from within the top-level package directory, run:python -m pip install -e .UsageRuncreate_index.pyEx:create_indexS1A_IW_SLC__1SDV_20200604T022251_20200604T022318_032861_03CE65_7C85This will create a{GRANULE_NAME}.jsonand burst index json files ({GRANULE_NAME}_{SWATH_NAME_{POLARIZATION}.json) that contain the information needed to download the metadata/data directly.Then, runextract_burst.pyEx:extract_burstS1A_IW_SLC__1SDV_20200604T022251_20200604T022318_IW2_VV_0.jsonto get the burst image dataThen, runextract_metadata.pyEx:extract_metadataS1A_IW_SLC__1SDV_20200604T022251_20200604T022318.jsonto get the burst metadata
Package: index-template
IndexTemplateThis repository contains MetaSearch index template definitions and util methods as shared resources.It also provides an index creation script to manually create index tempalte for Twitter and Discord search (TODO: integrate index template creation as part of OpenSearch CDK deployement)To create index templateEnter your OpenSearch URI, username and password in index_configs.pyRun "python3 setup.py install --user && python3 src/create_templates.py"To modify index field definitionsIn "field_definitions.py", identify if it's a shared field or any verticial specific field, and modify the corresponding variablesTo obtain the list of index fields for a specific index in downstream indexer codeImport this repository using Git SubmoduleImport the necessary index configfrom index_configs import twitter_index_configUse the get fields methodget_fields_by_index(discord_index_config).keys()To obtain the index to be updated or other index metadataImport "twitter_index_config" or "discord_index_config" and look for the associated attributesThe index name to be updated to can be found at "twitter_index_config.index_name" and "discord_index_config.index_name"Notes on re-indexingFor lightweight re-indexing after template change, followhttps://opensearch.org/docs/latest/opensearch/reindex-data/TODOTest the util in indexing lambda using submodules to ensure indexer can be kept in sync with index template, and index based on the template accordingly
Package: indextextreplace
Replace specific substrings within a given string using index-based replacementsTested against Windows / Python 3.11 / Anacondapip install indextextreplaceindex_text_replace(string:str,replacements:List[Tuple[int,int,str]])->str:r"""Replace specific substrings within a given string using index-based replacements.Args:string (str): The input string in which replacements will be made.replacements (List[Tuple[int, int, str]]): A list of replacement tuples, where each tupleconsists of three elements:- Start index (int): The starting index of the substring to be replaced (inclusive).- End index (int): The ending index of the substring to be replaced (inclusive).- Replacement text (str): The text to replace the specified substring with.Returns:str: A modified string with the specified replacements applied.This function replaces substrings within the input `string` according to the provided`replacements` list. Each replacement is defined by a start index (inclusive), an end index(inclusive), and the replacement text. The replacement is applied to the specified substringwithin the string. The modified string is then returned.If the `replacements` list contains overlapping intervals, the behavior of the function isdefined by the order of the replacements within the list. The last replacement in the listfor a given index takes precedence.Note:- Indexing is 0-based.- The function does not modify the original input string and returns a new modified string.- If the start or end indices of a replacement are out of bounds, they are adjusted tothe nearest valid index within the string.Raises:ValueError: If the end index of a replacement is less than the start index."""fromindextextreplaceimportindex_text_replacet='''Parenthese (altgriechisch παρένθεσις parénthesis, deutsch ‚Einschub')'''r=[(1,2,'XXXX'),(13,14,'YYYYY')]index_text_replace(t,r)# "PXXXXenthese (aYYYYYgriechisch παρένθεσις parénthesis, deutsch ‚Einschub')"
Package: indextools
IndexToolsCommon index formats, such as BAM Index (BAI) and Tabix (TBI), contain coarse-grained information on the density of NGS reads along the genome that may be leveraged for rapid approximation of read depth-based metrics. IndexTools is a toolkit for extremely fast NGS analysis based on index files.InstallationPre-requisitesPython 3.6+PippipinstallindextoolsFrom sourceClone the repositorygit clone https://github.com/dnanexus/IndexTools.gitYou'll need several tools to run the full install and release processgitcurlmakePoetryBlackFlake8DunamaiThen# Install locally$makeinstall# Release new version (if you are a maintainer)$makereleaseversion=<newversion>token=<GitHubAPIToken>CommandsPartitionThepartitioncommand processes a BAM index file and generates a file in BED format that contains intervals that are roughly equal in "volume." This partition BAM file can be used for more efficient parallelization of secondary analysis tools (as opposed to parallelizing by chromosome or by uniform windows).# Generate a BED with 10 partitionsindextoolspartition-Itests/data/small.bam.bai\-ztests/data/contig_sizes.txt\-n10\-osmall.partitions.bedLimitationsIndexTools is under active development. Please see theissue trackerandroad mapto view upcoming features.Some of the most commonly requested features that are not yet available are:Support for CRAM files and CRAM indexes (.crai).Support for non-local files, via URIs.DevelopmentWe welcome contributions from the community. Please see thedeveloper READMEfor details.Contributors are required to abide by ourCode of Conduct.Technical detailsVolumeIn a bioinformatics context, the term “size” is overloaded. It is used to refer to the linear size of a genomic region (number of bp), disk size (number of bytes), or number of features (e.g. read count). IndexTools estimates the approximate number of bytes required to store the uncompressed data of features within a given genomic region. To avoid confusion or conflation with any of the meanings of “size,” we chose instead to use the term “volume” to refer to the approximate size (in bytes) of a given genomic region. It is almost never important or useful to be able to interpret the meaning of a given volume, nor can volume be meaningfully translated to other units; volume is primarily useful as a relative measure. Thus, we use the made-up unit “V” when referring to any specific volume.LicenseIndexTools is Copyright (c) 2019 DNAnexus, Inc.; and is made available under theMIT License.IndexTools isnotan officially supported DNAnexus product. All bug reports and feature requests should be handled via theissue tracker. Pleasedo notcontact DNAnexus support regarding this software.AcknowledgementsThe initial inspiration for IndexTools came from @brentp'sindexcov.IndexTools is built on several open-source libraries; see thepyproject.tomlfile for a full list.
Package: indexurl
indexurlThis is a super-simple project to read the global.index-url config value of pip
without extra processes.fromindexurlimportget_index_urlprint(get_index_url())Licenseindexurl is copyrightTim Hatch, and licensed under
the MIT license.  I am providing code in this repository to you under an open
source license.  This is my personal repository; the license you receive to
my code is from me and not from my employer. See theLICENSEfile for details.
Package: indian-cities
indian-cities  -- states & cities for india 🇮🇳Why?If there was something plug 🔌 and play
which can be just imported and it'll fill the choices fields with Indian cities or states.
How good it'll be.How to use thisTo import just add this linefrom indian_cities.dj_city import citiesTest itprint(cities[0])Now if the output looks like this('Andaman and Nicobar Islands', (('Port Blair', 'Port Blair'),))Then awesome, it did work 👍class myModel(models.Model):

    city = models.CharField(choices=cities, null=False, max_length=20)Requirements:Any version of Python, DjangoInstallationTo install thispip install indian-citiesConnect with me:LinkedIn:https://www.linkedin.com/in/chayandatta/github:https://github.com/chayandattamade with ❤️ and 🐍