본문 바로가기

전체 글

(40)
[python] zip import zipfile import os file_path='outfile_quater' zip_file=zipfile.ZipFile('outfile_quater.zip', "w") for (path, dir, files) in os.walk(file_path): for file in files: if file.endswith('.csv'): zip_file.write(os.path.join(path, file), compress_type=zipfile.ZIP_DEFLATED) reference https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=sooong1128&logNo=221932942109 python * 파이썬 zipfi..
[go] go routine go routine이란? go runtime에 의해 관리되는 lightweight thread이다. go routine은 비동기적으로 함수루틴을 실행하므로, 작업을 동시적으로 처리하기 위해 사용된다. keyword로 살펴보기 go routine vs thread "go runtime에 의해 관리되는 lightweight thread이다." 고루틴은 할당받는 자원을 이용하는 실행의 단위라는 관점에서 스레드와 본질적으로는 같은 것이다. 그러면 go routine과 thread의 차이는 무엇일까? thread는 OS의 스케줄링에 따라 움직이기 때문에, 리소스 요청 등 전처리가 필요하고, 여기서 발생하는 비용이 크다. 반면 go routine은 OS에 리소스를 요청하지 않는다. go 스케줄러가 스케줄링을 하며,..
[go]go lang 시작하기 go lang 설치 1. 설치하기 운영체제에 따라 프로그램 설치 https://golang.org/dl/ Downloads - The Go Programming Language Downloads After downloading a binary release suitable for your system, please follow the installation instructions. If you are building from source, follow the source installation instructions. See the release history for more information about Go releases golang.org 2. 환경변수 설정 윈도우 시스템 환경변수 -> 사용자 ..
pyplot 시도 import matplotlib from matplotlib import pyplot as plt import numpy as np file_name = '21q' fn = "graph/"+file_name x = np.arange(4) years = ['default', 'n=50', 'n=100','n=200'] # x축 이름(값) 설정 values = [99.6, 98.73 , 98.81 , 98.83] # y축 값 matplotlib.use('Agg') # 아마 그래픽 지원 안되는 서버 버전이나 ssh 에서 사용해야함 plt.figure(figsize=(10, 10)) # 그림(저장되는 그래프) 크기 plt.bar(x, values) # 막대 그래프 만드는 거 plt.xticks(x, years)..
pyplot tutorial pycharm이 아니고 pyplot로 그래프를 그리는 거였다...ㅎ 이제 윈도우 말고 리눅스에서 해야지 Pyplot tutorial https://matplotlib.org/stable/tutorials/introductory/pyplot.html Pyplot tutorial — Matplotlib 3.4.2 documentation text can be used to add text in an arbitrary location, and xlabel, ylabel and title are used to add text in the indicated locations (see Text in Matplotlib Plots for a more detailed example) All of the text fun..
.csv file analysis in python - using pycharm 파이썬에서 그래프를 만들기 위해서는 numpy, matplotlib와 같은 라이브러리가 필요 그 다음 csv 샘플파일을 패키지에 넣어주어야 한다. csv 샘플파일 받는 곳 이제 코딩! """ python에서 데이터 분석을 할 때 자주 사용되는 패키지: numpy, pandas, matplotlib, cipy """ from pandas.io.parsers import read_csv import matplotlib.pyplot as plt # 그래프를 위한 라이브러리 # csv 파일에서 data frame 만들기 df = read_csv('FL_insurance_sample.csv') print('Type:', type(df)) # 데이터 프레임의 row(observation)의 갯수 print('Sha..
pycharm install & setting 설치 페이지 : Window, Mac, Linux 학생인증 : jetbrain 인증하는 과정이 좀 있다. 5분 정도
redis tuning redis tuning 후 redis-benchmark로 성능 확인 예정 https://iamabhishek-dubey.medium.com/redis-best-practices-and-performance-tuning-c48611388bbc Redis Best Practices and Performance Tuning One of the thing that I love about my organization is that you don’t have to do the same repetitive work, you will always get the chance… iamabhishek-dubey.medium.com 위 링크에서 redis.conf 파일 수정 부분만 따라해보았다. # Update the val..