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
FROM centos:latest | |
MAINTAINER ikarino <ba138ng@gmail.com> | |
# Run docker command with | |
# $ docker run -it --name=XXXX -p 8888:8888 image-name | |
# and open browser with given url and token | |
ENV FC=/usr/lib64/openmpi/bin/mpif90 CC=/usr/lib64/openmpi/bin/mpicc HDF5_ROOT=/usr/lib64/openmpi \ | |
PATH=/opt/openmc/bin:/opt/conda/bin:$PATH \ | |
OPENMC_CROSS_SECTIONS=/opt/openmc/data/nndc_hdf5/cross_sections.xml |
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/local/bin/gnuplot | |
set term pngcairo | |
set output "sinx.png" | |
set xlabel "X" font "Helvetica, 30" | |
plot \ | |
sin(x) lt 1 t'line type 1' |
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
on selectSettingTab(index) | |
tell application "System Events" | |
tell process "OBS" | |
tell window "Settings" | |
activate | |
set p to position | |
set x to (item 1 of p) + 100 | |
set y to (item 2 of p) + 20 + index * 50 | |
set cmd to "cliclick c:" & x as string & "," & y as string | |
-- display dialog cmd |
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
on loginFromSafari(username, password) | |
set loginURL to "https://secure.nicovideo.jp/secure/login_form" | |
tell application "Safari" | |
activate | |
make new document with properties {URL:loginURL} | |
delay 1 | |
do JavaScript "document.getElementsByName('mail_tel')[0].value = '" & username & "';" in document 1 | |
do JavaScript "document.getElementsByName('password')[0].value = '" & password & "';" in document 1 | |
do JavaScript "document.getElementsByClassName('login_button')[0].children[0].click();" in document 1 | |
close document 1 |
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
<body> | |
<h3>cmd</h3> | |
<form method="get" action="/cmd"> | |
<input type="text" name="cmd"> | |
<input type="submit" value="exec"> | |
</form> | |
<h3>stdout</h3> | |
<tt> | |
%for out in stdout: | |
{{out}}<br /> |
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/env python | |
import subprocess | |
@route('/command', method='GET') | |
def out(): | |
stdout = "" | |
stderr = "" | |
command = None | |
command = request.GET.get("command") | |
if command: |
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/local/bin/python | |
import subprocess | |
print 'Content-type: text/html; charset=utf-8' | |
print "\r\n\r\n" | |
print "Checking status<br />" | |
proc = subprocess.Popen("/usr/bin/g++ -v", shell=True, |
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/env python2.7 | |
import numpy | |
import scipy | |
import scipy.optimize | |
import subprocess | |
def plotme(gnuplottext, filename=None): | |
if filename: |
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
bash-3.2$ ls -1 | |
ADC1-000.dat | |
ADC1-001.dat | |
ADC1-002.dat | |
ADC1-003.dat | |
ADC1-004.dat | |
ADC1-005.dat | |
ADC1-006.dat | |
ADC1-007.dat | |
ADC1-008.dat |
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/env gnuplot | |
set term gif animate optimize | |
set output 'ADC1.gif' | |
do for[i=0:8:1] { | |
file = sprintf("ADC1-%03d.dat", i) | |
time = sprintf("t=%d-%d[sec]", i*200, (i+1)*200) | |
set title time | |
plot file w l | |
} |
NewerOlder