- 博客(25)
- 资源 (4)
- 收藏
- 关注
原创 2021-09-08
std::string 去除前后空格```cpp// 去除前后空格std::string str = " hello ";str.erase(type.find_last_not_of(' ') + 1);str.erase(0, type.find_first_not_of(' '));
2021-09-08 17:13:13
81
转载 2021-08-03
原文网址(转载请注明出处): (http://blog.youkuaiyun.com/newchenxf/article/details/51364105) 目录 目录什么是ffmpeg filter如何使用ffmpeg filter 1 将输入的1920...
2021-08-03 17:52:17
260
原创 sklearn习题
Step1:from sklearn import datasetsdataset = datasets.make_classification(n_samples=1000, n_features=10, n_informative=2, n_redundant=2, n_repeated=0, n_classes=2)print(dataset)Step2:from sklearn.mod...
2018-06-22 11:18:58
355
原创 Seaborn 数据处理习题
1、先安装好jupyter,然后打开。、2、完成以下问题:Part 1For each of the four datasets...Compute the mean and variance of both x and yCompute the correlation coefficient between x and yCompute the linear regression line: y...
2018-06-11 13:30:01
692
原创 Scipy 习题
Exercise 10.1: Least squaresGenerate matrix A ∈ Rm×n with m > n. Also generate some vector b ∈ Rm.Now find x = arg minx ||Ax − b||2.Print the norm of the residual.
2018-06-07 13:01:23
282
原创 Numpy习题
Generate matrices A, with random Gaussian entries, B, a Toeplitz matrix, where A ∈ Rn×m and B ∈ Rm×m,for n = 200, m = 500.
2018-05-21 17:23:16
397
原创 66. Plus One
题目:Given a non-empty array of digits representing a non-negative integer, plus one to the integer.The digits are stored such that the most significant digit is at the head of the list, and each elemen...
2018-05-05 13:11:04
106
原创 70. Climbing Stairs
题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive ...
2018-04-29 21:33:49
95
原创 213. House Robber II
题目:Note: This is an extension of House Robber.After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time,...
2018-04-29 21:10:14
159
原创 55. Jump Game
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if you...
2018-04-24 11:30:05
159
原创 《Python编程 从入门到实践》第十一章习题选做
11-1 城市和国家city_functions.py文件:def get_city(city_name, country_name): full_name = city_name + ', ' + country_name return full_name.title()test_cities.py文件:import unittestfrom city_functions im...
2018-04-11 19:31:21
215
原创 《Python编程 从入门到实践》第十章习题选做
10-1 Python学习笔记在learning_python.txt文件:In Python you can learn how to program.In Python you can feel every interested.In Python you can learn how to solve hard problem.filename = 'learning_python.txt...
2018-04-04 22:16:56
290
原创 《Python编程 从入门到实践》第九章习题选做
9-1 餐馆class Restaurant(): def __init__(self, restaurant_name, cuisine_type): self.restaurant_name = restaurant_name self.cuisine_type = cuisine_type def describe_restaurant(se...
2018-04-03 22:43:00
109
原创 《Python编程 从入门到实践》第八章习题选做
8-1 消息def display_message(): print("I am learning about the function of Python.")display_message()输出:I am learning about the function of Python.8-2 喜欢的图书def favorite_book(title): msg = "One ...
2018-03-30 00:09:06
197
原创 《Python编程 从入门到实践》第七章习题选做
7-1 汽车租赁message = input("Please enter what kind of car you want to buy: ")print("Let me see if I can find you a " + message)输出:Please enter what kind of car you want to buy: BenzLet me see if I can...
2018-03-26 10:09:20
372
原创 《Python编程 从入门到实践》第六章习题选做
6-1 人message_person = { 'first_name': 'Hua', 'last_name': 'Li', 'age': 20, 'city': 'Guangzhou'}for key, value in message_person.items(): print(key, " : ", value)输出:first_name : ...
2018-03-22 15:47:40
179
原创 《Python编程 从入门到实践》第五章习题选做
5-3 外星人颜色#1alien_color = 'green'if alien_color == 'green': print("You have killed " + alien_color + " alien" + " and got 5 points!")alien_color = 'red'if alien_color == 'green': print("Yo...
2018-03-20 20:53:14
211
原创 《Python编程 从入门到实践》第四章习题选做
4-2 动物animals = ['dog', 'cat', 'tiger', 'lion']for animal in animals: print(animal)for animal in animals: print("A " + animal + " can run very fast.")print("Any of these animals have four ...
2018-03-14 22:06:27
217
原创 《Python编程 从入门到实践》第三章习题选做
3-4 嘉宾名单guests = ["Mike", "John", "Joe", "Amy", "Sarah"]for guest in guests: print("Dear " + guest + ", can I have dinner with you?")输出:Dear Mike, can I have dinner with you?Dear
2018-03-14 21:25:20
174
原创 《Python编程 从入门到实践》第二章习题选做
2-2 多条简单信息message = "Hello World!"print(message)message = "Hello Python!"print(message)输出:Hello World!Hello Python!2-3 个性化消息name = input("Your name is: ")print("Hello " + name.title() + ", w...
2018-03-10 21:51:13
222
原创 读Python官网有感+目标
读Python官网有感 在浏览Python主页时,首先就看到了网页给出了几个简单的Python代码,整体上了解到Python的代码风格。与以前学习的C或C++相比,感觉Python与之相比更加简洁易懂。 个人觉得那个Docs专栏对我的帮助可能会更大一点,因为我在里面发现了一些关于Python学习资料,虽然这些资料都是英文的,但是感觉比较官方和正式。进去之后发现有对Python的标准库进...
2018-03-09 22:37:04
231
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人