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
object M{val W=200;val H=80;def m(v:Float,a:Float,b:Float,c:Float,d:Float)=c+(d-c)*((v-a)/(b-a));def r(a:Float,b:Float,x:Float,y:Float,c:Int):Int=if(Math.abs(x*x+y*y)>2) c else if(c>999) 0 else r(a,b,x*x-y*y+a,2*x*y+b,c+1);def c(a:Float,b:Float)=r(a,b,0,0,0);def main(a:Array[String])=for(j<-(0 to H).map(m(_,0,H,-2,2))){for(i<-(0 to W).map(m(_,0,W,-2,2))){print(if(c(i,j)==0) 2 else 9)};println()}} |
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
ZSH_THEME="powerlevel9k/powerlevel9k"↲ | |
POWERLEVEL9K_MODE='nerdfont-complete'↲ | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(time dir vcs)↲ | |
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()↲ | |
POWERLEVEL9K_PROMPT_ON_NEWLINE=true↲ |
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 selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.common.exceptions import NoSuchElementException | |
import chromedriver_binary | |
import os | |
import time | |
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
function map(value, start1, stop1, start2, stop2) = start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1)); | |
module henon_map(x1, x2, y1, y2, zsize, zpos) | |
{ | |
a = 1.4; | |
b = 0.3; | |
ls = [ | |
for(i=0, tx=0.0,ty=0.0,x=0.1,y=0.0;i<22000; i=i+1,tx=1-a*x*x+y,ty=b*x,x=tx,y=ty) | |
[i, [map(x, -1.5, 1.5, x1,x2), map(y, -0.5, 0.5, y1,y2), zpos]] | |
]; |
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 -n 'r=90;a[0]=$((1<<15));for h in {0..15};{ l="";for p in {30..0};{ t=${a[h]};[ $((t>>p&1)) = 1 ] && l="${l}💩" || l="${l} ";q=$(((t>>(p+1)%31&1)*4+(t>>p&1)*2+(t>>(p-1)%31&1)));a[$((h+1))]=$((a[h+1]|(r>>q&1)<<p));};echo "${l}";}' | bash |
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
/** | |
* Word型 | |
* @typedef {object} Word | |
* @prop {string} type - ワードの種類 | |
* @prop {number} priority? - ワード(演算子)の優先度(大きいほど高い) | |
* @prop {number} 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
#!/bin/bash | |
if [ -z "$EKISPERT_KEY" ]; then | |
echo '$EKISPERT_KEY not set' | |
exit 1 | |
fi | |
if [ $# -lt 2 ]; then | |
echo 'Usage: norikae from_station to_station (search_time:HHMM)' | |
exit 1 |
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
#!/bin/bash | |
if [ $# -lt 1 ]; then | |
echo 'Usage: $ ./batch.sh input_dir' | |
exit 1 | |
fi | |
find $1 -type f | | |
grep -E "\.m2ts$" | | |
sed 's/\.m2ts$//g' | |
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
var speed=10,e=document.querySelector('#speed>.w1');e.setAttribute('data-value', speed);e.click() |
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
// function decompose(l, i) { | |
// if (i < l.length) { | |
// var j = l[i] | |
// if (i === j) { | |
// return decompose(l, i + 1) | |
// } else { | |
// [l[i], l[j]] = [l[j], l[i]] | |
// return [[i, j]].concat(decompose(l, i + 1)) | |
// } | |
// } else { |