https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
datascience
  • a

    altavir

    05/15/2021, 6:42 AM
    Announce of the workshop on kotlin jupyter plugin building: https://kotlinlang.slack.com/archives/C4W52CFEZ/p1621060869158800?thread_ts=1620221118.142100&cid=C4W52CFEZ cc @Ilya Muradyan
    👍 2
    h
    m
    • 3
    • 17
  • p

    Peter

    05/30/2021, 10:04 AM
    I'm trying to create a Datelore Kotlin notebook with a custom Maven Repo using @file:Repository command (it is a JFrog based Repo). However when it then tries to resolve a module (I'm using @file:DependsOn), it says it cannot find that module. Strange thing is however that the first line it said it tried, is actually the correct URL. And this URL does resolve fine when entered in a browser. So the URL it looks for is correct but somehow still cannot retrieve it. Does anyone know if Datalore has some restrictions on connecting to outside world (like egress rules) or perhaps doesn't play nice with some of the redirection that sometimes goes one with Maven Repo's ? Not sure this is best channel to ask this question, but seemed the most appropriate one.
    a
    i
    • 3
    • 15
  • p

    Peter

    05/30/2021, 12:14 PM
    Just succeeded with deploying the Kotlin notebook with DataLore. In case anyone want to see it (very small demo of what package can actually do): https://datalore.jetbrains.com/view/notebook/umJ5HakN3gpKcI1VDbKw52
    👍 3
    i
    a
    • 3
    • 17
  • a

    altavir

    05/30/2021, 12:53 PM
    @Peter The problem is that in Plotly.kt I can't properly load the JS bundle before the execution because notebook isolates different cells. How do you manage to do that in your example? Isolated pages + js from cdn?
    p
    • 2
    • 15
  • a

    altavir

    05/30/2021, 5:09 PM
    Thanks to inspiration from @Peter Plotly.kt v0.4.2 is released with a legacy notebook trigger! Now it works in classic notebook and in the DataLore!
    🎉 3
    • 1
    • 1
  • i

    Igor Alshannikov

    06/02/2021, 12:32 AM
    Hi, could anybody suggest something resembling numpy's
    meshgrid()
    and
    multivariateNormal()
    in the current Kotlin ecosystem? I'm looking to rewrite code in these notebooks without `kotlin-numpy`: https://nbviewer.jupyter.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/contours.ipynb https://nbviewer.jupyter.org/github/JetBrains/lets-plot-kotlin/blob/master/docs/examples/jupyter-notebooks/density_2d.ipynb
    a
    h
    • 3
    • 11
  • m

    Michal Harakal

    06/10/2021, 9:21 PM
    I am playing a little bit with kotlin-jupyter and I am getting exception after simple
    typealias Matrix = List<List<Double>>
    Crash is in thread. It is of course working if I define it as a class.
    r
    a
    +2
    • 5
    • 8
  • p

    patrickdelconte

    06/14/2021, 2:28 PM
    in krangl is there a way to quickly combine multiple dataframes into a big one?
    b
    • 2
    • 2
  • p

    Peter

    06/18/2021, 8:25 AM
    Playing around a bit with Datalore and Kotlin notebooks. Have to say, a very nice and simple environment. But I noticed that on a basis 4GB machine, the Java max heap size is only 1GB. Is there anyway to influence this?
    a
    • 2
    • 1
  • a

    altavir

    07/07/2021, 4:00 PM
    Some time ago I promised a Proof Of Concept implementation of widgets for kotlin jupyter kernel. Today I finally had some time to work with it. Here it is: https://github.com/altavir/jupyter-mpp-demo. No documentation yet, but there is a demonstration notebook included. Currently only checkbox and text field are implemented and there are some rough edges ( for example only one instance of the same widget is connected), but it seem to be alright for POC. The architecture is extensible, so it is possible to add new widgets quite easily. If someone wants, it could be improved to the full-scale widgets library. Also you can use this example as a template for your own full-stack plugins. As always, thanks to @Ilya Muradyan for fantastic cooperation.
    🔥 11
    i
    • 2
    • 1
  • h

    holgerbrandl

    07/14/2021, 4:51 PM
    Quick question regarding the kernel: Is there a keyboard shortcut to show method arguments help? Like Ctrl-P in the IDE
    i
    • 2
    • 4
  • h

    holgerbrandl

    07/15/2021, 6:41 AM
    @Ilya Muradyan Not sure if this is intended or a bug, but in the IDE a smart-cast works that fails in jupyter:
    i
    a
    • 3
    • 6
  • h

    holgerbrandl

    07/17/2021, 8:28 PM
    I've finally managed to implement
    @JupyterLibrary
    support for
    krangl
    and
    kravis
    in https://github.com/holgerbrandl/krangl/blob/master/CHANGES.md#v017 and https://github.com/holgerbrandl/kravis/blob/master/CHANGES.md#v08. I took the opportunity to improve krangl-interop with
    lets-plot
    and have rebuilt one of my favourite R/ggplot teaching examples in kotlin&jupyter. Enjoy https://nbviewer.jupyter.org/github/holgerbrandl/krangl/blob/master/examples/jupyter/sleep_patterns.ipynb. Feel welcome with feedback and criticism. @Ilya Muradyan What is the intended process for the jsons such as https://github.com/Kotlin/kotlin-jupyter/blob/master/libraries/krangl.json? Are they legacy and will be kept, or will they be removed as soon as a library adopts the new integration model?
    🔥 3
    i
    i
    +2
    • 5
    • 13
  • h

    holgerbrandl

    07/27/2021, 8:58 PM
    I was so excited today when installing 2021.2 to finally explore https://plugins.jetbrains.com/plugin/16340-kotlin-notebook . It installs, and it actually run code-cells within the IDE horay, but code analysis seems broken for me for kotlin and markdown cells. The error is shown in the screen shot. What am I doing wrong?
    i
    • 2
    • 4
  • p

    Peter

    08/19/2021, 2:04 PM
    Is there an API to limit the output of a Jupyter Kotlin kernel. So the equivalent to "%logLevel off" but then to be called from within the kernel?
    i
    • 2
    • 3
  • e

    elect

    08/26/2021, 9:59 AM
    I'm looking for some kotlin alternative to plot on a map (like folium with python)
    a
    i
    • 3
    • 26
  • a

    altavir

    08/28/2021, 3:46 PM
    @Ilya Muradyan We just have a problem with kapt. Again. I've raised https://github.com/Kotlin/kotlin-jupyter/issues/325. I think it makes sense not to use it by default.
    i
    • 2
    • 1
  • р

    Ролан

    09/02/2021, 3:14 PM
    Together with Andrei Kislitsin we have developped a platform demonstrating the use of coroutines for reactive streams, KMath and Plotly.kt for high frequency trading analytics. Keep an eye on the repo as we will continue to add more and more interesting examples especially involving our Deep Learning framework within KMath based on pytorch: https://github.com/grinisrit/noa-atra-examples
    🔥 3
    ⭐ 3
    🚀 3
    💎 2
    z
    • 2
    • 7
  • e

    elect

    09/10/2021, 12:47 PM
    I'm sorry for the dumb question, but how can I load a csv file in datalore kotlin?
    a
    • 2
    • 10
  • h

    holgerbrandl

    09/10/2021, 2:17 PM
    DataFrame.readCsv from krangl would do it
    a
    e
    • 3
    • 2
  • e

    elect

    09/12/2021, 9:47 AM
    Plotly looks working fine within Datalore.. (
    %use plotly
    ) If I would like to render a graph like that, what syntax/code shall I use? (Sorry for the dumb question)
    a
    • 2
    • 1
  • р

    Ролан

    09/14/2021, 2:37 PM
    How to get the GPU instance (which is adverised to be free for 10h p.m.) on datalore?
    a
    • 2
    • 3
  • e

    elect

    09/17/2021, 9:30 AM
    is there any util that helps printing aligned all the fields of the classes inside a collection? Sort of like
    DataFrame
    m
    • 2
    • 15
  • a

    altavir

    09/17/2021, 2:40 PM
    @Ilya Muradyan Do we have a library plugin for jupyter which loads coroutines? I see there is one for serialization.
    i
    • 2
    • 5
  • p

    Peter

    09/18/2021, 7:20 AM
    In Kotlin Notebooks, is there a way to catch exceptions before they are displayed in the output of a cell so they can be formatted a bit nicer?
    a
    • 2
    • 12
  • p

    Peter

    09/29/2021, 11:44 AM
    Have been playing around with the DataFrame library, very nice and flexible and also great progress since last time I looked at it. But I have a few questions about the rendering, so if there are any experts that can enlighten me: • It looks/behaves very different when displaying a table between Datalore and Jupyter. Is this due to Datalore specific capabilities? • It contains some hard-code CSS styles that makes it not play nice with Jupyter Lab themes. Without these any additional CSS rules it seems to render much better. Can DataFrame be configured to not include any custom styles or overwrite them?
    a
    a
    • 3
    • 5
  • p

    Peter

    10/01/2021, 4:00 PM
    Is the Kotlin kernel providing its own version of kotlin-jupyter-api jar and put this also first on the classpath? The reason I ask is that I wanted to try out the latest version of kotlin-jupyter-api (since it has a nice new feature) and my code compiles fine. I also see that version in the local maven cache, so all good. But as soon as I try to load this in a notebook it fails and the reason is that somehow an older version of kotlin-jupyter-api is loaded instead.
    i
    • 2
    • 4
  • p

    Peter

    10/05/2021, 12:06 PM
    I have a strange requirement: end users of a notebook are required to add a single jar file to the Java class path. This is because the company that provides that jar file, only allows the end-users to use and distribute that jar file and I cannot package it any other way. So my current way of thinking: Step 1 User uploads the jar file to some Jupyter Notebook directory Step 2 Somehow that jar file gets added to the Java classpath. Could perhaps be a function the user could call from a cell, for example: addCustomJar("propriatary-api.jar") • This then could be directly added, using some URLClassLoader magic in the back ground • or install it in the local maven repo (~/.m2) But open to alternatives and any suggestions. Or perhaps something I overlooked that is already available out of the box. Any insights appreciated!
    i
    • 2
    • 2
  • g

    groostav

    10/08/2021, 8:04 AM
    Im looking for a data structure that is basically a
    double[10_000][300]
    with fast
    contains
    and fast
    indexOf
    , any suggestions?
    h
    i
    p
    • 4
    • 15
  • p

    Piotr Krzemiński

    10/08/2021, 11:33 AM
    Hi, is there a way to visualize directed graphs in Lets-Plot? I don't see it in the examples here: https://lets-plot.org/pages/charts.html
    i
    a
    • 3
    • 8
Powered by Linen
Title
p

Piotr Krzemiński

10/08/2021, 11:33 AM
Hi, is there a way to visualize directed graphs in Lets-Plot? I don't see it in the examples here: https://lets-plot.org/pages/charts.html
the closest thing I found is https://datalore.jetbrains.com/view/notebook/DyD2CLrAbpfO3FMtg6QuhT and drawing points and segments manually, but I'm looking for defining my nodes and edges and letting the library lay it out in a nice way
i

Ilya Muradyan

10/08/2021, 12:02 PM
I'm not sure about lets-plot, but kernel itself has such API. Basically, it was introduced to visualize hierarchies, but can be used for simple graphs as well
:thank-you: 1
Plotly also has Scatter model, but I don't know if it's easy to render the graphs like this, maybe @altavir has something to say
Documentation is here: https://ileasile.github.io/kotlin-jupyter-docs/docs/api/org.jetbrains.kotlinx.jupyter.api.graphs/index.html
Graphs.ipynb
a

altavir

10/08/2021, 12:17 PM
Scatter plots are there, but I do not think it supports arrows and graphs. https://github.com/breandan/kaliningraph supports advanced graphs on top of graphviz
:thank-you: 2
p

Piotr Krzemiński

10/08/2021, 1:02 PM
thanks folks, some solid stuff to try out!
View count: 6