自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

赛博空间

自己学习pthon,c++,ubuntu,机器学习以及遗传算法的笔记

  • 博客(10)
  • 收藏
  • 关注

原创 np.random的几种方法

参考链接:https://www.chzzz.club/post/137.html    numpy.randomDESCRIPTION    ========================    Random Number Generation    ========================        ==================== =========...

2018-10-20 17:46:21 2387

原创 Inheritance and Composition --继承与组合

参考链接:网页链接前言:继承与组合是编程的两种方式。继承完全可以用组合来代替,而且要尽量避免多继承。 继承与组合的概念:继承:一个类可以从另一个类继承属性,类似父子关系,一脉相承但不完全相同。组合:一个类可以由其他类组成,类似车与轮子的关系。 继承可以用组合代替:关于继承,我们知道父类与子类有三种交互方式:子类暗含这父类的行为;子类覆盖父类的行为;子类alter父类...

2018-10-20 17:43:41 212

原创 为你的github上的python项目添加buildpassing徽章?

buildpassing徽章是由Travis CI持续集成服务提供的。下面我们就来利用它对你的python项目进行集成测试。 首先当然是登录了,我们可以使用github帐号授权登录Travis CI。Travis CI的关键就是.travis.yml文件。对于python这个文件的内容格式大致如下:   language: python  python:    - "3....

2018-10-20 17:41:55 1850

原创 full-speed-python 习题解答(五)

项目地址:网页链接full-speed-python书籍地址:https://github.com/joaoventura/full-speed-python参考链接:https://www.chzzz.club/post/17.html 5.2 Exercise with the while statement 1.Implement a function that receiv...

2018-10-20 17:38:34 315

原创 full-speed-python 习题解答(四)

项目地址:网页链接full-speed-python书籍地址:https://github.com/joaoventura/full-speed-python参考链接:https://www.chzzz.club/post/14.html 5.1 Exercise with the for loop 1.Create a function “add” that receives ...

2018-10-20 17:36:45 205

原创 full-speed-python 习题解答(三)

项目地址:网页链接full-speed-python书籍地址:https://github.com/joaoventura/full-speed-python参考链接:https://www.chzzz.club/post/13.html 4.1 Exercise with the math module 1.Find the greatest common divisor of...

2018-10-20 17:34:40 518

原创 full-speed-python 习题解答(二)

项目地址:网页地址full-speed-python书籍地址:https://github.com/joaoventura/full-speed-python3.2 Exercise with strings1.Initialize the string “abc” on a variable named “s”:(a) Use a function to get the length o...

2018-10-20 17:26:30 358

原创 full-speed-python习题解答(一)

项目地址:网页地址full-speed-python书籍地址:https://github.com/joaoventura/full-speed-python3.1 Exercises with numbers 1.Try the following mathematical calculations and guess what is happening: (3/2),(3//2), ...

2018-10-20 17:17:54 830

原创 在ubuntu中使用virtualenv进行python2和python3的切换

    当我们需要使用python2又要使用python3时,由于python的扩展包很重要,假如当你电脑的默认版本是python2时,你安装的扩展包只有python2能够使用,这对你要使用两种版本的python造成很多困扰。    一个好的解决办法就是:当我们建立一个工程时,让这个工程拥有自己的python版本和相关的包,这样我们更新这个工程里python包的版本或者安装其他包时对其他的工程...

2018-10-20 17:09:32 2108

原创 windows下python虚拟环境的使用

windows下使用virtualennv比较麻烦,我推荐virtualwrapper。 安装virtualwrapperpip install virtualwrapper-win 新建虚拟环境mkvirtualenv python3setprojectdir . 这会产生一个叫做python3的文件夹,它是一个内置python,pip,setuptoo...

2018-10-20 17:07:04 739

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除