from google.cloud import storage
from google.cloud import bigquery
def upload_to_gcs(bucket_name, file_name, data):
client = storage.Client()
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
{ | |
"mcpServers": { | |
"mcp-tools": { | |
"command": "uv", | |
"args": [ | |
"--directory", | |
"C:/Users/Braincore/Documents/GitHub/mcp-tools", | |
"run", | |
"python", | |
"server.py" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from ultralytics import YOLO | |
import os | |
import cv2 | |
# Load the model | |
model = YOLO("model.pt") | |
# Specify the folder containing the images | |
image_folder = "./images" |
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
MAPPING = { | |
'ا': 'a', 'أ': 'a', 'إ': 'i', 'آ': 'a', 'ب': 'b', 'ت': 't', 'ث': 'th', 'ج': 'j', 'ح': 'h', | |
'خ': 'kh', 'د': 'd', 'ذ': 'dh', 'ر': 'r', 'ز': 'z', 'س': 's', 'ش': 'sh', 'ص': 's', | |
'ض': 'd', 'ط': 't', 'ظ': 'z', 'ع': "'a", 'غ': 'gh', 'ف': 'f', 'ق': 'q', 'ك': 'k', | |
'ل': 'l', 'م': 'm', 'ن': 'n', 'ه': 'h', 'و': 'w', 'ي': 'y', 'ئ': 'y', 'ى': 'a', | |
'ة': 'h', 'ؤ': 'w' | |
} | |
VOWELS = { | |
'\u064E': 'a', # Fatha |
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
FROM node:lts-alpine as build-stage | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . | |
RUN npm run build | |
FROM node:lts-alpine as serve-stage | |
WORKDIR /app | |
RUN npm install -g serve |
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 psycopg2 | |
def check_tables_in_database(host, port, username, password, database): | |
try: | |
# Attempt to connect to the PostgreSQL database | |
connection = psycopg2.connect( | |
host=host, | |
port=port, | |
user=username, | |
password=password, |
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 mysql.connector | |
def check_tables_in_database(host, username, password, database): | |
try: | |
# Attempt to connect to the MySQL database | |
connection = mysql.connector.connect( | |
host=host, | |
user=username, | |
password=password, | |
database=database |
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 os | |
from keras.models import load_model | |
from PIL import Image, ImageOps | |
import numpy as np | |
# Load the model | |
model = load_model("keras_Model.h5", compile=False) | |
# Load the labels | |
class_names = open("labels.txt", "r").readlines() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder