mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 03:04:28 +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
|
||||
Loading…
Add table
Add a link
Reference in a new issue