forked from narwhalle/PromptLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dump.sql
352 lines (248 loc) · 18.7 KB
/
dump.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
--
-- PostgreSQL database dump
--
-- Dumped from database version 16.2
-- Dumped by pg_dump version 16.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: public; Type: SCHEMA; Schema: -; Owner: postgres
--
-- *not* creating schema, since initdb creates it
ALTER SCHEMA public OWNER TO postgres;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--
COMMENT ON SCHEMA public IS '';
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: Account; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Account" (
id integer NOT NULL,
username text NOT NULL,
password text NOT NULL,
"isModerator" boolean NOT NULL
);
ALTER TABLE public."Account" OWNER TO postgres;
--
-- Name: Account_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."Account_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public."Account_id_seq" OWNER TO postgres;
--
-- Name: Account_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."Account_id_seq" OWNED BY public."Account".id;
--
-- Name: HasTag; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."HasTag" (
"promptId" integer NOT NULL,
"tagId" text NOT NULL
);
ALTER TABLE public."HasTag" OWNER TO postgres;
--
-- Name: LLM; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."LLM" (
"llmName" text NOT NULL
);
ALTER TABLE public."LLM" OWNER TO postgres;
--
-- Name: Prompt; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Prompt" (
id integer NOT NULL,
prompt text NOT NULL,
response text NOT NULL,
image text NOT NULL,
rating double precision NOT NULL,
approved boolean NOT NULL,
"llmName" text NOT NULL,
"createdAt" timestamp(3) without time zone NOT NULL,
summary text NOT NULL,
title character varying(50) NOT NULL
);
ALTER TABLE public."Prompt" OWNER TO postgres;
--
-- Name: Prompt_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public."Prompt_id_seq"
AS integer
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public."Prompt_id_seq" OWNER TO postgres;
--
-- Name: Prompt_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public."Prompt_id_seq" OWNED BY public."Prompt".id;
--
-- Name: Tag; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public."Tag" (
name text NOT NULL
);
ALTER TABLE public."Tag" OWNER TO postgres;
--
-- Name: Account id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Account" ALTER COLUMN id SET DEFAULT nextval('public."Account_id_seq"'::regclass);
--
-- Name: Prompt id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Prompt" ALTER COLUMN id SET DEFAULT nextval('public."Prompt_id_seq"'::regclass);
--
-- Data for Name: Account; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public."Account" (id, username, password, "isModerator") FROM stdin;
1 admin $argon2id$v=19$m=65536,t=3,p=4$c7LTd9Fd4N4/i1Ojjg6jLQ$lGMJLYm3Z5JQ7Fl5mINBVL1g/SvQ4iiBkkN9VqovnmE t
\.
--
-- Data for Name: HasTag; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public."HasTag" ("promptId", "tagId") FROM stdin;
20 Git
20 code
20 version_control
22 writing
22 emoji
22 encoding
22 visual_interest
23 languages
24 code
24 python
24 efficiency
24 optimization
24 optimize
24 performance
25 code
25 latex
25 writing
\.
--
-- Data for Name: LLM; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public."LLM" ("llmName") FROM stdin;
ChatGPT
Bard
CoPilot
\.
--
-- Data for Name: Prompt; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public."Prompt" (id, prompt, response, image, rating, approved, "llmName", "createdAt", summary, title) FROM stdin;
22 Your task is to take the plain text message provided and convert it into an expressive, emoji-rich message that conveys the same meaning and intent. Replace key words and phrases with relevant emojis where appropriate to add visual interest and emotion. Use emojis creatively but ensure the message remains clear and easy to understand. Do not change the core message or add new information. All the world’s a stage, and all the men and women merely players. They have their exits and their entrances; And one man in his time plays many parts. 🎭 All the 🌍’s a stage, and all the 🚹 and 🚺 merely players. They have their exits and their entrances; And one 🚹 in his time plays many parts. 🌟 0 t ChatGPT 2024-05-03 17:17:46.129 Convert plain text into fun and expressive emoji messages. Emoji encoder
23 Write me a series of product announcement tweets in the 10 most commonly spoken languages. The product is a new state of the art pair of binoculars with built-in AI systems to identify the animals viewed through the binoculars. The tweets should be exciting, cutting edge, and push consumer interest. Sure, here are the product announcement tweets in the 10 most commonly spoken languages:\n\n1. English: "Introducing our revolutionary new binoculars! 🌟 With built-in AI technology, these binoculars can identify animals with incredible accuracy. Experience wildlife like never before! 🦁🦌 #NewTech #Binoculars"\n2. Mandarin Chinese: "全新推出的望远镜震撼登场!🌟 内置人工智能技术,能够准确识别动物。体验前所未有的野生动物观赏!🦁🦌 #科技新品 #望远镜"\n3. Spanish: "¡Presentamos nuestros nuevos prismáticos revolucionarios! 🌟 Con tecnología de inteligencia artificial integrada, estos prismáticos pueden identificar animales con una precisión increíble. ¡Experimenta la vida silvestre como nunca antes! 🦁🦌 #TecnologíaNueva #Prismáticos"\n4. English: "अद्वितीय नई दृष्टिकोण! 🌟 बिल्ट-इन एआई प्रौद्योगिकी के साथ, ये दृष्टिकोण जानवरों को अविश्वसनीय सटीकता से पहचान सकते हैं। कभी पहले की तरह जीव-जंतु अनुभव करें! 🦁🦌 #नई_तकनीक #दृष्टिकोण"\n5. Arabic: "نقدم لكم منظارنا الجديد المبتكر! 🌟 مع تقنية الذكاء الاصطناعي المدمجة، يمكن لهذه المناظير التعرف على الحيوانات بدقة لا تصدق. اكتشف الحياة البرية كما لم تفعل من قبل! 🦁🦌 #تكنولوجيا_جديدة #منظار"\n6. Hindi: "Prastut karte hain humare naye aavishkarik binoculars! 🌟 Inbuilt AI takneek ke saath, yeh binoculars jaanvaro ko vishesh gyan se pehchaan sakte hain. Kabhi pehle ki tarah jeev-jantu ka anubhav karein! 🦁🦌 #NaiTech #Binoculars"\n7. Bengali: "আমাদের অভিনব নতুন দৃষ্টিকোন প্রস্তুত! 🌟 বিল্ট-ইন এআই প্রযুক্তি সহ এই দৃষ্টিকোন অবিশ্বস্য নির্দিষ্টতার সাথে প্রাণী সনাক্ত করতে পারে। আপনি যেমন আগে কখনও জীবজন্তু অভিজ্ঞতা করুন! 🦁🦌 #নতুনপ্রযুক্তি #দৃষ্টিকোন"\n8. Portuguese: "Apresentamos os nossos novos binóculos revolucionários! 🌟 Com tecnologia de inteligência artificial integrada, estes binóculos podem identificar animais com uma precisão incrível. Experimente a vida selvagem como nunca antes! 🦁🦌 #NovaTecnologia #Binóculos"\n9. Russian: "Представляем вам наши новые революционные бинокли! 🌟 Со встроенной технологией искусственного интеллекта эти бинокли могут идентифицировать животных с невероятной точностью. Ощутите дикую природу как никогда раньше! 🦁🦌 #НоваяТехнология #Бинокль"\n10. Japanese: "革新的な新しい双眼鏡をご紹介します!🌟 AIテクノロジーを内蔵したこれらの双眼鏡は、動物を信じられないほど正確に識別することができます。今までにない野生動物の体験をお楽しみください!🦁🦌 #新技術 #双眼鏡"\n\nThese tweets are crafted to appeal to a global audience, using exciting language and emojis to generate interest in the new state-of-the-art binoculars with built-in AI systems. 0 t ChatGPT 2024-05-03 17:17:46.787 Create compelling product announcement tweets in the world's 10 most spoken languages. Babel's Broadcasts
24 Your task is to analyze the provided Python code snippet and suggest improvements to optimize its performance. Identify areas where the code can be made more efficient, faster, or less resource-intensive. Provide specific suggestions for optimization, along with explanations of how these changes can enhance the code's performance. The optimized code should maintain the same functionality as the original code while demonstrating improved efficiency. def fibonacci(n): if n <= 0: return [] elif n == 1: return [0] elif n == 2: return [0, 1] else: fib = [0, 1] for i in range(2, n): fib.append(fib[i-1] + fib[i-2]) return fib The provided code generates a list of Fibonacci numbers up to the nth number. While the code is functional, there are several areas where it can be optimized for better performance:\n\n1. **Use Memoization**: This technique involves storing the results of expensive function calls and returning the cached result when the same inputs occur again. In this case, we can use memoization to avoid recalculating Fibonacci numbers that have already been computed. This can significantly improve the performance, especially for larger values of n.\n\n2. **Reduce Memory Usage**: Instead of storing the entire list of Fibonacci numbers, we can just keep track of the last two numbers. Since each Fibonacci number is calculated based on the previous two numbers, we only need to store the last two numbers in memory.\n\nHere's the optimized version of the code incorporating these improvements:\n\n```python\ndef fibonacci(n, memo={}):\n if n <= 0:\n return []\n elif n == 1:\n return [0]\n elif n == 2:\n return [0, 1]\n elif n in memo:\n return memo[n]\n else:\n fib = [0, 1]\n for i in range(2, n):\n fib.append(fib[-1] + fib[-2])\n memo[i+1] = fib[-1]\n return fib\n```\n\nExplanation of Changes:\n\n- **Memoization**: We use a dictionary `memo` to store previously calculated Fibonacci numbers. Before computing a Fibonacci number, we check if it's already in the memo. If it is, we return the cached result. This eliminates redundant computations and improves performance, especially for larger values of n.\n- **Reduced Memory Usage**: We only keep track of the last two Fibonacci numbers in the list `fib`. Instead of storing the entire list, we update these two numbers iteratively as we generate Fibonacci numbers. This reduces memory usage and makes the code more efficient.\n\nWith these optimizations, the code should run faster and use less memory, especially for larger values of n. 0 t ChatGPT 2024-05-03 17:17:48.574 Suggest improvements to optimize Python code performance. Code Consultant
20 I have made some changes to my local files and I want to save them in my local Git repository. What Git command should I use? To save your changes in your local Git repository, you typically follow these steps:\n\n1. **Add**: Add the changes to the staging area.\n ```\n git add .\n ```\n This command adds all the changes in your working directory to the staging area. If you want to add specific files, you can replace `.` with the file names.\n\n2. **Commit**: Commit the changes to the local repository.\n ```\n git commit -m "Your commit message here"\n ```\n Replace `"Your commit message here"` with a brief description of the changes you made. Make sure it's clear and informative.\n\n3. **Push (if needed)**: If your repository is connected to a remote repository (like on GitHub, GitLab, etc.) and you want to update it with your local changes, you would use:\n ```\n git push\n ```\n This command will push your committed changes to the remote repository.\n\nThese are the basic steps for saving changes to your local Git repository. If you're working in a team or with a remote repository, you may need to coordinate with others and handle conflicts appropriately. 0 t ChatGPT 2024-05-03 17:17:45.438 Generate appropriate Git commands based on user-described version control actions. Using Git
25 You are an AI assistant with expertise in LaTeX, a document preparation system widely used for academic and technical writing. Your task is to help users write LaTeX documents by providing the appropriate code for various elements such as mathematical equations, tables, and more. Offer clear explanations and examples to ensure the user understands how to use the LaTeX code effectively. I need to create a simple table with three columns and two rows. The header row should contain the titles "Name," "Age," and "City." The data row should have the values "John," "25," and "New York." To create a simple table with three columns and two rows in LaTeX, you can use the `tabular` environment. Here's how you can create the table you described:\n\n```latex\n\\documentclass{article}\n\n\\begin{document}\n\n% Begin the table environment\n\\begin{table}[h]\n % Specify table alignment and format using the tabular environment\n \\centering\n \\begin{tabular}{|c|c|c|} % c stands for center-aligned column, | adds vertical lines between columns\n \\hline % Horizontal line at the top of the table\n % Header row with column titles\n Name & Age & City \\\\\n \\hline % Horizontal line separating header row from data row\n % Data row with values\n John & 25 & New York \\\\\n \\hline % Horizontal line at the bottom of the table\n \\end{tabular}\n \\caption{Simple Table Example} % Table caption\n \\label{tab:simple_table} % Label for referencing the table\n\\end{table}\n\n\\end{document}\n```\n\nExplanation:\n\n- `\\begin{table}[h]` and `\\end{table}`: These commands define the beginning and end of the table environment, respectively. `[h]` is an optional argument that suggests placing the table "here" in the document, but LaTeX may still choose a different location based on formatting constraints.\n- `\\centering`: This command centers the table horizontally within the page.\n- `\\begin{tabular}{|c|c|c|}` and `\\end{tabular}`: These commands define the beginning and end of the `tabular` environment, which creates the table. Inside the braces `{}` are the column formatting specifications. `|` adds vertical lines between columns, and `c` indicates a center-aligned column.\n- `\\hline`: This command creates a horizontal line in the table. It's used to separate the header row from the data row and to add lines at the top and bottom of the table.\n- Header row: The row containing column titles is specified directly within the `tabular` environment.\n- Data row: The row containing values is also specified within the `tabular` environment.\n- `\\caption{}`: This command provides a caption for the table.\n- `\\label{}`: This command assigns a label to the table, which can be used for referencing it within the document.\n\nYou can compile this LaTeX code to generate a PDF document with the simple table you described. Adjust the formatting and styling as needed to fit your preferences. 0 t ChatGPT 2024-05-03 17:17:47.56 Write LaTeX documents, generating code for mathematical equations, tables, and more. LaTeX Legend
\.
--
-- Data for Name: Tag; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public."Tag" (name) FROM stdin;
technology
science
history
art
literature
code
education
website
html
wordplay
junk
Git
version control
writing
latex
visual interest
encoding
emoji
performance
optimize
optimization
efficiency
python
languages
version_control
visual_interest
\.
--
-- Name: Account_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public."Account_id_seq"', 1, false);
--
-- Name: Prompt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
SELECT pg_catalog.setval('public."Prompt_id_seq"', 25, true);
--
-- Name: Account Account_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Account"
ADD CONSTRAINT "Account_pkey" PRIMARY KEY (id);
--
-- Name: HasTag HasTag_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."HasTag"
ADD CONSTRAINT "HasTag_pkey" PRIMARY KEY ("promptId", "tagId");
--
-- Name: LLM LLM_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."LLM"
ADD CONSTRAINT "LLM_pkey" PRIMARY KEY ("llmName");
--
-- Name: Prompt Prompt_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Prompt"
ADD CONSTRAINT "Prompt_pkey" PRIMARY KEY (id);
--
-- Name: Tag Tag_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Tag"
ADD CONSTRAINT "Tag_pkey" PRIMARY KEY (name);
--
-- Name: Account_username_key; Type: INDEX; Schema: public; Owner: postgres
--
CREATE UNIQUE INDEX "Account_username_key" ON public."Account" USING btree (username);
--
-- Name: HasTag HasTag_promptId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."HasTag"
ADD CONSTRAINT "HasTag_promptId_fkey" FOREIGN KEY ("promptId") REFERENCES public."Prompt"(id) ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: HasTag HasTag_tagId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."HasTag"
ADD CONSTRAINT "HasTag_tagId_fkey" FOREIGN KEY ("tagId") REFERENCES public."Tag"(name) ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: Prompt Prompt_llmName_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public."Prompt"
ADD CONSTRAINT "Prompt_llmName_fkey" FOREIGN KEY ("llmName") REFERENCES public."LLM"("llmName") ON UPDATE CASCADE ON DELETE RESTRICT;
--
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE USAGE ON SCHEMA public FROM PUBLIC;
--
-- PostgreSQL database dump complete
--