Skip to content

Instantly share code, notes, and snippets.

@Koasing
Koasing / download.py
Created May 16, 2018 09:34
pytube download script
#!/usr/bin/env python3
import argparse
from pytube import YouTube
def download(url):
def progress_callback(stream, chunk, file_handle, bytes_remaining):
# this function is called by download process... do not call directly!
total_size = stream.filesize
downloaded_size = total_size - bytes_remaining
@Koasing
Koasing / TComPicYuv.natvis
Created August 24, 2016 01:37
Image Watch natvis for HEVC HM Reference Software
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" MenuName="Add to Image Watch"/>
<Type Name="TComPicYuv">
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
</Type>
<Type Name="TComPicYuv">
<DisplayString Condition="m_chromaFormatIDC == CHROMA_400">{{TComPicYuv YUV400 {m_iPicWidth} x {m_iPicHeight} x {m_chromaFormatIDC}}}</DisplayString>
from datetime import datetime
from urllib.parse import quote
from xml.etree import ElementTree
import json
import base64
import os
import os.path
import re