自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

thinkbuzan的博客

thinkbuzan的博客

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

原创 【高级编程技术】【作业】【第十五周】【1】

sklearn练习from sklearn import datasetsfrom sklearn import cross_validationfrom sklearn.naive_bayes import GaussianNBfrom sklearn.svm import SVCfrom sklearn.ensemble import RandomForestClassifie...

2018-06-27 21:09:12 164

原创 【高级编程技术】【作业】【第十四周】【1】

jupyter notebook练习题目链接:https://nbviewer.jupyter.org/github/schmit/cme193-ipython-notebooks-lecture/blob/master/Exercises.ipynb homework.ipynb:{ "cells": [ { "cell_type": "code", "execu...

2018-06-13 21:12:50 4683

原创 【高级编程技术】【作业】【第十三周】【1】

scipy练习Scipy - 简书Exercise 10.1: Least squares Generate matrix A∈Rm×nA∈Rm×nA \in \mathbb R^{m \times n} with m>nm>nm > n. Also generate some vector b∈Rmb∈Rmb \in \mathbb R^m. Now find x...

2018-06-04 00:07:34 119

原创 【高级编程技术】【作业】【第十二周】【1】

matplotlib练习Exercise 11.1: Plotting a function Plot the function >>f(x)=sin2(x−2)e−x2>>>>f(x)=sin2(x−2)e−x2>>> \begin{equation*}> f(x)=sin^2(x-2)e^{-x^2}> \end{eq...

2018-05-25 23:27:58 272

原创 【高级编程技术】【作业】【第十一周】【1】

numpy练习 Generate matrices AAA, with random Gaussian entries, BBB, a Toeplitz matrix, where A∈Rn×mA∈Rn×mA \in \mathbb R^{n \times m} and B∈Rm×mB∈Rm×mB \in \mathbb R^{m \times m}, for n=200n=200n=20...

2018-05-21 19:37:46 157

原创 【高级编程技术】【作业】【第九周】【1】

LeetCode练习题15. 三数之和描述给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组。注意:答案中不可以包含重复的三元组。例如, 给定数组 nums = [-1, 0, 1, 2, -1, -4],满足要求的三元组集合为:[ [-1, 0,...

2018-05-15 23:11:11 480

原创 【高级编程技术】【作业】【第八周】【3】

LeetCode练习题11. 盛最多水的容器描述给定 n 个非负整数 a1,a2,…,an,每个数代表坐标中的一个点 (i, ai) 。画 n 条垂直线,使得垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 注意:你不能倾斜容器,n 至少是2。思路首先尝试了一下n2n2n^2枚举,意料之中地超...

2018-05-15 13:22:34 146

原创 【高级编程技术】【作业】【第八周】【2】

LeetCode练习题4. 两个排序数组的中位数描述给定两个大小为 m 和 n 的有序数组 nums1 和 nums2 。 请找出这两个有序数组的中位数。要求算法的时间复杂度为 O(log (m+n)) 。 示例 1:nums1 = [1, 3]nums2 = [2]中位数是 2.0示例 2:nums1 = [1, 2]nums2 = [3, 4...

2018-05-14 20:30:46 362 1

原创 【高级编程技术】【作业】【第八周】【1】

LeetCode练习题1. 两数之和描述给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。 你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。 示例:给定 nums = [2, 7, 11, 15], target = 9因为 nums[0] + nums[1] = 2 + 7 = 9所以返回 [0, 1]思路数组是无序的,所以一开始的思路...

2018-05-14 16:24:11 90

原创 【高级编程技术】【作业】【第六周】【1】

教材第11章课后练习11-1 城市和国家city_functions.pydef formating(city, country): return city.title()+', '+country.title()test_cities.pyimport unittestfrom city_functions import formatingclas...

2018-04-09 08:38:41 92

原创 【高级编程技术】【作业】【第五周】【2】

教材第10章课后练习10-1 Python学习笔记learning_python.txtIn Python you can write hello world.In Python you can change the type of variables.In Python you can write less code with the same function.In ...

2018-04-06 23:16:24 171

原创 【高级编程技术】【作业】【第五周】【1】

教材第9章课后练习9-1 餐馆class Restaurant(): def __init__(self, restaurant_name, cuisine_type): self.restaurant_name = restaurant_name self.cuisine_type = cuisine_type def describe...

2018-04-02 14:45:08 128

原创 【高级编程技术】【作业】【第四周】【2】

教材第8章课后练习8-1 消息def display_message(): print('本章学的是函数')display_message()8-2 喜欢的图书def favorite_book(title): print('One of my favorite books is', title)favorite_book('Alice in W...

2018-03-28 13:00:34 160

原创 【高级编程技术】【作业】【第四周】【1】

教材第7章课后练习7-1 汽车租赁car = input('What car would you like to rent?')print('Let me see if I can find you a '+car.title()+'.')7-2 餐馆订位guest_num = int(input('How many guests are having dinne...

2018-03-26 13:07:54 136

原创 【高级编程技术】【作业】【第三周】【2】

教材第6章课后练习6-1 人person = { 'first_name': 'san', 'last_name': 'zhang', 'age': 20, 'city': 'guangzhou', }for key in person: print(key+': '+str(person[key]))6-2 喜欢的数字...

2018-03-22 22:19:36 115

原创 【高级编程技术】【作业】【第三周】【1】

教材第5章课后练习5-1 条件测试car = 'subaru'print('Is car == "subaru"? I predict True')print(car == 'subaru')print('Is car == "audi"? I predict False')print(car == 'audi')number = 3.0print('Is numbe...

2018-03-19 23:14:50 255

原创 【高级编程技术】【作业】【第二周】【2】

教材第4章课后练习4-1 比萨pizzas = ['durian', 'cheese', 'pepperoni']for pizza in pizzas: print(pizza)for pizza in pizzas: print('I like', pizza, 'pizza')print('I really love pizza!')4-2 动物...

2018-03-14 22:28:31 157

原创 【高级编程技术】【作业】【第二周】【1】

教材第3章课后练习3-1 姓名names = ['alice', 'bob', 'charlie']print(names[0].title())print(names[1].title())print(names[-1].title())3-2 问候语names = ['alice', 'bob', 'charlie']print('Hello,', na...

2018-03-13 13:03:37 156

原创 【高级编程技术】【作业】【第一周】【2】

教材第2章课后练习2-1 简单消息message = 'This is a message.'print(message)2-2 多条简单消息message = 'This is a message.'print(message)message = 'This is also a message.'print(message)2-3 个性化消息...

2018-03-07 21:54:12 144

原创 【高级编程技术】【作业】【第一周】【1】

浏览Python主页的发现和收获发现打开Python官方网站(https://www.python.org/),能看到网站长成这个样子: 网站结构还是非常清晰的,并且UI也比较现代,在显眼的位置可以看到网站有关于、下载、文档、社区、新闻事件等对于一门编程语言来说所需的所有基本的板块,Python使用者可以方便地在同一个网站完成大部分有关的任务。官网上会滚动展示一些Python...

2018-03-05 21:39:37 297

空空如也

空空如也

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

TA关注的人

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