- 다운 로드 정보
http://buildlogs.centos.org/rolling/7/isos/x86_64/ http://buildlogs.centos.org/rolling/7/isos/x86_64/CentOS-7-x86_64-AtomicHost-Vagrant-VirtualBox.box - 다운받고 압축 풀기(7zip등으로)
- box.ovf 파일 실행
- virtualbox에서 확인
- hostonly nic추가 10.10.10.11
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
package main | |
import "fmt" | |
type Duck interface { | |
Quak() string | |
} | |
type MyDuck struct { // create a type | |
name string |
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
import oslo_db.sqlalchemy.engines as engines | |
import sqlalchemy | |
# change DBPASS and DBADDR suitable for your environment | |
url = sqlalchemy.engine.url.make_url('mysql+pymysql://keystone:DBPASS@DBADDR/keystone') | |
engine = sqlalchemy.create_engine(url) | |
con = engines._test_connection(engine, 10, 10) | |
rs = con.execute('show databases') | |
for row in rs: | |
row |
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
- name: create repo file of myrepository | |
ini_file: dest=/etc/yum.repos.d/myrepository.repo | |
section="{{ item.section }}" | |
option="{{ item.option }}" | |
value="{{ item.value }}" | |
with_items: | |
- { section: 'myrepository', option: 'name', value: 'myrepository_repo'} | |
- { section: 'myrepository', option: 'baseurl', value: 'http://xxx.xxx.xxx.xxx/'} | |
- { section: 'myrepository', option: 'enabled', value: '1'} | |
- { section: 'myrepository', option: 'gpgcheck', value: '0'} |
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
import signal, os, time | |
def handler(signum, frame): | |
print 'Signal handler called with signal', signum | |
raise IOError("Couldn't open device!") | |
# Set the signal handler and a 5-second alarm | |
signal.signal(signal.SIGALRM, handler) | |
signal.alarm(5) |
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
#!/opt/openstack/venv/bin/python | |
import MySQLdb | |
import sys | |
import json | |
connection = MySQLdb.connect( | |
host=sys.argv[1], user="nova", | |
passwd=sys.argv[2], db="nova") | |
cursor = connection.cursor() | |
cursor.execute("select network_info, instance_uuid from instance_info_caches where deleted=0") |
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
############################################################################# | |
# current status check | |
############################################################################# | |
# suse version | |
cat /etc/os-release | |
NAME="openSUSE Leap" | |
VERSION="42.1" | |
VERSION_ID="42.1" | |
PRETTY_NAME="openSUSE Leap 42.1 (x86_64)" |
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
# /etc/pdns/pdns.conf | |
setuid=pdns | |
setgid=pdns | |
launch=gmysql | |
gmysql-host=localhost | |
gmysql-user=myid | |
gmysql-password=mypass | |
gmysql-dbname=powerdns | |
local-port=50 |
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
with tf.device("/job:ps/task:0"): | |
weights_1 = tf.Variable(...) | |
biases_1 = tf.Variable(...) | |
... | |
worker_devices = ["/job:worker/task:0/gpu:0", ..., "/job:worker/task:7/gpu:0"] | |
for worker_device in worker_devices: | |
with tf.device(worker_device): | |
with tf.device("/job:worker/task:7"): | |
input, labels = ... |
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
root@98c54cfbe5b9:/examples# mpirun -np 1 -H localhost:1 -bind-to none -map-by slot -x NCCL_DEBUG=INFO -x LD_LIBRARY_PATH -mca pml ob1 -mca btl ^openib python benchmarks-horovod_v2/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py --model resnet101 --batch_size 16 --variable_update horovod | |
/usr/local/lib/python3.5/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`. | |
from ._conv import register_converters as _register_converters | |
TensorFlow: 1.5 | |
Model: resnet101 | |
Dataset: imagenet (synthetic) | |
Mode: training | |
SingleSess: False | |
Batch size: 16 global | |
16.0 per device |
OlderNewer