start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| """ | |
| nsb_entropy.py | |
| June, 2011 written by Sungho Hong, Computational Neuroscience Unit, Okinawa Institute of | |
| Science and Technology | |
| May, 2019 updated to Python 3 by Charlie Strauss, Los Alamos National Lab | |
| This script is a python version of Mathematica functions by Christian Mendl |
| """ | |
| Three ways of computing the Hellinger distance between two discrete | |
| probability distributions using NumPy and SciPy. | |
| """ | |
| import numpy as np | |
| from scipy.linalg import norm | |
| from scipy.spatial.distance import euclidean |
This example pulls together various examples of work with trees in D3.js.
The panning functionality can certainly be improved in my opinion and I would be thrilled to see better solutions contributed.
One can do all manner of housekeeping or server related calls on the drop event to manage a remote tree dataset for example.
Dragging can be performed on any node other than root (flare). Dropping can be done on any node.
Panning can either be done by dragging an empty part of the SVG around or dragging a node towards an edge.
| import torch | |
| from torch import LongTensor | |
| from torch.nn import Embedding, LSTM | |
| from torch.autograd import Variable | |
| from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
| ## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium'] | |
| # | |
| # Step 1: Construct Vocabulary | |
| # Step 2: Load indexed data (list of instances, where each instance is list of character indices) |