start new:
tmux
start new with session name:
tmux new -s myname
""" | |
Convert YouTube subtitles(vtt) to human readable text. | |
Download only subtitles from YouTube with youtube-dl: | |
youtube-dl --skip-download --convert-subs vtt <video_url> | |
Note that default subtitle format provided by YouTube is ass, which is hard | |
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which | |
is easier to process. |
#!/bin/sh | |
aria2c --dir=./ --input-file=urls.txt --max-concurrent-downloads=1 --connect-timeout=60 --max-connection-per-server=16 --split=16 --min-split-size=1M --human-readable=true --download-result=full --file-allocation=none | |
date | |
# Now create this file in the same directory and paste all urls in it: urls.txt | |
# -*- coding: utf-8 -*- | |
import re | |
import sys | |
def process_file(procnet): | |
sockets = procnet.split('\n')[1:-1] | |
return [line.strip() for line in sockets] | |
def split_every_n(data, n): |
var GB2260 = { | |
"110000": "北京市", | |
"110100": "北京市市辖区", | |
"110101": "北京市东城区", | |
"110102": "北京市西城区", | |
"110103": "北京市崇文区", | |
"110104": "北京市宣武区", | |
"110105": "北京市朝阳区", | |
"110106": "北京市丰台区", | |
"110107": "北京市石景山区", |
$ tmux --version | |
tmux: illegal option -- - | |
usage: tmux [-2CluvV] [-c shell-command] [-f file] [-L socket-name] | |
[-S socket-path] [command [flags]] | |
$ tmux --help | |
tmux: illegal option -- - | |
usage: tmux [-2CluvV] [-c shell-command] [-f file] [-L socket-name] | |
[-S socket-path] [command [flags]] |
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) { | |
/******/ return installedModules[moduleId].exports; |
# Copyright (c) The Open University, 2017 | |
# Copyright (c) Jupyter Development Team. | |
# Distributed under the terms of the Modified BSD License. | |
# Custom bundler extensions API: | |
# http://jupyter-notebook.readthedocs.io/en/latest/extending/bundler_extensions.html | |
# Requires: _jupyter_bundlerextension_paths(), bundle() | |
# Based on: https://github.com/jupyter-incubator/dashboards_bundlers/ |
var util=require('util') | |
var WebSocketClient = require('websocket').client; | |
var client = new WebSocketClient(); | |
var conn = null | |
var received = false | |
client.on('connectFailed', function(error) { | |
console.log('Connect Error: ' + error.toString()); | |
}); |
File "/Users/mitsuhiko/Development/jinja2/tests/conftest.py", line 17, in <module> | |
from jinja2 import loaders | |
File "/Users/mitsuhiko/Development/jinja2/jinja2/__init__.py", line 80, in <module> | |
_patch_async() | |
File "/Users/mitsuhiko/Development/jinja2/jinja2/__init__.py", line 76, in _patch_async | |
from jinja2.asyncsupport import patch_all | |
File "/Users/mitsuhiko/Development/jinja2/jinja2/asyncsupport.py", line 13, in <module> | |
import asyncio | |
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/__init__.py", line 49, in <module> | |
from .unix_events import * # pragma: no cover |