- VPN: Mullvad
- IntelliJ
- Sublime
- Git
- Java
- Tmux
När ungen sover får man tid att göra sådana här dumheter. Analys av hur vi valt spelare i VM-Elvan.
Första delen är allmän analys utan att dyka djupare i varje enskilt lag. Vilka spelare och länder är populära? Vilka är mindre populära?
Sammanställning av hur många seplare vi valt från de olika länderna (minst 3 spelare).
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
// Config holds the properties and values used for configuration | |
type Config struct { | |
dateFormat string | |
} | |
// DefaultConfig is the set of configuration values used if none other is given. | |
var DefaultConfig = Config{"2006-01-02"} | |
// FromFile returns the configuration to use for did | |
func FromFile(path string) (c Config, e error) { |
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 se.saidaspen.aoc2019.aoc07; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.concurrent.*; | |
import java.util.stream.IntStream; |
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
let mut scores: HashMap<String, HashMap<String, u32>> = HashMap::new(); | |
1 for repo in tracked_repos { | |
2 let contributions: Vec<Contribution> = gh | |
3 .get_contributors(&repo) | |
4 .expect("unable to get contributors for repo") | |
5 .iter() | |
6 .filter(|c| participants_set.contains(&c.login)) | |
7 .cloned() | |
8 .collect(); | |
9 for contrib in contributions { |
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 aoc207 | |
import java.io.File | |
fun main() { | |
val input = File(ClassLoader.getSystemResource("201721").file).readText() | |
println("Part 1: " + Day21(input).part1(5)) | |
} | |
class Day21(input: String) { |
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 aoc207 | |
import org.junit.jupiter.api.Assertions.assertEquals | |
import org.junit.jupiter.api.Assertions.assertTrue | |
import org.junit.jupiter.api.Test | |
internal class Day21Test { | |
@Test | |
fun p1() { |
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
fun main() { | |
val input = java.io.File(ClassLoader.getSystemResource("201721").file).readText().trim() | |
println("Part 1: " + Day21().part1(input, 5)) | |
println("Part 2: " + Day21().part1(input, 18)) | |
} | |
typealias G = Grid<Char> | |
typealias P<A, B> = Pair<A, B> | |
class Day21 { |
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
#[post("/new")] | |
async fn new(req_body: String) -> impl Responder { | |
match serde_json::from_str(req_body.as_str()) { | |
Err(why) => HttpResponse::BadRequest().body( | |
json!({ | |
"err": "Unable to parse input as request json", | |
}) | |
.to_string(), | |
), | |
Ok(t) => HttpResponse::Ok().body(format!("{:?}", t)), |
OlderNewer