Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details>
tag!
<details>
Summary Goes Here
function isGenerator(x) { | |
return x != null && typeof x.next === "function" | |
} | |
function isFrame(x) { | |
return x != null && x._type_ === 'call_frame' | |
} | |
function call(genFunc, ...args) { |
echo 'deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /' > /etc/apt/sources.list.d/cuda.list | |
echo 'deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64 /' > /etc/apt/sources.list.d/nvidia-ml.list | |
apt-get update | |
apt-get install --force-yes -y nvidia-352 | |
apt-get install --force-yes -y cuda-7-5 cuda-command-line-tools-7-5 cuda-core-7-5 cuda-cublas-7-5 cuda-cublas-dev-7-5 cuda-cudart-7-5 cuda-cudart-dev-7-5 cuda-cufft-7-5 cuda-cufft-dev-7-5 cuda-curand-7-5 cuda-curand-dev-7-5 cuda-cusolver-7-5 cuda-cusolver-dev-7-5 cuda-cusparse-7-5 cuda-cusparse-dev-7-5 cuda-documentation-7-5 cuda-driver-dev-7-5 cuda-gdb-src-7-5 cuda-ld-conf-7-5 cuda-license-7-5 cuda-minimal-build-7-5 cuda-misc-headers-7-5 cuda-npp-7-5 cuda-npp-dev-7-5 cuda-nvrtc-7-5 cuda-nvrtc-dev-7-5 cuda-runtime-7-5 cuda-samples-7-5 cuda-toolkit-7-5 cuda-visual-tools-7-5 | |
apt-get install -y build-essential python-dev python-virtualenv python-pip | |
apt-get install -y libatlas-dev liblapack-dev | |
ap |
from __future__ import print_function | |
import ctypes | |
import threading | |
import time | |
def async_raise(thread_obj, exception): | |
""" Raises an exception inside an arbitrary active :class:`~threading.Thread`. | |
Parameters |
#!/bin/sh | |
echo "installing fonts at $PWD to ~/.fonts/" | |
mkdir -p ~/.fonts/adobe-fonts/source-code-pro | |
git clone https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro | |
# find ~/.fonts/ -iname '*.ttf' -exec echo \{\} \; | |
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro | |
echo "finished installing" |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
import numpy | |
import theano | |
from theano import tensor as T | |
from theano.sandbox import rng_mrg | |
class EquiSGD(object): | |
"""Equilibrated SGD (eSGD). | |
Parameters |
#! /usr/bin/python | |
# | |
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# <Gnonthgol@gmail.com> wrote this file. As long as you retain this notice you | |
# can do whatever you want with this stuff. If we meet some day, and you think | |
# this stuff is worth it, you can buy me a beer in return Gnonthgol | |
# ---------------------------------------------------------------------------- | |
# |
from subprocess import Popen, PIPE | |
import pty | |
import os | |
from select import select | |
import sys | |
import tty | |
master, slave = pty.openpty() | |
p = Popen(['python'], stdin=slave, stdout=PIPE, stderr=PIPE) | |
pin = os.fdopen(master, 'w') |
#!/usr/bin/env python | |
# liuw | |
# Nasty hack to raise exception for other threads | |
import ctypes # Calm down, this has become standard library since 2.5 | |
import threading | |
import time | |
NULL = 0 |