摘要: 通过list写入excel list1 = [['张三','男','未婚',20],['李四','男','已婚',28],['小红','女','未婚',18],['小芳','女','已婚',25]] output = open('data.xls','w',encoding='gbk') outpu 阅读全文
posted @ 2020-11-25 15:03 hifalee 阅读(787) 评论(0) 推荐(0)
摘要: shutil.rmtree(params.save) #删除文件保存相关文件 os.mkdir(params.save) #创建相关文件 torch.save(model, params.save+'/model.pkl') #以torch为例子,然后保存 def delete_file(path) 阅读全文
posted @ 2020-11-25 09:02 hifalee 阅读(164) 评论(0) 推荐(0)
摘要: f1 = metrics.f1_score(all_target, all_pred) 阅读全文
posted @ 2020-11-25 08:59 hifalee 阅读(422) 评论(0) 推荐(0)
摘要: df.groupby(['opponent']).game_id.nunique()= for index,group in df.groupby(df['opponent'])['game_id']: print(index) print(len(set(list(group)))) 阅读全文
posted @ 2020-11-25 08:58 hifalee 阅读(82) 评论(0) 推荐(0)
摘要: nohup venv/bin/python bin/photo_data.py > ph_save.log 2>&1 & 或者 nohup python -u test.py > test.log 2>&1 & sh 文件nohup sh test.sh > test.log 2>&1 & 查看进程 阅读全文
posted @ 2020-11-25 08:51 hifalee 阅读(130) 评论(0) 推荐(0)
摘要: 1. git status 查看修改的文件1. 首先add: `git add file` 提交需要修改的文件2. 删除`master`分支: `git commit -m '' `3. 拉取分支: `git pull origin dev_lhh`4. diff: `git diff dev_lh 阅读全文
posted @ 2020-11-25 08:48 hifalee 阅读(82) 评论(0) 推荐(0)