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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
''' | |
Created on 2013-4-23 | |
@author: xweiyan | |
@modify by Ran | |
version 2.0 | |
main change: | |
1.add counter | |
2.sequence automatic increase |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import os | |
import sys | |
import shutil | |
import string | |
import tempfile | |
import time | |
from hls import load, parser |
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 threading | |
import time | |
# x = 0 | |
def write(text): | |
# global x | |
lock.acquire() | |
while 1: |
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
# -*- coding:utf-8 -*- | |
#!/usr/bin/python | |
import re | |
import math | |
import time | |
import os | |
import csv | |
import sys | |
import datetime |
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
# -*-coding: utf-8 -*- | |
import sys | |
import os | |
num = sys.argv[1] # num is the amount of *.ts files | |
def add(x): | |
"""'x' is the amount of *.ts | |
This function should add all other .ts combined into '1.ts' |
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
# -*- coding:utf-8 -*- | |
import re | |
import os | |
import csv | |
import sys | |
log_file = sys.argv[1] | |
# log_file = r"csv.log" | |
# csv_content = [] |
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
# -*-coding:utf-8 -*- | |
import time | |
def ListRepeat(list, duration): | |
""" | |
call ListRepeat(list, duration), result should be like below: | |
['0', '1', '2', '3', '4', '5'] | |
['1', '2', '3', '4', '5', '6'] | |
['2', '3', '4', '5', '6', '7'] |
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
# -*- coding:utf-8 -*- | |
import os | |
url_counter = 1 | |
file_will_opened = sys.argv[1] | |
m3u8_content = open(file_will_opened, "r") | |
new_file = open("hevc.m3u8", "wb") | |
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
# -*-coding:utf-8 -*- | |
import os | |
path = r"C:\Users\alex\Desktop\debug" | |
original_file = open(r"module.txt", "r") # read file | |
content = original_file.readlines() | |
def lib_list_without_so(yourdir): | |
""" Create a list which contains all the libs without '.so' |
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
# template for "Guess the number" mini-project | |
# input will come from buttons and an input field | |
# all output for the game will be printed in the console | |
import simplegui | |
import random | |
import math | |
# initialize global variables used in your code | |
num_range = 0 | |
num_guess = 0 |
NewerOlder