2023年12月26日 星期二

how to umount storage with busy, linux

 https://linuxhandbook.com/umount-target-busy/

firefox add-on

 1. https://support.mozilla.org/en-US/kb/unable-install-add-ons-extensions-or-themes


2. use live host


LiveHosts

2023年11月29日 星期三

zabbix macro and his function

all view 

https://www.zabbix.com/documentation/current/en/manual/config/macros




# macro

https://www.zabbix.com/documentation/current/en/manual/config/macros 


# macro with function

https://www.zabbix.com/documentation/current/en/manual/config/macros/macro_functions

2023年10月17日 星期二

python 2.7 post handler

 https://www.cnblogs.com/gattaca/p/7301282.html

2023年10月11日 星期三

fluentd log-driver

 https://blog.boatswain.io/zh/post/docker-container-log-rotation/


https://gdevillele.github.io/engine/admin/logging/fluentd/


https://hub.docker.com/r/fluent/fluent-bit/

2023年10月4日 星期三

zabbix storage

 


查看磁盘容量息的key值:vfs.fs.size[/,pfree]

vfs.fs.size[/,pfree]:取/领域的剩余空间率。p是percentage,

vfs.fs.size[/,free]:取/领域的剩余空间。对应的单位就是B(这里的意思是Byte)

vfs.fs.size[/,pused]:取/领域的使用空间率。

vfs.fs.size[/,used]:取/领域的使用空间。

如果要创建触发器表达式可以使用{ZABBIX-CC:vfs.fs.size[/,pfree].last(0)}<20



參考 https://blog.51cto.com/ityunwei2017/1864128


2023年9月5日 星期二

CRONTAB file

 in /var/spool/cron 

2023年8月8日 星期二

python star symbol is unpacking

# explain

This PEP proposes extended usages of the * iterable unpacking operator and ** dictionary unpacking operators to allow unpacking in more positions, an arbitrary number of times, and in additional circumstances. Specifically, in function calls, in comprehensions and generator expressions, and in displays.


https://www.geeksforgeeks.org/packing-and-unpacking-arguments-in-python/

https://peps.python.org/pep-0448/#id6

 

# example 

print( [i for i in [*[1,2], 1]] )

# [1, 2, 1]

print( [i for i in [[1,2], 1]] )

# [[1, 2], 1]


def hello(*attrs):

    for s in attrs:

        print(s)

        

        

hello([1,2,3])

#[1, 2, 3]


hello(*[1,2,3])

#1

#2

#3

hello(1,2,3)

#1

#2

#3

2023年7月17日 星期一

Rabbitmq REST API

 1. https://rawcdn.githack.com/rabbitmq/rabbitmq-server/v3.12.1/deps/rabbitmq_management/priv/www/api/index.html



2. https://www.rabbitmq.com/vhosts.html

2023年7月11日 星期二

airflow api

 # seting the 

airflow_api_auth_backends: 'airflow.api.auth.backend.basick_auth'




# Test

curl -X GET  --user "airflow:1qaz2WSX" "https://airflow-dev.armor.hinet.net/api/v1/pools"


curl -X PATCH 'https://airflow-dev.armor.hinet.net/api/v1/dags/report_backup?update_mask=is_paused' \

-H 'Content-Type: application/json' \

--user "airflow:1qaz2WSX" \

-d '{

    "is_paused": true

}'


# ref setting airflow.cfg

airflow_api_auth_backends: 'airflow.api.auth.backend.basick_auth


# https://stackoverflow.com/questions/61329923/apache-airflow-rest-api-authentication

# https://airflow.apache.org/docs/apache-airflow/1.10.12/howto/set-config.html'

#https://airflow-dev.armor.hinet.net/redoc

2023年7月4日 星期二

cenos7 selinux close

 

setenforce 0



# good

https://wiki.gentoo.org/wiki/SELinux/Tutorials/Where_to_find_SELinux_permission_denial_details


#

https://www.ltsplus.com/linux/disable-selinux

2023年7月3日 星期一

centos7 epel

sudo yum install epel-release

 sudo yum provides iperf


2023年7月2日 星期日

centos7 open the firewall

 #network tools

sudo yum install telnet


# fireall stop

systemctl stop firewalld

systemctl status firewalld


#

# add the port

sudo firewall-cmd --zone=public --add-port=10050/tcp --permanent

sudo firewall-cmd --reload

sudo iptables-save | grep 10050



#ref

https://www.thegeekdiary.com/how-to-open-a-ports-in-centos-rhel-7/

2023年6月26日 星期一

Centos7 install sshd

 3  sudo yum install openssh opessh-server

    5  vi /etc/ssh/sshd_config

    7  systemctl restart sshd.service

    8  systemctl status sshd.service

    9  sudo systemctl enable sshd.service



ref:

https://www.brilliantcode.net/124/centos-7-install-and-configure-ssh/

https://phoenixnap.com/kb/how-to-enable-ssh-centos-7


2023年6月16日 星期五

Machine learning on line demo or good paper

 1. svm

 https://greitemann.dev/svm-demo


2.  tensor flow

https://playground.tensorflow.org/#activation=linear&batchSize=10&dataset=gauss&regDataset=reg-plane&learningRate=0.03&regularizationRate=0&noise=0&networkShape=&seed=0.96726&showTestData=false&discretize=false&percTrainData=50&x=true&y=true&xTimesY=true&xSquared=false&ySquared=false&cosX=false&sinX=false&cosY=false&sinY=false&collectStats=false&problem=classification&initZero=false&hideText=false


3. percentage

https://medium.com/jameslearningnote/%E8%B3%87%E6%96%99%E5%88%86%E6%9E%90-%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92-%E7%AC%AC3-2%E8%AC%9B-%E7%B7%9A%E6%80%A7%E5%88%86%E9%A1%9E-%E6%84%9F%E7%9F%A5%E5%99%A8-perceptron-%E4%BB%8B%E7%B4%B9-84d8b809f866


https://ithelp.ithome.com.tw/articles/10215769



2023年5月31日 星期三

nfdump command quickly

 


# quickly 

https://yurisk.info/2020/09/20/nfdump-netflow-usage-examples-cookbook/


#

https://nfdump.sourceforge.net/


#

https://manpages.ubuntu.com/manpages/xenial/man1/nfdump.1.html

2023年5月26日 星期五

ubuntu install and some services

 1. https://blog.gtwang.org/linux/install-ubuntu-linux-to-usb-stick/


2. install  nfs

https://linuxhint.com/install-and-configure-nfs-server-ubuntu-22-04/

Chatgpu

 

https://www.readfog.com/a/1688165476098740224

https://arxiv.org/pdf/2104.04473.pdf


https://medium.com/@gibramraul/security-attack-on-chatgpt-step-by-step-36edb949e56d



python effective and data

 https://www.readfog.com/a/1686829807819657216


# python sqlaclemy

https://docs.sqlalchemy.org/en/20/core/engines.html

https://towardsdatascience.com/sqlalchemy-python-tutorial-79a577141a91

https://ithelp.ithome.com.tw/articles/10220446


# python regular

https://chwang12341.medium.com/%E7%B5%A6%E8%87%AA%E5%B7%B1%E7%9A%84python%E5%B0%8F%E7%AD%86%E8%A8%98-%E5%BC%B7%E5%A4%A7%E7%9A%84%E6%95%B8%E6%93%9A%E8%99%95%E7%90%86%E5%B7%A5%E5%85%B7-%E6%AD%A3%E5%89%87%E8%A1%A8%E9%81%94%E5%BC%8F-regular-expression-regex%E8%A9%B3%E7%B4%B0%E6%95%99%E5%AD%B8-a5d20341a0b2

ELK

 1. https://ithelp.ithome.com.tw/users/20103420/ironman/1046


2. https://ithelp.ithome.com.tw/articles/10186351


3. https://ithelp.ithome.com.tw/articles/10186349


4. https://github.com/deviantony/docker-elk


5. security elk

https://ithelp.ithome.com.tw/articles/10216666


6. git

https://github.com/deviantony/docker-elk/blob/main/docker-compose.yml


7. file beat

https://www.elastic.co/guide/en/beats/filebeat/current/running-on-docker.html


https://hackmd.io/@QCZ_Kvv1ScixyAPzRYDKWQ/SytK_Y9HE?type=view


8. elk license 

https://techexpert.tips/elasticsearch/elasticsearch-trial-license-installation/


9.  video

https://www.youtube.com/watch?v=DVgKDPf7hOU&ab_channel=CodingExplained


10. filebeat nginx

https://www.bmc.com/blogs/elasticsearch-filebeat-nginx/


https://linyencheng.github.io/2020/09/02/elastic-logging-quick-start/

https://ithelp.ithome.com.tw/articles/10275576


network submask cal

 https://damaha-labo.site/converter/zh-Hant/IT/CalcSubnetMask


https://www.iptp.net/zh_HK/iptp-tools/ip-calculator/


https://david50.pixnet.net/blog/post/45215556-%5B%E7%AD%86%E8%A8%98%5Dipv4-submask%E8%A8%88%E7%AE%97


http://webtest.ccivs.cyc.edu.tw/net/new1.htm


https://ithelp.ithome.com.tw/questions/10153316

pandas tutorial

 https://pandas.pydata.org/docs/getting_started/intro_tutorials/06_calculate_statistics.html


# pandas read sql tutorial

https://mariadb.com/ko/resources/blog/reporting-with-pandas-and-seals-and-pythons-oh-my/



# pandas from records

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.from_records.html


# pands read sql

https://pandas.pydata.org/docs/reference/api/pandas.read_sql.html

https://www.geeksforgeeks.org/sqlalchemy-orm-conversion-to-pandas-dataframe/


# to pandas data

https://stackoverflow.com/questions/29525808/sqlalchemy-orm-conversion-to-pandas-dataframe



#


rabbitmq hearbear

 https://www.rabbitmq.com/heartbeats.html


https://www.cnblogs.com/royfans/p/14169134.html

python mutithread and filelock

 https://superfastpython.com/threadpool-python/


https://py-filelock.readthedocs.io/en/latest/index.html

https://bobbyhadz.com/blog/python-get-random-key-value-from-dictionary

AI -Difussion Models

 

Diffusion Models Beat GANs on Image Synthesis


https://arxiv.org/abs/2105.05233

Machine learning PCA

 http://www.cs.otago.ac.nz/cosc453/student_tutorials/principal_components.pdf


https://chih-sheng-huang821.medium.com/%E6%A9%9F%E5%99%A8-%E7%B5%B1%E8%A8%88%E5%AD%B8%E7%BF%92-%E4%B8%BB%E6%88%90%E5%88%86%E5%88%86%E6%9E%90-principle-component-analysis-pca-58229cd26e71



Machine learning Decision tree

 # 

機器學習: Ensemble learning之Bagging、Boosting和AdaBoost

https://chih-sheng-huang821.medium.com/%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92-ensemble-learning%E4%B9%8Bbagging-boosting%E5%92%8Cadaboost-af031229ebc3


#

SPAM Detection with Decision Trees

https://mef-bda503.github.io/pj-sevgilit/files/SPAM.html


#

Decision Trees Concepts with Iris Dataset

https://medium.com/intuitive-machine-learning/decision-trees-concepts-with-iris-dataset-304648b961f5




#XGBoost
https://slundberg.github.io/shap/notebooks/Census%20income%20classification%20with%20XGBoost.html


# Decision tree

https://ithelp.ithome.com.tw/articles/10271143
https://sites.google.com/view/zsgititit/home/ji-qi-xue-xi/%E6%B1%BA%E7%AD%96%E6%A8%B9decision-trees

http://debussy.im.nuu.edu.tw/sjchen/MachineLearning/final/CLS_DT.pdf

https://chtseng.wordpress.com/2017/02/10/%E6%B1%BA%E7%AD%96%E6%A8%B9-decision-trees/


https://buggyprogrammer.com/random-forest-based-features-selection/

機器學習_學習筆記系列(36):隨機森林分類(Random Forest Classifier)

https://tomohiroliu22.medium.com/%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92-%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98%E7%B3%BB%E5%88%97-36-%E9%9A%A8%E6%A9%9F%E6%A3%AE%E6%9E%97%E5%88%86%E9%A1%9E-random-forest-classifier-bd902dc107c5



https://tomohiroliu22.medium.com/%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92-%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98%E7%B3%BB%E5%88%97-24-%E6%B1%BA%E7%AD%96%E6%A8%B9%E5%88%86%E9%A1%9E-decision-tree-classifier-f79eb277e7a1



https://medium.com/@gary1346aa/%E6%A9%9F%E6%A2%B0%E5%AD%B8%E7%BF%92-gradient-boosting-1-272e8d7b17e1

https://www.baeldung.com/cs/gradient-boosting-trees-vs-random-forests



# sci ket and online test

https://scikit-learn.org/stable/

https://onecompiler.com/python/3z7xujrzn 


資料視覺化之 Decision tree (決策樹)範例與 Machine Learning (機器學習) 概念簡單教學(入門)
https://tree.rocks/decision-tree-graphviz-contour-with-pandas-gen-train-test-dataset-for-beginner-9137b7c8416a


# 深度學習
https://tomohiroliu22.medium.com/%E6%B7%B1%E5%BA%A6%E5%AD%B8%E7%BF%92paper%E7%B3%BB%E5%88%97-01-deep-learning-38dfd9b6a9dc

good author
https://tomohiroliu22.medium.com/

# 測試衡量
https://cynthiachuang.github.io/Common-Evaluation-MetricAccuracy-Precision-Recall-F1-ROCAUC-and-PRAUC/

機器學習Lesson 20— 為什麼「梯度提升」會叫「梯度」提升呢?

https://flag-editors.medium.com/%E6%A9%9F%E5%99%A8%E5%AD%B8%E7%BF%92lesson-20-%E7%82%BA%E4%BB%80%E9%BA%BC-%E6%A2%AF%E5%BA%A6%E6%8F%90%E5%8D%87-%E6%9C%83%E5%8F%AB-%E6%A2%AF%E5%BA%A6-%E6%8F%90%E5%8D%87%E5%91%A2-48a2d4585f44


# 學習文章
http://debussy.im.nuu.edu.tw/sjchen/ML_final.html
成為機器學習的王者系列 第 1 篇
https://ithelp.ithome.com.tw/articles/10216118


2023年4月14日 星期五

Packet tracer

 1. download

https://www.netacad.com/portal/resources/packet-tracer


2. https://www.packettracernetwork.com/download/download-packet-tracer.html

2023年3月15日 星期三

parquet

 https://www.dremio.com/resources/guides/intro-apache-parquet/



https://towardsdatascience.com/the-best-format-to-save-pandas-data-414dca023e0d

2023年3月13日 星期一

Docker debug

 sudo dockerd --debug

2023年3月9日 星期四

chatgpt

 https://quickref.me/chatgpt


https://www.explainthis.io/zh-hant/chatgpt/start


https://meetanshi.com/blog/chatgpt-for-keyword-research/


https://seo.ai/blog/chatgpt-the-ultimate-keyword-research-tool-6-examples

2023年3月8日 星期三

influxdb

  https://docs.influxdata.com/influxdb/v1.8/concepts/

https://github.com/influxdata/influxdb

https://ithelp.ithome.com.tw/articles/10223604

2023年2月19日 星期日

BGP Router Reflector

 https://orhanergun.net/bgp-route-reflector-in-plain-english

TCP SYN FLOOD

https://www.alibabacloud.com/blog/tcp-syn-queue-and-accept-queue-overflow-explained_599203

2023年1月18日 星期三

Eightnight queeue problem

 # Online Python compiler (interpreter) to run Python online.

# Write Python 3 code in this online editor and run it.

def isValid(board, row, col):

    for i in range(row):

        if board[i] == col or abs(board[i] - col) == abs(i - row):

            return False

    return True


def eightQueens(board, row):

    print(f"borad: {board}, row: {row}")

 

    if row == 8:

        print("finally:")

        print(board)

        print("-"*20)

        return


    for i in range(8):

        if isValid(board, row, i):

            board[row] = i

            eightQueens(board, row + 1)


eightQueens([-1] * 8, 0)



2023年1月12日 星期四

IP network tools

 1. mask table

https://ithelp.ithome.com.tw/questions/10153316

OneFS guideline

 1.  version release note

https://www.delltechnologies.com/asset/en-us/products/storage/industry-market/h18031-wp-powerscale-onefs-prior-release-contents.pdf.external


2. cve

https://cve.report/software/dell/emc_powerscale_onefs


3. cmd line

https://www.delltechnologies.com/asset/en-us/products/storage/technical-support/docu95371.pdf


4. network design

https://www.delltechnologies.com/asset/en-us/products/storage/industry-market/h16463-isilon-advanced-networking-fundamentals.pdf


2023年1月10日 星期二

sqlit command

 https://sqlite.org/cli.html

junos

 1. Fw filter

https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/concept/firewall-filter-stateless-guidelines-for-configuring.html

firewall {
    family family-name {
        filter filter-name {
            accounting-profile name; 
            instance-shared;
            interface-specific; 
            physical-interface-filter; 
            term term-name {
                filter filter-name; 
            }
            term term-name {
                from {
                    match-conditions; 
                    ip-version ip-version { 
                        match-conditions;
                        protocol (tcp | udp) {
                            match conditions; 
                        }
                    }
                }
                then {
                    actions;
                }
            }
        }
    }
}

2. From condition
https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/concept/firewall-filter-match-conditions-for-ipv4-traffic.html

3. List keyword 
https://www.juniper.net/documentation/us/en/software/junos/routing-policy/topics/ref/statement/then-firewall-filter-ex-series.html

2023年1月3日 星期二

nano usage

 https://phoenixnap.com/kb/use-nano-text-editor-commands-linux