반응형

translator - Visual Studio Marketplace

 

translator - Visual Studio Marketplace

Extension for Visual Studio Code - translate for Korean

marketplace.visualstudio.com

코 파일럿에게 일 시키려면 영어가 필요한데 

 

요 아이가 편하게 해 준다

 

Vscode Google Translate - Visual Studio Marketplace

 

Vscode Google Translate - Visual Studio Marketplace

Extension for Visual Studio Code - Translate text right in your code

marketplace.visualstudio.com

요 아이도 있고

'프로그래밍' 카테고리의 다른 글

무료 다이어그램 사이트  (0) 2023.02.17
블루아카이브 1위  (0) 2023.01.25
airflow 도커 오퍼레이터  (0) 2023.01.10
Airflow  (1) 2023.01.06
blazor ui 컨포넌트  (0) 2023.01.03
반응형

Gliffy Diagrams 사용했는데

 

라이센스 정책이 변경되더니

 

이제 실행이 되지 않는다

 

그래서 무료를 찾던중 좋은 아이 발견

 

https://app.diagrams.net/

 

Flowchart Maker & Online Diagram Software

Flowchart Maker and Online Diagram Software draw.io is free online diagram software. You can use it as a flowchart maker, network diagram software, to create UML online, as an ER diagram tool, to design database schema, to build BPMN online, as a circuit d

app.diagrams.net

 

aws를 많이 썼는데 해당 기능이 많아서 좋다

 

이걸로 옮겨 타야 겠다

'프로그래밍' 카테고리의 다른 글

vscode 번역 플러그인 추천  (0) 2023.03.08
블루아카이브 1위  (0) 2023.01.25
airflow 도커 오퍼레이터  (0) 2023.01.10
Airflow  (1) 2023.01.06
blazor ui 컨포넌트  (0) 2023.01.03
반응형

lol

'프로그래밍' 카테고리의 다른 글

vscode 번역 플러그인 추천  (0) 2023.03.08
무료 다이어그램 사이트  (0) 2023.02.17
airflow 도커 오퍼레이터  (0) 2023.01.10
Airflow  (1) 2023.01.06
blazor ui 컨포넌트  (0) 2023.01.03
반응형

회사에서 airflow를 도입했는데

도커 오퍼레이터를 쓰는게 그렇게 쉽지는 않아서

지금 도커 허브에 올라온게 2.5 버전이 올라 왔고

문서는 3.4 버전이 stable이라

이글을 볼 때 지금 설치 버전과 문서 버전을 꼭 확인해 보라!

sudo chmod 666 /var/run/docker.sock

from datetime import datetime, timedelta
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.operators.docker_operator import DockerOperator
from airflow.operators.python_operator import BranchPythonOperator
from airflow.operators.dummy_operator import DummyOperator
from docker.types import Mount

default_args = {
'owner'                 : 'airflow',
'description'           : 'Use of the DockerOperator',
'depend_on_past'        : False,
'start_date'            : datetime(2021, 5, 1),
'email_on_failure'      : False,
'email_on_retry'        : False,
'retries'               : 1,
'retry_delay'           : timedelta(minutes=5)
}


with DAG('himari2', default_args=default_args, schedule_interval="0 */4 * * *", catchup=False) as dag:
    start_dag = DummyOperator(
        task_id='start_dag'
        )

    end_dag = DummyOperator(
        task_id='end_dag'
        )

    t1 = BashOperator(
        task_id='print_current_date',
        bash_command='date'
        )

    t2 = DockerOperator(
        task_id='himari_collector',
        image='centos:latest',
        api_version='auto',
        auto_remove=True,
        docker_url="unix://var/run/docker.sock",
        network_mode="host",
        environment={'ENVIRONMENT':'linux'},
        mount_tmp_dir=False,
        mounts=[
            Mount(source='/home/mx/docker/airflow/var/pos',
              target='/var/pos',
              type='bind'),
            Mount(source='/home/mx/docker/airflow/var/data',
              target='/var/data',
              type='bind'),
        ],
        )

    t4 = BashOperator(
        task_id='print_hello',
        bash_command='echo "hello world"'
        )

    start_dag >> t1

    t1 >> t2 >> t4

    t4 >> end_dag

'프로그래밍' 카테고리의 다른 글

무료 다이어그램 사이트  (0) 2023.02.17
블루아카이브 1위  (0) 2023.01.25
Airflow  (1) 2023.01.06
blazor ui 컨포넌트  (0) 2023.01.03
wsl2 고정 ip처럼 사용하기  (0) 2022.12.06
반응형

머신 런닝등에서 배치잡을 위한 프로그램

아파치꺼

설치과정은 회사 직원분이 설치해 주셔서 모름 ....

바로 스크립트 들어가자

대소문자 따짐 ....

from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator

import datetime
import pendulum

# 한국 시간 timezone 설정
kst = pendulum.timezone("Asia/Seoul")
# 한국 시간 2021년 1월 1일 시작, 오전 8시마다 실행되는 DAG 설정
dag = DAG(
     "tutorial",
    default_args={
        "depends_on_past": True,
        "retries": 1,
        "retry_delay": datetime.timedelta(minutes=3),
    },
    start_date=pendulum.datetime(2021, 1, 1, tz=kst),
    schedule_interval="0 * * * *",
    catchup=False,
)


t1 = BashOperator(
    task_id="himari_test_1",
    bash_command='echo test1',
    dag=dag
)

t2 = BashOperator(
    task_id="himari_test_2",
    bash_command='echo test2',
    dag=dag
)

t1 >> t2

https://m.blog.naver.com/wideeyed/221565240108
요기 블로그가 잘 나온 듯

'프로그래밍' 카테고리의 다른 글

블루아카이브 1위  (0) 2023.01.25
airflow 도커 오퍼레이터  (0) 2023.01.10
blazor ui 컨포넌트  (0) 2023.01.03
wsl2 고정 ip처럼 사용하기  (0) 2022.12.06
docker network mode  (0) 2022.12.06
반응형

회사에서 

 

https://demos.devexpress.com/blazor/

 

Native Blazor Components powered by DevExpress

DevExpress UI for Blazor ships with native user interface components (including a Data Grid, Pivot Grid, Charts and Scheduler) so you can design rich user experiences with both Blazor.

demos.devexpress.com

요 아이를 주로 썼는데

 

https://blazor.radzen.com/

 

Free Blazor Components | 70+ controls by Radzen

Boost your Blazor development Radzen Blazor Studio provides tons of productivity gains for Blazor developers Get started today. Radzen Blazor Studio is free to use. You can also test the premium features for 15 days. Download Now Learn More Radzen Blazor C

blazor.radzen.com

 

이리로 갈아타게 되었다

 

요 아이는 무료네 ....

'프로그래밍' 카테고리의 다른 글

airflow 도커 오퍼레이터  (0) 2023.01.10
Airflow  (1) 2023.01.06
wsl2 고정 ip처럼 사용하기  (0) 2022.12.06
docker network mode  (0) 2022.12.06
Postgresql Last Insert Id 얻기  (0) 2022.12.01
반응형

https://github.com/microsoft/WSL/issues/4150#issuecomment-504209723

 

[WSL 2] NIC Bridge mode 🖧 (Has TCP Workaround🔨) · Issue #4150 · microsoft/WSL

Issue WSL 2 seems to NAT it's virtual network, instead of making it bridged to the host NIC. My goal is for a service running in Ubuntu in WSL 2 to be accessible from anywhere on my local netwo...

github.com

https://hou27.tistory.com/entry/WSL2-%EC%A0%95%EC%A0%81-ip-%ED%95%A0%EB%8B%B9%ED%95%98%EA%B8%B0

 

WSL2 - 정적 ip 할당하기 && NIC Bridge mode

필자는 Ubuntu 20.04 를 사용하고 있다. 계속해서 프로젝트를 진행하던 중 서버와 클라이언트를 연결하는데 자꾸 wsl의 ip가 변경되다 보니 거슬렸다. 물론 다른 해결방법도 있었지만 wsl의 ip를 정적

hou27.tistory.com

땡큐 베리 감사

'프로그래밍' 카테고리의 다른 글

Airflow  (1) 2023.01.06
blazor ui 컨포넌트  (0) 2023.01.03
docker network mode  (0) 2022.12.06
Postgresql Last Insert Id 얻기  (0) 2022.12.01
이번에 작업한 도커파일  (0) 2022.11.28
반응형

https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode

 

Compose file version 3 reference

 

docs.docker.com

 

간단한 건데 자꾸 이상한게 찾아져서 

 

network_mode: "host"

요래하면 호스트 모드

'프로그래밍' 카테고리의 다른 글

blazor ui 컨포넌트  (0) 2023.01.03
wsl2 고정 ip처럼 사용하기  (0) 2022.12.06
Postgresql Last Insert Id 얻기  (0) 2022.12.01
이번에 작업한 도커파일  (0) 2022.11.28
golang docker 말기  (0) 2022.11.24
반응형

https://stackoverflow.com/questions/2944297/postgresql-function-for-last-inserted-id

 

PostgreSQL function for last inserted ID

In PostgreSQL, how do I get the last id inserted into a table? In MS SQL there is SCOPE_IDENTITY(). Please do not advise me to use something like this: select max(id) from table

stackoverflow.com

  INSERT INTO persons (lastname,firstname) VALUES ('Smith', 'John');
  SELECT currval('persons_id_seq')
  INSERT INTO persons (lastname,firstname) VALUES ('Smith', 'John');
  SELECT currval(pg_get_serial_sequence('persons','id'));

'프로그래밍' 카테고리의 다른 글

wsl2 고정 ip처럼 사용하기  (0) 2022.12.06
docker network mode  (0) 2022.12.06
이번에 작업한 도커파일  (0) 2022.11.28
golang docker 말기  (0) 2022.11.24
golang 공유 자원 사용하기  (0) 2022.11.03
반응형

golang을 최소 설치를 했더니 귀찮다.

FROM golang:alpine

WORKDIR /app

COPY . ./

RUN go mod download
RUN go mod tidy
RUN go build -o main .

# TimeZone 설정
RUN apk --no-cache add tzdata && \
    cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
    echo "Asia/Seoul" > /etc/timezone \
    apk del tzdata

CMD ["./main", "1"]
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /App

# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out


# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /App
COPY --from=build-env /App/out .

# TimeZone 설정
ENV TZ Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone


ENTRYPOINT ["dotnet", "AnomalyDetection.dll"]
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /App

# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /App
COPY --from=build-env /App/out .

# TimeZone 설정
ENV TZ Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone


ENTRYPOINT ["dotnet", "Aru.dll"]
version: '3.3'
services:
  aru_collector:
    image: 'aru_collector'
    volumes:
    - /mnt/d/Data/Aru:/var/pos
    - /mnt/d/ML/Data:/var/data    
    - /mnt/d/data/AruTrigger:/var/trigger    
    environment:
      ENVIRONMENT: linux
    links:
    - "PostgreSQL"
  aru_anomaly_detection:
    image: 'aru_anomaly_detection'
    volumes:
    - /mnt/d/ML/Data:/var/data    
    - /mnt/d/data/AruTrigger:/var/trigger    
    environment:
      ENVIRONMENT: linux
    links:
    - "PostgreSQL"  
  aru:
    image: 'aru'
    volumes:
    - /mnt/d/ML/Data:/var/data    
    - /mnt/d/data/AruTrigger:/var/trigger    
    environment:
      ENVIRONMENT: linux
    network_mode: "host"
  PostgreSQL:
    image: postgres
    environment:
      POSTGRES_PASSWORD: "test"          
    ports:
    - 5432:5432
    volumes:
    - /home/postgreSQL:/var/lib/postgresql/data
    shm_size: 1g

'프로그래밍' 카테고리의 다른 글

docker network mode  (0) 2022.12.06
Postgresql Last Insert Id 얻기  (0) 2022.12.01
golang docker 말기  (0) 2022.11.24
golang 공유 자원 사용하기  (0) 2022.11.03
golang 간단한 pg 라이브러리  (0) 2022.11.02

+ Recent posts