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 divs = document.querySelectorAll(".cue.style-scope.ytd-transcript-body-renderer"); | |
const array = Array.from(divs); | |
const texts = array.map(t => t.textContent.trim()+"\n"); | |
const fileName = document.title; | |
const file = new File(texts, fileName, { | |
type: "text/plain", | |
}); |
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
Shader "TextureSampler" { | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Pass | |
{ | |
CGPROGRAM |
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
void Main() | |
{ | |
Func<float, float> fx = x => | |
{ | |
return x * x - 612; | |
}; | |
Func<float, float> primeFx = x => | |
{ | |
return 2 * x; |
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
// ==UserScript== | |
// @name [docs.unity3d & local] Unity Black - a dark theme with JS/C# syntax highlighting | |
// @namespace https://greasyfork.org/en/users/10118-drhouse | |
// @version 1.1 | |
// @description A beautiful dark theme with syntax highlighting (4 color schemes, JS & C#) that improves visual code samples and lowers screen glare. | |
// @include http://docs.unity3d.com/* | |
// @include https://docs.unity3d.com/* | |
// @include file://*Editor/Data/Documentation/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @require http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js |
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
// RGBCube.shader | |
Shader "RGBCube" { | |
SubShader{ | |
Pass{ | |
CGPROGRAM | |
#include "Assets\RBGCube\RGBCube_cginc.cginc" | |
#pragma vertex vert | |
#pragma fragment frag | |
ENDCG | |
} |
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 spans = $("ul[itemprop=transcript] li span[class='']"); | |
const array = Array.from(spans); | |
const texts = array.map(t => t.textContent.replace(/\n/, '') + '\n'); | |
const fileName = $("h1")[0].textContent; | |
const file = new File(texts, fileName, { | |
type: "text/plain", | |
}); | |
const a = document.createElement("a"); |
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
# http://www7b.biglobe.ne.jp/~h-kuroda/pdf/text_calculus.pdf 1.1(1)を解く | |
import numpy as np | |
from sympy import * | |
# real = trueがないと死ぬ。 | |
# https://stackoverflow.com/questions/33188668/how-to-solve-absolute-value-equations-using-sympy | |
x = symbols("x", real=True) | |
f = np.absolute(x + 2) - 4 | |
roots = solve(f, x) |
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 numpy as np | |
from numpy import linalg as LA # Linear algebra の意味。 | |
A = np.array([ | |
[3, -2], | |
[1, 0] | |
]) | |
# LA.eig(A) は、「Aの固有値eigenvalues とAの固有ベクトルeigenvectors」を返す。 | |
## なお、pythonは複数値を返せる関数が作れる。 https://hydrocul.github.io/wiki/programming_languages_diff/tuple/return-tuple.html |
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 System.Linq; | |
using UnityEngine; | |
public class Blink : MonoBehaviour | |
{ | |
///<summary>まばたき間隔が、この値より大きいことを保証する。間隔保証不要なら0</summary> | |
private readonly float blinkMinInterval = 0; | |
private Animator animator; |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using Random = UnityEngine.Random; | |
public class Blink : MonoBehaviour | |
{ | |
///<summary>まばたきのmesh・blendShapeの名前</summary> | |
public BlinkShape blinkShape; |