Saravanan666/pypi-org huggingface dataset:
Package: gaode-api-cli
# pypi-gaode-apipypi tools for gaode api, https://lbs.amap.com/api/webservice/summaryTips: only can be used after python version 3.0.## Install```shell> pip install gaode-api-cli> gaode-api-intersectionUsage:       gaode-api-intersectiongaode-api-intersection searchByFilegaode-api-intersection searchOne```## Config Usage> To config gaode key### get a gaode keyvisit [gaode developer platform](https://lbs.amap.com/dev/key/app) to get a new `Web API key`.### set gaode key```shell> gaode-api-config set-key <key>```### get gaode key```shell> gaode-api-config get-key<gaode-key-will-display>```## Intersection Usage> Searching for intersection information from Gaode [Search API](https://lbs.amap.com/api/webservice/guide/api/search/?)### searchOne```shell> gaode-api-intersection searchOne 天目山路> gaode-api-intersection searchOne 天目山路 hanzhou> gaode-api-intersection searchOne 天安门 hanzhou```### searchByFile> To search intersections of a batch data.1. edit `input.txt` in current dir.keywords without id```天目山路高教路口文一西路高教路口...```keywords with id is supported```001 天目山路高教路口002 文一西路高教路口003 ...... ...```2. execute command like below.```shell# outputs going into output.csv> gaode-api-intersection searchByFile input.txt# outputs going into output1.csv> gaode-api-intersection searchByFile input.txt output1.csv```
Package: gaohn-common-utils
Common UtilsContinuous IntegrationVirtual EnvironmentFirst, make a virtual environment withmake_venv.sh:curl-s-omake_venv.sh\https://raw.githubusercontent.com/gao-hongnan/common-utils/main/scripts/devops/make_venv.sh&&\bashmake_venv.shvenv--pyproject--dev&&\sourcevenv/bin/activate&&\rmmake_venv.shContinue on error vs If AlwaysSeehere.Run Bandit Security Checkbash./scripts/devops/ci/ci_security_bandit.sh\--severity-level=low\--format=json\--output=bandit_results.json\common_utilsRun Linter Checkbash./scripts/devops/ci/ci_linter_pylint.sh\--rcfile=pyproject.toml\--fail-under=10\--score=yes\--output-format=json:pylint_results.json,colorized\common_utilsRun Formatter Black Checkbash./scripts/devops/ci/ci_formatter_black.sh\--check\--diff\--color\--verbose\common_utilsRun Formatter Isort Checkbash./scripts/devops/ci/ci_formatter_isort.sh\--check\--diff\--color\--verbose\common_utilsRun MyPy Type Checkbash./scripts/devops/ci/ci_typing_mypy.sh\--config-file=pyproject.toml\common_utils\|teemypy_results.logRun Unit TestRun Integration TestRun System TestRun Acceptance TestSeemadewithml.Run Data Test (Great Expectations)Run Markdown Lintnpminstall-gmarkdownlint-cli&&\touch.markdownlint.json&&\npminstall--save-dev--save-exactprettier# prettierfunctionpr(){if[-z"$1"];thenecho"Error: TARGET_DIR is mandatory."return1fiTARGET_DIR="$1"prettier"$TARGET_DIR"--write\--prose-wrapalways\--print-width80\--tab-width4\--use-tabstrue}pr<TARGET_MARKDOWN_FILE>
markdownlint--fix<TARGET_MARKDOWN_FILE>
Package: gaohn-dsa
Data Structures and Algorithm Documentationby Hongnan Gao
Oct, 2022This is the documentation for various data structures and algorithms concepts.WorkflowInstallation~/gaohn$gitclonehttps://github.com/gao-hongnan/gaohn-dsa.gitgaohn-dsa
~/gaohn$cdgaohn-dsa
~/gaohn/gaohn-dsa$python-mvenv<venv_name>&&<venv_name>\Scripts\activate
~/gaohn/gaohn-dsa(venv)$python-mpipinstall--upgradepipsetuptoolswheel
~/gaohn/gaohn-dsa(venv)$pipinstall-rrequirements.txt
~/gaohn/gaohn-dsa(venv)$pipinstallmyst-nb==0.16.0The reason for manual install ofmyst-nb==0.16.0is because it is not in sync
with the current jupyterbook version, I updated this feature to be able to show
line numbers in code cells.Setting up Continuous Integration~/gaohn/gaohn-dsa(venv)$mkdir-p.github/workflows.github/actions~/gaohn/gaohn-dsa(venv)$curl-o.github/actions/continuous-integration/action.yaml\https://raw.githubusercontent.com/gao-hongnan/common-utils/main/.github/actions/continuous-integration/template.yaml~/gaohn/gaohn-dsa(venv)$curl-o.github/workflows/continuous_integration.yaml\https://raw.githubusercontent.com/gao-hongnan/common-utils/main/.github/workflows/continuous_integration.yamlChange the environment variablePACKAGES_TO_CHECKtodsain.github/workflows/continuous_integration.yaml.Building the bookAfter cloning, you can edit the books source files located in thecontent/directory.You run~/gaohn(venv)$jupyter-bookbuildcontent/to build the book, and~/gaohn(venv)$jupyter-bookcleancontent/to clean the build files.A fully-rendered HTML version of the book will be built incontent/_build/html/.MyST NBSeeconfig documentation.
Package: gaoya
GaoyaAboutThis project implements Locality Sensitive Hashing algorithms and data structures for indexing and querying text documents.
The primary use cases for Gaoya are deduplication and clustering.64,32,16,8 bit minhash64,128 bit simhashMinHash | SimHashPowered by RustMulti-threaded>>>importgaoya>>>index=gaoya.minhash.MinHashStringIndex(hash_size=32,jaccard_threshold=0.5,num_bands=42,band_size=3,num_hashes=42*3,analyzer='word',lowercase=True,ngram_range=(1,1))>>>corpus=[...'This is the first document.',...'This document is the second document.',...'And this is the third document.',...'Is this the first document?',...'This not the first nor the second nor the third, but the fourth document'...]>>>>>>fori,docinenumerate(corpus):index.insert_document(i,doc)...>>>index.query('This is the first document.')[0,1,2,3]>>>Installation$ pip3 install gaoyaExamplesDocument Deduplication with GaoyaReferences[1] Chapter 3, Mining of Massive Datasets[2] Similarity Estimation Techniques from Rounding Algorithms[3] Detecting Near-Duplicates for Web Crawling
Package: gap
Google App Engine is excellent technology but there is a gap.If you are missinguse of pip with Google App Engine,cooperation of appengine and virtualenv,possibility to add any module to your python path,then this barebone could be at least an inspiration for you.How to use (fill) the gap?Short version> workon <myvirtualenv>
> pip install gap
> gap start-project <applicationid>
> cd <applicationid>
> appcfg update srcLong versionInstallGoogle Appengine SDKCreate avirtualenvfor you projectif necessaryeasy_install piprunpip install gapGo to directory where you want to create your GAE project.rungapstart-project<projectname># <projectname> will be used as applicationIdAdd your dependencies to requirements.gip (format is the same as piprequirements file) and
runbin/gip install-rrequirements.gipor install any packages using bin/gip same way as you are used to do it
with pip.To create a new module in your application rungapstart-app<module_name>Libraries installed using gip are accessible in dev_server as well as on GAE servers.SeeGap documentation on githubfor more
informations.Any ideas, thoughts, fixes (specially corrections of my English :) are
welcome!DisclaimerOf course … This code is published in hope that someone will find it
useful but it is provided as-is and I can take no responsibility for
improper as well as proper use.See alsoEnhance GAP with plugins and addons:GAP ResourcesGAP AngularGAP Datastore AdminChangesVersion 0.4.9gip
1. some packages caused gip not to work properly
2.-voption shows a lot of debug informationsminor fixes in documentationinvalid import in new poject’s views.pyVersion 0.4.8mainly enhancements in test suite
1. executable flag on run_test
2. added base class for testing views
3. support for rednose in tests (rednose seems not compatible with multiprocess plugin)
4. Test* classes not imported in utils.__init__ (forced test requirements even when running gap project)
5. test requirements ignored by gip (not usefull on production)fixed link in changelogextended Route class which can better handle ending slashVersion 0.4.7documentation (seedoc/index.rstor ongithub)Version 0.4.3, 0.4.5fixed missing README.rst in MANIFEST.in (sorry)changes added to package descriptionVersion 0.4tests in project template (application tests)bin/ipython in project runs ipython (if installed) with gae testbed
stubsnew apps have model template file nowbetter template loaders to allow install 3rd party modulesdefault 404 page now shows list of routesgap tests can be run from setup.py testsettings can have defaults in config.py (refer to project’s
config.py:DEFAULT_SETTINGS)Version 0.3added some testsadded baseTest classes (many thanks to Lukas Lukovsky)added gap.conf.settings (highly cached db stored settings)minor fixes in setup.pyVersion 0.2Major rewrite to enable installation using pip and project creation a-la
django.first version of setup.pyVersion 0.1Never released
Package: gapandas
GAPandasGAPandas is a Python package that lets you query the Google Analytics reporting API and return results in Pandas DataFrames, so they can be easily analysed, reported, or plotted in Python applications. It is a simple wrapper to Google's official API which is designed to reduce code and simplify development, especially from Jupyter Notebook environments.SetupGAPandas is easy to set up. First, you need to obtain aclient_secrets.jsonkeyfile from Google Analytics in order to authenticate. Google'sdocumentationexplains how to do this.Once you have created aclient_secrets.jsonfile, download it and store it on your machine and note the path to the file. Add the associated email as a user in your Google Analytics account.Basic exampleTo make a query, authenticate by runningconnect.get_service()passing it the path to yourclient_secrets.jsonkeyfile.fromgapandasimportconnect,queryservice=connect.get_service('path/to/client_secrets.json')Now you have a connection, construct an API query to pass to the API. This "payload" must include astart-dateandend-date, somemetricsand somedimensionsstored in a Python dictionary.The queries can sometimes be fiddly to write. I recommend using theGoogle Analytics Query Explorerto construct a valid API query or creating a prototype in Google Sheets. In the below example, we'll fetch sessions, pageviews and bounces by date for the past 30 days.payload={'start_date':'30daysAgo','end_date':'today','metrics':'ga:sessions, ga:pageviews, ga:bounces','dimensions':'ga:date'}Now you can then use thequery.run_query()function to pass your payload to the API, along with the service object and your Google Analytics view ID.results=query.run_query(service,'123456789',payload)print(results)By default, this will return a Pandas DataFrame containing your query results. However, by passing the optional value of'raw'at the end of the function you can also return the raw data object. Thequerymethod also provides some other features to extract data from therawobject.results=query.run_query(service,'123456789',payload,'raw')You can run multiple queries in succession and use the Pandasmerge()function to connect these together. Pandas also makes it very easy to write the data to a file, such as a CSV or Excel document or write it to a database. You can use the data in reports, visualisations or machine learning models with very little code.PaginationIf you do not definemax_resultsthe API will return a default of 1000 rows in a single page. You can set this to a maximum of 10000 in your payload.Pagination is handled automatically. GAPandas will fetch each page of results and return them all in a single DataFrame (or object if you pass therawflag in your query.)ChangesVersion 0.16 - Addedset_dtypes()function to set the correct dtypes and improved error handling.Version 0.17 - Fixed bug in use ofexit()
Package: gapic-generator
A generator for protocol buffer described APIs for and in Python 3.This is a generator for API client libraries for APIs
specified byprotocol buffers, such as those inside Google.
It takes a protocol buffer (with particular annotations) and uses it
to generate a client library.PurposeThis library replaces themonolithic generatorwith some improvements:An explicit normalized format for specifying APIs.Light weight, in-language code generators.BazelThis generator can be called from Bazel, which is a recommended way of using it inside a continuous integration build or any other automated pipeline.Clone the googleapis repository
$ git clonehttps://github.com/googleapis/googleapis.gitCreate the targetsYou need to add the following targets to your BUILD.bazel file.load("@gapic_generator_python//rules_python_gapic:py_gapic.bzl","py_gapic_library")load("@gapic_generator_python//rules_python_gapic:py_gapic_pkg.bzl","py_gapic_assembly_pkg")py_gapic_library(name="documentai_py_gapic",srcs=[":documentai_proto"],)py_gapic_assembly_pkg(name="documentai-v1beta2-py",deps=[":documentai_py_gapic",],)Compiling an APIUsing Bazel:bazelbuild//google/cloud/documentai/v1beta2:documentai-v1beta2-pyUsing Protoc:# This is assumed to be in the `googleapis` project root.$protocgoogle/cloud/vision/v1/*.proto \
    --python_gapic_out=/dest/DevelopmentDevelopmentContributingIf you are looking to contribute to the project, please seeContributingfor guidlines.DocumentationSee thedocumentation.
Package: gapic-google-cloud-datastore-v1
gapic-google-cloud-datastore-v1 usesgoogle-gax(Google API extensions) to provide an
easy-to-use client library for theGoogle Cloud Datastore API(v1) defined in thegoogleapisgit repositoryGetting startedgapic-google-cloud-datastore-v1 will allow you to connect to the
Google Cloud Datastore API and access all its methods. In order to do this, you need
to set up authentication as well as install the library locally.Setup AuthenticationTo authenticate all your API calls, first install and setup theGoogle Cloud SDK.
Once done, you can then run the following command in your terminal:$gcloudbetaauthapplication-defaultloginor$gcloudauthloginPlease seegcloud beta auth application-default logindocument for the difference between these commands.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Mac/Linuxpip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-datastore-v1Windowspip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-datastore-v1At this point you are all set to continue.
Package: gapic-google-cloud-error-reporting-v1beta1
gapic-google-cloud-error-reporting-v1beta1 usesgoogle-gax(Google API extensions) to provide an
easy-to-use client library for theStackdriver Error Reporting API(v1beta1) defined in thegoogleapisgit repositoryGetting startedgapic-google-cloud-error-reporting-v1beta1 will allow you to connect to the
Stackdriver Error Reporting API and access all its methods. In order to do this, you need
to set up authentication as well as install the library locally.Setup AuthenticationTo authenticate all your API calls, first install and setup theGoogle Cloud SDK.
Once done, you can then run the following command in your terminal:$gcloudbetaauthapplication-defaultloginor$gcloudauthloginPlease seegcloud beta auth application-default logindocument for the difference between these commands.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Mac/Linuxpip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-error-reporting-v1beta1Windowspip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-error-reporting-v1beta1At this point you are all set to continue.
Package: gapic-google-cloud-functions-v1beta2
gapic-google-cloud-functions-v1beta2 usesgoogle-gax(Google API extensions) to provide an
easy-to-use client library for theGoogle Cloud Functions API(v1beta2) defined in thegoogleapisgit repositoryGetting startedgapic-google-cloud-functions-v1beta2 will allow you to connect to the
Google Cloud Functions API and access all its methods. In order to do this, you need
to set up authentication as well as install the library locally.Setup AuthenticationTo authenticate all your API calls, first install and setup theGoogle Cloud SDK.
Once done, you can then run the following command in your terminal:$gcloudbetaauthapplication-defaultloginor$gcloudauthloginPlease seegcloud beta auth application-default logindocument for the difference between these commands.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Mac/Linuxpip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-functions-v1beta2Windowspip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-functions-v1beta2At this point you are all set to continue.
Package: gapic-google-cloud-language-v1
gapic-google-cloud-language-v1 usesgoogle-gax(Google API extensions) to provide an
easy-to-use client library for theGoogle Cloud Natural Language API(v1) defined in thegoogleapisgit repositoryGetting startedgapic-google-cloud-language-v1 will allow you to connect to the
Google Cloud Natural Language API and access all its methods. In order to do this, you need
to set up authentication as well as install the library locally.Setup AuthenticationTo authenticate all your API calls, first install and setup theGoogle Cloud SDK.
Once done, you can then run the following command in your terminal:$gcloudbetaauthapplication-defaultloginor$gcloudauthloginPlease seegcloud beta auth application-default logindocument for the difference between these commands.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Mac/Linuxpip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-language-v1Windowspip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-language-v1At this point you are all set to continue.
Package: gapic-google-cloud-language-v1beta1
gapic-google-cloud-language-v1beta1 usesgoogle-gax(Google API extensions) to provide an
easy-to-use client library for theGoogle Language API(v1beta1) defined in thegoogleapisgit repositoryGetting startedgapic-google-cloud-language-v1beta1 will allow you to connect to the Google
Language API and access all its methods. In order to do this, you need
to set up authentication as well as install the library locally.Setup AuthenticationTo authenticate all your API calls, first install and setup theGoogle Cloud SDK.
Once done, you can then run the following command in your terminal:$gcloudbetaauthapplication-defaultloginor$gcloudauthloginPlease seegcloud beta auth application-default logindocument for the difference between these commands.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Mac/Linuxpip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-language-v1beta1Windowspip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-language-v1beta1At this point you are all set to continue.
Package: gapic-google-cloud-language-v1beta2
gapic-google-cloud-language-v1beta2 usesgoogle-gax(Google API extensions) to provide an
easy-to-use client library for theGoogle Cloud Natural Language API(v1beta2) defined in thegoogleapisgit repositoryGetting startedgapic-google-cloud-language-v1beta2 will allow you to connect to the
Google Cloud Natural Language API and access all its methods. In order to do this, you need
to set up authentication as well as install the library locally.Setup AuthenticationTo authenticate all your API calls, first install and setup theGoogle Cloud SDK.
Once done, you can then run the following command in your terminal:$gcloudbetaauthapplication-defaultloginor$gcloudauthloginPlease seegcloud beta auth application-default logindocument for the difference between these commands.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Mac/Linuxpip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-language-v1beta2Windowspip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-language-v1beta2At this point you are all set to continue.
Package: gapic-google-cloud-logging-v2
gapic-google-cloud-logging-v2 usesgoogle-gax(Google API extensions) to provide an
easy-to-use client library for theStackdriver Logging API(v2) defined in thegoogleapisgit repositoryGetting startedgapic-google-cloud-logging-v2 will allow you to connect to the
Stackdriver Logging API and access all its methods. In order to do this, you need
to set up authentication as well as install the library locally.Setup AuthenticationTo authenticate all your API calls, first install and setup theGoogle Cloud SDK.
Once done, you can then run the following command in your terminal:$gcloudbetaauthapplication-defaultloginor$gcloudauthloginPlease seegcloud beta auth application-default logindocument for the difference between these commands.InstallationInstall this library in avirtualenvusing pip.virtualenvis a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.Withvirtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Mac/Linuxpip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-cloud-logging-v2Windowspip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install gapic-google-cloud-logging-v2At this point you are all set to continue.