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
""" | |
Python Multi-threading Examples | |
----------------------------- | |
This example demonstrates three common patterns for multi-threading in Python: | |
1. Basic thread synchronization using Lock | |
2. Thread communication using Queue | |
3. Modern thread pools using concurrent.futures | |
Key concepts demonstrated: | |
- Thread creation and management |
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
""" | |
h2oGPTe Banking RAG Demo | |
Demonstrates using h2oGPTe for intelligent document processing in financial services | |
This demo shows how to: | |
1. Crawl relevant banking documentation | |
2. Create a knowledge base | |
3. Perform intelligent Q&A using RAG | |
""" |
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
print("Hello, World!") |
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 | |
# Define the base command and endpoint | |
URL="https://model.dev.h2o.ai/496095fa-d429-4da0-b7d1-8239fe644410/model/score" | |
BASE_CMD="ab -T \"application/json\" " | |
TEST_SIZE=500 | |
# Initialize the results table | |
echo "| Test Size | Batch Size | Replicas | Concurrency | r/s |" | |
echo "|-----------|------------|----------|-------------|-----|" | |
# Define test scenarios |
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 os | |
import requests | |
import json | |
import time | |
import h2o_authn | |
import h2o_discovery | |
import h2o_mlops | |
import pandas as pd |
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 h2o_wave import main, app, Q, ui, on, run_on, data | |
@app('/') | |
async def serve(q: Q): | |
print(q.args) | |
print(q.events) | |
# First time a browser comes to the app | |
if not q.client.initialized: | |
await initialize_client_session(q) |
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 os | |
from h2ogpte import H2OGPTE | |
EMAIL = "[email protected]" | |
client = H2OGPTE( | |
address='https://playground.h2ogpte.h2o.ai', | |
api_key='sk-', | |
) |
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 h2o_wave import main, app, Q, ui, on, run_on, data | |
@app('/') | |
async def serve(q: Q): | |
print(q.args) | |
# First time a browser comes to the app | |
if not q.client.initialized: | |
await initialize_client_session(q) |
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 h2o_wave import main, app, Q, ui, on, handle_on | |
@app('/') | |
async def serve(q: Q): | |
# First time a browser comes to the app | |
if not q.client.initialized: | |
await init(q) | |
q.client.initialized = True |
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
[data-test="header"] { | |
background: #000000 !important; | |
} | |
/* will be used by default for buttons*/ | |
.ms-Button--default { | |
background-color: #6c757d; | |
color: #FFFFFF; | |
border-color: #6c757d; | |
border-radius: 2rem; | |
} |
NewerOlder