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 urllib | |
import urllib2 | |
import cookielib | |
LOGIN, PASSWORD = 'username', 'password' | |
cookie = cookielib.CookieJar() |
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 sys, subprocess | |
# Get LAME bundler for Windows from | |
# http://www.rarewares.org/mp3-lame-bundle.php | |
cmd = 'lame --preset insane %s' % sys.argv[1] | |
subprocess.call(cmd, shell=True) |
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
from mutagen.mp3 import MP3 | |
from mutagen.id3 import ID3, APIC, error | |
audio = MP3('music.mp3', ID3=ID3) | |
# add ID3 tag if it doesn't exist | |
try: | |
audio.add_tags() | |
except error: | |
pass |
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 | |
from pydub import AudioSegment | |
podcast = AudioSegment.from_wav("Recording.wav") | |
podcast.export("podcast_processed.mp3") |
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 | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
For use on Android install APK SL4A + PythonForAndroid | |
https://code.google.com/p/android-scripting/ | |
""" |
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/python | |
#eMonitor by Kranu | |
#Version 2 (9-1-2011) | |
#Tested on Windows 7 x64, Python 2.7.2, wxPython 2.8 | |
#For more information, see: http://www.mobileread.com/forums/showthread.php?p=1726641#post1726641 | |
# need wxPython | |
# http://www.wxpython.org/download.php#stable |
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 | |
#################### | |
# Generate json with changes in WebDAV folder (or other folder) | |
# | |
# used some code from: http://thomassileo.com/blog/2013/12/12/tracking-changes-in-directories-with-python/ | |
# tested with python 2.7 | |
# | |
# edit crontab: sudo crontab -e | |
# example: */1 * * * * /path-to-script/main.py |
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 requests | |
from requests.auth import HTTPDigestAuth | |
import sys | |
if __name__ == '__main__': | |
fname = sys.argv[0] | |
with open(fname) as f: | |
payload = f.read() |
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 sys | |
import json | |
if sys.version_info < (3, 0, 0): | |
from codecs import open | |
try: |
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 sys | |
tasks = set() | |
pattern = re.compile(r"/\w+") | |
def del_task(text): | |
global tasks |
OlderNewer