MrTheDerpier commited on
Commit
66a2f66
·
verified ·
1 Parent(s): db81ac0

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +311 -0
index.html ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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">
6
+ <meta name="theme-color" content="#f5f0e7">
7
+ <title>Experimenting with Poe's Python Interpreter</title>
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Merriweather:wght@400;700;900&family=Source+Sans+3:wght@400;500;600;700&display=swap" rel="stylesheet">
11
+ <style>
12
+ :root {
13
+ --paper: #f5f0e7;
14
+ --paper-deep: #ebe3d6;
15
+ --ink: #292821;
16
+ --muted: #777366;
17
+ --red: #b94d38;
18
+ --red-dark: #913a2b;
19
+ --green: #526b55;
20
+ --line: #d9d0c2;
21
+ --card: #fffdf8;
22
+ --shadow: 0 12px 35px rgba(53, 43, 29, .08);
23
+ }
24
+ * { box-sizing: border-box; }
25
+ html { scroll-behavior: smooth; }
26
+ body {
27
+ margin: 0;
28
+ background:
29
+ radial-gradient(ellipse at 12% 3%, rgba(185,77,56,.055), transparent 28rem),
30
+ var(--paper);
31
+ color: var(--ink);
32
+ font-family: "Source Sans 3", sans-serif;
33
+ font-size: 18px;
34
+ line-height: 1.72;
35
+ }
36
+ a { color: var(--red-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
37
+ a:hover { color: var(--red); }
38
+ main { max-width: 1120px; margin: 0 auto; padding: 62px 30px 100px; }
39
+ .article { max-width: 790px; margin: 0 auto; }
40
+ .eyebrow {
41
+ display: flex; gap: 12px; align-items: center;
42
+ color: var(--red-dark); font: 500 12px "DM Mono", monospace;
43
+ letter-spacing: .12em; text-transform: uppercase;
44
+ }
45
+ .eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--red); }
46
+ h1, h2, h3, blockquote { font-family: "Merriweather", Georgia, serif; }
47
+ h1 {
48
+ font-size: clamp(2.45rem, 6vw, 4.7rem);
49
+ line-height: 1.14; letter-spacing: -.055em;
50
+ margin: 22px 0 22px; max-width: 850px;
51
+ }
52
+ .dek { font: 400 clamp(1.1rem, 2.5vw, 1.35rem)/1.65 "Merriweather", Georgia, serif; color: #615d52; max-width: 690px; }
53
+ .byline {
54
+ display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
55
+ margin: 30px 0 36px; color: var(--muted); font-size: 14px;
56
+ }
57
+ .byline .dot { width: 4px; height: 4px; border-radius: 50%; background: #aaa08f; }
58
+ .hero-art {
59
+ position: relative; overflow: hidden; min-height: 270px;
60
+ margin: 0 0 48px; border-radius: 8px;
61
+ background: #252a26; color: #f6f0e5;
62
+ box-shadow: var(--shadow);
63
+ }
64
+ .hero-art::before, .hero-art::after {
65
+ content: ""; position: absolute; border: 1px solid rgba(245,240,231,.16);
66
+ border-radius: 50%; width: 360px; height: 360px; right: 9%; top: -52px;
67
+ }
68
+ .hero-art::after { width: 260px; height: 260px; right: 14%; top: -2px; }
69
+ .hero-copy { position: relative; z-index: 2; padding: 38px 42px; max-width: 510px; }
70
+ .hero-copy small { color: #d9a18f; font: 12px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
71
+ .hero-copy h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.25; margin: 14px 0; }
72
+ .hero-copy p { color: #d1d0c5; margin: 0; max-width: 410px; font-size: 16px; }
73
+ .orbit { position: absolute; right: 20%; top: 44%; width: 12px; height: 12px; border-radius: 50%; background: #d9785f; box-shadow: 0 0 24px #d9785f; animation: orbit 8s linear infinite; transform-origin: 0 0; }
74
+ @keyframes orbit { from { transform: rotate(0deg) translateX(145px) rotate(0deg); } to { transform: rotate(360deg) translateX(145px) rotate(-360deg); } }
75
+ article section { margin: 55px 0; }
76
+ h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.3; letter-spacing: -.035em; margin: 0 0 20px; }
77
+ h3 { font-size: 1.2rem; margin: 0 0 10px; }
78
+ p { margin: 0 0 19px; }
79
+ .lead { font-family: "Merriweather", Georgia, serif; font-size: 1.08rem; line-height: 1.9; }
80
+ .note {
81
+ border-left: 3px solid var(--red); padding: 16px 20px;
82
+ margin: 26px 0; background: rgba(255,253,248,.72);
83
+ color: #575347; font-size: 16px;
84
+ }
85
+ .metrics {
86
+ display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
87
+ margin: 28px 0;
88
+ }
89
+ .metric {
90
+ background: var(--card); border: 1px solid var(--line);
91
+ border-radius: 7px; padding: 18px 16px; box-shadow: 0 5px 16px rgba(53,43,29,.035);
92
+ }
93
+ .metric strong { display: block; font: 900 clamp(1.5rem, 3vw, 2.15rem) "Merriweather", Georgia, serif; color: var(--red-dark); line-height: 1.3; }
94
+ .metric span { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
95
+ .chart-card {
96
+ margin: 26px 0; padding: 24px; background: var(--card);
97
+ border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
98
+ }
99
+ .chart-title { display: flex; justify-content: space-between; gap: 15px; align-items: baseline; margin-bottom: 18px; }
100
+ .chart-title h3 { margin: 0; }
101
+ .chart-title small { color: var(--muted); font: 11px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
102
+ .bar-row { display: grid; grid-template-columns: 170px 1fr 64px; gap: 12px; align-items: center; margin: 17px 0; font-size: 14px; }
103
+ .bar-label { color: #514d43; }
104
+ .bar-track { height: 12px; background: #ece6db; border-radius: 20px; overflow: hidden; }
105
+ .bar-fill { width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
106
+ .bar-value { text-align: right; font: 500 13px "DM Mono", monospace; }
107
+ .chart-foot { color: var(--muted); font-size: 13px; margin: 20px 0 0; }
108
+ .code-quote {
109
+ margin: 25px 0; padding: 21px 24px; background: #292e29;
110
+ color: #e7e4d9; border-radius: 7px; font: 13px/1.8 "DM Mono", monospace;
111
+ overflow-x: auto;
112
+ }
113
+ .code-quote .dim { color: #9ca997; }
114
+ .code-quote .accent { color: #e59b83; }
115
+ .split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 25px 0; }
116
+ .info-card { padding: 22px; background: rgba(255,253,248,.8); border: 1px solid var(--line); border-radius: 7px; }
117
+ .info-card p { font-size: 15px; margin: 0; color: #625e53; }
118
+ .info-card .tag { font: 11px "DM Mono", monospace; color: var(--red-dark); text-transform: uppercase; letter-spacing: .08em; }
119
+ ul { padding-left: 23px; }
120
+ li { margin: 7px 0; }
121
+ blockquote {
122
+ margin: 34px 0; padding: 8px 0 8px 25px; border-left: 3px solid var(--red);
123
+ font-size: 1.3rem; line-height: 1.65; color: #555044;
124
+ }
125
+ footer {
126
+ margin-top: 75px; padding-top: 24px; border-top: 1px solid var(--line);
127
+ color: var(--muted); font-size: 14px;
128
+ }
129
+ .footer-tags { font: 12px "DM Mono", monospace; color: var(--red-dark); margin-top: 15px; }
130
+ .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
131
+ .reveal.visible { opacity: 1; transform: translateY(0); }
132
+ @media (max-width: 650px) {
133
+ main { padding: 42px 20px 70px; }
134
+ .hero-copy { padding: 30px 25px; }
135
+ .metrics { grid-template-columns: 1fr; }
136
+ .metric { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
137
+ .metric span { text-align: right; }
138
+ .bar-row { grid-template-columns: 1fr 55px; gap: 7px 12px; }
139
+ .bar-label { grid-column: 1 / -1; }
140
+ .bar-track { grid-column: 1; }
141
+ .bar-value { grid-column: 2; grid-row: 2; }
142
+ .split { grid-template-columns: 1fr; }
143
+ .chart-card { padding: 18px; }
144
+ }
145
+ @media (prefers-reduced-motion: reduce) {
146
+ *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
147
+ }
148
+ </style>
149
+ </head>
150
+ <body>
151
+ <main>
152
+ <article class="article">
153
+ <div class="eyebrow">Python · Machine learning · Experiments</div>
154
+ <h1>Experimenting with Poe's Python Interpreter</h1>
155
+ <p class="dek">A tiny interpreter, a handful of neural networks, one very confused Markov chain, and a surprisingly affordable price tag.</p>
156
+ <div class="byline">
157
+ <span>By an overly curious tinkerer</span><span class="dot"></span>
158
+ <span>Experiment notes</span><span class="dot"></span>
159
+ <span>Updated with timeout test</span>
160
+ </div>
161
+
162
+ <div class="hero-art">
163
+ <div class="hero-copy">
164
+ <small>Field notes / 001</small>
165
+ <h2>How much can you do with a Python box?</h2>
166
+ <p>I found a little Python interpreter on Poe and, naturally, started throwing machine-learning experiments at it.</p>
167
+ </div>
168
+ <div class="orbit"></div>
169
+ </div>
170
+
171
+ <section class="reveal">
172
+ <p class="lead">I recently discovered <strong>Python</strong>, (they really could've thought of a better name) a Python interpreter bot on Poe by the official @poe account, and decided to see how much I could actually do with its environment.</p>
173
+ <p>I ended up going down a pretty interesting rabbit hole.</p>
174
+ <p>Using Python 3.11 and PyTorch, I ran several experiments entirely inside the interpreter, without needing to set up my own Python environment.</p>
175
+ </section>
176
+
177
+ <section class="reveal">
178
+ <h2>Machine Learning Libraries</h2>
179
+ <p>The bot's description advertises several preinstalled libraries, including:</p>
180
+ <ul>
181
+ <li><strong>PyTorch:</strong> Neural networks and deep learning.</li>
182
+ <li><strong>TensorFlow:</strong> Another major deep learning framework.</li>
183
+ <li><strong>scikit-learn:</strong> Traditional machine learning.</li>
184
+ <li><strong>NumPy and SciPy:</strong> Numerical computing and scientific operations.</li>
185
+ <li><strong>Pandas:</strong> Working with datasets.</li>
186
+ </ul>
187
+ <p>There are also around 150 other commonly used Python libraries advertised. (but it doesn't list which ones specifically)</p>
188
+ <div class="note"><strong>One issue:</strong> TensorFlow was listed in the description, but it just.. didn't work.</div>
189
+ </section>
190
+
191
+ <section class="reveal">
192
+ <h2>Neural Network Experiments</h2>
193
+ <p>I trained a small neural network to classify different datasets. Here's how it performed on completely separate test examples:</p>
194
+ <div class="metrics">
195
+ <div class="metric"><strong data-count="99.68">0%</strong><span>Quadrant classification</span></div>
196
+ <div class="metric"><strong data-count="100">0%</strong><span>Interleaving spirals</span></div>
197
+ <div class="metric"><strong data-count="99">0%</strong><span>Noisy spirals</span></div>
198
+ </div>
199
+ <div class="chart-card">
200
+ <div class="chart-title"><h3>Unseen test accuracy</h3><small>Measured results</small></div>
201
+ <div class="bar-row"><span class="bar-label">Quadrant classification</span><div class="bar-track"><div class="bar-fill" data-width="99.68"></div></div><span class="bar-value">99.68%</span></div>
202
+ <div class="bar-row"><span class="bar-label">Interleaving spirals</span><div class="bar-track"><div class="bar-fill" data-width="100"></div></div><span class="bar-value">100.00%</span></div>
203
+ <div class="bar-row"><span class="bar-label">Noisy spirals</span><div class="bar-track"><div class="bar-fill" data-width="99"></div></div><span class="bar-value">99.00%</span></div>
204
+ <p class="chart-foot">Each model was evaluated on a separately generated test set. These are synthetic classification tasks, not real-world benchmarks.</p>
205
+ </div>
206
+ <p>The spiral experiment was particularly interesting. A network with only 33,666 parameters learned to distinguish two interleaving spirals, achieving 100% accuracy on 10,000 independently generated test examples.</p>
207
+ <div class="code-quote"><span class="dim"># The tiny spiral classifier</span><br>
208
+ Parameters <span class="accent">33,666</span><br>
209
+ Training examples <span class="accent">20,000</span><br>
210
+ Unseen test examples <span class="accent">10,000</span><br>
211
+ Test accuracy <span class="accent">100.00%</span>
212
+ </div>
213
+ </section>
214
+
215
+ <section class="reveal">
216
+ <h2>Markov Chain Test</h2>
217
+ <p>I also built a tiny character-level Markov chain.</p>
218
+ <p>It learned character patterns from a short training corpus and generated its own text.</p>
219
+ <p>The results were... questionable.</p>
220
+ <p>It could produce recognizable phrases, but also said things like "wantered learnings." Not exactly Shakespeare.</p>
221
+ <div class="code-quote"><span class="dim"># A small sample of its literary genius</span><br>
222
+ the robot explored internet. the little robot kept<br>
223
+ the little robot read everesting. one day the robot<br>
224
+ was full of books computer wan
225
+ </div>
226
+ </section>
227
+
228
+ <section class="reveal">
229
+ <h2>A Few Environment Discoveries</h2>
230
+ <p>I investigated the interpreter's environment and found:</p>
231
+ <div class="split">
232
+ <div class="info-card"><div class="tag">Runtime</div><h3>Python 3.11.18</h3><p>PyTorch 2.0.1, along with NumPy, SciPy, scikit-learn, pandas, and other advertised libraries.</p></div>
233
+ <div class="info-card"><div class="tag">Compute</div><h3>17 logical CPUs</h3><p>Visible to Python, with approximately 1.76 GiB of visible system memory.</p></div>
234
+ <div class="info-card"><div class="tag">Graphics</div><h3>No CUDA GPU</h3><p>PyTorch was installed with CUDA support, but no GPU was accessible to the runtime.</p></div>
235
+ <div class="info-card"><div class="tag">Networking</div><h3>Restricted access</h3><p>Standard outbound DNS and internet access were largely unavailable in my tests.</p></div>
236
+ </div>
237
+ <p>I also ran CPU benchmarks and got some surprisingly fast matrix multiplication results.</p>
238
+ </section>
239
+
240
+ <section class="reveal">
241
+ <h2>The Pricing</h2>
242
+ <div class="metrics" style="grid-template-columns:1fr 1fr">
243
+ <div class="metric"><strong>$0.000030</strong><span>Per script execution (1 Poe point)</span></div>
244
+ <div class="metric"><strong>60 sec</strong><span>Execution timeout</span></div>
245
+ </div>
246
+ <p>Here's another interesting detail: it's only <strong>$0.000030 per script execution, or 1 Poe point</strong>.</p>
247
+ <p>That's incredibly inexpensive for experimenting with Python, especially when you consider that you can use libraries like PyTorch without setting up your own environment.</p>
248
+ <p>The interpreter has a <strong>60-second execution timeout</strong>. Any script that runs longer than that gets terminated. Resource limits are another thing worth investigating.</p>
249
+ <div class="note">Each script execution costs 1 Poe point ($0.000030). The execution timeout is 60 seconds.</div>
250
+ </section>
251
+
252
+ <section class="reveal">
253
+ <h2>What's Next?</h2>
254
+ <p>I want to take this further by building a tiny neural language model, eventually experimenting with a miniature Transformer architecture.</p>
255
+ <blockquote>It's been a fun reminder that you don't necessarily need a dedicated machine-learning workstation to start experimenting with neural networks.</blockquote>
256
+ <p>Sometimes all you need is a Python interpreter and an insane amount of curiosity.</p>
257
+ </section>
258
+
259
+ <footer>
260
+ <div>Independent experiment notes. Not affiliated with or endorsed by Poe.</div>
261
+ <div class="footer-tags">#MachineLearning &nbsp; #PyTorch &nbsp; #Python &nbsp; #AI &nbsp; #HuggingFace</div>
262
+ </footer>
263
+ </article>
264
+ </main>
265
+
266
+ <script>
267
+ const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
268
+
269
+ const revealObserver = new IntersectionObserver((entries) => {
270
+ entries.forEach(entry => {
271
+ if (entry.isIntersecting) {
272
+ entry.target.classList.add("visible");
273
+ revealObserver.unobserve(entry.target);
274
+ }
275
+ });
276
+ }, { threshold: 0.12 });
277
+
278
+ document.querySelectorAll(".reveal").forEach(el => revealObserver.observe(el));
279
+
280
+ const chartObserver = new IntersectionObserver((entries) => {
281
+ entries.forEach(entry => {
282
+ if (entry.isIntersecting) {
283
+ document.querySelectorAll(".bar-fill").forEach(bar => {
284
+ bar.style.width = bar.dataset.width + "%";
285
+ });
286
+ document.querySelectorAll("[data-count]").forEach(node => {
287
+ const target = Number(node.dataset.count);
288
+ if (reduceMotion) {
289
+ node.textContent = target.toFixed(2) + "%";
290
+ return;
291
+ }
292
+ const start = performance.now();
293
+ const duration = 1100;
294
+ function tick(now) {
295
+ const progress = Math.min((now - start) / duration, 1);
296
+ const eased = 1 - Math.pow(1 - progress, 3);
297
+ node.textContent = (target * eased).toFixed(2) + "%";
298
+ if (progress < 1) requestAnimationFrame(tick);
299
+ }
300
+ requestAnimationFrame(tick);
301
+ });
302
+ chartObserver.disconnect();
303
+ }
304
+ });
305
+ }, { threshold: 0.35 });
306
+
307
+ const metrics = document.querySelector(".metrics");
308
+ if (metrics) chartObserver.observe(metrics);
309
+ </script>
310
+ </body>
311
+ </html>