跳到主要內容

[野人獻曝] MQTT 效能測試工具

因為敝社使用了 emqx 這個玩意,
為了測試效能所以找了emqtt-bench 這個測試工具來用。

結果拉下來後發現還需要 erlang 等一堆折騰人的東西,
好不容易弄完後怕組內有人要用還需要搞同樣的事,
所以就自己打包成一個 Docker Image(雖然 Dockerfile 內容才幾行)


留言

jonesggn寫道…

The greater part Mahipalpur Escorts Service Agency of the escort young ladies are proficient and they realize how to carry on with their customers.Cheap Call Girls in Dehradun They never request anything from you aside from their charges for administration.Cheap Call Girls in Dehradun On the off chance that you are disappointing and searching for genuine love, Call Girls Booking in Agra simply quit looking and begin employing.Call Girls Booking in Agra Pick the school Call Girls Booking in Ajmer whenever from anyplace.


usajaavan寫道…
This feature enhances an already distinctive 먹튀사이트 먹튀프렌즈 expertise of reside dealer video games. Furthermore, there are sorts of|several varieties of|various sorts of} machine classes in slot video games with every machine having its own limit of most stake. The most prize cash from these machines varies from country to country. But what makes these video games so attractive is the themes they offer.
jacotsabot寫道…
What’s extra, there’s no join or registration required, so you would be up and working in no time. On many machines, when sufficient money to 1xbet afford a bonus is taken in, the bonus isn't immediately awarded. Typically the game merely stops making the reels slip off the bonus symbols for a few of} video games. If the player fails to hit the bonus throughout these "standby video games", it's added to the "inventory" for later assortment. Many present video games, after ending a bonus spherical, set the likelihood to launch additional inventory very high for the first few video games.
匿名表示…
Still, the character of anti-gambling laws means the target is the operator, quite than the player. Online video poker actual money sport designers are starting to add progressive jackpots to the games. It’s simple to create profitable patterns with the twos substituting for another card. Plus, the game’s paytable is stacked for prime rewards. On Wednesday a person taking part in} video poker at Circa in downtown Las Vegas chose 바카라사이트 to carry one ace on the hand of Triple Double Bonus Poker.

這個網誌中的熱門文章

[野人獻曝] 串接 OpenAI 的 Assistant

你就直接把 Assistant 當成你在 ChatGPT 看到的那些 GPT 玩具吧(?), 只是你可以透過 Assistant API 透過程式化來建立你的 GPT 並與你的網站功能結合。 雖然前面說了「用 Assistant API 」,但實際上其實需要以下三個類型的 API 相互結合才能生出一個 Assistant: Assistants API :設定給助手(?)的指示內容、要使用的模型等資訊。在絕大部分場合下,你通常只需要呼叫一次 Assistant 的 Create 方法一次,此後就可以把回傳的 id 記錄下來後用在其他地方。 Threads API : 建立對話串,這個對話串會與前述的 Assistant 相互結合,讓 Assistant 知道要在這個 Thread 開始監聽訊息,並針對指示做出相應的回覆。 Messages API :將使用者輸入的訊息送到 Thread Runs API :使用者送出訊息後,就要呼叫 Create Run ,讓後端知道有工作要做了 以下是其流程: 先呼叫 Assistant API 的 Create ,記得要拿到回傳中最重要的 id ,這會在接下來的步驟中使用到。如果沒什麼特殊狀況的話你可以把這個 id 持久化保存,之後就不用再重做一次這個步驟。 接著 建立一個新的 Thread ,並取回其中回傳的 id。這個步驟你可能會因應不同的使用的而需要頻繁產生。 以上兩個步驟完成後,接著就可以: 建立一條新的 Message ,並將使用者輸入的內容發送至剛才建立的 Thread 中(透過之前建立 Thread 成功所得到的 id) 接著 呼叫 Run API 的 Create ,將建立 Assistant 與 Thread 成功時所取得的 id 帶入後,就會開始根據使用者輸入的內容開始做分析處理。若是忘記呼叫這個 API 你會發現怎麼內容輸入了但卻沒有任何回應。 然後就可以定期去 呼叫取得 Run 資訊的 API ,看看是不是已經處理完畢。只有在 status 是 completed 時,才代表執行完畢。 執行完畢後,就可以 透過 Message API 取得訊息 。 看吧,很簡單吧? ㄍㄋㄋ,官網沒寫詳細用法只有提供 endpoint 資訊。害我先按照自己的想法寫出一個雛形發覺怎麼跑不起來一邊確認一邊問 ChatGPT...

[野人獻曝] 架個 Stable Diffusion WebUI 來生個香香的老婆圖

A.I. 當道後, 什麼以文生文、以文生圖、以文生聲(?)等玩意陸續蹦出來。 別的先不說, 光是以文生圖就有像是 MidJourney 還是 Dall-E 等模型提供相關服務。 而後 NovelAI 自爆自己的以文生圖模型是透過 Danbooru 上收集的圖片所訓練, 外加相關程式碼也不小心外洩後, 你各位紳士們就開始在以文生圖這塊領域中尋找自己的婆了。 不過以上都不是重點, 本文只是想要記錄下 Stable Diffusion WebUI (以下簡稱 SDWebUI)的架設步驟而已。 其實安裝步驟出乎意料的簡單(當然是指在 Google CoLab 上), 只要以下幾個步驟,基本上就能把 SDWebUI 跑起來並且開始生圖: * 確保機器上有 Python 3 以上環境 * 下載 SDWebUI 原始碼,可以直接在 Github 上 clone 下來。 * 下載所需的模型:在產生 ACG 相關圖片的話,目前推薦使用 Anything 或是 Hentai Diffusion 等模型。不過要注意一點:模型檔案越大的話,硬體要求會更高(主要是顯卡的 GPU 和記憶體等級)。如果沒滿足需求的話可能會跑不起來 * 切換到 SDWebUI 目錄,執行以下指令開始跑 SDWebUI 的設定,會在這個步驟安裝其相依的 Python 套件並處理相關設定: COMMANDLINE_ARGS="--exit" REQS_FILE="requirements.txt" python launch.py *  把前面步驟所下載的模型檔案,搬移到 SDWebUI檔案目錄/models,例如 clone 到 /home/user/stable-diffusion-webui 的話,就把模型檔複製到 /home/user/stable-diffusion-webui/models 下。 * 執行以下指令,等待跑完以後,畫面應該會顯示一組 xxx.gradio.xxx 的網址,可以讓自己或朋友連進來玩(網址 72 小時內有效)。如果只是自用的話,也可以用 localhost 的網址開啟服務: COMMANDLINE_ARGS="--share --gradio-debug" REQS_FILE="requirements....

[野人獻曝]Google Account Authentication實作(上)

Google Account Authentication的實作,可以用GET或POST模式去做出來。其主要的差異性只在於: 使用GET模式時,需要經過帳號持有者登入Google並授權後,才能存取帳號資源。 使用POST模式時,只要由我方將帳號、密碼傳送至Google登入即可。 普遍而言,第一種登入方式較適合一般的Web Application,也是讓使用者不用擔心帳號密碼外洩給不相關第三者的最佳方案。 而後者僅建議在單機應用程式或是自用的應用程式上執行。 關於Google Account Authentication,請參閱 Google的說明 。 使用GET模式取得授權 要使用這種授權方式,僅需要以GET方式將下列參數傳送至: https://www.google.com/accounts/AuthSubRequest。 next(必備參數) 授權成功要redirect的網址。若授權成功時,即會將授權token富於該指定網址後。 如:http://www.mydomain.com/app.php?token=...... scope(必備參數) 要存取的資源網址。 如:http://www.blogger.com/feeds/posts.... session(選用參數) 決定token是否要加密。如果應用程式已經註冊的話,可以選用1作為此參數之值,以便傳送加密的token。 secure(選用參數) 以下是一個請求授權的示例: GET https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fwww.yourwebapp.com%2Fshowcalendar.html&scope=http%3A%2F%2Fwww.google.com%2Fcalendar%2Ffeeds%2F&session=0&secure=0 若授權成功後,則會將頁面redirect至: GET http://www.yourwebapp.com/showcalendar.html?token=CKF50YzIHxCT85KMAg 接著可以把這個token值存入變數之中,以供使用。 剛才的動作已經取得token(姑且稱為金鑰吧),接下來的只要把這個token以 Authorizati...