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
import os | |
import re | |
from google.cloud import vision | |
def call_product_search_vision_api(event, context): | |
if bool(re.search('output/product_sets-[\d]+-of-[\d]+\.csv', event['name'])): | |
gcs_uri = f'gs://{event["bucket"]}/{event["name"]}' | |
_import_product_sets(project_id=os.environ['GCP_PROJECT'], gcs_uri=gcs_uri) |
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
image-uri,image-id,product-set-id,product-id,product-category,product-display-name,labels,bounding-poly |
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
import json | |
import logging | |
import re | |
from typing import Tuple | |
import apache_beam as beam | |
from apache_beam import Pipeline | |
from apache_beam.options.pipeline_options import PipelineOptions | |
from httplib2 import Http |
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
I would like to generate a json schema from a list of jsonpath. | |
Example: | |
For this kind of input, | |
``` | |
$.firstName | |
$.lastName | |
$.address.streetAddress | |
$.address.city | |
$.address.postalCode |