ssh
: Access a remote computer.
Examples:
$ ssh my_username@my.server.address
$ ssh dcuser@ip-address-at-amazonaws.com
[global] | |
device = cuda | |
floatX = float32 | |
compute_test_value = off | |
[cuda] | |
root = /usr/local/cuda |
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
name: envname | |
dependencies: | |
- python=3 | |
- package1 | |
- package2 | |
- pip | |
- pip: | |
- pypi_package1 | |
- pypi_package2 |
In [1]: import cupy as cp | |
In [2]: a = cp.array([1, 2, 3]) | |
In [3]: cp.shape(a) | |
--------------------------------------------------------------------------- | |
AttributeError Traceback (most recent call last) | |
<ipython-input-3-e2f1392629a9> in <module>() | |
----> 1 cp.shape(a) |
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=2.6 |
%load_ext autoreload
%autoreload 2
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import networkx as nx | |
import numpy as np | |
def generate_graph(): | |
num_nodes = np.random.randint(low=3, high=20) | |
G = nx.erdos_renyi_graph(n=num_nodes, p=0.3) | |
for n in G.nodes(): | |
value = np.random.randint(low=1, high=20) | |
G.node[n]['value'] = value | |
return G |
from pathlib import Path | |
import os | |
# We will use the example of creating a .directory under home. | |
home = Path.home() | |
dirname = home / '.dir' | |
if not dirname.exists(): | |
os.mkdir(dirname) |