Skip to content

Instantly share code, notes, and snippets.

View oicebot's full-sized avatar

欧剃 | 游荡的坎德人 oicebot

View GitHub Profile
@oicebot
oicebot / autoresize.pyw
Created July 17, 2020 07:28
利用 PIL 批量压缩图片到特定尺寸的小工具,界面使用Tkinter制作,参考了一些来自 stackoverflow 的答案
#!#!/usr/bin/env python3
#------#------#------#------#------
from tkinter import *
import tkinter.filedialog as filedialog
import tkinter.messagebox as msgbox
import tkinter.ttk as ttk
import os
@oicebot
oicebot / calc24.py
Last active February 24, 2018 08:46
简单的加减乘除算24小程序
#!/usr/bin/python3
# -*- coding:utf-8 -*-
'''
算24
'''
from itertools import permutations
def check24(list1=[6,6,6,6],list2=[0,0,0]):
oplist=['+','-','*','/']
@oicebot
oicebot / python_local_http_server.py
Created May 1, 2017 03:31
非常简单的PYTHON HTTP服务
#!/usr/bin/python2
# -*- coding:utf-8 -*-
# 出处 酷 壳 – CoolShell.cn
# http://coolshell.cn/articles/1480.html#more-1480
# 如果你只想让这个HTTP服务器服务于本地环境,那么,你需要定制一下你的Python的程序,下面是一个示例:
import sys
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
HandlerClass = SimpleHTTPRequestHandler
ServerClass = BaseHTTPServer.HTTPServer