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-*- | |
import chardet | |
import argparse | |
import os | |
parser = argparse.ArgumentParser() | |
parser.add_argument("dir", help="directory where all files will be converted") | |
parser.add_argument("-r", "--recursive", action="store_true", help="do convertion recursively") | |
parser.add_argument("-e", "--extension", help="only convert files with specific extension") |
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
# upgrade all pip packages. need sudo permission. path of pip should be modified | |
pip freeze --local|grep -v '^-e' | cut -d = -f 1 | xargs sudo /usr/local/bin/pip install -U |
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 java.util.Random; | |
/** | |
* 此类提供一系列产生随机数的方法,以满足不同用例需要 | |
* from Internet | |
* @author crazymonkey | |
*/ | |
public final class NumberRandom { | |
// 随机数对象 | |
private static Random random; |
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 | |
# Info : install tools for ubuntu | |
# Author : elain | |
# CTime : 2011.08.01 | |
# update by HJ 2015.05.15 | |
# run under root or with sudo | |
#------------------------------------------- | |
#--------- 删除一些没用的软件 ------------ | |
#--------------------------------------force-yes -y------- |
NewerOlder