首页
书签
电子手办柜
统计
Search
1
《绿皮书》《Green Book》
910 阅读
2
记录一下python 写入钉钉在线表格的过程
649 阅读
3
如何用Siri唤醒电脑(by服务器)
642 阅读
4
欢迎使用 Typecho
485 阅读
5
斯人若彩虹,遇上方知有。
452 阅读
杂谈
代码相关
日记
soul
清单
登录
Search
标签搜索
#python
#docker
#Ubuntu
#Excel
小冷柠's Blog
累计撰写
68
篇文章
累计收到
0
条评论
首页
栏目
杂谈
代码相关
日记
soul
清单
页面
书签
电子手办柜
统计
搜索到
16
篇与
的结果
2021-12-11
用excel &python 检查 网店库存和erp 库存
#导入包 from datetime import date import json import requests import urllib from urllib import request import pandas as pd url = 'http://cqzs.3cerp.com/pages/stock/searchGoodsExtendStock.htm' cookies = {'3cu':'????'} headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 SE 2.X MetaSr 1.0"} x = requests.get(url=url,headers=headers,cookies=cookies,verify=False) dict = x.json() df2 = pd.DataFrame(dict['data']) y = 0 L1 = ["有货且上架:"] L2 = ["有货没上架:"] L3 = ["无货且上架:"] L4 = ["无货没上架:"] while y < 4: df1 = pd.read_excel(r"G:\ZM\sku对应表.xlsx") #print(df1) sku = str(df1.iloc[y,0]) one = df1.iloc[y,1] try: two = df1.iloc[y,2] except: two = 1 try: three = df1.iloc[y,3] except: three = 1 try: four = df1.iloc[y,4] except: four = 1 url = f'https://c0.3.cn/stocks?area=4_50952_50969_0&type=getstocks&skuIds={sku}' headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 SE 2.X MetaSr 1.0"} x = requests.get(url=url,headers=headers,verify=False) #print(x) dict = x.json() #print(dict) sku_stock = dict[sku]['StockStateName'] print('网店库存',sku_stock) print(one) print(two) print(three) a = df2.loc[df2['b_c_name']==f'{one}','n_stock'].values[0] try: b = df2.loc[df2['b_c_name']==f'{two}','n_stock'].values[0] except: b = 1 try: c = df2.loc[df2['b_c_name']==f'{three}','n_stock'].values[0] except: c = 1 try: d = df2.loc[df2['b_c_name']==f'{four}','n_stock'].values[0] except: d = 1 print('库存数',a,b,c) y += 1 if a > 0 and b > 0 and c > 0 and d > 0 : print("库存有货") if sku_stock != '无货': print("有货且上架") L1.append(sku) else: print("有货没上架") L2.append(sku) else: print("库存没有") if sku_stock != '无货': print('无货但上架') L3.append(sku) else: print('无货没上架') L4.append(sku) Lall = L1 + L2 + L3 + L4 print(Lall) def ding(): headers={'Content-Type': 'application/json'} robot_url = "https://oapi.dingtalk.com/robot/send?access_token=???" data1 ={ "at": { "atMobiles":[ "180xxxxxx" ], "atUserIds":[ "user123" ], "isAtAll": False }, "text": { "content":f"{Lall}" }, "msgtype":"text" } robot= requests.post(url = robot_url,data=json.dumps(data1),headers=headers) print(Lall) ding()...
2021年12月11日
224 阅读
0 评论
0 点赞
2021-10-27
获取局域网ip
import socket def get_ip(): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: # doesn't even have to be reachable s.connect(('10.255.255.255', 1)) IP = s.getsockname()[0] except Exception: IP = '127.0.0.1' finally: s.close() return IP print(get_ip())
2021年10月27日
192 阅读
0 评论
0 点赞
2021-07-23
关于VScode 连接liunx(ubuntu)无法连接的问题
VS Code的Error: Running the contributed command: ‘_workbench.downloadResource‘ failed解决删除Remote Server上的~/.vscode-server文件夹,可以在远程Linux服务器上执行 rm -rf ~/.vscode-server 指令在本地的VS Code中再次尝试连接,毫无意外,这次依然是失败的。但是这一步会在远程服务器中生成 ~/.vscode-server/bin/xxx 文件夹,此时可以看到一个名为vscode-server.tar.gz,截图如下:上面的2d开头的文件夹称为Commit Id,现在利用Commit ID下载远程连接需要的文件。对于Stabe Version(在VS Code报错的的窗口中Ctrl+F搜索stable,有则为Stable Version)的Remote SSH插件,如下图,在“输出”窗口中Ctrl+F搜索“stable”。然后使用这个链接:https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/stable下载所需文件,注意链接中的$COMMIT_ID这几个字符(注意$不要忘记)需要换成自己的,比如我的是 2d23c42a936db1c7b3b06f918cde29561cc47cd6,那么此时我通过https://update.code.visualstudio.com/commit:2d23c42a936db1c7b3b06f918cde29561cc47cd6/server-linux-x64/stable就可以下载到我需要的文件。对于Insider版本,通过 https://update.code.visualstudio.com/commit:$COMMIT_ID/server-linux-x64/insider 这个链接下载相应文件。下载完毕后,将下载的文件upload到Remote Server的~/.vscode-server/bin/xxx文件夹下,同时删除其他文件,最后再使用 tar -xvf vscode-server-linux-x64.tar.gz --strip-components 1 解压文件,具体如下图:然后使用chmod +x node server.sh为node和server.sh添加可执行权限。————————————————版权声明:本文为CSDN博主「ibless」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
2021年07月23日
360 阅读
0 评论
0 点赞
2021-06-19
网络唤醒
要求{abtn icon="fa-object-group" color="#ff6800" href="" radius="" content="公网IP"/} {abtn icon="fa-object-group" color="#ff6800" href="" radius="" content="路由器支持ip与mac绑定"/} {abtn icon="fa-object-group" color="#ff6800" href="" radius="" content="BIOS里支持网络唤醒(由PCI-E设备唤醒)"/}路由器设置{mtitle title="IP与MAC绑定"/}{mtitle title="将你需要唤醒的主机MAC绑定"/}{mtitle title="端口转发"/}{message type="info" content="这里建议设置如图 端口号设置成其他不是常用端口避免被扫"/}{message type="success" content="设置成功后可以用这个工具扫描下端口检测是否成功映射"/}{anote icon="fa-paper-plane" href="https://tool.chinaz.com/port/" type="secondary" content="端口扫描"/} {anote icon="fa-paper-plane" href="https://ip.cn/" type="secondary" content="IP地址查询"/}唤醒设备设置{mtitle title="网卡版本"/}、{message type="info" content=" 建议在主板官网 下载对应最新版本ps:intel V1225 要22年的之前的版本 原因未知"/}{message type="info" content="win10的更新网卡甚至会超过官网测试版本不建议使用"/}{message type="info" content="唤醒不了退回上个版本即可"/}{mtitle title="驱动设置"/}设备管理器找到你的网卡右键设置属性 启用唤醒魔包 与 电源管理 允许此设备唤醒bios 设置高级电源选项里打开允许PCIE 设备唤醒远程唤醒{timeline}{timeline-item color="#19be6b"}这里建议最简单的小程序 “网络唤醒wakeonlan”{/timeline-item}{timeline-item color="#19be6b"}设置很简单如图{/timeline-item}{timeline-item color="#19be6b"}端口号填路由器设置的外部端口{/timeline-item}{timeline-item color="#19be6b"}MAC地址是网卡的mac 地址{/timeline-item}{timeline-item color="#19be6b"}输入正确即可唤醒{/timeline-item}{/timeline}进阶{anote icon="fa-paper-plane" href="https://irx999.fun/archives/90/" type="secondary" content="如何如何用Siri唤醒电脑(by服务器)"/}
2021年06月19日
332 阅读
0 评论
0 点赞
2020-12-26
Visual Studio Code不受支持
[line]VSC不受支持解决办法[/line]扩展插件中搜寻***Fix VSCode Checksums***Shift+Ctrl+P 运行Fix Checksums apply重启即可
2020年12月26日
412 阅读
0 评论
0 点赞
1
2
3
4