Lab02_WriteUp

dataset Question 1 For this question we will use SQL to extract data out of the indiv_sample_nyc table. The schema for this table is given below. Question 1a Let’s start by looking at 2016 election contributions made by Donald Trump, who was a NY resident during that year. Write a SQL statement that will return the cmte_id, transaction_amt, and name for every contribution made by any donor with “DONALD” and “TRUMP” in their name.

Lab01_WriteUp

Question 1 Question 1a Write a function summation that evaluates the following summation for $n \geq 1$: $$\sum_{i=1}^{n} i^3 + 3 i^2$$ 1 2 3 4 def summation(n): """Compute the summation i^3 + 3 * i^2 for 1 <= i <= n.""" ... return sum(i**3+3*i**2 for i in range(1,n+1)) Question 1b Write a function elementwise_list_sum that computes the square of each value in list_1, the cube of each value in list_2, then returns a list containing the element-wise sum of these results.

ML for Finance in Python

Description Preparing data and a linear model Machine learning tree methods Neural networks and KNN Machine learning with modern portfolio theory 这门课是基于DataCamp, 其实前面很大一部分都是在介绍python中的一些科学工具包: Numpy Pandas Matplotlib Seaborn

二叉树

二叉树 前序遍历 根节点-> 左孩子-> 右孩子 中序遍历 左孩子-> 根节点-> 右孩子 后序遍历 左孩子->右孩子-> 根

从尾到头打印链表

从尾到头打印链表 输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。 示例1 1 2 **输入** head = [1,3,2] **输出** [2,3,1] 限制 0 <= 链表长