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 random | |
trials = 10000 | |
three_pc = 25 | |
two_pc = 60 | |
opp_two_pc = 65 | |
opp_ft_pc = 80 | |
opp_bad_ft_pc = 40 | |
time_to_shoot_two = 5 | |
time_to_foul = 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
import random | |
trials = 10000 | |
three_pc = 25 | |
two_pc = 60 | |
opp_two_pc = 65 | |
opp_ft_pc = 65 | |
time_to_shoot_two = 5 | |
time_to_foul = 5 | |
offense_rb_pc = 25 |
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
<HTML> | |
<HEAD> | |
<TITLE>Sonification Service</TITLE> | |
<script src='WebAudioFontPlayer.js'></script> | |
<script src='MIDIFile.js'></script> | |
</HEAD> | |
<BODY onload="onPageLoad()"> | |
<H1>Data</H1> | |
<DIV ID="dataDiv"> | |
</DIV> |
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 com.logmonitor.controller; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayOutputStream; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Base64; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.TimeUnit; |
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
if bad_ft_shooter_with_ball >= random.randint(0,100): | |
if opp_bad_ft_pc >= random.randint(0,100): | |
points_down += 1 | |
if opp_bad_ft_pc >= random.randint(0,100): | |
points_down += 1 | |
have_ball = True | |
elif ft_rb_pc >= random.randint(0,100): | |
have_ball = True | |
else: | |
# RULE: one free throw and no option for rebound and the ball remains with winning team. |
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
public static void main(String[] args) { | |
Tree tree = initialise(); | |
System.out.println(minimax(tree.getRoot(), 2, true)); | |
} | |
private static int minimax(Node node, int depth, boolean isMax) { | |
if(depth==0 || node.getChildren()==null || node.getChildren().isEmpty()) { | |
return getStateScore(); //evaluation function | |
} | |
int bestValue = Integer.MIN_VALUE; |
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
public static void main(String[] args) { | |
Tree tree = initialise(); | |
System.out.println(minimax(tree.getRoot(), 2, | |
Integer.MIN_VALUE, Integer.MAX_VALUE, true)); | |
} | |
private static int minimax(Node node, int depth, int alpha, int beta, boolean isMax) { | |
if(depth==0 || node.getChildren()==null || node.getChildren().isEmpty()) { | |
return getStateScore(); //evaluation function | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<parent> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-parent</artifactId> | |
<version>2.3.5.RELEASE</version> | |
</parent> | |
<groupId>com.vinimo.product.service</groupId> |
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
#None of these properties are required. There are default values if not provided. | |
#If embedded in another application, the values are taken from there, from the application application.properties | |
#If not provided, theme=grommet | |
grommet-swagger.theme=hpe | |
#If not provided, open-api-url-path=/v3/api-docs | |
grommet-swagger.open-api-url-path=/v3/api-docs | |
#If not provided, route-prefix=grommet-swagger |
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
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | |
com.vinimo.utility.service.controller.UtilityServiceController |
OlderNewer