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 numpy as np | |
# Generate synthetic data | |
N = 100 | |
# Zeros form a Gaussian centered at (-1, -1) | |
# epsilon is .1 | |
x_zeros = np.random.multivariate_normal( | |
mean=np.array((-1, -1)), cov=.1*np.eye(2), size=(N/2,)) | |
y_zeros = np.zeros((N/2,)) | |
# Ones form a Gaussian centered at (1, 1) | |
# epsilon is .1 |
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
document.onload = (function (d3, saveAs, Blob, undefined) { | |
"use strict"; | |
// define graphcreator object | |
let GraphCreator = function (svg, nodes, edges) { | |
let thisGraph = this; | |
thisGraph.idct = 0; | |
thisGraph.nodes = nodes || []; | |
thisGraph.edges = edges || []; |
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
document.onload = (function (d3, saveAs, Blob, undefined) { | |
"use strict"; | |
// define graphcreator object | |
let GraphCreator = function (svg, nodes, edges) { | |
let thisGraph = this; | |
thisGraph.idct = 0; | |
thisGraph.nodes = nodes || []; | |
thisGraph.edges = edges || []; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Non-overlapping Layout</title> | |
<style> | |
.node { | |
stroke: #fff; |
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
runtime: python37 | |
api_version: 1 | |
entrypoint: dfweb.py | |
handlers: | |
- url: /.* | |
script: dfweb.py |
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
SQLAlchemy==1.2.10 | |
https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.10.1-py3-none-any.whl | |
lark-parser | |
matplotlib==2.2.2 | |
Keras==2.2.0 | |
Flask_SocketIO==3.0.1 | |
numpy==1.14.5 | |
lime==0.1.1.32 | |
Flask_SQLAlchemy==2.3.2 | |
Flask_Login==0.4.1 |
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
$('select').on('change', function () { | |
$(this).find('option').attr('selected', false); | |
$(this).find('option[value=' + $(this).val() + ']').attr('selected', true); | |
}); |
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
$('select').on('change', function () { | |
$(this).find('option').attr('selected', false); | |
$(this).find(`option[value=${$(this).val()}]`).attr('selected', true); | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<link rel="stylesheet" href="cytocreator.css"/> | |
<link rel="stylesheet" href="cytoscape-context-menus.css"/> | |
</head> | |
<body> |
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
document.addEventListener('DOMContentLoaded', function () { | |
let selected_color = '#666666'; | |
let white = '#ffffff'; | |
let cy = cytoscape({ | |
// container: $('#cy'), // container to render in | |
container: document.getElementById('cy'), // container to render in | |
elements: [ // list of graph elements to start with | |
{ // node a |
OlderNewer