function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def compare(self, range_comparison, range_objs): """ Compares this type against comparison filters """ range_values = [obj.cast_value for obj in range_objs] comparison_func = get_comparison_func(range_comparison) return comparison_func(self.cast_value, *range_values)
spulec/moto
[ 6700, 1808, 6700, 82, 1361221859 ]
def is_set(self): return self.type in (DDBType.STRING_SET, DDBType.NUMBER_SET, DDBType.BINARY_SET)
spulec/moto
[ 6700, 1808, 6700, 82, 1361221859 ]
def is_map(self): return self.type == DDBType.MAP
spulec/moto
[ 6700, 1808, 6700, 82, 1361221859 ]
def _implementation(): """Return a dict with the Python implementation and version. Provide both the name and the version of the Python implementation currently running. For example, on CPython 2.7.5 it will return {'name': 'CPython', 'version': '2.7.5'}. This function works best on CPython and Py...
cloudera/hue
[ 804, 271, 804, 38, 1277149611 ]
def main(): """Pretty-print the bug information as JSON.""" print(json.dumps(info(), sort_keys=True, indent=2))
cloudera/hue
[ 804, 271, 804, 38, 1277149611 ]
def test_string_serde() -> None: syft_string = String("Hello OpenMined") serialized = syft_string._object2proto() assert isinstance(serialized, String_PB) deserialized = String._proto2object(proto=serialized) assert isinstance(deserialized, String) assert deserialized.id == syft_string.id
OpenMined/PySyft
[ 8617, 1908, 8617, 143, 1500410476 ]
def test_parametric_attention_model_with_single_representation(self): model = parametric_attention.SimpleParametricAttention( output_dimension=2, input_embedding_dimension=2, vocab_size=10, num_representations=1, max_sequence_size=20) input_batch = tf.convert_to_tensor(...
google-research/google-research
[ 27788, 6881, 27788, 944, 1538678568 ]
def __init__(self, response): super(CreateCommentResult, self).__init__(response) self.comment_id = -1 if self.ok: serialized = response.json() if "id" in serialized: self.comment_id = int(serialized["id"])
icoxfog417/pykintone
[ 21, 11, 21, 8, 1435900514 ]
def __init__(self, response): super(SelectCommentResult, self).__init__(response) self.raw_comments = [] self.older = False self.newer = False if self.ok: serialized = response.json() if "comments" in serialized: self.raw_comments = seriali...
icoxfog417/pykintone
[ 21, 11, 21, 8, 1435900514 ]
def test_xl_cell_to_rowcol_abs(self): """Test xl_cell_to_rowcol_abs()""" tests = [ # row, col, A1 string (0, 0, 'A1'), (0, 1, 'B1'), (0, 2, 'C1'), (0, 9, 'J1'), (1, 0, 'A2'), (2, 0, 'A3'), (9, 0, 'A10'), ...
jmcnamara/XlsxWriter
[ 3172, 594, 3172, 18, 1357261626 ]
def test_equality(): """ Test Equality """ foo1 = qitoolchain.qipackage.QiPackage("foo", "1.2") foo2 = qitoolchain.qipackage.QiPackage("foo", "1.2") foo3 = qitoolchain.qipackage.QiPackage("foo", "1.3") bar1 = qitoolchain.qipackage.QiPackage("bar", "1.2") assert foo1 == foo2 assert foo2 < foo...
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def test_skip_package_xml(tmpdir): """ Test Skip Package Xml """ foo1 = tmpdir.mkdir("foo") foo_xml = foo1.join("package.xml") foo_xml.write("""<package name="foo" version="0.1"/>""") foo1.ensure("include", "foo.h", file=True) foo1.ensure("lib", "libfoo.so", file=True) package = qitoolchain....
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def test_backward_compat_runtime_install(tmpdir): """ Test Backward Compat Runtime """ boost_path = tmpdir.mkdir("boost") boost_path.ensure("include", "boost.h", file=True) boost_path.ensure("lib", "libboost.so", file=True) boost_path.ensure("package.xml", file=True) package = qitoolchain.qipack...
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def test_include_in_mask(tmpdir): """ Test Include in Mask """ qt_path = tmpdir.mkdir("qt") qt_path.ensure("bin", "assitant.exe") qt_path.ensure("bin", "moc.exe") qt_path.ensure("bin", "lrelease.exe") qt_path.ensure("bin", "lupdate.exe") runtime_mask = qt_path.ensure("runtime.mask", file=Tru...
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def test_extract_legacy_bad_top_dir(tmpdir): """ Test Extract Legacy Bad Top Dir """ src = tmpdir.mkdir("src") boost = src.mkdir("boost") boost.ensure("lib", "libboost.so", file=True) res = qisys.archive.compress(boost.strpath) dest = tmpdir.mkdir("dest").join("boost-1.55") qitoolchain.qipac...
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def test_extract_modern(tmpdir): """ Test Extract Modern """ src = tmpdir.mkdir("src") src.ensure("package.xml", file=True) src.ensure("lib", "libboost.so", file=True) output = tmpdir.join("boost.zip") res = qisys.archive.compress(src.strpath, output=output.strpath, flat=True) dest = tmpdir....
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def test_get_set_license(tmpdir): """ Test Get Set Licence """ boost_path = tmpdir.mkdir("boost") boost_path.join("package.xml").write("""\n<package name="boost" version="1.58" />\n""") package = qitoolchain.qipackage.QiPackage("boost", path=boost_path.strpath) assert package.license is None pac...
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def test_post_add_does_not_exist(tmpdir): """ Test Post Add Does Not Exist """ boost_path = tmpdir.mkdir("boost") boost_path.join("package.xml").write( b"""\n<package name="boost" version="1.58" post-add="asdf" />\n""" ) package = qitoolchain.qipackage.QiPackage("boost", path=boost_path.strp...
aldebaran/qibuild
[ 67, 45, 67, 42, 1297185497 ]
def __init__(self, id_=None, name=None, definer=None, reference=None): super(KillChain, self).__init__() self.id_ = id_ self.name = name self.definer = definer self.reference = reference self.number_of_phases = None # can we just do len(self.kill_chain_phases)?
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def __eq__(self, other): if self is other: return True if not isinstance(other, self.__class__): return False return other.to_dict() == self.to_dict()
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def _dict_as_list(cls): return False
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def __init__(self, phase_id=None, name=None, ordinality=None): super(KillChainPhase, self).__init__() self.phase_id = phase_id self.name = name self.ordinality = ordinality
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def __ne__(self, other): return not self.__eq__(other)
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def __init__(self, phase_id=None, name=None, ordinality=None, kill_chain_id=None, kill_chain_name=None): super(KillChainPhaseReference, self).__init__(phase_id, name, ordinality) self.kill_chain_id = kill_chain_id self.kill_chain_name = kill_chain_name
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def __init__(self, *args): super(_KillChainPhaseReferenceList, self).__init__(type=KillChainPhaseReference, *args)
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def _dict_as_list(cls): return False
STIXProject/python-stix
[ 230, 86, 230, 25, 1360691159 ]
def __init__(self, *args, **kwargs): # Set Tester member variables self.set_write_output_files(WRITE_OUTPUT_FILES) self.set_output_py_dir(OUTPUT_PY_DIR) self.set_output_yml_dir(OUTPUT_YML_DIR) self.set_debug_level(DEBUG_LEVEL) # Store the base path self._base_pat...
ReconCell/smacha
[ 15, 2, 15, 1, 1501314993 ]
def setUp(self): self.username = 'test' self.password = 'secret' self.auth_url = 'http://testserver' + reverse('auth-password') self.test_url = 'http://testserver/api/' get_user_model().objects.create_user( self.username, 'admin@example.com', self.password )
opennode/nodeconductor-assembly-waldur
[ 39, 35, 39, 3, 1484854426 ]
def test_user_can_authenticate_with_token(self): response = self.client.post( self.auth_url, data={'username': self.username, 'password': self.password} ) self.assertEqual(response.status_code, status.HTTP_200_OK) token = response.data['token'] self.client.credential...
opennode/nodeconductor-assembly-waldur
[ 39, 35, 39, 3, 1484854426 ]
def test_token_creation_time_is_updated_on_every_request(self): response = self.client.post( self.auth_url, data={'username': self.username, 'password': self.password} ) self.assertEqual(response.status_code, status.HTTP_200_OK) token = response.data['token'] created1...
opennode/nodeconductor-assembly-waldur
[ 39, 35, 39, 3, 1484854426 ]
def test_expired_token_is_recreated_on_successful_authentication(self): user = get_user_model().objects.get(username=self.username) self.assertIsNotNone(user.token_lifetime) response = self.client.post( self.auth_url, data={'username': self.username, 'password': self.password} ...
opennode/nodeconductor-assembly-waldur
[ 39, 35, 39, 3, 1484854426 ]
def test_token_never_expires_if_token_lifetime_is_none(self): user = get_user_model().objects.get(username=self.username) user.token_lifetime = None user.save() response = self.client.post( self.auth_url, data={'username': self.username, 'password': self.password} ) ...
opennode/nodeconductor-assembly-waldur
[ 39, 35, 39, 3, 1484854426 ]
def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_marooned_pirate_hum_f.iff" result.attribute_template_id = 9 result.stfName("npc_name","human_base_female")
anhstudios/swganh
[ 62, 37, 62, 37, 1297996365 ]
def __init__(self, plotly_name="y", parent_name="volume.caps", **kwargs): super(YValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, data_class_str=kwargs.pop("data_class_str", "Y"), data_docs=kwargs.pop( "data_docs", ...
plotly/python-api
[ 13052, 2308, 13052, 1319, 1385013188 ]
def _make_hash_value(self, user, timestamp): return ( six.text_type(user.pk) + six.text_type(timestamp) + six.text_type(user.profile.email_confirmed) )
shashank-sharma/mythical-learning
[ 27, 3, 27, 5, 1494527251 ]
def _string_to_bytes(text, max_length): """Given string and length, convert to byte seq of at most max_length. This process mimics docqa/elmo's preprocessing: https://github.com/allenai/document-qa/blob/master/docqa/elmo/data.py Note that we make use of BOS_CHAR_ID and EOS_CHAR_ID in iterator_utils.py & our...
mlperf/training_results_v0.7
[ 11, 25, 11, 1, 1606268455 ]
def load_vocab(vocab_file): vocab = [] with codecs.getreader("utf-8")(tf.gfile.GFile(vocab_file, "rb")) as f: vocab_size = 0 for word in f: vocab_size += 1 vocab.append(word.strip()) return vocab, vocab_size
mlperf/training_results_v0.7
[ 11, 25, 11, 1, 1606268455 ]
def create_vocab_tables(src_vocab_file): """Creates vocab tables for src_vocab_file and tgt_vocab_file.""" src_vocab_table = lookup_ops.index_table_from_file( src_vocab_file, default_value=UNK_ID) tgt_vocab_table = src_vocab_table return src_vocab_table, tgt_vocab_table
mlperf/training_results_v0.7
[ 11, 25, 11, 1, 1606268455 ]
def __init__(self): self.base_link = 'http://segos.es' self.search_link = '/?search=%s' #self.episode_link = '-Season-%01d-Episode-%01d'
mrknow/filmkodi
[ 68, 68, 68, 206, 1444160337 ]
def get_show(self, imdb, tvdb, tvshowtitle, year): try: query = self.moviesearch_link % (urllib.unquote(tvshowtitle)) query = urlparse.urljoin(self.base_link, query) result = client.source(query) result = json.loads(result) tvshowtitle = cleantitle.tv...
mrknow/filmkodi
[ 68, 68, 68, 206, 1444160337 ]
def get_sources(self, url, hosthdDict, hostDict, locDict): try: sources = [] if url == None: return sources url = urlparse.urljoin(self.base_link, url) result = client.request(url) vtype = re.findall('<div class="col-lg-9 col-md-9 col-sm-9">\s.*<b>J...
mrknow/filmkodi
[ 68, 68, 68, 206, 1444160337 ]
def _device_id(aiohue_sensor): # Work out the shared device ID, as described below device_id = aiohue_sensor.uniqueid if device_id and len(device_id) > 23: device_id = device_id[:23] return device_id
home-assistant/home-assistant
[ 58698, 22318, 58698, 2794, 1379402988 ]
def __init__(self, bridge): """Initialize the sensor manager.""" self.bridge = bridge self._component_add_entities = {} self.current = {} self.current_events = {} self._enabled_platforms = ("binary_sensor", "sensor") self.coordinator = DataUpdateCoordinator( ...
home-assistant/home-assistant
[ 58698, 22318, 58698, 2794, 1379402988 ]
def async_update_items(self): """Update sensors from the bridge.""" api = self.bridge.api.sensors if len(self._component_add_entities) < len(self._enabled_platforms): return to_add = {} primary_sensor_devices = {} current = self.current # Physical H...
home-assistant/home-assistant
[ 58698, 22318, 58698, 2794, 1379402988 ]
def available(self): """Return if sensor is available.""" return self.bridge.sensor_manager.coordinator.last_update_success and ( self.allow_unreachable # remotes like Hue Tap (ZGPSwitchSensor) have no _reachability_ or self.sensor.config.get("reachable", True) ...
home-assistant/home-assistant
[ 58698, 22318, 58698, 2794, 1379402988 ]
def state_class(self): """Return the state class of this entity, from STATE_CLASSES, if any.""" return SensorStateClass.MEASUREMENT
home-assistant/home-assistant
[ 58698, 22318, 58698, 2794, 1379402988 ]
def Args(parser): """Register flags for this command.""" parser.add_argument('subscription', help='Subscription name to ACK messages on.') parser.add_argument('ackid', nargs='+', help='One or more AckId to acknowledge.')
KaranToor/MA450
[ 1, 1, 1, 4, 1484697944 ]
def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.GetDataSource = channel.unary_unary( '/google.cloud.bigquery.datatransfer.v1.DataTransferService/GetDataSource', request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot...
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def GetDataSource(self, request, context): """Retrieves a supported data source and returns its settings, which can be used for UI rendering. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def CreateTransferConfig(self, request, context): """Creates a new data transfer configuration. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def DeleteTransferConfig(self, request, context): """Deletes a data transfer configuration, including any associated transfer runs and logs. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def ListTransferConfigs(self, request, context): """Returns information about all data transfers in the project. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def GetTransferRun(self, request, context): """Returns information about the particular transfer run. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def ListTransferRuns(self, request, context): """Returns information about running and completed jobs. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def CheckValidCreds(self, request, context): """Returns true if valid credentials exist for the given data source and requesting user. Some data sources doesn't support service account, so we need to talk to them on behalf of the end user. This API just checks whether we have OAuth token for the par...
jonparrott/google-cloud-python
[ 2, 1, 2, 1, 1443151125 ]
def test_api2_runfunc(): def noargs(): pass with pytest.raises(SyntaxError): execute_python._runfunc_ok(noargs) def twoargs(a, b): pass with pytest.raises(SyntaxError): execute_python._runfunc_ok(twoargs) def two_with_default(a, b=2): pass # making su...
Opentrons/labware
[ 323, 152, 323, 668, 1436215261 ]
def test_execute_ok(protocol, protocol_file, loop): proto = parse(protocol.text, protocol.filename) ctx = ProtocolContext(loop) execute.run_protocol(proto, context=ctx)
Opentrons/labware
[ 323, 152, 323, 668, 1436215261 ]
def run(): pass
Opentrons/labware
[ 323, 152, 323, 668, 1436215261 ]
def run(a, b): pass
Opentrons/labware
[ 323, 152, 323, 668, 1436215261 ]
def test_proto_with_exception(loop): ctx = ProtocolContext(loop) exc_in_root = '''metadata={"apiLevel": "2.0"}
Opentrons/labware
[ 323, 152, 323, 668, 1436215261 ]
def this_throws(): raise Exception("hi")
Opentrons/labware
[ 323, 152, 323, 668, 1436215261 ]
def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.source = 'main.m' self.line = line_number(self.source, '// Set breakpoint 0 here.') self.shlib_names = ["Container"]
endlessm/chromium-browser
[ 21, 16, 21, 3, 1435959644 ]
def test_expr(self): self.do_test()
endlessm/chromium-browser
[ 21, 16, 21, 3, 1435959644 ]
def __init__(self, oauth2session, client_type, client_config): """ Args: oauth2session (requests_oauthlib.OAuth2Session): The OAuth 2.0 session from ``requests-oauthlib``. client_type (str): The client type, either ``web`` or ``installed``. ...
axbaretto/beam
[ 9, 2, 9, 74, 1474583398 ]
def from_client_config(cls, client_config, scopes, **kwargs): """Creates a :class:`requests_oauthlib.OAuth2Session` from client configuration loaded from a Google-format client secrets file. Args: client_config (Mapping[str, Any]): The client configuration in the Goo...
axbaretto/beam
[ 9, 2, 9, 74, 1474583398 ]
def from_client_secrets_file(cls, client_secrets_file, scopes, **kwargs): """Creates a :class:`Flow` instance from a Google client secrets file. Args: client_secrets_file (str): The path to the client secrets .json file. scopes (Sequence[str]): The list of scopes...
axbaretto/beam
[ 9, 2, 9, 74, 1474583398 ]
def redirect_uri(self): """The OAuth 2.0 redirect URI. Pass-through to ``self.oauth2session.redirect_uri``.""" return self.oauth2session.redirect_uri
axbaretto/beam
[ 9, 2, 9, 74, 1474583398 ]
def redirect_uri(self, value): self.oauth2session.redirect_uri = value
axbaretto/beam
[ 9, 2, 9, 74, 1474583398 ]
def fetch_token(self, **kwargs): """Completes the Authorization Flow and obtains an access token. This is the final step in the OAuth 2.0 Authorization Flow. This is called after the user consents. This method calls :meth:`requests_oauthlib.OAuth2Session.fetch_token` an...
axbaretto/beam
[ 9, 2, 9, 74, 1474583398 ]
def credentials(self): """Returns credentials from the OAuth 2.0 session. :meth:`fetch_token` must be called before accessing this. This method constructs a :class:`google.oauth2.credentials.Credentials` class using the session's token and the client config. Returns: ...
axbaretto/beam
[ 9, 2, 9, 74, 1474583398 ]
def __init__(self, attrs=None, years=None): # years is an optional list/tuple of years to use in the "year" select box. self.attrs = attrs or {} if years: self.years = years else: this_year = datetime.date.today().year self.years = range(this_year, thi...
paulsmith/geodjango
[ 20, 7, 20, 1, 1215189246 ]
def id_for_label(self, id_): return '%s_month' % id_
paulsmith/geodjango
[ 20, 7, 20, 1, 1215189246 ]
def __init__(self, values, row_splits): """Creates a `RaggedTensorValue`. Args: values: A numpy array of any type and shape; or a RaggedTensorValue. row_splits: A 1-D int32 or int64 numpy array. """ if not (isinstance(row_splits, (np.ndarray, np.generic)) and row_splits.dtype in...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def flat_values(self): """The innermost `values` array for this ragged tensor value.""" rt_values = self.values while isinstance(rt_values, RaggedTensorValue): rt_values = rt_values.values return rt_values
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def nested_row_splits(self): """The row_splits for all ragged dimensions in this ragged tensor value.""" rt_nested_splits = [self.row_splits] rt_values = self.values while isinstance(rt_values, RaggedTensorValue): rt_nested_splits.append(rt_values.row_splits) rt_values = rt_values.values ...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def ragged_rank(self): """The number of ragged dimensions in this ragged tensor value.""" values_is_ragged = isinstance(self._values, RaggedTensorValue) return self._values.ragged_rank + 1 if values_is_ragged else 1
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def shape(self): """A tuple indicating the shape of this RaggedTensorValue.""" return (self._row_splits.shape[0] - 1,) + (None,) + self._values.shape[1:]
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _nested_row_partitions(self): """The row_partitions representing this shape.""" return [RowPartition.from_row_splits(rs) for rs in self.nested_row_splits]
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def __repr__(self): return "tf.RaggedTensorValue(values=%r, row_splits=%r)" % (self._values, self._row_splits)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def __init__(self, args): """Abstract class to validate and store properties related to Skia Gold. Args: args: The parsed arguments from an argparse.ArgumentParser. """ self._git_revision = None self._issue = None self._patchset = None self._job_id = None self._local_pixel_tests =...
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def continuous_integration_system(self): return self._continuous_integration_system or 'buildbucket'
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def code_review_system(self): return self._code_review_system or 'gerrit'
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def git_revision(self): return self._GetGitRevision()
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def issue(self): return self._issue
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def job_id(self): return self._job_id
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def local_pixel_tests(self): return self._IsLocalRun()
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def local_png_directory(self): return self._local_png_directory
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def no_luci_auth(self): return self._no_luci_auth
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def patchset(self): return self._patchset
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def bypass_skia_gold_functionality(self): return self._bypass_skia_gold_functionality
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def _GetGitOriginMainHeadSha1(): raise NotImplementedError()
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def _IsLocalRun(self): if self._local_pixel_tests is None: # Look for the presence of the SWARMING_SERVER environment variable as a # heuristic to determine whether we're running on a workstation or a bot. # This should always be set on swarming, but would be strange to be set on # a worksta...
ric2b/Vivaldi-browser
[ 131, 27, 131, 3, 1490828945 ]
def parse_args(args=None, *, parser_type=None): parser_type = parser_type or argparse.ArgumentParser parser = parser_type( description='Update the active milestones for the chromium project') parser.set_defaults(func=None) parser.add_argument('--milestones-json', help='Path to the mi...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def numeric_sort_key(s): # The capture group in the regex means that the numeric portions are returned, # odd indices will be the numeric portions of the string (the 0th or last # element will be empty if the string starts or ends with a number, # respectively) pieces = _NUMBER_RE.split(s) return [ (i...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def activate_cmd(args): with open(args.milestones_json) as f: milestones = json.load(f) milestones = add_milestone(milestones, args.milestone, args.branch) with open(args.milestones_json, 'w') as f: f.write(milestones)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def deactivate_cmd(args): with open(args.milestones_json) as f: milestones = json.load(f) milestones = remove_milestone(milestones, args.milestone) with open(args.milestones_json, 'w') as f: f.write(milestones)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def isnan(val): # NaN is never equal to itself. return val != val
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def IsPosInf(val): return isinf(val) and (val > 0)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def testBadUtf8String(self, message_module): if api_implementation.Type() != 'python': self.skipTest("Skipping testBadUtf8String, currently only the python " "api implementation raises UnicodeDecodeError when a " "string field contains bad utf-8.") bad_utf8_data = t...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def testGoldenPackedMessage(self, message_module): golden_data = test_util.GoldenFileData('golden_packed_fields_message') golden_message = message_module.TestPackedTypes() parsed_bytes = golden_message.ParseFromString(golden_data) all_set = message_module.TestPackedTypes() test_util.SetAllPackedFiel...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]