Saravanan666/pypi-org huggingface dataset:
Package: google-currency
Google currencyDisclaimer:This package fetch the result from Google using web scrapping.
Owner will not be responsible for any misuse of this package. This is solely for
the purpose of learning.A very simple currency converter.It can convert the currency of153 codes.Since the results are fetched fromGoogledirectly, you can trust the results :-DInstallationTo install the library run the below command (This will also installrequests)pip install google-currencyUsagefrom google_currency import convert  

# Converted without comma like 70000.00 
convert('usd', 'inr', 1000) 

# Converted amount with comma like 70,000.00
convert('usd', 'inr', 1000)This will return a JSON response like below{  
	 "converted": true, 
	 "from": "USD", 
	 "to": "INR", 
	 "amount": "74876.00"
}

{  
	 "converted": true, 
	 "from": "USD", 
	 "to": "INR", 
	 "amount": "74,876.00"
}Response descriptionconverted: Boolean indicating whether the amount is converted or not, if this isfalsethan it means thecurrency code is not valid and the amount is not converted and it will be equal to0.amount: Converted amountfrom: Currency code from which the amount is converted.to: Currency code to which the amount is converted.
Package: google-custom-search
google-custom-searchInstallpipinstallgoogle-custom-searchor if you want use async/await, please install.pipinstallgoogle-custom-search[async]Sample codeimportgoogle_custom_searchgoogle=google_custom_search.CustomSearch(apikey="your api_key",engine_id="your engine_id")# if image is True, it's can search, but you need to setting at google console searchresults=google.search("Hello")forresultinresults:# get a title.print(result.title)# get a link.print(result.url)# get a displayLink.print(result.display_url)# get a htmlTitle.print(result.html_title)# get a snippet.print(result.snippet)Sample code async versionimportasyncioimportgoogle_custom_searchgoogle=google_custom_search.CustomSearch(token="your api_key",engine_id="your engine_id",image=True)# if image is True, it's can search, but you need to setting at google console searchasyncdefmain():results=awaitgoogle.search_async("word!")forresultinresults:# get a title.print(result.title)# get a link.print(result.url)# get a displayLink.print(result.display_url)# get a htmlTitle.print(result.html_title)# get a snippet.print(result.snippet)asyncio.run(main())orimportasyncioimportgoogle_custom_searchgoogle=google_custom_search.CustomSearch(token="your api_key",engine_id="your engine_id",image=True)# if image is True, it's can search, but you need to setting at google console searchasyncdefmain():asyncforitemingoogle.search_async_iterator("word!"):# get a title.print(item.title)# get a link.print(item.url)# get a displayLink.print(item.display_url)# get a htmlTitle.print(item.html_title)# get a snippet.print(item.snippet)asyncio.run(main())
Package: google-datacatalog-connectors-commons
google-datacatalog-connectors-commonsCommon resources for Data Catalog connectors.Disclaimer: This is not an officially supported Google product.Table of Contents1. Installable file build process1.1. Get the code1.2. Virtualenv1.2.1. Install Python 3.61.2.2. Create and activate avirtualenv2. Developer environment2.1. Install and run YAPF formatter2.2. Install and run Flake8 linter2.3. Install the package in editable mode (i.e. setuptools “develop mode”)2.4. Run the unit tests1. Installable file build process1.1. Get the codegitclonehttps://github.com/GoogleCloudPlatform/datacatalog-connectorscddatacatalog-connectors/google-datacatalog-connectors-commons1.2. VirtualenvUsingvirtualenvis optional, but strongly recommended.1.2.1. Install Python 3.61.2.2. Create and activate avirtualenvpip3install--upgradevirtualenv
python3-mvirtualenv--pythonpython3.6envsource./env/bin/activate2. Developer environment2.1. Install and run YAPF formatterpipinstall--upgradeyapf# Auto update filesyapf--in-place--recursivesrctests# Show diffyapf--diff--recursivesrctests# Set up pre-commit hook# From the root of your git project.curl-opre-commit.shhttps://raw.githubusercontent.com/google/yapf/master/plugins/pre-commit.sh
chmoda+xpre-commit.sh
mvpre-commit.sh.git/hooks/pre-commit2.2. Install and run Flake8 linterpipinstall--upgradeflake8
flake8srctests2.3. Install the package in editable mode (i.e. setuptools “develop mode”)pipinstall--editable.2.4. Run the unit testspythonsetup.pytest
Package: google-datacatalog-connectors-commons-test
google-datacatalog-connectors-commons-testCommon test resources for Data Catalog connectorsDisclaimer: This is not an officially supported Google product.Table of Contents1. Installable file build process1.1. Get the code1.2. Virtualenv1.2.1. Install Python 3.61.2.2. Create and activate avirtualenv2. Developer environment2.1. Install and run YAPF formatter2.2. Install and run Flake8 linter2.3. Install the package in editable mode (i.e. setuptools “develop mode”)2.4. Run the unit tests1. Installable file build process1.1. Get the codegitclonehttps://github.com/GoogleCloudPlatform/datacatalog-connectorscdgoogle-datacatalog-connectors-commons-test1.2. VirtualenvUsingvirtualenvis optional, but strongly recommended.1.2.1. Install Python 3.61.2.2. Create and activate avirtualenvpip3install--upgradevirtualenv
python3-mvirtualenv--pythonpython3.6envsource./env/bin/activate2. Developer environment2.1. Install and run YAPF formatterpipinstall--upgradeyapf# Auto update filesyapf--in-place--recursivesrctests# Show diffyapf--diff--recursivesrctests# Set up pre-commit hook# From the root of your git project.curl-opre-commit.shhttps://raw.githubusercontent.com/google/yapf/master/plugins/pre-commit.sh
chmoda+xpre-commit.sh
mvpre-commit.sh.git/hooks/pre-commit2.2. Install and run Flake8 linterpipinstall--upgradeflake8
flake8srctests2.3. Install the package in editable mode (i.e. setuptools “develop mode”)pipinstall--editable.2.4. Run the unit testspythonsetup.pytest
Package: googledatastore
Google Cloud Datastore Protocol Buffer client.Google Cloud Datastore is a fully managed, schemaless, non-relational
database accessible through Google APIs infrastructure. It provides
a rich set of query capabilities, supports atomic transactions, and
automatically scales up and down in response to load.Usage>>>importgoogledatastoreasdatastore>>>datastore.set_options(project_id='project-id')>>>req=datastore.BeginTransactionRequest()>>>datastore.begin_transaction(req)<google.datastore.v1.datastore-pb2.BeginTransactionResponse ...>Installation$pipinstallgoogledatastoreDocumentationhttps://cloud.google.com/datastore/docs/Contributehttps://github.com/GoogleCloudPlatform/google-cloud-datastore
Package: google-deputy-api-python-client
Deputy API Python ClientThis is a Python3 client library for interacting with theDeputy.com api.At best, it allows one to easily transcribe responses from the API into Python
objects. At worst, it simplifies building and making queries to the API in a
more object-oriented way.This is not an official, or supported, Google product.InstallationTo install all dependencies:pip3 install absl-py urllib3 pytype attrs parameterized python-dateutilContributingContributions to this project are welcome. Please seeCONTRIBUTING.mdfor contribution guidelines.LicensingSeeLICENSE
Package: google.directions
IntroductionThis lib allows you to query the google direction api from your python code,
i.e. without a browser.
The parser will give you a dict of anything that google knows about the
direction: Distance, waypoints, corrected addresses and much more.Although you have direct access to the parser output, you may also use the
convenient api as seen in the Usage part below.Copyright / LicenseGPLv3This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.Usage>>> from google.directions import GoogleDirections
>>> gd = GoogleDirections('your-google-directions-key')
>>> res = gd.query('berlin','paris')
>>> res.distance
1055351You also have access to the raw parser data:>>> res.result["Directions"]["Duration"]
{u'seconds': 34329, u'html': u'9 hours 32 mins'}Have fun!ContributionIf you extend the gdapi, I’d love to get your extensions. Just mail
me the code and I’ll make a release. See below for the mail address.Changelog0.1 - Unreleased0.2* - JS Parsers, DOM Parser fully working, Google API is working, but minimal.0.2.1 - Fixed bad description and README.0.2.2 - Fixed missing README.txt0.2.3 - Allowed tab as space too0.3 - splitted of the json parser as d9t.json. Now with tests and a better understanding of json.Initial release
Package: google-dns
NTT x Google DNSModules•Code Design•Install•Docker•PythonEnv•How To Use•This Google DNS package consists of :A NTT router IP parser to update dynamic DNS on google domains .ModulesComponentDescriptiongoogle_dnsContains the implementation of GoogleDNSCode structurefromsetuptoolsimportsetupfromgoogle_dnsimport__version__setup(name="google_dns",version=__version__,packages=["google_dns",],url="https://github.com/JeanMaximilienCadic/ntt_google_dns",license="MIT",author="Jean Maximilien Cadic",long_description="".join(open("README.md","r").readlines()),long_description_content_type="text/markdown",python_requires=">=3.6",install_requires=[r.rsplit()[0]forrinopen("requirements.txt")],author_email="git@cadic.jp",description="Google DNS",classifiers=["Programming Language :: Python :: 3.6","License :: OSI Approved :: MIT License",],)InstallTo clone and run this application, you'll needGitandhttps://docs.docker.com/docker-for-mac/install/and Python installed on your computer.From your command line:# Clone this repository and install the codegitclonehttps://github.com/JeanMaximilienCadic/ntt_google_dns# Go into the repositorycdntt_google_dnsConfig fileCreate a config file at/opt/google_dns/config.ymlproject:google_dnsurl:'http://[YOURROUTERIP]/ntt/information/fifth/current'authorization:"dXNlcjphZG1pbg=="cookie:'HGWSESSIONID=1hoa40gjlzl2g'hostnames:-hostname:"mywebsite.com"google_id:"ksfjIkmldslI"google_password:'sdk11kjl1jd'MakefileExhaustive list of make commands:build_docker
push_docker
pull_docker
docker_run
checkout
all
all_branchDocker(* recommended)To build and run the docker imagemake build_docker
make docker_runPythonEnv(* not recommended)python setup.py installHow toRun the cron jobpython-mgoogle_dns
Package: google-documents
Google DocumentsWork with Google Documents simply without any boring stuff regarding Credentials Account etc.Find the file in 2 lines:>fromgoogle_documents.entitiesimportGoogleDriveFile>GoogleDriveFile.filter(name="Foo")[<GoogleDriveFile:FILE_ID-Foofile>]Read from the Google Sheet just in 3 lines:>fromgoogle_documents.entitiesimportGoogleDriveSpreadsheet>sh=GoogleDriveSpreadsheet.get(id="YOUR_SPREADSHEET_ID")>sh.read(range_name="Sheet 1!A1:B4")[['Your','Awesome'],['Data'],['.']]># Or using indexers>sh["Sheet 1!A1:B4"][['Your','Awesome'],['Data'],['.']]Export Google Document to word in 3 lines as well:>fromgoogle_documents.entitiesimportGoogleDriveDocument>doc=GoogleDriveDocument.get(id="YOUR_DOCUMENT_ID")>doc.export("my_file.docx")InstallationInstall the module via pip:pipinstallgoogle-documentsIssue service account file viaGoogle Cloud ConsolePut the path to your file in the GOOGLE_DOCUMENT_SERVICE_JSON environment varialbe:exportGOOGLE_DOCUMENT_SERVICE_JSON=PATH_TO_YOUR_SERVICE_ACCOUNT_FILEThat's it. Now you can start using this package
Package: googledrive-cloner
Google Drive Folder ClonerContentsDescriptionInstallUsageContributingDescriptionA python package for cloning google drive folders, including all subdirectories and filesInstallationTo install from thepypi releasepipinstallgoogledrive_clonerTo install locallygitclonehttps://github.com/NickHilton/googledrivecloner.gitGoogle Drive Set upIn order for this package to work, any GDrive account you use must be set up with the correct permissions. More detail is given in Google'sdocumentationThe following steps should get you set up correctlyCreate a Google Project -hereEnable the Google Drive API on your project -hereCreate a service account for authorization as described in thedocumentationSave the client-secret created during the previous step to your environment and set the environment variableCLIENT_SECRET_PATHto point to the fileEnable sharing for the folder you wish to copy, and share the folder with the email from the created service accountUsageTo clone a directory you need to get both the gdrive id of the folder to be copied and the destination folder. You can discover these ids by looking at the urlhttps://drive.google.com/drive/u/0/folders/{FOLDER_ID}The cloner can be used in the following way:fromgoogledrive_cloner.google_connectionsimportGoogleDriveClonergoogledrivecloner=GoogleDriveCloner()folder_id_to_copy='XXXXXXXX'destination_folder_id='YYYYYYYYY'new_folder_name='lemons'# Or something else!googledrivecloner.run(base_folder_id=folder_id_to_copy,destination_parent_folder_id=destination_folder_id,new_name=new_folder_name)ContributingAll contributions are welcome, feel free to ask a question or propose a change via a Pull RequestRunning TestsIn the root/src directorypython-munittestdiscover
Package: googledrivedl
googledrivedlGoogle Drive Download ScriptPython 2 / 3 compatibleNo API keys / credentials requiredSupports all operating systemsNo external dependenciesWorks with shared files or foldersWorks with large filesFiles / folders must have been shared via linkInstallationpip install googledrivedlUsagepythongdrivedl.py<URL>URL is a shared Google Drive URLMultiple urls can be used by seperating them with a space. eg.python gdrivedl.py <URL1> <URL2> <URL3>On some systems you may need to enclose the url within quotes. egpython gdrivedl.py "<URL>"Options-P--directory-prefixOutput directory (default is current directory)-O--output-documentDownload to a particular filename (defaults to the
GDrive filename). Only valid when downloading a single file.-q--quietDisable console output-d--debugShow more vebose debug console output-m--mtimesTry use modified times to check for changed files-f--urlfileText file containing Google Drive URLS to download (one per line)
Package: googleDriveFileDownloader
Google-Drive-File-DownloaderHelps to download google drive files with ease 🎉Installing the Package:pip install googleDriveFileDownloaderSample code:fromgoogleDriveFileDownloaderimportgoogleDriveFileDownloadergdownloader=googleDriveFileDownloader()gdownloader.downloadFile("https://drive.google.com/uc?id=1O4x8rwGJAh8gRo8sjm0kuKFf6vCEm93G&export=download")You can also providecustom file name:gdownloader.downloadFile("https://drive.google.com/uc?id=1O4x8rwGJAh8gRo8sjm0kuKFf6vCEm93G&export=download","NewFile.zip")#Make sure to provide the custom file name along with the file extension if existsIt will automatically save the file in your local directory with the name as stored in the drive or as provided in the custom file name
Package: googledrive-files
pyGoogleDriveFilesPython module 'googledrive-files' is
a simple wrapper for the files Resource of Google Drive API.Features:List files and folders.Create, read, write, and delete files.RequirementPython 3.5 or aboveInstallationpipinstallgoogledrive-filesBasic Usage>>>fromgoogledriveimportService>>>withService(credentials).files()asgdrive:...file_content=gdrive.read(['dirA','subdir1'],'filename')...gdrive.write(['dirB','subdir2'],'filename.txt',...file_content,'text/plain')DocumentationDocumentation isavailable online.
Package: google-drive-file-updater
Google Drive file updaterA package that allows to backup local files to a specific google drive folder and update already backuped files if they were modifiedInstallpip install google-drive-file-updaterRequirementsCredentialsCreate a Google project here:https://console.developers.google.com/Enable Google Drive APICreate OAuth 2.0-Client-IDDownload credentials.json fileConsole scriptgdfup.py [Source path] [Destination folder id] (optional: Path to credentials.json)If no path to the credentials.json file is passed to the script, it will assume that the file is located in the folder in which the script is executed in.Example:You can find the id of a google drive folder in the url:How to use in codefromgd_fup.serviceimportGoogleDriveServicefromgd_fup.updaterimportGoogleDriveFileUpdater# drive_service = GoogleDriveService()# optional: path_credentials --> path to your credentials.json file# optional: path_token --> path in which your generated token will be saveddrive_service=GoogleDriveService(path_credentials=r'C:\Temp\credentials.json',path_token=r'C:\Temp\token.json')# A new tab in your browser will open in order to sign in with your google accountdrive_service.authenticate()drive_file_updater=GoogleDriveFileUpdater(drive_service=drive_service,output_console=True)drive_file_updater.update_files(path_source=r'C:\Users\riffe\schule\5.klasse\pos\docs',root_folder_id='1OEj4Giz1ILRekkWfPw27ZxmPaan-vq1G')TODOFix Google Drive file deletion bug
Package: google-drive-manager
google-drive-manageris a library designed for interact with Google Drive in Python. With its simple API, you can manage data from various files and folders in the Diabeloop Google Drive.The list of the methods :get_serviceconnectgetSpreadSheetInfoByIDlistSheetsgetSheetByNamegetAllValuesFromSheetgetPosDataInColgetRowDataFromSheetgetRangeDataFromSheetgetColDataFromSheetgetRangeValueFromSheetsetColDatasetRangeDatagetFileByID
Package: google-drive-ocr
Perform OCR using Google’s Drive API v3Free software: GNU General Public License v3Documentation:https://google-drive-ocr.readthedocs.io.FeaturesPerform OCR using Google’s Drive API v3ClassGoogleOCRApplication()for use in projectsHighly configurable CLIRun OCR on a single image fileRun OCR on multiple image filesRun OCR on all images in directoryUse multiple workers (multiprocessing)Work on a PDF document directlyUsageUsing in a ProjectCreate aGoogleOCRApplicationapplication instance:fromgoogle_drive_ocrimportGoogleOCRApplicationapp=GoogleOCRApplication('client_secret.json')Perform OCR on a single image:app.perform_ocr('image.png')Perform OCR on mupltiple images:app.perform_batch_ocr(['image_1.png','image_2.png','image_3.png'])Perform OCR on multiple images using multiple workers (multiprocessing):app.perform_batch_ocr(['image_1.png','image_3.png','image_2.png'],workers=2)Using Command Line InterfaceTypical usage with several options:google-ocr --client-secret client_secret.json \
--upload-folder-id <google-drive-folder-id>  \
--image-dir images/ --extension .jpg \
--workers 4 --no-keepShow help message with the full set of options:google-ocr --helpConfigurationThe default location for configuration is~/.gdo.cfg.
If configuration is written to this location with a set of options,
we don’t have to specify those options again on the subsequent runs.Save configuration and exit:google-ocr --client-secret client_secret.json --write-config ~/.gdo.cfgRead configuration from a custom location (if it was written to a custom location):google-ocr --config ~/.my_config_file ..Performing OCRNote: It is assumed that theclient-secretoption is saved in configuration file.Single image file:google-ocr -i image.pngMultiple image files:google-ocr -b image_1.png image_2.png image_3.pngAll image files from a directory with a specific extension:google-ocr --image-dir images/ --extension .pngMultiple workers (multiprocessing):google-ocr -b image_1.png image_2.png image_3.png --workers 2PDF files:google-ocr --pdf document.pdf --pages 1-3 5 7-10 13Note:
You must setup a Google application and downloadclient_secrets.jsonfile before usinggoogle_drive_ocr.Setup InstructionsCreate a project on Google Cloud PlatformWizard:https://console.developers.google.com/start/api?id=driveInstructions:https://cloud.google.com/genomics/downloading-credentials-for-api-accessSelect application type as “Installed Application”Create credentials OAuth consent screen –> OAuth client IDSaveclient_secret.jsonHistory0.2.0 (2021-06-29)PDF file support0.1.0 (2021-06-14)First release on PyPI.
Package: googledriver
Google-DriverTheGoogle-DriverPython package simplifies downloading files and folders from Google Drive, with some constraints for model management through Hugging-Face and Git-Lfs. Issues may arise due to too many files, access permissions, or large file sizes. Be cautious with large files as they may contain viruses. Thegdownpackage offers better exception handling and compatibility.Installationpip install googledriverFeatures1. File DownloadDownload to specific pathTo save a file from a shared Google Drive URL to local storage, use the following code.fromgoogledriverimportdownloadURL='https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'download(URL,'./model/tf_gpt2_model')Download to cached folderTo download a cached file (or directory) from a URL and return its path, you can use the following method.fromgoogledriverimportdownloadURL='https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'cached_path=download(URL,None,'tf_model')Basically, torch cached is used, and the huggingface hub module is used as a reference and wrapped.2. Folder DownloadThe return value returns the path of the saved files. However, it is different when using it as a cache folder.Download to current working directoryfromgoogledriverimportdownload_folderURL='https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'download_folder(URL)Download to specific directoryfromgoogledriverimportdownload_folderURL='https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'save_folder='./any/path/to/save/'download_folder(URL,save_folder)Download to cached directoryfromgoogledriverimportdownload_folderURL='https://drive.google.com/file/d/xxxxxxxxx/view?usp=share_link'download_folder(URL,cached=True)In the case of the cache folder, the return value is the cache folder path of Google Drive. Therefore, it may be difficult to cache and use multiple folders.References[1]https://github.com/huggingface/transformers[2]https://github.com/wkentaro/gdown
Package: google-drive-sheets
google-drive-sheetsUtilities for Google Drive and Sheets APIs that help you create folders, spreadsheets and read/save dataPrerequisitesBefore executing anything, please go through the stepshere. It will kickstart the authorization process for your own app.Save thecredentials.jsonfile (not saved in this repo) generated from the first step, in the root directory of your project to enable Google Drive and Sheets capabilities.Note: thecredentials.jsonfile has to be present in order to work with the APIs.Note: If while creating drive/sheets service objects, you get"error": "invalid_grant", "error_description": "Bad Request", thecredentials.jsonmight have been expired.
Go to the Google Cloud Console and generate a new OAuth Client ID (find more information on theguide pagefor your app).
Package: google-drive-uploader
Google Drive UpdaterThis is a simple program that can help you upload your file to Google DriveIn the pass, uploading files to Google Drive was a little bit annoying, so I made this program to help me upload my file to Google Drive.The point is making it easier to upload files to Google Drive.The Main Featureupload_file: Upload your file to Google Drive, EXCEPTfoldertarget: This is a list you wanna uploadtarget_folder_id: This is the target folder you wanna save on Google Driveupload_file(target,target_folder_id)create_folder: Create a folder and it will return a file idfoldername: This is a list you wanna uploadtarget_folder_id: This is the target folder you wanna save on Google Drivecreate_folder(foldername,target_folder_id)How to get credentialsEnable Google Drive APICreate your own Ouath file calledclient_secret.jsonRenameclient_secret.jsontocredentials.jsonOnce you run this program, you will see a panel tells you to loginJust do whatever it tells you to do.For more Details, Please Check:How to Enable Google Drive APIHow to Get Your Client Secret