I know it’s weird, but I’m watching tv with commercials tonight, and for some reason I’m really craving corn on the cob next weekend. #pavlovianResponse #subliminal #NeuralProgramming
#pavlovianresponse #subliminal #neuralprogramming
fgntfg [01.03.2023 22:28]
Где ежи откладывают яйца?
ChatGPT [01.03.2023 22:28]
Ежи откладывают яйца в норы, проходы и другие укрытия.
fgntfg [01.03.2023 22:28]
Напиши код, на питоне, для откладывания яиц ежом
ChatGPT [01.03.2023 22:29]
def lay_eggs(nest):
eggs = 0
while eggs < 10:
eggs += 1
nest.append(eggs)
return nest
nest = []
lay_eggs(nest)
print(nest)
fgntfg [01.03.2023 22:29]
Добавь к коду визуализацию, желательно 3D и со звуками диких ежей.
ChatGPT [01.03.2023 22:29]
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import animation
import numpy as np
import sounddevice as sd
from scipy.io.wavfile import read
# инициализация настроек для визуализации
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.set_xlim(-2, 2)
ax.set_ylim(-2, 2)
ax.set_zlim(-2, 2)
ax.set_facecolor('xkcd:salmon')
# создание массива для хранения яиц
nest = []
# процесс ложения яиц
def lay_eggs():
eggs = 0
while eggs < 10:
eggs += 1
nest.append(eggs)
# отрисовка яиц на 3D-графике
for egg in nest:
x = np.random.uniform(-1, 1)
y = np.random.uniform(-1, 1)
z = np.random.uniform(-1, 1)
ax.scatter(x, y, z, color='white', s=50)
return nest
# проигрывание звука дикого ежа
fs, data = read('hedgehog_sound.wav')
sd.play(data, fs)
sd.wait()
# анимация ложения яиц
animation = animation.FuncAnimation(fig, lay_eggs, interval=1000)
plt.show()
#neuralprogramming
Запустил код, который мне ChatGPT нагенерила. Интересно, что получится.