Introduction to Python: A brief introduction to standard libraries

Operating System Interface The os module provides many functions that interact with the operating system: >>> >>> import os >>> os.getcwd() # Return the current working directory 'C:\\Python37' >>> os.chdir('/server/accesslogs') # Change current working directory >>> os.system(' ...

Posted on Thu, 10 Oct 2019 04:55:31 -0400 by macmonkey

weka reads data from mysql using Java API

1. Preface Weka is a machine learning algorithm library that supports reading data from files and from databases. From the actual development point of view, reading data from the database is more in line with the actual requirements. 2.pom.xml Create a maven project to add dependencies <dependencies> <!--weka ALGORITHM B ...

Posted on Thu, 10 Oct 2019 01:13:15 -0400 by dylan001

Sending mail in scrapy Middleware

Background: I've written about sending e-mails through scrapy extensions and when the crawler closes. At that time, there was a problem that the MailSender object needed to return. This time you need to send mail in the middleware, but you can't use return casually in the middleware. import json import random import scrapy from scrapy.http impo ...

Posted on Wed, 09 Oct 2019 22:58:37 -0400 by Daniel.Conaghan1

Jetpack series: Paging components help you solve the pain of paging load implementation

I believe that many small partners in the actual project, often used the interface paging display, loading more functions. It is time-consuming and labor-consuming to develop and debug specific functions. The use of Paging components simplifies this part of the work, thus allowing developers to focus more on the specific implementation of the b ...

Posted on Wed, 09 Oct 2019 22:56:29 -0400 by simon622

The insert method in mybatis is used to insert data, the return value is 1, but the database has no data.

Mybatis Data Insertion Error Problem 1. Eliminate table setting errors in database 2. Two Solutions 2.1 Using commit 2.2 openSession() Method Parameter Problem Today, when using Mybatis framework for database insertion, I encountered several super strange problems, which may be that I am really a ...

Posted on Wed, 09 Oct 2019 21:54:54 -0400 by stilgar

java long link to short link code and how to jump to use

I. Realization Principle 1. Using md5 algorithm, a 32-bit signature string is generated for a long web site, which is divided into four segments, each with eight characters. 2. For each of the four cycles, 8 characters are taken as hexadecimal strings and bits and operations of 0x3fffffff(30-bit-1), and more than 30 bits are ignored. It's use ...

Posted on Wed, 09 Oct 2019 17:56:19 -0400 by v4g

oracle 12c scalable lgwr process improves performance

os: centos 7.6 db: oracle 19.3 Before the oracle11g version and the oracle log writing process, lgwr is a single process. As we all know, the efficiency of single process writing is not high. Oracle 12C version of the new feature: lgwr multi-process. That is, multiple lgwrs are used to write redo log jo ...

Posted on Wed, 09 Oct 2019 17:55:59 -0400 by zaneosak

[Reprint] The Java server "problem" we saw in those years

This article is reproduced from https://yq.aliyun.com/articles/720137?spm=a2c4e.11157919.spm-cont-list.75.7414f2046YyDaB Introduction Mr. Wang Yangming, a well-known scholar of mind in Ming Dynasty, has a cloud in his Biography: The Tao is not refined and rough, but what people see is refined and rough. If this room, people first came in ...

Posted on Wed, 09 Oct 2019 17:52:41 -0400 by wad

Django uses redis to cache session, history browsing, and homepage data to optimize performance

Redis cache session Configure Django to cache data into redis # diango Cache configuration of CACHES = { "default": { "BACKEND": "django_redis.cache.RedisCache", # User session Information, history browsing records are stored in redis In database 9 "LOCATION": "redis://127.0.0.1:6379/9", "OPTIONS": ...

Posted on Wed, 09 Oct 2019 11:19:37 -0400 by Trs2988

Crawling tens of thousands of web pages HTML content to generate DataFrame tables and then process column data to get the information I want.

The last generated data is Dataframe type, which contains url and urldata columns, urldata is crawling web page information, but it is the entire HTML content, there are codes, there are garbled, Latin is anyway everything. I screened it and showed me the information I wanted. Actually, I just take out ...

Posted on Wed, 09 Oct 2019 10:18:07 -0400 by The Saint