This file contains 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
import os | |
import subprocess | |
from PIL import Image | |
# 指定したディレクトリ内のファイルをすべて削除する関数 | |
def clear_directory(directory): | |
for file in os.listdir(directory): | |
os.remove(os.path.join(directory, file)) | |
# 画像をリサイズし、連番でリネームして保存する関数 |
This file contains 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
<!DOCTYPE html> | |
<html lang="jp"> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
background: #000; |
This file contains 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
const element = document.getElementById('add_yt') | |
const p = { | |
videoURL: 'https://www.youtube.com/watch?v=u7o6KrSFVNY', | |
containment: '.yt_wrap', | |
autoPlay: true, | |
loop: true, | |
mute: true, | |
showControls: false, | |
showYTLogo: false, |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
body { |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:video_player/video_player.dart'; | |
/* | |
ドゥワァ! センナナヒャク!!アプリの作り方 | |
▶︎使用技術 | |
・Flutter | |
iOS/Androidアプリが両方1つのコードで作れるフレームワーク。 |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:audioplayers/audioplayers.dart'; | |
/* | |
撮り鉄ボイスアプリの作り方 | |
▶︎使用技術 | |
・Flutter | |
iOS/Androidアプリが両方1つのコードで作れるフレームワーク。 | |
Dartというプログラミング言語を使う。 |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:audioplayers/audioplayers.dart'; | |
/* | |
へぇ〜ボタンアプリの作り方 | |
▶︎使用技術 | |
・Flutter | |
iOS/Androidアプリが両方1つのコードで作れるフレームワーク。 | |
Dartというプログラミング言語を使う。 |
This file contains 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
# Pythonで理解する桃太郎 | |
N_LONGTIME = 1000 | |
for i in range(N_LONGTIME): | |
current_year = current_year - 1 | |
old_man = Person(age=70) | |
old_woman = Person(age=70) | |
people = [] |
This file contains 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[System.Serializable] | |
public class MyAxleInfo { | |
public WheelCollider leftWheel; | |
public WheelCollider rightWheel; | |
public GameObject visualLeftWheel; | |
public GameObject visualRightWheel; |
This file contains 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
import os | |
import subprocess | |
# Pythonからコマンド実行する例 | |
def add_telop(self, text, index, input_file_path): | |
file_name = os.path.basename(input_file_path) | |
output_video_path = os.path.join(self.telopped_working_dir, "{}.mp4".format(index)) | |
cmd = """ | |
ffmpeg -y -i {} \ | |
-filter_complex "drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text='{}':\ |
NewerOlder