V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  cbiqih  ›  全部回复第 1 页 / 共 3 页
回复总数  41
1  2  3  
2022-11-02 09:50:05 +08:00
回复了 jdhao 创建的主题 问与答 目前 Windows 有没有媲美 macbook pro 的笔记本?
既然都价格不限了,与其如此纠结, 直接买 MacBook 装个 Windows 不就好了?
2021-03-10 12:27:29 +08:00
回复了 aparty 创建的主题 Python 怎样用 Python 转换这段代码
```python
users = [
{"userid": "Change", "tags": [{"type": 1, "tag_id": "e"}], },
{"userid": "andy.lei", "tags": [{"type": 1, "tag_id": "eg"}, {"type": 1, "tag_id": "ti"}], }
]

result = [{'userid': user['userid'], 'tagid': tag['tag_id']} for user in users for tag in user['tags']]
print(result)
```
2021-02-05 17:26:23 +08:00
回复了 cbiqih 创建的主题 Python 发现个 Pycharm 的代码模板不提示的 bug~
@Yourshell
>>> type(...)
<class 'ellipsis'>
设置了 daemon = True, 则为守护进程, 要等所有子进程退出了, 父进程才会结束的~
帮楼主左下格式化
Traceback (most recent call last):
File "/Users/admin/Developer/dist/launcher.app/Contents/Resources/boot.py", line 103,
in <module> _run()
File "/Users/admin/Developer/dist/launcher.app/Contents/Resources/boot.py", line 82,
in _run exec(compile(source, path, 'exec'), globals(), globals())
File "/Users/admin/Developer/dist/launcher.app/Contents/Resources/launcher.py", line 21,
in <module> from app.main import begin
File "<frozen importlib._bootstrap="">", line 971,
in _find_and_load
File "<frozen importlib._bootstrap="">", line 955,
in _find_and_load_unlocked
File "<frozen importlib._bootstrap="">", line 656,
in _load_unlocked File "<frozen importlib._bootstrap="">", line 626,
in _load_backward_compatible File "app/main.pyc", line 16,
in <module> File "<frozen importlib._bootstrap="">", line 971,
in _find_and_load File "<frozen importlib._bootstrap="">", line 955,
in _find_and_load_unlocked File "<frozen importlib._bootstrap="">", line 656,
in _load_unlocked File "<frozen importlib._bootstrap="">", line 626,
in _load_backward_compatible File "app/defs/init.pyc", line 1,
in <module> File "<frozen importlib._bootstrap="">", line 971,
in _find_and_load File "<frozen importlib._bootstrap="">", line 955,
in _find_and_load_unlocked File "<frozen importlib._bootstrap="">", line 656,
in _load_unlocked File "<frozen importlib._bootstrap="">", line 626,
in _load_backward_compatible File "app/defs/defs.pyc", line 5,
in <module> File "<frozen importlib._bootstrap="">", line 971,
in _find_and_load File "<frozen importlib._bootstrap="">", line 955,
in _find_and_load_unlocked File "<frozen importlib._bootstrap="">", line 656,
in _load_unlocked File "<frozen importlib._bootstrap="">", line 626,
in _load_backward_compatible File "bmutils/utils.pyc", line 25,
in <module> File "<frozen importlib._bootstrap="">", line 971,
in _find_and_load File "<frozen importlib._bootstrap="">", line 955,
in _find_and_load_unlocked File "<frozen importlib._bootstrap="">", line 656,
in _load_unlocked File "<frozen importlib._bootstrap="">", line 626,
in _load_backward_compatible File "bmutils/insighttoolkit/init.pyc", line 1,
in <module> File "<frozen importlib._bootstrap="">", line 971,
in _find_and_load File "<frozen importlib._bootstrap="">", line 955,
in _find_and_load_unlocked File "<frozen importlib._bootstrap="">", line 656,
in _load_unlocked File "<frozen importlib._bootstrap="">", line 626,
in _load_backward_compatible File "bmutils/insighttoolkit/utils.pyc", line 5,
in <module> File "<frozen importlib._bootstrap="">", line 971,
in _find_and_load File "<frozen importlib._bootstrap="">", line 955,
in _find_and_load_unlocked File "<frozen importlib._bootstrap="">", line 656,
in _load_unlocked File "<frozen importlib._bootstrap="">", line 626,
in _load_backward_compatible File "bmutils/insighttoolkit/defs.pyc", line 3,
in <module> File "bmutils/insighttoolkit/defs.pyc", line 4,
in ItkTypes File "itkLazy.pyc", line 40,
in getattribute AttributeError: module 'itk' has no attribute 'Image'
2018-10-23 12:47:19 +08:00
回复了 aaronysj 创建的主题 程序员 浮躁,真得很浮躁...
没工作的焦虑着找工作,有工作的焦虑着没成就~
2018-10-08 09:39:14 +08:00
回复了 angel725 创建的主题 Python python3 每两位数字插一个空格,怎么实现
import re

number = "123456789"
result = re.findall("\d{1,2}", number)

print(result) # ['12', '34', '56', '78', '9']
2018-09-13 14:07:08 +08:00
回复了 css3 创建的主题 Python 求助,怎么用最简单的方便实现 list 内的数值运算需求?
@css3 字典推导式
2018-09-13 12:59:11 +08:00
回复了 css3 创建的主题 Python 求助,怎么用最简单的方便实现 list 内的数值运算需求?
看来我理解错了你的加法~
a = {'height': 0.724074, 'width': 0.226042, 'x': 0.295833, 'y': 0.275926}
b = {'height': 1080, 'width': 1920, 'x': 1920, 'y': 1080}
d = {key:int(value * b[key]) for key,value in a.items()}
return [d['x'], d['y'], d['width'] + d['x'], d['height'] + d['y']]
2018-09-13 12:52:05 +08:00
回复了 css3 创建的主题 Python 求助,怎么用最简单的方便实现 list 内的数值运算需求?
考虑到 dict 是无序的,获取的 values 不一定能一一对应上.

a = {'height': 0.724074, 'width': 0.226042, 'x': 0.295833, 'y': 0.275926}
b = {'height': 1080, 'width': 1920, 'x': 1920, 'y': 1080}
result = sum(list(value * b[key] for key,value in a.items()))
2018-09-13 12:46:12 +08:00
回复了 css3 创建的主题 Python 求助,怎么用最简单的方便实现 list 内的数值运算需求?
from operator import mul

a = {'height': 0.724074, 'width': 0.226042, 'x': 0.295833, 'y': 0.275926}
b = {'height': 1080, 'width': 1920, 'x': 1920, 'y': 1080}
result = sum(map(lambda x: mul(*x), zip(a.values(), b.values())))
2018-08-31 10:19:43 +08:00
回复了 dyllanwli 创建的主题 程序员 来来来,评价一下 Dart 这个语言?
要是 Flutter 能出另一种一套布局方式,而非用代码布局就好了.
2018-08-29 20:40:44 +08:00
回复了 Rwing 创建的主题 程序员 年度涨薪涨了 2%,算是侮辱人吗?
@luoyich 你暴露工资了~
2018-05-13 10:26:24 +08:00
回复了 rogwan 创建的主题 Python Python 占据 5 月 Google 语言搜索榜首,首次击败 Java
等用 kotlin 的人多了,用 Java 就少了~
2018-04-28 10:35:49 +08:00
回复了 Lanedo 创建的主题 程序员 “世界只有两种程序员,一种……,一种……。”
世界只有两种程序员,一种面向对象优雅的,一种面向过程无脑的~
2018-03-04 09:16:45 +08:00
回复了 Livid 创建的主题 Flutter Flutter 官网上的这张图
@ssynhtn 其实 Flutter 也为 IOS 做了一套控件库
2018-03-04 09:15:45 +08:00
回复了 Livid 创建的主题 Flutter Flutter 官网上的这张图
不知道后期会不会加个拖控件自动生成代码的插件~
2018-01-31 11:27:17 +08:00
回复了 woshichuanqilz 创建的主题 Flask flask 运行的时候如何直接打开一个链接?
我是用 Pycharm 开发,运行设置里有这个选项
2018-01-30 13:15:27 +08:00
回复了 woshichuanqilz 创建的主题 Flask flask 运行的时候如何直接打开一个链接?
Edit configurations 中勾选 Run browser
1  2  3  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2843 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 35ms · UTC 07:30 · PVG 15:30 · LAX 23:30 · JFK 02:30
Developed with CodeLauncher
♥ Do have faith in what you're doing.