Skip to content

Instantly share code, notes, and snippets.

View kkdai's full-sized avatar

Evan Lin kkdai

View GitHub Profile
@kkdai
kkdai / git-commit-styleguide.md
Created January 2, 2025 07:29 — forked from rishavpandey43/git-commit-styleguide.md
This gist consist of the rules and best practice of good conventional git commit message

Git Commit Messages Style-Guides

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji

Types

ffmpeg -i source.mp4 -vf "subtitles=tw2.srt:force_style='FontName=Arial'" -c:a copy output.mp4
import openai
import argparse
import os
openai.api_key = os.getenv("OPENAI_API_KEY")
def translate_text(text, source_language="ja", target_language="zh"):
response = openai.ChatCompletion.create(
model="gpt-4o-mini",
@kkdai
kkdai / youtubeloader.ipynb
Created October 5, 2024 14:40
YouTubeLoader
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkdai
kkdai / gemini-cf.go
Created April 12, 2024 13:16
LINE Bot Cloud Function - demo code in Go
package helloworld
import (
"context"
"fmt"
"net/http"
"io"
"log"
"os"
# package>=version
line-bot-sdk
requests
git+https://github.com/ozgur/python-firebase
google.generativeai
from linebot import LineBotApi, WebhookHandler
from linebot.models import TextSendMessage
import json
import os
from firebase import firebase
import google.generativeai as genai
# 使用環境變量讀取憑證
token = os.getenv('LINE_BOT_TOKEN')
@kkdai
kkdai / github-isssue-rag-langchain.ipynb
Last active February 21, 2024 03:36
Github Issues LangChain RAG Q&A 的 Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkdai
kkdai / devday2023.ipynb
Created November 8, 2023 16:04
devday2023.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.