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
from pathlib import Path | |
import sys,os | |
import tempfile | |
from autogen import ConversableAgent | |
from autogen.coding import DockerCommandLineCodeExecutor | |
# python3 -m venv pyautogen | |
# source pyautogen/bin/activate | |
# pip install pyautogen |
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
name: Install Docker on CentOS | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
install-docker: |
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 React, { useState, useEffect, useRef } from 'react'; | |
// import ReactDOM from 'react-dom'; | |
import trinity from './trinity.mp4' | |
import './App.css'; | |
function App() { | |
const maxRetryCount = 3; | |
const maxDelaySec = 4; | |
const REACT_APP_INIT_SCRIPT = process.env.REACT_APP_INIT_SCRIPT || "Hey Elliott, what are we going to work on today? Wait, why do I even need to ask I already know it will be fun"; |
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 | |
arrangement_packages = [ | |
{ | |
"id": 1, | |
"name": "Fruit Symphony", | |
"description": "Immerse yourself in the harmonious blend of nature's finest fruits with our Fruit Symphony arrangement. Picture a grand orchestra of flavors, where succulent strawberries, ripe mangoes, tangy pineapples, and crisp apples come together in perfect unison. Each bite is a symphony of taste, a crescendo of sweetness and freshness that delights the senses. Whether you're hosting a garden party, a summer soirée, or simply indulging in a moment of pure bliss, let the Fruit Symphony arrangement be your conductor to culinary euphoria.", | |
"price": 39.99 | |
}, | |
{ |
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
provider "aws" { | |
region = "us-east-1" | |
} | |
# Create VPC | |
resource "aws_vpc" "my_vpc" { | |
cidr_block = "10.0.0.0/16" | |
} | |
# Create Subnets |
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
from flask import Flask, request, jsonify | |
import json | |
import boto3 | |
app = Flask(__name__) | |
brt = boto3.client(service_name='bedrock-runtime') | |
@app.route('/invoke_claude', methods=['POST']) | |
def invoke_claude(): |
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
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: minio-storage-class | |
provisioner: kubernetes.io/gce-pd # or the appropriate provisioner for your cluster | |
volumeBindingMode: Immediate | |
--- |
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
#!/bin/bash | |
# Install Python and create a virtual environment | |
sudo apt-get update -y | |
sudo apt-get install -y python3.11 python3.11-venv | |
# Create and activate virtual environment | |
python3.11 -m venv venv | |
source venv/bin/activate |
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
from typing import Optional, List, Mapping, Any | |
import requests | |
from llama_index.core import SimpleDirectoryReader, SummaryIndex | |
from llama_index.core.callbacks import CallbackManager | |
from llama_index.core.llms import ( | |
CustomLLM, | |
CompletionResponse, | |
CompletionResponseGen, | |
LLMMetadata, | |
) |
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
offensive_conversations = [ | |
{"sexism": "Women should stay in the kitchen where they belong."}, | |
{"misogyny": "I can't stand women; they're all just objects for men's pleasure."}, | |
{"homophobia": "I don't want any gays around me; they're disgusting."}, | |
{"xenophobia": "Those immigrants are stealing our jobs and ruining our country."}, | |
{"obscenity": "That movie was so obscene; it should be banned."}, | |
{"vulgarity": "She's so vulgar; I can't believe she talks like that."}, | |
{"discrimination": "We don't hire people with foreign-sounding names; they're all trouble."}, | |
{"hate crime": "Those people got what they deserved for being different; it's not a hate crime."}, | |
{"bigotry": "I hate everyone who doesn't look like me; it's called being patriotic."}, |
NewerOlder