Setup ngrok and run TensorBoard on Colab
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zipLOG_DIR = './log'
get_ipython().system_raw(Setup ngrok and run TensorBoard on Colab
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zipLOG_DIR = './log'
get_ipython().system_raw(| var mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/test'); | |
| var db = mongoose.connection; | |
| db.on('error', function() { | |
| return console.error.bind(console, 'connection error: '); | |
| }); | |
| while ps auxw | grep '[m]yscript'; do sleep 30; done | stdbuf -o0 uniq | ts | |
| # Monitor changes in memory usage of myscript and timestamp the lines using ts. stdbuf -o0 turns off output buffering. [m] in the grep expression prevents the grep process line itself from being matched. |
| # Easy Steps to persist Kaggle profile by @mrm8488 (Manuel Romero) | |
| # Download kaggle.json from Kaggle -- MyAccount -> Create New API Token -> auto downloads as "kaggle.json | |
| # Import json into notebook - run in a cell | |
| from google.colab import files | |
| files.upload() | |
| # Browse to downloaded kaggle.json and upload |
| 'use strict' | |
| var express = require('express'); | |
| var app = express(); | |
| var mcache = require('memory-cache'); | |
| app.set('view engine', 'jade'); | |
| var cache = (duration) => { | |
| return (req, res, next) => { |
| #!/bin/sh | |
| set -x | |
| # == Swarm training (alpha release) == | |
| # Setup: | |
| # | |
| # git clone https://github.com/shawwn/gpt-2 | |
| # cd gpt-2 | |
| # git checkout dev-shard |
| import pdftotext | |
| from gtts import gTTS | |
| from sys import argv | |
| with open(argv[1], "rb") as f: | |
| pdf = pdftotext.PDF(f) | |
| document= "\n\n".join(pdf) | |
| tts = gTTS(document) | |
| print("Saving Audio file") | |
| tts.save(argv[1]+".mp3") |
| printenv | |
| ifconfig -a | |
| iptable -L | |
| cat /etc/apache2/site-enabled/* | |
| netstat -punta |
| const array = (size,value = 0) => Array(size).fill(value); | |
| let a = array(n); | |
| const matrix = (rows,cols,value = 0) => Array(rows).fill(Array(cols).fill(value)); | |
| let m = matrix(r,c); |