แนะนำ Packages และ Documentation

หลักการวิศวกรรมซอฟต์แวร์ใน Python

Adam Spannbauer

Machine Learning Engineer at Eastman

Packages และ PyPi

โลโก้ PyPi

หลักการวิศวกรรมซอฟต์แวร์ใน Python

เริ่มต้นใช้งาน pip

PyPi pip install

หลักการวิศวกรรมซอฟต์แวร์ใน Python

เริ่มต้นใช้งาน pip

PyPi pip install

หลักการวิศวกรรมซอฟต์แวร์ใน Python

ใช้ pip ติดตั้ง numpy

datacamp@server:~$ pip install numpy
Collecting numpy
    100% |████████████████████████████████| 24.5MB 44kB/s 
Installing collected packages: numpy
Successfully installed numpy-1.15.4
หลักการวิศวกรรมซอฟต์แวร์ใน Python

ใช้งาน numpy อย่างไร?

การอ่าน Documentation

หลักการวิศวกรรมซอฟต์แวร์ใน Python

อ่าน Documentation ด้วย help()

help(numpy.busday_count)
busday_count(begindates, enddates)
    Counts the number of valid days between `begindates` and
    `enddates`, not including the day of `enddates`.

Parameters ---------- begindates : the first dates for counting. enddates : the end dates for counting (excluded from the count)
Returns ------- out : the number of valid days between the begin and end dates.
Examples -------- >>> # Number of weekdays in 2011 ... np.busday_count('2011', '2012') 260
หลักการวิศวกรรมซอฟต์แวร์ใน Python

อ่าน Documentation ด้วย help()

import numpy as np
help(np)
    Provides
      1. An array object of arbitrary homogeneous items
      2. Fast mathematical operations over arrays
      3. Linear Algebra, Fourier Transforms, Random Number Generation
help(42)
class int(object)
 |  int(x=0) -> integer
 |  int(x, base=10) -> integer
 |  
 |  Convert a number or string to an integer, or return 0 if no arguments
 |  are given.  If x is a number, return x.__int__().  For floating point
 |  numbers, this truncates towards zero.
หลักการวิศวกรรมซอฟต์แวร์ใน Python

มาฝึกกันเถอะ!

หลักการวิศวกรรมซอฟต์แวร์ใน Python

Preparing Video For Download...