This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 설치전 필요한 라이브러리 추가. python 가상 환경 설치를 위한 라이브러리 추가 | |
sudo apt update | |
sudo apt install build-essential libssl-dev libffi-dev python3-dev python-pip libsasl2-dev libldap2-dev default-libmysqlclient-dev pkg-config -y | |
sudo apt install python3.10-venv -y | |
# 가상환경 설정 | |
python3 -m venv superset-venv | |
source superset-venv/bin/activate | |
# requirement 정리 필요 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################# | |
# curl | |
################################# | |
# 2분간 재시도 횟수 5회 | |
curl --retry 5 --retry-max-time 120 http://127.0.0.1 | |
# connection refused 오류도 재작업 | |
curl --retry-connrefused http://127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyhive import hive | |
from TCLIService.ttypes import TOperationState | |
conn = hive.connect(host='test.com', | |
port=10000, | |
database='default', | |
auth='KERBEROS', | |
username='hive_user', | |
kerberos_service_name='hive').cursor() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Copyright 2022 The Apache Software Foundation | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def escape_ansi_color_pattern(ansi_text: str) -> str: | |
# 7-bit C1 ANSI sequences | |
ansi_escape = re.compile(r''' | |
\x1B # ESC | |
(?: # 7-bit C1 Fe (except CSI) | |
[@-Z\\-_] | |
| # or [ for CSI, followed by a control sequence | |
\[ | |
[0-?]* # Parameter bytes | |
[ -/]* # Intermediate bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def op_test0(a, b, c, d): | |
print(a, b, c, d) | |
def op_test1(val1, *op_args): | |
print(val1) | |
print(op_args) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow.models import DAG | |
from airflow.operators.python_operator import PythonOperator | |
import datetime | |
dag_args = {'owner': 'deploy', | |
'start_date': datetime.datetime(2022, 7, 10), | |
'catchup': False} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: node-shell | |
namespace: test-namespace | |
spec: | |
volumes: | |
- name: kube-api-access-l47gj | |
projected: | |
sources: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: pv-mysql | |
spec: | |
capacity: | |
storage: 50Gi | |
accessModes: | |
- ReadWriteOnce | |
persistentVolumeReclaimPolicy: Retain |
NewerOlder