prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
return self._name
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
raise NotImplementedError
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
raise NotImplementedError
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
if self.value() is not None: return self._register_fmt[self.size()] % self.value() chars_per_byte = 2 return ''.join(['-' * (self.size() * chars_per_byte)])
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
class StaticRegister(type(register), object): def __init__(self, name): super(StaticRegister, self).__init__(name) self._size = register.size() self._value = register.value() def size(self): return self._size def value(self): retu...
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
def __init__(self, name): super(StaticRegister, self).__init__(name) self._size = register.size() self._value = register.value() def size(self): return self._size def value(self): return self._value
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
super(StaticRegister, self).__init__(name) self._size = register.size() self._value = register.value()
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
return self._size
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
return self._value
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
__metaclass__ = abc.ABCMeta def __init__(self, cpu_factory, registers): self._registers = OrderedDict() for group, register_list in registers.iteritems(): registers = OrderedDict([(x.name(), cpu_factory.create_register(self, x)) ...
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
self._registers = OrderedDict() for group, register_list in registers.iteritems(): registers = OrderedDict([(x.name(), cpu_factory.create_register(self, x)) for x in register_list]) self._registers[group]...
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
raise NotImplementedError
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
for register_dict in self._registers.itervalues(): if name in register_dict: return register_dict[name] return None
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
return self._registers.iteritems()
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
raise NotImplementedError
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
raise NotImplementedError
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
__metaclass__ = abc.ABCMeta def create_cpu(self, architecture): assert architecture in _cpu_map return _cpu_map.get(architecture, None)(self) @abc.abstractmethod def create_register(self, cpu, register): raise NotImplementedError
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
assert architecture in _cpu_map return _cpu_map.get(architecture, None)(self)
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
raise NotImplementedError
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
def __init__(self, cpu_factory): self._cpu_factory = cpu_factory self._cpus = {} def get_cpu(self, architecture): if architecture in self._cpus: return self._cpus[architecture] cpu = self._cpu_factory.create_cpu(architecture) self._cpus[architecture] = cpu ...
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
self._cpu_factory = cpu_factory self._cpus = {}
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
if architecture in self._cpus: return self._cpus[architecture] cpu = self._cpu_factory.create_cpu(architecture) self._cpus[architecture] = cpu return cpu
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
_cpu_map[cls.architecture()] = cls return cls
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
return self._register_fmt[self.size()] % self.value()
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
return register_dict[name]
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
return self._cpus[architecture]
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
__init__
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
name
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
size
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
value
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
str
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
create_static_register
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
__init__
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
size
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
value
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
__init__
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
architecture
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
register
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
registers
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
stack_pointer
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
program_counter
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
create_cpu
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
create_register
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
__init__
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
get_cpu
<|file_name|>cpu.py<|end_file_name|><|fim▁begin|># (void)walker hardware platform support # Copyright (C) 2012-2013 David Holm <dholmster@gmail.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
register_cpu
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
def hittest(self, pt): x, y = pt
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
def overlay(self, component, gc, *args, **kw): if self.ox: self.x = self.ox - self.offset_x self.y = self.oy - self.offset_y super(FlowPlotLabel, self).overlay(component, gc, *args, **kw) def hittest(self, pt): x, y = pt w...
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
if self.ox: self.x = self.ox - self.offset_x self.y = self.oy - self.offset_y super(FlowPlotLabel, self).overlay(component, gc, *args, **kw)
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
x, y = pt w, h = self.get_preferred_size() return abs(x - self.x) < w and abs(y - self.y) < h
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
pass
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
""" this label repositions itself if doesn't fit within the its component bounds. """ constrain_x = Bool(True) constrain_y = Bool(True) # position_event=Event id = Str # _ox=None # def _draw(self, gc, **kw): # self.font='modern 18' # gc.set_font(self.font) ...
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
self.font.face_name = "" super(FlowDataLabel, self).overlay(component, gc, *args, **kw)
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
DataLabel.do_layout(self, **kw) ws, hs = self._cached_line_sizes.T if self.constrain_x: w = max(ws) d = self.component.x2 - (self.x + w + 3 * self.border_padding) if d < 0: self.x += d self.x = max((self.x, 0)) if self.con...
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
self.x = self.ox - self.offset_x self.y = self.oy - self.offset_y
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
w = max(ws) d = self.component.x2 - (self.x + w + 3 * self.border_padding) if d < 0: self.x += d self.x = max((self.x, 0))
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
self.x += d
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
h = max(hs) self.y = max((self.y, 0)) yd = self.component.y2 - h - 2 * self.border_padding - self.line_spacing self.y = min((self.y, yd))
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
overlay
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
hittest
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
overlay
<|file_name|>flow_label.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
do_layout
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup import sys if sys.version_info < (2, 6): raise Exception('Wiggelen requires Python 2.6 or higher.') install_requires = [] # Python 2.6 does not include the argparse module. try: import argparse except ImportError: i...
packages=['wiggelen'], install_requires=install_requires, entry_points = { 'console_scripts': ['wiggelen = wiggelen.commands:main']
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup import sys if sys.version_info < (2, 6): <|fim_middle|> install_requires = [] # Python 2.6 does not include the argparse module. try: import argparse except ImportError: install_requires.append('argparse') # P...
raise Exception('Wiggelen requires Python 2.6 or higher.')
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup import sys if sys.version_info < (2, 6): raise Exception('Wiggelen requires Python 2.6 or higher.') install_requires = [] # Python 2.6 does not include the argparse module. try: import argparse except ImportError: i...
value = value.strip('[]()') value = '.'.join(x.strip(' \'"') for x in value.split(','))
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup import sys if sys.version_info < (2, 6): raise Exception('Wiggelen requires Python 2.6 or higher.') install_requires = [] # Python 2.6 does not include the argparse module. try: import argparse except ImportError: i...
value = value.strip('\'"')
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from test_support import * <|fim▁hole|>prove_all(prover=["plop"], opt=["--why3-conf=test.conf"])<|fim▁end|>
# this test calls a prover which is correctly configured but whose execution # gives an error (here: the prover executable doesn't exist). The intent is to # test the output of gnatprove in this specific case
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
size = convert_size(torrent_size) or -1 except (AttributeError, TypeError): continue
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
def __init__(self): super().__init__("Pretome") self.username = None self.password = None self.pin = None self.minseed = 0 self.minleech = 0 self.urls = { "base_url": "https://pretome.info", "login": "https://pretome.info/takelogin.p...
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
super().__init__("Pretome") self.username = None self.password = None self.pin = None self.minseed = 0 self.minleech = 0 self.urls = { "base_url": "https://pretome.info", "login": "https://pretome.info/takelogin.php", "detail"...
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
if not self.username or not self.password or not self.pin: logger.warning("Invalid username or password or pin. Check your settings") return True
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
if any(dict_from_cookiejar(self.session.cookies).values()): return True login_params = {"username": self.username, "password": self.password, "login_pin": self.pin} response = self.get_url(self.urls["login"], post_data=login_params, returns="text") if not response: ...
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
results = [] if not self.login(): return results for mode in search_params: items = [] logger.debug(_("Search Mode: {mode}".format(mode=mode))) for search_string in search_params[mode]: if mode != "RSS": logger...
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.warning("Invalid username or password or pin. Check your settings")
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
return True
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.warning("Unable to connect to provider") return False
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.warning("Invalid username or password. Check your settings") return False
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
return results
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.debug(_("Search String: {search_string}".format(search_string=search_string)))
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
continue
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.debug("Data returned from provider does not contain any torrents") continue
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.exception("Could not find table of torrents") continue
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
title = link["title"]
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
title = link.contents[0]
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
torrent_size = cells[7].text size = convert_size(torrent_size) or -1
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
continue
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
if mode != "RSS": logger.debug( "Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format( title, seeders, leechers ...
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.debug( "Discarding torrent because it doesn't meet the minimum seeders or leechers: {0} (S:{1} L:{2})".format( title, seeders, leechers ) ...
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
logger.debug("Found result: {0} with {1} seeders and {2} leechers".format(title, seeders, leechers))
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
__init__
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
_check_auth
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
login
<|file_name|>pretome.py<|end_file_name|><|fim▁begin|>import re import traceback from urllib.parse import quote from requests.utils import dict_from_cookiejar from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser...
search
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## ...
pass
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## ...
""" Load climate data from ISY device args: none internal function call """ if self.debug & 0x01: print("load_clim") clim_tree = self._getXMLetree("/rest/climate") self.climateinfo = dict() if clim_tree is None: return # Isy._printXML(self.climateinfo) ...
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## ...
pass
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## ...
""" returns dictionary of climate info """ if not self.climateinfo: self.load_clim() # # ADD CODE to check self.cachetime # return self.climateinfo
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## ...
""" Iterate though climate values args: None returns: Return an iterator over the climate values """ if not self.climateinfo: self.load_clim() k = self.climateinfo.keys() for p in k: yield self.climateinfo[p]
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## ...
print("load_clim")
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## ...
return