自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 第十五周作业——高级编程技术

题目:导入各种数据库,生成数据集。from sklearn import datasets from sklearn import cross_validation from sklearn.naive_bayes import GaussianNB from sklearn.svm import SVC from sklearn.ensemble import RandomFor...

2018-06-18 23:27:50 211

原创 第十四周作业——高级编程技术

In [1]:%matplotlib inline import random import numpy as np import scipy as sp import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import statsmodels.api as sm import statsmode...

2018-06-10 23:24:00 317

原创 第十三周作业——高级编程技术

import numpy as np from scipy.linalg import lstsq from scipy.linalg import norm A = np.random.randint(0,50,size=(5,5)) b = np.random.randint(0,50,size=(5,1)) print("A:") print(A) print(...

2018-06-02 22:22:47 237

原创 第十二周作业——高级编程作业

11 MatplotlibExercise 11.1:Plotting a function    plot the function f(x) = sin2(x-2)e^(-x^2)over the interval [0; 2]. Add proper axis labels, a title, etcimport numpy as np  import matplotlib . pyplot...

2018-05-28 22:32:34 389

原创 第十一周作业——高级编程技术

· Set matrices A,with random Gaussian entries B,a Toeplitz matrix, n = 200, m = 500import timeimport numpy as np  from scipy.linalg import toeplitz  n = 200m = 500A = np.random.normal(0,1.0,100000)A =...

2018-05-21 18:19:57 291

原创 第九周作业——高级编程技术

#213题目来源:https://leetcode.com/problems/house-robber-ii/description/题目分析:这是house-robber的延伸,在上次盗窃完一条街道之后,窃贼又转到了一个新的地方,这个地方的所有房屋都围成一圈。这意味着第一个房子是最后一个是紧挨着的。当然这些房屋的安全系统与上次那条街道的安全系统保持一致。现在给出一份代表每个房屋存放钱数的非负整数...

2018-05-07 14:41:44 235

原创 第八周作业(1,2,3)——高级编程技术

一、LeetCode里的【array】部分题目节选。1、#41. First Missing Positive2.#11. Container With Most Water3.#35. Search Insert Position11. Container With Most Water

2018-04-29 23:35:46 220

原创 第六周作业(1,2【没有】)——高级编程技术

一、第十一章作业。11-1city_functions.py:def city_country(city, country, population): cityCountry = city.title() + ", " + country.title()  return cityCountrytest_cities.py:import unittestfrom city_functions imp...

2018-04-13 01:41:35 204

原创 第五周作业(2)——高级编程技术

一、第十章作业节选10-1with open('learning_python.txt') as file_object: contents = file_object.read() print(contents)print("\n")fileName = 'learning_python.txt'with open(fileName) as file_object: for line in fi...

2018-04-08 22:26:03 242

原创 第五周作业(1)——高级编程技术

一. 第九章作业节选9-1class Restaurant(): def __init__(self, restaurant_name, cuisine_type): self.restaurant_name = restaurant_name self.cuisine_type = cuisine_type def describe_restaurant(self): print("res...

2018-04-04 15:15:02 288

原创 第四周作业(1,2)——高级编程技术

一、第七章作业节选、7-1car = input("What kind of car would you like to rent? ")print("Let me see if I can find you a " + car + ".")7-2numbers = input("Who many people will come to dinner? ")if int(numbers) >...

2018-04-01 21:43:43 188

原创 第三周作业(2)——高级编程技术

6-1friend = {'first_name': 'Jams', 'last_name': 'Bob', 'age': 18, 'city': 'Wuhan'}print(friend['first_name'])print(friend['last_name'])print(friend['age'])print(friend['city'])6-2friends_love = { 'Xu ...

2018-03-22 13:43:19 209

原创 第三周作业(1)——高级编程技术

5-2str1 = 'abc'str2 = 'ABC'print(str1 == str2)print(str1.upper() == str2)print("\n")print(str1 == str2.lower())print("\n")number1 = 2number2 = 3print(number1 == number2)print(number1 != number2)print(...

2018-03-20 14:57:37 293

原创 第二周作业(2)——高级编程技术

注:上两次写的作业没有贴上代码,这一次贴上,以后会注意的。一. 4-1至4-15的作业节选4-1pizza = ['pepperoni pizza', 'seafood pizza', 'chicken pizza']for name in pizza: print("I like " + name + ".\n")print("I really love pizza!")4-2animals =...

2018-03-15 13:09:36 273

原创 第二周作业(1)——高级编程技术

一. 3-1至3-11作业节选3-13-23-33-43-53-63-7

2018-03-12 20:45:16 254

原创 第一周作业——高级编程技术

 一. 关于Python主页的发现和收获      首先,Python主页主要有六个大块,分别是它的大致形象,PSF,Docs,PyPl, Jobs, Community,很简洁明了的将这个整体分为相交相融的六大部分,很久没看过Python的主页了,看上去真的美化了很多。       最让我印象深刻的是它的主页轮番滚动的几幅代码图片,有简单明了的算术问题,有关于循环的,有一个斐波拉契数列的应用,有...

2018-03-11 17:22:10 210

空空如也

空空如也

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

TA关注的人

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