본문 바로가기

app

(154)
gensim을 설치여정 (ubuntu 14.04) 먼저 $ sudo pip intall gensim error!! ndg-httpsclient 관련 패키지를 설치하라고 뜬다. $ sudo pip install --upgrade ndg-httpsclient error! ssl 관련 패키지를 설치하라고 뜬다. $ sudo apt install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev #include ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 해당 파일을 찾을수 없다고 뜬다.. $ sudo apt-get install libffi-dev #include ^..
java의 sha1과 python의 sha1의 암호화 값은 다를 수 있습니다. 프로젝트하는 도중 재미있는 현상을 발견하여 글을 써 봅니다. 서로 발급된 키로 sha1으로 암호화 하여 통신하는 api를 개발하는 도중 java 와 python의 sha1의 값이 다르게 나오는것을 발견하였습니다. 아래는 java의 sha1 암호화의 기본 소스 입니다. import java.security.MessageDigest; import java.security.Security; import java.security.NoSuchAlgorithmException; public class HelloWorld{ public static void main(String []args) throws NoSuchAlgorithmException{ String return_sha1 = makeSHA("8101461..
JetBrains edit font size control JetBrains edit is do not have font size control in that menu. so YOU use keymap font size and that contorl font size. 1 . menu->preferences->keymap 2. search font and Editor Actions->Decrease Font Size / Increase Font Size setting(double click) Add Keyboard Shortcut. 3. and YOU setting key it worked!
python dict in list sort to dict value from operator import itemgetter temp_list = []temp_dict = dict()temp_dict["status"] = 1temp_list.append(temp_dict)temp_dict = dict()temp_dict["status"] = 10temp_list.append(temp_dict) sorted(temp_list, key=itemgetter('status'), reverse=True)
python 오늘의 요일 구하기 python get today of the week from datetime import datetoday = date.today()weekday = today.strftime("%A").lower()
python regex special symbol identification example if you want to string inner one or more special symbol charter str = "qwe123!@#" import rep = re.compile('[^a-zA-Z0-9]+')print bool(p.search(str))-> True if you want to string inner only special symbol charter import rep = re.compile('[a-zA-Z0-9]+')if bool(p.search(str)) == False:print "use only special symbol charter"
python warning pep8 closing bracket does not match visual indentation python warning pep8 closing bracket does not match visual indentation This is because the warning is incorrect convention grammar. Incorrect code Correct code End!!
no module named setuptools curl https://bootstrap.pypa.io/ez_setup.py -o - | python to installed $ sudo python setup.py install to worked!!