This file contains hidden or 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 asyncio | |
import os | |
import traceback | |
import uuid # Added for generating unique IDs | |
import sys # Added for stdout redirection | |
import io # Added for stdout redirection | |
import json # Added for parsing log strings | |
from quart import Quart, websocket, jsonify | |
from quart_cors import cors | |
from websockets.exceptions import ConnectionClosedOK |
This file contains hidden or 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
// Empty |
This file contains hidden or 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
# Create a service account and associate a "Vertex AI User" role | |
import google.auth | |
import google.auth.transport.requests | |
from google.oauth2 import service_account | |
import vertexai | |
from vertexai.preview.language_models import TextGenerationModel | |
key_path = "<YOUR_KEY_PATH>" | |
credentials = service_account.Credentials.from_service_account_file(key_path,scopes=['https://www.googleapis.com/auth/cloud-platform']) | |
auth_req = google.auth.transport.requests.Request() | |
credentials.refresh(auth_req) |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from matplotlib.backends.backend_pdf import PdfPages | |
import os, time | |
from os import path | |
from google.cloud import storage | |
import re |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from matplotlib.backends.backend_pdf import PdfPages | |
import os, time | |
from os import path | |
from google.cloud import storage | |
import re |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from matplotlib.backends.backend_pdf import PdfPages | |
import os, time | |
from os import path | |
from google.cloud import storage | |
import re |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<link rel="preconnect" href="https://fonts.googleapis.com"> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
This file contains hidden or 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
doctype html | |
html(lang="en") | |
head | |
title Static Files | |
meta(charset='utf-8') | |
link(rel="stylesheet", href="/static/main.css") | |
body | |
p=content | |
img(src="#{publicUrl}") |
This file contains hidden or 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
doctype html | |
html(lang="en") | |
head | |
title Static Files | |
meta(charset='utf-8') | |
link(rel="stylesheet", href="/static/main.css") | |
body | |
form(method="POST", action="/upload", enctype="multipart/form-data") | |
input(type="file", name="file") | |
input(type="submit") |
This file contains hidden or 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
{ | |
"name": "appengine-storage", | |
"description": "Node.js Google Cloud Storage sample for Google App Engine", | |
"scripts": { | |
"start": "node app.js", | |
"test": "mocha system-test/*.test.js --exit --timeout=30000" | |
}, | |
"engines": { | |
"node": ">= 12.20.0" | |
}, |
NewerOlder