Skip to content

Instantly share code, notes, and snippets.

View xiaopeng163's full-sized avatar
πŸ‡³πŸ‡±
Focusing

Peng Xiao xiaopeng163

πŸ‡³πŸ‡±
Focusing
View GitHub Profile
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-5530101703628975",
enable_page_level_ads: true
});
</script>
@xiaopeng163
xiaopeng163 / tar_gz_file.py
Created February 8, 2017 07:54
tar.gz file in a folder
import os
import tarfile
MSG_PATH = './'
file_list = os.listdir(MSG_PATH)
for msg_file in file_list:
if not msg_file.endswith('.msg'):
continue
# Copyright 2016 Cisco Systems, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
➜  ~
➜  ~
➜  ~ clear

➜  ~ python
Python 2.7.10 (default, Jul 30 2016, 18:31:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.