Skip to content

Instantly share code, notes, and snippets.

import React from "react";
import logo from "./logo.svg";
import "./App.css";
import * as Bokeh from "@bokeh/bokehjs";
function App() {
Bokeh.embed.embed_item(
JSON.parse(
'{"target_id": "myplot", "root_id": "1001", "doc": {"roots": {"references": [{"attributes": {}, "id": "1010", "type": "LinearScale"}, {"attributes": {}, "id": "1042", "type": "BasicTickFormatter"}, {"attributes": {}, "id": "1004", "type": "DataRange1d"}, {"attributes": {"below": [{"id": "1012"}], "center": [{"id": "1015"}, {"id": "1019"}, {"id": "1044"}], "left": [{"id": "1016"}], "renderers": [{"id": "1036"}], "title": {"id": "1002"}, "toolbar": {"id": "1026"}, "x_range": {"id": "1004"}, "x_scale": {"id": "1008"}, "y_range": {"id": "1006"}, "y_scale": {"id": "1010"}}, "id": "1001", "subtype": "Figure", "type": "Plot"}, {"attributes": {}, "id": "1013", "type": "BasicTicker"}, {"attributes": {}, "id": "1025", "type": "HelpTool"}, {"attributes": {"axis": {"id": "1016"}, "dimension": 1, "ticker": null}, "id": "1019", "type": "Grid
import { createSlice, configureStore } from "@reduxjs/toolkit"
import { createStore, combineReducers } from "redux"
import { INITIAL_STATE } from "./state"
const basketSlice = createSlice({
name: "basket",
initialState: INITIAL_STATE,
reducers: {
add: (state, action) => {
// add item to basket using `state` and `action` props
@bsdis
bsdis / log
Last active October 21, 2019 12:53
$ ssh -i /Users/Jorgen/.ssh/id_rsa_gh2.pub -vT git@github.com
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/Jorgen/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [140.82.113.4] port 22.
debug1: Connection established.
debug1: identity file /Users/Jorgen/.ssh/id_rsa_gh2.pub type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Jorgen/.ssh/id_rsa_gh2.pub-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import java.time.LocalDate;
@bsdis
bsdis / gist:c9f39e334dadb10438a88ccb93925326
Created December 15, 2017 20:32
java fxml standalone
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import java.time.LocalDate;
> sapply(bluetooth,class)
$timestamp
[1] "integer"
$alter
[1] "character"
$ego
[1] "character"
import sys
import pyfftw
import numpy as np
import scipy.signal
import scipy.fftpack
import matplotlib.pyplot as plt
from timeit import Timer
import time
from numba import jit
from PyQt4 import QtGui
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
import sys
class ExampleApp(QtGui.QMainWindow):
def __init__(self):
super(self.__class__, self).__init__()
self.mdiarea = QtGui.QMdiArea()
self.setCentralWidget(self.mdiarea)