patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -186,7 +186,10 @@ class RowCoderImpl(StreamCoderImpl):
"Attempted to encode null for non-nullable field \"{}\".".format(
field.name))
continue
- c.encode_to_stream(attr, out, True)
+ attrs_enc_pos.append((c, field.encoding_position, attr))
+ attrs_enc_pos = sor... | [LogicalTypeCoderImpl->[decode_from_stream->[decode_from_stream],encode_to_stream->[encode_to_stream]],RowCoderImpl->[decode_from_stream->[decode_from_stream],encode_to_stream->[encode_to_stream]],RowCoder->[from_payload->[RowCoder],from_runner_api_parameter->[RowCoder],from_type_hint->[RowCoder],is_deterministic->[is_... | Encodes the given value into a binary stream. Return a new Tuple with the components of the tuple decoded from the given stream. | I think we should only need to read the encoding positions once, when constructing the coder. We don't need to inspect the encoding positions and sort for every element. Instead, this should read the encoding positions in `__init__`, and transform them into a list of indexes that will encode in the proper order (`numpy... |
@@ -280,8 +280,6 @@ class SimpleSeq2Seq(Model):
predicted_tokens = [self.vocab.get_token_from_index(x, namespace="target_tokens")
for x in indices]
all_predicted_tokens.append(predicted_tokens)
- if len(all_predicted_tokens) == 1:
- all_predic... | [SimpleSeq2Seq->[from_params->[from_params,cls,pop],forward->[_encoder,rand,all,softmax,new,size,max,_decoder_cell,append,_get_loss,cat,_source_embedder,get_text_field_mask,Variable,range,_output_projection_layer,_prepare_decode_step_input,unsqueeze],_get_loss->[sequence_cross_entropy_with_logits,contiguous],decode->[l... | This method is called after the decoder part of the encoder - decoder lives in the forward Creates a new object containing all attributes of a . | This is removing the batch dimension, which we don't do here anymore? Is that the issue? |
@@ -150,7 +150,7 @@ class ConfigOptionParser(CustomOptionParser):
try:
return option.check_value(key, val)
except optparse.OptionValueError as exc:
- print("An error occurred during configuration: %s" % exc)
+ print("An error occurred during configuration: {}".format... | [PrettyHelpFormatter->[__init__->[__init__]],UpdatingDefaultsHelpFormatter->[expand_default->[expand_default]],ConfigOptionParser->[_update_defaults->[check_default,_get_ordered_configuration_items],get_default_values->[_update_defaults],__init__->[__init__]]] | Check the default value of an option. | Geez. I'm zealously looking a f-strings now. |
@@ -35,9 +35,13 @@ import java.util.stream.Collectors;
public final class SourceSchemas {
private final ImmutableMap<SourceName, LogicalSchema> sourceSchemas;
+ private final KsqlConfig ksqlConfig;
- SourceSchemas(final Map<SourceName, LogicalSchema> sourceSchemas) {
+ SourceSchemas(
+ final Map<SourceN... | [SourceSchemas->[matchesNonValueField->[IllegalArgumentException,anyMatch,isPresent,get,isKeyColumn,isPseudoColumn],isJoin->[size],sourcesWithField->[of,isPresent,get,collect,toSet],isEmpty,copyOf,IllegalArgumentException,requireNonNull]] | Method to find the name of any field in any of the schemas of one or more sources Returns the set of source names or aliases that contain the supplied target column. | As above, add a null check. |
@@ -100,6 +100,14 @@ func (h *PolicyChange) handleFleetServerHosts(ctx context.Context, c *config.Con
if len(h.setters) == 0 {
return nil
}
+ data, err := c.ToMapStr()
+ if err != nil {
+ return errors.New(err, "could not convert the configuration from the policy", errors.TypeConfig)
+ }
+ if _, ok := data["fle... | [Handle->[NewConfigFrom,emitter,Ack,New,handleFleetServerHosts,Errorf,Debugf],handleFleetServerHosts->[Save,M,WithTimeout,New,NewAuthWithConfig,Send,SetClient,NewFromConfig],Strings,Marshal,AgentID,NewReader] | handleFleetServerHosts updates the fleet - server hosts based on the current configuration communicate with updated API client hosts. | Maybe worth a debug log? |
@@ -234,6 +234,9 @@ public class HashJoinSegmentStorageAdapter implements StorageAdapter
// Virtual columns cannot depend on each other, so we don't need to check transitive dependencies.
if (baseColumns.containsAll(virtualColumn.requiredColumns())) {
preJoinVirtualColumns.add(virtualColumn);
+ ... | [HashJoinSegmentStorageAdapter->[getMaxIngestedEventTime->[getMaxIngestedEventTime],makeCursors->[getAvailableDimensions,getAvailableMetrics,makeCursors],getColumnCapabilities->[getColumnCapabilities],getMaxTime->[getMaxTime],getColumnTypeName->[getColumnTypeName,getColumnCapabilities],getDimensionCardinality->[getDime... | Makes a sequence of cursors based on the given conditions. return null if no clause. | missing unit tests for this in `HashJoinSegmentStorageAdapterTest` |
@@ -153,7 +153,7 @@ func (env *ServiceEnv) initKubeClient() error {
return fmt.Errorf("could not initialize kube client: %v", err)
}
return nil
- }, backoff.RetryEvery(time.Second).For(time.Minute))
+ }, backoff.RetryEvery(time.Second).For(5*time.Minute))
}
// GetPachClient returns a pachd client with the... | [GetEtcdClient->[Wait],initKubeClient->[Sprintf,NewForConfig,Errorf,LookupEnv,InClusterConfig,RetryEvery,For,Retry],GetPachClient->[WithCtx,Wait],initEtcdClient->[DefaultDialOptions,WithTimeout,New,Errorf,RetryEvery,For,Retry],GetKubeClient->[Wait],initPachClient->[New,NewFromAddress,Errorf,RetryEvery,For,Retry],JoinHo... | initKubeClient initializes the kube client. | why these increases? 5min seems like a long time to wait for the servers to initialize. |
@@ -1,5 +1,5 @@
"""
-The ``train`` subcommand can be used to train a model.
+The `train` subcommand can be used to train a model.
It requires a configuration file and a directory in
which to write the results.
| [TrainModel->[finish->[dump_metrics,evaluate,join,items,info],run->[train],from_partial_objects->[index_with,construct,cls,get,is_master,read_all_datasets,items,join,from_instances,save_to_files,ConfigurationError]],train_model_from_file->[train_model,from_file],_train_worker->[from_params,int,import_submodules,prepare... | Command line utility to train a model on a specified node. Train an . | It's best not to mix in formatting cleanups with functional changes. Makes the diff harder to read. |
@@ -39,10 +39,11 @@ class ServiceBusClient(object):
:param str fully_qualified_namespace: The fully qualified host name for the Service Bus namespace.
The namespace format is: `<yournamespace>.servicebus.windows.net`.
- :param ~azure.core.credentials.TokenCredential credential: The credential object use... | [ServiceBusClient->[get_queue_receiver->[append,ServiceBusSubQueue,get,ServiceBusReceiver,ValueError,generate_dead_letter_entity_name],get_queue_sender->[append,ValueError,ServiceBusSender],get_subscription_receiver->[append,ServiceBusSubQueue,get,ServiceBusReceiver,ValueError,generate_dead_letter_entity_name],__enter_... | Creates a new ServiceBusClient object that can be used to retrieve a Token from a Service Sample code sync. | changelog not updated :P |
@@ -36,6 +36,17 @@ def test_nirx_hdr_load():
assert raw.info['sfreq'] == 12.5
+@requires_testing_data
+def test_nirx_dat_warn(tmpdir):
+ """Test reading NIRX files when missing data."""
+ shutil.copytree(fname_nirx_15_2_short, str(tmpdir) + "/data/")
+ os.rename(str(tmpdir) + "/data" + "/NIRS-2019-08-... | [test_nirx_hdr_load->[read_raw_nirx],test_encoding->[list,copytree,write,read_raw_nirx,extend,str,join,open],test_nirx_15_2->[assert_array_equal,dict,read_raw_nirx,apply_trans,_get_trans,assert_allclose],test_nirx_standard->[_test_raw_reader],test_nirx_15_0->[assert_array_equal,read_raw_nirx,apply_trans,_get_trans,sour... | Test reading NIRX files for the MNE version 15. 2. Short. Tests if a channel is missing a missing channel or channel is missing channel. Check that the mnis of a residue are in the range [ - 12 - 12 ). | usually we use `pytest.warns`, but I suppose this works, too |
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
+ * The software in this package is published under the terms of the CPAL v1.0
+ * license, a copy of which has been included with this distribution in the
+ * LICENSE.txt file.
+ */
+package org.mule.module.launcher.de... | [No CFG could be retrieved] | No Summary Found. | Is this class really needed? |
@@ -208,6 +208,10 @@ class Dataset:
segmentation_mask_source = self.config.get('segmentation_masks_source')
annotation.set_segmentation_mask_source(segmentation_mask_source)
annotation.set_additional_data_source(self.config.get('additional_data_source'))
+ annotation.metadata.update({
... | [create_subset->[make_subset],DatasetWrapper->[size->[__len__],reset->[reset],make_subset->[make_subset]],Dataset->[size->[__len__],reset->[_load_annotation],__init__->[DatasetConfig]]] | Set annotation metadata. | please use setter like above, there is annotation representation with additional logic - AnnotationContainer where process of updating meta different from regular |
@@ -499,8 +499,9 @@ export class AmpConsent extends AMP.BaseElement {
* @return {Promise<boolean>}
*/
initPromptUI_(isConsentRequired) {
- this.consentUI_ = new ConsentUI(this, devAssert(this.consentConfig_,
- 'consent config not found'));
+ this.consentUI_ = new ConsentUI(this,
+ /** @ty... | [AmpConsent->[handleAction_->[DISMISS,ACCEPTED,ACCEPT,dev,isEnumValue,REJECTED,DISMISSED,REJECT],enableInteractions_->[DISMISS,ACCEPT,REJECT],enableExternalInteractions_->[DISMISS,source,user,getData,length,isExperimentOn],show_->[dev,promise,resolve],buildCallback->[expandPolicyConfig,all,keys,userAssert,dict,toggle,r... | Initialize prompt UI. | Probably another case of `?JsonObject` vs `!JsonObject|null` |
@@ -62,9 +62,9 @@ $a->config['php_path'] = 'php';
// Server-to-server private message encryption (RINO) is allowed by default.
// Encryption will only be provided if this setting is set to a non zero value
-// set to 0 to disable, 2 to enable, 1 is deprecated
+// set to 0 to disable, 3 to enable
-$a->config['syst... | [No CFG could be retrieved] | Configures the administration settings for the system administration page. Get the current page. | Could you describe the other options as well? |
@@ -16,13 +16,15 @@ from __future__ import print_function
import os
import collections
-from .. import core
from ..framework import Variable, default_main_program
+import pickle
+from . import learning_rate_scheduler
+import warnings
__all__ = ['save_persistables', 'load_persistables']
-def save_persistable... | [load_persistables->[isinstance,_load_var_from_file],save_persistables->[isinstance,_save_var_to_file],_load_var_from_file->[keys,append,default_main_program,sorted,append_op,isinstance,items,join,_clone_var_in_block_],_clone_var_in_block_->[isinstance,create_var],_save_var_to_file->[keys,append,default_main_program,so... | This function saves all variables in the given layer and then tries to load these variables from the Save the state of the in the model to a file. | if optimizer is none? |
@@ -197,4 +197,16 @@ def test_read_ctf():
assert_raises(ValueError, read_raw_ctf,
op.join(ctf_dir, ctf_fname_continuous), 'foo')
+
+@spm_face.requires_spm_data
+def test_read_spm_ctf():
+ """Test CTF reader with omitted samples."""
+ data_path = spm_face.data_path()
+ raw_fname = data... | [test_read_ctf->[,round,all,_TempDir,catch_warnings,assert_raises,apply_trans,join,remove,enumerate,assert_allclose,int,assert_equal,assert_dig_allclose,copy,_test_raw_reader,assert_array_equal,copytree,read_raw_ctf,len,endswith,tuple,slice,RandomState,permutation,zip,open,Raw,write,basename,arange,assert_true,str,mkdi... | Test read_ctf for missing cts. read raw CIF file and check for missing missing values Check that the raw cif file is a MNE - C . check if all components have a check if the file is updated and if so update the missing data. | why not just `op.join(data_path, 'MEG', ...)`? |
@@ -1030,11 +1030,7 @@ bool GenericAgentIsPolicyReloadNeeded(const GenericAgentConfig *config, const Po
// Check the directories first for speed and because non-input/data files should trigger an update
{
- char inputs_dir[MAX_FILENAME];
- snprintf(inputs_dir, MAX_FILENAME, "%s/inputs", CFWORK... | [No CFG could be retrieved] | Checks if the policy is valid and if so checks the timestamp of the last valid policy read Reads the next non - empty string from the input_files string set and checks if there. | Not nice: casting away constancy :-( I'll fix IsNewerFileTree() so that we can get rid of this cast later. |
@@ -5,6 +5,7 @@
using System;
using System.Globalization;
using System.Runtime.Serialization;
+using SharpDX;
namespace Microsoft.Xna.Framework
{
| [Vector2->[GetHashCode->[GetHashCode],Transform->[Length,Transform,Multiply],CatmullRom->[CatmullRom],SmoothStep->[SmoothStep],Hermite->[Hermite],Lerp->[Lerp],Barycentric->[Barycentric],Clamp->[Clamp],Equals->[Equals],ToString->[ToString]]] | - A class which contains the base unit of the national conditions. Replies the result of the vector addition of two vectors. | Can't do this... SharpDX is only for DirectX platforms. |
@@ -488,12 +488,9 @@ class Toolbox extends Component<Props> {
* @returns {void}
*/
_doToggleRaiseHand() {
- const { _localParticipantID, _raisedHand } = this.props;
- const newRaisedStatus = !_raisedHand;
+ const { _raisedHand } = this.props;
- this.props.dispatch(raiseHan... | [No CFG could be retrieved] | This method is called when a component is destroyed. Dispatches an action to toggle the video quality dialog. | Is this really no longer needed? Can we get rid of `APP.API.notifyRaiseHandUpdated` then? |
@@ -327,8 +327,9 @@ def stage_job_resources(
staged_path = utils.path.join(google_cloud_options.staging_location,
names.DATAFLOW_SDK_TARBALL_FILE)
if stage_tarball_from_remote_location:
- # If --sdk_location is not specified then the appropriate URL is built
- # ba... | [stage_job_resources->[_stage_extra_packages],_stage_dataflow_sdk_tarball->[_dependency_file_download,_dependency_file_copy],_stage_extra_packages->[_dependency_file_copy]] | Stage a job resource if needed. Reads a from the command line and stores it in the staging location. This function is used to stage the main session and copy the tarball to the staging location. Checks if a new version of the SDK is available and if so stage it. | PACKAGES_URL_PREFIX is no longer used, it could be deleted. |
@@ -375,6 +375,12 @@ public class AvroSchemaTest {
assertEquals(SCHEMA, new AvroRecordSchema().schemaFor(TypeDescriptor.of(TestAvro.class)));
}
+ @Test
+ public void testOptionsRecordSchema() {
+ assertEquals(
+ OPTIONS_SCHEMA, new AvroRecordSchema().schemaFor(TypeDescriptor.of(TestOptionsAvro.cla... | [AvroSchemaTest->[AvroSubPojo->[equals->[equals]],AvroPojo->[hashCode->[hashCode],toString->[toString],equals->[equals]],AvroSubPojo,AvroPojo]] | Test specific record schema. | :+1: good approach this test I like using a generated class for completeness. |
@@ -1507,7 +1507,8 @@ namespace ProtoCore
StackFrame stackFrame,
RuntimeCore runtimeCore,
SingleRunTraceData previousTraceData,
- SingleRunTraceData newTraceData)
+ SingleRunTraceData newTraceData,
+ FunctionEndPoint finalFuntionEndPoint = null)
... | [CallSite->[FunctionEndPoint->[GetCandidateFunctions],Inherits->[Inherits],StackValue->[UpdateCallsiteExecutionState,ComputeFeps,ArgumentSanityCheck,IsFunctionGroupAccessible],TraceSerialiserHelper->[GetObjectData->[GetObjectData]],SingleRunTraceData->[GetObjectData->[GetObjectData],RecursiveGetNestedData->[RecursiveGe... | This method is a slow path to execute a single chunk of code with a single - run This method is called to build the list of call parameters and the list of formal parameters that This method is called to find the best match for a given item in the list of replication This method is called to populate the list of all th... | please update the params summary above to match. |
@@ -54,7 +54,7 @@ namespace DSIronPython
/// </summary>
public const string packageExtraFolderName = @"extra";
- public override string Name => PythonNodeModels.PythonEngineVersion.IronPython2.ToString();
+ public override string Name => PythonEngineManager.IronPython2EngineName;
... | [IronPythonEvaluator->[EvaluateIronPythonScript->[Evaluate],Evaluate->[PythonStandardLibPath]]] | Creates a singleton instance of the IronPython evaluator class. Checks if the DynamoCore folder or extension bin folder is available in the path. | @pinzart90 do you need to make changes to the published ironPython package as well? |
@@ -7126,7 +7126,8 @@ uint32_t wallet2::adjust_priority(uint32_t priority)
// get the current full reward zone
uint64_t block_weight_limit = 0;
const auto result = m_node_rpc_proxy.get_block_weight_limit(block_weight_limit);
- throw_on_rpc_response_error(result, "get_info");
+ if (result)... | [No CFG could be retrieved] | Parse signed transaction data from binary and return signed transaction object. if the wallet has a multisig tx this function will import the key images for this tx. | Maybe report the error message? |
@@ -13,6 +13,7 @@ from .. import pick_types
from ..io.constants import FIFF
from ..utils import _clean_names
from ..externals.six.moves import map
+from scipy.spatial.distance import pdist
class Layout(object):
| [_auto_topomap_coords->[_pol_to_cart,_cart_to_sph],make_grid_layout->[Layout],find_layout->[read_layout,make_eeg_layout],read_layout->[_read_lout,Layout,_read_lay],make_eeg_layout->[Layout],_pair_grad_sensors->[_find_topomap_coords]] | A class to hold the data of a single object. Print a string representation of the object s n - th layout. | nitpick but imports should be done in a certain order. From the more general to the local files ex: import io import math import numpy import scipy import .what_ever can you move the scipy import up? thx |
@@ -57,9 +57,7 @@ import scala.Tuple2;
* Provides an RDD based API for accessing/filtering Hoodie tables, based on keys.
*/
public class HoodieReadClient<T extends HoodieRecordPayload> implements Serializable {
-
private static final long serialVersionUID = 1L;
- private static final Logger LOG = LogManager.ge... | [HoodieReadClient->[tagLocation->[tagLocation],readROView->[assertSqlContext,convertToDataFilePath]]] | Provides an RDD of Hoodie records. This is the constructor for HoodieReadClient. | It would be better to keep this empty line. |
@@ -96,7 +96,7 @@ namespace System.Numerics.Tensors
foreach (T item in fromArray)
{
- if (!item.Equals(Zero))
+ if (!item!.Equals(Zero))
{
var destIndex = ArrayUtilities.TransformIndexByStrides(index,... | [CompressedSparseTensor->[InsertAt->[EnsureCapacity],SetAt->[InsertAt,RemoveAt],ToDenseTensor->[SetValue],ToSparseTensor->[SetValue]]] | Creates a new CompressedSparseTensor with the given values compressedCounts indices nonZeroCount and Loop through items in fromArray and add them to the set if they are not zero. | Are we missing some easier qualification? Maybe just an `Assert(item is not null)` at the start of the foreach? |
@@ -362,11 +362,12 @@ class CancelOrderLineForm(forms.Form):
super().__init__(*args, **kwargs)
def cancel_line(self):
- if self.line.variant and self.line.variant.track_inventory:
- deallocate_stock(self.line.variant, self.line.quantity)
- order = self.line.order
- self.l... | [CancelFulfillmentForm->[cancel_fulfillment->[cancel_fulfillment]],CapturePaymentForm->[capture->[try_payment_action]],VoidPaymentForm->[void->[payment_error]],RefundPaymentForm->[refund->[try_payment_action]],CancelOrderForm->[cancel_order->[cancel_order]],ManagePaymentForm->[try_payment_action->[payment_error]]] | Cancels the current line. | How does canceling order lines work, when there is no variant then? Shouldn't we trigger `delete_order_line` and `recalculate_order` always? |
@@ -107,6 +107,9 @@ public class InMemoryTimerInternals implements TimerInternals {
setTimer(TimerData.of(timerId, namespace, target, timeDomain));
}
+ /**
+ * @deprecated use {@link #setTimer(StateNamespace, String, Instant, TimeDomain)}.
+ */
@Deprecated
@Override
public void setTimer(TimerDat... | [InMemoryTimerInternals->[toString->[toString],setTimer->[timersForDomain,setTimer],deleteTimer->[deleteTimer],removeNextTimer->[timersForDomain]]] | Sets a timer in the state. | I think here you can do `@inheritdoc` so you don't have to spell it out again. And same throughout. |
@@ -1031,7 +1031,8 @@ function stats_dashboard_widget_content() {
$post_ids = array();
- $csv_args = array( 'top' => '&limit=8', 'search' => '&limit=5' );
+ $csv_end_date = date( 'Y-m-d', current_time( 'timestamp' ) );
+ $csv_args = array( 'top' => "&limit=8&end=$csv_end_date", 'search' => "&limit=5&end=$csv_end_... | [stats_print_wp_remote_error->[get_error_messages,get_error_codes],stats_admin_bar_menu->[add_menu],stats_template_redirect->[get_queried_object_id]] | This function returns the content of the stats dashboard widget. This function is called when the server responds with a remote error. It will display the post This function render a page that displays a list of top posts that can be searched for. | Why `date( 'Y-m-d', current_time( 'timestamp' ) )` instead of `date( 'Y-m-d', time() )` or even just `date( 'Y-m-d' )`? |
@@ -178,6 +178,7 @@ public class GreedyPipelineFuserTest {
* becomes all runner-executed
*/
@Test
+ @Ignore
public void unknownTransformsNoEnvironmentBecomeRunnerExecuted() {
Components components =
partialComponents
| [GreedyPipelineFuserTest->[sanitizedTransforms->[pc]]] | Checks if the pipeline has unknown transforms that have no environment become runnig. | This test needs to be fixed instead of ignored. |
@@ -146,7 +146,7 @@ class DefineWakeProcess(KratosMultiphysics.Process):
# This function computes the distance of the element nodes
# to the wake
nodal_distances_to_wake = KratosMultiphysics.Vector(3)
- counter = 0
+ counter = 0
for elnode in elem.GetNodes():
... | [DefineWakeProcess->[MarkWakeTEElement->[CheckIfElemIsCutByWake],__init__->[__init__]]] | Compute the distance of the nodes to the wake. | please configure your editor to delete trailing whitespaces when saving a file |
@@ -222,9 +222,15 @@ class Auth::DefaultCurrentUserProvider
@env[CURRENT_USER_KEY] = user
end
- def cookie_hash(unhashed_auth_token)
+ def cookie_hash(unhashed_auth_token, user)
+ cookie = DiscourseAuthCookie.new(
+ token: unhashed_auth_token,
+ user_id: user.id,
+ trust_level: user.trust_... | [lookup_api_user->[ip,to_i,update_columns,downcase,user,now,header_api_key?,warn,username_lower,first,request_allowed?,find_by,can_write?,try],refresh_session->[is_api?,ip,cookie_hash,unhashed_auth_token,trigger,key?,user,auth_token_seen,ago,rotate!,rotated_at,is_user_api?,delete],cookie_hash->[from_now,same_site_cooki... | Log a user in the session and cookies. | Using the rotate time is good here. However, ROTATE_TIME is the **minimum** amount of time before the server will rotate a client's token. Therefore, I think we should add a little leeway (maybe 1 minute or so), to make sure the client has been given a chance to rotate the token before we remove their rate-limit-bypass... |
@@ -233,7 +233,10 @@ public class InputRowSerde
typeHelper = STRING_HELPER;
}
writeString(dim, out);
- typeHelper.serialize(out, row.getRaw(dim), reportParseExceptions);
+ String parseExceptionMessage = typeHelper.serialize(out, row.getRaw(dim), true);
+ if ... | [InputRowSerde->[fromBytes->[fromBytes,readBytes,getType,readString,get,deserialize],toBytes->[serialize,toBytes,get],readStringArray->[readString],writeString->[writeBytes],writeStringArray->[writeString]]] | Serializes the given input row into a byte array. if agg is empty return null ;. | Probably `reportParseExceptions` should be passed instead of `true`? |
@@ -14,7 +14,7 @@ module Suggester
where("positive_reactions_count > ?", reaction_count).
where("published_at > ?", 4.months.ago).
where("user_id != ?", user.id).
- where.not(user_id: user.following_by_type("User").pluck(:id)).
+ where.not(user_id: user.follo... | [Sidebar->[generate_cache_name->[id,last_followed_at],suggest->[fetch,uniq,to_a,pluck,production?,hours],attr_accessor]] | Suggest a that can be used to generate a cache key. | by default, if no `select()` statement is added, Rails selects primary keys, the ID |
@@ -122,6 +122,8 @@ type PruneOptions struct {
//go:generate go run ../generator/generator.go RemoveOptions
// RemoveOptions are optional options for removing containers
type RemoveOptions struct {
+ All *bool
+ Ignore *bool
Force *bool
Volumes *bool
}
| [No CFG could be retrieved] | type is the type of the object. StatsOptions struct for the HMC. | I'm going to assume that Tom will ask you to sort those |
@@ -1,6 +1,6 @@
# Builtins stub used in tuple-related test cases.
-from typing import Iterable, TypeVar, Generic, Sequence
+from typing import Iterable, Iterator, TypeVar, Generic, Sequence, overload
Tco = TypeVar('Tco', covariant=True)
| [No CFG could be retrieved] | Built - in stub used in tuple - related test cases. | You can revert these imports too. |
@@ -49,8 +49,14 @@ func (s *Storage) Create(ctx kubeapi.Context, obj runtime.Object) (<-chan runtim
"expression": NewExpressionValueGenerator(rand.New(rand.NewSource(time.Now().UnixNano()))),
}
processor := NewTemplateProcessor(generators)
- config, err := processor.Process(template)
- return config, err
+ ... | [Create->[New],Get->[New],List->[New],Delete->[New],Update->[New]] | Create creates a new storage object. | I just noticed, but this block should be done outside of make async (do that as a follow on pull please). |
@@ -3740,9 +3740,13 @@ static int test_ciphersuite_change(void)
const SSL_CIPHER *aes_128_gcm_sha256 = NULL;
/* Create a session based on SHA-256 */
- if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(),
- TLS1_VERSION, 0,
+ if (!TEST_true(... | [No CFG could be retrieved] | This function creates a new session based on SHA - 256 cipher. Initializes the server and client SSL objects. | Are these extra cipher suites needed here? |
@@ -8,6 +8,7 @@ from numba.tests.support import linux_only
@skip_on_cudasim('CUDA Driver API unsupported in the simulator')
+@unittest.skip
@linux_only
@skip_on_arm('Managed Alloc support is experimental/untested on ARM')
class TestManagedAlloc(ContextResettingTestCase):
| [TestManagedAlloc->[test_managed_array_attach_global->[_test_managed_array],test_managed_array_attach_host->[skip_if_cc_major_lt,_test_managed_array],_test_managed_alloc_driver->[get_total_gpu_memory],test_managed_alloc_driver_undersubscribe->[skip_if_cc_major_lt],test_managed_alloc_driver_host_attach->[skip_if_cc_majo... | Get the total GPU memory. | Was this added in error? |
@@ -192,6 +192,17 @@ private:
double m_last_fraction;
};
+class gtrak10_state : public driver_device
+{
+public:
+ gtrak10_state(const machine_config &mconfig, device_type type, const char *tag)
+ : driver_device(mconfig, type, tag)
+ {
+ }
+
+ void gtrak10(machine_config &config);
+};
+
static NETLIST_START(ata... | [No CFG could be retrieved] | region NetworkList probe methods Initialize the machine with the specified parameters. | There's no point overriding these if you're not doing anything. Also you have superfluous semicolons. |
@@ -68,7 +68,9 @@ class ConanException(Exception):
"""
Generic conans exception
"""
- pass
+ def __init__(self, *args, **kwargs):
+ self.info = None
+ super(ConanException, self).__init__(*args, **kwargs)
class ConanManifestException(ConanException):
| [_format_conanfile_exception->[append,exc_info,str,get_env,format_exc,join,extract_tb],conanfile_exception_formatter->[ConanExceptionInUserConanfileMethod,_format_conanfile_exception]] | Format the exception of a nested exception in the user conanfile. Return the object of the given type of object. | No one is setting the info yet? |
@@ -718,15 +718,15 @@ module ActsAsXapian
ActsAsXapian.writable_db.close # just to make an empty one to read
# Index everything
if safe_rebuild
- _rebuild_index_safely(model_classes, verbose, terms, values, texts)
+ _destroy_and_rebuild_index(model_classes, verbose, terms, values, texts)
e... | [init_query_parser->[stemmer],rebuild_index->[writable_init,db_path,_is_xapian_db],xapian_destroy->[xapian_document_term],writable_init->[stemmer,bindings_available],xapian_index->[xapian_value,xapian_document_term],Search->[initialize->[initialize_db,initialize_query]],readable_init->[bindings_available],_rebuild_inde... | Rebuild index for all model classes if there is a database with the same name and path as old_path and old_. | Line is too long. [106/80] |
@@ -169,12 +169,14 @@ namespace NServiceBus
public static void RegisterEncryptionService(this EndpointConfiguration config, Func<IEncryptionService> func)
{
Guard.AgainstNull(nameof(config), config);
- config.Settings.Set("EncryptionServiceConstructor", func);
+
+ co... | [ConfigureRijndaelEncryptionService->[AddKeyIdentifierItems->[ParseKey]]] | Register encryption service. | instead of manually enabling the feature on the settings which trigger activation, couldn't we check for the setting value on the feature setup as a prerequisite and let the feature disable itself? |
@@ -185,7 +185,7 @@ public class DefaultOutboundFlowController implements OutboundFlowController {
*/
private class StreamState {
private final int streamId;
- private final Queue<PendingWrite> pendingWriteQueue = Lists.newLinkedList();
+ private final Queue<PendingWrite> pendingWriteQ... | [DefaultOutboundFlowController->[StreamState->[addAndGetWindow->[isIntegerOverflow],writePendingFrames->[readPartialFrame,peekPendingWrite,hasPendingWrite,writeFrame,writableWindow,removePendingWrite]],addAndGetConnectionWindowSize->[isIntegerOverflow],writePendingFrames->[writePendingFrames,getStateOrFail],writeFrame-... | Replies if the given value will cause an integer overflow. This method returns null if the window size is greater than 0. | Why not use an ArrayDeque ? |
@@ -230,11 +230,14 @@ public class HttpSyncer {
Request.Builder requestBuilder = new Request.Builder();
requestBuilder.url(parseUrl(url));
+ // Set our request up to count upstream traffic including headers
requestBuilder.post(new CountingFileRequestBody(tmpFileBuffer... | [HttpSyncer->[getHostNum->[getHostNum],publishProgress->[publishProgress],ProgressByteEntity->[writeTo->[publishProgress]],getDefaultAnkiWebUrl->[getUrlPrefix,getHostNum],req->[req,assertOk,getHttpClient]]] | This method is used to send a request to the server. This method is used to send an HTTP request to the Anki Desktop API and get. | two semicolons - can't suggest here |
@@ -113,6 +113,9 @@ import static org.apache.gobblin.cluster.GobblinClusterConfigurationKeys.CLUSTER
*/
@Alpha
public class GobblinTaskRunner implements StandardMetricsBridge {
+ // Working directory key for applications. This config is set dynamically.
+ public static final String CLUSTER_APP_WORK_DIR = GobblinC... | [GobblinTaskRunner->[saveConfigToFile->[saveConfigToFile],ParticipantShutdownMessageHandlerFactory->[getMessageTypes->[getMessageType],ParticipantShutdownMessageHandler->[handleMessage->[run->[stop]]]],createTaskStateModelFactory->[getReceiverManager],addInstanceTags->[getReceiverManager],addShutdownHook->[run->[stop],... | This class is used to run a Gobblin task. It is a subclass of Initializes a new GobblinTaskRunner. | If set dynamically, shall make it package private instead of globally accessible ? |
@@ -85,7 +85,8 @@ public class SchemaKGroupedStream {
} else {
keyFormat = SerdeFeaturesFactory.sanitizeKeyFormat(
this.keyFormat,
- schema.key().size() == 1
+ schema.key().size(),
+ false
);
step = ExecutionStepFactory.streamAggregate(
contextS... | [SchemaKGroupedStream->[getKeyFormat->[size,sanitizeKeyFormat,getWindowInfo,getFormatInfo,windowed,getFeatures],resolveSchema->[resolve],aggregate->[of,size,sanitizeKeyFormat,isPresent,streamAggregate,SchemaKTable,get,getKeyFormat,streamWindowedAggregate,getKsqlWindowExpression,resolveSchema],requireNonNull]] | Aggregate a set of columns and values. | Just for clarification: why do we allow change key format change in groupBy / selectKey but not in aggregate? Is the internal formats of groupBy / selectKey used for the repartition topic, not the aggregate? |
@@ -31,9 +31,9 @@
public int NumberOfTimesInvoked { get; set; }
}
- public class SagaMessageThroughDelayedRetryEndpoint : EndpointConfigurationBuilder
+ public class Saga09Endpoint : EndpointConfigurationBuilder
{
- public SagaMessageThroughDelayedRetryEndpoint(... | [When_saga_message_goes_through_delayed_retries->[Task->[Run],SagaMessageThroughDelayedRetryEndpoint->[DelayedRetryTestingSaga->[Task->[SendLocal,NumberOfTimesInvoked,SecondMessageProcessed,FromResult,SomeId],ConfigureHowToFindSaga->[SomeId,ToSaga]],FromMilliseconds,NumberOfRetries,Delayed,b,TimeIncrease,Recoverability... | The base class for all SagaMessages that are not part of the Saga This method is called by the second saga when it is needed to find the saga. | This gets useless to the point where we can actually random guid name the endpoints. I really dislike where this is moving. |
@@ -687,6 +687,10 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
if ((clusterName != null || clusterId != null) && podId == null) {
throw new InvalidParameterValueException("Can't specify cluster without specifying the pod");
}
+ if (!Hypervisor... | [ResourceManagerImpl->[getGPUDevice->[listAvailableGPUDevice],updateClusterPassword->[doUpdateHostPassword],attemptMaintain->[setHostIntoMaintenance,setHostIntoPrepareForMaintenanceAfterErrorsFixed,setHostIntoErrorInMaintenance,setHostIntoErrorInPrepareForMaintenance],createHostAndAgentDeferred->[markHostAsDisconnected... | Discover all hosts in a specific cluster. create a new cluster object if no cluster id is specified Finds a cluster with the given id and adds it to the cluster details. Checks if there is a host in the cluster and if so adds it to the hosts list Post discovery of the server resources. | We could import `org.apache.commons.lang3.StringUtils` here and use `StringUtils.isAnyEmpty(username, password)`. |
@@ -35,6 +35,7 @@ public class NodeSchedulerConfig
private int maxSplitsPerNode = 100;
private int maxPendingSplitsPerTask = 10;
private String networkTopology = NetworkTopologyType.LEGACY;
+ private boolean optimizedLocalScheduling = true;
@NotNull
public String getNetworkTopology()
| [No CFG could be retrieved] | Gets the network topology of the node. | Set the default to `true` |
@@ -0,0 +1,15 @@
+package com.baeldung.autoservice;
+
+import com.google.auto.service.AutoService;
+
+import java.util.Locale;
+
+@AutoService(TranslationService.class)
+public class BingTranslationServiceProvider implements TranslationService {
+
+ public String translate(String message, Locale from, Locale to) {
+... | [No CFG could be retrieved] | No Summary Found. | Add the Override annotation |
@@ -36,6 +36,7 @@ ClientScripting::ClientScripting(Client *client):
ScriptApiBase()
{
setGameDef(client);
+ setType(ScriptingType::Client);
SCRIPTAPI_PRECHECKHEADER
| [ ScriptApiBase->[lua_setglobal,lua_setfield,setGameDef,lua_gettop,lua_newtable,getMinimap,InitializeModApi,lua_getglobal,lua_pop,lua_pushstring],on_camera_ready->[getStack],on_client_ready->[getStack]] | Script API for initializing client game modules. | Should be a constructor argument. |
@@ -43,7 +43,7 @@ UI *UI_new_method(const UI_METHOD *method)
ret->meth = method;
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_UI, ret, &ret->ex_data)) {
- OPENSSL_free(ret);
+ UI_free(ret);
return NULL;
}
return ret;
| [UI_add_input_boolean->[general_allocate_boolean],UI_dup_user_data->[UI_add_user_data,ERR_raise],UI_add_error_string->[general_allocate_string],UI_dup_input_boolean->[OPENSSL_free,general_allocate_boolean,ERR_raise,OPENSSL_strdup],UI_dup_info_string->[general_allocate_string,ERR_raise,OPENSSL_strdup],int->[sk_UI_STRING... | This function creates a new UI object from a given method. | Is this safe to call CRYPTO_free_ex_data here? (i.e. it is called internally from UI_free()) |
@@ -262,13 +262,13 @@ class DeletedKey(KeyVaultKey):
def __init__(
self,
properties, # type: KeyProperties
- key_material=None, # type: _models.JsonWebKey
deleted_date=None, # type: Optional[datetime]
recovery_id=None, # type: Optional[str]
scheduled_purge_da... | [DeletedKey->[_from_deleted_key_item->[_from_key_item],_from_deleted_key_bundle->[_from_key_bundle]],KeyVaultKey->[_from_key_bundle->[_from_key_bundle]]] | Initialize a DeletedKey object with the specified properties. | Super of DeletedKey would seem to be KeyVaultKey, which above was changed to require key_id as a first arg?) |
@@ -78,6 +78,9 @@ RSpec.configure do |config|
# includes FactoryGirl in rspec
config.include FactoryGirl::Syntax::Methods
+ # Devise
+ config.include Devise::Test::ControllerHelpers, type: :controller
+ config.extend ControllerMacros, :type => :controller
end
# config shoulda matchers to work with rspec
| [start,integrate,fixture_path,infer_spec_type_from_file_location!,filter_rails_from_backtrace!,root,before,clean_with,require,include,use_transactional_fixtures,strategy,production?,test_framework,clean,library,abort,after,configure,maintain_test_schema!,expand_path] | Infer spec type from file location. | Use the new Ruby 1.9 hash syntax. |
@@ -52,7 +52,11 @@ final class AnnotationResourceMetadataFactory implements ResourceMetadataFactory
return $this->handleNotFound($parentResourceMetadata, $resourceClass);
}
- $resourceAnnotation = $this->reader->getClassAnnotation($reflectionClass, ApiResource::class);
+ $resourceA... | [AnnotationResourceMetadataFactory->[create->[create]]] | Creates a new resource metadata for the given class. | Why the change? |
@@ -180,7 +180,12 @@ def triplet_semihard_loss(labels, embeddings, margin=1.0):
labels = array_ops.reshape(labels, [lshape[0], 1])
# Build pairwise squared distance matrix.
- pdist_matrix = pairwise_distance(embeddings, squared=True)
+ if metric == 'euclidean':
+ pdist_matrix = pairwise_distance(embeddings... | [lifted_struct_loss->[pairwise_distance],compute_augmented_facility_locations_pam->[get_cluster_assignment,update_all_medoids],update_all_medoids->[func_body_augmented_pam->[update_medoid_per_cluster]],update_medoid_per_cluster->[func_body->[update_1d_tensor,compute_clustering_score,get_cluster_assignment],update_1d_te... | Computes the triplet loss with semi - hard negative mining. Reduce the sum of all non - negative negative pairs and return the loss of the missing node. | Don't change previous default behavior squared=True |
@@ -228,7 +228,7 @@ def _parse_file(conan_file_path):
try:
module_id = str(uuid.uuid1())
current_dir = os.path.dirname(conan_file_path)
- sys.path.append(current_dir)
+ sys.path.insert(0, current_dir)
old_modules = list(sys.modules.keys())
with chdir(current_dir):
... | [ConanFileLoader->[load_basic->[load_class],load_conanfile->[load_basic],load_export->[load_class]]] | Parse a conan file and obtain the in memory python import and module_id. | It won't ever happen, but... I would put these three lines outside the `try` block to be sure that the `finally` block removes the inserted path (otherwise, if one of these lines raises, we are removing something else from the path list). |
@@ -103,6 +103,18 @@ namespace Microsoft.XmlSerializer.Generator
assembly = args[i];
}
}
+ else if (ArgumentMatch(arg, "default-namespace"))
+ {
+ i++;
+ if (i >... | [Sgen->[FormatMessage->[FormatMessage],WriteError->[WriteError,FormatMessage],Assembly->[WriteWarning],WriteWarning->[WriteWarning,FormatMessage],GetXmlSerializerAssemblyName->[GetXmlSerializerAssemblyName]]] | Parses command - line arguments and runs the n - ary command. Checks if the argument is a valid . If it is it checks if the argument is Checks if a node in the tree has a node with a node in the tree that has. | Looking at the "assembly" argument above, it looks like specifying this more than once (ie, defaultNamespace != null) should probably produce an error. Also, I don't have historical context on sgen, so maybe Matt has an opinion... but also based on looking at other arguments, perhaps a short argument name is appropriat... |
@@ -52,8 +52,15 @@ Rpush.reflect do |on|
# end
# Called when a notification is successfully delivered.
- # on.notification_delivered do |notification|
- # end
+ on.notification_delivered do |notification|
+ ForemStatsClient.increment(
+ "push_notifications.delivered",
+ tags: [
+ "app_id:... | [batch_size,logger,notification_failed,reflect,log_level,client,foreground_logging,class,push_poll,configure,level,increment,redis_options,destroy_all,error_description] | The main method of the application that handles the notification delivery. Calls deliver_after and retries for the number of times this notification has been retried. | @fdoxyz Are we using/registering any kind of category for push notifications? I'm concerned that we won't be able to record what type of notification we're sending: that's not an issue now with only one push notification type being send, but I can see it being an issue in the future! |
@@ -4,12 +4,18 @@ import os
import random
import unicodedata
+from collections import defaultdict
+
+import itertools
from django.conf import settings
from django.core.files import File
+from django.template.defaultfilters import slugify
from faker import Factory
from faker.providers import BaseProvider
from p... | [create_fake_user->[create_address,get_email],create_product_images->[create_product_image],create_fake_order->[create_delivery_group,create_address,get_email,create_payment,create_order_lines],create_delivery_group->[price,shipping_method],create_order_lines->[create_order_line],create_users->[create_fake_user],create... | Create a random object for the object with the name of the object. Create a product object with optional default values. | Why are these not with system imports? |
@@ -93,7 +93,7 @@ class NnicliValidator(ITValidator):
def __call__(self, rest_endpoint, experiment_dir, nni_source_dir, **kwargs):
print(rest_endpoint)
exp = Experiment()
- exp.connect_experiment(rest_endpoint)
+ exp.connect_experiment(int(rest_endpoint.split(':')[-1]))
pri... | [ImportValidator->[__call__->[split,load_search_space,get,format,run]],ExportValidator->[__call__->[readlines,split,print,join,run,remove,open]],NnicliValidator->[__call__->[get_experiment_status,print,connect_experiment,list_trial_jobs,Experiment,get_job_statistics]],MetricsValidator->[__call__->[check_metrics],check_... | This method is called when the experiment is started. | Is this the correct way to get the port part? What if the endpoint ends with `/`? |
@@ -158,11 +158,6 @@ class CompressorTestCase(TestCase):
assert all(masks.sum((1)) == np.array([45., 45., 45., 45., 0., 0., 45., 45., 45., 45.]))
- model.layers[2].set_weights([weights[0], weights[1].numpy()])
- masks = pruner.calc_mask(layer, config_list[1]).numpy()
- masks = masks.re... | [CompressorTestCase->[test_torch_slim_pruner->[TorchModel],test_tf_fpgm_pruner->[get_tf_model],test_torch_fpgm_pruner->[TorchModel],test_torch_level_pruner->[TorchModel],test_torch_QAT_quantizer->[TorchModel],test_torch_quantizer_modules_detection->[TorchModel],test_torch_l1filter_pruner->[TorchModel],test_torch_naive_... | Test the FPGM pruner. Missing filter - only layers with sparsity 0. 2 and sparsity 0. 6. | why this part is removed? |
@@ -565,6 +565,15 @@ export default createWidget("post-menu", {
}
}
+ const extraPostControls = applyDecorators(
+ this,
+ "extra-post-controls",
+ attrs,
+ state
+ );
+
+ postControls.push(extraPostControls);
+
const extraControls = applyDecorators(this, "extra-controls"... | [No CFG could be retrieved] | Creates a list of extra buttons. Add a menu item to the menu. | can we use: `after-post-controls` instead ? |
@@ -38,6 +38,15 @@ namespace Dynamo.Wpf
};
nodeView.MainContextMenu.Items.Add(editPropertiesItem);
editPropertiesItem.Click += (sender, args) => EditCustomNodeProperties();
+ CustomNodeWorkspaceModel ws;
+ dynamoViewModel.Model.CustomNodeManager.TryGetFunctio... | [FunctionNodeViewCustomization->[EditCustomNodeProperties->[TryGetFunctionWorkspace,OnRequestsFunctionNamePrompt,TryGetNodeInfo,Save,IsTestMode,LiveRunnerRuntimeCore,Name,Category,Description,IsNullOrEmpty,FileName,Substring,FunctionId,SetInfo,Model,Success],CustomizeView->[CommandParameter,UpdateLayout,ContextMenuEdit... | CustomizeView Customizes a node view. | what if WS is null, add a null check. |
@@ -2,6 +2,7 @@
using System.Windows;
using System.Windows.Controls;
using Dynamo.Models;
+using Dynamo.Nodes.Search;
namespace Dynamo.Controls
{
| [No CFG could be retrieved] | DynamoDbTemplateSelector class is used to provide a DataTemplateSelector for a given object. | See the main conversation page for details of updating this template selector. |
@@ -234,7 +234,7 @@ ec_array_encode(struct ec_params *params, daos_obj_id_t oid, daos_iod_t *iod,
*/
static int
ec_update_params(struct ec_params *params, daos_iod_t *iod, d_sg_list_t *sgl,
- unsigned int len)
+ unsigned int len, unsigned int k)
{
daos_recx_t *nrecx;
unsigned int i;
| [ec_obj_update_encode->[ec_set_head_params,ec_init_tgt_set,tse_task_register_comp_cb,ec_free_params,D_ASSERT,ec_has_full_stripe,dc_task_get_args,ec_array_encode,ec_init_params,ec_update_params,D_ALLOC_PTR],void->[D_ASSERT,memset,D_FREE],int->[ec_move_sgl_cursors,D_ALLOC,D_FREE,D_REALLOC_ARRAY,ec_free_params,D_ALLOC_ARR... | - - - - - - - - - - - - - - - - - -. | how about just passing in daos_ec_attr as parameter? |
@@ -261,16 +261,6 @@ func TestAPIServerConfigEnableRbac(t *testing.T) {
a["--authorization-mode"])
}
- // Test EnableRbac = true with 1.6 cluster
- cs = CreateMockContainerService("testcluster", "1.6.11", 3, 2, false)
- cs.Properties.OrchestratorProfile.KubernetesConfig.EnableRbac = to.BoolPtr(true)
- cs.setAPI... | [Itoa,BoolPtr,Sprintf,Contains,GetCosmosEndPointURI,setAPIServerConfig,Fatalf,RationalizeReleaseAndVersion] | TestAPIServerConfigEnableRbac tests the config values for the API server. 2016 - 03 - 15. | these tests are no longer relevant |
@@ -304,7 +304,7 @@ class Jetpack_Gutenberg {
public static function get_preset( $preset ) {
return json_decode(
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
- file_get_contents( JETPACK__PLUGIN_DIR . self::get_blocks_directory() . $preset . '.json' )
+ file_get_con... | [Jetpack_Gutenberg->[is_registered->[is_registered]]] | Get the block preset. | Could we get rid of `$preset` variable and assume it's `index`? |
@@ -115,6 +115,7 @@ public class V20161122174500_AssignIndexSetsToStreamsMigration extends Migration
@JsonAutoDetect
@AutoValue
+@WithBeanGetter
public static abstract class MigrationCompleted {
@JsonProperty("index_set_id")
public abstract String indexSetId();
| [V20161122174500_AssignIndexSetsToStreamsMigration->[upgrade->[create,info,builder,post,debug,getIndexSetId,error,isNullOrEmpty,loadAll,setIndexSetId,title,id,write,build,get,findDefaultIndexSet,getId,add,save,getTitle],findDefaultIndexSet->[findAll,checkState,size,orElseThrow,IllegalStateException],createdAt->[parse],... | This abstract is used to determine if a node is in the index set. | Nitpick: indentation is broken (for several classes) |
@@ -100,13 +100,6 @@ class AmpBrightcove extends AMP.BaseElement {
return isLayoutSizeDefined(layout);
}
- /** @override */
- viewportCallback(visible) {
- this.element.dispatchCustomEvent(VideoEvents.VISIBILITY, {
- visible,
- });
- }
-
/** @override */
buildCallback() {
this.urlRepl... | [No CFG could be retrieved] | Initializes the object variables. Sends a command to the player through postMessage. | This is blocked on the video PR, right? We need to make sure we don't merge in the wrong order. |
@@ -63,6 +63,10 @@
<%= f.label :contact_consent, "Recruiters can contact me about job opportunities" %>
<%= f.check_box :contact_consent %>
</div>
+ <div class="field checkbox-label-first">
+ <%= f.label :pentester, "I'm a pentester" %>
+ <%= f.check_box :pentester %>
+ </div>
<div class="field"... | [No CFG could be retrieved] | Displays a hidden field in the administration panel that holds all of the user s national A field in the administration panel that shows the most experienced . This is. | I'm a little worried some people might be confused as to why this is here so I'm wondering if we should explain it more. Maybe a hover-over text or something with a description? > Do you plan to use this account to attempt to find security vulnerabilities within the DEV platform? If so please check this box. Other idea... |
@@ -49,6 +49,11 @@ public abstract class LibvirtConsoleProxyLoadCommandWrapper<T extends Command, A
final URL url = new URL(sb.toString());
final URLConnection conn = url.openConnection();
+ // setting TIMEOUTs to avoid possible waiting until death situations
+ conn.set... | [LibvirtConsoleProxyLoadCommandWrapper->[executeProxyLoadScan->[append,StringBuilder,close,getInputStream,openConnection,InputStreamReader,readLine,toString,StringBuffer,BufferedReader,warn,URL,ConsoleProxyLoadAnswer],getLogger]] | Execute a proxy load scan. | @wilderrodrigues You may also want to get this into the libvirt refactor work you're doing. This is a copy/paste from: git/rsafonseca/cloudstack/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/citrix/CitrixConsoleProxyLoadCommandWrapper.java |
@@ -342,6 +342,14 @@ if ($action == 'create' && !$error) {
print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td colspan="2">';
$html->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id');
print '</td></tr>';
+ // Multicurrency
+... | [fetch,create,select_projects,fetch_object,jdate,addline,getDocumentsLink,select_date,select_conditions_paiements,classifyBilled,getNomUrl,rollback,begin,initHooks,idate,load,executeHooks,setOptionalsFromPost,fetch_lines,select_types_paiements,LibStatut,close,showOptionals,free,query,fetch_name_optionals_label,trans,nu... | Print a list of hidden input tags that can be selected by the user. Direkt eine nuevo . | Why do you have to ask the user the currency ? The generated invoice is generated from order. If order was in currency X, invoice should be in currency X, if order is in currency Y, invoice should be in currency Y (invoice should match order), so why asking customer ? |
@@ -131,7 +131,7 @@ class SortedIntList extends AbstractList<Integer> {
}
public boolean isInRange(int idx) {
- return 0<=idx && idx<size;
+ return find(idx)>-1;
}
public void sort() {
| [SortedIntList->[contains->[contains,find],higher->[find],ceil->[find],add->[add],lower->[find],removeValue->[find],floor->[find],sort->[sort]]] | check if idx is in range of the array. | This should be trivial to unittest. |
@@ -0,0 +1,17 @@
+from django.conf import settings
+
+from .models import SiteSetting
+
+
+def get_site_settings_and_add_to_request(request):
+ settings_id = getattr(settings, 'SITE_SETTINGS_ID', None)
+ try:
+ site_settings = SiteSetting.objects.get(id=settings_id)
+ except SiteSetting.DoesNotExist:
+ ... | [No CFG could be retrieved] | No Summary Found. | Wouldn't that become `get_site_settings_cached` or just `get_site_settings`? Technically it's not request-specific and it should return `request.site_settings` if it's already set and call `get_site_settings_uncached` otherwise. |
@@ -199,4 +199,18 @@ module TopicGuardian
false
end
+
+ def can_perform_action_available_to_group_moderators?(topic)
+ return false if anonymous? || topic.nil?
+ return true if is_staff?
+ return true if @user.has_trust_level?(TrustLevel[4])
+
+ SiteSetting.enable_category_group_moderation? &&
+ ... | [can_edit_topic?->[can_create_topic_on_category?],can_move_topic_to_category?->[can_create_topic_on_category?],can_edit_tags?->[can_edit_topic?],can_see_topic?->[can_see_deleted_topics?],can_create_topic_on_category?->[can_create_topic?]] | Checks if user can edit tags for a topic or a post. | Could trust level 4 previously close and archive topics? I didn't think they could! |
@@ -70,7 +70,7 @@ setup(
'Programming Language :: Python :: 3.7',
'License :: OSI Approved :: MIT License',
],
- zip_safe=False,
+ zip_safe=True,
packages=find_packages(exclude=[
'tests',
# Exclude packages that will be covered by PEP420 or nspkg
| [find_packages,setup,search,replace,read,format,join,RuntimeError,open,Exception] | Package hierarchy. | 3.8 and remove 3.4 |
@@ -249,8 +249,8 @@ decode_initial(data_desc_t *desc, char *desc_buffer)
uint64_t value64;
int i;
- if (desc->iods == NULL || desc->sgls == NULL
- || desc->recxs == NULL || desc->iovs == NULL) {
+ if (desc->iods == NULL | desc->sgls == NULL
+ | desc->recxs == NULL | desc->iovs == NULL) {
return CUSTOM_ERR3;
... | [No CFG could be retrieved] | region DAOS Object API Methods - - - - - - - - - - - - - - - - - -. | Just wondering why you changed "||" to "|" ? For C code styles, we normally did it using "||" to do or check condition. |
@@ -59,7 +59,7 @@ class FileMenu {
return menuFileSave;
}
- JMenuItem addPostPBEM() {
+ private JMenuItem addPostPbem() {
final JMenuItem menuPbem = new JMenuItem(SwingAction.of("Post PBEM/PBF Gamesave", e -> {
if (gameData == null || !PBEMMessagePoster.gameDataHasPlayByEmailOrForumMessengers(ga... | [FileMenu->[createSaveMenu->[getKeyStroke,of,setAccelerator,saveGame,setMnemonic,showMessageDialog,JMenuItem,getSaveGameLocation,getMenuShortcutKeyMask],addPostPBEM->[gameDataHasPlayByEmailOrForumMessengers,acquireReadLock,getStep,getPlayerID,of,HistoryLog,getKeyStroke,setAccelerator,releaseReadLock,setMnemonic,PBEMMes... | Creates the save menu for the game. Magic. | This method was not used outside of this class, so I reduced its visibility to private when I renamed it. |
@@ -342,6 +342,8 @@ def _create_order(
"""
from ..order.utils import add_gift_card_to_order
+ Allocation.objects.select_for_update(of=("self",))
+
order = Order.objects.filter(checkout_token=checkout.token).first()
if order is not None:
return order
| [_process_payment->[release_voucher_usage],complete_checkout->[_process_payment,_create_order,release_voucher_usage,_get_order_data,_prepare_checkout],_prepare_order_data->[_process_user_data_for_order,_create_lines_for_order,_process_shipping_data_for_order,_get_voucher_data_for_order,_validate_gift_cards],_create_lin... | Create an order from the given order_data and user. Missing order object - send the order confirmation email and the staff order confirmation. | Have you tried locking allocation inside `allocate_stocks`? This is the function that is supposed to handle that, so it would be nice to have this logic there. |
@@ -192,7 +192,7 @@ public abstract class ProxyHandler extends ChannelDuplexHandler {
* Sends the initial message to be sent to the proxy server. This method also starts a timeout task which marks
* the {@link #connectPromise} as failure if the connection attempt does not success within the timeout.
*... | [ProxyHandler->[setConnectFailure->[safeRemoveDecoder,safeRemoveEncoder],connect->[connect],write->[write],setConnectSuccess->[authScheme,protocol],safeRemoveDecoder->[removeDecoder],LazyChannelPromise->[executor->[executor]],safeRemoveEncoder->[removeEncoder],flush->[flush]]] | Sends initial message to proxy server. | make package private (remove protected) |
@@ -33,4 +33,12 @@ feature 'doc auth verify step' do
expect(page).to have_current_path(idv_doc_auth_verify_step)
end
+
+ it 'sends the user to start doc auth if there is no pii from the document in session' do
+ visit sign_out_url
+ sign_in_and_2fa_user
+ visit idv_address_path
+
+ expect(page).t... | [to,include,have_content,before,feature,have_current_path,t,it,require] | expects the current page to have the correct path. | would it be easier to test as a controller spec? then we could inspect instance variables, etc etc |
@@ -23,6 +23,7 @@ import games.strategy.triplea.delegate.BattleDelegate;
*/
public class XmlGameElementMapperTest {
private static final String NAME_THAT_DOES_NOT_EXIST = "this is surely not a valid identifier";
+ private static final String CANAL_ATTACHMENT_NAME = "CanalAttachment";
private XmlGameElementM... | [XmlGameElementMapperTest->[resetErrorPopup->[resetErrorPopupForTesting],getAttachmentReturnsEmptyIfAttachmentNameDoesNotExist->[isPresent,assertThat,getAttachment,is],getDelegateReturnsEmptyIfDelegateNameDoesNotExist->[isPresent,getDelegate,is,assertThat],disableErrorPopup->[disableErrorPopupForTesting],getDelegateHap... | Disable error popup. | Not sure this field's worth it given that it's only used in one test case. |
@@ -205,7 +205,7 @@ func GetBootstrapClusterRoles() []authorizationapi.ClusterRole {
},
// backwards compatibility
- authorizationapi.NewRule(read...).Groups(buildGroup).Resources("buildlogs").RuleOrDie(),
+ authorizationapi.NewRule(read...).Groups(buildGroup, legacyBuildGroup).Resources("buildlogs").... | [NormalizeResources,Sprintf,RuleOrDie,NewRule,Names,Convert,Groups,NewString,AllRoles,Resources] | Permissions to check access to a specific node. is a kapi. ObjectMeta that provides the object for the build strategy. | This is denoted as `backwards compatibility` so I am not sure if it should be updated. cc @deads2k |
@@ -1019,7 +1019,7 @@ func (p *Pagination) String() string {
// FirstPage returns true if the pagination object is not pointing in any direction
func (p *Pagination) FirstPage() bool {
- return p == nil || (len(p.Next) == 0 && len(p.Previous) == 0)
+ return p == nil || (len(p.Next) == 0 && len(p.Previous) == 0 && !... | [Matches->[GetSenderUsername,GetCtime],PercentIndexed->[MissingIDs,GetMaxMessageID,GetMaxDeletedUpTo],GetMaxDeletedUpTo->[GetMessageID,GetExpunge,GetMaxMessage],Eq->[Eq,Bytes],Etime->[EphemeralMetadata],Summary->[GetMessageID,GetMessageType],GetSenderUsername->[IsValid],Derivable->[Hash],IsVisible->[GetMessageType],IsV... | FirstPage returns true if the pagination is the first page. | I'm curious why this is there, seems wrong. |
@@ -226,10 +226,9 @@ static int acpt_state(BIO *b, BIO_ACCEPT *c)
BIO_ADDRINFO_socktype(c->addr_iter),
BIO_ADDRINFO_protocol(c->addr_iter), 0);
if (ret == (int)INVALID_SOCKET) {
- FUNCerr("socket", get_last_socket_error());
- ... | [No CFG could be retrieved] | region ethernet BIO operations region ACPT_S_CONFIG. | How about "calling socket(); hostname=%s service=%s" or "calling socket() with hostname=%s service=%s"? |
@@ -257,6 +257,9 @@ static void set_allowed_options(OptionList *allowed_options)
_("Set world by name (implies local game)"))));
allowed_options->insert(std::make_pair("quiet", ValueSpec(VALUETYPE_FLAG,
_("Print to console errors only"))));
+ allowed_options->insert(std::make_pair("color", ValueSpec(VALUETYPE... | [No CFG could be retrieved] | Get a list of options that can be passed to the command line. Add migration options to the options list. | maybe the preprocessor could be used to not include the `auto` option in windows builds if it doesn't work? |
@@ -1360,7 +1360,10 @@ class ModelBase(h2o_meta(Keyed)):
fmt = 'o'
else:
fmt = '-'
- axs.set_xlim(min(x), max(x))
+ if isinstance(x[0], str):
+ axs.set_xlim(0, len(x)-1)
+ else:
+ axs.set_xlim(min(x), max(x))
if c... | [ModelBase->[download_pojo->[download_pojo],aic->[aic],mean_residual_deviance->[mean_residual_deviance],score_history->[scoring_history],mse->[mse],gini->[gini],auc->[auc],rmsle->[rmsle],permutation_importance_plot->[permutation_importance,show],logloss->[logloss],aucpr->[aucpr],model_performance->[type],download_model... | Plots the nanoseconds in a 1D plot. Partial Dependence Plot. | the fix to handle categoricals |
@@ -262,7 +262,7 @@ public class FlowController implements EventAccess, ControllerServiceProvider, R
private final RemoteSiteListener externalSiteListener;
private final AtomicReference<CounterRepository> counterRepositoryRef;
private final AtomicBoolean initialized = new AtomicBoolean(false);
- priva... | [FlowController->[getName->[getName],isTerminated->[isTerminated],enableControllerServices->[enableControllerServices],shutdown->[shutdown,isTerminated],VersionedNodeConnectionStatus->[hashCode->[hashCode],equals->[getUpdateId,getStatus,equals]],setRootGroup->[setRootGroup],stopReportingTask->[isTerminated],enableRefer... | The main method for all the NiFi classes. | Should we need to be referring to the implementation type here? |
@@ -68,6 +68,6 @@ func LoadFiles(dir string, files []string) (map[string][]byte, error) {
func ValidateFileEquality(t *testing.T, actual, expected map[string][]byte) {
for name, file := range expected {
assert.Contains(t, actual, name)
- assert.Equal(t, file, actual[name])
+ assert.Equal(t, string(file), string... | [Join,Equal,ReadFile,Contains,Unmarshal,ImportSpec] | ValidateFileEquality ensures that the actual and expected files are equal. | Tiny nit: I think that this will work with byte slices. |
@@ -13,6 +13,7 @@ class CreateBillPermsTable extends Migration
public function up()
{
Schema::create('bill_perms', function (Blueprint $table) {
+ $table->bigIncrements(id);
$table->unsignedInteger('user_id');
$table->unsignedInteger('bill_id');
});
| [CreateBillPermsTable->[up->[unsignedInteger]]] | Check if there is a missing user_id or bill_id in the database. | `id` should be `'id'` |
@@ -241,8 +241,12 @@ class CMake(object):
elif is_intel:
if self.generator in ["Ninja", "Ninja Multi-Config",
"NMake Makefiles", "NMake Makefiles JOM", "Unix Makefiles"]:
- intel_compilervars_dict = tools.intel_compilervars_dict(self._conanfile, fo... | [CMake->[test->[_build],is_multi_configuration->[is_multi_configuration],install->[_build],configure->[_run,_get_dirs],_build->[_run],_get_dirs->[get_dir]]] | Run the specified command in the context of the specified context. command_line args defs source_dir. | No need to support legacy integrations. |
@@ -298,12 +298,8 @@ export function isProxyOrigin(url) {
if (typeof url == 'string') {
url = parseUrl(url);
}
- const path = url.pathname.split('/');
- const prefix = path[1];
- // List of well known proxy hosts. New proxies must be added here.
- return (url.origin == urls.cdn ||
- (url.origin.inde... | [No CFG could be retrieved] | Remove fragment from URL and return the new URL. Get the source URL of an AMP document. | We should do it on `url.origin` |
@@ -22,6 +22,8 @@ import (
"net/http"
"regexp"
+ "github.com/elastic/apm-server/model"
+
"github.com/elastic/apm-server/decoder"
"github.com/elastic/apm-server/processor/asset"
"github.com/elastic/apm-server/processor/asset/sourcemap"
| [Handler->[Handle,Error,NewLogger,transformConfig,configurableDecoder,wrappingHandler,topLevelRequestDecoder],Handle,Handler,Error,Infof,NewLogger,isEnabled,NewServeMux,memoizedSmapMapper,DecodeUserData,MustCompile,DecodeSystemData] | Creates a routeType object that can be used to handle a single . Initialize an object that will be used to create the routes for the given . | since I'm already nitpicking, combine with other apm-server imports |
@@ -2388,8 +2388,9 @@ def _check_ch_locs(chs):
The channels from info['chs']
"""
locs3d = np.array([ch['loc'][:3] for ch in chs])
- return (locs3d == 0).all() or \
- (~np.isfinite(locs3d)).all() or np.allclose(locs3d, 0.)
+ return not ((locs3d == 0).all() or
+ (~np.isfinit... | [set_config->[get_config_path,warn,_load_config],get_config->[get_config_path,_load_config],object_diff->[_sort_keys,object_diff],_load_config->[warn],object_size->[object_size],open_docs->[get_config],_get_stim_channel->[get_config],_fetch_file->[_get_http,warn],array_split_idx->[_ensure_int],deprecated->[_decorate_cl... | Checks if the channel locations exist in the system. | why the `not` ? |
@@ -71,6 +71,7 @@ final class SchemaBuilder implements SchemaBuilderInterface
$this->defaultFieldResolver = $defaultFieldResolver;
$this->filterLocator = $filterLocator;
$this->paginationEnabled = $paginationEnabled;
+ $this->graphqlTypes['Iterable'] = new IterableType();
}
... | [SchemaBuilder->[getNodeQueryField->[getNodeInterface],getResourceObjectType->[getNodeInterface],isCollection->[isCollection],mergeFilterArgs->[mergeFilterArgs],getResourceObjectTypeFields->[getResourceFieldConfiguration],convertFilterArgsToTypes->[convertFilterArgsToTypes]]] | This method is called by the Doctrine ORM when a schema is not available. | I would move this line to the `getSchema` method. |
@@ -47,6 +47,10 @@ public class NexmarkConfiguration implements Serializable {
@JsonProperty
public NexmarkUtils.SinkType sinkType = NexmarkUtils.SinkType.DEVNULL;
+ /** Shall we export the summary to BigQuery. */
+ @JsonProperty
+ public boolean exportSummaryToBigQuery = false;
+
/**
* Control wheth... | [NexmarkConfiguration->[copy->[NexmarkConfiguration],NexmarkConfiguration]] | A configuration class which can be used to configure a single . The number of events in the sequence that have the last event rate. | How about "If true, exports the summary to BigQuery." ? |
@@ -1689,6 +1689,10 @@ function dol_substr($string,$start,$length,$stringencoding='')
if (empty($stringencoding)) $stringencoding=$langs->charset_output;
$ret='';
+ if (function_exists('iconv_substr'))
+ {
+ $ret=iconv_substr($string,$start,$length,$stringencoding);
+ }
if (function_exists('mb_substr'))
{
... | [img_phone->[trans],complete_head_from_modules->[trans,load],dol_print_error->[transnoentities,trans,lasterror,lastqueryerror,lasterrno,lastquery,load],dol_print_phone->[fetch_clicktodial,trans],natural_search->[escape,trans],img_help->[trans],img_search->[trans],get_localtax->[fetch_object,query],dol_getIdFromCode->[f... | Dol_substr - like substr. | Why not using `elseif` here? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.