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 json | |
import lzma | |
import nltk | |
import random | |
nltk.download('twitter_samples') | |
my_filters = [ | |
{"id": lzma.FILTER_LZMA2, "preset": 9 | lzma.PRESET_EXTREME}, | |
] |
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 lzma | |
import nltk | |
import random | |
nltk.download('reuters') | |
nltk.download('brown') | |
nltk.download('gutenberg') | |
my_filters = [ | |
{"id": lzma.FILTER_LZMA2, "preset": 9 | lzma.PRESET_EXTREME}, |
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
$OneNote = New-Object -ComObject OneNote.Application | |
Add-Type -assembly Microsoft.Office.Interop.OneNote | |
$target_id = "{A969C2B3-B790-0EDD-2E5A-9D834611888C}{1}{E1950583228671326940781911959017434812881141}" | |
$publish_path = "G:\work\onenote\export.docx" | |
$pandoc_path = "p:\myapp\pandoc-3.1.2" | |
$markdown_path = "G:\work\onenote\export.md" | |
$OneNote.Publish( |
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
function makeCSV($hierarchy, $node_depth){ | |
$data = @() | |
foreach ($item in $hierarchy.ChildNodes){ | |
$data += makeCSVitem $node_depth $item | |
} | |
return $data | |
} |
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
function printAll($hierarchy, $indent_level){ | |
foreach ($item in $hierarchy.ChildNodes){ | |
printName $item $indent_level $False | |
} | |
} | |
function printName($items, [int]$indent_level, [bool]$printID){ | |
$indent = "`t" * $indent_level | |
foreach($item in $items){ |
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
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 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 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 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 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) | |
} | |
//コンテナの中身を確認する |
NewerOlder