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
import smtplib | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEBase import MIMEBase | |
from email.MIMEText import MIMEText | |
from email import Encoders | |
import os | |
import socket | |
import time | |
gmail_user = "sh84.ahn@gmail.com" |
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
import zipfile | |
def toZip(file_list, zip_file_name): | |
zippedHelp = zipfile.ZipFile("./"+zip_file_name, "w", compression=zipfile.ZIP_DEFLATED ) | |
for file in file_list: | |
zippedHelp.write("./"+file); | |
zippedHelp.close(); |
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
server_name = socket.gethostname(); | |
if pstack_count == 1: | |
for file in pstack_list: | |
mail("sh84.ahn@gmail.com",server_name + "::pstack log", file, "./"+file); | |
print "["+file+"]"+" send to sh84.ahn@gmail.com \n"; | |
os.remove("./"+file); | |
elif pstack_count > 1: |
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
def checkMonday() | |
time = Time.new; | |
year = time.year; | |
month = time.month; | |
day = time.day; | |
year1_int = year.to_s.slice(0..1).to_i; | |
year2_int = year.to_s.slice(2..3).to_i; |
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 -*- | |
import os; | |
import os.path; | |
import sys; | |
content_list = [] | |
is_start = False | |
def ReadFile(file_path): |
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
-(NSString*) GetDocPath //document 경로 반환 | |
{ | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
return documentsDirectory; | |
} |
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
-(NSString*) GetDocPath //document 경로 반환 | |
{ | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
return documentsDirectory; | |
} |
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
[ash84@rajas2 py_project]$ python database.py | |
Traceback (most recent call last): | |
File "database.py", line 2, in <module> | |
import sqlite3 | |
File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> | |
from dbapi2 import * | |
File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module> | |
from _sqlite3 import * | |
ImportError: No module named _sqlite3 |
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
CHIP_COUNT=`cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l` | |
CHIP_CORES=`cat /proc/cpuinfo | grep "siblings" | tail -1 | cut -d: -f2`; | |
CHIP_MODELS=`cat /proc/cpuinfo | grep "model name" | sort -u`; | |
echo "==== CPU INFO ====" | |
echo "CPU: $CHIP_COUNT chips x $CHIP_CORES cores" | |
echo "$CHIP_MODELS" | |
echo "" |
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
import java.security.*; | |
import java.util.*; | |
public class MD5 | |
{ | |
int limit_position_number; | |
public MD5() | |
{ |
OlderNewer