Setup ngrok and run TensorBoard on Colab
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
LOG_DIR = './log'
get_ipython().system_raw(
printenv | |
ifconfig -a | |
iptable -L | |
cat /etc/apache2/site-enabled/* | |
netstat -punta |
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") |
#!/bin/sh | |
set -x | |
# == Swarm training (alpha release) == | |
# Setup: | |
# | |
# git clone https://github.com/shawwn/gpt-2 | |
# cd gpt-2 | |
# git checkout dev-shard |
'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) => { |
# 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 |
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. |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; | |
db.on('error', function() { | |
return console.error.bind(console, 'connection error: '); | |
}); | |
Setup ngrok and run TensorBoard on Colab
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip ngrok-stable-linux-amd64.zip
LOG_DIR = './log'
get_ipython().system_raw(
from torch.utils.data import IterableDataset | |
class CustomIterableDataset(IterableDataset): | |
def __init__(self, filename): | |
#Store the filename in object's memory | |
self.filename = filename | |
#And that's it, we no longer need to store the contents in the memory |