Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
OutputArea.prototype.append_svg = function (svg, element) { | |
var toinsert = $("<div/>").addClass("box-flex1 output_subarea output_svg"); | |
toinsert.append(svg); | |
element.append(toinsert); | |
// The <svg> tag cannot be made resizable so we wrap it in a resizable <div>. | |
// The problem with this is that we need to 1) set the initial size of the | |
// <div> based on the size of the <svg> and 2) we need to tie the size of the | |
// <div> and the <svg>. | |
var img = $('<div/>'); | |
img.html(svg); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 networkx as nx | |
import matplotlib as mat | |
# Builds a graphene sheet with the given number of rows and columns. | |
# The sheet has a defected column running through the optionally passed | |
# arg. Otherwise it defaults to the center. | |
def build_defected_graph(rows, columns, defect = 0): | |
g = nx.Graph() | |
if( columns <= 2 ): |
This file contains 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
============================ | |
Configuring IPython.parallel | |
============================ | |
This guide describes the steps needed to run IPython engines on Microsoft Azure to perform a parallel | |
computation in the Microsoft cloud. We assume (see above guide) that Python, IPython and PyZMQ have | |
been installed on a set of Azure compute nodes. | |
1. Install Python, IPython and PyZMQ on a system having open access to the internet. We used an | |
Ubuntu 11.04 system for this purpose. This system will run the IPython controller and the IPython |
This file contains 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
"""Solve the 1D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
# The total number of nodes | |
nodx = 3 | |
nody = 3 |
This file contains 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
"""Solve the 1D diffusion equation using CN and finite differences.""" | |
from time import sleep | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
# The total number of nodes | |
numx = 5 | |
numy = 5 |
This file contains 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
from numpy import * | |
from matplotlib.pyplot import * | |
from time import sleep | |
import numpy as np | |
import networkx as nx | |
dim = [3,2] |