분류 전체보기 275

블랙베리 구매기

블랙베리병은 질러야 낫는다 첫 블랙베리는 블랙베리q5였다 귀엽고 예쁘고 매우 쓸모가 없었다 이때 기억을 되새겨 보자면 아마도 판교에 위치한 ^_^ 한 게임회사 입사 직후에 직구로 유명한 모 국내 사이트를 통해서 구매했던 것 같다 skt 24개월 약정으로 기기값은 무료였고.... 예나 지금이나 나는 각인이 없거나 or 한글 각인이 없는 키보드를 좋아해서 만족했던 기억이 있다 그리고 저 쥐방울만한 액정에서도 놀랍게 카톡이 됐었습니다....! 다만 느리고 느린데다가 아주 느려서 장난감으로만 갖고 놀았었다 두번째 블랙베리는 키원 cj헬로모바일 24개월 약정 기기값 무료 9900원짜리 유심 하나 개통해놓고 cj셀프개통 요금제로 유심 하나 더 개통해서 유심만 바꿔서 썼었다 현대카드 하나 더 만들어서 셀프개통 요금제..

never mind/anything 2020.11.23

calendar 를 이용해서 년-월-일 목록 뽑아내기

import calendar calendar.calendar(2020) 이렇게 출력하면 -_-;; 스트링으로 된 달력(윈도우에서 보여주는 달력같은 ㅡㅡ) 이 출력됩니다. 이걸 쓰는건 좀 지저분하고 후처리가 복잡해질것 같아서 다른 방법으로 날짜 목록을 출력해보았습니다. import calendar month_range = [] for i range(2019, 2022): #year for j in range(1, 13): #month final_day = calendar.monthrange(i, j) month_dict = dict(year=i, month=j, day=final_day[1]) # 각 달의 마지막 날짜를 체크한다 month_range.append(month_dict) date_list = ..

1 - 설정 및 read

express 로 아주 간단한 게시판 만들기 구현 계획 1. 최소한의 기능만을 제공한다 글쓰기(insert) 수정하기(update) 삭제하기(delete) 읽기(select) 2. 최소한의 view를 제공한다 일부러는 아니고 프론트를 할줄 몰라서 ㅠㅠ.......... 3. 카운팅 기능을 제공한다 글을 edit 시도시에는 글의 count는 상승하지 않는다 글을 read시에는 count가 상승한다 1. 라이브러리 설치 각 필요한 라이브러리들을 설치해줍니다. npm install {NAME}으로 설치 도중 오류 발생시 sudo 권한으로 설치해줍니다. sudo npm install fs sudo npm install ejs sudo npm install express sudo npm install body-p..

AttributeError: 'result' object has no attribute 'translate'

sample source from flask import render_template @app.route("/") def index(): param = db에서 받아온 무언가 return render_template("index.html", param=param) if __name__ == "__main__": app.run(host="0.0.0.0", port=5000) AttributeError: 'result' object has no attribute 'translate' 라이브러리를 로딩하지 못해서 오류가 났다고 생각하고 그쪽만 체크했는데(극혐의 폐쇄망ㅠ_ㅠ) 결론은 param을 정상적으로 받아오지 못한 상태로 index를 로딩하려고 시도하면 저런 오류가 나는 것이었다 :

python local repository 구성

1. 필요한 것들 설치 yum install pip pip install pypiserver pip install passlib 2. server용 계정 설정 및 추가 cd /home/python-local-repo htpasswd -sc htpasswd.txt local-repo 3. 서버 시작 pypi-server -p {PORT} -P htpasswd.txt /home/python-local-repo & 4. pypi관련 설정 추가 vim ~/.pypirc [distutils] index-servers = local [local] repository: http://127.0.0.1:PORT/ username: local-repo password: local-repo 6. 원격 서버에서 확인 pip ..

yum local repository

yum local repository 생성 1. repo 설치 및 설정 생성 및 설정을 위한 패키지 설치 yum install createrepo yum-utils패키지 정보를 저장할 디렉토리 생성 mkdir -p /home/www/html/repos/{base, centosplus, extras, updates, python35}local repository 와 centos yum repository 동기화 reposync -g -l -d -m --repoid=base --newest-only --download-metadata --download_path=/home/www/html/repos reposync -g -l -d -m --repoid=centosplus --newest-only --down..

dictionary

1딕셔너리에서 원하지 않는 값을 안전하게 지워보자 순회문 도중에 pop 남발하기 pop은 정확하게는 지우는 것이 아니라, 지정한 key의 value만(!) 던져주고 딕셔너리에서는 지워버립니다. test_dict_01 = dict() test_dict_01['a'] = 1 test_dict_01['b'] = '' test_dict_01['c'] = None for k, v in test_dict.items(): if v == None: test_dict.pop(k) 위와 같이 순회문 도중에 pop으로 지우면 갑분 에러를 만나게 됩니다. Traceback (most recent call last): File "test.py", line 6, in for k, v in test_dict.items(): Run..