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
| // ==UserScript== | |
| // @name Apple TV 日本語字幕を中央 | |
| // @namespace local.apple-tv-subtitle-center | |
| // @version 0.3.0 | |
| // @author kdmsnr | |
| // @description 日本語字幕を中央・下側の行番号で配置。Chromeの百分率配置を回避。 | |
| // @match https://tv.apple.com/* | |
| // @run-at document-idle | |
| // @grant none | |
| // @noframes |
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
| require 'bundler/inline' | |
| gemfile do | |
| source 'https://rubygems.org' | |
| gem 'sinatra' | |
| gem 'rackup' | |
| gem 'puma' | |
| gem "csv" | |
| end |
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
| // ==UserScript== | |
| // @name TVer all-tab auto click | |
| // @namespace https://kdmsnr.com | |
| // @version 0.1 | |
| // @description Auto-click the "all" tab on TVer mypage fav | |
| // @match https://tver.jp/mypage/fav | |
| // @grant none | |
| // @run-at document-end | |
| // ==/UserScript== |
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 { App, Plugin, Notice } from 'obsidian'; | |
| export default class MySidebarPlugin extends Plugin { | |
| async onload() { | |
| this.addRibbonIcon('checkmark', 'Open TODO Page', async () => { | |
| const file = this.app.vault.getAbstractFileByPath('TODO.md'); | |
| if (file) { | |
| this.app.workspace.getLeaf().openFile(file); | |
| } else { | |
| new Notice('File not found'); |
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
| ;; Markdown で [[WikiLink]] を開きたい | |
| (defun open-wiki-link (link-name) | |
| (let ((directories '("." "books")) | |
| (file-found nil)) | |
| (dolist (dir directories) | |
| (let ((path (concat dir "/" link-name ".md"))) | |
| (when (and (not file-found) (file-exists-p path)) | |
| (setq file-found t) | |
| (find-file path)))) | |
| (unless file-found |
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
| data:text/html;utf-8,<!DOCTYPE html><body><script>setTimeout(function(){const now = new Date();const year = now.getFullYear();const month = (now.getMonth() + 1).toString().padStart(2, "0");const date = now.getDate().toString().padStart(2, "0");const url = `https://artscape.jp/exhibition/schedule/exhi_schedule_result.php?pref=東京都&Year=${year}&Month=${month}&Day=${date}&period=1&selorder=1&chk_pic=1&f_submit=on`;window.location.replace(url) }, 1);</script></body> |
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
| // ==UserScript== | |
| // @name Remove Watched Programs for TVer | |
| // @namespace https://kdmsnr.com | |
| // @version 1.0.4 | |
| // @description Remove watched programs from TVer's My Page | |
| // @author kdmsnr | |
| // @match https://tver.jp/* | |
| // @grant none | |
| // @run-at document-end | |
| // ==/UserScript== |
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 sklearn.cluster import KMeans | |
| from sklearn.preprocessing import OneHotEncoder | |
| import numpy as np | |
| import random | |
| # カテゴリカルな属性の値のリスト | |
| genders = ["Male", "Female"] | |
| blood_types = ["A", "B", "O", "AB"] | |
| # メンバーの生成(50人、ランダムな属性) |
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 sklearn.cluster import KMeans | |
| from sklearn.preprocessing import MinMaxScaler | |
| import numpy as np | |
| import random | |
| # メンバーの生成(50人、ランダムな属性) | |
| # カテゴリカルな属性の場合は、https://gist.github.com/kdmsnr/ed71e9dbbf228b3a03cca99183484ac2 を参照する | |
| members = [ | |
| {"name": f"member{i}", "attributes": [random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)]} | |
| for i in range(50) |
NewerOlder