Baruka6 commited on
Commit
cddf00f
·
verified ·
1 Parent(s): 505f883

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +348 -39
  2. prompts.txt +2 -1
index.html CHANGED
@@ -1,42 +1,351 @@
1
  <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>My app</title>
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <meta charset="utf-8">
 
 
7
  <style>
8
- body {
9
- display: flex;
10
- justify-content: center;
11
- align-items: center;
12
- overflow: hidden;
13
- height: 100dvh;
14
- font-family: "Arial", sans-serif;
15
- text-align: center;
16
- background-color: #fff;
17
- }
18
- .arrow {
19
- position: absolute;
20
- bottom: 32px;
21
- left: 0px;
22
- width: 100px;
23
- transform: rotate(30deg);
24
- }
25
- h1 {
26
- font-size: 50px;
27
- }
28
- h1 span {
29
- color: #acacac;
30
- font-size: 32px;
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  </style>
33
- </head>
34
- <body>
35
- <h1>
36
- <span>I'm ready to work,</span><br />
37
- Ask me anything.
38
- </h1>
39
- <img src="https://enzostvs-deepsite.hf.space/arrow.svg" class="arrow" />
40
- <script></script>
41
- <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Baruka6/tom-svolt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
42
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Scientific Calculator</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
  <style>
10
+ .calculator {
11
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
12
+ border-radius: 20px;
13
+ overflow: hidden;
14
+ transition: all 0.3s ease;
15
+ }
16
+ .calculator:hover {
17
+ box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
18
+ }
19
+ .display {
20
+ min-height: 100px;
21
+ word-wrap: break-word;
22
+ overflow: hidden;
23
+ }
24
+ .btn {
25
+ transition: all 0.2s ease;
26
+ transform: scale(1);
27
+ }
28
+ .btn:active {
29
+ transform: scale(0.95);
30
+ }
31
+ .btn-operator {
32
+ background-color: #f59e0b;
33
+ }
34
+ .btn-function {
35
+ background-color: #4b5563;
36
+ }
37
+ .btn-equals {
38
+ background-color: #10b981;
39
+ }
40
+ .btn-clear {
41
+ background-color: #ef4444;
42
+ }
43
+ .btn-memory {
44
+ background-color: #7c3aed;
45
+ }
46
+ .btn:hover {
47
+ opacity: 0.9;
48
+ }
49
+ .history-panel {
50
+ transition: all 0.3s ease;
51
+ max-height: 0;
52
+ overflow: hidden;
53
+ }
54
+ .history-panel.active {
55
+ max-height: 200px;
56
+ }
57
+ @media (max-width: 640px) {
58
+ .btn {
59
+ padding: 0.5rem;
60
+ font-size: 0.9rem;
61
+ }
62
+ }
63
  </style>
64
+ </head>
65
+ <body class="bg-gray-100 min-h-screen flex items-center justify-center p-4">
66
+ <div class="calculator bg-gray-800 w-full max-w-md">
67
+ <!-- Display Area -->
68
+ <div class="p-4">
69
+ <div class="bg-gray-900 rounded-lg p-4 mb-2">
70
+ <div class="history-panel bg-gray-800 text-gray-300 text-sm mb-2 overflow-y-auto" id="historyPanel"></div>
71
+ <div class="display text-right text-white text-3xl font-semibold py-2 px-1" id="display">0</div>
72
+ <div class="text-right text-gray-400 text-sm" id="operation"></div>
73
+ </div>
74
+ </div>
75
+
76
+ <!-- Button Grid -->
77
+ <div class="grid grid-cols-5 gap-2 p-4">
78
+ <!-- Memory Functions -->
79
+ <button class="btn btn-memory text-white rounded-lg p-3 col-span-1" onclick="memoryAdd()">M+</button>
80
+ <button class="btn btn-memory text-white rounded-lg p-3 col-span-1" onclick="memorySubtract()">M-</button>
81
+ <button class="btn btn-memory text-white rounded-lg p-3 col-span-1" onclick="memoryRecall()">MR</button>
82
+ <button class="btn btn-memory text-white rounded-lg p-3 col-span-1" onclick="memoryClear()">MC</button>
83
+ <button class="btn btn-clear text-white rounded-lg p-3 col-span-1" onclick="clearAll()">AC</button>
84
+
85
+ <!-- First Row -->
86
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('(')">(</button>
87
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay(')')">)</button>
88
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('%')">%</button>
89
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.PI')">π</button>
90
+ <button class="btn btn-clear text-white rounded-lg p-3 col-span-1" onclick="clearDisplay()">C</button>
91
+
92
+ <!-- Second Row -->
93
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addFunction('Math.sin(')">sin</button>
94
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addFunction('Math.cos(')">cos</button>
95
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addFunction('Math.tan(')">tan</button>
96
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.log(')">ln</button>
97
+ <button class="btn btn-operator text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('/')">/</button>
98
+
99
+ <!-- Third Row -->
100
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addFunction('Math.asin(')">sin⁻¹</button>
101
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addFunction('Math.acos(')">cos⁻¹</button>
102
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addFunction('Math.atan(')">tan⁻¹</button>
103
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.log10(')">log</button>
104
+ <button class="btn btn-operator text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('*')">×</button>
105
+
106
+ <!-- Fourth Row -->
107
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.sqrt(')">√</button>
108
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.pow(')">x^y</button>
109
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.exp(')">e^x</button>
110
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="factorial()">x!</button>
111
+ <button class="btn btn-operator text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('-')">-</button>
112
+
113
+ <!-- Fifth Row -->
114
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.abs(')">|x|</button>
115
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.floor(')">floor</button>
116
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.ceil(')">ceil</button>
117
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.round(')">round</button>
118
+ <button class="btn btn-operator text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('+')">+</button>
119
+
120
+ <!-- Sixth Row -->
121
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.random()')">rand</button>
122
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.E')">e</button>
123
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('10^')">10^x</button>
124
+ <button class="btn btn-function text-white rounded-lg p-3 col-span-1" onclick="toggleHistory()">
125
+ <i class="fas fa-history"></i>
126
+ </button>
127
+ <button class="btn btn-equals text-white rounded-lg p-3 col-span-1" onclick="calculate()">=</button>
128
+
129
+ <!-- Number Pad -->
130
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('7')">7</button>
131
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('8')">8</button>
132
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('9')">9</button>
133
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('4')">4</button>
134
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('5')">5</button>
135
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('6')">6</button>
136
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('1')">1</button>
137
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('2')">2</button>
138
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('3')">3</button>
139
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-2" onclick="addToDisplay('0')">0</button>
140
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('.')">.</button>
141
+ <button class="btn bg-gray-700 text-white rounded-lg p-3 col-span-1" onclick="addToDisplay('Math.pow(10,')">EE</button>
142
+ </div>
143
+ </div>
144
+
145
+ <script>
146
+ // Calculator state
147
+ let currentDisplay = '0';
148
+ let operationDisplay = '';
149
+ let memoryValue = 0;
150
+ let history = [];
151
+ let isHistoryVisible = false;
152
+
153
+ // DOM elements
154
+ const displayElement = document.getElementById('display');
155
+ const operationElement = document.getElementById('operation');
156
+ const historyPanel = document.getElementById('historyPanel');
157
+
158
+ // Initialize display
159
+ updateDisplay();
160
+
161
+ // Function to update the display
162
+ function updateDisplay() {
163
+ displayElement.textContent = currentDisplay;
164
+ operationElement.textContent = operationDisplay;
165
+ }
166
+
167
+ // Function to add content to the display
168
+ function addToDisplay(value) {
169
+ if (currentDisplay === '0' && value !== '.') {
170
+ currentDisplay = value;
171
+ } else {
172
+ currentDisplay += value;
173
+ }
174
+ updateDisplay();
175
+ }
176
+
177
+ // Function to add functions with parentheses
178
+ function addFunction(func) {
179
+ currentDisplay += func;
180
+ updateDisplay();
181
+ }
182
+
183
+ // Function to clear the display
184
+ function clearDisplay() {
185
+ currentDisplay = '0';
186
+ operationDisplay = '';
187
+ updateDisplay();
188
+ }
189
+
190
+ // Function to clear everything
191
+ function clearAll() {
192
+ currentDisplay = '0';
193
+ operationDisplay = '';
194
+ memoryValue = 0;
195
+ updateDisplay();
196
+ }
197
+
198
+ // Function to calculate the result
199
+ function calculate() {
200
+ try {
201
+ // Save the operation for history
202
+ const operation = currentDisplay;
203
+
204
+ // Evaluate the expression
205
+ let result = eval(currentDisplay);
206
+
207
+ // Handle very large or small numbers with scientific notation
208
+ if (Math.abs(result) > 1e12 || (Math.abs(result) < 1e-4 && result !== 0)) {
209
+ result = result.toExponential(6);
210
+ } else if (Number.isInteger(result)) {
211
+ result = result.toString();
212
+ } else {
213
+ // Limit decimal places for regular numbers
214
+ result = parseFloat(result.toFixed(10)).toString();
215
+ }
216
+
217
+ // Update displays
218
+ operationDisplay = operation + ' =';
219
+ currentDisplay = result;
220
+ updateDisplay();
221
+
222
+ // Add to history
223
+ addToHistory(operation, result);
224
+ } catch (error) {
225
+ currentDisplay = 'Error';
226
+ updateDisplay();
227
+ }
228
+ }
229
+
230
+ // Function to add calculation to history
231
+ function addToHistory(operation, result) {
232
+ history.unshift({ operation, result });
233
+ if (history.length > 5) {
234
+ history.pop();
235
+ }
236
+ updateHistoryPanel();
237
+ }
238
+
239
+ // Function to update history panel
240
+ function updateHistoryPanel() {
241
+ historyPanel.innerHTML = history.map(item =>
242
+ `<div class="py-1 border-b border-gray-700">
243
+ <div class="text-gray-400">${item.operation} =</div>
244
+ <div class="text-white">${item.result}</div>
245
+ </div>`
246
+ ).join('');
247
+ }
248
+
249
+ // Function to toggle history panel visibility
250
+ function toggleHistory() {
251
+ isHistoryVisible = !isHistoryVisible;
252
+ if (isHistoryVisible) {
253
+ historyPanel.classList.add('active');
254
+ historyPanel.classList.remove('max-h-0');
255
+ historyPanel.classList.add('max-h-48');
256
+ } else {
257
+ historyPanel.classList.remove('active');
258
+ historyPanel.classList.remove('max-h-48');
259
+ historyPanel.classList.add('max-h-0');
260
+ }
261
+ }
262
+
263
+ // Memory functions
264
+ function memoryAdd() {
265
+ try {
266
+ memoryValue += parseFloat(eval(currentDisplay));
267
+ } catch (error) {
268
+ currentDisplay = 'Error';
269
+ updateDisplay();
270
+ }
271
+ }
272
+
273
+ function memorySubtract() {
274
+ try {
275
+ memoryValue -= parseFloat(eval(currentDisplay));
276
+ } catch (error) {
277
+ currentDisplay = 'Error';
278
+ updateDisplay();
279
+ }
280
+ }
281
+
282
+ function memoryRecall() {
283
+ currentDisplay = memoryValue.toString();
284
+ updateDisplay();
285
+ }
286
+
287
+ function memoryClear() {
288
+ memoryValue = 0;
289
+ }
290
+
291
+ // Factorial function
292
+ function factorial() {
293
+ try {
294
+ const num = parseInt(eval(currentDisplay));
295
+ if (num < 0) {
296
+ currentDisplay = 'Error';
297
+ } else if (num === 0 || num === 1) {
298
+ currentDisplay = '1';
299
+ } else {
300
+ let result = 1;
301
+ for (let i = 2; i <= num; i++) {
302
+ result *= i;
303
+ }
304
+ currentDisplay = result.toString();
305
+ }
306
+ updateDisplay();
307
+ } catch (error) {
308
+ currentDisplay = 'Error';
309
+ updateDisplay();
310
+ }
311
+ }
312
+
313
+ // Keyboard support
314
+ document.addEventListener('keydown', function(event) {
315
+ const key = event.key;
316
+
317
+ // Numbers
318
+ if (/[0-9]/.test(key)) {
319
+ addToDisplay(key);
320
+ return;
321
+ }
322
+
323
+ // Operators
324
+ if (['+', '-', '*', '/', '%', '(', ')', '.'].includes(key)) {
325
+ addToDisplay(key);
326
+ return;
327
+ }
328
+
329
+ // Special keys
330
+ switch (key) {
331
+ case 'Enter':
332
+ calculate();
333
+ break;
334
+ case 'Escape':
335
+ clearAll();
336
+ break;
337
+ case 'Backspace':
338
+ currentDisplay = currentDisplay.slice(0, -1) || '0';
339
+ updateDisplay();
340
+ break;
341
+ case '^':
342
+ addToDisplay('Math.pow(');
343
+ break;
344
+ case '!':
345
+ factorial();
346
+ break;
347
+ }
348
+ });
349
+ </script>
350
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Baruka6/tom-svolt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
351
+ </html>
prompts.txt CHANGED
@@ -1,4 +1,5 @@
1
  can you build me a fps shooting game witha very cool graphics (3d) and make the controls friendly
2
  can you help build a website that can assist me in learning electrical enginerring student
3
  now i need you to make the necesary things on th website like when you click on start learning it makes you create an account then ater creating an account you can eplore all corses under electrical add all coursess to it
4
- can you update the website and collect answers for each course and make them visible on the website collect each answwerss on chatgpt or any ai and makee the simulator more realistic pls
 
 
1
  can you build me a fps shooting game witha very cool graphics (3d) and make the controls friendly
2
  can you help build a website that can assist me in learning electrical enginerring student
3
  now i need you to make the necesary things on th website like when you click on start learning it makes you create an account then ater creating an account you can eplore all corses under electrical add all coursess to it
4
+ can you update the website and collect answers for each course and make them visible on the website collect each answwerss on chatgpt or any ai and makee the simulator more realistic pls
5
+ build a scientific calculator