Getting started with artificial intelligence, TensorFlow environment installation guide

Pictures from the Internet artificial intelligence [1] At present, the hottest technology has profoundly changed human social life and the world. City Lions can't fall behind the times, TensorFlow [2] It is an artificial intelligence development framework developed by Google for machine learning and deep neural network. Here's how to use ...

Posted on Sun, 03 May 2020 07:12:23 -0700 by F.Danials

Python reads JSON files with comments

Python reads JSON files with comments When reading the json file, sometimes when there is a comment in the file, it will report Expecting property name: line 12 column 3 (char 268) This means that there are characters in 12 columns and 3 lines of the file that do not conform to JSON format, that is, comments. In order to parse the ...

Posted on Sun, 03 May 2020 05:06:52 -0700 by PRSBOY

How to assign different DB to different crawler items instead of just using db0

How to assign different DB to different crawler items instead of just using db0 1. Background By default, redis will generate 16 dB: db0 ~ db15. When writing a scrape redis distributed crawler, db0 will be used by default to store the de duplication, seed queue and item data. But in general, we don't have only one crawler project. If we put ...

Posted on Sun, 03 May 2020 03:16:03 -0700 by TheFilmGod

Basic knowledge of python operation database

How does python access the database? Through the database interface DB-API, it is a standard to clarify a series of required objects and database access mechanisms. It can provide consistent access for different database adapters and underlying database systems. In order to access the database, python has developed many adapters for connecting ...

Posted on Sun, 03 May 2020 00:47:37 -0700 by harshilshah

Grabbing the dynamic loaded profile page

preparation Using the language python Required library requests, re, math Get dynamic links Open the profile home page, recommend Firefox and Chrome, right-click to view the elements, select network options, then swipe the page, load new content, and find the links and request headers as shown in the following figure. Get load link Link a ...

Posted on Sat, 02 May 2020 19:48:29 -0700 by squimmy

Data Science Library for python learning

numpy create array #Import the numppy library and rename numpy to np. import numpy as np #1). Create an array: a, b, c create the same array, choose any one; #Method 1: Transform the data type to ndarray by passing the array/list directly into the array method. a = np.array([1, 2, 3, 4, 5]) #The value passed in by the array method can be a r ...

Posted on Sat, 02 May 2020 19:08:51 -0700 by malam

Use python to grab the website code and download the url inside

The code is as follows: #!/usr/bin/env python #-*- coding:utf-8 -*- #Code for python2.7 import os import urllib,urllib2 from lxml import etree rename_dic={} header = { "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36", "Referer": " ...

Posted on Sat, 02 May 2020 16:49:30 -0700 by BrandonE97

sqlalchemy foreign key Association

1, Create two tables and associate foreign keys Import ForenginKey module # -*- coding: UTF-8 -*- from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, Integer, String, DATE, Enum from sqlalchemy import ForeignKey from sqlalchemy.orm import sessionmaker engine = create_eng ...

Posted on Sat, 02 May 2020 16:05:45 -0700 by Kisses

Make a word cloud map generator here to send to you (with code), suggest collecting

Preface The text and pictures of this article are from the Internet, only for learning and communication, not for any commercial purpose. The copyright belongs to the original author. If you have any questions, please contact us in time for handling. Author: Yankai If you want to learn Python or are learning python, there are many Python tutori ...

Posted on Sat, 02 May 2020 10:33:47 -0700 by gdboling

django processing dynamic publishing of multiple image URLs

The back end is django There is a way to handle a set of picture URLs. A dynamic is not with many pictures. If the database uses urlfield, only one url can be saved. So I save a set of URLs as a js array, and then pass them in with json, and save them in charfile. When reading them, I need to do a processing. With a us ...

Posted on Sat, 02 May 2020 10:27:26 -0700 by jkeppens