広義
- 処理の単位(Tx)を固めたブロックをチェーンさせるデータ構造を持ったDB
- 上記DBをネットワーク上で複数ノードが保持
狭義
| # -*- coding: utf-8 -*- | |
| import os | |
| from PIL import Image, ImageDraw, ImageFont | |
| import pyocr | |
| import pyocr.builders | |
| def read_clients_number(image_dir, num_list, left, top, width, height, ext='png'): | |
| clients_file = '{}/clients.csv'.format(image_dir) |
| # -*- coding: utf-8 -*- | |
| import os | |
| from PIL import Image | |
| import numpy as np | |
| def find_edge(pix_line, pix_th): | |
| edge1, edge2 = 0, len(pix_line) | |
| for i, pix in enumerate(pix_line): |
| # -*- coding: utf-8 -*- | |
| import socket | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect(('zerois-o-reiwa.seccon.jp', 23615)) | |
| for num in range(100): | |
| data = '' | |
| while data[:2] != '0=': | |
| data = s.recv(1024) |
| #! /bin/bash | |
| year=`date +%Y` | |
| month=`date +%m` | |
| day=`date +%d` | |
| weekday=5 | |
| next_weekstartday=3 | |
| if [ -z $1 ]; then |
| #! /bin/bash | |
| year=`date +%Y` | |
| month=`date +%m` | |
| day=`date +%d` | |
| if [ ! -e ~/memos/$year"_"$month ]; then | |
| mkdir ~/memos/$year"_"$month | |
| fi |
| # -*- coding: utf-8 -*- | |
| from PIL import Image | |
| dth, lth = 50, 175 | |
| marks = {'dark': 'X', 'light': '_', 'unknown': '?'} | |
| def get_pix(filename): | |
| with Image.open(filename) as img: |
広義
狭義
| sealed abstract class Tree | |
| case class Branch(value: Int, left: Tree, right: Tree) extends Tree | |
| case object Empty extends Tree | |
| object TreeObject { | |
| def max(tree: Tree): Int = tree match { | |
| case Branch(v, l, r) => math.max(math.max(v, this.max(l)), this.max(r)) | |
| case Empty => 0 | |
| } |