以下の問題の解答プログラム(python版)。 割と力業多めかつライブラリ多用につき注意。
answer05.py
は木構造をイメージして実装しています。
幅優先と深さ優先のどちらがよいかは不明。
/** | |
* util.js | |
* @auther kyama http://sukimaprogrammer.blogspot.jp/ | |
* @since 0.0.1 | |
* @version 0.0.3 | |
* | |
* This source is distributed under the MIT License. | |
* | |
* Copyright (c) 2013 lazykyama http://sukimaprogrammer.blogspot.jp/ | |
* |
<!-- | |
* @auther kyama http://sukimaprogrammer.blogspot.jp/ | |
* @since 0.0.1 | |
* @version 0.0.3 | |
* | |
* This source is distributed under the MIT License. | |
* | |
* Copyright (c) 2013 lazykyama http://sukimaprogrammer.blogspot.jp/ | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
#!/usr/bin/env python | |
# -*- coding: utf-8-unix -*- | |
"""build remote jenkins job and wait it until finish to build. | |
Usage: | |
syncbuild_remote_jenkins.py --job JOB [--host HOST] [--port PORT] [--base-path PATH] | |
[--params PARAMS] [--interval INTERVAL] | |
syncbuild_remote_jenkins.py -h|--help |
FROM ubuntu:trusty | |
# forked from https://github.com/jhauswald/sirius/pull/55 | |
MAINTAINER kyama <yamasaki.k.1101@gmail.com> | |
# for Ubuntu 14.04 | |
RUN apt-get update && apt-get install -y \ | |
software-properties-common | |
RUN apt-get update && apt-get install -y \ |
以下の問題の解答プログラム(python版)。 割と力業多めかつライブラリ多用につき注意。
answer05.py
は木構造をイメージして実装しています。
幅優先と深さ優先のどちらがよいかは不明。
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
#!/usr/bin/env python | |
# -*- coding: utf-8-unix -*- | |
"""generate single character image. | |
Usage: | |
char_imggen.py [-i INPUT] [-o OUTDIR] [-v] | |
char_imggen.py -h|--help | |
char_imggen.py --version |
#!/usr/bin/env python | |
# -*- coding: utf-8-unix -*- | |
import os | |
import logging | |
import re | |
from PIL import Image | |
INFILENAME_PATTERN=re.compile(r'([^_]+)_img.png') |
# To make a container including chainer, OpenMPI and DALI. | |
FROM nvcr.io/nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04 | |
# Install global dependencies. | |
RUN apt-get update && apt-get install -y vim git wget python3-pip | |
# Install OpenMPI, mpi4py and DALI. | |
WORKDIR /opt | |
RUN wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.4.tar.gz \ | |
&& tar xf openmpi-3.1.4.tar.gz |
# Dockerfile for NEUTRINO. | |
FROM nvcr.io/nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04 | |
LABEL maintainer="lazykyama" | |
# Install dependencies. | |
RUN apt update && \ | |
apt install -y python3 python3-pip curl unzip && \ | |
apt clean && \ | |
rm -rf /var/lib/apt/lists/* | |
# Not good from here... |