ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
This file contains hidden or 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
| pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U |
This file contains hidden or 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
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from time import clock | |
| class Timer(object): | |
| def __init__(self, verbose=False): | |
| self.verbose = verbose | |
| def __enter__(self): |
This file contains hidden or 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
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| int main(int argc, char* argv[]) | |
| { | |
| wifstream in; | |
| string filename; |
This file contains hidden or 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 random | |
| class Markov(object): | |
| def __init__(self, open_file): | |
| self.cache = {} | |
| self.open_file = open_file | |
| self.words = self.file_to_words() | |
| self.word_size = len(self.words) | |
| self.database() |
This file contains hidden or 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
| #include <stdio.h> | |
| #define ANSI_COLOR_RED "\x1b[31m" | |
| #define ANSI_COLOR_GREEN "\x1b[32m" | |
| #define ANSI_COLOR_YELLOW "\x1b[33m" | |
| #define ANSI_COLOR_BLUE "\x1b[34m" | |
| #define ANSI_COLOR_MAGENTA "\x1b[35m" | |
| #define ANSI_COLOR_CYAN "\x1b[36m" | |
| #define ANSI_COLOR_RESET "\x1b[0m" |
This file contains hidden or 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
| def lazyJsonParse(j): | |
| j = re.sub(r"{\s*'?(\w)", r'{"\1', j) | |
| j = re.sub(r",\s*'?(\w)", r',"\1', j) | |
| j = re.sub(r"(\w)'?\s*:", r'\1":', j) | |
| j = re.sub(r":\s*'(\w+)'\s*([,}])", r':"\1"\2', j) | |
| return json.loads(j) |
This file contains hidden or 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
| #include <algorithm> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <queue> | |
| using namespace std; | |
| class Huffman | |
| { | |
| public: | |
| int deep; //深度 |
This file contains hidden or 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
| #!/usr/bin/python | |
| import sys | |
| import random | |
| if len(sys.argv) == 3: | |
| input = open(sys.argv[2],'r') | |
| elif len(sys.argv) == 2: | |
| input = sys.stdin; | |
| else: | |
| sys.exit("Usage: python samplen.py <lines> <?file>") |
This file contains hidden or 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
| #-*- coding: utf-8 -*- | |
| """ | |
| 给定集合 test_case | |
| 输出其所有子集 | |
| """ | |
| def getsubs(father, size): | |
| """获取集合 father 的 | |
| 指定长度 size 的所有子集合""" |