This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| ### Console Google Translate | |
| ### Example usage: | |
| ### gttranslate <source_lng> <new_lng> <your text> | |
| ### This bash script is combine of this scripts https://gist.github.com/elFua/3342075 and https://gist.github.com/ayubmalik/149e2c7f28104f61cc1c862fe9834793 | |
| ### Updated by Anodev https://github.com/OPHoperHPO/ | |
| USAGE=" | |
| Example usage: '$0 <source_lng> <new_lng> <your text>' | |
| Usage: '$0 en ru text' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import print_function | |
| import requests | |
| import json | |
| import cv2 | |
| addr = 'http://localhost:5000' | |
| test_url = addr + '/api/test' | |
| # prepare headers for http request | |
| content_type = 'image/jpeg' |