The difference between Python and Java

... Python and Java difference : 1.Python is simpler than Java, low learning cost, high development efficiency 2. Java runs more efficiently than Python, especially pure Python-developed programs, which are extremely inefficient. 3. There are many Java related materials, especially Chinese...


Python Learning Diary-14-Function

... def f(): print('ok') f() # ok def add(x,y): print(x + y) add(3,5) # 8 def print_info(name, age, sex='male'): # Default parameters must follow other parameters Print('Name: %s'% name) Print('Age: %d' % age) Print('Sex: %s' % sex) Print_info('kkk',18) # required parameter Print_info(name=...


Python metaclass metaclass

... 一,What is metaclass python Everything is an object # -*- encoding:utf-8 -*- class OldboyTeacher(object): school='oldboy' def __init__(self,name,age): self.name=name self.age=age def say(self): print('%s says welcome to the oldboy to learn Python' %self.name) All objects are instantiated...


How to check if a large number of web pages are updated at one time? Python to solve! Python is omnipotent!

... We want you to know that writes in Python a program that automatically checks if multiple URLs are updated, and can track the latest developments of related web pages. Because of the need for Xiaobian work, from time to time to check whether a lot of websites have updates or changes,...


Reptile - scrapy entry

... scrapy install scrapy pip install scrapy windows may fail to install, you need to install c++ library or twisted, pip install twisted Create project scrapy startproject tutorial This command will create a tutorial directory with the following contents: tutorial/ scrapy.cfg tutorial / _...


Use Eclipse+pydev+django to develop python website

... 1, download the latest Eclipse version 4.9 2, because we downloaded 64-bit, so jdk must also use 64-bit, I chose 1.8 version, not to repeat 3, python select the latest version 3.7, the official download can be, the installation has been the next step 4, django select the latest version ...


Feed_dict related questions in tensorflow

... 问题说明: feed_dict for image_batch, the result has been reported error: TypeError: The value of a feed cannot be a tf.Tensor object. Acceptable feed values include Python scalars, strings, lists, numpy ndarrays, or TensorHandles.For reference, the tensor object was Tensor("shuffle_batch_1:...


Logger file

... #coding=utf-8 #!/usr/bin/python import logging # Create a logger Def getLogger(name): Logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) # Create a handler for writing log files Fh = logging.FileHandler('log/py_ans_api.log') fh.setLevel(logging.DEBUG) # Create a handler for...


[Linux] path, mkdir, touch, vi and other knowledge knowledge Q&A

... mkdir make directorys Create directory example: mkdir /data Create data directory under root/under ls list (list) Create directory file example : ls / column root directory content -l (long) long format, -d (directorys) view directory cd change directory Change directory path example:...


FasterRCNN additions and deletions and training need to modify the local

... FasterRCNN additions and deletions and training needs to be modified, some bits and pieces, must be modified in place to train, in the process of checking some information, combined with their own experience is complete Completely sorted out for later use. 一,Modification of...