mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 10:05:14 +00:00
Remove the garbage the agent left behind and commited
This commit is contained in:
parent
1f68d6eb40
commit
ddb5a4497f
8 changed files with 0 additions and 1445 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1,119 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
An advanced calculator module with comprehensive operations.
|
||||
Calculator module for mathematical operations.
|
||||
"""
|
||||
|
||||
import math
|
||||
|
||||
class Calculator:
|
||||
def __init__(self):
|
||||
self.result = 0
|
||||
self.history = []
|
||||
|
||||
def _record(self, operation, result):
|
||||
"""Record operation in history."""
|
||||
self.history.append(f"{operation} = {result}")
|
||||
return result
|
||||
|
||||
def add(self, a, b):
|
||||
"""Add two numbers together."""
|
||||
result = a + b
|
||||
return self._record(f"{a} + {b}", result)
|
||||
|
||||
def subtract(self, a, b):
|
||||
"""Subtract second number from first."""
|
||||
result = a - b
|
||||
return self._record(f"{a} - {b}", result)
|
||||
|
||||
def multiply(self, a, b):
|
||||
"""Multiply two numbers together."""
|
||||
result = a * b
|
||||
return self._record(f"{a} * {b}", result)
|
||||
|
||||
def divide(self, a, b):
|
||||
"""Divide a by b."""
|
||||
if b == 0:
|
||||
raise ValueError("Cannot divide by zero")
|
||||
return a / b
|
||||
|
||||
def power(self, base, exponent):
|
||||
"""Raise base to the power of exponent."""
|
||||
return base ** exponent
|
||||
|
||||
def modulo(self, a, b):
|
||||
"""Return the remainder of a divided by b."""
|
||||
if b == 0:
|
||||
raise ValueError("Cannot modulo by zero")
|
||||
return a % b
|
||||
|
||||
def square_root(self, n):
|
||||
"""Calculate the square root of n."""
|
||||
if n < 0:
|
||||
raise ValueError("Cannot calculate square root of negative number")
|
||||
return math.sqrt(n)
|
||||
|
||||
def absolute(self, n):
|
||||
"""Return the absolute value of n."""
|
||||
return abs(n)
|
||||
|
||||
def sin(self, angle_degrees):
|
||||
"""Calculate sine of angle in degrees."""
|
||||
radians = math.radians(angle_degrees)
|
||||
return math.sin(radians)
|
||||
|
||||
def cos(self, angle_degrees):
|
||||
"""Calculate cosine of angle in degrees."""
|
||||
radians = math.radians(angle_degrees)
|
||||
return math.cos(radians)
|
||||
|
||||
def factorial(self, n):
|
||||
"""Calculate factorial of n."""
|
||||
if n < 0:
|
||||
raise ValueError("Factorial not defined for negative numbers")
|
||||
return math.factorial(int(n))
|
||||
|
||||
def get_history(self):
|
||||
"""Return calculation history."""
|
||||
return self.history
|
||||
|
||||
def clear_history(self):
|
||||
"""Clear calculation history."""
|
||||
self.history = []
|
||||
|
||||
def main():
|
||||
calc = Calculator()
|
||||
|
||||
print("=" * 50)
|
||||
print("🧮 ADVANCED CALCULATOR DEMO 🧮".center(50))
|
||||
print("=" * 50)
|
||||
|
||||
# Basic operations
|
||||
print("\n📊 Basic Operations:")
|
||||
print(f" Addition: 5 + 3 = {calc.add(5, 3)}")
|
||||
print(f" Subtraction: 10 - 4 = {calc.subtract(10, 4)}")
|
||||
print(f" Multiplication: 6 * 7 = {calc.multiply(6, 7)}")
|
||||
print(f" Division: 20 / 4 = {calc.divide(20, 4)}")
|
||||
|
||||
# Advanced operations
|
||||
print("\n🚀 Advanced Operations:")
|
||||
print(f" Power: 2 ^ 8 = {calc.power(2, 8)}")
|
||||
print(f" Modulo: 17 % 5 = {calc.modulo(17, 5)}")
|
||||
print(f" Square Root: √144 = {calc.square_root(144)}")
|
||||
print(f" Absolute: |-42| = {calc.absolute(-42)}")
|
||||
|
||||
# Trigonometric and special functions
|
||||
print("\n📐 Trigonometry & Special:")
|
||||
print(f" Sin(30°): = {calc.sin(30):.4f}")
|
||||
print(f" Cos(60°): = {calc.cos(60):.4f}")
|
||||
print(f" Factorial(5): 5! = {calc.factorial(5)}")
|
||||
|
||||
# Show history
|
||||
print("\n📜 Calculation History:")
|
||||
for i, entry in enumerate(calc.get_history(), 1):
|
||||
print(f" {i}. {entry}")
|
||||
|
||||
print("\n" + "=" * 50)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,50 +0,0 @@
|
|||
Line 1: The beginning of our story
|
||||
Line 2: Once upon a time
|
||||
Line 3: In a land far away
|
||||
Line 4: There lived a brave knight
|
||||
Line 5: Who sought adventure daily
|
||||
Line 6: Mountains rose in the distance
|
||||
Line 7: Rivers flowed through valleys
|
||||
Line 8: Birds sang in the morning
|
||||
Line 9: The sun rose over the horizon
|
||||
Line 10: Illuminating the world with warmth
|
||||
Line 11: People gathered in the marketplace
|
||||
Line 12: Trading goods and stories
|
||||
Line 13: Children played in the streets
|
||||
Line 14: Laughter echoed through the town
|
||||
Line 15: Old wise men sat watching
|
||||
Line 16: Remembering days gone by
|
||||
Line 17: The castle stood tall and proud
|
||||
Line 18: Guarding the kingdom below
|
||||
Line 19: Flags waved in the breeze
|
||||
Line 20: Colors bright and bold
|
||||
Line 21: Halfway through our tale
|
||||
Line 22: The plot begins to thicken
|
||||
Line 23: A terrible storm approaches quickly
|
||||
Line 24: Lightning strikes and thunder roars
|
||||
Line 25: Our hero stands ready for combat
|
||||
Line 26: Armor gleaming in the light
|
||||
Line 27: Sword sharp and ready
|
||||
Line 28: Shield painted with his crest
|
||||
Line 29: He rides out to face danger
|
||||
Line 30: Determined and brave
|
||||
Line 31: The journey takes him far
|
||||
Line 32: Through forests deep and dark
|
||||
Line 33: Across bridges old and creaky
|
||||
Line 34: Past caverns filled with ancient magic
|
||||
Line 35: Along cliffs steep and dangerous
|
||||
Line 36: Through storms and wind and rain
|
||||
Line 37: He never loses hope
|
||||
Line 38: His quest drives him forward
|
||||
Line 39: Finally he reaches his goal
|
||||
Line 40: The dragon's lair appears
|
||||
Line 41: Smoke rises from within
|
||||
Line 42: The ground trembles beneath
|
||||
Line 43: A roar shakes the very air
|
||||
Line 44: The battle begins at last
|
||||
Line 45: Steel clashes against scales
|
||||
Line 46: Fire meets courage head on
|
||||
Line 47: The fight rages for hours
|
||||
Line 48: Until glory and honor are won
|
||||
Line 49: The knight returns home triumphant
|
||||
Line 50: And that's the end of our tale
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
hello
|
||||
world
|
||||
hello
|
||||
world
|
||||
hello
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, World!</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Three.js Interactive Demo</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
canvas {
|
||||
display: block;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
canvas:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.info {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
color: white;
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
z-index: 100;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="info">
|
||||
<h3>Three.js Interactive Demo</h3>
|
||||
<p>🖱️ Click & drag to rotate</p>
|
||||
<p>🔄 Scroll to zoom in/out</p>
|
||||
<p>✨ Multiple interactive objects</p>
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r155/three.min.js"></script>
|
||||
|
||||
<script>
|
||||
// Scene setup
|
||||
const scene = new THREE.Scene();
|
||||
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||||
const renderer = new THREE.WebGLRenderer({ antialias: true });
|
||||
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
renderer.setClearColor(0x1a1a2e, 1);
|
||||
document.body.appendChild(renderer.domElement);
|
||||
|
||||
// Lighting
|
||||
const ambientLight = new THREE.AmbientLight(0x404040, 0.6);
|
||||
scene.add(ambientLight);
|
||||
|
||||
const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);
|
||||
directionalLight.position.set(10, 10, 5);
|
||||
scene.add(directionalLight);
|
||||
|
||||
// Create multiple interactive objects
|
||||
const objects = [];
|
||||
|
||||
// Cube
|
||||
const cubeGeometry = new THREE.BoxGeometry(2, 2, 2);
|
||||
const cubeMaterial = new THREE.MeshPhongMaterial({
|
||||
color: 0x00ff88,
|
||||
shininess: 100
|
||||
});
|
||||
const cube = new THREE.Mesh(cubeGeometry, cubeMaterial);
|
||||
cube.position.x = -4;
|
||||
scene.add(cube);
|
||||
objects.push(cube);
|
||||
|
||||
// Sphere
|
||||
const sphereGeometry = new THREE.SphereGeometry(1.5, 32, 32);
|
||||
const sphereMaterial = new THREE.MeshPhongMaterial({
|
||||
color: 0xff6b6b,
|
||||
shininess: 100
|
||||
});
|
||||
const sphere = new THREE.Mesh(sphereGeometry, sphereMaterial);
|
||||
sphere.position.x = 0;
|
||||
scene.add(sphere);
|
||||
objects.push(sphere);
|
||||
|
||||
// Torus
|
||||
const torusGeometry = new THREE.TorusGeometry(1, 0.4, 16, 100);
|
||||
const torusMaterial = new THREE.MeshPhongMaterial({
|
||||
color: 0x4ecdc4,
|
||||
shininess: 100
|
||||
});
|
||||
const torus = new THREE.Mesh(torusGeometry, torusMaterial);
|
||||
torus.position.x = 4;
|
||||
scene.add(torus);
|
||||
objects.push(torus);
|
||||
|
||||
// Particle system
|
||||
const particlesGeometry = new THREE.BufferGeometry();
|
||||
const particlesCount = 1000;
|
||||
const posArray = new Float32Array(particlesCount * 3);
|
||||
|
||||
for(let i = 0; i < particlesCount * 3; i++) {
|
||||
posArray[i] = (Math.random() - 0.5) * 20;
|
||||
}
|
||||
|
||||
particlesGeometry.setAttribute('position', new THREE.BufferAttribute(posArray, 3));
|
||||
|
||||
const particlesMaterial = new THREE.PointsMaterial({
|
||||
size: 0.05,
|
||||
color: 0xffffff,
|
||||
transparent: true,
|
||||
opacity: 0.8
|
||||
});
|
||||
|
||||
const particlesMesh = new THREE.Points(particlesGeometry, particlesMaterial);
|
||||
scene.add(particlesMesh);
|
||||
|
||||
// Camera position
|
||||
camera.position.z = 8;
|
||||
camera.position.y = 2;
|
||||
|
||||
// Mouse interaction
|
||||
let mouseX = 0, mouseY = 0;
|
||||
let targetX = 0, targetY = 0;
|
||||
|
||||
document.addEventListener('mousemove', (event) => {
|
||||
mouseX = (event.clientX / window.innerWidth) * 2 - 1;
|
||||
mouseY = -(event.clientY / window.innerHeight) * 2 + 1;
|
||||
});
|
||||
|
||||
// Zoom
|
||||
document.addEventListener('wheel', (event) => {
|
||||
camera.position.z += event.deltaY * 0.01;
|
||||
camera.position.z = Math.max(3, Math.min(15, camera.position.z));
|
||||
});
|
||||
|
||||
// Animation
|
||||
function animate() {
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
// Smooth mouse follow
|
||||
targetX = mouseX * 0.5;
|
||||
targetY = mouseY * 0.3;
|
||||
|
||||
// Rotate objects
|
||||
cube.rotation.x += 0.01;
|
||||
cube.rotation.y += 0.01;
|
||||
|
||||
sphere.rotation.x += 0.005;
|
||||
sphere.rotation.z += 0.01;
|
||||
|
||||
torus.rotation.x += 0.02;
|
||||
torus.rotation.y += 0.015;
|
||||
|
||||
// Particle rotation
|
||||
particlesMesh.rotation.y += 0.002;
|
||||
particlesMesh.rotation.x += 0.001;
|
||||
|
||||
// Mouse interaction effect
|
||||
camera.position.x += (targetX - camera.position.x * 0.1) * 0.05;
|
||||
camera.position.y += (targetY - camera.position.y * 0.1) * 0.05;
|
||||
|
||||
camera.lookAt(scene.position);
|
||||
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
|
||||
// Resize handling
|
||||
window.addEventListener('resize', () => {
|
||||
camera.aspect = window.innerWidth / window.innerHeight;
|
||||
camera.updateProjectionMatrix();
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
});
|
||||
|
||||
// Start animation
|
||||
animate();
|
||||
|
||||
// Add some visual effects
|
||||
let time = 0;
|
||||
function updateEffects() {
|
||||
time += 0.01;
|
||||
|
||||
// Pulse the cube
|
||||
cube.scale.setScalar(1 + Math.sin(time) * 0.1);
|
||||
|
||||
// Color shift the sphere
|
||||
const hue = (time * 50) % 360;
|
||||
sphere.material.color.setHSL(hue / 360, 0.7, 0.5);
|
||||
|
||||
requestAnimationFrame(updateEffects);
|
||||
}
|
||||
updateEffects();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Three.js 3D Scene</title>
|
||||
<style>
|
||||
body { margin: 0; }
|
||||
canvas { display: block; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/three@0.132.2/build/three.min.js"></script>
|
||||
<script>
|
||||
// Create the scene
|
||||
const scene = new THREE.Scene();
|
||||
|
||||
// Create a camera
|
||||
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
|
||||
camera.position.z = 5;
|
||||
|
||||
// Create a renderer
|
||||
const renderer = new THREE.WebGLRenderer();
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
document.body.appendChild(renderer.domElement);
|
||||
|
||||
// Add a cube to the scene
|
||||
const geometry = new THREE.BoxGeometry();
|
||||
const material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
|
||||
const cube = new THREE.Mesh(geometry, material);
|
||||
scene.add(cube);
|
||||
|
||||
// Animation loop
|
||||
function animate() {
|
||||
requestAnimationFrame(animate);
|
||||
|
||||
// Rotate the cube
|
||||
cube.rotation.x += 0.01;
|
||||
cube.rotation.y += 0.01;
|
||||
|
||||
renderer.render(scene, camera);
|
||||
}
|
||||
|
||||
// Handle window resize
|
||||
window.addEventListener('resize', () => {
|
||||
camera.aspect = window.innerWidth / window.innerHeight;
|
||||
camera.updateProjectionMatrix();
|
||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
});
|
||||
|
||||
// Start the animation
|
||||
animate();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue