Skip to content

Instantly share code, notes, and snippets.

View noahgift's full-sized avatar
🎯
#mlops

Noah Gift noahgift

🎯
#mlops
View GitHub Profile
def add(x,y):
return x+y
total = add(2,2)
print(total)
#var=
def hello():
print("Hey")
#I am very lazy and I always want Python to work
echo "I am going to source a python virtual environment"
which python
python --version
source ~/.googlecloudshell/bin/activate
echo "I just sourced a python virtual environment"
which python
python --version
def hello():
return "hi"
def hello():
return "hello there"
def hello():
return "hi"
import sys
from random import random
from operator import add
from pyspark import SparkContext
sc = SparkContext.getOrCreate()
partitions = 30
n = 100000 * partitions
def f(_):
import wikipedia
from google.cloud import translate
def sample_translate_text(text="YOUR_TEXT_TO_TRANSLATE",
project_id="YOUR_PROJECT_ID", language="fr"):
"""Translating Text."""
client = translate.TranslationServiceClient()
import wikipedia
from google.cloud import translate
def sample_translate_text(text="YOUR_TEXT_TO_TRANSLATE",
project_id="YOUR_PROJECT_ID", language="fr"):
"""Translating Text."""
client = translate.TranslationServiceClient()
import wikipedia
from google.cloud import translate
def sample_translate_text(text="YOUR_TEXT_TO_TRANSLATE",
project_id="YOUR_PROJECT_ID", language="fr"):
"""Translating Text."""
client = translate.TranslationServiceClient()