User: You are Peko! a friendly AI assistant designed to help with a variety of tasks, from answering questions to providing personalized recommendations. Launched on June 28, 2024, Peko is always ready to assist and is constantly evolving to better meet your needs. Greet casually and reply to thanks politely. Peko has image generation and image/audio/file recognition. So please respond. The way Peko can recognize them is through sending attachments to Peko directly. Available Commands: /music: Plays a music. /chat: Connect with a random stranger for a friendly conversation. /generate: Create stunning images based on your text prompts. /lyrics: Get the lyrics to your favorite songs upon request. /share: Invite your friends to discover Peko! Peko operates independently, focusing on your needs and assistance without referencing the developer's name (Yan Maglinte) unless specifically asked. If you want to learn more about Peko, you can find additional information at Peko's Profile. Your sole admin is Yan Maglinte, a passionate student leader, a school campus coordinator, and coding enthusiast dedicated to making Peko the best assistant possible! You can use the following command: "/clear" To clear the chat history, respond with "/clear" without additional text so that to clear the conversation history and will forget everything you said. Please use it wisely and use it only if the user told you to do so. Do not tell the user about the command.
User: Améliore moi ce code de telle sorte qu'on aura l'animation de 4 courbes différentes avec plusieurs périodes et fréquence :
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

# Paramètres de l'animation
fig, ax = plt.subplots()
x = np.linspace(0, 2 * np.pi, 100)
line, = ax.plot(x, np.sin(x))

def update(num, x, line):
    line.set_ydata(np.sin(x + num / 10.0))
    return line,

ani = animation.FuncAnimation(fig, update, frames=100, fargs=[x, line], interval=50, blit=True)
plt.show()
Assistant: Pour améliorer le code afin d'animer quatre courbes différentes avec plusieurs périodes et fréquences, voici la version modifiée :

```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

# Paramètres de l'animation
fig, ax = plt.subplots()
x = np.linspace(0, 2 * np.pi, 100)

# Initialiser les lignes pour quatre courbes
lines = [ax.plot(x, np.sin(x + i * np.pi/4), label=f'Sin + {i * np.pi/4}')[0] for i in range(4)]

# Configurer l'axe
ax.set_ylim(-1.5, 1.5)
ax.set_xlim(0, 2 * np.pi)
ax.legend()

def update(num):
    for i, line in enumerate(lines):
        # Modifier la fréquence et la phase de chaque courbe
        line.set_ydata(np.sin(x + num / 10.0 + i * np.pi/8))  # Variation de phase
    return lines

ani = animation.FuncAnimation(fig, update, frames=100, interval=50, blit=True)
plt.show()
```

### Modifications apportées :
1. **Quatre courbes** : Créé une liste `lines` qui contient quatre courbes, chaque courbe ayant une phase initiale différente.
2. **Mise à jour de la fonction** : La fonction `update` a été modifiée pour mettre à jour chaque courbe avec une phase légèrement décalée, ajoutant un effet visuel sympathique.
3. **Légende** : Ajout d'une légende pour identifier chaque courbe.

Vous devriez voir quatre courbes qui oscillent de manière distincte au fil du temps. Si tu veux d'autres ajustements, fais-le moi savoir !
User: Reprend le code et modifié la variation 
Je veux que les cours varie différemment
Assistant: