Skip to content

Instantly share code, notes, and snippets.

@kemsakurai
kemsakurai / CopyGoogleDriveMdEmbedImg.js
Last active January 1, 2022 09:00
Tampermonkey's user script to paste embedded image links from Google Drive in Markdown format.
(function()%7Bvar%20id%20%3D%20window.location.href.split(%22%2F%22)%5B5%5D%3Bvar%20url%20%3D%20%22https%3A%2F%2Fdrive.google.com%2Fuc%3Fexport%3Dview%26id%3D%22%20%2B%20id%3Bvar%20href%20%3D%20%22!%5B%22%20%2B%20document.title%20%2B%20%22%5D(%22%20%2B%20url%20%2B%20%22)%22%20%3Balert(href)%7D)()
@kemsakurai
kemsakurai / CopyGoogleDriveSbEmbedImg.user.js
Last active September 18, 2023 16:37
Tampermonkey's user script to paste embedded image links from Google Drive in Scrapbox format.
// ==UserScript==
// @name   Copy Google Drive sb embed img
// @namespace       http://tampermonkey.net/
// @version 0.1
// @description       Google Drive image url for Scrapbox
// @author K.Sakurai
// @match   https://drive.google.com/*
// @run-at context-menu
// @grant GM_setClipboard
// ==/UserScript==
@kemsakurai
kemsakurai / copyScrapboxPageLink.user.js
Last active December 10, 2021 17:43
Tampermonkey's user script to get the link string of a web page in Scrapbox format.
@kemsakurai
kemsakurai / LinkPrintPDFPage.js
Last active January 1, 2022 09:08
Tampermonkey's user script that transitions to a reveal.js’s PDF printable page
(function()%7B(function() %7B'use strict'%3Bvar url %3D window.location.href%3Burl %3D url.replace(%2F%23%5C%2F%5B0-9%5D*%24%2F%2C '')%3Burl %3D url.replace('%3Fprint-pdf'%2C '')%3Burl %3D url %2B '%3Fprint-pdf'%3Bwindow.location.href %3D url%3B%7D)()%7D)()

これはYaSTのチームメンバーが、チームの一連の出来事を定義する手助けとなるチーム憲章テンプレートです。
あなたのチームの状況を考慮して、このテンプレートの項目を追加/削除/変更してください。

チーム憲章が存在する理由

まず最初に、チーム憲章の存在意義について全ての人が疑問を持つでしょう。
しかし、チーム憲章にはいくつかの正当な存在理由があります。:

>多くのチームは、チームの目標、役割、責任、および/またはチームが決定を下す方法などについて調整されていません。

@kemsakurai
kemsakurai / after.csv
Last active December 28, 2019 04:42
Pandas でCSVの差分を検知する Pythonスクリプト
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol quality
7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5
7.8 0.88 0 2.6 0.098 25 67 0.9968 3.2 0.68 9.8 5
7.8 0.76 0.04 2.3 0.092 1955454545454 54 0.997 3.26 0.65 9.8 5
11.2 0.28 0.56 1.9 0.075 17 60 0.998 3.16 0.58 9.8 6
7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4 5
7.4 0.66 0 1.8 0.075 13 40 0.9978 3.51 0.56 9.4 5
7.9 0.6 0.06 1.6 0.069 15 59 0.9964 3.3 0.46 9.4 5
7.3 0.65 0 1.2 0.065 15 21 0.9946 3.39 0.47 10 7
7.8 0.58 0.02 2 0.073 9 18 0.9968 3.36 0.57 9.5 7
@kemsakurai
kemsakurai / Python scipy.stats.poisson.interval と R poisson.test の挙動を比べる.md
Created February 20, 2019 13:01
Python scipy.stats.poisson.interval と R poisson.test の挙動を比べる

R での ポアソン分布の信頼区間の計算コードを Python で書くとどうなるか試している。
scipy.stats.poisson.interval と、poisson.test の挙動が違うのか気になったので試してみた。

Python のコードは Jyupter Note Book で試して、R は、compile R online で試した。

  • scipy.stats.poisson.interval
scipy.stats.poisson.interval(alpha=0.95, mu=[1000], loc=0)    
@kemsakurai
kemsakurai / Google Apps Script の client-side API のTypeScript 型定義ファイル.md
Created February 17, 2019 14:44
Google Apps Script の client-side API のTypeScript 型定義ファイル

clasp で Google Apps Script を書いているが、client-side API の TypeScript 定義ファイルが見あたらず、探したので探した結果を記載する。


オフィシャルな TypeScript 定義ファイル

公式の TypeScript 定義ファイルはないと思う。
探したが見つからなかった。


個人が作成している 定義ファイル

Gist に UP されていた。

@kemsakurai
kemsakurai / Tampermonkey に ブックマークレットを移行した.md
Last active December 10, 2021 17:49
Tampermonkey に ブックマークレットを移行した。

ブラウザは Safari を使っているのだが、Tampermonkey に ブックマークレットを移行した。

サイト問わず使うもの (Google Drive のリンク生成はサイト依存のものだけど)を移行し、ショートカットを割り当てた。
実施したことを記載しておく。


作成したスクリプト

@kemsakurai
kemsakurai / Google Tag Manager japanese awesome link.md
Last active March 10, 2019 11:01
Google Tag Manager 関連の情報リンク集