Skip to content

Instantly share code, notes, and snippets.

import { Button, Space, Select } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
function App() {
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Color Dimensions',
width: 800,
height: 600,
legend: {
orientation: 'h',
},
dragmode: 'select',
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Color Dimensions',
width: 800,
height: 600,
legend: {
orientation: 'h',
},
};
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Color Dimensions',
width: 800,
height: 600,
};
const dataArray = [
{ // trace 0
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Scatter Chart',
width: 800,
height: 600,
};
const dataArray = [
{
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Bar Chart',
width: 800,
height: 600,
};
const dataArray = [
{
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Scatter Chart',
width: 800,
height: 600,
};
const dataArray = [
{
import type { NextApiRequest, NextApiResponse } from 'next'
import { Configuration, OpenAIApi, ImagesResponseDataInner } from 'openai';
import { createReadStream } from 'fs';
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);
type Data = {
import React from 'react';
import styles from '../styles/Home.module.css';
const IMAGE_COUNT = 10;
const IMAGE_SIZE = 1024;
const MASK_FILE_PREFIX = 'mask';
export default function Home() {
const [value, setValue] = React.useState<string>('');
const [value2, setValue2] = React.useState<string>('');
import type { NextApiRequest, NextApiResponse } from 'next'
import { Configuration, OpenAIApi, ImagesResponseDataInner } from 'openai';
import { createReadStream } from 'fs';
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);
type Data = {