Table of Contents generated with DocToc
#!/bin/bash | |
# Used to create a Anaconda virtual environment for CUDA and TensorFlow. | |
# If you want to use this shell script, please read the blog. | |
# https://bluesmilery.github.io/blogs/a687003b/ | |
echo "" | |
echo "This script is used to create a Anaconda virtual environment for CUDA and TensorFlow." | |
echo "" | |
read -p "Enter the name of Anaconda virtual environment: " ENV_NAME |
Pre-reqs:
- Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
- On macOS:
- Install XCode from the Mac App Store (or install the XCode command line utils).
- Have homebrew installed
- On Linux:
Essentially just copy the existing video and audio stream as is into a new container, no funny business!
The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.
With ffmpeg
this can be achieved with -c copy
. Older examples may use -vcodec copy -acodec copy
which does the same thing.
These examples assume ffmpeg
is in your PATH
. If not just substitute with the full path to your ffmpeg binary.
#!/bin/bash | |
# download MS COCO dataset | |
# | |
# ref: http://mscoco.org/dataset/#download | |
echo "Downloading..." | |
wget http://msvocds.blob.core.windows.net/annotations-1-0-3/instances_train-val2014.zip && \ |
#Visual Studio Code的基本使用 全文翻译自[官方Docs][1]
Visual Studio Code的核心是一个代码编辑器。像许多其他代码编辑器一样,VS Code采用了普遍的UI设计,将显示所有可访问的文件及文件夹的目录树置于左侧,并将文件内容编辑器置于右侧。下面本篇将描述VS Code的几个独特之处。
译者注:NodeJS方面VS Code是Sublime很好的替代品,不妨试试
##文件与Project VS Code以文件、文件夹为基础——你可以通过VS Code打开文件夹来立即启动project。
VS Code可以读写不同框架或平台中不同类型的文件。即便你的VS Code同时打开了package.json
、 project.json
、tsconfig.json
甚至ASP.NET 5 Visual Studio的项目文件,VS Code仍然可以读取它们并为你提供相应的附加功能,如[IntelliSense][2]。
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |
SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.
apt-get install sshpass
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
特殊的shell变量: | |
$0 获取当前执行的shell脚本的文件名 | |
$n 获取当前执行的shell脚本的第n个参数值,n=1..9 | |
$* 获取当前shell的所有参数 “$1 $2 $3 …注意与$#的区别 | |
$# 获取当前shell命令行中参数的总个数 |