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 chat | |
import org.zeromq.ZMQ | |
import kotlin.concurrent.thread | |
fun main(args: Array<String>): Unit = | |
ZMQ.context(1).use { ctx -> | |
thread { | |
ctx.socket(ZMQ.SUB).use { stream -> | |
stream.connect(MESSAGE_STREAM) |
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 pylast | |
# get the keys https://www.last.fm/api/account/create | |
last_fm = pylast.LastFMNetwork( | |
api_key=API_KEY, | |
api_secret=API_SECRET, | |
username=USERNAME, |
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 | |
from urllib.parse import quote | |
from lxml import html | |
if len(sys.argv) > 1: | |
word = sys.argv[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
import android.app.Activity; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import org.opencv.android.CameraBridgeViewBase; | |
import org.opencv.android.JavaCameraView; | |
import org.opencv.android.OpenCVLoader; | |
import org.opencv.core.Mat; | |
import org.opencv.core.MatOfRect; |
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 android.app.Activity | |
import android.content.Intent | |
import android.os.Bundle | |
import kotlinx.coroutines.experimental.suspendCancellableCoroutine | |
typealias RequestCode = Int | |
typealias ResultCode = Int | |
data class ActivityResult( | |
val requestCode: RequestCode, |
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 android.view.MotionEvent | |
typealias PxF = Float | |
typealias X = PxF | |
typealias Y = PxF | |
typealias PointerId = Int | |
inline fun MotionEvent.multiTouch( |
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
enum ColumnType: String, Codable { | |
case line | |
case x | |
case area | |
case bar | |
} | |
typealias LineId = String | |
struct Columns { |
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.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.cancel | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.suspendCancellableCoroutine | |
import java.io.StringWriter | |
sealed class Cli { | |
data class Ok(val stdout: String) : Cli() | |
data class Err(val stderr: String) : Cli() |
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.CoroutineScope | |
import kotlinx.coroutines.Job | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.time.delay | |
import mu.KotlinLogging | |
import java.time.Duration | |
private val log = KotlinLogging.logger { } | |
data class PeriodicJob( |
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
! 2/5/2020 https://twitter.com | |
twitter.com##div[aria-label$="Your Home Timeline"] | |
twitter.com##div[aria-label$="Trending now"] | |
twitter.com##aside[aria-label$="Who to follow"] | |
twitter.com##a[aria-label^="Home"] | |
twitter.com##a[aria-label$="explore"] | |
twitter.com##a[aria-label^="Notifications"] | |
twitter.com##a[aria-label^="Bookmarks"] | |
twitter.com##a[aria-label^="Lists"] | |
twitter.com##a[aria-label^="Profile"] |