prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from rest_framework import generics, permissions, views, response,status from .models import Account from .serializers import AccountCreateSerializer, AccountSerializer, AuthenticateSerializer, \ UpdateAccountSerializer, AccountRetrieveSerializer # Create your vi...
post
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API <|fim▁hole|> The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from talon_one.configuration import Configuration ...
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is availab...
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The...
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""IntegrationEntity - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._integration_id = None self._created = None self.d...
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Gets the integration_id of this IntegrationEntity. # noqa: E501 The integration ID for this entity sent to and used in the Talon.One system. # noqa: E501 :return: The integration_id of this IntegrationEntity. # noqa: E501 :rtype: str """ return self._integration_i...
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Sets the integration_id of this IntegrationEntity. The integration ID for this entity sent to and used in the Talon.One system. # noqa: E501 :param integration_id: The integration_id of this IntegrationEntity. # noqa: E501 :type: str """ if self.local_vars_configur...
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Gets the created of this IntegrationEntity. # noqa: E501 The exact moment this entity was created. # noqa: E501 :return: The created of this IntegrationEntity. # noqa: E501 :rtype: datetime """ return self._created
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Sets the created of this IntegrationEntity. The exact moment this entity was created. # noqa: E501 :param created: The created of this IntegrationEntity. # noqa: E501 :type: datetime """ if self.local_vars_configuration.client_side_validation and created is None: ...
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") ...
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Returns the string representation of the model""" return pprint.pformat(self.to_dict())
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""For `print` and `pprint`""" return self.to_str()
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Returns true if both objects are equal""" if not isinstance(other, IntegrationEntity): return False return self.to_dict() == other.to_dict()
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
"""Returns true if both objects are not equal""" if not isinstance(other, IntegrationEntity): return True return self.to_dict() != other.to_dict()
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
local_vars_configuration = Configuration()
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
raise ValueError("Invalid value for `integration_id`, must not be `None`") # noqa: E501
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
raise ValueError("Invalid value for `created`, must not be `None`") # noqa: E501
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value ))
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
result[attr] = value.to_dict()
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() ))
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
result[attr] = value
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
return False
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
return True
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
__init__
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
integration_id
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
integration_id
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
created
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
created
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
to_dict
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
to_str
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
__repr__
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
__eq__
<|file_name|>integration_entity.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the ot...
__ne__
<|file_name|>jsonconfig.py<|end_file_name|><|fim▁begin|>""" Read a dictionary from a JSON file, and add its contents to a Python dictionary. """ import json import types from instmakelib import rtimport INSTMAKE_SITE_DIR = "instmakesite" # These are the supported field names # =================================== # ...
def load_site_plugin(name):
<|file_name|>jsonconfig.py<|end_file_name|><|fim▁begin|>""" Read a dictionary from a JSON file, and add its contents to a Python dictionary. """ import json import types from instmakelib import rtimport INSTMAKE_SITE_DIR = "instmakesite" # These are the supported field names # =================================== # ...
fh = open(json_filename) file_config = json.load(fh) fh.close() assert type(file_config) == types.DictType caller_config.update(file_config)
<|file_name|>jsonconfig.py<|end_file_name|><|fim▁begin|>""" Read a dictionary from a JSON file, and add its contents to a Python dictionary. """ import json import types from instmakelib import rtimport INSTMAKE_SITE_DIR = "instmakesite" # These are the supported field names # =================================== # ...
"""Import a plugin from the instmakesite directory. The import can throw exceptions that the caller has to catch.""" plugin_name = INSTMAKE_SITE_DIR + "." + name return rtimport.rtimport(plugin_name)
<|file_name|>jsonconfig.py<|end_file_name|><|fim▁begin|>""" Read a dictionary from a JSON file, and add its contents to a Python dictionary. """ import json import types from instmakelib import rtimport INSTMAKE_SITE_DIR = "instmakesite" # These are the supported field names # =================================== # ...
update
<|file_name|>jsonconfig.py<|end_file_name|><|fim▁begin|>""" Read a dictionary from a JSON file, and add its contents to a Python dictionary. """ import json import types from instmakelib import rtimport INSTMAKE_SITE_DIR = "instmakesite" # These are the supported field names # =================================== # ...
load_site_plugin
<|file_name|>Movie2KTo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from ..internal.DeadCrypter import DeadCrypter class Movie2KTo(DeadCrypter): __name__ = "Movie2KTo" __type__ = "crypter" __version__ = "0.56" __status__ = "stable" __pattern__ = r'http://(?:www\.)?movie2k\.to/(.+)\.ht...
__license__ = "GPLv3"
<|file_name|>Movie2KTo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from ..internal.DeadCrypter import DeadCrypter class Movie2KTo(DeadCrypter): <|fim_middle|> <|fim▁end|>
__name__ = "Movie2KTo" __type__ = "crypter" __version__ = "0.56" __status__ = "stable" __pattern__ = r'http://(?:www\.)?movie2k\.to/(.+)\.html' __config__ = [("activated", "bool", "Activated", True)] __description__ = """Movie2k.to decrypter plugin""" __license__ = "GPLv3" __author...
<|file_name|>0076_articlepage_video_document.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('wagtaildocs', '0003_add_verbose_names'), ('articles', '0075_auto_20151015_2022'), ]...
import django.db.models.deletion from django.db import migrations, models
<|file_name|>0076_articlepage_video_document.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): <|fim_middle|> <|fim▁end|>
dependencies = [ ('wagtaildocs', '0003_add_verbose_names'), ('articles', '0075_auto_20151015_2022'), ] operations = [ migrations.AddField( model_name='articlepage', name='video_document', field=models.ForeignKey(related_name='+', on_delete=django....
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
# This class is inspired from numpy 1.7 with an alteration to check # the reset warning filters after calls to assert_warns.
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
assert_less(0, 1) _assert_less(0, 1) assert_raises(AssertionError, assert_less, 1, 0) assert_raises(AssertionError, _assert_less, 1, 0)
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
assert_greater(1, 0) _assert_greater(1, 0) assert_raises(AssertionError, assert_greater, 0, 1) assert_raises(AssertionError, _assert_greater, 0, 1)
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
assert_less_equal(0, 1) assert_less_equal(1, 1) assert_raises(AssertionError, assert_less_equal, 1, 0)
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
assert_greater_equal(1, 0) assert_greater_equal(1, 1) assert_raises(AssertionError, assert_greater_equal, 0, 1)
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
lda = LDA() tree = DecisionTreeClassifier() # LDA doesn't have random state: smoke test set_random_state(lda, 3) set_random_state(tree, 3) assert_equal(tree.random_state, 3)
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
def _raise_ValueError(message): raise ValueError(message) assert_raise_message(ValueError, "test", _raise_ValueError, "test") assert_raises(AssertionError, assert_raise_message, ValueError, "something else", _raise_ValueError, "test") ...
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
raise ValueError(message)
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
def test_warn(self): def f(): warnings.warn("yo") return 3 # Test that assert_warns is not impacted by externally set # filters and is reset internally. # This is because `clean_warning_registry()` is called internally by # assert_warns and clears all...
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
def f(): warnings.warn("yo") return 3 # Test that assert_warns is not impacted by externally set # filters and is reset internally. # This is because `clean_warning_registry()` is called internally by # assert_warns and clears all previous filters. ...
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
warnings.warn("yo") return 3
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
def f(): warnings.warn("yo", DeprecationWarning) failed = False filters = sys.modules['warnings'].filters[:] try: try: # Should raise an AssertionError assert_warns(UserWarning, f) failed = True except A...
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
warnings.warn("yo", DeprecationWarning)
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
raise AssertionError("wrong warning caught by assert_warn")
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_assert_less
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_assert_greater
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_assert_less_equal
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_assert_greater_equal
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_set_random_state
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_assert_raise_message
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
_raise_ValueError
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_warn
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
f
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
test_warn_wrong_warning
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings import unittest import sys from nose.tools import assert_raises from gplearn.skutils.testing import ( _assert_less, _assert_greater, assert_less_equal, assert_greater_equal, assert_warns, assert_no_warnings, assert_e...
f
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
def tryprint(): return ('it will be oke')
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>def tryprint(): <|fim_middle|> <|fim▁end|>
return ('it will be oke')
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>def <|fim_middle|>(): return ('it will be oke')<|fim▁end|>
tryprint
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
index = sm.repo.index # END handle index index.add([sm.k_modules_file], write=self._auto_write) sm._clear_cache()
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
""":return: section title used in .gitmodules configuration file""" return f'submodule "{name}"'
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
""":return: name of the submodule as parsed from the section name""" section = section.strip() return section[11:-1]
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
""":return: New branch/head instance""" return git.Head(repo, git.Head.to_full_path(path))
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
"""Find the remote branch matching the name of the given branch or raise InvalidGitRepositoryError""" for remote in remotes: try: return remote.refs[branch_name] except IndexError: continue # END exception handling # END for remote raise InvalidGitReposito...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
""" Catches calls to _write, and updates the .gitmodules blob in the index with the new data, if we have written into a stream. Otherwise it will add the local file to the index to make it correspond with the working tree. Additionally, the cache must be cleared Please note that no mutating met...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
self._smref: Union['ReferenceType[Submodule]', None] = None self._index = None self._auto_write = True super(SubmoduleConfigParser, self).__init__(*args, **kwargs)
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
"""Set this instance's submodule. It must be called before the first write operation begins""" self._smref = weakref.ref(submodule)
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
"""Flush changes in our configuration file to the index""" assert self._smref is not None # should always have a file here assert not isinstance(self._file_or_files, BytesIO) sm = self._smref() if sm is not None: index = self._index if index is No...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
rval: None = super(SubmoduleConfigParser, self).write() self.flush_to_index() return rval
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
from .base import Submodule from weakref import ReferenceType from git.repo import Repo from git.refs import Head from git import Remote from git.refs import RemoteReference
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
index = self._index if index is None: index = sm.repo.index # END handle index index.add([sm.k_modules_file], write=self._auto_write) sm._clear_cache()
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
index = sm.repo.index
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
sm_section
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
sm_name
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
mkhead
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
find_first_remote_branch
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
__init__
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
set_submodule
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
flush_to_index
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import git from git.exc import InvalidGitRepositoryError from git.config import GitConfigParser from io import BytesIO import weakref # typing ----------------------------------------------------------------------- from typing import Any, Sequence, TYPE_CHECKING, Uni...
write
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
self.plugin_on_unpaused() def disabled(self): if not app.player.paused:
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
if app.window.get_window(): try: return app.window.get_window().get_xid() except AttributeError: # non x11 pass return 0
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
LOGOUT = 1 USERSWITCH = 1 << 1 SUSPEND = 1 << 2 IDLE = 1 << 3
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
PLUGIN_ID = "screensaver_inhibit" PLUGIN_NAME = _("Inhibit Screensaver") PLUGIN_DESC = _("Prevents the GNOME screensaver from activating while" " a song is playing.") PLUGIN_ICON = Icons.PREFERENCES_DESKTOP_SCREENSAVER DBUS_NAME = "org.gnome.SessionManager" DBUS_INTERFACE = ...
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
if not app.player.paused: self.plugin_on_unpaused()
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
if not app.player.paused: self.plugin_on_paused()
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
xid = dbus.UInt32(get_toplevel_xid()) flags = dbus.UInt32(InhibitFlags.IDLE) try: bus = dbus.SessionBus() obj = bus.get_object(self.DBUS_NAME, self.DBUS_PATH) iface = dbus.Interface(obj, self.DBUS_INTERFACE) self.__cookie = iface.Inhibit( ...
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
if self.__cookie is None: return try: bus = dbus.SessionBus() obj = bus.get_object(self.DBUS_NAME, self.DBUS_PATH) iface = dbus.Interface(obj, self.DBUS_INTERFACE) iface.Uninhibit(self.__cookie) self.__cookie = None except ...
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
from quodlibet.plugins import PluginNotSupportedError raise PluginNotSupportedError
<|file_name|>inhibit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Christoph Reiter <reiter.christoph@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 Foundation; eith...
try: return app.window.get_window().get_xid() except AttributeError: # non x11 pass