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
- name: Add Intel-MKL packages | |
apt: | |
name: intel-mkl | |
state: latest | |
- name: Install python3-pip | |
apt: | |
name: ['python3-pip', | |
'python3-setuptools', | |
'python3-numpy', |
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
# For more detail, see https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | |
# Because Git-LFS repository use HTTPS, apt-transport-https package is necessary. | |
- name: Install apt-transport-https | |
apt: name=apt-transport-https state=present | |
- name: Add Git-LFS repository key | |
apt_key: | |
url: https://packagecloud.io/github/git-lfs/gpgkey | |
state: present |
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
#!/bin/bash | |
# The recent Windows 7 checks the model version of the CPU, and complains that Windows Update | |
# is unavailable when the modern CPU is installed. | |
# In order to avoid this problem, the method to change the CPU ID which is described at | |
# https://superuser.com/questions/625648/virtualbox-how-to-force-a-specific-cpu-to-the-guest | |
# is insufficient based on my experience. | |
# In order to avoid this problem, the method to specify the CPU profile which is described at |
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
#!/bin/sh | |
# Usage: Put this script under /etc/cron.daily/. | |
set -e | |
PATH=/bin:/usr/bin:/usr/sbin:/sbin | |
src_vol=/dev/vg1/lv1 | |
snap_vol=${src_vol}_snap |
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
#!/usr/bin/python3 | |
import pyknp | |
import re | |
# singleton pattern | |
class KNP: | |
_instance = None | |
_knp = None | |
def __new__(cls): |
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
#!/usr/bin/python3 | |
# When # of process is equal to 1: | |
# real 13m6.743s | |
# user 0m8.840s | |
# sys 0m0.308s | |
# When # of processes is equal to 2: | |
# real 6m33.596s | |
# user 0m9.284s |
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
#!/usr/bin/perl | |
# 指定された文を cabocha-server.pl を使って構文解析する | |
# libwww-perl <URL: http://search.cpan.org/~gaas/libwww-perl/> のイン | |
# ストールが必要. | |
use Getopt::Long; | |
use LWP::UserAgent; | |
use strict; |
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
# -*- encoding: utf-8 -*- | |
import argparse | |
import sys | |
def parse_args(): | |
p = argparse.ArgumentParser() | |
p.add_argument('inputs', type=str, nargs='*', help='[input] text files') | |
return p.parse_args() |
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
\documentclass{jarticle} | |
\makeatletter | |
\let\referred@@ref\ref | |
\let\referred@@label\label | |
\def\labelmarkasreferred#1{\global\@namedef{referred@#1}{\relax}} | |
\def\ref#1{\referred@@ref{#1}\protected@write\@auxout{}{\string\labelmarkasreferred{#1}}} | |
\def\label#1{\def\referred@@currentlabel{#1}\referred@@label{\referred@@currentlabel}} | |
\def\equation{$$\refstepcounter{equation}\def\referred@@currentlabel{}} | |
\def\endequation{ | |
\ifcsname referred@\referred@@currentlabel\endcsname \eqno \hbox{\@eqnnum}\else\addtocounter{equation}\m@ne\fi |
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
import java.util.*; | |
import java.net.URLDecoder; | |
import javax.servlet.*; | |
import javax.servlet.http.*; | |
public class GetHeaders extends HttpServlet { | |
public void doGet(HttpServletRequest request, | |
HttpServletResponse response) | |
throws IOException, ServletException { |