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
fun VecIndex.knn(v: DoubleArray, i: Int, exact: Boolean = false) = | fun VecIndex.knn(v: DoubleArray, i: Int, involve: Boolean = false) = | |
if(exact) exactKNNSearch(v, i + 10) | if(involve) involveKNNSearch(v, i + 10) | |
else findNearest(v, i + 10) | else findNearest(v, i + 10) | |
.filter { !it.item().embedding.contentEquals(v) } | .filter { !it.item().embedding.contentEquals(v) } | |
.distinctBy { it.item().toString() }.take(i) | .distinctBy { it.item().toString() }.take(i) | |
============================================================================================================================================ | |
fun VecIndex.exactKNNSearch(vq: DoubleArray, nearestNeighbors: Int) = | fun VecIndex.exactKNNSearch(vq: DoubleArray, nearestEdge: Int) = | |
asExa |
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
override fun dimensions(): Int = embedding.size | |
============================== | |
override fun toString() = loc.getContext(0) | |
} | |
============================== | |
fun buildOrLoadVecIndex( | |
indexFile: File = File(DEFAULT_KNNINDEX_FILENAME), | |
rootDir: URI = DATA_DIR |
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
2021-07-13T02:37:51.0914665Z Found online and idle hosted runner(s) in the current repository's organization account that matches the required labels: 'ubuntu-latest' | |
2021-07-13T02:37:51.0914742Z Waiting for a hosted runner in 'organization' to pick this job... | |
2021-07-13T02:37:57.9092609Z Current runner version: '2.278.0' | |
2021-07-13T02:37:57.9116140Z ##[group]Operating System | |
2021-07-13T02:37:57.9117017Z Ubuntu | |
2021-07-13T02:37:57.9117373Z 20.04.2 | |
2021-07-13T02:37:57.9117749Z LTS | |
2021-07-13T02:37:57.9118148Z ##[endgroup] | |
2021-07-13T02:37:57.9118632Z ##[group]Virtual Environment | |
2021-07-13T02:37:57.9119206Z Environment: ubuntu-20.04 |
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
" To only apply these macros in e.g. Python files, prepend 'autocmd FileType py', e.g.: | |
" autocmd FileType py inoremap \mu μ | |
inoremap \alpha α | |
inoremap \beta β | |
inoremap \gamma γ | |
inoremap \delta δ | |
inoremap \epsilon ε | |
inoremap \zeta ζ | |
inoremap \eta η |
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 org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
plugins { | |
kotlin("jvm") version "1.4.10" | |
} | |
group = "me.breandan" | |
version = "1.0-SNAPSHOT" | |
repositories { |
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
tasks { | |
val installPathLocal = "${System.getProperty("user.home")}/.jupyter_kotlin/libraries" | |
val genNotebookJSON by creating(JavaExec::class) { | |
main = "edu.mcgill.kaliningraph.codegen.NotebookGenKt" | |
classpath = sourceSets["main"].runtimeClasspath | |
args = listOf(projectDir.path, project.version.toString()) | |
} | |
val jupyterInstall by registering(Copy::class) { |
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 O(val n: Number) : Number() { | |
operator fun compareTo(i: Number) = n.toDouble().compareTo(i.toDouble()).also { lastComparison = i } | |
override fun toByte() = n.toByte() | |
override fun toChar() = n.toChar() | |
override fun toDouble() = n.toDouble() | |
override fun toFloat() = n.toFloat() | |
override fun toInt() = n.toInt() | |
override fun toLong() = n.toLong() | |
override fun toShort() = n.toShort() | |
} |
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
Building nv-usd... | |
Adjusting /home/breandan/.profile | |
Adjusting /home/breandan/.bashrc | |
Creating packman packages repository at /home/breandan/packman-repo | |
Fetching [email protected]_64.tar.gz from S3 ... | |
Unpacking python | |
Fetching [email protected] from S3 ... | |
Unpacking ... | |
Processing project file '/home/breandan/packman-repo/packman-common/6.1.3/deps.packman.xml' | |
Package '7za' at version '16.02.4' is missing from local storage. |
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 java.net.URL | |
fun main() { | |
val jdk8members = mutableSetOf<String>() | |
val jdk14members = mutableSetOf<String>() | |
for (i in 1..27) { | |
val jdk8URL = "https://docs.oracle.com/javase/8/docs/api/index-files/index-$i.html" | |
val jdk14URL = "https://download.java.net/java/GA/jdk14/docs/api/index-files/index-$i.html" | |
val jdk8page = fetchPage(jdk8URL) |
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
com.sun.jarsigner.ContentSigner | |
com.sun.jarsigner.ContentSignerParameters | |
com.sun.java.accessibility.util.AccessibilityEventMonitor | |
com.sun.java.accessibility.util.AccessibilityListenerList | |
com.sun.java.accessibility.util.AWTEventMonitor | |
com.sun.java.accessibility.util.EventID | |
com.sun.java.accessibility.util.EventQueueMonitor | |
com.sun.java.accessibility.util.GUIInitializedListener | |
com.sun.java.accessibility.util.SwingEventMonitor | |
com.sun.java.accessibility.util.TopLevelWindowListener |