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 | |
import simplejson | |
import logging | |
import random | |
import re | |
import datetime | |
import string | |
import time | |
import sys | |
import urllib |
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/python | |
# | |
# Very simple hacky ugly IRC server. | |
# | |
# Todo: | |
# - Encode format for each message and reply with ERR_NEEDMOREPARAMS | |
# - starting server when already started doesn't work properly. PID file is not changed, no error messsage is displayed. | |
# - Delete channel if last user leaves. | |
# - [ERROR] <socket.error instance at 0x7f9f203dfb90> (better error msg required) |
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
# -*- coding:utf-8 -*- | |
# http代理服务器 | |
# 1.ip限制,mac限制 | |
# | |
# [email protected] | |
# www.sw2us.com | |
"exec" "python" "-O" "$0" "$@" | |
__doc__ = """sw2us HTTP Proxy. |
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
" ========= | |
" 功能函数 | |
" ========= | |
" 获取当前目录 | |
func GetPWD() | |
return substitute(getcwd(), "", "", "g") | |
endf | |
" ========= | |
" 环境配置 | |
" ========= |
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
package com; | |
import java.io.*; | |
public class Keygen { | |
private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself."; | |
public String getSerial(String userId, String licenseNum) { | |
java.util.Calendar cal = java.util.Calendar.getInstance(); | |
cal.add(1, 3); |
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
#coding: utf8 | |
import sublime, sublime_plugin | |
import os, re | |
import urllib | |
TEMP_PATH = os.path.join(os.getcwd(), 'tmp') | |
SEPERATOR = ' ' | |
def gbk2utf8(view): | |
try: |
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
1.python是一个解释性语言: | |
一个用编译性语言比如C或C++写的程序可以从源文件(即C或C++语言)转换到一个你的计算机使用的语言(二进制代码,即0和1)。这个过程通过编译器和不同的标记、选项完成。当你运行你的程序的时候,连接/转载器软件把你的程序从硬盘复制到内存中并且运行。 | |
而Python语言写的程序不需要编译成二进制代码。你可以直接从源代码 运行 程序。在计算机内部,Python解释器把源代码转换成称为字节码的中间形式,然后再把它翻译成计算机使用的机器语言并运行。事实上,由于你不再需要担心如何编译程序,如何确保连接转载正确的库等等,所有这一切使得使用Python更加简单。由于你只需要把你的Python程序拷贝到另外一台计算机上,它就可以工作了,这也使得你的Python程序更加易于移植。 | |
2.查询机器是否安装python成功:python -V | |
3.得到类的帮助文档: | |
help('str')#得到str类的文档 | |
help(list)#得到list类的文档字符串 |
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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
@charset="utf-8" | |
/* 公共部分 */ | |
.clearfix { | |
*zoom: 1 | |
} | |
.clearfix:before,.clearfix:after { | |
display: table; | |
content: "" |
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
select branch_name, | |
sum(case level when 1 then final_score else 0 end) z_s, | |
count(case level when 1 then final_score else null end) z_c, | |
sum(case level when 2 then final_score else 0 end) f_s, | |
count(case level when 2 then final_score else null end) f_c, | |
sum( final_score) t_s, | |
count(final_score) t_c |