This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -x | |
# == Swarm training (alpha release) == | |
# Setup: | |
# | |
# git clone https://github.com/shawwn/gpt-2 | |
# cd gpt-2 | |
# git checkout dev-shard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printenv | |
ifconfig -a | |
iptable -L | |
cat /etc/apache2/site-enabled/* | |
netstat -punta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
body { | |
margin: 0; | |
height: 100vh; | |
width: 100vw; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Node.js readline & async iteration: | |
const fs = require('fs"); | |
const {createlnterface: ci} = | |
require('readline’); | |
async function logLines(ls) { | |
for await (const l of ls) { | |
console.log('>"' + l); |