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 selenium/standalone-chrome as build | |
USER root | |
RUN apt-get update && apt-get install python3-distutils xvfb -y | |
RUN wget https://bootstrap.pypa.io/get-pip.py | |
RUN python3 get-pip.py | |
FROM build as install | |
COPY requirements.txt . | |
RUN python3 -m pip install -r requirements.txt |
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
# Author: Stratton Apps SL | andorrainsiders.com & strattonapps.com | |
from google.cloud import translate | |
import os | |
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'credentials.json' | |
proj_id = 'translate-33434' | |
class Session(object): | |
def __init__(self): | |
self.client = translate.TranslationServiceClient() |