- Update HISTORY.md
- Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
- Update version number (can also be minor or major)
bumpversion patch
#!/usr/bin/python | |
# coding=utf-8 | |
# Python version of Zach Holman's "spark" | |
# https://github.com/holman/spark | |
# by Stefan van der Walt <stefan@sun.ac.za> | |
""" | |
USAGE: |
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline5-dev libssl-dev libdb-dev | |
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz | |
tar -xzf Python-2.7.3.tgz | |
cd Python-2.7.3 | |
./configure --prefix=/usr --enable-shared | |
make | |
sudo make install | |
cd .. |
#! /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 |
# Based on code originally from http://code.activestate.com/recipes/491264-mini-fake-dns-server/ | |
# | |
# DNS rfc: http://www.ietf.org/rfc/rfc1035.txt | |
# http://en.wikipedia.org/wiki/List_of_DNS_record_types | |
import socket | |
import re | |
import sys | |
import traceback | |
import struct | |
import Queue |
import re | |
import os.path | |
import datetime | |
import os | |
import time | |
# Path to the minecraft statistics file | |
mine_path = "FULL_PATH_TO_/stats_user_unsent.dat" |
#!/usr/bin/env python2.7 | |
from BeautifulSoup import BeautifulSoup | |
from textwrap import TextWrapper | |
import requests | |
import collections | |
import sys | |
import re | |
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
bumpversion patch
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect
import zipfile | |
import sys | |
import os.path | |
import errno | |
def files_in_zip(this_zip, encoding): | |
return [x.decode(encoding) for x in zipfile.ZipFile(this_zip).namelist()] | |
def extract_all_encoding(this_zip, path_prefix, encoding): | |
z = zipfile.ZipFile(this_zip) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import urllib | |
__title__ = 'viedemerde' | |
__version__ = '0.1' | |
__author__ = 'Martin Simon <me@martinsimon.me>' | |
__license__ = 'Apache v2.0 License' |