Queried Fluree CLI against the translate ledger explicitly:
fluree query translate --format table \
'SELECT ?type (COUNT(?s) AS ?count)
WHERE { ?s a ?type }
GROUP BY ?type
ORDER BY ?type'Queried Fluree CLI against the translate ledger explicitly:
fluree query translate --format table \
'SELECT ?type (COUNT(?s) AS ?count)
WHERE { ?s a ?type }
GROUP BY ?type
ORDER BY ?type'| #!/bin/bash | |
| # On macOS Tahoe, system_profiler and `ifconfig getsummary` can report | |
| # the SSID string as "redacted". Use CoreWLAN via Swift to get the SSID. | |
| swift -e 'import CoreWLAN; let i=CWWiFiClient.shared().interface(); let p=i?.configuration()?.networkProfiles.firstObject as? CWNetworkProfile; print(i?.ssid() ?? p?.ssid ?? "")' |
| #!/usr/bin/env python3 | |
| """ | |
| run1.py — DIAL screenId → casttube Lounge API 로 LGE webOS YouTube 앱 제어 | |
| 동작 과정: | |
| 1. DIAL SSDP 디스커버리 → LG TV 의 Application-URL 획득 | |
| 2. DIAL POST /apps/YouTube (Chrome Origin) → webOS YouTube 앱 실행 | |
| 3. DIAL GET /apps/YouTube → additionalData 에서 screenId 획득 | |
| 4. casttube YouTubeSession(screenId) → Lounge API 세션 수립 | |
| (get_lounge_token_batch → bind → SID/gsessionid) |
| ;; Datomic example code | |
| (use '[datomic.api :only (db q) :as d]) | |
| ;; ?answer binds a scalar | |
| (q '[:find ?answer :in ?answer] | |
| 42) | |
| ;; of course you can bind more than one of anything | |
| (q '[:find ?last ?first :in ?last ?first] | |
| "Doe" "John") |
| #!/usr/bin/osascript | |
| (* | |
| Monitor Identifier for macOS | |
| Uses NSScreen API and CGDisplaySerialNumber for consistent monitor identification | |
| Use NSNumber instead of NSString format because CGDisplaySerialNumber returns | |
| a uint32_t that gets converted to floating-point in AppleScript, | |
| NSNumber's stringValue properly converts the floating-point back | |
| to integer string. |
| #!/usr/bin/env python3 | |
| """ | |
| Test script to browser-use. | |
| This script attempts to: | |
| 1. Search for flights to Singapore on Google Flights | |
| 2. Set departure date to September 17th and return date to September 24th | |
| 3. Extract top 4 flight options in JSON format with keys: | |
| airline, departure_time, arrival_time, duration, total_amount, route | |
| """ |
| ;; What file is raising MalformedInputException on slurp? | |
| (use 'clojure.java.io) | |
| (import 'java.nio.file.Files) | |
| (import 'java.nio.file.Paths) | |
| (import 'java.nio.charset.MalformedInputException) | |
| (def directory? (memfn isDirectory)) | |
| (def name (memfn getName)) |
lacinia 의 resolver 구성에 대해서 좀 더 알아야 (async 혹은 ThreadPoolExecutor) 의 동작을 이해할 수 있을 것 같습니다.
lacinia 에서 resolver 를 구현할 때 value 를 바로 리턴하도록 할 수도 있지만
ResolveResultPromise 를 리턴하게 할 수도 있습니다. [1]
lacinia 에서 이것을 "Asynchronous Field Resolvers" 라고 부릅니다.
resolver 에서 ResolveResultPromise 를 리턴하게 만들 때는 아래와 같은 pattern 을 따릅니다.
(defn resolve-xyz
| (import 'java.text.BreakIterator) | |
| (defn break-index-seq [s] | |
| (let [iter (doto (BreakIterator/getCharacterInstance) | |
| (.setText s)) | |
| c (.first iter) | |
| -seq (fn f [c iter] | |
| (lazy-seq (when (not= c BreakIterator/DONE) | |
| (cons c (f (.next iter) iter)))))] | |
| (-seq c iter))) |
When you request gRPC through mitmproxy and the server responses with streaming client is not receiving that response.
Because mitmproxy tries to read entire response for manipulating opportunity.
So in that case, we can use '--set stream_large_bodies=1' option.
https://docs.mitmproxy.org/stable/overview-features/#streaming