Skip to content

Instantly share code, notes, and snippets.

View azyobuzin's full-sized avatar

Takuya Sakurai azyobuzin

View GitHub Profile
@azyobuzin
azyobuzin / Program.cs
Last active May 9, 2019 17:22
TPL Dataflow を使ってキューサービスに積まれたメッセージを処理するワーカーを書く例
using System.Threading;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
var queueService = new QueueService();
var cancellation = new CancellationTokenSource();
var worker = new Worker(queueService, 2, cancellation.Token);
from dataclasses import dataclass
from pathlib import Path
import typing
from PIL import Image, ImageDraw
import requests
API_KEY = 'xxx'
ENDPOINT = 'https://japaneast.api.cognitive.microsoft.com/'
def get_ocr_result_path(imagefilepath):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
acl v4_privatenet dst 10.0.0.0/8
acl v4_privatenet dst 127.0.0.0/8
acl v4_privatenet dst 169.254.0.0/16
acl v4_privatenet dst 172.16.0.0/12
acl v4_privatenet dst 192.168.0.0/16
acl v6_globalunicast dst ipv6 # 2000::/3
acl ftp proto ftp
http_access deny ftp
http_access allow v6_globalunicast
[Unit]
Description=Lightweight Kubernetes
Documentation=https://k3s.io
After=network.target k3s-env.service
Requires=k3s-env.service
[Service]
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
Environment="K3S_TOKEN=とーくん"
azyobuzin@k8stest:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 933964 0 933964 0% /dev
tmpfs 192920 796 192124 1% /run
/dev/sda2 32378672 4103044 26607840 14% /
tmpfs 964588 0 964588 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 964588 0 964588 0% /sys/fs/cgroup
/dev/loop0 88704 88704 0 100% /snap/core/4486
/dev/sda1 523248 6152 517096 2% /boot/efi
azyobuzin@k8stest:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 933964 0 933964 0% /dev
tmpfs 192920 796 192124 1% /run
/dev/sda2 32378672 4009820 26701064 14% /
tmpfs 964584 0 964584 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 964584 0 964584 0% /sys/fs/cgroup
/dev/loop0 88704 88704 0 100% /snap/core/4486
/dev/sda1 523248 6152 517096 2% /boot/efi
apiVersion: v1
kind: Namespace
metadata:
name: dashboard
BenchmarkDotNet=v0.11.3, OS=Windows 10.0.17763.292 (1809/October2018Update/Redstone5)
Intel Core i7-3770 CPU 3.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=2.2.101
  [Host] : .NET Core 2.2.0 (CoreCLR 4.6.27110.04, CoreFX 4.6.27110.04), 64bit RyuJIT

Job=InProcess  Toolchain=InProcessToolchain  
CREATE TABLE IF NOT EXISTS `500px` (
`id` int(11) NOT NULL,
`image5` tinytext NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `cameran` (
`id` varchar(32) NOT NULL,
`image` tinytext NOT NULL,
PRIMARY KEY (`id`)