I hereby claim:
- I am duanebester on github.
- I am duanebester (https://keybase.io/duanebester) on keybase.
- I have a public key ASDv_AHTmm_Feq3Wmefj91xFAlcB7yuKoXHiZ-ZFayLfaAo
To claim this, I am signing this object:
import SwiftUI | |
struct NowPlayingView: View { | |
var body: some View { | |
HStack(spacing: 16) { | |
Spacer() | |
ZStack { | |
Rectangle() | |
.fill(Color.primary) | |
.frame(width: 50, height: 50) |
import SwiftUI | |
struct TabIconsView: View { | |
var body: some View { | |
HStack { | |
Spacer() | |
Image(systemName: "person.crop.circle") | |
.resizable() | |
.aspectRatio(contentMode: .fit) | |
.frame(width: 25, height: 25) |
import SwiftUI | |
struct Song: Identifiable, Codable { | |
let id: Int | |
let name: String | |
let artist: String | |
} | |
struct SongListView: View { | |
let names = ["Bailamos", "Dance Monkey", "One in a million", "Waka Waka", "Macarena"] |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
NavigationView { | |
ZStack { | |
SongListView() | |
}.navigationBarTitle("Music") | |
} | |
} |
def spellCheck = Flow[String].map(ocr => { | |
import scala.collection.JavaConverters._ | |
val words: Set[String] = ocr.replaceAll("-\n", "") | |
.replaceAll("\n", " ") | |
.replaceAll("-"," ") | |
.split("\\s+") | |
.map(_.replaceAll( | |
"[^a-zA-Z'’\\d\\s]", "") // Remove most punctuation | |
.trim) | |
.filter(!_.isEmpty).toSet |
trait Spell { | |
import com.atlascopco.hunspell.Hunspell | |
lazy val speller = new Hunspell("src/main/resources/en_US.dic", "src/main/resources/en_US.aff") | |
} |
def imageSink(path:String, format:String = "png") = Sink.foreach[BufferedImage](bi => { | |
ImageIO.write(bi, format, new File(path)) | |
}) | |
val imagePreProcessFlow = | |
imageToBinaryImage.alsoTo(imageSink("binary.png")) | |
.via(imageEnhance).alsoTo(imageSink("enhanced.png")) | |
.via(imageDeSkew()).alsoTo(imageSink("deskew.png")) |
I hereby claim:
To claim this, I am signing this object:
def processStage(stageNum: Int) = Flow[BufferedImage] | |
.async | |
.delay(1 seconds) | |
.map(bi => { | |
val info = s"Processing Stage: ${stageNum}" | |
wsActor ! TextMessage(info) | |
bi | |
}) |
val imageRoute = | |
pathPrefix("image") { | |
path("status") { | |
get { | |
handleWebSocketMessages(wsStatusFlow) | |
} | |
} ~ path("upload") { | |
post { | |
uploadedFile("fileUpload") { | |
case (_, file) => |