作者:guopengfa

Python学习之名字,作用域,名字空间

目录LEGB规则global表达式属性引用与名字引用属性空间小结LEGB规则从Python2.2开始,由于引入了嵌套函数,所以最好的方式应该是内层函数找不到某个变量时先去外层函数找,而不是直接就跑到global空间里面找。

guopengfa guopengfa 发布于 2022-09-15

Some npm note

guopengfa guopengfa 发布于 2022-09-03

Python tips

>>>a = '1'>>>print(a)1>>>b = '1'.zfill(2*4)>>>print(b)00000001

guopengfa guopengfa 发布于 2022-04-25

generate gif file from static image

import imageio, os, sysdef png_gif(path): png_lst = os.listdir(path) frames = [] for i in png_lst: frames.append(imageio.imread(path +

guopengfa guopengfa 发布于 2022-04-21

pytorch 1

let's use torch to create first neural network: according we input data to trainning model by itself.import torchfrom torch.nn import functionalfrom m

guopengfa guopengfa 发布于 2022-04-21

a big problem when you install torch

IssueMaybe after you installed torch, you will found your graphics card can't available on your torch. I guess you must use pip repo or conda repo to

guopengfa guopengfa 发布于 2022-04-20

machine learnning - identification verify code image

identify verify code imagemachine learnning - identification verify code image - [opencv to identify string, machine learning to identify what string]

guopengfa guopengfa 发布于 2022-04-14

Breakthrough Anxiety

When you anxie something you don't have to blame to all something that didn't hit mark befor.See the communication who the be called successed people.

guopengfa guopengfa 发布于 2022-03-19