Skip to content

Instantly share code, notes, and snippets.

View altavir's full-sized avatar

Alexander Nozik altavir

View GitHub Profile
@altavir
altavir / plotly.json
Created July 16, 2020 16:12
plotlykt-jupyter-demo
{
"imports": [
"scientifik.plotly.*",
"scientifik.plotly.models.*",
"hep.dataforge.meta.*",
"kotlinx.html.*"
],
"repositories": [
"*mavenLocal",
"https://dl.bintray.com/mipt-npm/dataforge",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import math
import scipy.signal
import numpy as np
import plotly.graph_objects as go # I prefer ployly over matplotlib
from scipy.ndimage import gaussian_filter1d
step = 0.01 # Defining the grid step for all further operations
# gaussian kernel on its own grid with the same step
def gauss(pos, sigma):
@altavir
altavir / 1-react-demo.kt
Last active September 28, 2019 09:06
A demonstration of use external state changer for react with kotlin-js.
package ru.mipt.npm.demo.react
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.ReceiveChannel
import kotlinx.html.dom.append
import kotlinx.html.js.*
import react.*
import react.dom.div
import react.dom.h1
@altavir
altavir / TableDemoApp.kt
Last active January 3, 2019 14:55
A simple tornadofx table with column regex filter
import com.github.javafaker.Faker
import javafx.beans.InvalidationListener
import javafx.beans.binding.ListBinding
import javafx.beans.property.SimpleIntegerProperty
import javafx.collections.FXCollections
import javafx.collections.ObservableList
import javafx.geometry.Pos
import javafx.scene.layout.Priority
import tornadofx.*
import java.util.function.Predicate
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.