- 博客(47)
- 资源 (20)
- 收藏
- 关注
翻译 Python 正则表达式验证十六进制数字
1. Find any hexadecimal number in a larger body of text\b[0-9a-fA-F]+\b2. Check whether a text string holds just a hexadecimal number\A[0-9a-fA-F]+\Z3. Find a hexadecimal number with a 0x prefix
2014-08-29 10:10:04 9801
翻译 Python 正则表达式验证整数
1. Find any positive integer decimal number in a larger body of text\b[0-9]+\bMatch: 123 123.456No match:123a2. Check whether a text string holds just a positive integer decimal number\A[0-9]
2014-08-28 10:30:14 3608
翻译 Python 正则表达式替换重复的空字符为单个空字符
1. clean any whitespace characters (including line breaks, tabs, spaces)Match: \s+Replace: None2. clean horizontal whitespace charactersMatch: [ \t\XA0]+ or [ \t\u00A0]+Replace: None
2014-08-27 10:33:28 1157
翻译 Python 正则表达式去除前导和后缀空格
1. Regular Expressions1.1. Remove leading whitespaceMatch: \A\s+Replace: none1.2. Remove trailing whitespaceMatch: \s+\ZReplace: none2. Codeimport resubject = " nihao "subject = re.sub("\A
2014-08-26 10:23:00 6428
翻译 Python 查找不含有特定单个或多个字符的行
1. Match a line that does not contain a specific word (eg, error)(?im)^(?:(?!\berror\b).)*$2. Match a line that does not contain specific words (eg. error, fail)(?im)^(?:(?!\b(?:error|fail)\b).)*$
2014-08-25 11:15:38 1496
翻译 Python 使用nltk对特定词汇进行双连词处理 (二元语法)
CODE:#!/usr/bin/python # -*- coding: utf-8 -*-'''Created on 2014-8-22@author: guaguastd@name: ceo_cto_bigrams.py'''import nltkceo_bigrams = nltk.bigrams("Chief Executive Officer".split(),
2014-08-23 10:58:31 2814
翻译 Python 查找含有特定单个或多个字符的行
1. Match Complete Lines That contain a Word (eg. error)(?im)^.*\berror\b.*$2. Match any lines That contain one of multiple words (eg, one, two , three)(?im)^.*\b(one|two|three)\b.*$3. Match line
2014-08-22 10:44:14 5024 1
翻译 Python 正则表达式去除重复行
1. Sort lines and remove adjacent duplicatesMatch:(?m)^([\s\S]*)(?:(?:\r?\n|\r)\1)+$Replace:\12. Keep the last occurrence of each duplicate line in an unsorted fileMatch:(?m)^([^\r\n]*)(?:\r?\
2014-08-21 11:23:17 2389
翻译 Python 正则表达式查找相邻字符
Regular Expression# among word1 word2 word3, at most 5 words between each other\b(?:(?:word1()|word2()|word3()|(?:\1|\2|\3)\w+)\b\W*?){3,8}\1\2\3# among word1 word2 word3, any distance from each
2014-08-19 10:48:22 1274
翻译 Python 规范化LinkedIn用户的联系人所在公司后缀 (data normalization)
Python 规范化LinkedIn用户的联系人所在公司后缀 (data normalization)
2014-08-19 06:41:53 1193
翻译 Python 查找含有或者不含有特定字符的字符
Regular Expression1. Words not preceded by a specific word (eg. cat)(?<!\b(?:cat)\W)\b\w+2. Words not preceded by some words (eg. cat, good)(?<!\b(?:cat|good)\W)\b\w+3. Words preceded by speci
2014-08-18 10:02:25 1428
翻译 Python 正则表达式查找跟着或不跟着特定字符串的字符串
Regular Expression1. Find Any Word not Followed by a Specific Word\b(?!dog\b)\w+\b(?!\W+dog\b)2. Find Any Word not Followed by Words\b(?!(?:cat|dog)\b)\w+\b(?!\W+(?:cat|dog)\b)3. Find Any Word
2014-08-15 10:38:15 2235
翻译 Python 可视化Facebook用户友谊图
CODE:#!/usr/bin/python # -*- coding: utf-8 -*-'''Created on 2014-8-15@author: guaguastd@name: friendship_graph_visualize.py'''import networkx as nximport requestsimport jsonfrom networkx
2014-08-15 07:32:22 1345
翻译 Python 正则表达式查找不是某个字符的字符串
Regular Expression1. Find All Except a Specific Word\b(?!cat\b)\w+2. Find All Except some words\b(?!(?:cat|good)\b)\w+3. Find words that don't contain another word\b(?:(?!cat)\w)+\b4. Find
2014-08-14 10:26:30 1830
翻译 Python 可视化Facebook用户与其有共同爱好的Friends (数量)
CODE:#!/usr/bin/python # -*- coding: utf-8 -*-'''Created on 2014-8-13@author: guaguastd@name: common_friends_visualize.py'''# impot loginfrom login import facebook_login# import helper#
2014-08-14 06:04:49 876
翻译 Python 正则表达式查询相似的字符串
Regular ExpressionColor or colour\bcolou?r\bWords ending with "phobia"\b\w*phobia\bSteve, Steven or Stephen\bSte(?:ven?|phen)\bVariations of "regular expression"######regular expressions
2014-08-13 11:11:56 1131
翻译 Python 获取Facebook用户与其Friends的共同爱好
CODE:#!/usr/bin/python # -*- coding: utf-8 -*-'''Created on 2014-8-13@author: guaguastd@name: common_likes_finding.py'''# impot loginfrom login import facebook_login# import helper#from
2014-08-13 06:46:40 926
翻译 Python 获取Facebook用户Friends的爱好类别中的Top10
Python 获取Facebook用户的Friends的爱好类别中的Top10
2014-08-12 06:05:54 1139
翻译 Python 获取Facebook用户的Friends的爱好中的Top10
Python 获取Facebook用户的Friends的爱好中的Top10
2014-08-12 05:54:23 953
翻译 Python 正则表达式验证信用卡号码
Rule:Visa 13 or 16 digits, starting with 4MasterCard 16 digits,starting with 51 through 55Discover 16 digits,starting with 6011 or 65American Express 15 digits,starting with 34 or 37Din
2014-08-08 10:35:31 5058
翻译 Python 获取Facebook instance
CODE:#!/usr/bin/python # -*- coding: utf-8 -*-'''Created on 2014-8-8@author: guaguastd@name: facebook_instance_get.py'''# impot login; refer to http://blog.csdn.net/guaguastd/article/de
2014-08-08 07:02:10 1007
翻译 Python 正则表达式验证密码完整性
Regular Expression1. Length between 8 and 32 characters^[\s\S]{8,32}$2. ASCII visible and space characters onlyRule: match A-Z,0-9,a-z and ASCII punctualtion no control characters, line br
2014-08-07 10:47:21 2889
Practical Python and OpenCV, 3rd Edition.rar
2019-10-04
High Performance Python
2017-12-09
apache-maven
2017-09-06
CUDA for Engineers An Introduction to High Performance Parallel Computing
2017-06-06
load test for video publish, pull
2017-03-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人