Skip to content

Instantly share code, notes, and snippets.

Avatar

Or Carmi liiight

View GitHub Profile
@liiight
liiight / awsaio_poc.py
Created Sep 22, 2020
two_progress_bars
View awsaio_poc.py
def download_data(s3_keys: List[Tuple[str, int]], total_size: int):
size_progress = Progress(
"{task.description}",
TextColumn("[bold blue]{task.fields[key]}", justify="right"),
BarColumn(),
DownloadColumn(),
TransferSpeedColumn(),
TimeRemainingColumn(),
)
keys_progress = Progress("{task.description}", BarColumn(), "{task.completed} of {task.total}")
View smart_imdb.py
from __future__ import unicode_literals, division, absolute_import
import logging
import re
from jsonschema.compat import str_types
from flexget import plugin
from flexget.event import event
from flexget.entry import Entry
from imdb import IMDb
@liiight
liiight / argparse_bot.py
Created Aug 28, 2016
Argparse Telegram bot
View argparse_bot.py
import argparse
from telegram.ext import Updater
from telegram.ext.commandhandler import CommandHandler
import logging
# Enable logging
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO)
View couchpotato.py
from __future__ import unicode_literals, division, absolute_import
from urlparse import urlparse
import logging
import requests
from flexget import plugin
from flexget.event import event
from flexget.entry import Entry
from flexget.utils import qualities
from requests import RequestException
@liiight
liiight / test_trakt_list.py
Created Mar 17, 2016
attempt at trakt set test
View test_trakt_list.py
from __future__ import unicode_literals, division, absolute_import
import pytest
from flexget.entry import Entry
from flexget.plugins.list.trakt_list import TraktSet
@pytest.mark.online
class TestTraktList(object):
@liiight
liiight / lazy_shrike.py
Created Feb 15, 2016
Delete stale movies by age
View lazy_shrike.py
import requests
from datetime import datetime
from dateutil import parser
from dateutil.relativedelta import relativedelta
host = '<HOST NAME>'
port = 7171
token = '<USER TOKEN>'
get_movies_endpoint = '/api/movie_queue/?page=1&max=1000&queue_name=default&is_downloaded=false&sort_by=added&order=desc'
View irc.py
from __future__ import unicode_literals, division, absolute_import
import re
import socket
import threading
from flexget.entry import Entry
import xml.etree.ElementTree as ET
import logging
from flexget.config_schema import register_config_key, format_checker