반응형
반응형

파이썬에서 유니코드 스트림 다루기


# 입력 스트림과 출력 스트림을 연다

input = open("input.txt", "rt", encoding="utf-16")  

output = open("output.txt", "wt", encoding="utf-8")


# 유니코드 데이터 조각들을 스트리밍한다

with input, output:  

    while True:

        # 데이터 조각을 읽고

        chunk = input.read(4096)

        if not chunk:

            break

        # 수직 탭을 삭제한다

        chunk = chunk.replace("\u000B", "")

        # 데이터 조각을 쓴다

        output.write(chunk)



반응형
반응형

응용: 쉘 스크립트를 이용해 해당 디렉토리의 파일들 모두 변경 


- char-convert.sh

#!/bin/bash

 

LIST=`ls -A1 | grep ".csv"`

 

for file in $LIST

do

  python ./char-convert.py $file

done


- char-convert.py

#!/usr/bin/python

#-*- coding: utf-8 -*-

  

import codecs

import sys

 

file = sys.argv[1]

file2 = file.split('.csv')[0]+"-2.csv"

 

infile = codecs.open(file, 'r', encoding='utf-8')

outfile = codecs.open(file2, 'w', encoding='euc_kr')

  

for line in infile:

  line = line.replace(u'\xa0', ' ')  

  outfile.write(line)

    

infile.close()

outfile.close()


...

반응형
반응형

Mockup tool 


https://balsamiq.com/products/mockups/




To find out more about Balsamiq Mockups 3, head to the product page at http://balsamiq.com/products/mockups/

Download a free trial here: http://balsamiq.com/download/


반응형
반응형

개발자 로드맵 - Roadmap to becoming a web developer in 2017


https://github.com/WegraLee/developer-roadmap






Balsamiq 을 이용해서 만들었다고 하네요. 



...

반응형
반응형
인터넷나야나, “3차 협상 준비 중…OTP·리눅스 도입 검토”

http://www.bloter.net/archives/283073


업계에서는 망 분리, OTP, 리눅스로 업무용 PC 교체 등을 제시했다.

 

복구현황을 구글드라이브로 공유하는구만요. 





반응형
반응형

“어제보다는 오늘,

오늘보다는 내일이 더 좋아질 수 있도록 노력합시다.

Best보다는 Better를 목표로 삼아 도전합시다.”

- 도요타 아키오 (도요타 자동차 사장)

 

Best는 곧 멈춤을 의미합니다.

Better를 향해 꾸준히 나아가다 보면

어느 순간 위대함의 경지에 다다를 수 있습니다.

남과의 비교는 불행을 가져옵니다.

어제보다 나은 삶을 추구하는 것이 나를 살찌우고

나를 행복하게 해줍니다.



.

반응형

+ Recent posts