This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="NewModuleRootManager"> | |
<content url="file://$MODULE_DIR$" /> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
</component> | |
<component name="TestRunnerService"> | |
<option name="PROJECT_TEST_RUNNER" value="Unittests" /> | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# @Time : 2017/04/22 13:47 | |
# @Author : Rusher | |
# @File : calculator.py | |
# @Software: PyCharm | |
import re | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# @Time : 2017/04/23 1:55 | |
# @Author : Rusher | |
# @File : calculator2.py | |
# @Software: PyCharm | |
# 将输入的字符串格式统一转换成列表,将数字、符号、括号都成一个独立元素, | |
# 如: 12+3*(14+5) ----> ["12","+","3","*","(","14","+","5",")"] | |
def format_input(input_re_value): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="couponInfo"> | |
<p class="bnrName">说好的文字呢。。。</p> | |
<p class="bnrText"></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
# -*- coding:utf-8 -*- | |
# @Time : 2017/05/13 19:06 | |
# @Author : Hython.com | |
# @File : wear.py - Download the new ranking image from wear.jp | |
# @IDE : PyCharm | |
import requests, os, bs4, sys | |
# 要下载图片的页面地址 | |
keyword = ''.join(sys.argv[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
import socket | |
import threading | |
activate_this = os.environ.get("SUBLIMEREPL_ACTIVATE_THIS", None) | |
# turn off pager | |
os.environ['TERM'] = 'emacs' | |
if activate_this: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#-*- coding: utf-8 -*- | |
''' | |
抓取 http://www.mmjpg.com/ 排行榜的图片,直接就可以抓取 | |
''' | |
import os | |
import requests | |
from bs4 import BeautifulSoup as bs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import shlex | |
import getpass | |
import socket | |
import signal | |
import subprocess | |
import platform | |
from func import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import threading | |
import re | |
from bs4 import BeautifulSoup | |
from urllib.request import urlopen | |
from selenium import webdriver | |
OlderNewer