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.assemblyai.api.resources.files | |
import com.assemblyai.api.core.ApiError | |
import com.assemblyai.api.core.ClientOptions | |
import com.assemblyai.api.core.ObjectMappers | |
import com.assemblyai.api.types.UploadedFile | |
import io.vertx.core.buffer.Buffer | |
import io.vertx.ext.web.client.HttpRequest | |
import io.vertx.ext.web.client.HttpResponse | |
import io.vertx.ext.web.client.WebClient |
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
fun setup() = listOf( | |
match( | |
fighter called "fighter" | |
has AVG_FIGHT_TIME called "avg_fight_time" | |
) min "avg_fight_time" called "min_avg_fight_time" | |
) | |
fun query() = match( | |
fighter called "fighter" | |
has AVG_FIGHT_TIME equalTo named("min_avg_fight_time") |
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
SocraticAPI.administration().config(ConfigOption.cyclomatic_complexity, true).build().execute() | |
SocraticAPI.administration().init().build().execute() //installs Apache Skywalking and Babelfish via Docker | |
SocraticAPI.administration().addRemoteRepo() | |
.repoName("bfergerson/method-complexity") | |
.build().execute() //clones and scans https://github.com/bfergerson/method-complexity | |
println SocraticAPI.knowledge().question() | |
.question("what is the most complex method?") | |
.build().execute().answer | |
// Answer: ComplexMethods.mostComplexMethod() |
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
match | |
#find all functions in bfergerson/myproject | |
$myProject isa project has name "bfergerson/myproject"; | |
$myFile isa file; ($myFile, $myProject) isa defines; | |
$myFunction isa function-instance; ($myFunction, $myFile) isa defines; | |
#follow defined functions to referenced functions | |
($myFunction, $funcDefs) isa function_definition; | |
($funcDefs, $func); ($func, $funcRefs); |
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
project sub entity | |
has create_date | |
has project_name | |
plays has_defines_file; | |
file sub entity | |
has create_date | |
has file_name | |
has subkind | |
has file_location | |
has qualified_name |
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
interface Z {} | |
interface N<x> {} | |
interface L<x> {} | |
interface Qlr<x> {} | |
interface Qrl<x> {} | |
interface E<x> extends | |
Qlr<N<?super Qr<?super E<?super E<?super x>>>>>, | |
Qrl<N<?super Ql<?super E<?super E<?super x>>>>> {} | |
interface Ql<x> extends | |
L<N<?super Ql<?super L<?super N<?super x>>>>>, |