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
country=IN | |
state=Maharashtra | |
locality=Pune | |
organization=redhat | |
organizationalunit=QE | |
commonname=$(hostname) | |
openssl genrsa -out rootCA.key 2048 | |
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem -subj "/C=$country/ST=$state/L=$locality/O=$organization/OU=$organizationalunit/CN=$commonname" | |
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr -subj "/C=$country/ST=$state/L=$locality/O=$organization/OU=$organizationalunit/CN=$commonname" |
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/ruby | |
# install all rpm files from katello client repos without dependencies | |
# TODO; get these files from the URL | |
files = [ | |
"gofer-2.7.6-1.el7.noarch.rpm", | |
"katello-client-repos-3.5.1-1.el7.noarch.rpm", | |
"katello-client-repos-latest.rpm", | |
"katello-host-tools-3.1.0-1.el7.noarch.rpm", |
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 ruby | |
Dir.chdir("#{ARGV[0]}") do | |
if File.exist?("PULP_MANIFEST") | |
`rm -rf PULP_MANIFEST` | |
end | |
files = Dir.glob("**/*") | |
lines = files.collect do |file| |
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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
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 ruby | |
base=50000 #port | |
range="192.168.121." | |
contents = <<-EOS | |
Listen %{port} https | |
<VirtualHost *:%{port}> | |
ProxyPass / https://%{ip_address}/ | |
<Location /> |
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
# Script to install and configure a Pulp Server onto a RHEL 6/7 x86_64 system. | |
# The official documentation can be found here: | |
# https://pulp.readthedocs.org/en/latest/user-guide/installation.html | |
export USER_NAME="" | |
export USER_PASSWORD="" | |
export POOLID="" | |
# Handles system services according to the operating system version | |
function handle_service { |
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
# Figure out what OS version we're running | |
if uname -r | grep -q el6; then export OS_VERSION=6; else export OS_VERSION=7; fi | |
# Install libvirt | |
yum install -y libvirt | |
if [ $OS_VERSION -eq 6 ] | |
then | |
service libvirtd start | |
chkconfig libvirtd on |