pip3 install pipenv
pipenv shell
| config: | |
| target: "http://localhost:8000" | |
| http: | |
| timeout: 10 # Responses have to be sent within 10 seconds or the request will be aborted | |
| processor: "./processor.js" | |
| phases: | |
| # Create 100 virtual users every second for 60 seconds | |
| - duration: 60 # seconds | |
| arrivalRate: 100 # virtual users |
| import sys | |
| # choose() is the same as computing the number of combinations. Normally this is | |
| # equal to: | |
| # | |
| # factorial(N) / (factorial(m) * factorial(N - m)) | |
| # | |
| # but this is very slow to run and requires a deep stack (without tail | |
| # recursion). | |
| # |
| #!/usr/bin/env python3 | |
| # | |
| # Query AWS Athena using SQL | |
| # Copyright (c) Alexey Baikov <sysboss[at]mail.ru> | |
| # | |
| # This snippet is a basic example to query Athen and load the results | |
| # to a variable. | |
| # | |
| # Requirements: | |
| # > pip3 install boto3 botocore retrying |
| @RunWith(JUnit4.class) | |
| public class ExceptionHandlingTests { | |
| class ShortCircuitCF<T> { | |
| final CompletableFuture<T> result = new CompletableFuture<>(); | |
| final CompletableFuture<T> notCompleted = new CompletableFuture<>(); | |
| CompletableFuture<T> propagate(T value) { | |
| result.complete(value); | |
| return notCompleted; | |
| } |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/
It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.
Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?
| // vim: syntax=shell | |
| $JAR=/usr/lib/spark/lib/spark-examples.jar | |
| $KEY=MoissinB | |
| # Create cluster with 1st step | |
| aws emr create-cluster --profile $KEY \ | |
| --name "Moissinb Cluster" \ | |
| --release-label emr-5.10.0 \ | |
| --applications Name=Spark \ |
| Copyright 2020 Brad Montgomery | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
| and associated documentation files (the "Software"), to deal in the Software without restriction, | |
| including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
| subject to the following conditions: | |
| The above copyright notice and this permission notice shall be included in all copies or substantial | |
| portions of the Software. |