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
def compute_random_walk(A, walk_length): | |
'''Compute random walk based on transition probabilities | |
Params: | |
A: Adjacency matrix (numpy array) | |
walk_length: The length of the walk (int) | |
Returns: | |
A list of indices passed by the walk | |
''' | |
passed_node_indices = [] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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
// Note: More information can be found here | |
// https://www.theiphonewiki.com/wiki/Models | |
import UIKit | |
public extension UIDevice { | |
var modelName: String { | |
var systemInfo = utsname() | |
uname(&systemInfo) | |
let machineMirror = Mirror(reflecting: systemInfo.machine) |