12 2017 档案

摘要:A histogram is an accurate representation of the distribution of numerical data. Y axis is the occurances, X axis is the % of daily return. There are 阅读全文
posted @ 2017-12-28 21:34 Zhentiw 阅读(893) 评论(0) 推荐(0) 编辑
摘要:In React, when you want to set the state which calculation depends on the current state, using an object can lead to state inconsistency. This is due 阅读全文
posted @ 2017-12-28 03:33 Zhentiw 阅读(217) 评论(0) 推荐(0) 编辑
摘要:This lesson takes the concept of render props and migrates it over to streaming props by keeping the same example and simple refactoring the Togglecom 阅读全文
posted @ 2017-12-28 03:26 Zhentiw 阅读(199) 评论(0) 推荐(0) 编辑
摘要:If you hard-code a stream of props to target a specific prop, it becomes impossible to reuse that stream with any other components. Configuring your p 阅读全文
posted @ 2017-12-28 03:21 Zhentiw 阅读(218) 评论(0) 推荐(0) 编辑
摘要:Functions created with mapPropsStream canned be composed together to build up powerful streams. Bring in the compose helper from Recompose then simply 阅读全文
posted @ 2017-12-27 20:03 Zhentiw 阅读(254) 评论(0) 推荐(0) 编辑
摘要:Rather than using Components to push streams into other Components, mapPropsStream allows you to create functions that can wrap components to create s 阅读全文
posted @ 2017-12-22 20:01 Zhentiw 阅读(485) 评论(0) 推荐(0) 编辑
摘要:You can decouple the parent stream Component from the mapped React Component by using props.children instead. This process involves mapping the stream 阅读全文
posted @ 2017-12-22 19:27 Zhentiw 阅读(381) 评论(0) 推荐(0) 编辑
摘要:Combining input streams then using scan to track the results is a common scenario when coding with streams. This lesson walks you through setting up t 阅读全文
posted @ 2017-12-22 19:18 Zhentiw 阅读(181) 评论(0) 推荐(0) 编辑
摘要:Events are the beginning of most every stream. Recompose provides a createEventHandler function to help your create handler and stream pairs. Once the 阅读全文
posted @ 2017-12-22 03:59 Zhentiw 阅读(214) 评论(0) 推荐(0) 编辑
摘要:Loading data using RxJS is simple using Observable.ajax. This lesson shows you how to take the ajax response and pass it along the stream to use as pr 阅读全文
posted @ 2017-12-22 03:34 Zhentiw 阅读(330) 评论(0) 推荐(0) 编辑
摘要:When you declare your Component and Props in JSX, you can pass those props along to your RxJS stream. This is typically done using switchMap or combin 阅读全文
posted @ 2017-12-22 03:22 Zhentiw 阅读(158) 评论(0) 推荐(0) 编辑
摘要:Recompose provides helper functions to stream props using an Observable library of your choice into React. This lesson shows you how to configure Reco 阅读全文
posted @ 2017-12-22 02:56 Zhentiw 阅读(216) 评论(0) 推荐(0) 编辑
摘要:In the store marketing, for many reason, one stock's data can be incomplete: We can use 'forward fill' and 'backward fill' to fill the gap: forward fi 阅读全文
posted @ 2017-12-22 02:41 Zhentiw 阅读(3216) 评论(0) 推荐(0) 编辑
摘要:Global Statistics: Common seen methods as such 1. Mean 2. Median 3. Standard deviation: the larger the number means it various a lot. 4. Sum. Rolling 阅读全文
posted @ 2017-12-21 21:30 Zhentiw 阅读(809) 评论(0) 推荐(0) 编辑
摘要:@{{user.username}} has {{followerCount}} followers button renders here Follow Unfollow 阅读全文
posted @ 2017-12-21 01:27 Zhentiw 阅读(378) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Indexing Integer array indexing Boolean array indexing Note: The expression a < mean produces a boolean array, like: 阅读全文
posted @ 2017-12-19 20:06 Zhentiw 阅读(599) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Indexing Integer array indexing: Select array elements with another array 阅读全文
posted @ 2017-12-18 21:32 Zhentiw 阅读(248) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Indexing Note: Indexing starts at 0 (zero). def slicing(): a = np.random.rand(5,4) print(a) """ [[ 0.15372787 0.83347785 0.86855635 0 阅读全文
posted @ 2017-12-18 21:21 Zhentiw 阅读(212) 评论(0) 推荐(0) 编辑
摘要:NumPy Reference: Mathematical functions numpy.sum: Sum of elements - along rows, columns or all numpy.min, numpy.max, numpy.mean: Simple statistics Al 阅读全文
posted @ 2017-12-18 21:08 Zhentiw 阅读(170) 评论(0) 推荐(0) 编辑
摘要:When making a reusable component, you'll find that people often like to have the API they're most familiar with, so in this lesson we'll recreate the  阅读全文
posted @ 2017-12-18 19:50 Zhentiw 阅读(209) 评论(0) 推荐(0) 编辑
摘要:If you have state that needs to exist throughout your application, then you may find yourself passing props all over the application and even "drillin 阅读全文
posted @ 2017-12-18 15:55 Zhentiw 阅读(242) 评论(0) 推荐(0) 编辑
摘要:Attributes of numpy.ndarray: numpy.ndarray.shape: Dimensions (height, width, ...) numpy.ndarray.ndim: No. of dimensions = len(shape) numpy.ndarray.siz 阅读全文
posted @ 2017-12-17 23:38 Zhentiw 阅读(222) 评论(0) 推荐(0) 编辑
摘要:import numpy as np def test_run(): data=np.random.random((3,4)) """ [[ 0.80150549 0.96756513 0.18914514 0.85937016] [ 0.23563908 0.75685996 0.46804508 0.91735016] [ 0.7054... 阅读全文
posted @ 2017-12-17 23:30 Zhentiw 阅读(279) 评论(0) 推荐(0) 编辑
摘要:It is easy to compare the data by normalize it. 阅读全文
posted @ 2017-12-17 23:02 Zhentiw 阅读(1850) 评论(0) 推荐(0) 编辑
摘要:import os import pandas as pd import matplotlib.pyplot as plt def test_run(): start_date='2017-01-01' end_data='2017-12-15' dates=pd.date_range(start_ 阅读全文
posted @ 2017-12-17 22:47 Zhentiw 阅读(448) 评论(0) 推荐(0) 编辑
摘要:For example we have dataframe like this: Now we only we want to get highlighted part: We can use Dataframe.ix[] method to get date related index data 阅读全文
posted @ 2017-12-17 22:35 Zhentiw 阅读(314) 评论(0) 推荐(0) 编辑
摘要:Create an empty Data frame with date index: Now we want to load SPY.csv and get 'Adj Close' column value and copy the range (11-21, 11-28) data to the 阅读全文
posted @ 2017-12-17 02:12 Zhentiw 阅读(768) 评论(0) 推荐(0) 编辑
摘要:Install: 阅读全文
posted @ 2017-12-15 20:58 Zhentiw 阅读(354) 评论(0) 推荐(0) 编辑
摘要:Sometimes users of your component want to have more control over what the internal state is. In this lesson we'll learn how to allow users to control 阅读全文
posted @ 2017-12-15 01:48 Zhentiw 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Sometimes you have common use cases that require common props to be applied to certain elements. You can collect these props into an object for users 阅读全文
posted @ 2017-12-14 01:30 Zhentiw 阅读(149) 评论(0) 推荐(0) 编辑
摘要:Object oriented classes work much like classes in other languages. Learn how to create them and use them, learn the difference between class variables 阅读全文
posted @ 2017-12-13 16:27 Zhentiw 阅读(176) 评论(0) 推荐(0) 编辑
摘要:Misunderstanding scope can cause problems in your application. Watch this lesson to learn how Python scope works and the hidden implications it presen 阅读全文
posted @ 2017-12-13 16:18 Zhentiw 阅读(274) 评论(0) 推荐(0) 编辑
摘要:Exceptions cause your application to crash. Handling them allows you to recover gracefully and keep your application running. Learn how to handle exce 阅读全文
posted @ 2017-12-13 16:08 Zhentiw 阅读(195) 评论(0) 推荐(0) 编辑
摘要:This lesson will teach you how to read the contents of an external file from Python. You will also learn how to use the python csv module to read and 阅读全文
posted @ 2017-12-13 15:59 Zhentiw 阅读(255) 评论(0) 推荐(0) 编辑
摘要:Compound component gives more rendering control to the user. The functionality of the component stays intact while how it looks and the order of the c 阅读全文
posted @ 2017-12-13 03:02 Zhentiw 阅读(247) 评论(0) 推荐(0) 编辑
摘要:A module is a function extracted to a file. This allows you to import the function and use it in any other code you may write. You’ll learn how to cre 阅读全文
posted @ 2017-12-12 17:19 Zhentiw 阅读(164) 评论(0) 推荐(0) 编辑
摘要:Parcel comes in as the new cool kid in the bundlers world. Unlike other bundlers which take lots of explicit configuration, Parcel works out of the bo 阅读全文
posted @ 2017-12-11 16:06 Zhentiw 阅读(230) 评论(0) 推荐(0) 编辑
摘要:A function's this argument is usually set implicitly, depending on how the function is called. Ordinary function calls, method calls, and constructor 阅读全文
posted @ 2017-12-11 15:54 Zhentiw 阅读(107) 评论(0) 推荐(0) 编辑
摘要:In most cases, the value of a function's this argument is determined by how the function is called. This lesson explains what thisrefers to when we ca 阅读全文
posted @ 2017-12-11 15:42 Zhentiw 阅读(213) 评论(0) 推荐(0) 编辑
摘要:Print statements will get you a long way in monitoring the behavior of your application, but logging will get your further. Learn how to implement log 阅读全文
posted @ 2017-12-11 14:54 Zhentiw 阅读(206) 评论(0) 推荐(0) 编辑
摘要:A set is an unordered collection with no duplicate items in Python. In this lesson, you will learn how to create them, and perform basic operations to 阅读全文
posted @ 2017-12-11 01:42 Zhentiw 阅读(147) 评论(0) 推荐(0) 编辑
摘要:Dictionaries may be familiar to you as hash maps. In this lesson, you will learn how to create them, get the values, and delete elements from the dict 阅读全文
posted @ 2017-12-11 01:34 Zhentiw 阅读(192) 评论(0) 推荐(0) 编辑
摘要:List comprehensions provide a concise way to create new lists, where each item is the result of an operation applied to each member of an existing lis 阅读全文
posted @ 2017-12-10 23:24 Zhentiw 阅读(289) 评论(0) 推荐(0) 编辑
摘要:isinstance("foo", str) isinstance(1, int) isinstance(4.0, float) 阅读全文
posted @ 2017-12-10 23:14 Zhentiw 阅读(163) 评论(0) 推荐(0) 编辑
摘要:For example you want to know what methods are available in Python for String, you can do : Output: Now for example, we want to see How to use 'swapcas 阅读全文
posted @ 2017-12-10 02:46 Zhentiw 阅读(223) 评论(0) 推荐(0) 编辑
摘要:Single quotes and double quotes can both be used to declare strings in Python. You can even use triple-double quotes! Learn when to use each in this l 阅读全文
posted @ 2017-12-09 23:05 Zhentiw 阅读(168) 评论(0) 推荐(0) 编辑
摘要:Python scripts can be executed by passing the script name to the python command or created as executable commands that can run stand-alone. You’ll lea 阅读全文
posted @ 2017-12-09 17:59 Zhentiw 阅读(1524) 评论(0) 推荐(0) 编辑
摘要:In this lesson, you will learn what mutable and immutable objects are, and the difference between them. This understanding will help you determine whe 阅读全文
posted @ 2017-12-09 17:53 Zhentiw 阅读(260) 评论(0) 推荐(0) 编辑
摘要:If you’ve used other programming languages, you may have learned that an empty object is not the same as an object that does not exist. In this lesson 阅读全文
posted @ 2017-12-09 17:49 Zhentiw 阅读(1442) 评论(0) 推荐(0) 编辑
摘要:Virtual Environments ensure that dependencies from one Python application don’t overwrite the dependencies of another application. In this lesson, you 阅读全文
posted @ 2017-12-09 17:41 Zhentiw 阅读(196) 评论(0) 推荐(0) 编辑
摘要:In this lesson we'll talk about controlling the value for inputs, textareas, and select elements. We'll see how to manage the state ourselves while st 阅读全文
posted @ 2017-12-08 20:54 Zhentiw 阅读(186) 评论(0) 推荐(0) 编辑
摘要:In this lesson we'll take a stopwatch component we built in another lesson and identify and fix a memory leak. Tow things to notice here is that: 1. t 阅读全文
posted @ 2017-12-07 20:33 Zhentiw 阅读(699) 评论(0) 推荐(0) 编辑
摘要:In this lesson we'll learn about how you can use the prop-types module to validate a custom React component's props. You can write you own PropTypes v 阅读全文
posted @ 2017-12-07 20:09 Zhentiw 阅读(229) 评论(0) 推荐(0) 编辑
摘要:import time import urllib import bs4 import requests start_url = "https://en.wikipedia.org/wiki/Special:Random" target_url = "https://en.wikipedia.org/wiki/Philosophy" def find_first_link(url): ... 阅读全文
posted @ 2017-12-07 16:36 Zhentiw 阅读(349) 评论(0) 推荐(0) 编辑
摘要:# Python's list slice syntax can be used without indices # for a few fun and useful things: # You can clear all elements from a list: >>> lst = [1, 2, 3, 4, 5] >>> del lst[:] >>> lst [] # You can r... 阅读全文
posted @ 2017-12-07 15:39 Zhentiw 阅读(236) 评论(0) 推荐(0) 编辑
摘要:https://docs.python.org/2/library/collections.html 阅读全文
posted @ 2017-12-07 15:20 Zhentiw 阅读(200) 评论(0) 推荐(0) 编辑
摘要:>>> import itertools >>> for p in itertools.permutations('ABCD'): ... print(p) ('A', 'B', 'C', 'D') ('A', 'B', 'D', 'C') ('A', 'C', 'B', 'D') ('A', 'C', 'D 阅读全文
posted @ 2017-12-07 15:10 Zhentiw 阅读(199) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示