広義
- 処理の単位(Tx)を固めたブロックをチェーンさせるデータ構造を持ったDB
- 上記DBをネットワーク上で複数ノードが保持
狭義
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import Image | |
import numpy as np | |
def hex2bin(hexmat): | |
binmattemp = [bin(m)[2:] for m in hexmat] | |
rowlen = max([len(m) for m in binmattemp]) | |
binmat = [[0]+[int(b) for b in row.zfill(rowlen)] for row in binmattemp] |
# -*- 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 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 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 -*- | |
import requests | |
import json | |
from datetime import date | |
def make_month_prog_msg(work): | |
grades = ['B4', 'M1', 'M2'] | |
month = date.today().month | |
return '{}さん,{}の進捗どうですか?'.format(grades[month%3], work) |
# -*- 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: |
広義
狭義