Spaces:
Running
Running
File size: 16,222 Bytes
66a2f66 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#f5f0e7">
<title>Experimenting with Poe's Python Interpreter</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<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">
<style>
:root {
--paper: #f5f0e7;
--paper-deep: #ebe3d6;
--ink: #292821;
--muted: #777366;
--red: #b94d38;
--red-dark: #913a2b;
--green: #526b55;
--line: #d9d0c2;
--card: #fffdf8;
--shadow: 0 12px 35px rgba(53, 43, 29, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
background:
radial-gradient(ellipse at 12% 3%, rgba(185,77,56,.055), transparent 28rem),
var(--paper);
color: var(--ink);
font-family: "Source Sans 3", sans-serif;
font-size: 18px;
line-height: 1.72;
}
a { color: var(--red-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
main { max-width: 1120px; margin: 0 auto; padding: 62px 30px 100px; }
.article { max-width: 790px; margin: 0 auto; }
.eyebrow {
display: flex; gap: 12px; align-items: center;
color: var(--red-dark); font: 500 12px "DM Mono", monospace;
letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--red); }
h1, h2, h3, blockquote { font-family: "Merriweather", Georgia, serif; }
h1 {
font-size: clamp(2.45rem, 6vw, 4.7rem);
line-height: 1.14; letter-spacing: -.055em;
margin: 22px 0 22px; max-width: 850px;
}
.dek { font: 400 clamp(1.1rem, 2.5vw, 1.35rem)/1.65 "Merriweather", Georgia, serif; color: #615d52; max-width: 690px; }
.byline {
display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
margin: 30px 0 36px; color: var(--muted); font-size: 14px;
}
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: #aaa08f; }
.hero-art {
position: relative; overflow: hidden; min-height: 270px;
margin: 0 0 48px; border-radius: 8px;
background: #252a26; color: #f6f0e5;
box-shadow: var(--shadow);
}
.hero-art::before, .hero-art::after {
content: ""; position: absolute; border: 1px solid rgba(245,240,231,.16);
border-radius: 50%; width: 360px; height: 360px; right: 9%; top: -52px;
}
.hero-art::after { width: 260px; height: 260px; right: 14%; top: -2px; }
.hero-copy { position: relative; z-index: 2; padding: 38px 42px; max-width: 510px; }
.hero-copy small { color: #d9a18f; font: 12px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.hero-copy h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.25; margin: 14px 0; }
.hero-copy p { color: #d1d0c5; margin: 0; max-width: 410px; font-size: 16px; }
.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; }
@keyframes orbit { from { transform: rotate(0deg) translateX(145px) rotate(0deg); } to { transform: rotate(360deg) translateX(145px) rotate(-360deg); } }
article section { margin: 55px 0; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.3; letter-spacing: -.035em; margin: 0 0 20px; }
h3 { font-size: 1.2rem; margin: 0 0 10px; }
p { margin: 0 0 19px; }
.lead { font-family: "Merriweather", Georgia, serif; font-size: 1.08rem; line-height: 1.9; }
.note {
border-left: 3px solid var(--red); padding: 16px 20px;
margin: 26px 0; background: rgba(255,253,248,.72);
color: #575347; font-size: 16px;
}
.metrics {
display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
margin: 28px 0;
}
.metric {
background: var(--card); border: 1px solid var(--line);
border-radius: 7px; padding: 18px 16px; box-shadow: 0 5px 16px rgba(53,43,29,.035);
}
.metric strong { display: block; font: 900 clamp(1.5rem, 3vw, 2.15rem) "Merriweather", Georgia, serif; color: var(--red-dark); line-height: 1.3; }
.metric span { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.chart-card {
margin: 26px 0; padding: 24px; background: var(--card);
border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.chart-title { display: flex; justify-content: space-between; gap: 15px; align-items: baseline; margin-bottom: 18px; }
.chart-title h3 { margin: 0; }
.chart-title small { color: var(--muted); font: 11px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 64px; gap: 12px; align-items: center; margin: 17px 0; font-size: 14px; }
.bar-label { color: #514d43; }
.bar-track { height: 12px; background: #ece6db; border-radius: 20px; overflow: hidden; }
.bar-fill { width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.bar-value { text-align: right; font: 500 13px "DM Mono", monospace; }
.chart-foot { color: var(--muted); font-size: 13px; margin: 20px 0 0; }
.code-quote {
margin: 25px 0; padding: 21px 24px; background: #292e29;
color: #e7e4d9; border-radius: 7px; font: 13px/1.8 "DM Mono", monospace;
overflow-x: auto;
}
.code-quote .dim { color: #9ca997; }
.code-quote .accent { color: #e59b83; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 25px 0; }
.info-card { padding: 22px; background: rgba(255,253,248,.8); border: 1px solid var(--line); border-radius: 7px; }
.info-card p { font-size: 15px; margin: 0; color: #625e53; }
.info-card .tag { font: 11px "DM Mono", monospace; color: var(--red-dark); text-transform: uppercase; letter-spacing: .08em; }
ul { padding-left: 23px; }
li { margin: 7px 0; }
blockquote {
margin: 34px 0; padding: 8px 0 8px 25px; border-left: 3px solid var(--red);
font-size: 1.3rem; line-height: 1.65; color: #555044;
}
footer {
margin-top: 75px; padding-top: 24px; border-top: 1px solid var(--line);
color: var(--muted); font-size: 14px;
}
.footer-tags { font: 12px "DM Mono", monospace; color: var(--red-dark); margin-top: 15px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (max-width: 650px) {
main { padding: 42px 20px 70px; }
.hero-copy { padding: 30px 25px; }
.metrics { grid-template-columns: 1fr; }
.metric { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.metric span { text-align: right; }
.bar-row { grid-template-columns: 1fr 55px; gap: 7px 12px; }
.bar-label { grid-column: 1 / -1; }
.bar-track { grid-column: 1; }
.bar-value { grid-column: 2; grid-row: 2; }
.split { grid-template-columns: 1fr; }
.chart-card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
</style>
</head>
<body>
<main>
<article class="article">
<div class="eyebrow">Python · Machine learning · Experiments</div>
<h1>Experimenting with Poe's Python Interpreter</h1>
<p class="dek">A tiny interpreter, a handful of neural networks, one very confused Markov chain, and a surprisingly affordable price tag.</p>
<div class="byline">
<span>By an overly curious tinkerer</span><span class="dot"></span>
<span>Experiment notes</span><span class="dot"></span>
<span>Updated with timeout test</span>
</div>
<div class="hero-art">
<div class="hero-copy">
<small>Field notes / 001</small>
<h2>How much can you do with a Python box?</h2>
<p>I found a little Python interpreter on Poe and, naturally, started throwing machine-learning experiments at it.</p>
</div>
<div class="orbit"></div>
</div>
<section class="reveal">
<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>
<p>I ended up going down a pretty interesting rabbit hole.</p>
<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>
</section>
<section class="reveal">
<h2>Machine Learning Libraries</h2>
<p>The bot's description advertises several preinstalled libraries, including:</p>
<ul>
<li><strong>PyTorch:</strong> Neural networks and deep learning.</li>
<li><strong>TensorFlow:</strong> Another major deep learning framework.</li>
<li><strong>scikit-learn:</strong> Traditional machine learning.</li>
<li><strong>NumPy and SciPy:</strong> Numerical computing and scientific operations.</li>
<li><strong>Pandas:</strong> Working with datasets.</li>
</ul>
<p>There are also around 150 other commonly used Python libraries advertised. (but it doesn't list which ones specifically)</p>
<div class="note"><strong>One issue:</strong> TensorFlow was listed in the description, but it just.. didn't work.</div>
</section>
<section class="reveal">
<h2>Neural Network Experiments</h2>
<p>I trained a small neural network to classify different datasets. Here's how it performed on completely separate test examples:</p>
<div class="metrics">
<div class="metric"><strong data-count="99.68">0%</strong><span>Quadrant classification</span></div>
<div class="metric"><strong data-count="100">0%</strong><span>Interleaving spirals</span></div>
<div class="metric"><strong data-count="99">0%</strong><span>Noisy spirals</span></div>
</div>
<div class="chart-card">
<div class="chart-title"><h3>Unseen test accuracy</h3><small>Measured results</small></div>
<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>
<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>
<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>
<p class="chart-foot">Each model was evaluated on a separately generated test set. These are synthetic classification tasks, not real-world benchmarks.</p>
</div>
<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>
<div class="code-quote"><span class="dim"># The tiny spiral classifier</span><br>
Parameters <span class="accent">33,666</span><br>
Training examples <span class="accent">20,000</span><br>
Unseen test examples <span class="accent">10,000</span><br>
Test accuracy <span class="accent">100.00%</span>
</div>
</section>
<section class="reveal">
<h2>Markov Chain Test</h2>
<p>I also built a tiny character-level Markov chain.</p>
<p>It learned character patterns from a short training corpus and generated its own text.</p>
<p>The results were... questionable.</p>
<p>It could produce recognizable phrases, but also said things like "wantered learnings." Not exactly Shakespeare.</p>
<div class="code-quote"><span class="dim"># A small sample of its literary genius</span><br>
the robot explored internet. the little robot kept<br>
the little robot read everesting. one day the robot<br>
was full of books computer wan
</div>
</section>
<section class="reveal">
<h2>A Few Environment Discoveries</h2>
<p>I investigated the interpreter's environment and found:</p>
<div class="split">
<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>
<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>
<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>
<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>
</div>
<p>I also ran CPU benchmarks and got some surprisingly fast matrix multiplication results.</p>
</section>
<section class="reveal">
<h2>The Pricing</h2>
<div class="metrics" style="grid-template-columns:1fr 1fr">
<div class="metric"><strong>$0.000030</strong><span>Per script execution (1 Poe point)</span></div>
<div class="metric"><strong>60 sec</strong><span>Execution timeout</span></div>
</div>
<p>Here's another interesting detail: it's only <strong>$0.000030 per script execution, or 1 Poe point</strong>.</p>
<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>
<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>
<div class="note">Each script execution costs 1 Poe point ($0.000030). The execution timeout is 60 seconds.</div>
</section>
<section class="reveal">
<h2>What's Next?</h2>
<p>I want to take this further by building a tiny neural language model, eventually experimenting with a miniature Transformer architecture.</p>
<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>
<p>Sometimes all you need is a Python interpreter and an insane amount of curiosity.</p>
</section>
<footer>
<div>Independent experiment notes. Not affiliated with or endorsed by Poe.</div>
<div class="footer-tags">#MachineLearning #PyTorch #Python #AI #HuggingFace</div>
</footer>
</article>
</main>
<script>
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const revealObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add("visible");
revealObserver.unobserve(entry.target);
}
});
}, { threshold: 0.12 });
document.querySelectorAll(".reveal").forEach(el => revealObserver.observe(el));
const chartObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
document.querySelectorAll(".bar-fill").forEach(bar => {
bar.style.width = bar.dataset.width + "%";
});
document.querySelectorAll("[data-count]").forEach(node => {
const target = Number(node.dataset.count);
if (reduceMotion) {
node.textContent = target.toFixed(2) + "%";
return;
}
const start = performance.now();
const duration = 1100;
function tick(now) {
const progress = Math.min((now - start) / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
node.textContent = (target * eased).toFixed(2) + "%";
if (progress < 1) requestAnimationFrame(tick);
}
requestAnimationFrame(tick);
});
chartObserver.disconnect();
}
});
}, { threshold: 0.35 });
const metrics = document.querySelector(".metrics");
if (metrics) chartObserver.observe(metrics);
</script>
</body>
</html>
|