First, install desktop environment and vncsever
sudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vnc4server
| import itertools | |
| import copy | |
| ### Example usage ### | |
| # In [13]: import pprint | |
| # ...: master_hp_dict = dict(anneal_KLD=Expand(True, False), bs=1024, n_epochs=Expand(2, 10, 20), mlp=[10,30]) | |
| # ...: hp_list = dict_expand(master_hp_dict) | |
| # ...: pprint.pprint(hp_list) | |
| # [{'anneal_KLD': True, 'bs': 1024, 'mlp': [10, 30], 'n_epochs': 2}, | |
| # {'anneal_KLD': True, 'bs': 1024, 'mlp': [10, 30], 'n_epochs': 10}, |
| #!/bin/bash | |
| # | |
| # DESCRIPTION: | |
| # | |
| # Set the bash prompt according to: | |
| # * the active virtualenv | |
| # * the branch/status of the current git repository | |
| # * the return value of the previous command | |
| # * the fact you just came from Windows and are used to having newlines in | |
| # your prompts. |
| import numpy as np | |
| class Node(object): | |
| """ | |
| Base class for nodes in the network. | |
| Arguments: | |
| `inbound_nodes`: A list of nodes with edges into this node. | |
| """ | |
| def __init__(self, inbound_nodes=[]): |
| from collections import defaultdict | |
| def build_graph(edge_list): | |
| graph = defaultdict(list) | |
| seen_edges = defaultdict(int) | |
| for src, dst, weight in edge_list: | |
| seen_edges[(src, dst, weight)] += 1 | |
| if seen_edges[(src, dst, weight)] > 1: # checking for duplicated edge entries | |
| continue |