This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# script name: build_waydroid_v5.sh | |
# description: Build Waydroid for Debian or Ubuntu based distro v5 | |
# upstream : https://gist.github.com/cniw/98e204d7dbc73a3fa1bf61629b2a2fc1 | |
# author : Wachid Adi Nugroho <[email protected]> | |
# date : 2022-05-11 | |
NC='\033[0m' | |
RED='\033[1;91m' | |
GREEN='\033[1;92m' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependencies "pip install youtube_transcript_api langchain" | |
# Run with "OPENAI_API_KEY=xxxx python summarize.py <youtube_id>" | |
import sys | |
from youtube_transcript_api import YouTubeTranscriptApi | |
from langchain import OpenAI, PromptTemplate | |
from langchain.text_splitter import TokenTextSplitter | |
from langchain.prompts import PromptTemplate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run Docker container with latest Ubuntu and pass DISPLAY | |
$ xhost +local:root #先允许Docker容器访问host的X服务器 | |
$ docker run --net=host --env="DISPLAY" --volume="$XAUTHORITY:/root/.Xauthority:rw" -it ubuntu | |
# Install simple GUI applications for test | |
$ apt update && apt install -y x11-apps | |
# Run GUI application 'calculator' | |
$ xcalc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Make by x:@BoxMrChen and windsurf ai | |
import asyncio | |
import base64 | |
import json | |
import io | |
import os | |
import sys | |
import pyaudio |