sudo apt install -y build-essential libssl-dev zlib1g-dev
wget "http://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.4p1.tar.gz"
tar xfz openssh-7.4p1.tar.gz
cd openssh-7.4p1
./configure
make
sudo make install| import os | |
| descriptors = list() | |
| def getString(): | |
| test_file = "nvidia-smi -q --gpu=0 | tail -23" | |
| try: | |
| p = os.popen(test_file, 'r') | |
| return p.read() | 
| #!/bin/bash | |
| # scp-speed-test.sh | |
| # Author: Alec Jacobson alecjacobsonATgmailDOTcom | |
| # http://www.alecjacobson.com/weblog/?p=635 | |
| # | |
| # Test ssh connection speed by uploading and then downloading a 10000kB test | |
| # file (optionally user-specified size) | |
| # | |
| # Usage: | |
| # ./scp-speed-test.sh user@hostname [test file size in kBs] | 
| """Simple example on how to log scalars and images to tensorboard without tensor ops. | |
| License: BSD License 2.0 | |
| """ | |
| __author__ = "Michael Gygli" | |
| import tensorflow as tf | |
| from StringIO import StringIO | |
| import matplotlib.pyplot as plt | |
| import numpy as np | 
| import argparse | |
| import os | |
| import shutil | |
| import time | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.parallel | |
| import torch.backends.cudnn as cudnn | |
| import torch.optim | 
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
| import torch | |
| from torch import nn | |
| __all__ = ['FCDenseNet', 'fcdensenet_tiny', 'fcdensenet56_nodrop', | |
| 'fcdensenet56', 'fcdensenet67', 'fcdensenet103', | |
| 'fcdensenet103_nodrop'] | |
| class DenseBlock(nn.Module): | 
| from __future__ import print_function | |
| import requests | |
| import json | |
| import cv2 | |
| addr = 'http://localhost:5000' | |
| test_url = addr + '/api/test' | |
| # prepare headers for http request | |
| content_type = 'image/jpeg' | 
The fundamental unit in PyTorch is the Tensor. This post will serve as an overview for how we implement Tensors in PyTorch, such that the user can interact with it from the Python shell. In particular, we want to answer four main questions:
- How does PyTorch extend the Python interpreter to define a Tensor type that can be manipulated from Python code?
 - How does PyTorch wrap the C libraries that actually define the Tensor's properties and methods?
 - How does PyTorch cwrap work to generate code for Tensor methods?
 - How does PyTorch's build system take all of these components to compile and generate a workable application?
 
PyTorch defines a new package torch. In this post we will consider the ._C module. This module is known as an "extension module" - a Python module written in C. Such modules allow us to define new built-in object types (e.g. the Tensor) and to call C/C++ functions.
| .global main | |
| .func main | |
| main: | |
| LDR R0, =random_seed | |
| LDR R0, [R0] | |
| MOV R1, #num_elements | |
| BL _rng_loop | |
| LDR R0, =unordered_msg | |
| BL printf |