![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
周小馬
这个作者很懒,什么都没留下…
展开
-
Python编程:从入门到实践(课后习题3)
# 3-1 姓名names = ['Zhou Kai', 'Zhang Lili', 'Liu Jie', 'Zhou Ting', 'Zhou Jing']for i in names: print(i)# 3-2 问候语names = ['Zhou Kai', 'Zhang Lili', 'Liu Jie', 'Zhou Ting', 'Zhou Jing']for i in n原创 2017-09-19 10:57:09 · 2503 阅读 · 1 评论 -
scikit-learn 梯度提升树(GBDT)调参小结
转:http://www.cnblogs.com/pinard/p/6143927.html在梯度提升树(GBDT)原理小结中,我们对GBDT的原理做了总结,本文我们就从scikit-learn里GBDT的类库使用方法作一个总结,主要会关注调参中的一些要点。1. scikit-learn GBDT类库概述在sacikit-learn中,GradientBoo转载 2017-09-20 17:54:42 · 621 阅读 · 0 评论 -
Python编程:从入门到实践(课后习题7)
# 7-1 汽车租car = input("What kind of car do you want to rent: ")print("Let me see if I can find you a " + car.title())# 7-2 餐馆订位restaurant = int(input("How many people are dining: "))if restaurant原创 2017-09-19 11:04:07 · 5124 阅读 · 6 评论 -
Python编程:从入门到实践(课后习题9)
# 10-6 加法运算first_number = input("First number: ")second_number = input("Second number: ")try: add = int(first_number) + int(second_number)except ValueError: print("You must enter digits!!!")els原创 2017-09-19 11:07:06 · 8843 阅读 · 0 评论 -
Python编程:从入门到实践(课后习题10)
# 10-6 加法运算first_number = input("First number: ")second_number = input("Second number: ")try: add = int(first_number) + int(second_number)except ValueError: print("You must enter digits!!!")els原创 2017-09-19 11:08:31 · 3455 阅读 · 1 评论 -
Python编程:从入门到实践(课后习题11)
# 11-1 城市和国家# city_functions.pydef city_country(city, country): city = city country = country cc = city + ' ' + country return cc.title()# test_cities.pyimport unittestfrom city_functions im原创 2017-09-19 11:07:43 · 1419 阅读 · 2 评论 -
Python编程:从入门到实践(课后习题8)
# 8-1 消息def display_message(): print("This chapter I will learning function.")display_message()# 8-2 喜欢的图书def favorite_book(title): print("One of my favorite books is " + title + ".")favorit原创 2017-09-19 11:05:38 · 7536 阅读 · 2 评论 -
Python编程:从入门到实践(课后习题6)
# 6-1 人name = { 'first_name': 'lili', 'last_name': 'zhang', 'age': 18, 'city': 'guangzhou'}print(name['first_name'] + ', ' + name['last_name'] + ', ' + str(name['age']) + ', ' + name['city原创 2017-09-19 11:03:26 · 3739 阅读 · 1 评论 -
Python编程:从入门到实践(课后习题5)
# 5-3 外星人颜色#1alien_color = 'green'if alien_color == 'green': print('You get 5 point.')alien_color = 'yellow'if alien_color == 'green': print('You get 5 point.')# 5-4 外星人颜色#2alien_color = 'yel原创 2017-09-19 11:02:12 · 5113 阅读 · 9 评论 -
Python编程:从入门到实践(课后习题4)
# 4-1 比萨pizzas = ['seafood', 'sausage', 'cheese']for i in pizzas: print(i)for i in pizzas: print('I like ' + i + ' pizza') # 4-1-1for i in pizzas: print('I like ' + i + ' pizza')pr原创 2017-09-19 11:01:33 · 5560 阅读 · 0 评论 -
fatal error: Python.h: 没有那个文件或目录 解决方法
这几天安装scrapy先说下环境 虚拟机Ubuntu16.04 系统默认Python 2.7.12 ,系统还自带3.5版本的,后来自己又装了3.6版本。在系统安装过程中,总是到twisted时报错,因为是源码安装的,所以系统要进行编译,但是找不到python.h文件!!!报错如下creating build/temp.linux-x86_64-2.7/sr原创 2017-12-26 10:01:00 · 37071 阅读 · 4 评论