Skip to content

Instantly share code, notes, and snippets.

@junwin
junwin / gist:4731525
Created February 7, 2013 15:13
Simple C# worker thread that processes a queue of string data items (XML, JSON )
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Collections;
namespace workerthread
{
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'G:\My Drive\credential\your_credentials.json'
work_dir = 'C:/temp/2023Mar/Output/web'
from google.cloud import vision
def anotate_image(file_name):
client = vision.ImageAnnotatorClient()
with io.open(file_name, 'rb') as image_file:
content = image_file.read()