Skip to content

Instantly share code, notes, and snippets.

View ResolveWang's full-sized avatar
🎯
Focusing

resolvewang ResolveWang

🎯
Focusing
View GitHub Profile

Python Socket 编程详细介绍

Python 提供了两个基本的 socket 模块:

  • Socket 它提供了标准的BSD Socket API。
  • SocketServer 它提供了服务器重心,可以简化网络服务器的开发。

下面讲解下 Socket模块功能。

Socket 类型

@ResolveWang
ResolveWang / bobp-python.md
Created June 24, 2017 13:18 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@ResolveWang
ResolveWang / resume.py
Created December 8, 2016 03:20 — forked from dongweiming/resume.py
Python版本简历
#/usr/bin/env python
# coding=utf-8
import random
import re
def color(messages):
color = '\x1B[%d;%dm' % (1,random.randint(30,37))
return '%s %s\x1B[0m' % (color,messages)
@ResolveWang
ResolveWang / install_scrapy_in_centos_6_5.sh
Created November 26, 2016 04:36 — forked from Shellbye/install_scrapy_in_centos_6_5.sh
Install scrapy in CentOS 6.5 in virtualenv, and install mysql to store the data crawled. After the installation, the `spider` dir will contains all the downloaded files and the `spider_env` is the virtualenv dir
#!/usr/bin/env bash
mkdir spider
cd spider/
yum update -y
# install pip on centos6
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y python-pip
# install wget
yum install -y wget