为您找到相关结果560,724个
python 用matplotlib绘制折线图详情_python_脚本之家
y_view = [random.randint(50,200) for i in range(30)]展示10月份数据折线图: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 import matplotlib.pyplot as plt import random plt.rcParams["font.sans-serif"]=['SimHei'] plt.rcParams["axes.unicode_minus"]=False x_data ...
www.jb51.net/article/2308...htm 2025-4-11
基于keras中的回调函数用法说明_python_脚本之家
model.fit(train_set_x, train_set_y, validation_split=0.1, nb_epoch=200, batch_size=256, callbacks=[lrate]) 如何记录每一次epoch的训练/验证损失/准确度? Model.fit函数会返回一个 History 回调,该回调有一个属性history包含一个封装有连续损失/准确的lists。代码如下: hist = model.fit(X, y,valida...
www.jb51.net/article/1888...htm 2025-4-20
PHP验证码类代码( 最新修改,完全定制化! )_php技巧_脚本之家
function get_y () { if ($this->ext_rand_y) $this->y = rand(5, $this->im_height/5); else $this->y = $this->im_height / 4 ; } // 获得随机色 function get_randcolor () { $this->randcolor = imagecolorallocate($this->im,rand(0,100),rand(0,150),rand(0,200)); ...
www.jb51.net/article/255...htm 2025-4-4
Python实现生命游戏的示例代码(tkinter版)_python_脚本之家
tButton3.place(x=bX, y=bY+dY*3 ,width=120,height=40) tCanvas = tk.Canvas(win, width=200, height=45) tCanvas.place(x=800,y=716) tVisit = tCanvas.create_text((88, 22), text=u"点此访问Hann's CSDN主页!") tCanvas.itemconfig(tVisit, fill='blue', tags=('btnText')) tCanvas...
www.jb51.net/article/2580...htm 2025-4-18
php验证码实现代码(3种)_php实例_脚本之家
imagestring($image,$fontsize,$x,$y,$fontcontent,$fontcolor); } //10>存到session $_SESSION['authcode'] = $captcha_code; //8>增加干扰元素,设置雪花点 for($i=0;$i<200;$i++){ //设置点的颜色,50-200颜色比数字浅,不干扰阅读 $pointcolor = imagecolorallocate($image,rand(50,200), rand...
www.jb51.net/article/719...htm 2025-4-20