# Clean, simple, compatible and meaningful. # Tested on Linux, Unix and Windows under ANSI colors. # It is recommended to use with a dark background. # Colors: black, red, green, yellow, *blue, magenta, cyan, and white. # # Mar 2013 Yad Smood
# Git info local git_info='$(git_prompt_info)' ZSH_THEME_GIT_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}\ue0a0" ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX" ZSH_THEME_GIT_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY" ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
# SVN info local svn_info='$(svn_prompt_info)' ZSH_THEME_SVN_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}svn${YS_VCS_PROMPT_PREFIX2}" ZSH_THEME_SVN_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX" ZSH_THEME_SVN_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY" ZSH_THEME_SVN_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN"
# HG info local hg_info='$(ys_hg_prompt_info)' ys_hg_prompt_info() { # make sure this is a hg dir if [ -d '.hg' ]; then echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}" echo -n $(hg branch 2>/dev/null) if [[ "$(hg config oh-my-zsh.hide-dirty 2>/dev/null)" != "1" ]]; then if [ -n "$(hg status 2>/dev/null)" ]; then echo -n "$YS_VCS_PROMPT_DIRTY" else echo -n "$YS_VCS_PROMPT_CLEAN" fi fi echo -n "$YS_VCS_PROMPT_SUFFIX" fi }
# Virtualenv VIRTUAL_ENV_DISABLE_PROMPT=1
local py_version if [[ -n "$VIRTUAL_ENV" ]] ; then py_version=${(@)$(python -V 2>&1)[2]} fi
for parent, dirnames, filenames in os.walk(old_root): for filename in filenames: extension = os.path.splitext(filename)[1] if extension.lower() in ext:
fordir, folders, files in os.walk(fapiao_dir): for file in files: path = os.path.join(dir, file) print(path) if path[-4:] == '.pdf': fapiao_zhantie(path)
# 1.2 图片 img_blks = [b for b in blocks if b['type'] == 1] for img in img_blks: # pprint(img) new_page.insert_image(img['bbox'], stream=img['image'])
# 1.3 文字 txt_blks = [b for b in blocks if b['type'] != 1] for txt in txt_blks: text_tmp = ''.join([s['text'] for l in txt['lines'] for s in l['spans']]) text_tmp = re.sub('[@#$%^&*\'\"\n\r\t]', ' ', text_tmp).strip()
$ sudo dmidecode -t memory # dmidecode 3.2 Getting SMBIOS data from sysfs. SMBIOS 3.0.0 present.
Handle 0x0023, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 16 GB Error Information Handle: No Error Number Of Devices: 1
Handle 0x0025, DMI type 17, 40 bytes Memory Device Array Handle: 0x0023 Error Information Handle: No Error Total Width: 8 bits Data Width: 8 bits Size: 2048 MB Form Factor: SODIMM Set: None Locator: ChannelB-DIMM0 Bank Locator: BANK 1 Type: DDR3 Type Detail: Synchronous Speed: 1600 MT/s Manufacturer: 0824 Serial Number: 25073816 Asset Tag: 9876543210 Part Number: D3SS56161XL10AA Rank: Unknown Configured Memory Speed: 1600 MT/s Minimum Voltage: Unknown Maximum Voltage: Unknown Configured Voltage: Unknown