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
(deftype command-runner [] ;; ➊ | |
Command | |
(perform [this metric city day] ;; ➋ | |
(try | |
(run metric city day) ;; ➌ | |
(catch Exception e | |
(handle-error e))))) |
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
(defprotocol Command | |
(perform [this metric city param] | |
"Executes the command logic.")) |
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
@RestController | |
public class MatrixResource { | |
@RequestMapping(value="/{status}/ping", method=RequestMethod.GET) | |
public String pong( | |
@PathVariable("status") String status, | |
@MatrixVariable(name="name", pathVar="status", required=false) String name) { | |
return String.format("matrix variable name=%s", name); | |
} | |
} |
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
@Service | |
@Path("/") | |
public class MatrixResource { | |
@GET | |
@Path("/{status}/ping") | |
@Produces("text/plain") | |
public String ping(@PathParam("status") PathSegment status) { | |
MultivaluedMap<String, String> matrixParameters = status.getMatrixParameters(); | |
String nameMatrixFromStatus = matrixParameters.getFirst("name"); | |
return String.format("matrix variable name=%s", nameMatrixFromStatus); |
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
@Service | |
@Path("/") | |
public class MatrixResource { | |
@GET | |
@Path("/status/ping") | |
@Produces("text/plain") | |
public String ping(@MatrixParam("name") String name) { | |
return String.format("matrix variable name=%s", name); | |
} | |
} |
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
syntax on | |
set ruler " Show the line and column numbers of the cursor. | |
set formatoptions+=o " Continue comment marker in new lines. | |
set textwidth=0 " Hard-wrap long lines as you type them. | |
set modeline " Enable modeline. | |
set esckeys " Cursor keys in insert mode. | |
set linespace=0 " Set line-spacing to minimum. | |
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
" More natural splits | |
set splitbelow " Horizontal split below current. |
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
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true | |
sudo defaults read bluetoothaudiod |
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
@RampUp(startRps = 1, targetRps = 60, durationInMins = 1) | |
ohne max. connection und mit 1 sec response zeit, | |
würde sowas erwarten: | |
10s 20s 30s 40s 50s 60s | |
55 210 465 820 1275 1830 | |
weil pro Sekunde, +1 request Anstieg: | |
1s 2s 3s ... 10s | |
1 2 3 10 = 55 total | |
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 io.ryos.rhino.sdk.simulations; | |
import static io.ryos.rhino.sdk.dsl.specs.DSLSpec.http; | |
import static io.ryos.rhino.sdk.dsl.specs.HttpSpec.from; | |
import static io.ryos.rhino.sdk.dsl.specs.UploadStream.file; | |
import static io.ryos.rhino.sdk.dsl.specs.builder.SessionAccessor.session; | |
import static io.ryos.rhino.sdk.utils.TestUtils.getEndpoint; | |
import io.ryos.rhino.sdk.SimulationConfig; | |
import io.ryos.rhino.sdk.annotations.Dsl; |
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
# The meeting matrix can be improved with constraints e.g output has minimum waiting person and | |
# shortest total duration by using constraing programming or linear optimization. | |
# The problem is very similar to N-Queens. | |
# Right now you can find optimum solution by running the code multiple times. | |
import itertools | |
import random | |
from datetime import datetime, timedelta | |
team = ['Erhan', 'Brown', 'Mustermann', 'Jack', 'Joe', 'Rambo', 'Steve'] |