- pure
def add(a: int, b: int) -> int:
return a + b
import os | |
import openai | |
import asyncio | |
import gradio as gr | |
MODEL = "gpt-3.5-turbo-instruct" | |
if "OPENAI_PROXY" in os.environ: | |
openai.proxy = os.environ["OPENAI_PROXY"] | |
openai.api_key = os.environ["OPENAI_API_KEY"] |
! | |
! _ooOoo_ | |
! o8888888o | |
! 88" . "88 | |
! (| -_- |) | |
! O\ = /O | |
! ____/`---'\____ | |
! .' \\| |// `. | |
! / \\||| : |||// \ | |
! / _||||| -:- |||||- \ |
import ast | |
import inspect | |
import types | |
class Apply(ast.NodeTransformer): | |
def __init__(self): | |
super().__init__() | |
self._never_function = True |
from nonebot.adapters import Event, Message | |
from nonebot.params import EventPlainText, CommandArg | |
from nonebot.plugin.on import on_message, on_command | |
from nonebot.adapters.onebot.v11.message import MessageSegment | |
import os | |
import ast | |
import json | |
import shelve | |
import aiohttp |
import asyncio | |
import fire | |
import openai | |
import os | |
import prompt_toolkit | |
import tiktoken | |
# Authenticate with OpenAI API | |
assert "OPENAI_API_KEY" in os.environ, "OPENAI_API_KEY environment variable not set." | |
openai.api_key = os.environ["OPENAI_API_KEY"] |
import TAT | |
Tensor = TAT.No.D.Tensor | |
L1 = 2 | |
L2 = 4 | |
D = 5 | |
def construct_tensor(l1, l2): |
<div id=container /> | |
<script> | |
async function getList() { | |
const resp = await fetch("list.txt", {cache: "no-store"}) | |
const text = await resp.text() | |
const list = text.split("\n") | |
return list.filter(name => name.includes(".png")) | |
} | |
var container = document.getElementById("container") | |
var oldList = [] |
#include <iostream> | |
#include <random> | |
#include <type_traits> | |
#include <variant> | |
template <class T> struct replace_void { using type = T; }; | |
template <> struct replace_void<void> { using type = std::monostate; }; | |
template <class T> using replace_void_t = typename replace_void<T>::type; | |
template <class... Fn> struct overloaded : Fn... { |
class metaA(type): | |
def __new__(cls, n, b, a): | |
#a["__add__"] = lambda x,y:4 | |
obj = type.__new__(cls, n, b, a) | |
#obj.__add__ = lambda x,y:4 | |
return obj | |
def __getattr__(self, name): | |
if name == "__add__": | |
return lambda x,y:4 | |
raise AttributeError() |