Skip to content

Instantly share code, notes, and snippets.

View CharlyWargnier's full-sized avatar
🎈

Charly Wargnier CharlyWargnier

🎈
View GitHub Profile
# Import BigQuery from google.cloud
from google.cloud import bigquery
## Inputs from forms ##
GCP_PROJECT_ID = 'your_project_ID_here' #@param {type:"string"}
GCS_Bucket_Location = 'europe-west2' #@param ["asia-east1", "asia-east2", "asia-northeast1", "asia-northeast2", "asia-northeast3", "asia-south1", "asia-southeast1", "australia-southeast1", "europe-north1", "europe-west1", "europe-west2", "europe-west3", "europe-west4", "europe-west6", "northamerica-northeast1", "southamerica-east1", "us-central1", "us-east1", "us-east4", "us-west1", "us-west2"]
# Create a client instance for your project
GCS_Bucket_Name = 'apache_seo_logs' #@param {type:"string"}
GCS_File_Path = 'Loggy*' #@param {type:"string"}
GCS_Full_Path = "gs://" + GCS_Bucket_Name + "/" + GCS_File_Path
print("the path to your GCS folder is: " + GCS_Full_Path)
# Import libraries
import pandas as pd
import numpy as np
import socket
import json
#Connect Python to your GCP project
from google.colab import auth
auth.authenticate_user()