미국 배당주에 투자하다 보면 배당 용어, 배당금에 대한 세금, 미국 주식의 배당일에 대해 궁굼하게 됩니다.

 

미국 주식 배당 투자와 관련된 정보에 대해서 간단하게 정리해 보겠습니다.

배당 관련 용어

  • Dividend Yield : 연간배당률

  • Ex-Dividend Date : 배당락일

    • 배당락일 전까지 주식 매수하면 배당 받을 수 있음

    • 가장 중요함

  • Payment Data : 배당 지급일

    • 미국 현지일 기준

    • 한국 개인 계좌로 입금 시까지 넉넉잡고 1주일 정도 소요됨

미국 주식 배당 세금

  • 미국 주식 매도는 양도 소득세 22% 징수한다.

  • 미국 주식 배당은 배당세 15.4% 원천징수하고 입금된다.

    • 배당세(14%) + 배당세의 주민세(10%) = 15.4% 원천징수

  • Limited Partners(LP)  무한책임회사의 경우는 39.6% 배당세 적용됨

미국 주식 양도 소득세

  • 1년간(1/1~12/31) 매매차익에서 기본 공제 250만원 기본 공제하고 시세 차익의 22%를 매년 5월 신고하여 납부해야 한다.

  • 1천만원 수익 시 양도세 계산 예시

    • 10,000,000 - 2,500,00(기본공제) = 7,500,00 * 22% = 1,650,000 

배당락일 정보

 

 

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

터미널 창을 연다.

아래의 명령어를 입력한다.

sudo killall -STOP -c usbd

다시 연결 시도하면 해결된다.

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

Python All Package Update

IT/Python 2020. 11. 29. 17:29

Python All Package Update

 

$ pip freeze > requirements.txt

 

open the text file, replace the == with >= , and execute

 

$ pip install -r requirements.txt --upgrade

 

If you have a problem with a certain package stalling the upgrade (numpy sometimes), just go to the directory ($), comment out the name (add a # before it) and run the upgrade again. You can later uncomment that section back. This is also great for copying python global environments.

 


Another way:

 

I also like the pip-review method:

 

py2

$ pip install pip-review

 

$ pip-review --local --interactive

 

py3

$ pip3 install pip-review

 

$ pip-review --local --interactive

반응형

'IT > Python' 카테고리의 다른 글

아나콘다 배포 패키지 설치 및 아나콘다 관리하기  (0) 2016.12.06
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

Elastic Search + Kibana  설치 및 구동

 

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.1-amd64.deb

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.7.1-amd64.deb

 

sudo dpkg -i elasticsearch-7.7.1-amd64.deb

sudo dpkg -i kibana-7.7.1-amd64.deb

 

 

sudo service elasticsearch start

 

sudo service kibana start

 

 

 

yfkwon@DESKTOP-A0P47SN$ sudo service kibana stop

kibana stopped.

yfkwon@DESKTOP-A0P47SN$ sudo service elasticsearch stop

* Stopping Elasticsearch Server

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

wget https://dl.influxdata.com/telegraf/releases/telegraf_1.14.3-1_amd64.deb

 

sudo dpkg -i telegraf_1.14.3-1_amd64.deb

 

cd /etc/telegraf

 

yfkwon@DESKTOP-A0P47SN î‚° /etc/telegraf î‚° sudo mv telegraf.conf telegraf.conf_20200607

yfkwon@DESKTOP-A0P47SN î‚° /etc/telegraf î‚° vi telegraf.conf

yfkwon@DESKTOP-A0P47SN î‚° /etc/telegraf î‚° sudo vi telegraf.conf

yfkwon@DESKTOP-A0P47SN î‚° /etc/telegraf î‚° sudo service telegraf start

 

 

yfkwon@DESKTOP-A0P47SN î‚° ~ î‚° sudo service telegraf stop

telegraf process was stopped [ OK ]

 

 

Telegraf에서 system metric 수집하여 elasticsearch에 적재하기

 

Telegraf는 influxdata(사)에서 opensource로 제공하는 plugin 기반의 metric수집 server agent이다.

github url : https://github.com/influxdata/telegraf 

 

telegraf의 역할이 이해하기 어렵게 느껴질 수 있는데, 간단히 말하자면 아래와 같이 input, process, output이 가능하다.

 

Telegraf로 할 수 있는 일

System의 ram, cpu수치를 elasticsearch에 적재

Redis의 data를 elasticsearch에 적재

File log를 influxdb에 적재

 

즉, input plugin으로 뽑아낸 데이터를 output plugin이 지원하는 곳으로 보낼 수 있다.

 

System metric을 elasticsearch로 보내기

 

엘라스틱서치에 시스템 메트릭을 적재하면 kibana, grafana등의 시각화 도구로 쉽게 조회가 가능

 

 

System metric을 elasticsearch에 보내기 위해서는 아래와 같이 telegraf의 설정이 필요하다.

 

# telegraf agent 셋팅# telegraf가 설치된 폴더의 etc/telegraf.conf 설정[agent]

interval = "10s"

round_interval = true

metric_batch_size = 1000

metric_buffer_limit = 10000

collection_jitter = "0s"

flush_interval = "10s"

flush_jitter = "0s"

precision = ""

debug = false

quiet = false

hostname = ""

omit_hostname = false

 

 

### OUTPUT

[[outputs.elasticsearch]]

## 엘라스틱 서치의 full url을 적는다.(http/https 필수)

urls = [ "http://1.123.123.123:9200" ] # required.

## 엘라스틱 서치 타임아웃 시간

## 반드시 agent interval보다 시간으로 설정한다.

## > 그렇지 않으면 context deadline exceeded 에러가 발생한다.

timeout = "60s"

enable_sniffer = false

health_check_interval = "10s"

## elasticsearch에 사용할 index name 설정

index_name = "my-computer-metric-%Y.%m.%d" # required.

 

## 만약 telegraf가 template를 자동으로 만들게 하고싶다면 true 변경

manage_template = false

template_name = "telegraf"

overwrite_template = false

 

 

### INPUT

## 아래 값들은 system metric을 수집하기 위한 plugin이다.# Read metrics about cpu usage

[[inputs.cpu]]

## Whether to report per-cpu stats or not

percpu = true

## Whether to report total system cpu stats or not

totalcpu = true

## Comment this line if you want the raw CPU time metrics

fielddrop = ["time_*"]

 

 

# Read metrics about disk usage by mount point

[[inputs.disk]]

## By default, telegraf gather stats for all mountpoints.

## Setting mountpoints will restrict the stats to the specified mountpoints.

# mount_points = ["/"]

 

## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually

## present on /run, /var/run, /dev/shm or /dev).

ignore_fs = ["tmpfs", "devtmpfs"]

 

 

# Read metrics about disk IO by device

[[inputs.diskio]]

## By default, telegraf will gather stats for all devices including

## disk partitions.

## Setting devices will restrict the stats to the specified devices.

# devices = ["sda", "sdb"]

## Uncomment the following line if you need disk serial numbers.

# skip_serial_number = false

 

 

# Get kernel statistics from /proc/stat

[[inputs.kernel]]

# no configuration

 

 

# Read metrics about memory usage

[[inputs.mem]]

# no configuration

 

 

# Get the number of processes and group them by status

[[inputs.processes]]

# no configuration

 

 

# Read metrics about swap memory usage

[[inputs.swap]]

# no configuration

 

 

# Read metrics about system load & uptime

[[inputs.system]]

# no configuration

 

# Read metrics about network interface usage

[[inputs.net]]

# collect data only about specific interfaces

# interfaces = ["eth0"]

 

[[inputs.netstat]]

# no configuration

 

[[inputs.linux_sysctl_fs]]

# no configuration

상기와 같이 설정하고, telegraf를 실행하면 elasticsearch에 data를 전송을 시작한다.

 

Elastic search의 data 확인

elasticsearch에 telegraf가 수집한 데이터가 잘 들어왔는지 확인하기 위해서 kibana를 사용했다.

 

kibana를 사용해서 index template를 'my-computer-metric-*'로 설정하고 나면 조회가 가능하다.

 

cpu, ram 등의 metric이 확인 된다.

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

sudo apt-get install -y apt-transport-https

 

sudo apt-get install -y software-properties-common wget

 

wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -

 

sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"

 

sudo apt-get update

 

sudo apt-get install grafana

 

sudo service grafana-server start

 

sudo service grafana-server status

 

 yfkwon@DESKTOP-A0P47SN î‚° ~ î‚° sudo service grafana-server stop

[sudo] password for yfkwon:

* Stopping Grafana Server                                                                                         [ OK ]

 

 

 

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

표 1. 다양한 픽셀 밀도의 구성 한정자

밀도 한정자

설명

ldpi

저밀도(ldpi)의 화면(~120dpi)에 대한 리소스입니다.

mdpi

중밀도(mdpi)의 화면(~160dpi)에 대한 리소스입니다. (이것이 기준 밀도입니다.)

hdpi

고밀도(hdpi)의 화면(~240dpi)에 대한 리소스입니다.

xhdpi

초고밀도(xhdpi)의 화면(~320dpi)에 대한 리소스입니다.

xxhdpi

초초고밀도(xxhdpi)의 화면(~480dpi)에 대한 리소스입니다.

xxxhdpi

초초초고밀도(xxxhdpi) 사용(~640dpi)에 대한 리소스입니다.

nodpi

모든 밀도에 대한 리소스입니다. 이들은 밀도 독립적 리소스입니다. 이 한정자 태그가 지정된 리소스의 경우 현재 화면의 밀도에 관계없이 시스템에서 리소스 크기를 조정하지 않습니다.

tvdpi

mdpi와 hdpi 사이의 화면(약 213dpi)에 대한 리소스입니다. 이 값은 '기본' 밀도 그룹으로 간주되지 않습니다. 대개의 경우 텔레비전용이며 앱에서는 대부분 필요하지 않습니다. 앱은 대부분 mdpi 및 hdpi 리소스를 제공하는 것으로 충분하며 시스템에서 필요에 따라 확장합니다. tvdpi 리소스를 제공해야 한다고 생각되는 경우 1.33*mdpi로 크기를 지정합니다. 예를 들어 mdpi 화면의 100px x 100px 이미지가 tvdpi에서는 133px x 133px입니다.

여러 밀도의 대체 비트맵 드로어블을 만들려면 6가지 기본 밀도 간에 3:4:6:8:12:16 크기 조정 비율을 따라야 합니다. 예를 들어 중밀도 화면에 대한 48x48픽셀의 비트맵 드로어블이 있는 경우 모든 다양한 크기는 다음과 같아야 합니다.

      • 저밀도(ldpi)의 경우 36x36(0.75x)

      • 중밀도(mdpi)의 경우 48x48(1.0x 기준)

      • 고밀도(hdpi)의 경우 72x72(1.5x)

      • 초고밀도(xhdpi)의 경우 96x96(2.0x)

      • 초초고밀도(xxhdpi)의 경우 144x144(3.0x)

      • 초초초고밀도(xxxhdpi)의 경우 192x192(4.0x)

 

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

https://dart.fss.or.kr/introduction/content2.do

 

전자공시시스템 | DART소개 | 보고서정보

 

dart.fss.or.kr

일정기간동안 기업의 사업내용, 재무상황 및 경영실적 등 기업내용 전반에 관한 사항을 정기적으로 공시

사업보고서 결산 후 90일 이내 공시심사실
반기보고서 반기 경과 후 45일 이내 공시심사실
분기보고서 분기 경과 후 45일 이내 공시심사실

 

※ 제출기한

연결기준의 분기ㆍ반기보고서를 제출하는 경우에는 연결공시하는 최초 사업연도와 그 다음 사업연도*에 한하여 그 기간 경과 후 60일 이내에 제출 가능
* '11년부터 K-IFRS를 의무적용하는 자산총액 2조원 이상 기업의 경우 '11, '12년이 이에 해당되며, 자산총액 2조원 미만 의무
   적용 기업의 경우 '13년부터 분기ㆍ반기보고서를 연결 기준으로 공시하므로 '13, '14년이 해당됨

증권의 공모를 위한 서류로서 증권신고서부터 증권발행실적보고서에 이르기까지 단계별로 공시

증권신고서 증권 모집 매출전 증권 모집ㆍ매출의 경우 공시심사실

자본시장감독국

자산운용감독국
투자설명서 신고서효력발생시
(신고서 제출시)
효력발생 후 청약권유시 제공하는 투자권유문서
(강제사항)
증권발행실적보고서 발행완료시 청약비율, 납입상황 등을 공시
일괄신고서 일괄발행전(1년이내) 일정기간 동안 모집매출예정물량을 사전에 일괄신고
일괄신고추가서류 실제 발행시 일괄신고후 유가증권을 실제로 발행하고자 하는 경우

사업보고서 제출대상법인(주권상장법인 등,자본시장법 §159①,영 §167①)은 경영활동과 관련된 사항 중 회사존립,조직재편성, 자본증감 등 투사의사 결정에 중요한 영향을 미치는 사실이 발생한 때 관련 내용을 공시

감사보고서 주주총회 종료후 2주일이내 회계관리국
연결감사보고서 - 한국채택국제회계기준적용회사 : 감사보고서와 동시 제출
- 한국채택국제회계기준을 적용하지 않는 회사 : 사업연도 종료 후 120일 이내(직전사업연도말 자산총액 2조원 이상 : 사업연도 종료 후 90일 이내)
회계관리국

 

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

플랫폼 버전

API 레벨

플랫폼 명

버전 코드

Android 10.0

29

Android 10

Q

Android 9

28

Pie

P

Android 8.1

27

Oreo

O_MR1

Android 8.0

26

Oreo

O

Android 7.1.1

 

Android 7.1

25

Nougat

N_MR1

Android 7.0

24

Nougat

N

Android 6.0

23

Marshmallow

M

Android 5.0

22

Lollipop

LOLLIPOP_MR1

Android 5.0

21

Lollipop

LOLLIPOP

 

Android 4.4W

20

KitKat Wear

KITKAT_WATCH

Android 4.4

19

KitKat

KITKAT

Android 4.3

18

Jelly Bean

JELLY_BEAN_MR2

Android 4.2, 4.2.2

17

Jelly Bean

JELLY_BEAN_MR1

Android 4.1, 4.1.1

16

Jelly Bean

JELLY_BEAN

Android 4.0.3, 4.0.4

15

IceCreamSandwich

ICE_CREAM_SANDWICH_MR1

Android 4.0, 4.0.1, 4.0.2

14

IceCreamSandwich

ICE_CREAM_SANDWICH

Android 3.2

13

Honeycomb

HONEYCOMB_MR2

Android 3.1.x

12

Honeycomb

HONEYCOMB_MR1

Android 3.0.x

11

Honeycomb

HONEYCOMB

 

Android 2.3.4

 

Android 2.3.3

10

Gingerbread

GINGERBREAD_MR1

Android 2.3.2

 

Android 2.3.1

 

Android 2.3

9

Gingerbread

GINGERBREAD

Android 2.2.x

8

Froyo

FROYO

Android 2.1.x

7

Eclair

ECLAIR_MR1

Android 2.0.1

6

Eclair

ECLAIR_0_1

Android 2.0

5

Eclair

ECLAIR

Android 1.6

4

Donut

DONUT

Android 1.5

3

Cupcake

CUPCAKE

Android 1.1

2

Base

BASE_1_1

Android 1.0

1

Base

BASE

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,

watch 명령을 이용한 linux 시스템 모니터링

 

watch 명령은 원하는 명령어의 결과를 원하는 시간(초) 주기로 리프레시 하여 결과를 보여주는 명령어 입니다.

시스템의 자원 사용량을 모니터링 하거나, 특정 명령어를 반복적으로 입력해서 결과를 확인해야 할 때, 유용하게 사용할 수 있는 명령어 입니다. 

 

[root@localhost ~]# watch --help

Usage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=<n>] [--no-title] [--version] <command>

  -d, --differences[=cumulative]        highlight changes between updates

                (cumulative means highlighting is cumulative)

  -h, --help                            print a summary of the options

  -n, --interval=<seconds>              seconds to wait between updates

  -v, --version                         print the version number

  -t, --no-title                        turns off showing the header

[root@localhost ~]# 

 

 

기본 사용 방법)

[root@localhost]# watch [-d] [-n seconds] 'command'

종료는 [Ctrl + c]

 

-d 옵션은 이전 출력결과와 비교하여 변경된 부분을 표시해 주는 기능

-n 옵션은 입력한 명령어의 결과를 원하는 초단위 간격으로 출력해 주는 기능(default 값은 2초)

 

====================================================================

 

예제) 

 

- 시스템의 uptime 값을 화면에 계속 출력(2초간격)

 

  [root@localhost ~]# watch uptime

 

  Every 2.0s: uptime                                                                                       Thu Mar 29 01:49:12 2018

 

   01:49:12 up 83 days, 18:44,  1 user,  load average: 0.00, 0.00, 0.00

 

 

 

- command에 띄어쓰기가 들어갈 경우는 ' ' 으로 묶어 준다. uptime 값을 5초 간격으로 화면에 계속 출력

 

  [root@localhost ~]# watch -d -n 5 'cat /proc/uptime'

 

  Every 5.0s: cat /proc/uptime                                                                           Thu Mar 29 01:51:19 2018

 

  7238809.82 14469889.75

 

 

 

- 10초 간격으로 iostat 모니터링

 

  [root@localhost local]# watch -n 10 iostat

 

  Every 2.0s: iostat                                                                                          Thu Mar 29 01:56:39 2018

 

  Linux 2.6.32-696.el6.x86_64 (localhost.localdomain)     03/29/2018      _x86_64_        (2 CPU)

 

  avg-cpu:  %user   %nice %system %iowait  %steal   %idle

             0.01    0.00    0.01    0.02    0.03   99.93

 

  Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn

  xvda              0.20         0.48         2.80    3503370   20247044

 

 

- 5초 간격으로 vmstat 모니터링

 

  [root@localhost local]# watch -n 5 vmstat

 

  Every 2.0s: vmstat                                                                                          Thu Mar 29 01:57:11 2018

 

  procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----

   r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st

   0  0   9636 1224232 148464 483280    0    0     0     1    3    3  0  0 100  0  0

 

 

- 1초 간격으로 apache 프로세스 모니터링

 

  [root@localhost local]# watch -d -n 1 'ps -ef | grep httpd | grep -v grep'

 

  Every 1.0s: ps -ef | grep httpd | grep -v grep                                                        Thu Mar 29 01:55:20 2018

 

  root     10214     1  0 01:54 ?        00:00:00 /usr/local/apache/bin/httpd -k start

  daemon   10217 10214  0 01:54 ?        00:00:00 /usr/local/apache/bin/httpd -k start

  daemon   10218 10214  0 01:54 ?        00:00:00 /usr/local/apache/bin/httpd -k start

  daemon   10219 10214  0 01:54 ?        00:00:00 /usr/local/apache/bin/httpd -k start

 

 

- 여러가지 명령어를 조합해서도 사용 가능(2초 간격)

   w 명령어를 통한 현재 접속자, loadaverage, uptime 확인

   df 명령을 통한 디스크 사용량

   free 명령을 통한 memory 사용량 

 

[root@localhost local]# watch -d 'w; echo; df -h; echo; free -m'

 

  Every 2.0s: w; echo; df -h; echo; free -m                                                             Thu Mar 29 02:02:44 2018

 

   02:02:44 up 83 days, 18:58,  1 user,  load average: 0.00, 0.00, 0.00

  USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT

  root     pts/0    10.10.0.1        01:38   12.00s  0.20s  0.02s watch -d w; ech

 

  Filesystem      Size  Used Avail Use% Mounted on

  /dev/xvda3      7.6G  6.0G  1.2G  84% /

  tmpfs           936M     0  936M   0% /dev/shm

  /dev/xvda1      240M   35M  193M  16% /boot

 

               total       used       free     shared    buffers     cached

  Mem:          2000        805       1194          0        144        471

  -/+ buffers/cache:        188       1811

  Swap:         2047          9       2038

반응형
블로그 이미지

조이풀 라이프

Lift is short, enjoy the life

,