This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| # @Time : 2017/12/23 16:07 | |
| # @Author : ddvv | |
| # @Site : | |
| # @File : douyincore.py | |
| # @Software: PyCharm | |
| import hashlib | |
| class calcSig(object): |
This file contains hidden or 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
| #!/bin/bash | |
| # Thanks to https://gist.github.com/wenzhixin/43cf3ce909c24948c6e7 | |
| # Execute this script in your home directory. Lines 17 and 21 will prompt you for a y/n | |
| # Install Oracle JDK 8 | |
| add-apt-repository ppa:webupd8team/java | |
| apt-get update | |
| apt-get install -y oracle-java8-installer | |
| apt-get install -y unzip make # NDK stuff |
This file contains hidden or 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 | |
| # | |
| # Usage: | |
| # python wordgen.py | |
| # | |
| # Operation: | |
| # Takes no command like arguments, writes 10 space-separated words then newline to standard | |
| # output. Consider piping to 'less' or another program which will clear the screen on quit. | |
| # |
This file contains hidden or 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 | |
| from PIL import Image, ImageEnhance, ImageDraw, ImageFont | |
| def text2img(text, font_color="Black", font_size=30): | |
| """生成内容为 TEXT 的水印""" | |
| font = ImageFont.truetype('/Users/liuzenglu/Documents/yahei.ttf', font_size) | |
| # 多行文字处理 | |
| text = text.split('\n') |
This file contains hidden or 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 | |
| # -*- encoding: utf-8 -*- | |
| # Created on 2017-05-12 12:31:13 | |
| # Project: PVP | |
| from pyspider.libs.base_handler import * | |
| import json | |
| import re | |
| import pymongo |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import hashlib | |
| import os | |
| import json | |
| import urllib2 | |
| import time | |
| import logging | |
| from django.utils import timezone | |
| from django.http import JsonResponse |
This file contains hidden or 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 requests | |
| import json | |
| import pymysql.cursors | |
| import time | |
| from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
| # 禁用安全请求警告 | |
| requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
| connect = pymysql.Connect(host='localhost', | |
| port=3306, | |
| user='root', |
This file contains hidden or 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 json | |
| import urllib | |
| import urllib2 | |
| __version__ = '0.1.0' | |
| __author__ = 'Liang Cha (ckmx945@gmail.com)' |
This file contains hidden or 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 hashlib | |
| import random | |
| def gen_nonce(length = 16): | |
| base = 'abcdefghijklmnopqrstvuwxyzABCDEFGHIJKLMNOPQRSTVUWXYZ0123456789' | |
| chars = [base[random.randrange(0, len(base))] for _ in xrange(length)] |
This file contains hidden or 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 sys | |
| import json | |
| from urlparse import urlparse, parse_qs | |
| import requests | |
NewerOlder