Skip to content

Instantly share code, notes, and snippets.

View DiMiTriFrog's full-sized avatar

DiMiTriFrog DiMiTriFrog

View GitHub Profile
@HazemBZ
HazemBZ / Dockerfile
Created September 18, 2023 11:36
setting up headful selenium environment on aws fargate
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
@DiMiTriFrog
DiMiTriFrog / GoogleTranslate.py
Created April 10, 2020 17:06
GoogleTranslate.py -> Sample object to translate text or html with Google Cloud using Python | Stratton Apps SL
# 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()