Fork me on GitHub
摘要: #theta = theta - alpha*(theta*X-Y)*X theta = 1.0 #(alpha 阿尔法) alpha = 0.1 #100次遍历 for i in range(100): #sum/3.0表示求加权平均值 theta = theta + np.sum(alpha*( 阅读全文
posted @ 2021-01-22 18:00 君乐豹 阅读(537) 评论(0) 推荐(0) 编辑
摘要: 1、Layer用js方式定义表单ID列数据,加了个排序的字段sort:true2、结果提示:TypeError n.sort is not a function 3、源代码: ,{field: 'id', width: 80, title: 'ID', sort: true} 4、原因: 你返回的J 阅读全文
posted @ 2021-01-22 17:51 君乐豹 阅读(780) 评论(0) 推荐(0) 编辑
摘要: hello~大家新年好,已经好久没有更博了,刚刚在运行python文件的时候竟然报SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: tr这个错误,其实引起这个错误的原因就是转义 阅读全文
posted @ 2021-01-22 17:48 君乐豹 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 1、问题描述:有时候输出的json,list,等其他格式的数据打印出来数据量很大的情况下很难复制出来。 2、解决思路:print函数里有重定向参数,可以将需要打印的内容,打印到指定的文件中保存下来。一,打开一个文件,二,将内容保存到此文件中。 3、实例: K = 30 # 一,打开一个文件,文件对象 阅读全文
posted @ 2021-01-22 17:43 君乐豹 阅读(755) 评论(0) 推荐(0) 编辑
Live2D