首页 文章 精选 留言 我的

精选列表

搜索[代码补全],共10049篇文章
优秀的个人博客,低调大师

【代码审计】Tmall(迷你天猫商城)代码审计

迷你天猫商城:一个适用于学生党的毕业设计参考项目,基于Spring Boot的综合性B2C电商平台,需求设计主要参考天猫商城的购物流程:用户从注册开始,到完成登录,浏览商品,加入购物车,进行下单,确认收货,评价等一系列操作。 作为迷你天猫商城的核心组成部分之一,天猫数据管理后台包含商品管理,订单管理,类别管理,用户管理和交易额统计等模块,实现了对整个商城的一站式管理和维护。

优秀的个人博客,低调大师

83行代码

使用SARIMAX进行时间序列预测。 #!/usr/bin/env python #-*-coding:utf-8-*- #****************************************************************************** #****************Description:Time Series prediction using SARIMAX #****************Author:Duan Tingyin #****************Date:2018.02.14 #************************************************** import pandas as pd import matplotlib.pyplot as plt import datetime from statsmodels.tsa.api import SARIMAX datapath = '../data/' train_df = pd.read_csv(datapath+'[new] yancheng_train_20171226.csv') testA_df = pd.read_csv(datapath+'yancheng_testA_20171225.csv') testB_df = pd.read_csv(datapath+'yancheng_testB_20180224.csv') train_class = train_df.groupby(['sale_date','class_id'])['sale_quantity'].sum().to_frame().reset_index() train_class.head() def plt_class(data,x,y,class_id): this_class_id=data[data.class_id == class_id] plt.scatter(x=this_class_id[x],y=this_class_id[y]) def trans_date(x): str_x=str(x) year=int(str_x[:4]) month=int(str_x[4:]) return datetime.date(year,month,1) train_class['_sale_date']=train_class['sale_date'].apply(trans_date) testA_df['_sale_date']=testA_df['predict_date'].apply(trans_date) testB_df['_sale_date']=testB_df['predict_date'].apply(trans_date) #print(train_class.head(),testA_df.head(),testB_df.head()) s="predict_date,class_id,predict_quantity" ex=[] f=open("../data/yancheng_testA_20171225.csv","r") for line in f.readlines(): if "date" in line: continue class_id=int(line.split(",")[1]) this_class_id=train_class[train_class['class_id']==class_id][['_sale_date','sale_quantity']] if class_id==653436: print(this_class_id._sale_date) #indexed_this_class_id = this_class_id.set_index(this_class_id['_sale_date']) indexed_this_class_id=this_class_id.set_index(pd.date_range(end='2017-11',periods=len(this_class_id['_sale_date']),freq='M')) print(this_class_id['_sale_date'],pd.date_range(end='2017-11',periods=len(this_class_id['_sale_date']),freq='M')) res=0 try: fit1=SARIMAX(indexed_this_class_id.sale_quantity,verbose=False).fit() pre=fit1.get_forecast().conf_int() res=(int(round((pre['lower sale_quantity'] + pre['upper sale_quantity'])*0.5))) except Exception as e: print(e) ex.append(class_id) plt_class(train_class,'sale_date','sale_quantity',class_id) res=int(this_class_id['sale_quantity'].iloc[-1]) this_class_id.to_csv('EXCEPTION'+str(class_id) +".csv",header=True,index=False,float_format='%.0f') s+="\n" s+="201711"+ ","+str(class_id) + "," +str(res) f.close() s+="\n" train_class[['sale_date','class_id','sale_quantity']].to_csv('train_class.csv',header=True,index=False,float_format='%.0f') fw=open("201711.csv","w") fw.write(s) fw.close() print(ex)

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

用户登录
用户注册