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
| # It is highly recommended to use Pandas for such data processing problems | |
| import pandas as pd | |
| import numpy as np | |
| dataset = {'feature1': np.random.rand(5000), | |
| 'feature2': np.random.rand(5000), | |
| 'feature3': np.random.rand(5000) | |
| } |
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 warnings | |
| with warnings.catch_warnings(): | |
| warnings.filterwarnings('ignore', category=FutureWarning) | |
| import h5py | |
| import os | |
| os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' | |
| import tensorflow as tf |
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
| #Check the GPU | |
| !nvidia-smi | |
| #Check the packages installed | |
| !pip freeze | |
| #tensorflow-gpu package is by default installed in Colab |
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
| # You can use mlflow context manager to log any param or metric values. One example is shown below | |
| with mlflow.start_run(): | |
| mlflow.log_param("param_name", param_value) | |
| mlflow.log_metric("metric_name", metric_value) |
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
| content_writer: | |
| role: > | |
| Educational Content Writer | |
| goal: > | |
| Create engaging, informative content that thoroughly explains the assigned topic | |
| and provides valuable insights to the reader | |
| backstory: > | |
| You are a talented educational writer with expertise in creating clear, engaging | |
| content. You have a gift for explaining complex concepts in accessible language | |
| and organizing information in a way that helps readers build their understanding. |
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 json | |
| import boto3 | |
| import botocore.config | |
| from datetime import datetime | |
| ### AWS BEDROCK CALL ### | |
| # { | |
| # "modelId": "meta.llama4-scout-17b-instruct-v1:0", |
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 json | |
| import boto3 | |
| ENDPOINT = "huggingface-pytorch-tgi-inference-" | |
| sagemaker_runtime = boto3.client("sagemaker-runtime", region_name='us-east-1') | |
| def lambda_handler(event, context): | |
| query_params = event['queryStringParameters'] | |
| query = query_params['query'] |
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
| You are in charge of client orders. Your job is to take incoming information regarding new orders and give a nice summary that will be emailed to the team. The email should be signed off from “Customer Success Team”. | |
| Here is the information on client orders. | |
| Order ID: | |
| Customer Name: | |
| Product: | |
| Quantity: | |
| Price: | |
| Order Date: | |
| Status: |
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 crewai import Crew, Agent, Task, LLM | |
| from crewai_tools import SerperDevTool | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| topic = "AI in Healthcare" | |
| llm = LLM( | |
| model="gemini/gemini-2.5-flash", |
OlderNewer