본문 바로가기 메뉴 바로가기

BoNin Lab

프로필사진
  • Contact
  • Tag

BoNin Lab

검색하기 폼
  • All (6)
    • Project (4)
      • Web (2)
      • Server (1)
      • HardWare (1)
    • Programming (2)
      • Python (2)
  • 방명록

influxdb time format(rfc3339) to datetime

print (in_time) # 2019-09-27T01:57:07.679779126Z in_time = in_time.replace('Z','') in_time = in_time.split(".") microsec = in_time[1][0:6] in_time = in_time[0] + '.' + microsec in_date = datetime.strptime(in_time, "%Y-%m-%dT%H:%M:%S.%f") print (in_date) # 2019-09-27 01:57:07.679779influxdb time 값을 불러오다 보면 위와 같은 time값을 받는 경우가 많다. datetime.strptime 에서 microsecond (%f) 는 6자리..

Programming/Python 2019. 9. 27. 19:27
Python 인자값(Arguments Value) 예외처리하기

운영체제 : Ubuntu 18.04 개발 도구 : vscode 사용 언어 : Python 3.7 실행 예시 sample.py -hotpix [숫자] try: if sys.argv[1] == '-hotpix': cnt = 100 #핫픽셀 분석모드 try: cnt = int(sys.argv[2]) hotpix(cnt) except IndexError: hotpix(cnt) else: print('함수 인자 에러.') except IndexError: #셀 분석 cellcnt_start()

Programming/Python 2019. 9. 23. 16:47
FlightAware + Raspberry Pi 4 B (ADS-B) 초기구성하기

Raspberry Pi 4 model B + FlightAware - Pro Stick Plus v1.0 ADS-B 기준. SD카드 만들기 파일 준비 https://www.balena.io/etcher/ balena툴(balenaEtcher-Portable-1.5.56.exe) balena - Home Infrastructure to develop, deploy, and manage connected devices at scale www.balena.io https://www.raspberrypi.org/downloads/raspbian/ Raspbian(2019-07-10-raspbian-buster-lite.zip) Download Raspbian for Raspberry Pi Raspbian is ..

Lab/HardWare 2019. 9. 20. 11:18
AutoSSH + Reverse Proxy 구현하기 - Ubuntu 18.04

AutoSSH 5001(원격지 서버) -> 80(로컬 서버) 원격지 서버 작업 계정생성 및 autossh 설정 후 확인. sudo addgroup --gid 1100 tunnel sudo adduser --gid 1100 tunnel su -l tunnel ssh localhost (.ssh 디렉토리 만들기) vi ~/.ssh/authorized_keys pub값복사 telnet localhost 5001 확인 로컬 서버 작업 autossh 설치 및 터널링 설정. sudo apt install -y autossh ssh-keygen 키설정 ssh tunnel@xx.xx.xx 접속 확인 autossh -f -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax..

Lab/Server 2019. 9. 19. 19:25
Nginx + Letsencrypt 구현하기 - Ubuntu 18.04

nginx 구현 sudo apt install -y nginx방화벽 확인 sudo ufw app list방화벽 세팅 sudo ufw allow 'Nginx HTTPS' sudo ufw allow 'OpenSSH'letsencrypt(https) 구현 sudo nano /etc/nginx/sites-available/xx.xx.xx ... server_name xx.xx.xx;sudo apt-get install -y letsencrypt 인증서 받기 sudo letsencrypt certonly --nginx -d xx.xx.xx

Lab/Web 2019. 9. 19. 18:53
이전 1 2 다음
이전 다음
Notice
  • Contact
Recently Posted
TAG
  • datetime
  • nginx
  • Python
  • autossh
  • 인자값
  • vue.js
  • FlightAware
  • ADS-B
  • letsencrypt
  • influxdb
  • 예외처리
  • Peverse Proxy
  • rfc3339
  • Raspberry Pi
more
Posts by Date

티스토리툴바