flowchart TB;
subgraph 設定
node001[[主人公、司祭、祈祷書、村から領都への旅]];
end
subgraph 属性
node101[見習い、干し杏]
end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -*- mode: java; coding: utf-8 -*- | |
| // | |
| // Time-stamp: <2021-10-22 09:12:02 norim> | |
| // | |
| // TODO: echo server を作成、任意のデータを受信すると、それをhexdump して返信 | |
| import java.io.*; | |
| import java.net.*; | |
| import java.nio.ByteBuffer; | |
| import java.nio.ByteOrder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: python; coding: utf-8-unix -*- | |
| # | |
| # Time-stamp: <2021-02-16 10:59:17 norim> | |
| # | |
| import os | |
| import shutil | |
| import re | |
| from datetime import datetime | |
| from optparse import OptionParser | |
| from openpyxl import Workbook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: python; coding: utf-8-unix -*- | |
| # | |
| # Time-stamp: <2020-12-12 11:15:14 norim> | |
| # | |
| # usage: | |
| # import framed | |
| # ... | |
| # img = cv2.imread(input_file) | |
| # framed.framed(img, "sample", "working") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: python; coding: utf-8-unix -*- | |
| # | |
| # | |
| # @ref: https://pillow.readthedocs.io/en/3.1.x/PIL.html?highlight=PngInfo#PIL.PngImagePlugin.PngInfo | |
| # | |
| import os | |
| from datetime import datetime | |
| from optparse import OptionParser | |
| from PIL.PngImagePlugin import PngImageFile, PngInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: python; coding: utf-8-unix -*- | |
| # | |
| # Time-stamp: <2020-07-20 04:47:17 norim> | |
| # | |
| # @ref: https://nathankjer.com/animated-3d-plots/ | |
| # | |
| # CAUTION: required to install the imagemagick before execution. | |
| # for jupyter, http://louistiao.me/posts/notebooks/embedding-matplotlib-animations-in-jupyter-notebooks/ | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: python; coding: utf-8-unix -*- | |
| # | |
| # | |
| # @see man proc (5) | |
| # | |
| import os, re | |
| import sqlite3 | |
| # | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <chrono> | |
| #include <queue> | |
| #include <functional> | |
| #include <thread> | |
| #include <mutex> | |
| //#include <atomic> | |
| #include <condition_variable> |
これは stfuawsc_itg Advent Calendar 2014 4日目の記事です。
プログラミングをしていると、いろいろなバージョンの環境を行ったり来たりしたくなることがあります。たとえば言語処理は python 2 へ nltk を入れてやりたい。シミュレーションは python 3 へ numpy 入れてやりたいとか。
そういうふうに言語やモジュールのバージョンをいろいろ組合せた環境を気軽に切り替えられると便利です。
実際そういうことを可能にするツールはたくさんあります。virtualenv, pyenv など。
ここで紹介する conda というツールもその1つです。
virtualenv などでは、モジュールを入れるときは通常の python の流儀でインストールするのですが、インストールがうまくいかないというのはよくあることです。conda ではあらかじめビルドされたものを入れるので、楽です。もちろん conda に用意されていないモジュールもありますが、そういうのは pip 等通常の方法で入れて共存できます。
ではさっそく conda で python の環境を作る方法です。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: python; coding: utf-8 -*- | |
| # | |
| # | |
| import os | |
| from optparse import OptionParser | |
| from matplotlib.backends.backend_pdf import PdfPages | |
| from scipy.misc import imread | |
| import matplotlib.pyplot as plt | |
| import numpy as np |
NewerOlder