名前 | カテゴリ | 説明 |
---|---|---|
nop | nop | nop |
getlocal | variable | level, idx で指定されたローカル変数の値をスタックに置く。 |
setlocal | variable | level, idx で指定されたローカル変数の値を val にする。 |
getblockparam | variable | ブロックパラメータを取得する。 |
setblockparam | variable | ブロックパラメータを設定する。 |
getspecial | variable | 特殊なローカル変数($~, $_, ...)の値を得る。 |
setspecial | variable | 特別なローカル変数($~, $_, ...)の値を設定する。 |
getinstancevariable | variable | self のインスタンス変数 id の値を得る。 |
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
require_relative "./renderer" | |
require "psych" | |
markdown = Redcarpet::Markdown.new(Renderer, autolink: true, tables: true) | |
files = Psych.load_file("articles/articles.yaml") | |
File.open("html/index.html", "w") do |html| | |
html.write <<~HTML | |
<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
s=30;Array.new((s+2)*(s+2),0).tap{|g|[100,133,163,164,165].each{|i|g[i]=1};100.times{s.times{|y|puts s.times.map{|x|g[x+s+3+y*(s+2)]==1??*:?.}.join};(s*s).times.map{|i|i+=i/s*2;[0,1,2,3,5,6,7,8].map{|x|g[i+x%3+x/3*2+x/3*s]}.sum.then{|x|x==3?1:x==2?g[i+s+3]:0}}.tap{|n|(s*s).times{|i|g[i+s+3+i/s*2]=n[i]}};sleep(0.1);print"\e[#{s}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
const puppeteer = require('puppeteer'); | |
const fs = require("fs"); | |
const url = "https://techbookfest.org/event/tbf07/circle/xxxxxxxxxxxxxxx"; | |
(async () => { | |
const browser = await puppeteer.launch({ headless: false }); | |
const page = await browser.newPage(); |
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
require "psych" | |
require "redcarpet" | |
require_relative "./renderer" | |
require_relative "./toc_renderer" | |
module Mwr | |
class Generator | |
def initialize(workdir) | |
@workdir = File.expand_path(workdir) |
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
text = File.read "./utamap.test.txt" | |
vocabraries = [] | |
word2id = {} | |
text.split("\n").each do |doc| | |
words = doc.split(" ") | |
words.each do |word| | |
unless word2id.has_key?(word) | |
vocabraries << word |
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
bin = "YARB\u0002\u0000\u0000\u0000\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000x86_64-darwin16\u0000" | |
putself = 16 | |
putstring = 20 | |
opt_send_without_block = 52 | |
leave = 55 | |
hello = 3 | |
codes = [ |
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
require "sparql/client" | |
class Dataset | |
include Enumerable | |
def initialize | |
@sparql = SPARQL::Client.new("http://ja.dbpedia.org/sparql") | |
end | |
def each |
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
require "datasets" | |
class Array | |
def avg(&block) | |
return 0.0 if self.length == 0 | |
self.sum(&block) / self.length | |
end | |
end | |
class Node |
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 CkySolver | |
def initialize(&init_proc) | |
@init_proc = init_proc | |
end | |
def solve(n, &callback) | |
a = Array.new(n * n) | |
n.times {|i| a[i*n + i] = @init_proc.call(i) } | |
(n - 1).times do |d| |
NewerOlder