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
# This code is under the MIT license. | |
# Inspired by this StackOverflow question: | |
http://stackoverflow.com/questions/3295405/creating-django-objects-with-a-random-primary-key | |
import struct | |
from Crypto.Cipher import DES | |
from django.db import models | |
def base36encode(number): |
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
def sift3(s1,s2, maxOffset): | |
s1L = len(s1) | |
s2L = len(s2) | |
if not s1: | |
return (not s2 and 0 or s2L) | |
if not s2: | |
return s1L | |
c1 = 0 | |
c2 = 0 | |
lcs = 0 |
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 shutil | |
import os | |
import sys | |
import subprocess | |
import re | |
# Settings | |
root_folder = 'C:/Users/Robert/Videos/YouTube/Playlists/' | |
destination_regex = re.compile(r'^\[download\] Destination: (.*)$', re.M) |
NewerOlder