I hereby claim:
- I am oliver2213 on github.
- I am oliver2213 (https://keybase.io/oliver2213) on keybase.
- I have a public key ASBQ3zZt4sHKF4fXS8Fxu5d67FLooKaf2MV2NzREefHVxwo
To claim this, I am signing this object:
# Given a string of letters, output all the english word permutations of those letters. | |
# pip install click pyenchant | |
from itertools import permutations | |
import sys | |
import click | |
try: | |
import enchant | |
except ImportError: | |
enchant = None |
I hereby claim:
To claim this, I am signing this object:
Sometimes, when I fork a repository I do it just to mess around with the code to see if I can come up with any useful features to eventually PR into upstream/master. Other times (when a repository hasn't been committed to in a while), I'll fork it to merge outstanding pull requests from upstream. There is a way to do this from the github website, but it's (in my opinion) overly complicated and I much prefer a nice and easy commandline approach.
I figured this out by reading through this stackoverflow question (scroll down to see the answer in question), and am posting it in this gist so I'll have something to refer to in the future, as well as helping anyone who has a similar need for commandline simplisity.
For this to work, you must have at least 2 remotes, in this example "origin" is your fork of the
#!/usr/bin/env python | |
# quick browser link printer | |
# outputs to browser.log in home directory by default | |
import sys | |
import os | |
import datetime | |
import psutil |
def list_all_torrents(client): | |
"""Given a valid transmission RPC client instance, lists all torrents and the progress of each""" | |
bitmath.format_string = "{value:.2f} {unit}" | |
for torrent in client.get_torrents(): | |
print("Torrent %d, %s. Status: %s. Progress: %s percent. Download rate: %s, upload rate: %s, Total size: %s, downloaded: %s, uploaded: %s." %(torrent.id, torrent.name, torrent.status, round(torrent.progress, 3), bitmath.Byte(torrent.rateDownload).best_prefix(), bitmath.Byte(torrent.rateUpload).best_prefix(), bitmath.Byte(torrent.totalSize).best_prefix(), bitmath.Byte(torrent.downloadedEver).best_prefix(), bitmath.Byte(torrent.uploadedEver).best_prefix())) |