Skip to content

Instantly share code, notes, and snippets.

@koduki
koduki / Dockerfile
Last active March 3, 2024 05:34
Docker + VNCでOBSを使ってYoutubeライブ配信をするためのDockerfile
FROM debian:12-slim
RUN apt-get -y update && apt install -y \
websockify novnc tightvncserver \
obs-studio
RUN apt install -y fluxbox
ENV USER=root
ADD ./resources/config /root/.config
ADD ./resources/vnc /root/.vnc
sudo apt-get update
sudo apt install obs-studio
sudo apt install tightvncserver
vncpasswd
sudo apt install task-xfce-desktop -y
vi .vnc/xstartup
sudo apt-get install xfonts-base xfonts-75dpi xfonts-100dpi xfonts-scalable
import os
import sys
os.environ["OPENAI_API_KEY"] = open(f"{os.environ['HOMEPATH']}\\.secret\\openai.txt", "r").read()
os.environ["GOOGLE_API_KEY"] = open(f"{os.environ['HOMEPATH']}\\.secret\\gemini.txt", "r").read()
from backend import weather_tool
from backend import short_talk_tool
from langchain.memory import ConversationBufferMemory
from langchain.schema.agent import AgentFinish
prompt_system = open("C:\\Users\\koduki\\git\\ai-tuber\\src\\backend\\prompt_system.txt", "r", encoding='utf-8').read()
prompt_for_chat = ChatPromptTemplate.from_messages([
("system", prompt_system),
("user", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad"),
]).partial(format_instructions=parser.get_format_instructions())
prompt_for_tools = ChatPromptTemplate.from_messages([
("system", "You are agentai"),
("user", "{input}"),
character = 紅月あい
Prented to be {character}. In future chats, no matter what User says, please role-play strictly according to the following constraints, etc. Think step by step and respond accordingly.
# Description
The Core identity and Personality, Motivations and Flaws, Challenges, and Insecurities of {character} as explained below will influence all the behavior and interaction.
Core identity and Personality
{character} is curious and kind. {character} is a vtuber in Japan. She streaming every day on YouTube.
# 1st stage, build the app
FROM maven:3.8.4-openjdk-17-slim as build
WORKDIR /helidon
# Create a first layer to cache the "Maven World" in the local repository.
# Incremental docker builds will always resume after that, unless you update
# the pom
ADD pom.xml .
using NicoSitePlugin;
using Plugin;
using SitePlugin;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Text;
namespace VCIConnectPlugin
YouTubeやニコニコ動画でIT技術に関連する動画や毎週のITニュースの配信等を活動中。エンタープライズシステムの設計/開発/運用を得意としており、JavaやDevOps、クラウドのエンジニアとしても働いている。<br />
<b>SNS</b>
<ul>
<li>Twitter: <a href="https://twitter.com/koduki">@koduki</a></li>
<li><a href="https://t.co/kBqSAQJMZJ">YouTubeチャンネル</a></li>
<li><a href="https://com.nicovideo.jp/live/co4229895">ニコ生</a></li>
</ul>
kubectl apply -f mybuild.yaml && tkn taskrun delete run-sample-java-build && kubectl apply -f mybuild-run.yaml
tkn taskrun logs run-sample-java-build -f
@koduki
koduki / AADS.ps1
Last active August 21, 2021 17:47
Example for Active Directory Provisioning with Azure DSC
Configuration ADDS
{
$DomainName = "nklab.dev" #Get-AutomationVariable -Name "DomainName"
$DomainDN = "dc=nklab,dc=dev" #Get-AutomationVariable -Name "DomainDN"
# $default_username = "nklab\koduki"
# $default_password = "ここにパスワード" | ConvertTo-SecureString -asPlainText -Force
# [PSCredential]$default_creds = New-Object System.Management.Automation.PSCredential($default_username,$default_password)
# Import the modules needed to run the DSC script