Monday, March 23, 2020

Advanced Python

  • Installation
    • import numpy as np
  • Request is deprecated
  • Python 2.x is deprecated (Python 2.7 is usually pre-installed on Macs 3-7 years from 2020). 
  • BeautifulSoup
  • Pyecharts
  • Scrapy
  • Pycharm
  • mylist = [1,2,3,4]
  • np_array= np.array(mylist)
  • Slicing
    • Entire list mylist[:]
    • Slicing zeroth to 0th, 1st element mylist[0:2]
    • The second position is exclusive
  • Function signature
    • What type of input is expected? Example CSV
    • What type of output is expected?
    • What is the functionaltiy
    • Each functionality does one task
  • Using an IDE
    • Anaconda Spyder (Scientific Python Development Environment)
    • PyCharm
    • Why use an IDE: 
    • tool kit plugin
    • pycharm can refactor update references when files move
    • get styling hints: json does not allow trailing comma
    • error highlighting
  • which python
    • this command is used to check which python version is launched
  • pip is the package management tool. It is used to install python software packages.  Can also use pip to install another package manager, specializing in data science tasks called anaconda.
  • In any language, do not overly rely on print statements for debugging.
  • String is immutable example: string"[2] = 3 # TypeError: 'str' object does not support item assignment
  • Style
    • Use indentation to track code hierarchy, nested function calls etc.

1 comment:

  1. I am glad to be one of the visitors on this great web site (:, appreciate it for putting up.


Error Message Hardhat debugging error unsupported engine hardhat, current node v18

Error message npm WARN EBADENGINE  Unsupported engine { package: 'hardhat@2.9.3', required: { node: '^12.0.0 || 14.0.0 || 16.0.0...