This file contains 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 | |
# preparation | |
# apt update | |
# apt upgrade | |
# apt install make python2.7 libopenblas-dev libelpa-dev libscalapack-openmpi-dev | |
# git clone https://github.com/nwchemgit/nwchem.git | |
# mv nwchem | |
# git checkout v7.0.2-relase | |
# put this file in "nwchem" directory and run |
This file contains 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/python | |
import math | |
import random | |
import numpy as np | |
from scipy import signal | |
import cv2 | |
root3 = math.sqrt(3.0) | |
MAX_HP = 8 |
This file contains 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/python | |
from __future__ import division | |
from __future__ import print_function | |
import sys | |
import random | |
import numpy as np | |
import cv2 |
This file contains 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/python | |
# find 5 in line using correlation2d | |
from __future__ import print_function | |
import sys | |
import numpy as np | |
from scipy import signal | |
def main(): |
This file contains 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/python | |
from __future__ import print_function | |
import os | |
import sys | |
import numpy as np | |
from scipy import signal | |
import cv2 | |
mask = np.ones((3, 3), dtype=int) |
This file contains 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
module lifegame | |
implicit none | |
integer :: W, H | |
integer, allocatable :: field(:, :) | |
integer, allocatable :: neighbors(:, :) | |
contains | |
subroutine init_field(width, height, start_ratio) | |
integer, intent(in) :: width, height | |
double precision, intent(in) :: start_ratio | |
double precision, allocatable :: s(:, :) |
This file contains 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
# Aimed to test running script status. | |
# In this script, check the sleep process which is forked during a test script. | |
@test "count_process_extshell" { | |
echo "#!/bin/bash" > fork_shell.sh | |
echo "" >> fork_shell.sh | |
echo "sleep 1 &" >> fork_shell.sh | |
echo "ps ax | grep -E \"[0-9] sleep\" | wc -l" >> fork_shell.sh | |
ret=$(bash fork_shell.sh) |