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
| from moviepy.editor import * | |
| folder_path = '/content/drive/MyDrive/20230404/' | |
| movie_name = 'screen-20230331-142030.mp4' | |
| gif_name = '20230404.gif' | |
| source_path = folder_path + movie_name | |
| target_path_ffmpeg = folder_path + 'ffmpeg' + gif_name | |
| target_path_imageio = folder_path + 'imageio' + gif_name |
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
| from moviepy.editor import * | |
| def getCroppedFrames(movie, crop_size, resize_size): | |
| cropped_movie = movie.crop(x1=0, y1=0, width=crop_size["w"], height=crop_size["h"]) | |
| resized_movie = cropped_movie.resize(height=resize_size["h"]) | |
| return resized_movie | |
| def makeGIF(path, movie, fps, program): |
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
| import cv2 | |
| from PIL import Image | |
| def getCroppedFrames(movie, crop_size, resize_size): | |
| ret_images = [] | |
| while True: | |
| ret, bgr_images = movie.read() |
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
| package com.example.testrun20221122 | |
| import androidx.appcompat.app.AppCompatActivity | |
| import android.os.Bundle | |
| import android.widget.Toast | |
| import com.example.testrun20221122.databinding.ActivityMainBinding | |
| import java.util.Date | |
| import android.media.MediaDrm | |
| import java.util.UUID |
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
| //ジェネリクス | |
| //どのような型でも受け取るコンテナ | |
| class Container<T>(val value: T) | |
| //どのような型でも受け取る関数 | |
| fun <T> packer(value: T): Container<T>{ | |
| return Container(value) | |
| } | |
| //コンテナの中身を確認する |
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
| //any型 | |
| //どのような型でも受け取るコンテナ | |
| class Container(var value: Any) | |
| //どのような型でも受取、コンテナに詰める | |
| fun packer(value: Any): Container{ | |
| return Container(value) | |
| } | |
| //コンテナの中身を確認する |
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
| abstract class BasicRole(name:String){ | |
| var name = name | |
| fun attack(){ | |
| println("${name}は攻撃した") | |
| } | |
| open fun guard(){ | |
| println("${name}は身を守っている") | |
| } |
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
| echo $FT_NBR1 + $FT_NBR2 | sed "s/'/0/g" | tr '\\"?!' 1234 | tr mrdoc 01234 | xargs echo 'obase=13; ibase=5;' | bc | tr 0123456789ABC 'gtaio luSnemf' |
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
| cat /etc/passwd | cut -d ":" -f 1,2,3,4,6,7 | sed -n 2~2p | cut -d":" -f 1 | rev | sort -r | tr [:cntrl:] "," | sed 's/,/, /g' | rev | cut -c 3- | sed 's/^/./' | rev | tr -d [:cntrl:] |
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
| ls -l | sed -n 1~2p |