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
@objc protocol Migration {} | |
func printMigrations() { | |
var classCount: UInt32 = 0 | |
let classList = objc_copyClassList(&classCount)! | |
for index in 0 ..< Int(classCount) { | |
if class_conformsToProtocol(classList[index], Migration.self) { | |
print(classList[index]) | |
} |
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
/* Credits to @gsampaio for coming up with the Effect<S, A> type. | |
* Even though this flavor of reducer also describes side-effects, | |
* testing is still trivial since it's sufficient to check if the | |
* side-effects are of the right type. The actual execution of the | |
* effect can be tested separately using integration tests. */ | |
import RxSwift | |
class Effect<S: Equatable, A: Action> { | |
open func execute(state: () -> S) -> Observable<A> { |
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
.text | |
.globl main | |
main: | |
add $a0, $zero, 8 | |
jal fact | |
j exit | |
# int fact(int n) { | |
# if (n < 1) { |
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
.text | |
.globl main | |
main: | |
addi $a0, $zero, 7 | |
jal rot | |
j exit | |
rot: | |
# Check if $a0 < 2 |
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
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <iomanip> | |
#include <sstream> | |
#include "gurobi_c++.h" | |
using namespace std; | |
vector<vector<int>> read_input_file(char *input_file_name, int &number_of_employees, int &min_employees_per_group, |
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
{ | |
"experiment": "experiment_1", | |
"generations": { | |
"baseline": { | |
"mean": 280.1, | |
"stdev": 118.93337365273489 | |
}, | |
"variation": { | |
"mean": 275.15, | |
"stdev": 96.98251334512238 |
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
a = 0 | |
for i from 1 to 3 // loop three times | |
{ | |
a = a + i // add the current value of i to a | |
} | |
print a // the number 6 is printed (0 + 1; 1 + 2; 3 + 3) |
OlderNewer