Skip to content

Instantly share code, notes, and snippets.

@changtimwu
changtimwu / frigate_code.md
Created January 17, 2024 02:16
frigate source code

go2rtc

work with go2rtc by API

  • in the Dockerfile, go2rtc is integrated in the form of executable instead of package/library

frontend

  • It's based on preact. No typescript.
  • No widget libs like MUI is used. They implemented their own.
@changtimwu
changtimwu / cksnotes.md
Last active December 28, 2022 22:23
personal CKS notes

external tools

  • CIS benchmark:
    • check inproper configs of a k8s node
    • kube-bench run --targets=master
  • Falco: fields
    • monitor container activities
    • crictl: container id -> pod id -> pod name -> deploy name
    • write to falco_rules.local.yaml
    • memorize the following techniques
@changtimwu
changtimwu / synoplayer.js
Created December 5, 2022 07:18
some video player
Ext.namespace("SYNO.SS.App.WebPlayer");
Ext.define("SYNO.SS.App.WebPlayer.VideoAnalayitcsResultDisplayer", {
extend: "Ext.Container",
SNAPSHOT_WIDTH: 540,
SNAPSHOT_HEIGHT: 345,
SNAPSHOT_SMALL_WIDTH: 88,
SNAPSHOT_SMALL_HEIGHT: 70,
PPL_HINT_BACKGROUND_STYLE: "rgba(0, 0, 0, 0.5)",
BORDER_STYLE: "rgba(0, 109, 188, 0.196)",
LIGHT_BLUE_STYLE: "rgba(0, 255, 255, 1)",
@changtimwu
changtimwu / nodewininst.md
Created November 20, 2012 09:47
install nodejs and git on windows

Please prepare the following stuff.

 git --version

OPENVINO for Windows on IEI DRPC-240

  • 硬體: DRPC-240-TGL-U
  • OS: Windows 10
  • 底下文中的 C:\Users\B622 代表使用者文件夾, 實際上會因使用者名稱會有不同, 在 PowerShell 中, 可以此變數 $env:USERPROFILE 獲得

OpenVINO 2022.2

  • 簡介: OpenVINO是intel開發的高速高性能計算機視覺和深度學習推理應用開發套件, 2022 版本對 Intel 核顯有較好的支援, 可善用核顯作硬體推理裝置.
  • 安裝位置: 照官方建議, 以 python virtualenv 方式安裝, 所以實際位置是在 C:\Users\B622\openvino_env\Libs\site-packages\openvino
  • 啟動方式:
  • 開啟 PowerShell V7, 執行 .\openvino_env\Scripts\activate, 應該會看到命令提示符號如下變化

金錢與財富有什麼不同?金錢不等於財富,金錢只是我們用來衡量財富的工具。錢是一種社會信用,能夠用來借貸他人時間。假如我把自己的工作做得很好,為社會創造了價值,社會說:「太感謝你了。因為你過去做的工作,未來我們要回報你。這裡是一張小借據,就把它叫做『錢』吧。」財富才是你想要的東西,是在你睡覺時,還能替你賺錢的資產。財富是工廠、是機器人,能製造出產品;財富是晚上仍在運轉,並服務顧客的電腦程式;財富是銀行裡的錢,可以被投資到其他資產或其他事業;甚至房子也是一種財富,因為可以出租,但跟擁有公司的一部分比起來,這種使用土地的效率可能比較低。所以,我對財富的定義是在你睡覺時還能增值、替你賺錢的事業或資產。

$$ F=P(1+\frac{i}{n})^{nt} $$

@changtimwu
changtimwu / openvino_quantization_example.md
Last active May 5, 2022 11:38
Using YoloV4 as an example to demostrate the complete procedure of
# Question source: https://tw.news.yahoo.com/%E5%90%B3%E6%B7%A1%E5%A6%82%E6%9B%AC%E5%A5%B3%E5%85%92%E5%9C%8B-%E6%95%B8%E5%AD%B8%E8%80%83%E9%A1%8C-%E9%99%84%E4%B8%AD%E7%88%B8%E7%9C%8B%E5%AE%8C%E4%B8%8D%E6%83%B3%E8%A7%A3%E7%AD%94-%E5%B0%8F%E5%AD%A9%E9%80%A3%E9%A1%8C%E7%9B%AE%E9%83%BD%E7%9C%8B%E4%B8%8D%E6%87%82-050445949.html
from itertools import product
def validate_rule(mp,fp,mn,fn):
return (mp+fp)<(mn+fn) and mp>mn and mn>fn and fp>0
def solution():
for [mp,fp,mn,fn] in product( *[range(0,17)] * 4):
if (mp+fp+mn+fn)!=16: continue
#print(f"{mp} {fp} {mn} {fn}")
@changtimwu
changtimwu / vectorbt_t1.ipynb
Last active March 1, 2022 23:04
vectorbt_t1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.