Skip to content

Instantly share code, notes, and snippets.

View ragnraok's full-sized avatar
🎯
Focusing

RagnarokStack ragnraok

🎯
Focusing
View GitHub Profile
@ragnraok
ragnraok / iframe-probe.py
Created September 9, 2019 07:24 — forked from alastairmccormack/iframe-probe.py
Shows GOP structure for video file using ffmpeg --show-frames output
#!/usr/bin/env python
#
# Shows GOP structure of video file. Useful for checking suitability for HLS and DASH packaging.
# Example:
#
# $ iframe-probe.py myvideo.mp4
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
@ragnraok
ragnraok / app.py
Created March 28, 2013 13:59
WeiTranslator.py 利用微信平台的开放接口写的一个通过调用google翻译的API进行翻译的小工具,还有一些彩蛋神码的。。。
# -*- coding: utf-8 -*-
from flask import Flask, request, make_response
from translator import google_translate
from moe_pic import get_pict
from douban_music import get_music
from logging.handlers import RotatingFileHandler
import libxml2
import time
import logging
@ragnraok
ragnraok / simpleHDR.py
Last active December 11, 2015 21:49
Simple HDR image filter implementation
import cv
import sys
input_img_name = sys.argv[1]
output_img_name = sys.argv[2]
input_img = cv.LoadImage(input_img_name, cv.CV_LOAD_IMAGE_COLOR)
# blur the image
dst = cv.CreateImage(cv.GetSize(input_img), input_img.depth, input_img.channels)
@ragnraok
ragnraok / signal_and_slot.py
Created October 30, 2012 06:03
PyQt4SingalAndSlot
# -*- coding: utf8 -*-
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class Form(QDialog):
def __init__(self, parent=None):