Skip to content

Instantly share code, notes, and snippets.

@668
668 / pdf_remove_watermark.py
Created August 9, 2017 07:39 — forked from raphiz/pdf_remove_watermark.py
PDF watermark removal
from PyPDF2 import PdfFileReader, PdfFileWriter
from PyPDF2.pdf import ContentStream
from PyPDF2.generic import TextStringObject, NameObject
from PyPDF2.utils import b_
wm_text = 'Persönliches Exemplar von'
replace_with = ''
# Load PDF into pyPDF
source = PdfFileReader(open('input.pdf', "rb"))
@668
668 / python
Created August 29, 2016 20:50 — forked from 582033/python
多线程获取并验证代理
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, re
import requests
import Queue
import threading
class Proxy():
def __init__(self, proxy_url, target_url, ver_keyword, timeout):
@668
668 / sublime_text3_crack.md
Created November 28, 2015 22:30 — forked from sublime-crack4/sublime_text3_crack.md
Sublime Text crack 3095 3083 Win64 Win32 Linux64 Linux32 OSX Mac MacOS latest

cat

For pupil: all binary can be downloaded http://pan.baidu.com/s/1ntCChyp

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmer:

VERSION PLATFORM OFFSET ORIGINAL CRACKED
# -*- coding: utf-8 -*-
class MagicDict(dict):
def __init__(self, **kwargs):
dict.__init__(self, kwargs)
self.__dict__ = self
def __getattr__(self, name):
self[name] = MagicDict()
return self[name]
@668
668 / daemon.py
Created March 26, 2014 08:53 — forked from jamiesun/daemon.py
#! /usr/bin/env python2.7
#encoding:utf-8
#@description:一个python守护进程的例子
#@tags:python,daemon
import sys
import os
import time
import atexit
from signal import SIGTERM
#! /usr/bin/env python
# coding=utf-8
__author__ = 'Kingson zhou'
import requests
import os
import time
from bs4 import BeautifulSoup
import random
"""
说明:
#! /usr/bin/env python
# coding=utf-8
__author__ = 'Kingson zhou'
import requests
import os
import time
from bs4 import BeautifulSoup
import random
"""
说明: