ubuntu2404
=>PYTHONTEX#py#default#default#0#code#####32#
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('Agg')
import os
# Ensure assets directory exists
os.makedirs('assets', exist_ok=True)
# Simple calculation
x = np.linspace(0, 2*np.pi, 50)
y = np.sin(x)
print("Simple calculation completed")
print(f"Generated {len(x)} data points")
# Simple plot
fig, ax = plt.subplots(figsize=(8, 6))
ax.plot(x, y, 'b-', linewidth=2, label='sin(x)')
ax.set_xlabel('x')
ax.set_ylabel('sin(x)')
ax.set_title('Simple Sine Wave')
ax.legend()
ax.grid(True, alpha=0.3)
try:
plt.savefig('assets/simple_test.pdf', dpi=300, bbox_inches='tight')
print("Test plot saved successfully")
except Exception as e:
print(f"Warning: Could not save plot: {e}")
plt.close()
=>PYTHONTEX:SETTINGS#
version=0.18
outputdir=pythontex-files-main_minimal
workingdir=.
workingdirset=false
gobble=none
rerun=default
hashdependencies=default
makestderr=false
stderrfilename=full
keeptemps=none
pyfuture=default
pyconfuture=none
pygments=true
pygglobal=:GLOBAL||
fvextfile=-1
pyconbanner=none
pyconfilename=stdin
depythontex=false
pygfamily=py|python3|
pygfamily=pycon|pycon|
pygfamily=sympy|python3|
pygfamily=sympycon|pycon|
pygfamily=pylab|python3|
pygfamily=pylabcon|pycon|