This file contains 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 google.api import label_pb2 as ga_label | |
from google.api import metric_pb2 as ga_metric | |
from google.cloud import monitoring_v3 | |
client = monitoring_v3.MetricServiceClient() | |
project_name = f"projects/arpanas-project" | |
descriptor = ga_metric.MetricDescriptor() | |
descriptor.type = "custom.googleapis.com/my_metric" | |
descriptor.metric_kind = ga_metric.MetricDescriptor.MetricKind.GAUGE | |
descriptor.value_type = ga_metric.MetricDescriptor.ValueType.DOUBLE |
This file contains 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 google.cloud import monitoring_v3 | |
import time | |
client = monitoring_v3.MetricServiceClient() | |
project_id = 'your-project-id' #TODO: Replace with yours | |
project_name = f"projects/{project_id}" | |
series = monitoring_v3.TimeSeries() | |
series.metric.type = "custom.googleapis.com/my_metric" |
This file contains 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
#Project details | |
from google.cloud import monitoring_v3 | |
import matplotlib.pyplot as plt # matplotlib imports needed only in case you want to plot the `points` | |
import matplotlib.dates as mdates | |
import time | |
client = monitoring_v3.MetricServiceClient() |
This file contains 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
#Project details | |
from google.cloud import monitoring_v3 | |
import time | |
client = monitoring_v3.MetricServiceClient() | |
project = 'project_id' #insert your project id | |
project_name = f"projects/{project}" |
This file contains 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
# python2 <script> gs://<path_to_src_pdf> gs://<dest_bucket>/ | |
# Converting one text file to JSONL format | |
# File name: src.pdf | GCS path for file: gs://test-bucket-for-automl-nlp/src.pdf | |
python2 input_helper_v2.py gs://test-bucket-for-automl-nlp/src.pdf gs://test-bucket-for-automl-nlp/ | |
# Converting multiple text files with same extension to JSONL format | |
# File extension: *.pdf | GCS path for files: gs://test-bucket-for-automl-nlp/*.pdf | |
python2 input_helper_v2.py gs://test-bucket-for-automl-nlp/*.pdf gs://test-bucket-for-automl-nlp/ | |
gcloud compute ssh <machine_name> - tunnel-through-iap
mkdir m4a && cd m4a
curl -O "https://mfit-release.storage.googleapis.com/$(curl -s https://mfit-release.storage.googleapis.com/latest)/mfit"