rioteknikmesin commited on
Commit
8878be9
·
verified ·
1 Parent(s): 5d76fd0

can it into phyton

Browse files
Files changed (2) hide show
  1. README.md +7 -4
  2. index.html +213 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Pythonic Delight
3
- emoji: ⚡
4
- colorFrom: red
5
  colorTo: blue
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: Pythonic Delight 🐍
3
+ colorFrom: green
 
4
  colorTo: blue
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
index.html CHANGED
@@ -1,19 +1,214 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </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>Pythonic Delight</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
11
+ <style>
12
+ .code-bg {
13
+ background-color: #282c34;
14
+ }
15
+ .python-yellow {
16
+ color: #FFD43B;
17
+ }
18
+ .python-blue {
19
+ color: #4584b6;
20
+ }
21
+ .snake-pattern {
22
+ background-image: linear-gradient(135deg, #4584b6 25%, transparent 25%),
23
+ linear-gradient(225deg, #4584b6 25%, transparent 25%),
24
+ linear-gradient(45deg, #4584b6 25%, transparent 25%),
25
+ linear-gradient(315deg, #4584b6 25%, #282c34 25%);
26
+ background-size: 20px 20px;
27
+ }
28
+ </style>
29
+ </head>
30
+ <body class="min-h-screen bg-gray-100" id="vanta-bg">
31
+ <div class="container mx-auto px-4">
32
+ <!-- Header -->
33
+ <header class="py-8 text-center">
34
+ <div class="flex justify-center mb-4">
35
+ <div class="w-20 h-20 rounded-full bg-white shadow-lg flex items-center justify-center">
36
+ <i data-feather="code" class="w-10 h-10 python-blue"></i>
37
+ </div>
38
+ </div>
39
+ <h1 class="text-4xl md:text-5xl font-bold mb-2 python-blue">Pythonic Delight</h1>
40
+ <p class="text-lg text-gray-600">Where Python magic happens 🪄</p>
41
+ </header>
42
+
43
+ <!-- Main Content -->
44
+ <main class="mb-16">
45
+ <!-- Hero Section -->
46
+ <section class="mb-16">
47
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden">
48
+ <div class="md:flex">
49
+ <div class="md:w-1/2 p-8 md:p-12 flex flex-col justify-center">
50
+ <h2 class="text-3xl font-bold mb-4 python-blue">Unleash the Python Power</h2>
51
+ <p class="text-gray-600 mb-6">Discover the elegance of Python programming through interactive examples and beautiful visualizations.</p>
52
+ <div class="flex space-x-4">
53
+ <button class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded-lg transition duration-300">
54
+ Get Started
55
+ </button>
56
+ <button class="border border-blue-500 text-blue-500 hover:bg-blue-50 px-6 py-2 rounded-lg transition duration-300">
57
+ Learn More
58
+ </button>
59
+ </div>
60
+ </div>
61
+ <div class="md:w-1/2 code-bg p-8 flex items-center justify-center">
62
+ <pre class="text-white text-sm md:text-base overflow-x-auto">
63
+ <code class="font-mono">
64
+ <span class="python-yellow">def</span> <span class="text-purple-400">fibonacci</span>(n):
65
+ <span class="python-yellow">if</span> n <= 1:
66
+ <span class="python-yellow">return</span> n
67
+ <span class="python-yellow">else</span>:
68
+ <span class="python-yellow">return</span> fibonacci(n-1) + fibonacci(n-2)
69
+
70
+ <span class="python-yellow">for</span> i <span class="python-yellow">in</span> range(10):
71
+ print(fibonacci(i))
72
+ </code>
73
+ </pre>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </section>
78
+
79
+ <!-- Features Section -->
80
+ <section class="mb-16">
81
+ <h2 class="text-3xl font-bold text-center mb-12 python-blue">Why Python Rocks</h2>
82
+ <div class="grid md:grid-cols-3 gap-8">
83
+ <!-- Feature 1 -->
84
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
85
+ <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mb-4">
86
+ <i data-feather="zap" class="python-blue"></i>
87
+ </div>
88
+ <h3 class="text-xl font-semibold mb-2">Simple & Powerful</h3>
89
+ <p class="text-gray-600">Python's clean syntax makes it easy to read and write, yet it's powerful enough for complex applications.</p>
90
+ </div>
91
+
92
+ <!-- Feature 2 -->
93
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
94
+ <div class="w-12 h-12 rounded-full bg-yellow-100 flex items-center justify-center mb-4">
95
+ <i data-feather="cpu" class="text-yellow-500"></i>
96
+ </div>
97
+ <h3 class="text-xl font-semibold mb-2">Versatile</h3>
98
+ <p class="text-gray-600">From web development to data science and AI, Python can do it all with its vast ecosystem of libraries.</p>
99
+ </div>
100
+
101
+ <!-- Feature 3 -->
102
+ <div class="bg-white p-6 rounded-lg shadow-md hover:shadow-lg transition duration-300">
103
+ <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center mb-4">
104
+ <i data-feather="users" class="text-green-500"></i>
105
+ </div>
106
+ <h3 class="text-xl font-semibold mb-2">Community</h3>
107
+ <p class="text-gray-600">Join one of the largest and most supportive programming communities in the world.</p>
108
+ </div>
109
+ </div>
110
+ </section>
111
+
112
+ <!-- Interactive Section -->
113
+ <section class="mb-16">
114
+ <div class="snake-pattern rounded-xl p-8 text-center">
115
+ <h2 class="text-3xl font-bold text-white mb-6">Try Python in Your Browser</h2>
116
+ <div class="max-w-3xl mx-auto bg-white bg-opacity-90 rounded-lg p-6">
117
+ <div id="terminal" class="code-bg rounded-t-lg p-4 h-64 overflow-y-auto font-mono text-sm text-white">
118
+ <div class="text-green-400">$ python</div>
119
+ <div class="text-blue-300">Python 3.9.0 (default, Oct 6 2021, 00:00:00)</div>
120
+ <div class="text-blue-300">Type "help", "copyright", "credits" or "license" for more information.</div>
121
+ <div class="mt-2">>>> <span id="cursor" class="animate-pulse">|</span></div>
122
+ </div>
123
+ <div class="bg-gray-100 rounded-b-lg p-4">
124
+ <div class="flex">
125
+ <input type="text" class="flex-grow px-4 py-2 rounded-l-lg border focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Enter Python code...">
126
+ <button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-r-lg transition duration-300">
127
+ Run
128
+ </button>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </section>
134
+ </main>
135
+
136
+ <!-- Footer -->
137
+ <footer class="py-8 border-t border-gray-200">
138
+ <div class="flex flex-col md:flex-row justify-between items-center">
139
+ <div class="mb-4 md:mb-0">
140
+ <p class="text-gray-600">© 2023 Pythonic Delight. All rights reserved.</p>
141
+ </div>
142
+ <div class="flex space-x-4">
143
+ <a href="#" class="text-gray-600 hover:text-blue-500 transition duration-300">
144
+ <i data-feather="github"></i>
145
+ </a>
146
+ <a href="#" class="text-gray-600 hover:text-blue-400 transition duration-300">
147
+ <i data-feather="twitter"></i>
148
+ </a>
149
+ <a href="#" class="text-gray-600 hover:text-red-500 transition duration-300">
150
+ <i data-feather="youtube"></i>
151
+ </a>
152
+ </div>
153
+ </div>
154
+ </footer>
155
+ </div>
156
+
157
+ <script>
158
+ // Initialize Vanta.js globe background
159
+ VANTA.GLOBE({
160
+ el: "#vanta-bg",
161
+ mouseControls: true,
162
+ touchControls: true,
163
+ gyroControls: false,
164
+ minHeight: 200.00,
165
+ minWidth: 200.00,
166
+ scale: 1.00,
167
+ scaleMobile: 1.00,
168
+ color: "#4584b6",
169
+ backgroundColor: "#f8fafc"
170
+ });
171
+
172
+ // Initialize feather icons
173
+ feather.replace();
174
+
175
+ // Simple terminal animation
176
+ const commands = [
177
+ "print('Hello, World!')",
178
+ "import this",
179
+ "[x**2 for x in range(10)]",
180
+ "import math\nmath.pi"
181
+ ];
182
+ let currentCommand = 0;
183
+
184
+ function animateTerminal() {
185
+ const terminal = document.getElementById('terminal');
186
+ terminal.innerHTML += `<div class="text-green-400">$ python</div>
187
+ <div class="text-blue-300">Python 3.9.0 (default, Oct 6 2021, 00:00:00)</div>
188
+ <div class="text-blue-300">Type "help", "copyright", "credits" or "license" for more information.</div>
189
+ <div class="mt-2">>>> ${commands[currentCommand]}</div>
190
+ <div class="mb-2">${evalPython(commands[currentCommand])}</div>
191
+ <div>>> <span id="cursor" class="animate-pulse">|</span></div>`;
192
+
193
+ terminal.scrollTop = terminal.scrollHeight;
194
+ currentCommand = (currentCommand + 1) % commands.length;
195
+ }
196
+
197
+ function evalPython(code) {
198
+ try {
199
+ // This is just for display - in a real app you'd use Pyodide or similar
200
+ if (code.includes("import this")) return "The Zen of Python, by Tim Peters...";
201
+ if (code.includes("Hello")) return "Hello, World!";
202
+ if (code.includes("math.pi")) return "3.141592653589793";
203
+ if (code.includes("x**2")) return "[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]";
204
+ return "Command executed successfully";
205
+ } catch {
206
+ return "Error executing command";
207
+ }
208
+ }
209
+
210
+ // Animate terminal every 5 seconds
211
+ setInterval(animateTerminal, 5000);
212
+ </script>
213
+ </body>
214
  </html>