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 openai import OpenAI, APIError, APITimeoutError | |
import copy | |
import json | |
# Ensure the OPENAI_API_KEY environment variable is set | |
api_key = os.environ.get("OPENAI_API_KEY") | |
if not api_key: | |
print("Error: OPENAI_API_KEY environment variable not set.") | |
exit(1) |
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
""" | |
Simple example of using MCP to add an MCP server to a FastAPI app. | |
""" | |
import inspect | |
import json | |
import re | |
from typing import List, Optional | |
import click |
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
Math.originalRandom = Math.random; | |
Math.lowRandom = function() { | |
return Math.originalRandom() / 100000000000;} | |
Math.highRandom = function() { | |
return 1 - Math.lowRandom();} | |
let breakCycle = false;function luckyCycle() { | |
return setTimeout(function() { | |
if (breakCycle) return; |
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
/** | |
* YouTube bulk unsubscribe fn. | |
* Wrapping this in an IIFE for browser compatibility. | |
*/ | |
(async function iife() { | |
// This is the time delay after which the "unsubscribe" button is "clicked"; Change it as per your need! | |
var UNSUBSCRIBE_DELAY_TIME = 2000 | |
/** |
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": "process_name", "ph": "M", "pid": 0, "args": {"start_time_since_epoch_in_micros":1624937181806323}}, | |
{"name": "process_sort_index", "ph": "M", "pid": 0, "args": {"sort_index": 0}}, | |
{"name": "process_name", "ph": "M", "pid": 1, "args": {"name": "allreduce.noname.1"}}, | |
{"name": "process_sort_index", "ph": "M", "pid": 1, "args": {"sort_index": 1}}, | |
{"ph": "B", "name": "NEGOTIATE_ALLREDUCE", "ts": 3399382, "pid": 1},{"ph": "X", "name": "8", "ts": 3399384, "pid": 1, "dur": 0},{"ph": "X", "name": "9", "ts": 3399390, "pid": 1, "dur": 0},{"ph": "X", "name": "10", "ts": 3399392, "pid": 1, "dur": 0},{"ph": "X", "name": "11", "ts": 3399393, "pid": 1, "dur": 0},{"ph": "X", "name": "5", "ts": 7133998, "pid": 1, "dur": 0},{"ph": "X", "name": "4", "ts": 7207126, "pid": 1, "dur": 0},{"ph": "X", "name": "15", "ts": 7239969, "pid": 1, "dur": 0},{"ph": "X", "name": "7", "ts": 7248450, "pid": 1, "dur": 0},{"ph": "X", "name": "6", "ts": 7255862, "pid": 1, "dur": 0},{"ph": "X", "name": "13", "ts": 7283415, "pid": 1, "du |
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
#if HAVE_MPI | |
Status | |
NCCL2DMesh::Execute(std::vector<TensorTableEntry>& entries, | |
const Response& response) { | |
auto& first_entry = entries[0]; | |
// Determine GPU IDs of the devices participating in this communicator. | |
std::vector<int32_t> nccl_device_map; | |
nccl_device_map.reserve( | |
global_state_->controller->GetLocalCommRanks().size()); |
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
public interface FitnessCustomer { | |
private static enum Level { | |
BRONZE, SILVER, GOLD | |
} | |
private Level level; | |
public void setLevel(Level level) { | |
this.level = level; | |
} | |
public Level getLevel() { | |
return this.level; |
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
{ | |
"registry-mirrors" : [ | |
"http://registry.docker-cn.com", | |
"http://docker.mirrors.ustc.edu.cn", | |
"http://hub-mirror.c.163.com", | |
"http://ovfftd6p.mirror.aliyuncs.com" | |
], | |
"insecure-registries" : [ | |
"registry.docker-cn.com", | |
"docker.mirrors.ustc.edu.cn" |
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
192.30.253.112 github.com | |
192.30.253.113 github.com | |
192.30.253.119 gist.github.com | |
151.101.185.194 github.global.ssl.fastly.net | |
151.101.100.133 assets-cdn.github.com | |
151.101.100.133 raw.githubusercontent.com |
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
version: '2' | |
services: | |
orderer: | |
container_name: orderer | |
image: hyperledger/fabric-orderer | |
environment: | |
- FABRIC_LOGGING_SPEC=debug | |
- ORDERER_GENERAL_LISTENADDRESS=orderer | |
- ORDERER_GENERAL_BOOTSTRAPMETHOD=file |
NewerOlder