[experience sharing] 15 Python code writing methods, elegant, authentic and neat!
Python because of the simplicity of the language, let's write code in the way of human thinking, it's easier for the novice to start, and the old bird can't let go.
To write python (elegant, authentic and neat) code, and to observe the big bull code more often, there are many excellent source codes on Github that are worth reading, such as req ...
Posted by Mr Chew on Thu, 23 Apr 2020 02:18:11 -0700
Read the Lodash source code -- compact.js
There is a general sky Gang number, which changes in thirty-six ways; there is a general evil number, which changes in seventy-two ways -- "journey to the west"
Compact.js
Lodash second api_.compact(array)
It means to delete all the values in the array that can be converted to false through Boolean values, such as null, false, '', 0 ...
Posted by BoukeBuffel on Wed, 22 Apr 2020 08:34:51 -0700
Android custom Camera
Address: https://github.com/danfengfirst/Camera
Demo Description:
1. Demo contains a custom rectangular View. Generally, a picture can be placed in this rectangle. Because of the special requirement of aspect ratio, we hope to keep the same aspect ratio in different screens, so we have customized it here. The custom part can be replaced by ...
Posted by Ajdija on Mon, 20 Apr 2020 10:33:22 -0700
LeetCode 200. Number of islands
My LeetCode: https://leetcode-cn.com/u/ituring/
My LeetCode source code [GitHub]: https://github.com/izhoujie/Algorithmcii
LeetCode 200. Number of islands
subject
Give you a two-dimensional grid consisting of '1' (land) and '0' (water). Please calculate the number of islands in the grid.
Islands are always surrounded by water, and each island ...
Posted by JunbinDuan on Mon, 20 Apr 2020 07:16:57 -0700
LeetCode 466. Count the number of duplicates
My LeetCode: https://leetcode-cn.com/u/ituring/
My LeetCode source code [GitHub]: https://github.com/izhoujie/Algorithmcii
LeetCode 466. Count the number of duplicates
subject
The string s is composed of N connected strings S, which is recorded as S = [s,n]. For example, ["abc",3] = "ABC ABC".
If we can remove some charact ...
Posted by lmg on Mon, 20 Apr 2020 04:57:11 -0700
JavaScript serialization 5-data conversion to Number and String, Number parsing
1, Series 4
3. If null and undefined do not have toString() method, the call will report an error
var num1 = undefined;
console.log(num1.toString());
var num2 = null;
console.log(num2.toString());
2, String()
1. Regular use
Some values do not have the toString() method. You can use the String() method at this time, such ...
Posted by wellscam on Sun, 19 Apr 2020 04:45:09 -0700
How to map common epidemics such as roses with Python
The new crown epidemic has lasted for several months. At present, the epidemic situation in our country has been basically controlled, while the European and American countries are in the period of outbreak. We will see that many websites have provided a variety of epidemic statistics maps. Today, we use Python's pyecharts framework to draw som ...
Posted by linux1880 on Sat, 18 Apr 2020 19:07:53 -0700
Sphinx + GitHub + ReadtheDocs to create e-books
Read the Docs Is an online document hosting service that allows you to import documents from various version control systems.In general, this is ideal for writing software documents, tutorials, e-books, and so on.
Sphinx
Sphinx is a Python-based document generation project that was originally used to generate official Python documents. With ...
Posted by bpops on Sat, 18 Apr 2020 17:29:40 -0700
Android refresh display data change animation
Preface
Let's first look at an effect and expand the content of this article.
Realization
After a general App is refreshed, it will show how much content or update has been added. It is common for news or live broadcast. So, how to achieve this effect?
Pull down to refresh. After getting the latest data of the server, the siz ...
Posted by Jason_London on Fri, 17 Apr 2020 09:40:35 -0700
Convolution neural network in python
Code source: https://github.com/eriklindernoren/ML-From-Scratch
The specific implementation of convolution layer Conv2D (with strip and padding) in convolution neural network: https://www.cnblogs.com/xiximayou/p/12706576.html
Implementation of activation function (sigmoid, softmax, tanh, relu, leakyrelu, elu, selu, softplus): https://www.cnbl ...
Posted by nymall on Fri, 17 Apr 2020 02:25:05 -0700