This file contains hidden or 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
| for i := 0; i < numberOfSimulationas; i++ { | |
| fmt.Print("Monte Carlo Simulation No. ") | |
| fmt.Printf("%d\n", i+1) | |
| if randomBadDay == rand.Intn(numberOfTrades-1)+1 { | |
| profitPercentage = 100 - profitPercentage | |
| fmt.Print("B") | |
| } | |
| sum := 0.0 | |
| profitsCount := 0 | |
| lossesCount := 0 |
This file contains hidden or 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 Car struct { | |
| name string | |
| } | |
| type Truck struct { | |
| name string |
This file contains hidden or 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 Car struct { | |
| name string | |
| } | |
| type Truck struct { | |
| name string |
This file contains hidden or 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 Car struct { | |
| name string | |
| } | |
| type Truck struct { | |
| name string |
This file contains hidden or 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 Car struct { | |
| name string | |
| } | |
| type Truck struct { | |
| name string |
This file contains hidden or 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 Car struct { | |
| name string | |
| } | |
| type Truck struct { | |
| name string |
This file contains hidden or 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 Car struct { | |
| name string | |
| } | |
| type Truck struct { | |
| name string |
This file contains hidden or 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" | |
| "github.com/gobwas/ws" | |
| "github.com/gobwas/ws/wsutil" | |
| "math/rand" | |
| "net/http" | |
| "strconv" | |
| ) |
This file contains hidden or 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 ( | |
| "context" | |
| "fmt" | |
| "github.com/gobwas/ws" | |
| "github.com/gobwas/ws/wsutil" | |
| "math/rand" | |
| "os" | |
| "strconv" |
This file contains hidden or 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 ( | |
| "bufio" | |
| "fmt" | |
| "net" | |
| "strconv" | |
| "time" | |
| ) |
OlderNewer