Connecting mysql database with python-the use of pymysql module
Install pymysql
pip install pymysql
Using pymysql
Use data query statements
Query a data fetchone()
from pymysql import *
conn = connect(
host='127.0.0.1',
port=3306, user='root',
password='123456',
database='itcast',
charset='utf8')
# Create cursors
c = conn.cursor()
# Execute sql statements
c.execute("select * from stu ...
Posted by Abarak on Mon, 30 Sep 2019 16:38:05 -0700
CountVectorizer method for feature extraction in Chinese
Count Vectorizer Method for Feature Extraction
from sklearn.feature.extraction.text import CountVectorizer
This method continues text categorization by quantitative statistics based on word segmentation
Text feature extraction
Function: Eigenization of text
sklearn.feature_extraction.text.CountVectorizer(stop_words = [])
Return: Frequenc ...
Posted by klaibert26 on Mon, 30 Sep 2019 04:31:22 -0700
Linux multi-version python switch and multi-version pip correspondence (cloud Studio & Ubuntu 16.04)
My website: www.mengyingjie.com
linux
&&
cloud studio
&&
Ubuntu16.04
Simple solution to multi-version python switching and multi-version pip correspondence
1. Switching python 2 to python
Multi-version python:
Check version numb ...
Posted by FourthChapter on Mon, 09 Sep 2019 23:48:31 -0700
Scrapy, write the first crawl problem summary
Original Link: https://my.oschina.net/GloryMK/blog/1842367
Because of python's outstanding performance in artificial intelligence, I have been exploring Python recently. I hope to have ...
Posted by rReLmy on Sun, 08 Sep 2019 20:05:37 -0700
gremlin_python encapsulation using add-delete and alter methods
Article Directory
1. Install Janusgraph
2. Connect gremlin
3. Encapsulation of methods for addition, deletion and alteration
4. Other methods of encapsulation
5. Acknowledgements
1. Install Janusgraph
1. Download the installation package
Goin ...
Posted by tckephart on Thu, 05 Sep 2019 21:04:36 -0700
Python uses APScheduler for timed tasks
APScheduler is a Python timer task framework based on Quartz.Tasks based on dates, fixed intervals, and crontab types are provided and can be persisted.Online documentation: https://apscheduler.readthedocs.io/en/latest/userguide.html
1. Install APScheduler
pip install apscheduler
2. Basic concepts
APScheduler has four components:1. Tri ...
Posted by Megalink on Thu, 29 Aug 2019 09:40:14 -0700
The Black Magic of Class and Metaclass in Python
Enumeration types can be considered as labels or sets of constants, usually used to represent certain finite sets, such as weeks, months, states, etc.
There is no specific enumeration type in Python's Built-in types, but we can implement it in many w ...
Posted by busyguy78 on Fri, 23 Aug 2019 04:31:50 -0700
Installation and use of python's pymysql module
Articles Catalogue
1. Installation of pymysql:
2. The basic control function of pymysql:
3. Addition of database data:
4. Delete the database data:
5. Modification of database data:
6. Batch addition of database data:
7. Query of database data (ta ...
Posted by foid025 on Thu, 22 Aug 2019 02:57:29 -0700
Look at Python's job prospects by crawling data from recruitment websites. That's true.
1. Data acquisition
The origin of this thing is that on a sunny afternoon... Habitual opening knows you're ready to go down and see a question just invite an answer.
So it sprouted up to collect information about Python job recruitment on a recrui ...
Posted by chauffeur on Thu, 22 Aug 2019 02:14:00 -0700
Incremental and Distributed
day14~Incremental and Distributed
Articles Catalogue
@[toc]
1. Installation of redis
2. Crawl Spider-based data crawling
3. Distributed
4. Incremental Formula
5.scrapy improves data crawling efficiency
6. Virtual Environment
Yesterday's revie ...
Posted by Corona4456 on Mon, 19 Aug 2019 05:50:17 -0700