PDFjam
はpdfLaTex用に作られたPDFファイルを加工するツールです.中身はpdfpagesパッケージを呼ぶスクリプトになっています.
PDFjamには様々な派生コマンドが用意されています.
複数ページあるPDFファイルをn-upします.ページは左から右,上から下に配置されます.
PDFjam
はpdfLaTex用に作られたPDFファイルを加工するツールです.中身はpdfpagesパッケージを呼ぶスクリプトになっています.
PDFjamには様々な派生コマンドが用意されています.
複数ページあるPDFファイルをn-upします.ページは左から右,上から下に配置されます.
$patterns = { | |
?J=>[[2,2],[1,5,6]], | |
?L=>[[2,2],[0,5,6]], | |
?T=>[[2,2],[0,1,6]], | |
?R=>[[2,2],[0,1,5]], | |
?I=>[[1,3],[0,5,10]], | |
?B=>[[3,1],[0,1,2]], | |
} | |
def solve(input) |
package main | |
import ( | |
"fmt" | |
) | |
type PrimeGenerator struct { | |
Next func() uint32 | |
} | |
func NewPrimeGenerator() *PrimeGenerator { |
require "net/http" | |
require "uri" | |
require "json" | |
require "pp" | |
def post_pgl_ranking(season_id, battle_type, page_number) | |
url = "https://3ds.pokemon-gl.com/frontendApi/gbu/getSeasonRanking" | |
uri = URI.parse(url) | |
timestamp = Time.now.to_i | |
import numpy as np | |
import cv2 | |
def sauvola(src, kernel_size, k, r): | |
''' sauvolaの手法により二値化を行う ''' | |
height, width = src.shape[:2] | |
border_size = kernel_size / 2 + 1 | |
kernel_pixels = kernel_size * kernel_size | |
src_with_border = cv2.copyMakeBorder(src, border_size, border_size, border_size, border_size, cv2.BORDER_REPLICATE) |
import numpy as np | |
import time | |
time1 = 0. | |
time2 = 0. | |
for i in range(10000): | |
a = (np.random.rand(3,3)*2-1.0)*100 | |
a += a.T | |
if a.shape[0] == a.shape[1] and np.linalg.matrix_rank(a) == a.shape[0]: | |
# with Builtin |
# http://qiita.com/Thenagao72/items/312b9eb9c78329825502 | |
class Person | |
attr_accessor :name, :occupation | |
end | |
class Questionnaire | |
def initialize | |
@people = [] | |
@occupation_table = { 1 => "校内生", |
# http://nabetani.sakura.ne.jp/hena/orde07_7seg/ | |
LIGHT = %w!3f 06 5b 4f 66 6d 7d 27 7f 6f!.map(&:hex) | |
def solve l, u | |
# 7セグパネルのビットが全て立っていないときは,注目桁の最小値に空白を挿入するが | |
# 注目桁より上位の桁の最小値の中に空白でない桁が存在するときfalseとなるフラグ | |
flg = true | |
a = l.zip(u).map.with_index{|(a,b), i| |
transition = {} | |
transition[0] = { | |
1 => [0, 1], | |
2 => [0, 2], | |
3 => [0, 2], | |
4 => [0], | |
5 => [0], | |
6 => [0, 1], | |
7 => [0], | |
8 => [], |