Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| #!/bin/bash | |
| # A simple test script to demonstrate how to find the | |
| # "absolute path" at which a script is running. Used | |
| # to avoid some of the pitfals of using 'pwd' or hard- | |
| # coded paths when running scripts from cron or another | |
| # directory. | |
| # | |
| # Try it out: | |
| # run the script from the current directory, then |
| #!/bin/bash | |
| # REQUIRES SUDO | |
| # Benchmark runner | |
| repeats=20 | |
| output_file='benchmark_results.csv' | |
| command_to_run='echo 1' | |
| run_tests() { | |
| # -------------------------------------------------------------------------- |
| import logging | |
| import pika | |
| from threading import Timer | |
| BATCH_SIZE = 100 | |
| LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) ' | |
| '-35s %(lineno) -5d: %(message)s') | |
| LOGGER = logging.getLogger(__name__) | |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| #!/usr/bin/env python3 | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| see: https://gist.github.com/UniIsland/3346170 | |
| """ | |
| #!/usr/bin/env bash | |
| # set -x | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "You must be root to run this script" | |
| exit 1 | |
| fi | |
| # Returns all available interfaces, except "lo" and "veth*". |
| import sys | |
| def get_size(obj, seen=None): | |
| """Recursively finds size of objects""" | |
| size = sys.getsizeof(obj) | |
| if seen is None: | |
| seen = set() | |
| obj_id = id(obj) | |
| if obj_id in seen: | |
| return 0 |
| #This software is a free software. Thus, it is licensed under GNU General Public License. | |
| #Python implementation to Smith-Waterman Algorithm for Homework 1 of Bioinformatics class. | |
| #Forrest Bao, Sept. 26 <http://fsbao.net> <forrest.bao aT gmail.com> | |
| # zeros() was origianlly from NumPy. | |
| # This version is implemented by alevchuk 2011-04-10 | |
| def zeros(shape): | |
| retval = [] | |
| for x in range(shape[0]): | |
| retval.append([]) |
Updated 4/11/2018
Here's my experience of installing the NVIDIA CUDA kit 9.0 on a fresh install of Ubuntu Desktop 16.04.4 LTS.
| import time | |
| import sys | |
| class ProgressBarPrinter: | |
| def __init__(self, width, step, stream, fname): | |
| self.width = width | |
| self.block_progress = 0 | |
| self.current_progress = 0 | |
| self.start_time = time.time() |