callmefeifei / baby-names Goto Github PK
View Code? Open in Web Editor NEW看程序员奶爸是如何通过代码给宝宝起名的?
License: MIT License
看程序员奶爸是如何通过代码给宝宝起名的?
License: MIT License
大神可以更新一下,同名查询函数部分吗。人人网这边的查询倒闭了。
查了下,五行补的不是看缺啥补啥。这边逻辑应该不太对
生辰八字信息是用的农历还是阳历?
哥们,运行generate_names.py后,提示SyntaxError: Missing parentheses in call to 'print'. Did you mean print(1111,err)?
怎么处理?
ERROR: Could not find a version that satisfies the requirement soupsieve<2.0,>1.2; python_version < "3.0" (from BeautifulSoup4->-r docs/requirements.txt (line 3)) (from versions: none)
ERROR: No matching distribution found for soupsieve<2.0,>1.2; python_version < "3.0" (from BeautifulSoup4->-r docs/requirements.txt (line 3))
运行python generate_names.py,命令行返回第一行、第三行乱码:
[] 濮撳悕瀛楀吀鐢熸垚涓? 璇风◢鍚?..
[] 瀵煎叆鍚嶅瓧...涓? 鑰楁椂 .... 绉?.
第一行、第三行应该为:
[] 姓名字典生成中,请稍后…
[] 导入名字…个,耗时… 秒
baby_names.csv中每两行之间都有一空行,能不能不隔行输出结果?
限定文字设置后,不起作用。
哥们请看看是什么问题谢谢。
大神,我有几个小白问题想问下,Python2.7环境今年1月份之后已经停止支持了,我用Python2.7安装你的依赖库的时候出错了,想问下有没有解决方案啊?Python3.8的环境可以运行项目吗?还有,项目说明里的预览图都打不开了,估计图床不能用了!能不能重新上传一下呀!辛苦大神!
sudo pip install -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com -r docs/requirements.txt
提示找不到
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'docs/requirements.txt'
输出完总数和秒数就不动了,也没有报错,光标在闪烁,但是等待几个小时也是如此。
8月份试用的时候挺好用的,现在再用不好使了,输出完总数就不动了,也没有提示。现在人在医院,手机ssh云上的服务器执行的,不方便调试具体分析。
求大神帮忙看看,系统是ubuntu64
安装报错如下:
ubuntu@VM-92-69-ubuntu:~/baby-names$ sudo pip install -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com -r docs/requirements.txtThe directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting pypinyin (from -r docs/requirements.txt (line 1)) Downloading http://pypi.doubanio.com/packages/db/50/58b16cb56aeb003246d76ce3648f8e449605d7595e444a9b7c87bd543db8/pypinyin-0.40.0-py2.py3-none-any.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 68.4MB/s Collecting cjklib (from -r docs/requirements.txt (line 2)) Downloading http://pypi.doubanio.com/packages/05/6c/884b3e557bbdbf3beff896fefab3e8201a5b2a1732650cedaddd20115192/cjklib-0.3.2.tar.gz (17.4MB) 100% |████████████████████████████████| 17.4MB 74.5MB/s Requirement already satisfied (use --upgrade to upgrade): BeautifulSoup4 in /usr/lib/python2.7/dist-packages (from -r docs/requirements.txt (line 3)) Collecting gevent (from -r docs/requirements.txt (line 4)) Downloading http://pypi.doubanio.com/packages/0b/50/1b1175ea3a269b5fa3f0f7fed11149888180695bef5fbf568adbb196efaf/gevent-21.1.2.tar.gz (5.9MB) 100% |████████████████████████████████| 5.9MB 64.7MB/s Requirement already satisfied (use --upgrade to upgrade): enum34; python_version < "3.4" in /usr/lib/python2.7/dist-packages (from pypinyin->-r docs/requirements.txt (line 1)) Requirement already satisfied (use --upgrade to upgrade): typing; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from pypinyin->-r docs/requirements.txt (line 1)) Collecting SQLAlchemy<0.7,>=0.6 (from cjklib->-r docs/requirements.txt (line 2)) Downloading http://pypi.doubanio.com/packages/47/6f/de7020735ac188b759b8ba27f21fb1dcd76a52b3e88a181bc4b72bccd753/SQLAlchemy-0.6.9.tar.gz (2.2MB) 100% |████████████████████████████████| 2.2MB 70.2MB/s Collecting greenlet<2.0,>=0.4.17; platform_python_implementation == "CPython" (from gevent->-r docs/requirements.txt (line 4)) Downloading http://pypi.doubanio.com/packages/82/c7/760c570c083d6451ab0e2d806d7db7d1d845969f6fa20fd91dda692ae145/greenlet-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl (148kB) 100% |████████████████████████████████| 153kB 6.3MB/s Collecting cffi>=1.12.2; platform_python_implementation == "CPython" and sys_platform == "win32" (from gevent->-r docs/requirements.txt (line 4)) Downloading http://pypi.doubanio.com/packages/ab/a7/1df1dcd222c9a35d2d0c4c123bd55a533ed2d07b09909ad085829deea4d6/cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl (389kB) 100% |████████████████████████████████| 399kB 29.6MB/s Collecting zope.event (from gevent->-r docs/requirements.txt (line 4)) Downloading http://pypi.doubanio.com/packages/9e/85/b45408c64f3b888976f1d5b37eed8d746b8d5729a66a49ec846fda27d371/zope.event-4.5.0-py2.py3-none-any.whl Collecting zope.interface (from gevent->-r docs/requirements.txt (line 4)) Downloading http://pypi.doubanio.com/packages/64/73/8de66bdab6c4494232339eba8f8864521180c9a76c7c6059b4202adb1e03/zope.interface-5.2.0-cp27-cp27mu-manylinux1_x86_64.whl (232kB) 100% |████████████████████████████████| 235kB 95.9MB/s Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from gevent->-r docs/requirements.txt (line 4)) Collecting pycparser (from cffi>=1.12.2; platform_python_implementation == "CPython" and sys_platform == "win32"->gevent->-r docs/requirements.txt (line 4)) Downloading http://pypi.doubanio.com/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB) 100% |████████████████████████████████| 112kB 83.3MB/s Installing collected packages: pypinyin, SQLAlchemy, cjklib, greenlet, pycparser, cffi, zope.event, zope.interface, gevent Killed
[*] 姓名字典生成中, 请稍后...
Traceback (most recent call last):
File "generate_names.py", line 726, in
babyname.run()
File "generate_names.py", line 661, in run
self.all_names = self.get_all_names()
File "generate_names.py", line 193, in get_all_names
wuxing = self.compute_name_wuxing()
File "generate_names.py", line 416, in compute_name_wuxing
content = requests.post(url=self.REQUEST_URL, data=_data, headers=self.headers, timeout=5, proxies=proxies).content
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 110, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 56, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 844, in validate_conn
conn.connect()
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl.py", line 324, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 438, in wrap_socket
rd = util.wait_for_read(sock, sock.gettimeout())
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/wait.py", line 33, in wait_for_read
return _wait_for_io_events(socks, EVENT_READ, timeout)
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/wait.py", line 22, in _wait_for_io_events
with DefaultSelector() as selector:
File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/selectors.py", line 364, in init
self._epoll = select.epoll()
AttributeError: 'module' object has no attribute 'epoll'
查了下,五行补的不是看缺啥补啥。这边逻辑应该不太对
跑不起来
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.