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
#!/usr/bin/env bash | |
mv config/detekt/detekt.yml config/detekt/detekt.yml.old | |
./gradlew detektGenerateConfig | |
diff config/detekt/detekt.yml config/detekt/detekt.yml.old >config/detekt/detekt.patch | |
read -p "Update detekt and then press ENTER" ignore | |
rm config/detekt/detekt.yml | |
./gradlew detektGenerateConfig | |
patch config/detekt/detekt.yml --no-backup-if-mismatch --merge <config/detekt/detekt.patch | |
rm config/detekt/detekt.patch |
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 com.b21 | |
import com.jakewharton.rxrelay2.PublishRelay | |
import com.jakewharton.rxrelay2.Relay | |
import io.reactivex.BackpressureStrategy | |
import io.reactivex.Flowable | |
import io.reactivex.functions.Consumer | |
import org.reactivestreams.Subscriber | |
/** |
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
public class CPM { | |
public static void main(String[] args) { | |
// Extracted from: | |
// https://www.reddit.com/r/pokemongodev/comments/4t59t1/decoded_game_master_protobuf_file_v01_all_pokemon/d5f2y91 | |
float[] cpm = { | |
0.094f, 0.16639787f, 0.21573247f, 0.25572005f, 0.29024988f, | |
0.3210876f, 0.34921268f, 0.37523559f, 0.39956728f, 0.42250001f, | |
0.44310755f, 0.46279839f, 0.48168495f, 0.49985844f, 0.51739395f, | |
0.53435433f, 0.55079269f, 0.56675452f, 0.58227891f, 0.59740001f, |