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
| #!/usr/bin/env python3 | |
| import sys | |
| import argparse | |
| from pathlib import Path | |
| import fitz # PyMuPDF | |
| def check_improper_redaction(pdf_path): | |
| """Detect if text exists under black rectangles.""" | |
| try: |
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
| package <Whatever Package Ya Want Really> | |
| import android.os.Handler | |
| import io.mockk.every | |
| import io.mockk.mockk | |
| import java.util.concurrent.CountDownLatch | |
| /** | |
| * TestHandler provides a way to execute tests that require a [Handler]. | |
| * |
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
| class Solution { | |
| fun isRobotBounded(instructions: String): Boolean { | |
| val robot = Robot() | |
| repeat(4) { | |
| instructions.forEach { instruction -> | |
| when (instruction) { | |
| 'G' -> robot.move() | |
| 'R' -> robot.turnRight() | |
| 'L' -> robot.turnLeft() | |
| } |
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
| import kotlinx.coroutines.experimental.GlobalScope | |
| import kotlinx.coroutines.experimental.channels.Channel | |
| import kotlinx.coroutines.experimental.channels.Channel.Factory.CONFLATED | |
| import kotlinx.coroutines.experimental.channels.Channel.Factory.UNLIMITED | |
| import kotlinx.coroutines.experimental.channels.sendBlocking | |
| import kotlinx.coroutines.experimental.launch | |
| fun main(args: Array<String>) { | |
| val channels = listOf<Channel<Int>>( | |
| Channel(capacity = UNLIMITED), |
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
| public class DisposingObserver<T> implements Observer<T> { | |
| @Override | |
| @CallSuper | |
| public void onSubscribe(Disposable d) { | |
| DisposableManager.add(d); | |
| } | |
| @Override | |
| public void onNext(T next) {} |
NewerOlder