code
stringlengths
4
4.48k
docstring
stringlengths
1
6.45k
_id
stringlengths
24
24
class CapacityPool(Model): <NEW_LINE> <INDENT> _validation = { 'location': {'required': True}, 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, 'pool_id': {'readonly': True, 'max_length': 36, 'min_length': 36, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-...
Capacity pool resource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. :param location: Required. Resource location :type location: str :ivar id: Resource Id :vartype id: str :ivar name: Resource name :varty...
6259903fbe383301e0254a8d
class Node: <NEW_LINE> <INDENT> def __init__(self, i, N, f, p, d): <NEW_LINE> <INDENT> self.i = i <NEW_LINE> self.x = normal(0, 1, [N, 1]) <NEW_LINE> self.f = f <NEW_LINE> self.Neighbours = [] <NEW_LINE> self.M = {} <NEW_LINE> self.d_T = d <NEW_LINE> self.p = p <NEW_LINE> self.N_max = 5000 <NEW_LINE> <DEDENT> def final...
This class is the implementation of a single node in a Kalman Filter chain for PDMM It can calculate it's local loss and propogate messages to adjacent nodes
6259903f23e79379d538d774
class ResultOutOfRange(object): <NEW_LINE> <INDENT> implements(IFieldIcons) <NEW_LINE> adapts(IAnalysisRequest) <NEW_LINE> def __init__(self, context): <NEW_LINE> <INDENT> self.context = context <NEW_LINE> <DEDENT> def __call__(self, result=None, specification="lab", **kwargs): <NEW_LINE> <INDENT> workflow = getToolByN...
Return alerts for any analyses inside the context ar
6259903fdc8b845886d5482c
class PairLocalAccessBase(_GroupLocalAccess): <NEW_LINE> <INDENT> _cpp_get_data_method_name = "getPairData"
Class for directly accessing HOOMD-blue special pair data. Attributes: typeid ((N_pairs) `hoomd.data.array` object of ``float``): The type of special pair. members ((N_pairs, 3) `hoomd.data.array` object of ``int``): the tags of particles in a special pair. tag ((N_special_pairs) `hoomd.dat...
6259903fd6c5a102081e339b
class sfp_whois(SpiderFootPlugin): <NEW_LINE> <INDENT> opts = { } <NEW_LINE> optdescs = { } <NEW_LINE> results = list() <NEW_LINE> def setup(self, sfc, userOpts=dict()): <NEW_LINE> <INDENT> self.sf = sfc <NEW_LINE> self.results = list() <NEW_LINE> for opt in userOpts.keys(): <NEW_LINE> <INDENT> self.opts[opt] = userOpt...
Whois:Footprint,Investigate:Perform a WHOIS look-up on domain names and owned netblocks.
6259903f50485f2cf55dc1f9
class Action(GObject.Object, Loggable): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> GObject.Object.__init__(self) <NEW_LINE> Loggable.__init__(self) <NEW_LINE> <DEDENT> def asScenarioAction(self): <NEW_LINE> <INDENT> raise NotImplementedError()
Something which might worth logging in a scenario.
6259903f596a897236128ee9
class TestRandomPartSeven(unittest.TestCase): <NEW_LINE> <INDENT> @mock.patch('os.urandom', return_value='pumpkins') <NEW_LINE> def test_abc_urandom(self, urandom_function): <NEW_LINE> <INDENT> assert not urandom_function.called <NEW_LINE> assert os.urandom(5) == 'pumpkins' <NEW_LINE> assert os.urandom(5) == 'pumpkins'...
사실 가장 필요한 방법은 이 방법 인 것 같습니다. 그냥 리턴값 따로 명시를 해놓고...
6259903fbaa26c4b54d5051f
class Topic(TimestampMixin): <NEW_LINE> <INDENT> title = models.CharField(max_length=250) <NEW_LINE> slug = models.SlugField(max_length=100, default='', unique=True) <NEW_LINE> content = models.TextField() <NEW_LINE> def __unicode__(self): <NEW_LINE> <INDENT> return self.title <NEW_LINE> <DEDENT> def get_absolute_url(s...
A topic heads off each forum thread only admins can create a topic
6259903f26068e7796d4dbbd
class ExampleEnvironment(Environment): <NEW_LINE> <INDENT> _latex_name = 'exampleEnvironment' <NEW_LINE> packages = [Package('mdframed')]
A class representing a custom LaTeX environment. This class represents a custom LaTeX environment named ``exampleEnvironment``.
6259903f3c8af77a43b68877
class Cursor: <NEW_LINE> <INDENT> def __init__(self, model, spec=None, *args, **kwargs): <NEW_LINE> <INDENT> from .model import Model <NEW_LINE> self._order_entries = [] <NEW_LINE> self._query = spec <NEW_LINE> self._model = model <NEW_LINE> self._pycur = PyCursor(model._get_collection(), spec, *args, **kwargs) <NEW_LI...
A simple proxy to pymongo's Cursor class.
6259903fd99f1b3c44d06913
class SheetMeta(PyexcelObject): <NEW_LINE> <INDENT> @append_doc(docs.SAVE_AS_OPTIONS) <NEW_LINE> def save_as(self, filename, **keywords): <NEW_LINE> <INDENT> return save_sheet(self, file_name=filename, **keywords) <NEW_LINE> <DEDENT> def save_to_memory(self, file_type, stream=None, **keywords): <NEW_LINE> <INDENT> stre...
Annotate sheet attributes
6259903f287bf620b6272e61
class Config(object): <NEW_LINE> <INDENT> SECRET_KEY = "iECgbYWReMNxkRprrzMo5KAQYnb2UeZ3bwvReTSt+VSESW0OB8zbglT+6rEcDW9X" <NEW_LINE> SQLALCHEMY_DATABASE_URI = "mysql://root:root@127.0.0.1:3306/information" <NEW_LINE> SQLALCHEMY_TRACK_MODIFICATIONS = False <NEW_LINE> SQLALCHEMY_COMMIT_ON_TEARDOWN = True <NEW_LINE> REDIS...
项目的配置
6259903f507cdc57c63a6012
class DecodeError(Exception): <NEW_LINE> <INDENT> pass
The file could not be decoded by any backend. Either no backends are available or each available backedn failed to decode the file.
6259903f8da39b475be04466
@directory.register <NEW_LINE> class Icom746Radio(IcomCIVRadio): <NEW_LINE> <INDENT> MODEL = "746" <NEW_LINE> BAUD_RATE = 9600 <NEW_LINE> _model = "\x56" <NEW_LINE> _template = 102 <NEW_LINE> _num_banks = 1 <NEW_LINE> def _initialize(self): <NEW_LINE> <INDENT> self._classes["mem"] = DupToneMemFrame <NEW_LINE> self._rf....
Icom IC-746
6259903f711fe17d825e15d8
class InvalidCapsuleError(CapsuleLoadError): <NEW_LINE> <INDENT> pass
This is thrown when a capsule has the correct API compatibility version, but it still doesn't have the correct information on it.
6259903f15baa72349463209
class HostUserBind(models.Model): <NEW_LINE> <INDENT> host = models.ForeignKey("Host",on_delete=models.DO_NOTHING) <NEW_LINE> host_user = models.ForeignKey("HostUser",on_delete=models.DO_NOTHING) <NEW_LINE> def __str__(self): <NEW_LINE> <INDENT> return "%s-%s-%s"%(self.id,self.host,self.host_user) <NEW_LINE> <DEDENT> c...
绑定主机和用户
6259903fd99f1b3c44d06914
class PIDController(AbstractController): <NEW_LINE> <INDENT> def __init__(self, actuator_limits, ref_state, frequency, p_gain=None, i_gain=None, d_gain=None): <NEW_LINE> <INDENT> super(PIDController, self).__init__(actuator_limits) <NEW_LINE> self._ref_state = ref_state <NEW_LINE> self._acc_error = np.zeros_like(ref_st...
Simple implementation of a PID controller.
6259903fd53ae8145f9196d4
class SubmissionProcess(Base): <NEW_LINE> <INDENT> _page_title = 'Submit an App | Developer Hub | Mozilla Marketplace' <NEW_LINE> _continue_locator = (By.CSS_SELECTOR, '.continue.prominent') <NEW_LINE> _current_step_locator = (By.CSS_SELECTOR, '#submission-progress > li.current') <NEW_LINE> @property <NEW_LINE> def cur...
Base class that is available at every submission step
6259903f1d351010ab8f4d95
class XView: <NEW_LINE> <INDENT> def xview(self, *args): <NEW_LINE> <INDENT> res = self.tk.call(self._w, 'xview', *args) <NEW_LINE> if not args: <NEW_LINE> <INDENT> return self._getdoubles(res) <NEW_LINE> <DEDENT> <DEDENT> def xview_moveto(self, fraction): <NEW_LINE> <INDENT> self.tk.call(self._w, 'xview', 'moveto', fr...
Mix-in class for querying and changing the horizontal position of a widget's window.
6259903fd4950a0f3b11177c
class ReplyKeyboardMarkup(ReplyMarkup): <NEW_LINE> <INDENT> def __init__(self, keyboard, **kwargs): <NEW_LINE> <INDENT> self.keyboard = keyboard <NEW_LINE> self.resize_keyboard = bool(kwargs.get('resize_keyboard', False)) <NEW_LINE> self.one_time_keyboard = bool(kwargs.get('one_time_keyboard', False)) <NEW_LINE> self.s...
This object represents a Telegram ReplyKeyboardMarkup. Attributes: keyboard (List[List[:class:`telegram.KeyboardButton`]]): resize_keyboard (bool): one_time_keyboard (bool): selective (bool): Args: keyboard (List[List[str]]): **kwargs: Arbitrary keyword arguments. Keyword Args: resize_key...
6259903f07f4c71912bb06aa
class Inventory(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.contents = {} <NEW_LINE> <DEDENT> def add(self, item, qty=1): <NEW_LINE> <INDENT> self.contents[item] = ItemEntry(item, qty) <NEW_LINE> <DEDENT> def contains_enough(self, item): <NEW_LINE> <INDENT> if item in self.contents: <NEW_L...
Inventories are a set of item entries.
6259903f26068e7796d4dbbf
class TwoWayDict(dict): <NEW_LINE> <INDENT> def __setitem__(self, key, value): <NEW_LINE> <INDENT> if key in self: <NEW_LINE> <INDENT> del self[key] <NEW_LINE> <DEDENT> if value in self: <NEW_LINE> <INDENT> del self[value] <NEW_LINE> <DEDENT> dict.__setitem__(self, key, value) <NEW_LINE> dict.__setitem__(self, value, k...
dictionary which can be read as key: val or val: key.
6259903f73bcbd0ca4bcb503
@admin.register(models.TrackingEvent) <NEW_LINE> class TrackingEventAdmin(admin.ModelAdmin): <NEW_LINE> <INDENT> fields = ( "event_id", "package", "status", "carrier_code", "description", "timestamp", "location", ) <NEW_LINE> list_display = ( "event_id", "package", "status", "carrier_code", "description", "timestamp", ...
Admin for the tracking.TrackingEvent model.
6259903f6e29344779b018ca
class HtmlCalendarWeek(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> @property <NEW_LINE> def multi_day_bands(self): <NEW_LINE> <INDENT> raise NotImplementedError() <NEW_LINE> <DEDENT> @property <NEW_LINE> def single_day_bands(self): <NEW_LINE> <INDENT> raise NotImplement...
A single week of the calendar to be rendered
6259903f287bf620b6272e62
class ExportJobsOperationResultInfo(OperationResultInfoBase): <NEW_LINE> <INDENT> _validation = { 'object_type': {'required': True}, } <NEW_LINE> _attribute_map = { 'object_type': {'key': 'objectType', 'type': 'str'}, 'blob_url': {'key': 'blobUrl', 'type': 'str'}, 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, '...
This class is used to send blob details after exporting jobs. All required parameters must be populated in order to send to Azure. :ivar object_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :vartype object_...
6259903fd53ae8145f9196d5
class Game(GameABC): <NEW_LINE> <INDENT> class GameNotStartedException(TypeError): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __init__(self, starting_player=GameBoard.Players.UNKNOWN): <NEW_LINE> <INDENT> self.game_board = None <NEW_LINE> self.current_players_turn = None <NEW_LINE> self.starting_player = starting...
Provides games interface for player
6259903f8e71fb1e983bcd46
class Result(object): <NEW_LINE> <INDENT> def __init__(self, L, E, m, m2, corr): <NEW_LINE> <INDENT> self.L = L <NEW_LINE> self.energy_density = E <NEW_LINE> self.magnetisation = m <NEW_LINE> self.magnetisation_squared = m2 <NEW_LINE> self.correlation = corr
A place to store results of an experiment
6259903f07f4c71912bb06ab
class Order(models.Model): <NEW_LINE> <INDENT> user = models.ForeignKey(User, related_name='order', on_delete=models.CASCADE) <NEW_LINE> dish = models.ForeignKey(Dish, related_name='order', on_delete=models.CASCADE) <NEW_LINE> amount = models.IntegerField() <NEW_LINE> paid = models.BooleanField(default=False) <NEW_LINE...
User: point to the user object made this order Dish: point to the dish object of this order Amount: specify how many serves ordered Paid: whether this order has been paid
6259903f16aa5153ce401766
class BasicStem(CNNBlockBase): <NEW_LINE> <INDENT> def __init__(self, in_channels=3, out_channels=64, norm="BN"): <NEW_LINE> <INDENT> super().__init__(in_channels, out_channels, 4) <NEW_LINE> self.in_channels = in_channels <NEW_LINE> self.conv1 = Conv2d( in_channels, out_channels, kernel_size=3, stride=2, padding=1, bi...
The standard ResNet stem (layers before the first residual block).
6259903f21a7993f00c671e6
class MplData(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.img = None <NEW_LINE> self.WD = 12 <NEW_LINE> self.HG = 18 <NEW_LINE> <DEDENT> def read_img(self, name): <NEW_LINE> <INDENT> self.filename = name <NEW_LINE> self.img = cv2.imread(name) <NEW_LINE> <DEDENT> def save_img(self, name): <...
存放和处理图片数据的类
6259903f66673b3332c31672
class Quadric(SpatialFilter): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> SpatialFilter.__init__(self, radius=1.5) <NEW_LINE> <DEDENT> def weight(self, x): <NEW_LINE> <INDENT> if x < 0.75: <NEW_LINE> <INDENT> return 0.75 - x * x <NEW_LINE> <DEDENT> elif x < 1.5: <NEW_LINE> <INDENT> t = x - 1.5 <NEW_LI...
Quadric filter (radius = 1.5). Weight function:: | 0.0 ≤ x < 0.5: 0.75 - x*x w(x) = | 0.5 ≤ x < 1.5: 0.5 - (x-1.5)^2 | 1.5 ≤ x : 0
6259903f96565a6dacd2d8c7
class Edit(generic.edit.UpdateView): <NEW_LINE> <INDENT> template_name = 'identity/edit.html' <NEW_LINE> form_class = UserEditForm <NEW_LINE> success_url = reverse_lazy('homepage') <NEW_LINE> model = Identity <NEW_LINE> @method_decorator(never_cache) <NEW_LINE> @method_decorator(login_required) <NEW_LINE> def dispatch(...
User profile editing
6259903f8da39b475be04468
class AnnotatorDelete(BaseModel): <NEW_LINE> <INDENT> id: str
Fields information needed for Delete
6259903fb830903b9686edb6
class ShutdownClusters(mortartask.MortarClusterShutdownTask): <NEW_LINE> <INDENT> output_base_path = luigi.Parameter() <NEW_LINE> mongodb_output_collection_name = luigi.Parameter() <NEW_LINE> def requires(self): <NEW_LINE> <INDENT> return [SanityTestUICollection(output_base_path=self.output_base_path, mongodb_output_co...
When the pipeline is completed, shut down all active clusters not currently running jobs
6259903f6fece00bbacccc2a
class QueueStorage: <NEW_LINE> <INDENT> def __init__(self, loop, pool): <NEW_LINE> <INDENT> self.loop = loop <NEW_LINE> self.pool = pool <NEW_LINE> <DEDENT> def __len__(self) -> int: <NEW_LINE> <INDENT> return self.loop.run_until_complete(size(self.pool))
A mixin class to preserve compatability with asyncio.Queue which calls len(self._queue)
6259903f26238365f5faddd2
class CallInfo(object): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.call_info = {} <NEW_LINE> self.patched_func_names = [ 'setRange', 'setValue', 'setLabelText', 'show', 'close', 'labelText', 'setLabelText' ] <NEW_LINE> self.register_functions() <NEW_LINE> <DEDENT> def function_generator(self, name...
A class for completely patching other classes. CallInfo classes or derived classes will not function correctly but it will store the call info, that is it will store which function or method is called and what was the arguments.
6259903fd10714528d69efc9
class TableExtension(markdown.Extension): <NEW_LINE> <INDENT> def extendMarkdown(self, md, md_globals): <NEW_LINE> <INDENT> md.parser.blockprocessors.add('table', TableProcessor(md.parser), '<hashheader')
Add tables to Markdown.
6259903f1d351010ab8f4d98
class Message(Resource): <NEW_LINE> <INDENT> name = 'message' <NEW_LINE> version = 1 <NEW_LINE> class schema: <NEW_LINE> <INDENT> id = UUID(operators='equal') <NEW_LINE> request_id = UUID(nonempty=True, operators='equal') <NEW_LINE> author = UUID(nonnull=True, operators='equal') <NEW_LINE> occurrence = DateTime(utc=Tru...
A request message.
6259903f6e29344779b018cc
class ConnectionMonitorResult(msrest.serialization.Model): <NEW_LINE> <INDENT> _validation = { 'name': {'readonly': True}, 'id': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } <NEW_LINE> _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'id': {'key': 'id', 'type': '...
Information about the connection monitor. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: Name of the connection monitor. :vartype name: str :ivar id: ID of the connection monitor. :vartype id: str :param etag: A unique read-only string that changes whenever the res...
6259903f8e05c05ec3f6f798
class GroupList(APIView): <NEW_LINE> <INDENT> permission_classes = (ApiAuthRequired,) <NEW_LINE> def post(self, request): <NEW_LINE> <INDENT> params = request.DATA <NEW_LINE> groupname = params['name'] <NEW_LINE> group = CoreGroup.objects.create(name=groupname) <NEW_LINE> for user in params['user[]']: <NEW_LINE> <INDEN...
Every User is assigned to a Group of their own name initially. This 'usergroup' is then in charge of all the identities, providers, instances, and applications which can be shared among other, larger groups, but can still be tracked back to the original user who made the API request.
6259903f21bff66bcd723ee5
class Choice(Setting): <NEW_LINE> <INDENT> typename = 'choice' <NEW_LINE> def __init__(self, name, vallist, val, descriptions=None, uilist=None, **args): <NEW_LINE> <INDENT> assert type(vallist) in (list, tuple) <NEW_LINE> self.vallist = vallist <NEW_LINE> self.descriptions = descriptions <NEW_LINE> self.uilist = uilis...
One out of a list of strings.
6259903fbe383301e0254a93
class GraphBar(ur.Widget): <NEW_LINE> <INDENT> _sizing = frozenset([ur.FLOW]) <NEW_LINE> ignore_focus = True <NEW_LINE> def __init__(self, minimum=None, maximum=None, format=' {min}-{max}', delta=timedelta(minutes=1), chars=' ▁▂▃▄▅▆▇█', bar_align='<'): <NEW_LINE> <INDENT> super().__init__() <NEW_LINE> self.minimum = mi...
A right-to-left scrolling historical bar-chart plotting the median of each minute of a metric using unicode chars.
6259903fdc8b845886d54832
class ExtentionsManager(object): <NEW_LINE> <INDENT> EXTENTIONS = { "update-profile": UpdateProfile } <NEW_LINE> POST_RUN = set([ "update-profile" ]) <NEW_LINE> def __init__(self, options): <NEW_LINE> <INDENT> self._loaded_extentions = {} <NEW_LINE> self._options = options <NEW_LINE> <DEDENT> def _get_extention(self, n...
Manages the execution of extentions.
6259903f30c21e258be99a88
class TokenizerOverride(Model): <NEW_LINE> <INDENT> def __init__(self, character, tokenizer_class): <NEW_LINE> <INDENT> self._config = { "character": character, "tokenizer-class": tokenizer_class } <NEW_LINE> <DEDENT> def character(self): <NEW_LINE> <INDENT> return self._get_config_property('character') <NEW_LINE> <DED...
A tokenizer override.
6259903f4e696a045264e75f
class AttenMlpFinal(Module): <NEW_LINE> <INDENT> def __init__(self, in_features, hop, hidden=512, temperature=0.07, phi='atten', bias=False): <NEW_LINE> <INDENT> super(AttenMlpFinal, self).__init__() <NEW_LINE> self.in_features = in_features <NEW_LINE> self.hidden = hidden <NEW_LINE> self.temperature = temperature <NEW...
Simple GCN layer, similar to https://arxiv.org/abs/1609.02907
6259903fd6c5a102081e33a1
class Date(datetime): <NEW_LINE> <INDENT> format = DEFAULT_DATE_FORMAT <NEW_LINE> @property <NEW_LINE> def minutes(self): <NEW_LINE> <INDENT> return self.minute <NEW_LINE> <DEDENT> @property <NEW_LINE> def seconds(self): <NEW_LINE> <INDENT> return self.second <NEW_LINE> <DEDENT> @property <NEW_LINE> def microseconds(se...
A convenience wrapper for datetime.datetime with a default string format.
6259903f8a349b6b436874c2
class TimerRef: <NEW_LINE> <INDENT> def current_timing_method(self): <NEW_LINE> <INDENT> if self.ptr == None: <NEW_LINE> <INDENT> raise Exception("self is disposed") <NEW_LINE> <DEDENT> result = livesplit_core_native.Timer_current_timing_method(self.ptr) <NEW_LINE> return result <NEW_LINE> <DEDENT> def current_comparis...
A Timer provides all the capabilities necessary for doing speedrun attempts.
6259903fb57a9660fecd2cf7
class Solution: <NEW_LINE> <INDENT> def singleNumber(self, A): <NEW_LINE> <INDENT> result = A[0] <NEW_LINE> for a in A[1:]: <NEW_LINE> <INDENT> result ^= a <NEW_LINE> <DEDENT> return result
@param A: An integer array @return: An integer
6259903f097d151d1a2c22e2
class LinkManField(Base): <NEW_LINE> <INDENT> _fields_ = [ ('BrokerID', ctypes.c_char * 11), ('InvestorID', ctypes.c_char * 13), ('PersonType', ctypes.c_char), ('IdentifiedCardType', ctypes.c_char), ('IdentifiedCardNo', ctypes.c_char * 51), ('PersonName', ctypes.c_char * 81), ('Telephone', ctypes.c_char * 41), ('Addres...
联系人
6259903fe76e3b2f99fd9c88
class IpAddress(Model): <NEW_LINE> <INDENT> _attribute_map = { 'ip_address': {'key': 'ipAddress', 'type': 'str'}, } <NEW_LINE> def __init__(self, *, ip_address: str=None, **kwargs) -> None: <NEW_LINE> <INDENT> super(IpAddress, self).__init__(**kwargs) <NEW_LINE> self.ip_address = ip_address
Specifies the IP address of the network interface. :param ip_address: Specifies the IP address of the network interface. :type ip_address: str
6259903fd99f1b3c44d06919
class RGit2r(RPackage): <NEW_LINE> <INDENT> homepage = "https://github.com/ropensci/git2r" <NEW_LINE> url = "https://cran.r-project.org/src/contrib/git2r_0.18.0.tar.gz" <NEW_LINE> list_url = "https://cran.r-project.org/src/contrib/Archive/git2r" <NEW_LINE> version('0.18.0', 'fb5741eb490c3d6e23a751a72336f24d') <NEW...
Interface to the 'libgit2' library, which is a pure C implementation of the 'Git' core methods. Provides access to 'Git' repositories to extract data and running some basic 'Git' commands.
6259903fdc8b845886d54834
class nurbbank_zero_TestOutput(TestOutput): <NEW_LINE> <INDENT> __test__ = True <NEW_LINE> @classmethod <NEW_LINE> def setUpClass(self): <NEW_LINE> <INDENT> super(nurbbank_zero_TestOutput, self).setUpClass('huc12__60099.gms', 'huc12__60099.json')
Tests model generated output versus known static output.
6259903f30c21e258be99a8a
class CreateCourseHandler(Handler): <NEW_LINE> <INDENT> def render_create(self, name="", instructor="", description="", error=""): <NEW_LINE> <INDENT> self.render("create.html", name=name, instructor=instructor, description=description, error=error) <NEW_LINE> <DEDENT> def get(self): <NEW_LINE> <INDENT> self.render_cre...
Renders course creation template and adds course to db
6259903f66673b3332c31676
class NorGate(_SimpleCombinatorial): <NEW_LINE> <INDENT> def evaluate(self, a, b): <NEW_LINE> <INDENT> if (a == "1") or (b == "1"): <NEW_LINE> <INDENT> return "0" <NEW_LINE> <DEDENT> else: <NEW_LINE> <INDENT> return "1"
A Nor gate.
6259903f8da39b475be0446c
class plugin(object): <NEW_LINE> <INDENT> hooks = {} <NEW_LINE> name = "Feed parser" <NEW_LINE> commands = { } <NEW_LINE> def __init__(self, irc): <NEW_LINE> <INDENT> self.irc = irc <NEW_LINE> self.help = { } <NEW_LINE> self.settings_handler = yaml_loader(True, "feeds") <NEW_LINE> self.load() <NEW_LINE> <DEDENT> def lo...
Feed parser plugin. Used to notify channels of changes to feeds
6259903f1f5feb6acb163e71
class Parser: <NEW_LINE> <INDENT> host_url = 'http://coursefinder.utoronto.ca/course-search/search/' <NEW_LINE> course_codes = [] <NEW_LINE> def load_course_codes(self): <NEW_LINE> <INDENT> scraper = Scraper.Scraper() <NEW_LINE> url = Parser.host_url + 'courseSearch/course/search' <NEW_LINE> params = { 'requirements': ...
A parser to parse information of every course -- reference -- :see: https://docs.python.org/3/library/sys.html
6259903f6fece00bbacccc2e
class GitCommit(Command): <NEW_LINE> <INDENT> def invoked(self, ctx): <NEW_LINE> <INDENT> print("fake git commit") <NEW_LINE> <DEDENT> def register_arguments(self, parser): <NEW_LINE> <INDENT> parser.add_argument( '-m', '--message', metavar='<msg>', help="Use given <msg> as the commit message")
The 'git commit' command.
6259903f50485f2cf55dc202
class DbusWeakCallback (WeakCallback): <NEW_LINE> <INDENT> def object_deleted(self, wref): <NEW_LINE> <INDENT> if self.token: <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> self.token.remove() <NEW_LINE> <DEDENT> except: <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> finally: <NEW_LINE> <INDENT> self.token = None
Will use @token if set as follows: token.remove()
6259903f30dc7b76659a0ab0
class MemoryKVPRecord(KVPRecord): <NEW_LINE> <INDENT> def __init__(self, kvpid, d): <NEW_LINE> <INDENT> self._kvpid = kvpid <NEW_LINE> self._d = d <NEW_LINE> <DEDENT> @property <NEW_LINE> def key(self): <NEW_LINE> <INDENT> return self._kvpid.key <NEW_LINE> <DEDENT> @property <NEW_LINE> def index(self): <NEW_LINE> <INDE...
The record associated with :class:`MemoryKVPTable`
6259903fc432627299fa4240
class Mod(VBA_Object): <NEW_LINE> <INDENT> def __init__(self, original_str, location, tokens): <NEW_LINE> <INDENT> super(Mod, self).__init__(original_str, location, tokens) <NEW_LINE> self.arg = tokens[0][::2] <NEW_LINE> <DEDENT> def eval(self, context, params=None): <NEW_LINE> <INDENT> evaluated_args = eval_args(self....
VBA Modulo using the operator 'Mod'
6259903fb57a9660fecd2cf9
class ConvergenceStarterTests(SynchronousTestCase): <NEW_LINE> <INDENT> def test_start_convergence(self): <NEW_LINE> <INDENT> svc = ConvergenceStarter('my-dispatcher') <NEW_LINE> log = mock_log() <NEW_LINE> def perform(dispatcher, eff): <NEW_LINE> <INDENT> return succeed((dispatcher, eff)) <NEW_LINE> <DEDENT> d = svc.s...
Tests for :obj:`ConvergenceStarter`.
6259903f73bcbd0ca4bcb509
class ThreadedGenerator(GenericIterator): <NEW_LINE> <INDENT> def __init__(self, dps, classes, dim, batch_size=8, image_generator=None, extra_aug=False, shuffle=True, seed=173, data_mean=0.0, verbose=0, variable_shape=False, input_n=1, keep=False): <NEW_LINE> <INDENT> self.variable_shape = variable_shape <NEW_LINE> sel...
Generates batches of images, applies augmentation, resizing, centering...the whole shebang.
6259903f82261d6c52730803
@inside_glslc_testsuite('SpirvAssembly') <NEW_LINE> class TestHybridInputFiles(expect.ValidObjectFile): <NEW_LINE> <INDENT> shader1 = FileShader(empty_main_assembly(), '.spvasm') <NEW_LINE> shader2 = FileShader(empty_main(), '.vert') <NEW_LINE> shader3 = FileShader(empty_main(), '.frag') <NEW_LINE> glslc_args = ['-c', ...
Tests that glslc accepts a mix of SPIR-V assembly files and GLSL source files.
6259903f287bf620b6272e65
class WADLResolvableDefinition(WADLBase): <NEW_LINE> <INDENT> def __init__(self, application): <NEW_LINE> <INDENT> self._definition = None <NEW_LINE> self.application = application <NEW_LINE> <DEDENT> def resolve_definition(self): <NEW_LINE> <INDENT> if self._definition is not None: <NEW_LINE> <INDENT> return self._def...
A base class for objects whose definitions may be references.
6259903f50485f2cf55dc203
class QueryGenerator(object): <NEW_LINE> <INDENT> def __init__(self, user_limit=10000): <NEW_LINE> <INDENT> self._user_limit = user_limit <NEW_LINE> self._words_generator = RandomWords() <NEW_LINE> <DEDENT> def __next__(self): <NEW_LINE> <INDENT> return self.next() <NEW_LINE> <DEDENT> def next(self): <NEW_LINE> <INDENT...
Query rnadom generator to generate tuples (user_id, query_terms)
6259903f1f5feb6acb163e73
class GlozzDocument(Document): <NEW_LINE> <INDENT> def __init__(self, hashcode, unit, rels, schemas, text): <NEW_LINE> <INDENT> Document.__init__(self, unit, rels, schemas, text) <NEW_LINE> self.hashcode = hashcode <NEW_LINE> <DEDENT> def to_xml(self, settings=DEFAULT_OUTPUT_SETTINGS): <NEW_LINE> <INDENT> elm = ET.Elem...
Representation of a glozz document
6259903f711fe17d825e15dc
class SensorReading(object): <NEW_LINE> <INDENT> def __init__(self, reading, suffix): <NEW_LINE> <INDENT> self.broken_sensor_ids = {} <NEW_LINE> self.health = const.Health.Ok <NEW_LINE> self.type = reading['type'] <NEW_LINE> self.value = None <NEW_LINE> self.imprecision = None <NEW_LINE> self.states = [] <NEW_LINE> sel...
Representation of the state of a sensor. It is initialized by pyghmi internally, it does not make sense for a developer to create one of these objects directly. It provides the following properties: name: UTF-8 string describing the sensor units: UTF-8 string describing the units of the sensor (if numeric) value: Val...
6259903f379a373c97d9a2a9
class PrintCommandFailed(ValueError): <NEW_LINE> <INDENT> pass
Raised if copy command was successful, but printing file via ssh gave us an error (check 'lpquota' output on remote host to see if there isn't enough money to print)
6259903fbaa26c4b54d50529
class WhitePort: <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.session=DBSession <NEW_LINE> <DEDENT> def select_white_port(self): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> white_port_res = self.session.query(Whiteport.dst_port).all() <NEW_LINE> return white_port_res <NEW_LINE> <DEDENT> except Inva...
增删改查
6259903fd10714528d69efcc
class FireTVDevice(MediaPlayerDevice): <NEW_LINE> <INDENT> def __init__(self, proto, host, port, device, name): <NEW_LINE> <INDENT> self._firetv = FireTV(proto, host, port, device) <NEW_LINE> self._name = name <NEW_LINE> self._state = STATE_UNKNOWN <NEW_LINE> self._running_apps = None <NEW_LINE> self._current_app = Non...
Representation of an Amazon Fire TV device on the network.
6259903f1d351010ab8f4d9d
class ParseError(Exception): <NEW_LINE> <INDENT> def __init__(self, value): <NEW_LINE> <INDENT> self.value = "Parse Error: " + value <NEW_LINE> <DEDENT> def __str__(self): <NEW_LINE> <INDENT> return repr(self.value)
Class for parse-error exceptions
6259903f30dc7b76659a0ab2
class NoFullPacketError(Exception): <NEW_LINE> <INDENT> pass
Exception thrown when no full packet is available
6259903f097d151d1a2c22e6
class Communicator(object): <NEW_LINE> <INDENT> def __init__(self, afm_url): <NEW_LINE> <INDENT> self.logger = logging.getLogger("Communicator") <NEW_LINE> self.afm_url = afm_url <NEW_LINE> <DEDENT> def _post(self, path, json): <NEW_LINE> <INDENT> try: <NEW_LINE> <INDENT> r = post( self.afm_url + path, json=json ) <NEW...
Class to handle afm communication and to provide simple error handling interface for the agent application.
6259903f8e05c05ec3f6f79b
class StockAttribute(enum.Enum): <NEW_LINE> <INDENT> DEBT_TO_EQUITY = 'Total Debt/Equity (mrq)' <NEW_LINE> DIVIDEND_YIELD = '5 Year Average Dividend Yield 4' <NEW_LINE> EPS = 'Revenue Per Share (ttm)' <NEW_LINE> PE = 'Trailing P/E' <NEW_LINE> PROFIT_MARGIN = 'Profit Margin' <NEW_LINE> RETURN_ON_EQUITY = 'Return on Equi...
Yahoo Finance attribute names for stocks.
6259903f21bff66bcd723eeb
class Search(AbstractActionBase): <NEW_LINE> <INDENT> @classmethod <NEW_LINE> def subparser(cls, parent): <NEW_LINE> <INDENT> parser = parent.add_parser('search', help='search for images') <NEW_LINE> super().subparser(parser) <NEW_LINE> parser.add_argument( '--filter', '-f', action=FilterAction, help='Filter output bas...
Class for searching registries for an image.
6259903f63f4b57ef00866b5
class TestHistoricalTTController(BaseTestCase): <NEW_LINE> <INDENT> def test_historical_get(self): <NEW_LINE> <INDENT> query_string = [('start_point', 'start_point_example'), ('end_point', 'end_point_example'), ('start_datetime', '2013-10-20'), ('end_datetime', '2013-10-20')] <NEW_LINE> response = self.client.open('/v0...
HistoricalTTController integration test stubs
6259903fd6c5a102081e33a7
class Visualizer(object): <NEW_LINE> <INDENT> def __init__(self, env='default', **kwargs): <NEW_LINE> <INDENT> self.vis = visdom.Visdom(env=env, **kwargs) <NEW_LINE> self.index = {} <NEW_LINE> self.log_text = '' <NEW_LINE> <DEDENT> def reinit(self, env='default', **kwargs): <NEW_LINE> <INDENT> self.vis = visdom.Visdom(...
封装了visdom基本操作
6259903f3eb6a72ae038b8ec
class IndexHandler(tornado.web.RequestHandler): <NEW_LINE> <INDENT> def get(self, *args, **kwargs): <NEW_LINE> <INDENT> imgs = get_images('uploads') <NEW_LINE> self.render('index.html',imgs=imgs)
Homepage for users,photo feeds of follow
6259903f8a43f66fc4bf3412
class Client(models.Model): <NEW_LINE> <INDENT> user = models.OneToOneField(User, blank=True, null=True, on_delete=models.SET_NULL) <NEW_LINE> online = models.BooleanField(default=False) <NEW_LINE> last_update = models.DateTimeField(auto_now=True, null=True, blank=True) <NEW_LINE> created_on = models.DateTimeField(defa...
In this model we are tracking desktop client status. Is it online or is it in offline. So we can give user notifications.
6259903fd53ae8145f9196de
class DatasetEntry(urwid.WidgetWrap): <NEW_LINE> <INDENT> __metaclass__ = urwid.signals.MetaSignals <NEW_LINE> signals = ['selected'] <NEW_LINE> def __init__(self, dataset, path): <NEW_LINE> <INDENT> self.dataset = dataset <NEW_LINE> self.path = path <NEW_LINE> self.item = [ ('fixed', 15, urwid.Padding(urwid.AttrWra...
Single dataset entry in the list
6259903fbaa26c4b54d5052b
class seisan_M(): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.year = None <NEW_LINE> self.month = None <NEW_LINE> self.day = None <NEW_LINE> self.hour = None <NEW_LINE> self.minutes = None <NEW_LINE> self.seconds = None <NEW_LINE> self.latitude = None <NEW_LINE> self.longitude = None <NEW_LINE> sel...
Type M Line (Optional): Moment tensor solution. Note: the type M lines are pairs of lines with one line that gives the hypocenter time, and one line that gives the moment tensor values: The first moment tensor line: Columns Format Description 1:1 Free 2:5 I4 Year 7:8 I2 Month 9:10 I2 ...
6259903f29b78933be26aa04
class IOpenlayers(Interface): <NEW_LINE> <INDENT> pass
A layer specific to my product
62599040b57a9660fecd2cfd
class Person: <NEW_LINE> <INDENT> count = 1 <NEW_LINE> def run(self, distance, step): <NEW_LINE> <INDENT> print("人在跑") <NEW_LINE> return distance / step <NEW_LINE> <DEDENT> def __init__(self): <NEW_LINE> <INDENT> self.__name = "sz"
关于这个类的描述, 类的作用, 类的构造函数等等; 类属性的描述 Attributes: count: int 代表是人的个数
6259904071ff763f4b5e8a21
class ExitException(Exception): <NEW_LINE> <INDENT> pass
Exception thrown when we wish to exit, but no real errors occured
6259904082261d6c52730805
class MKServiceCommand(MKService): <NEW_LINE> <INDENT> def __init__(self, context, name, properties): <NEW_LINE> <INDENT> MKService.__init__(self, name, properties) <NEW_LINE> self.identity = uuid.uuid1() <NEW_LINE> self.socket = context.socket(zmq.DEALER) <NEW_LINE> self.socket.identity = str(self.identity).encode() <...
Class to interact with the MK service 'command'. The receiver keeps track of the service's state and the completion status of any commands that have been sent to MK.
62599040507cdc57c63a601e
@ddt <NEW_LINE> class Test_Goods(unittest.TestCase): <NEW_LINE> <INDENT> def setUp(self) : <NEW_LINE> <INDENT> self.host = 'https://pbsapi.aikenong.com.cn/boss/' <NEW_LINE> self.token = base.get_token_akn() <NEW_LINE> self.header = {'Authorization': "JWT " + self.token} <NEW_LINE> <DEDENT> def test01_goods(self): <NEW_...
农资总览
62599040dc8b845886d54839
class UserList(APIView): <NEW_LINE> <INDENT> def get(self, request, format=None): <NEW_LINE> <INDENT> users = User.objects.all() <NEW_LINE> serializer = UserSerializer(users, many=True) <NEW_LINE> return Response(serializer.data) <NEW_LINE> <DEDENT> def post(self, request, format=None): <NEW_LINE> <INDENT> serializer =...
List all users, or create a new user.
62599040b57a9660fecd2cfe
class PastEventsManager(models.Manager): <NEW_LINE> <INDENT> def get_query_set(self): <NEW_LINE> <INDENT> return super(PastEventsManager, self).get_query_set().filter( start__lte=datetime.datetime.now()-datetime.timedelta(hours=1) ).order_by('-start')
Return all events in the past, starting with most recent
625990400fa83653e46f615d
class ConfigParser(PythonConfigParser): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> PythonConfigParser.__init__(self) <NEW_LINE> self._sections = OrderedDict() <NEW_LINE> self.filename = None <NEW_LINE> self._callbacks = [] <NEW_LINE> <DEDENT> def add_callback(self, callback, section=None, key=None): <N...
Enhanced ConfigParser class, that supports addition of default sections and default values. .. versionadded:: 1.0.7
6259904024f1403a9268620e
class BrowserLikeRedirectAgent(RedirectAgent): <NEW_LINE> <INDENT> _redirectResponses = [http.TEMPORARY_REDIRECT] <NEW_LINE> _seeOtherResponses = [ http.MOVED_PERMANENTLY, http.FOUND, http.SEE_OTHER, http.PERMANENT_REDIRECT, ]
An L{Agent} wrapper which handles HTTP redirects in the same fashion as web browsers. Unlike L{RedirectAgent}, the implementation is more relaxed: 301 and 302 behave like 303, redirecting automatically on any method and altering the redirect request to a I{GET}. @see: L{RedirectAgent} @since: 13.1
62599040a4f1c619b294f7c9
class SignatureAlgorithm(TLSEnum): <NEW_LINE> <INDENT> anonymous = 0 <NEW_LINE> rsa = 1 <NEW_LINE> dsa = 2 <NEW_LINE> ecdsa = 3
Signing algorithms used in TLSv1.2
62599040711fe17d825e15de
class Fase(db.Model): <NEW_LINE> <INDENT> __tablename__ = 'Fase' <NEW_LINE> idFase = db.Column(db.Integer, primary_key=True, nullable=False) <NEW_LINE> nombre = db.Column(db.String(45), unique=True, nullable=False) <NEW_LINE> descripcion = db.Column(db.String(150)) <NEW_LINE> estado = db.Column(db.String(20), default =...
Modelo de Fase
625990408a349b6b436874ca
class FavoriteProductDeleteAjaxView(View): <NEW_LINE> <INDENT> def post(self, request, *args, **kwargs): <NEW_LINE> <INDENT> body = request.body.decode('utf-8') <NEW_LINE> bjson = json.loads(body) <NEW_LINE> login_user = bjson['login_user'] <NEW_LINE> target = bjson['target'] <NEW_LINE> try: <NEW_LINE> <INDENT> delete_...
お気に入りのユーザーを削除
62599040097d151d1a2c22ea
class BinaryFileTestCase(BaseTestCase): <NEW_LINE> <INDENT> def testOneObject(self): <NEW_LINE> <INDENT> _, path = tempfile.mkstemp() <NEW_LINE> try: <NEW_LINE> <INDENT> with open(path, "wb") as out: <NEW_LINE> <INDENT> out.write(ints2octs((2, 1, 12))) <NEW_LINE> <DEDENT> with open(path, "rb") as source: <NEW_LINE> <IN...
Assure that decode works on open binary files.
62599040d4950a0f3b111782
class DescribeProjectSecurityGroupsResponse(AbstractModel): <NEW_LINE> <INDENT> def __init__(self): <NEW_LINE> <INDENT> self.Groups = None <NEW_LINE> self.Total = None <NEW_LINE> self.RequestId = None <NEW_LINE> <DEDENT> def _deserialize(self, params): <NEW_LINE> <INDENT> if params.get("Groups") is not None: <NEW_LINE>...
DescribeProjectSecurityGroups response structure.
6259904026068e7796d4dbcb
class TimedOperation(Operation): <NEW_LINE> <INDENT> __slots__ = ('timeout', 'coro', 'weak_timeout', 'delta', 'last_checkpoint') <NEW_LINE> def set_timeout(self, val): <NEW_LINE> <INDENT> if val and val != -1 and not isinstance(val, datetime.datetime): <NEW_LINE> <INDENT> now = datetime.datetime.now() <NEW_LINE> if isi...
Operations that have a timeout derive from this. Eg: .. sourcecode:: python yield TimedOperation( timeout=None, weak_timeout=True, prio=priority.DEFAULT ) * timeout - can be a float/int (number of seconds) or a timedelta or a datetime value if it's a datetime the timeout will occur...
6259904071ff763f4b5e8a23
class ArtistViewSet(viewsets.ModelViewSet): <NEW_LINE> <INDENT> queryset = models.Artist.objects.all() <NEW_LINE> serializer_class = serializers.ArtistSerializer <NEW_LINE> permission_classes = [permissions.IsAuthenticated]
ViewSet for the Artist class
62599040cad5886f8bdc59bf
class ExamsDeleteView(ExamsMixin, DeleteView): <NEW_LINE> <INDENT> template_name = 'dj_diabetes/confirm_delete.html'
to Delete Examination Details
625990408c3a8732951f77dd
class HPHMembershipSettingsEditForm(RegistryEditForm): <NEW_LINE> <INDENT> schema = IHPHMembershipSettings <NEW_LINE> label = u"HPH membership tool settings"
Define form logic
6259904045492302aabfd75f
class ReportDir(object): <NEW_LINE> <INDENT> _current_dir = '' <NEW_LINE> def __init__(self): <NEW_LINE> <INDENT> pass <NEW_LINE> <DEDENT> def __call__(self, progress, data): <NEW_LINE> <INDENT> return self._current_dir <NEW_LINE> <DEDENT> def set_directory_name(self, arg): <NEW_LINE> <INDENT> self._current_dir = arg <...
Class to provide progressbar widget with current directory name.
6259904007f4c71912bb06b7