This file contains 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 struct | |
#copy TEX data into TRS | |
track_face_format = '4H 3h 2B I' | |
track_texture_format = '2B' | |
track_face_size = struct.calcsize(track_face_format) | |
track_texture_size = struct.calcsize(track_texture_format) | |
def update_track_face(track_face_file, track_texture_file, output_file): |
This file contains 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 cv2 | |
import numpy | |
import math | |
import srt | |
import datetime | |
vidA = cv2.VideoCapture('movieA.mkv') #reference | |
vidB = cv2.VideoCapture('movieB.mkv') #to synchronize | |
with open('subtitles.srt', 'r') as f: #from fileA.mkv |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
namespace Test | |
{ | |
class Program | |
{ | |
static Random rand = new Random(); |
This file contains 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
function sort(a) { | |
var n = a.length; | |
for (var j = 0; j < n - 2; j++) { | |
for (var i = j + 1; i < n; i++) { | |
if (a[i] == a[j]) { | |
//swap | |
if (a[i] != a[j + 1]) { | |
var tmp = a[j + 1]; | |
a[j + 1] = a[i]; | |
a[i] = tmp; |