- Token with "create_runner" Permission
- Allow firewall https://registry.gitlab.com/v2/ (if you used Continar Agent)
- Pull Image
| [KernelFunction] | |
| [Description("Get basic market outlook from Yahoo Finance")] | |
| public async Task<string> GetMarketOutlookAsync() | |
| { | |
| try | |
| { | |
| var url = "https://query1.finance.yahoo.com/v8/finance/chart/^GSPC?range=1d&interval=1d"; | |
| var response = await _httpClient.GetAsync(url); | |
| response.EnsureSuccessStatusCode(); | |
| var data = await response.Content.ReadAsStringAsync(); |
| import express from "express"; | |
| import dotenv from "dotenv"; | |
| import { GoogleGenAI } from "@google/genai"; | |
| const app = express(); | |
| app.use(express.json()); | |
| dotenv.config(); | |
| const port = process.env.PORT || 3000; | |
| const apiKey = process.env.GEMINI_API_KEY; | |
| const geminiAI = new GoogleGenAI({apiKey}); |
| #region> LottoAPI Integration | |
| /// <summary> | |
| /// Gets the prize 2 digit history from the LottoAPI with optional month and day | |
| /// filters | |
| /// </summary> | |
| /// <param name="month">Optional month filter (1-12)</param> | |
| /// <param name="day">Optional day filter (1-31)</param> | |
| /// <returns>Prize 2 digit history as a JSON string</returns> | |
| [KernelFunction] |
| let text = items[0].json.output; | |
| // ลบโค้ดหลายบรรทัด | |
| text = text.replace(/```[\s\S]*?```/g, ""); | |
| // ลบโค้ดบรรทัดเดียว | |
| text = text.replace(/`([^`]+)`/g, "$1"); | |
| // ลบลิงก์ Markdown [text](url) ให้เหลือ text |
| services: | |
| gitea-db: | |
| image: postgres:17 | |
| container_name: Gitea-DB | |
| security_opt: | |
| - no-new-privileges:true | |
| healthcheck: | |
| test: ["CMD", "pg_isready", "-q", "-d", "gitea", "-U", "giteauser"] | |
| timeout: 45s | |
| interval: 10s |
| version: "3.8" | |
| services: | |
| ollama: | |
| image: ollama/ollama | |
| container_name: ollama | |
| volumes: | |
| - ollama_data:/root/.ollama | |
| ports: | |
| - "11434:11434" |
| # Normalize line endings for text files | |
| # Set default behavior to automatically normalize line endings | |
| * text=auto | |
| # Explicitly declare text files we want to always be normalized and converted | |
| # to native line endings on checkout. | |
| *.cs text diff=csharp | |
| *.csproj text | |
| *.sln text | |
| *.config text |
| services: | |
| jellyfin: | |
| image: jellyfin/jellyfin:latest | |
| container_name: Jellyfin-HW-TRAN | |
| # 1026:100 check on host > ls -n /volume1/docker/jellyfin_hw_tran | |
| # user: 1026:100 | |
| environment: | |
| TZ: Asia/Bangkok | |
| volumes: | |
| - /volume1/docker/jellyfin_hw_tran/config:/config:rw |
| class ATM: | |
| def __init__(self, balance=0): | |
| self.balance = balance | |
| def deposit(self, amount): | |
| if amount > 0: | |
| self.balance += amount | |
| return f"Deposit successful! New balance: ${self.balance:.2f}" | |
| else: | |
| return "Invalid deposit amount." |