With Puppet:
puppet module install rtyler-jenkins
puppet apply -v -e "include jenkins"
# http://cran.r-project.org/web/packages/markovchain/vignettes/an_introduction_to_markovchain_package.pdf | |
library(markovchain) | |
initialState <- c(0,1,0) | |
weatherStates <- c("sunny", "cloudy", "rain") | |
byRow <- TRUE | |
trans.probs <- matrix(data=c(0.7, 0.2, 0.1, | |
0.3, 0.4, 0.3, | |
0.2, 0.45, 0.35), byrow=TRUE, nrow=3, | |
dimnames = list(weatherStates, weatherStates)) |
Vagrant::Config.run do |config| | |
config.vm.define :puppetserver do |puppetserver_config| | |
puppetserver_config.vm.box = "lucid64_local" | |
puppetserver_config.vm.host_name = "puppetmaster" | |
puppetserver_config.vm.forward_port("ssh", 22, 2222, :auto => true) | |
#puppetserver_config.vm.forward_port("http", 80, 8080) | |
puppetserver_config.vm.network "192.168.10.10" | |
# puppetserver_config.vm.boot_mode = :gui | |
puppetserver_config.vm.provision :shell, :path => "shellprovision/prepuppet.sh" | |
puppetserver_config.vm.provision :puppet do |puppet| |
# create server | |
cmd /c sc create SeleniumGrid binPath= "cmd /c ant -f \"C:\opt\selenium-grid-1.0.8\build.xml\" launch-hub " DisplayName= "Selenium Grid Server" | |
# create client | |
cmd /c sc create SeleniumGridClient binPath= "cmd /c ant -f \"C:\opt\selenium-grid-1.0.8\build.xml\" -Dport=4545 -Denvironment=*chrome launch-remote-control " DisplayName= "Selenium Grid Client" | |
# This doesn't work, want to create a tc7 server... sigh... | |
cmd /c sc create Tomcat binPath= "C:\opt\tomcat7\srvany.exe" start= "auto" DisplayName= "Apache Tomcat Server" | |
# Save this as tomcat-service.reg |
var phantom = require('phantom'), | |
vows = require('vows'), | |
assert = require('assert'); | |
// nesting tests inside phantom callback so we only | |
// have to create it once | |
phantom.create(function(ph) { | |
var get_page_result = function(url, fn, result) { | |
ph.createPage(function(page) { |
var out = _step_.getTrans().getServletPrintWriter(); | |
out.println("<H1>"); | |
out.println("Hello World!"); | |
out.println("ときょ 東京 コーヒー"); | |
out.println("</H1>"); |
for (int p = 10; p < 18; p++) | |
{ | |
HyperLogLogPlus hyperLogLogPlus = new HyperLogLogPlus(p, 25); | |
int count = 4200000; | |
for (int i = 0; i < count; i++) | |
{ | |
hyperLogLogPlus.offer("i" + i); | |
} | |
long estimate = hyperLogLogPlus.cardinality(); | |
double se = count * (1.04 / Math.sqrt(Math.pow(2, p))); |
package bench; | |
import java.util.Arrays; | |
import java.util.concurrent.TimeUnit; | |
import org.openjdk.jmh.annotations.BenchmarkType; | |
import org.openjdk.jmh.annotations.GenerateMicroBenchmark; | |
import org.openjdk.jmh.annotations.OutputTimeUnit; | |
import org.openjdk.jmh.annotations.State; |
package testsupport; | |
import org.concordion.api.ResultSummary; | |
import org.concordion.internal.FixtureRunner; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.FrameworkMethod; | |
import org.junit.runners.model.InitializationError; | |
import org.junit.runners.model.Statement; | |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.List; | |
import org.apache.commons.lang3.SerializationUtils; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.security.jwt.JwtHelper; | |
import org.springframework.security.oauth2.common.OAuth2AccessToken; | |
import org.springframework.security.oauth2.common.OAuth2RefreshToken; | |
import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; |