Python notes (15): anonymous functions and @ property

(1) Anonymous function You can use anonymous functions when you don't want to display the defined functions. 1 def f(x): 2 return x*x 3 4 #Assign anonymous functions to a variable 5 result = lambda x:x*x 6 7 print(result(5)) 8 print(f(5)) From the output, we can see that lambda x:x*x is actually: 1 def f(x): 2 return x*x The lambd ...

Posted by chantown on Sat, 15 Feb 2020 08:29:52 -0800

[Java_22] JDK New

JDK 1.8 New 1. Functional interface 1. Functional interface (1) Concepts *Interfaces with only one abstract method (2) Format @FunctionalInterface //Use this comment to determine if the interface is a functional interface. public class class name { public abstract return value method name (parameter list); } 2. Funct ...

Posted by starnol on Thu, 13 Feb 2020 12:55:40 -0800

[deep learning] village to network -- on the new features of tensorflow Eagle execution mechanism

Article directory Preface Convolution directly using operation Automatically calculate gradient (derivative) Calculate the gradient of all parameters Calculate the gradient of all variables Using Python program flow to control model flow Automatic optimization Preface This article is [deep lea ...

Posted by bubatalazi on Thu, 13 Feb 2020 02:09:50 -0800

Java lambda expression understanding

brief introduction As a new feature of java8, lambda expression is oriented to function programming, which makes the code more concise and improves the programming efficiency. As a developer, we should not only learn to use it, but also understand the operation principle behind it lambda general use ...

Posted by ntohky14 on Tue, 11 Feb 2020 23:45:23 -0800

Take a quick look at jdk8

You've been watching java concurrently and you've been saying a bit too much. Just relax!This time, let's briefly talk about jdk8, which has not been used for a long time and is new to us. It's interesting to look at it carefully. Let's turn our brain into an angle to write code. Because we usually write code in jdk7 now, we are all thinking ab ...

Posted by Xephon on Tue, 11 Feb 2020 10:42:17 -0800

Introduction to Python neural network (handwritten digit recognition)

1.1 personal records ① Using Python 3.7 ② The editor is pycharm (I don't think it's easy to use, many libraries will fail directly, and print can't save - complaints of lazy cancer), the solution. For example, scipy, please download pip install scipy in cmd. imshow () does not show the problem of imag ...

Posted by David Rech on Sat, 08 Feb 2020 09:07:01 -0800

Two factor analysis of variance without repetition in python

Case study: Analyze whether brands and regions have a significant impact on sales volume() Make assumptions: In order to test the influence of the two factors, we need to put forward the following assumptions for the two factors. The assumptions for the line factors are as follows: Since there ...

Posted by trevHCS on Sat, 08 Feb 2020 01:35:54 -0800

[Python] 25 useful Python snippets to help you with your daily work

Introduction Python is a general advanced programming language.There are many things you can do with it, such as developing desktop GUI applications, Web sites, Web applications, and so on. Python also allows developers to focus on the core functionality of the application by handling common programm ...

Posted by Goafer on Fri, 07 Feb 2020 22:20:58 -0800

JavaScript arrow function

  Arrow function is equivalent to Lambda expression or closure syntax of other languages. Arrow function is a simplified way to write ordinary functions. The syntax format of the arrow function is as follows: {pararnl, pararn2,..., pararnN) => {statements } Amount to: function (paraml, par ...

Posted by micklerlop on Thu, 06 Feb 2020 04:28:09 -0800

Multiple linear regression -- case analysis and python practice

Regression analysis -- multiple regression Introduce the statistics in multiple regression analysis Total observed value Total independent variable Freedom: return degrees of freedom, residual degrees of freedom Sum of total square of SST Sum of squares of SSR regression Sum of squares o ...

Posted by liza on Mon, 03 Feb 2020 07:07:43 -0800