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 argparse | |
import subprocess | |
import sys | |
def do(id, tracker): | |
subprocess.call(["transmission-remote", "-t", id, "-td", tracker]) | |
def get(): | |
q = subprocess.check_output(["transmission-remote", "-l"]) | |
w = q.split("\n")[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
def acrost(x, reddit=False, rbold=False): | |
words = x.split(" ") | |
for word in words: | |
b = "#" if rbold else "" | |
print(b + word) | |
if reddit: | |
print("") | |
q = "\n" if reddit else "" | |
for letter in word[1:]: | |
print(b + letter + q) |
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 python3 | |
import datetime | |
from concurrent.futures import ThreadPoolExecutor | |
import requests | |
from bs4 import BeautifulSoup | |
def dateparse(datestring, format): | |
stamp = datetime.datetime.strptime(datestring, format) | |
return stamp.strftime("%Y %m %d") |
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 os | |
import shutil | |
import time | |
import win32api | |
import pythoncom | |
from win32com.shell import shell,shellcon | |
def win_copy_files(source,dest): | |
if not os.path.exists(dest): |
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 | |
import time | |
from itertools import product | |
from string import ascii_lowercase | |
from bs4 import BeautifulSoup | |
def RateLimited(maxPerSecond): # http://stackoverflow.com/questions/667508/whats-a-good-rate-limiting-algorithm/667706#667706 | |
minInterval = 1.0 / float(maxPerSecond) | |
def decorate(func): |
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 python3 | |
# -*- coding: utf-8 -*- | |
import requests | |
import json | |
def nuller(code): | |
return "null" if code is None else code | |
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 | |
def availability(url): | |
try: | |
avlty = requests.head(url) | |
status = int(avlty.status_code) | |
return status == 200 or 300 < status <= 308 | |
except requests.ConnectionError: | |
return False |
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
| |
package rim.escreens.security { | |
import flash.display.*; | |
import flash.errors.*; | |
import qnx.system.*; | |
import flash.filesystem.*; | |
public class EScreenSecurityData extends Sprite { | |
private static | |
const SYS_INFO: string = "/var/boottime.txt"; | |
private static |
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 bb.cascades 1.0 | |
Page { | |
property string dayofweek | |
property string day | |
property string month | |
property string year | |
Container { | |
Label { | |
id: datelabel |
NewerOlder