patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -105,6 +105,13 @@ Status Config::genConfig(OsqueryConfig& conf) {
conf.options[v.first.data()] = v.second.data();
}
}
+
+ auto dispatch = osquery::Dispatcher::getInstance();
+ std::promise<EventFileMap_t> promise = std::promise<EventFileMap_t>(
+ std::allocator_arg, std::allocator<E... | [genConfig->[genConfig],call->[genConfig],checkConfig->[genConfig],getMD5->[genConfig]] | Parse the config string and fill in missing values in OsqueryConfig. | This is a bit complicated. @marpaia, maybe we should move the life of the Config to the life of the process. Then we can reduce this to a runnable future and a mutex lock. We'd also enable `Dispatcher::addService` for things like stateful config update monitors (via TCP/socket/etc). Of course that more-complicated conf... |
@@ -397,9 +397,10 @@ class DraftOrderComplete(BaseMutation):
line_data = OrderLineData(
line=line, quantity=line.quantity, variant=line.variant
)
+ channel_slug = order.channel.slug
try:
- allocate_stocks([line_dat... | [DraftOrderCreate->[save->[_commit_changes,_save_lines,_save_addresses,_refresh_lines_unit_price],Arguments->[DraftOrderCreateInput]],DraftOrderUpdate->[Arguments->[DraftOrderInput]],DraftOrderComplete->[perform_mutation->[save,DraftOrderComplete,update_user_fields]]] | Perform a single mutation on an order. | Shouldn't be wrapped in transaction? What should happen with allocated_stocks when allocate_preorders will raise an error? |
@@ -85,9 +85,11 @@ public class CommandAckCollector {
if (backupOwners.isEmpty()) {
return new PrimaryOwnerOnlyCollector<>();
}
- SingleKeyCollector collector = new SingleKeyCollector(id, backupOwners, topologyId);
+ SingleKeyCollector<T> collector = new SingleKeyCollector<>(id, backup... | [CommandAckCollector->[onMembersChange->[onMembersChange],CombiningCollector->[primaryException->[completeExceptionally]],ExceptionCollector->[completeExceptionally],MultiAckTarget->[addPendingAcks->[toString],onMembersChange->[primaryException],collectorFor->[toString],call->[createTimeoutException,completeExceptional... | Creates a new collector for the given id. | So, the only "fix" is an additional assert to verify an assumption. How does this "fix" things ? What if the user runs with assertions disabled ? |
@@ -180,9 +180,9 @@ def main(params):
test_acc = 0.0
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
- batch_num = nni.choice(50, 250, 500, name='batch_num')
- for i in range(batch_num):
- batch = mnist.train.next_batch(batch_num)
+ batch_size = ... | [max_pool->[max_pool],avg_pool->[avg_pool],conv2d->[conv2d],main->[build_network,MnistNetwork],generate_defualt_params,main] | Main function of the mnist network. Evaluate the accuracy of a single . | dropout_rate should in [0, 1) |
@@ -30,7 +30,7 @@ class DNSServer:
future to support parallelization (https://github.com/certbot/certbot/issues/8455).
"""
- def __init__(self, unused_nodes, show_output=False):
+ def __init__(self, unused_nodes: Any, show_output: bool = False) -> None:
"""
Create an DNSServer instan... | [DNSServer->[_start_bind->[stop],__exit__->[stop],__enter__->[start]]] | Create an instance of the nanomsg server. | Why `Any` and not `Sequence[str]`? |
@@ -128,8 +128,8 @@ class GraphParser(Model):
@overrides
def forward(self, # type: ignore
tokens: Dict[str, torch.LongTensor],
+ metadata: List[Dict[str, Any]],
pos_tags: torch.LongTensor = None,
- metadata: List[Dict[str, Any]] = None,
... | [GraphParser->[_construct_loss->[,_arc_loss,size,_tag_loss,sum,float,view,unsqueeze],forward->[,_construct_loss,text_field_embedder,head_arc_feedforward,_dropout,ConfigurationError,tag_bilinear,cat,head_tag_feedforward,_pos_tag_embedding,get_text_field_mask,child_arc_feedforward,child_tag_feedforward,_input_dropout,_gr... | Forward computation of the SequenceLabelField. Get the tag and probability of a tag or arc. Missing tag - value dictionary. | I'd probably default to making this optional instead of moving the parameter, but I could go either way. |
@@ -27,6 +27,7 @@ namespace System.Net.Quic
public System.Net.Security.SslApplicationProtocol NegotiatedApplicationProtocol => throw null;
public ValueTask CloseAsync(long errorCode, System.Threading.CancellationToken cancellationToken = default) => throw null;
public void Dispose() => throw ... | [No CFG could be retrieved] | Close the object and return a Task that will close the object. | We're still operating in a "none of this has been reviewed yet and we won't ship these APIs until we do and revise them accordingly" mode, right? Is there a must-do issue tracking that to make sure it doesn't slip through the cracks? |
@@ -208,7 +208,7 @@ function getLocalBundleSize() {
cyan(shortSha(gitCommitHash())) + '.'
);
}
- getBrotliBundleSize();
+ getBrotliBundleSizes();
}
async function bundleSize() {
| [No CFG could be retrieved] | Provides a function to report the size of the AMP binary in the current project. Set the status of the given block of size check in GitHub to skipped. | What's the point of this call? Should this function be returning something? JSDoc would help, but also not clear if there's any point to this function call |
@@ -97,11 +97,16 @@ func (r *userHandler) userBlocked(m libkb.MetaContext, cli gregor1.IncomingInter
}
m.Debug("Got user.blocked item: %+v", msg)
badUIDs := make(map[keybase1.UID]bool)
+
for _, r := range msg.Blocks {
if (r.Chat != nil && *r.Chat) || (r.Follow != nil && *r.Follow) {
badUIDs[r.Uid] = true... | [Create->[NewMetaContext,identityChange,passphraseStateUpdate,G,Errorf,userBlocked,passwordChange,keyChange,HasPrefix],identityChange->[GetUID,Ctx,UserChanged,G],passphraseStateUpdate->[Body,MaybeSavePassphraseState,Warning,G,Unmarshal,Ctx,Bytes,HandlePasswordChanged,Debug],userBlocked->[Body,Warning,G,Unmarshal,UserBl... | userBlocked is called when a user is blocked. It is called by the userHandler when. | Could at least debug log it. |
@@ -88,6 +88,10 @@ public class DefaultConnectionProviderObjectBuilder<C> extends ConnectionProvide
muleContext.getErrorTypeRepository());
}
+ private ConnectionProvider<C> applyOwnerConfigNameResolver(ConnectionProvider<C> provider) {
+ return new Co... | [DefaultConnectionProviderObjectBuilder->[doBuild->[getDefaultEncoding,getFirst,MuleVersion,injectFields],build->[doBuild,inject,applyConnectionManagement,applyErrorHandling,applyConnectionProviderClassLoaderProxy],applyConnectionManagement->[getConnectionManagementType],applyErrorHandling->[getErrorTypeRepository],app... | Applies error handling to the connection provider. | Why does the wrapper that resolves the config name, needs the reconnection config? |
@@ -117,9 +117,9 @@ func New(cfg Config) (*Distributor, error) {
}, nil
}
-func (d *Distributor) getClientFor(hostname string) (*IngesterClient, error) {
+func (d *Distributor) getClientFor(ingester ring.IngesterDesc) (cortex.IngesterClient, error) {
d.clientsMtx.RLock()
- client, ok := d.clients[hostname]
+ cli... | [sendSamples->[getClientFor,Append],UserStats->[getClientFor,UserStats],Collect->[Collect],Describe->[Describe],Query->[Query,getClientFor],LabelValuesForLabelName->[getClientFor,LabelValuesForLabelName]] | getClientFor returns a client for the given hostname. | Will it matter if some of the ingester clients are HTTP and others are grpc? |
@@ -41,7 +41,9 @@ class UpgraderSkin extends \WP_Upgrader_Skin {
$string = str_replace( '…', '...', strip_tags( $string ) );
- \WP_CLI::line( $string );
+ if ( empty( $this->upgrader->cli_output_format ) || ! in_array( $this->upgrader->cli_output_format, array( 'csv', 'json' ) ) ) {
+ \WP_CLI::line( $s... | [No CFG could be retrieved] | feedback - Prints a string with a feedback. | If we use `\WP_CLI::log()` here, we won't need to assign `$this->upgrader->cli_output_format` |
@@ -1454,9 +1454,9 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
# module from the upstream Spack instance.
return
+ # Ensure package code is not already installed
partial = self.check_for_unfinished_installation(keep_prefix, restage)
- ... | [PackageBase->[do_patch->[do_stage],_if_make_target_execute->[_has_make_target],check_for_unfinished_installation->[remove_prefix],do_stage->[do_fetch],dependency_activations->[extends],do_deactivate->[is_activated,_sanity_check_extension,do_deactivate],do_install->[build_process->[do_stage,_stage_and_write_lock,do_fak... | Installs a package and its dependencies. This method is called by the base class when a module file generation is required. It is Installs the package and its dependencies. Installs a package in the source directory. | This check is actually to see if there was some leftover code from an unsuccessful installation. I think it would be more accurate to move this to the `elif layout.check_installed(self.spec)` check below. Or remove it, because IMO that is fairly self-explanatory from the code which surrounds that check. |
@@ -1647,8 +1647,9 @@ class BaseRaw(ProjMixin, ContainsMixin, UpdateChannelsMixin,
can be loaded with the MNE command-line tools. See raw.orig_format
to determine the format the original data were stored in.
overwrite : bool
- If True, the destination file (if it exists) wi... | [_start_writing_raw->[append],ToDataFrameMixin->[to_data_frame->[_get_check_picks]],_check_update_montage->[append],BaseRaw->[notch_filter->[notch_filter],apply_function->[_check_fun],_preload_data->[_read_segment],crop->[_update_times],__setitem__->[_parse_get_set_params],resample->[_update_times,resample],append->[_r... | Save raw data to a file. Integrity check for a single block of data. MISSING - A CHECK CHECKS. | This sounds a bit misleading -- data must be preloaded to overwrite *only if writing to the same file name*. It's probably worth clarifying this somehow (I don't really like my sentence either) and making it a separate sentence. |
@@ -1055,9 +1055,8 @@ def fit_dipole(evoked, cov, bem, trans=None, min_dist=5., n_jobs=1,
The dipole fits. A :class:`mne.DipoleFixed` is returned if
``pos`` and ``ori`` are both not None, otherwise a
:class:`mne.Dipole` is returned.
- residual : ndarray, shape (n_meeg_channels, n_times)
- ... | [_fit_Q->[_dipole_forwards,_dipole_gof],fit_dipole->[copy,_sphere_constraint,_fit_dipoles,_make_guesses,Dipole,_surface_constraint,_dipole_forwards,DipoleFixed],_fit_eval->[_dipole_forwards],_read_dipole_text->[copy,Dipole],_concatenate_dipoles->[Dipole],_fit_dipole->[_fit_Q,_fit_confidence,_fit_eval],_fit_dipole_fixed... | Fit a single base dipole to a given base and return the dipole. A function to create a Dipole object from a base - level n - ary n find the best fit of a non - sphere non - linear system guess the n - th node in the network Get the n - th N - th N - th N - th N - th N Compute the guesses for a single node. | it actually returns so far a copy of the passed evoked so it's not always an EvokedArray |
@@ -601,10 +601,13 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult> implemen
return config;
}
+ // NOTE: function setConfig(...) will overwrite all configuration
+ // Merge configuration, you need to use function applyConfigSetting(...)
public void setConfig(Map<String, Object> ... | [Paragraph->[toJson->[toJson],completion->[setText,completion,getBindedInterpreter],createOrGetApplicationState->[getApplicationId],equals->[equals],setAuthenticationInfo->[getUser],setStatusToUserParagraph->[getUser],hashCode->[hashCode],jobRun->[getBindedInterpreter,info,setResult,getText,setText,getReturn,getUser,ge... | get config. | Why not name `applyConfigSetting` as `mergeConfig` it is is used for merge configuration ? |
@@ -51,8 +51,8 @@ class PyYt(PythonPackage):
tag="yt-3.0.2", commit="511887af4c995a78fe606e58ce8162c88380ecdc")
version("2.6.3", hg="https://bitbucket.org/yt_analysis/yt",
tag="yt-2.6.3", commit="816186f16396a16853810ac9ebcde5057d8d5b1a")
- version("development", hg="https://bitbucket.... | [PyYt->[prep_yt->[open,write],check_install->[join_path,python],depends_on,run_before,version,on_package_attributes,variant,run_after]] | Analyses YT - related data. YT - specific setup. | Should it be `develop` to be consistent with other packages? |
@@ -297,10 +297,11 @@ public class CoordinatorDynamicConfig
private int balancerComputeThreads;
private Set<String> killDataSourceWhitelist;
private boolean killAllDataSources;
+ private int maxSegmentsInQueue = Integer.MAX_VALUE;
public Builder()
{
- this(15 * 60 * 1000L, 524288000L,... | [CoordinatorDynamicConfig->[hashCode->[hashCode],Builder->[build->[CoordinatorDynamicConfig]],equals->[equals]]] | This method returns a unique identifier for this object. This class is used to build a builder for a specific . | do we need to init `maxSegmentsInQueue` to `Integer.MAX_VALUE`? |
@@ -182,8 +182,8 @@ public abstract class FileBasedSink<T> extends Sink<T> {
*
* <p>See {@link ShardNameTemplate} for a description of file naming templates.
*/
- public FileBasedSink(String baseOutputFilename, String extension, String fileNamingTemplate,
- WritableByteChannelFactory writableByteChann... | [FileBasedSink->[populateDisplayData->[populateDisplayData],FileBasedWriter->[close->[writeFooter],open->[prepareWrite,getSink,getMimeType,buildTemporaryFilename,create,writeHeader]],FileBasedWriteOperation->[generateDestinationFilenames->[getFileExtension],getBaseOutputFilename],getFilenameSuffix]] | FileBasedSink creates a FileBasedSink that writes a single to a file. Creates a write operation. | Do we want to add the `String` variant of this one? |
@@ -394,10 +394,11 @@ namespace Dnn.PersonaBar.SiteSettings.Services
portalInfo.TermsTabId = this.ValidateTabId(request.TermsTabId, pid);
portalInfo.PrivacyTabId = this.ValidateTabId(request.PrivacyTabId, pid);
PortalController.Instance.UpdatePortalInfo(portalInfo);
-
... | [SiteSettingsController->[GetResourceFiles->[GetResourceFiles],CanEnableDisable->[IsDefaultLanguage,IsLanguageEnabled,IsLanguagePublished]]] | Updates the default pages settings. Updates the portal setting with the values in the request. | I think maybe this line was added by mistake @valadas - can you confirm? |
@@ -1933,7 +1933,8 @@ class EpochsArray(_BaseEpochs):
super(EpochsArray, self).__init__(info, data, events, event_id, tmin,
tmax, baseline, reject=reject,
flat=flat, reject_tmin=reject_tmin,
- ... | [EpochsArray->[__init__->[_detrend_offset_decim,drop_bad_epochs]],combine_event_ids->[copy],equalize_epoch_counts->[drop_epochs,drop_bad_epochs],_BaseEpochs->[equalize_event_counts->[drop_epochs,copy,_key_match,drop_bad_epochs],plot_drop_log->[plot_drop_log],_get_data->[_get_epoch_from_raw,_detrend_offset_decim,_is_goo... | Initialize the epoch array. | We were silently always adding an `EEG` ref before but not applying it (whoops). So we could consider this a bug fix...? |
@@ -1629,7 +1629,12 @@ class Spec(object):
d['patches'] = variant._patches_in_order_of_appearance
if hash.package_hash:
- d['package_hash'] = self.package.content_hash()
+ package_hash = self.package.content_hash()
+
+ # Full hashes are in bytes
+ ... | [colorize_spec->[insert_color],save_dependency_spec_yamls->[to_yaml,format,from_yaml,traverse,write],DependencySpec->[copy->[DependencySpec]],ConflictsInSpecError->[__init__->[format,tree]],SpecParser->[check_identifier->[format],spec->[_add_default_platform,_dup,_set_compiler,_add_versions,satisfies,Spec,_add_flag,spe... | Returns a dictionary representing the state of the spec and its dependencies. Return a dict of the keys of the object that can be used to generate a . | Is this intended to convert all hashes to `unicode` type in python 2.7? It may not actually affect anything, but I'm always wary of `isinstance(..., bytes)` after some issues with 2/3 compat in flux. |
@@ -203,7 +203,9 @@ class EventHubProducerClient(EventHubClient):
:caption: Close down the client.
"""
- for p in self._producers:
- if p:
- p.close()
+ with self._lock:
+ for producer in self._producers.values():
+ if produce... | [EventHubProducerClient->[close->[close],create_batch->[_init_locks_for_producers],send->[_init_locks_for_producers]]] | Closes the client and all of its producers. | How producers list could contain something that evaluate to False? |
@@ -85,7 +85,7 @@ func CreateMasterVMSS(cs *api.ContainerService) VirtualMachineScaleSetARM {
addCustomTagsToVMScaleSets(cs.Properties.MasterProfile.CustomVMTags, &virtualMachine)
if hasAvailabilityZones {
- virtualMachine.Zones = &masterProfile.AvailabilityZones
+ virtualMachine.Zones = to.StringPtr("[paramete... | [HasSecrets,GetEnableAHUB,IsAKSBillingEnabled,StringPtr,HasCustomNodesDNS,CachingTypes,GetKubernetesWindowsNodeCustomDataJSONObject,IsSpotScaleSet,Atoi,IsCustomVNET,VirtualMachinePriorityTypes,GetKubernetesLinuxNodeCustomDataJSONObject,GetAddonByName,FormatBool,BoolPtr,IsNvidiaEnabledSKU,IsAzureStackCloud,IsWindows,Get... | Creates a ScaleSet object from the given parameters. vmProperties returns a virtual machine scale set object that represents the number of platform fault domain. | the `Zones` property is a `*[]string` (pointer to a string slice), so this would be the syntax for expressing the above change as a literal value: `&[]string{"[parameters('availabilityZones')]"}` |
@@ -147,8 +147,8 @@ public class HadoopConverterJob
{
final Path jobDir = getJobPath(job.getJobID(), job.getWorkingDirectory());
final FileSystem fs = jobDir.getFileSystem(job.getConfiguration());
- fs.delete(jobDir, true);
- fs.delete(getJobClassPathDir(job.getJobName(), job.getWorkingDirectory()), ... | [HadoopConverterJob->[ConvertingMapper->[map->[write,converterConfigFromConfiguration,progress],cleanup->[progress]],cleanup->[getJobPath,getJobClassPathDir],getTaskPath->[getJobPath],run->[getJobClassPathDir,converterConfigIntoConfiguration,cleanup,getJobPath,setJobName],ConvertingOutputFormat->[getOutputCommitter->[c... | Cleanup the job directory and the job classpath. | Should this fire regardless of if the prior delete succeeds? |
@@ -77,6 +77,12 @@ func (jsc *JobSpecsController) Show(c *gin.Context) {
} else if runs, err := jsc.App.Store.JobRunsFor(j.ID); err != nil {
c.AbortWithError(500, err)
} else {
- c.JSON(200, presenters.JobSpec{JobSpec: j, Runs: runs})
+ p := presenters.JobSpec{JobSpec: j, Runs: runs}
+ doc, err := jsonapi.Mar... | [Index->[Data,Limit,Count,Errorf,Query,Skip,AllByIndex,AbortWithError],Show->[New,Param,JobRunsFor,JSON,FindJob,AbortWithError],Create->[ValidateJob,AddJob,NewJob,ShouldBindJSON,JSON,AbortWithError]] | Show - displays a single job spec. | Would be great to avoid this nested `if`, or at least pull the 82-87 into a helper. |
@@ -75,12 +75,17 @@ define([
this._alignedAxis = Cartesian3.clone(defaultValue(description.alignedAxis, Cartesian3.ZERO));
this._width = description.width;
this._height = description.height;
+ this._scaleByDistance = description.scaleByDistance;
this._pickId = undefined;
... | [No CFG could be retrieved] | Constructor for the Billboard object. Updates the Billboard if it has changed. | We generally throw `DeveloperError` as close to the top of the function as possible. I usually do it before assignment to any members. |
@@ -38,12 +38,13 @@ public class ValidationElTestCase extends AbstractMuleContextTestCase {
@Test
public void email() throws Exception {
final String expression = "#[validator.validateEmail(email)]";
- MuleEvent event = getTestEvent("");
- event.setFlowVariable("email", VALID_EMAIL);
+ MuleEvent eve... | [ValidationElTestCase->[testExpression->[evaluate],evaluate->[evaluate]]] | Checks if email is valid. | We need to update test infrastructure rather than do this. |
@@ -95,7 +95,7 @@ module Idv
def throttled_else_increment
Throttle.for(
- target: user_id,
+ user: current_user,
throttle_type: :idv_acuant,
).throttled_else_increment?
end
| [DocAuthBaseStep->[liveness_checking_enabled?->[liveness_checking_enabled?],idv_failure->[attempter_throttled?]]] | throttle_else_increment - returns user_id if no user with given token. | `current_user` doesn't always exist. See `#user_id` |
@@ -703,8 +703,17 @@ export class AmpAutocomplete extends AMP.BaseElement {
return Promise.resolve();
}
const filteredData = this.filterData_(sourceData, input);
+ const dataWithConverter = filteredData.map((item) => {
+ let itemWithConverter = item;
+ // Add a function that converts the o... | [No CFG could be retrieved] | Filters the given data according to the given input and renders the given data into the given container Adds a child element to the autocomplete list. | I'm not very familiar with mustache templates, but why should we use a function here instead of resolving it first? |
@@ -1456,7 +1456,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver {
* @param string $table Table to insert into
* @param array $set An associative array of insert values
* @param bool $escape Whether to escape values and identifiers
- * @return int Number of rows inserted or FALSE on failure
+ *... | [CI_DB_query_builder->[not_group_start->[group_start],get->[from,limit],_reset_select->[_reset_run],_merge_cache->[_track_aliases],having->[_wh],update->[where,set,limit],get_compiled_select->[from],_compile_select->[_limit,_from_tables],replace->[set],or_group_start->[group_start],_reset_write->[_reset_run],or_having-... | Insert a batch of records into the table. | We don't really use this format, and the rare case of boolean FALSE returns has been discussed before - it's practically irrelevant... please revert this. |
@@ -25,6 +25,9 @@ def change_extension_permission_to_plugin_permission(apps, schema_editor):
user.user_permissions.remove(extension_permission)
user.user_permissions.add(plugin_permission)
+ if extension_permission:
+ extension_permission.delete()
+
class Migration(migrations.Migration)... | [change_extension_permission_to_plugin_permission->[remove,filter,add,get_model],Migration->[RunPython]] | Change extension permission to plugin permission. | could simply be `extension_permission.delete()` without the `if` as it doesn't raise an exception in case of empty QS. |
@@ -2,8 +2,14 @@
namespace Dynamo.Library
{
+ /// <summary>
+ /// An interface which provides functionality for loading node's library
+ /// </summary>
public interface ILibraryLoader
{
+ /// <summary>
+ /// Loads node's library
+ /// </summary>
void LoadNodeLibrary(... | [No CFG could be retrieved] | Load the node library. | Exposes (use cref) LoadNodeLibrary method. Specify the usage of LoadNodeLibrary |
@@ -408,7 +408,7 @@ class AmpLightbox extends AMP.BaseElement {
this.triggerEvent_(LightboxEvents.OPEN, trust);
this.getHistory_()
- .push(this.close.bind(this))
+ .push((unused) => this.close(ActionTrust.HIGH))
.then((historyId) => {
this.historyId_ = historyId;
});
| [No CFG could be retrieved] | Toggle the lightbox. Renders close button header. For ads it adds event listener to close on enter. | My hunch is this should not override the trust provided to the method. `.push(() => this.close(trust))` Adding @caroqliu for a second opinion. |
@@ -83,6 +83,10 @@ public class HessianProtocol extends AbstractProxyProtocol {
@SuppressWarnings("unchecked")
protected <T> T doRefer(Class<T> serviceType, URL url) throws RpcException {
HessianProxyFactory hessianProxyFactory = new HessianProxyFactory();
+ boolean isHessian2Request = url.get... | [HessianProtocol->[getErrorCode->[getErrorCode],destroy->[destroy]]] | This method is called by the server to create a new instance of the given service type with. | When will the `Constants.HESSIAN2_REQUEST_KEY` key add to url? If i configure `dubbo.service.hessian2.request=true`, will that take effect? |
@@ -123,7 +123,7 @@ public class KsqlConfig extends AbstractConfig implements Cloneable {
public static final String DEFAULT_EXT_DIR = "ext";
- private static final Collection<CompatibilityBreakingConfigDef> COMPATIBLY_BREAKING_CONFIG_DEBS
+ private static final Collection<CompatibilityBreakingConfigDef> COMPA... | [KsqlConfig->[buildConfigDef->[defineCurrent,defineOld],ConfigValue->[isResolved->[isResolved]],getAllConfigPropsWithSecretsObfuscated->[getKsqlConfigPropsWithSecretsObfuscated],overrideBreakingConfigsWithOriginalValues->[KsqlConfig],cloneWithPropertyOverwrite->[KsqlConfig,getKsqlStreamConfigProps,buildStreamingConfig]... | substring to extract. Missing suffix for state store names in Tables. | note: Rohan fixes this spelling mistake in #2077. So you may want to revert your changes, making your PR smaller and avoid merge issues between the two PRs. Or just get your PR merged first ;) |
@@ -106,6 +106,13 @@ func resourceComputeImage() *schema.Resource {
Set: schema.HashString,
},
+ "licenses": &schema.Schema{
+ Type: schema.TypeList,
+ Optional: true,
+ ForceNew: true,
+ Elem: &schema.Schema{Type: schema.TypeString},
+ },
+
"label_fingerprint": &schema.Schem... | [Printf,DefaultTimeout,Minutes,Timeout,GetOk,Do,Sprintf,SetPartial,Partial,HasChange,Id,Insert,Errorf,SetLabels,Delete,SetId,Get,Set] | resourceComputeImageCreate creates a resource compute image from a list of resources. Load up the image fields from the config if specified. | Does order matter for licenses? Is it reasonable to expect someone to try and reference each individual license using interpolations? |
@@ -43,7 +43,8 @@ class MemnnAgent(TorchAgent):
help='number of memory hops')
arg_group.add_argument(
'--memsize', type=int, default=32,
- help='size of memory')
+ help='size of memory, set to 0 for "nomemnn" model which just '
+ 'embeds query and... | [MemnnAgent->[add_cmdline_args->[add_cmdline_args],_build_train_cands->[_warn_once],eval_step->[_build_mems,_build_label_cands],train_step->[_build_train_cands,update_params,_build_mems],_build_mems->[_time_feature]]] | Add command line arguments for the memnn agent. | i think you forgot to finish this sentence? |
@@ -183,6 +183,9 @@ _overload_glue = _Gluer()
del _Gluer
+_no_defer = set()
+
+
def glue_typing(concrete_function, typing_key=None):
"""This is a decorator for wrapping the typing part for a concrete function
'concrete_function', it's a text-only replacement for '@infer_global'"""
| [_Gluer->[__call__->[_OverloadWrapper]],_OverloadWrapper->[_build->[ol_generated->[body->[_assemble],_stub_generator]]],_Gluer] | A decorator for wrapping the typing part for a concrete function . | Am wondering if having these in globals is going to lead to race conditions later? |
@@ -118,6 +118,16 @@ class InputDialog extends BaseDialog<Props, State> {
* @returns {void}
*/
_onChangeText(fieldValue) {
+ const inputKeyboardType = this.props.textInputProps
+ ? this.props.textInputProps.keyboardType : undefined;
+
+ // we want only digits, but both number-p... | [No CFG could be retrieved] | The main function of the dialog which is invoked when the text in the field changes. | I don't think this change belongs here. `InputDialog` is a dialog for generic text input. `,` and `.` may have relevance in some other context. I'd say it's the responsibility of `RoomLockPrompt`, since it's the one which interprets the input as a password. |
@@ -436,6 +436,16 @@ func (tmp *ChainLinkUnpacked) unpackPayloadJSON(payloadJSON *jsonw.Wrapper, payl
payloadJSON.AtKey("seqno").GetInt64Void(&sq, &err)
+ // Assume public unless specified
+ tmp.seqType = keybase1.SeqType_PUBLIC
+ if jw := payloadJSON.AtKey("seq_type"); !jw.IsNil() {
+ seqTypeInt, err := payload... | [ToEldestKID->[GetKID],verifyPayloadV2->[getPayloadHash,getPrevFromPayload],NeedsSignature->[NeedsSignature,IsStubbed],GetMerkleHashMeta->[IsStubbed],MatchFingerprint->[Eq],getSigPayload->[getFixedPayload,IsStubbed],HasRevocations->[GetRevokeKids,GetRevocations],IsInCurrentFamily->[ToEldestKID],Store->[VerifyLink,Strin... | unpackPayloadJSON unpacks the payload into the necessary fields. | erroring out here is slightly scary, if there's some sort of scrod that make it into the chain that we never checked? |
@@ -134,7 +134,7 @@ async def prepare_unstripped_python_sources(
)
)
source_root_paths = {source_root_obj.path for source_root_obj in source_root_objs}
- return UnstrippedPythonSources(sources.snapshot, tuple(sorted(source_root_paths)))
+ return UnstrippedPythonSources(init_injected, tuple(sort... | [rules->[rules],prepare_unstripped_python_sources->[UnstrippedPythonSources],prepare_stripped_python_sources->[StrippedPythonSources]] | Prepare a UnstrippedPythonSources object for the given node. | Consider registering the init rules here in `python_sources.py`. It will avoid you having to update all those tests. |
@@ -187,6 +187,7 @@ public class GobblinMCEWriter implements DataWriter<GenericRecord> {
@Override
public void writeEnvelope(RecordEnvelope<GenericRecord> recordEnvelope) throws IOException {
GenericRecord genericRecord = recordEnvelope.getRecord();
+ KafkaStreamingExtractor.KafkaWatermark watermark = ((K... | [GobblinMCEWriter->[writeEnvelope->[writeEnvelope,computeSpecMap],close->[close,flush],flush->[flush]]] | Writes a record envelope to the cache. Sample one entry in the cache that means that all paths coming from a single dataset should be This method is called when a table operation is not supported by the GMCE library. | Looks like we are leaking details here. Ideally, we should not expose details of extractor implementation here. Can we use the CheckpointableWatermark interface instead? |
@@ -667,6 +667,13 @@ class ProductTypeFilter(MetadataFilterBase):
model = ProductType
fields = ["search", "configurable", "product_type"]
+ @classmethod
+ def filter_product_type_searchable(cls, queryset, _name, value):
+ if not value:
+ return queryset
+ name_slug_qs ... | [_filter_minimal_price->[filter_products_by_minimal_price],_filter_stock_availability->[filter_products_by_stock_availability],_filter_variant_price->[filter_products_by_variant_price],filter_categories->[filter_products_by_categories],_filter_attributes->[filter_products_by_attributes],ProductFilter->[filter_stock_ava... | Creates a filter object for all category objects. | Would be good to cover this method |
@@ -367,9 +367,7 @@ class Optimizer(object):
if grad_loss is not None:
self._assert_valid_dtypes([grad_loss])
if var_list is None:
- var_list = (
- variables.trainable_variables() +
- ops.get_collection(ops.GraphKeys.TRAINABLE_RESOURCE_VARIABLES))
+ var_list = variables.trai... | [_get_processor->[_StreamingModelPortProcessor,_DenseResourceVariableProcessor,_RefVariableProcessor],Optimizer->[apply_gradients->[update_op,_get_variable_for,_get_processor],compute_gradients->[_get_processor,target],_resource_apply_sparse_duplicate_indices->[_deduplicate_indexed_slices],_zeros_slot->[_slot_dict,_var... | Computes the gradients of loss for the variables in var_list. Yields the gradients of . | @alextp So this line is safe to remove as your consideration is from community not the core? |
@@ -653,8 +653,8 @@ class ResultsController < ApplicationController
end
def remove_extra_mark
- extra_mark = ExtraMark.find(params[:id])
- result = extra_mark.result
+ result = Result.find(params[:id])
+ extra_mark = ExtraMark.find(params[:extra_mark_id])
extra_mark.destroy
result.update... | [ResultsController->[update_remark_request_count->[update_remark_request_count]]] | Removes an extra mark that has not been marked yet. | We can be a bit better with using associations, something like `result.extra_marks.find(...)`, so that only the extra marks associated with that result are searched. (This prevents a user putting in a URL with an unrelated result id and extra mark id.) |
@@ -1199,15 +1199,6 @@ int tls1_set_server_sigalgs(SSL *s)
* ciphersuite, in which case we have no use for session tickets and one will
* never be decrypted, nor will s->ext.ticket_expected be set to 1.
*
- * Returns:
- * -1: fatal error, either from parsing or decrypting the ticket.
- * 0: no ticket was fou... | [No CFG could be retrieved] | Reads the ticket information from the client. Get the ticket from the client. | Removed because of SSL_TICKET_RETURN defines? |
@@ -55,6 +55,7 @@ struct rtmp_stream {
struct dstr path, key;
struct dstr username, password;
+ struct dstr service_type;
/* frame drop variables */
int64_t drop_threshold_usec;
| [bool->[obs_service_get_username,obs_data_get_int,add_packet,obs_output_get_service,obs_output_get_settings,obs_data_release,pthread_create,obs_service_get_url,send_packet,obs_output_can_begin_data_capture,dstr_copy,obs_service_get_key,get_next_packet,obs_output_initialize_encoders,check_to_drop_frames,obs_service_get_... | This is a utility function that can be used to create a new object of type nexpect region RTMP API. | Notice how this is not aligned with the lines above it. Also, storing this should not be necessary. |
@@ -39,9 +39,8 @@ import java.util.Collection;
import java.util.Random;
/**
- *
+ * TODO rewrite to use JMH and move to the benchmarks project
*/
-
@RunWith(Parameterized.class)
@Ignore // Don't need to run every time
public class HyperLogLogSerdeBenchmarkTest extends AbstractBenchmark
| [HyperLogLogSerdeBenchmarkTest->[benchmarkToByteBuffer->[getHash,toByteBuffer],setup->[fillCollector]]] | Package for testing. Array of serializers that implement the byte buffer serialization. | Would you open a new issue for this? |
@@ -43,6 +43,7 @@ import java.util.Properties;
* @since 4.3.0
*/
@Configuration("casManagementWebAppConfiguration")
+@Lazy(true)
public class CasManagementWebAppConfiguration {
/**
| [CasManagementWebAppConfiguration->[casManagementSecurityInterceptor->[config],config->[casClient,requireAnyRoleAuthorizer]]] | Creates a new object. - A object that represents an authorization generator. | What's the idea behind this `@Lazy(true)` as all beans will be needed, won't they? |
@@ -143,7 +143,7 @@ public class DictionaryEncodedColumnPartSerde implements ColumnPartSerde
public static class SerializerBuilder
{
private VERSION version = null;
- private int flags = NO_FLAGS;
+ private int flags = Feature.NO_BITMAP_INDEX.getMask();
private GenericIndexedWriter<String> diction... | [DictionaryEncodedColumnPartSerde->[SerializerBuilder->[withValue->[getMask],build->[writeTo->[writeTo,asByte],getSerializedSize->[getSerializedSize],DictionaryEncodedColumnPartSerde]],createDeserializer->[DictionaryEncodedColumnPartSerde],getDeserializer->[read->[isSet,fromByte,getMask,read],readMultiValuedColumn->[is... | Construct a builder for the . This method is called when the valueWriter is null. | Suggested to make a method `maskOf(Collection<Feature>)`, and `DEFAULT_FEATURES = Collections.singletonList(NO_BITMAP_INDEX)` |
@@ -14,8 +14,6 @@ describe 'two_factor_authentication/otp_verification/show.html.slim' do
end
context 'common OTP delivery screen behavior' do
- it_behaves_like 'an otp form'
-
it 'has a localized title' do
expect(view).to receive(:title).with(t('titles.enter_2fa_code'))
| [resend_code_path,new,let,have_xpath,describe,build_stubbed,it,attributes_for,to,have_content,before,with,t,require,otp_send_path,it_behaves_like,include,delivery_method,path_parameters,have_link,reenter_phone_number_path,context,merge,not_to,link_to,phone_number_tag,and_return] | Displays a basic delivery screen that displays a user s OTP. user is unconfirmed. | This test doesn't work anymore? |
@@ -7,7 +7,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)
-func TestAccDataSourceAwsAmiIds_basic(t *testing.T) {
+func TestAccEC2AMIIDsDataSource_basic(t *testing.T) {
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccPro... | [ParallelTest,Sprintf,TestCheckResourceAttr,ComposeTestCheckFunc,TestCheckResourceAttrPair] | Test for resource. aws_ami_ids. test Test check for aws_ami_ids. | What determines whether test naming should include a fully capitalized initialism? Should we enforce the standard? I've personally leaned towards only capital first letters in test naming after the resource type underscores, even for initialisms, e.g. `TestAccEc2AmiIdsDataSource_basic` |
@@ -105,7 +105,7 @@ class WPSEO_Primary_Term_Admin {
protected function get_primary_term_taxonomies( $post_ID = null ) {
if ( null === $post_ID ) {
- $post_ID = get_the_ID();
+ $post_ID = $_GET['post'];
}
if ( false !== ( $taxonomies = wp_cache_get( 'primary_term_taxonomies_' . $post_ID, 'wpseo' ) ) ... | [WPSEO_Primary_Term_Admin->[map_taxonomies_for_js->[get_primary_term],get_primary_term->[get_primary_term]]] | Get the taxonomy for the primary term. | Wouldn't `get_queried_object_id()` be better here? And if not, please cast to `int` :) |
@@ -154,6 +154,17 @@ public class CompactSegments implements CoordinatorDuty
}
}
+ // Skip all the locked intervals
+ LOG.debug(
+ "Skipping the following intervals for Compaction as they are currently locked: %s",
+ taskToLockedIntervals
+ );
+ ta... | [CompactSegments->[doRun->[findMaxNumTaskSlotsUsedByOneCompactionTask]]] | Run the coordinator. Checks if a compaction task is active and if so it can run it. private static final int CURRENT_COMPACTION_TASK_SLOT = 0 ;. | maybe `compactionTaskIntervals` needs to be called something else now since it can also include intervals for which there is no lock. |
@@ -32,7 +32,10 @@ public final class KdbTreeType
private KdbTreeType()
{
- super(new TypeSignature(NAME), KdbTree.class);
+ // The KDB tree type should be KdbTree but can not be since KdbTree is in
+ // both the plugin class loader and the system class loader. This was done
+ /... | [KdbTreeType->[getObjectValue->[getObject],appendTo->[isNull,getSliceLength,writeBytesTo,closeEntry,appendNull],writeObject->[closeEntry,utf8Slice,toJson],getObject->[isNull,fromJson,getSliceLength,getSlice,toStringUtf8],TypeSignature,KdbTreeType]] | Get object value. | I don't get the implication "class exists in plugin and main => cannot be type representation" yet. Can you please help me understand this better? Also. it would be great to test this. If the problem involves classloaders, product tests seem the way to go. And yet another -- how can we prevent this from happening in th... |
@@ -391,12 +391,12 @@ func (h *Harvester) SendStateUpdate() {
return
}
- logp.Debug("harvester", "Update state: %s, offset: %v", h.state.Source, h.state.Offset)
- h.states.Update(h.state)
-
d := util.NewData()
d.SetState(h.state)
h.publishState(d)
+
+ logp.Debug("harvester", "Update state: %s, offset: %v",... | [cleanup->[SendStateUpdate],Stop->[stop],Setup->[open]] | SendStateUpdate sends a state update to the harvester. | Can you elaborate on this move? I would assume the harvester itself should be the first one to know about state updates? |
@@ -207,6 +207,10 @@ public class CliCoordinator extends ServerRunnable
"druid.coordinator.kill.on",
Predicates.equalTo("true"),
DruidCoordinatorSegmentKiller.class
+ ).addConditionBinding(
+ "druid.coordinator.kill.pendingSegments.on",
+ ... | [CliCoordinator->[isOverlord->[booleanValue],getModules->[getLoadQueueTaskMaster->[create,LoadQueueTaskMaster,newSingleThreadExecutor],configure->[addResource,to,addConditionBinding,bind,equalTo,registerKey,get,register,toProvider,in],add,getModules,Module,addAll],configure->[info,isOverlord],Logger]] | Provides a list of modules that are used to manage the coordinator. Register all components of the coordinator. Get load queue task master. | Maybe use `Predicates.equalTo("true")` to be consistent with the other bindings here |
@@ -14,13 +14,14 @@ EXPORT_TEMPLATES = {"export_products": "csv/export_products_csv"}
@app.task
-def send_email_with_link_to_download_csv(job: "ExportFile", template_name: str):
- recipient_email = job.created_by.email
+def send_email_with_link_to_download_csv(export_file: "ExportFile", template_name: str):
+ ... | [send_email_with_link_to_download_csv->[build_absolute_uri,get_email_context,send_templated_mail]] | Sends an email with a link to download the file in CSV format. | Can Service Account be the creator of `export_file`? |
@@ -407,7 +407,7 @@ class PathClient(StorageAccountHostsMixin):
path_http_headers = get_path_http_headers(content_settings)
options = {
- 'rename_source': rename_source,
+ 'rename_source': quote(rename_source),
'properties': add_metadata_headers(metadata),
... | [PathClient->[get_access_control->[_get_access_control_options],_rename_path->[_rename_path_options],set_access_control->[_set_access_control_options,set_access_control],_delete->[_delete_path_options],_create->[_create_path_options],close->[close,__exit__],set_http_headers->[set_http_headers]]] | Returns a dict of options to be passed to rename_path. | Could this be a breaking change? Could anyone be used paths that are already quoted? |
@@ -25,6 +25,7 @@ import {install as installDocContains} from './polyfills/document-contains';
import {install as installMathSign} from './polyfills/math-sign';
import {install as installObjectAssign} from './polyfills/object-assign';
import {install as installPromise} from './polyfills/promise';
+import {install as... | [No CFG could be retrieved] | Package members of the n - node module. | Nit: rename to `installArrayIncludes` |
@@ -0,0 +1,16 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+
+namespace System.IO
+{
+ public static partial class Path
+ {
+ private static string s_defaultTempPath = string.Empty;
+
+ ... | [No CFG could be retrieved] | No Summary Found. | This can't be valid, surely? `ThrowHelper.ThrowInvalidOperationException()` returns void, it's not an appropriate thing to use `??` with |
@@ -124,7 +124,7 @@ public abstract class Extractor implements EmbeddedPersistable {
public Extractor(MetricRegistry metricRegistry,
String id,
String title,
- int order,
+ long order,
Type type,
... | [Extractor->[ResultPredicate->[apply->[getValue]],runExtractor->[run]]] | PUBLIC Methods for creating a new object of the specified type. total timer name. | Any reason to change the type to `long`? It's rather unlikely that we'll have more than 2147483647 extractors for an input. |
@@ -88,7 +88,6 @@ def verbose(function):
""" # noqa: E501
# See https://decorator.readthedocs.io/en/latest/tests.documentation.html
# #dealing-with-third-party-decorators
- from .docs import fill_doc
try:
fill_doc(function)
except TypeError: # nothing to add
| [catch_logging->[__exit__->[set_log_file],__enter__->[ClosingStringIO,_remove_close_handlers]],wrapped_stdout->[ClosingStringIO,getvalue],_FrameFilter] | Verbose decorator to allow functions to override log - level. A function that returns a sequence of objects representing a single . | @cbrnr this is where I just did `return function` to see how much time the `verbose` decorator was eating up. Turns out almost all of it was in `fill_doc` hence why I target it in this PR. |
@@ -125,6 +125,11 @@
<mapstruct.version>1.3.0.Final</mapstruct.version>
<%_ if (enableSwaggerCodegen) { _%>
<jackson-databind-nullable.version>0.2.0</jackson-databind-nullable.version>
+<%_ } _%>
+<%_ if (cacheProvider === 'caffeine') { _%>
+ <caffeine.version>2.8.0</caffeine.version>
+ ... | [No CFG could be retrieved] | Returns a list of versions of a Hibernate object. Find all possible versions of the plugin. | Does this property is really used? |
@@ -43,7 +43,13 @@ class Pagerduty implements Transport
$protocol['event_type'] = 'trigger';
}
foreach ($obj['faults'] as $fault => $data) {
- $protocol['details'][] = $data['string'];
+ $rough_details = array_filter(explode('; ', $data['string']));
+ $det... | [No CFG could be retrieved] | Deliver an alert to the pagerDuty service. | I think there is an existing array version stored in the faults array so you don't have to parse the string. Did you check that? |
@@ -47,8 +47,8 @@ public class TestTerminal extends Console {
output = TestResult.init(requireOrder);
}
- public TestResult getTestResult() {
- return output;
+ public synchronized TestResult getTestResult() {
+ return output.copy();
}
public String getOutputString() {
| [TestTerminal->[buildLineReader->[TestLineReader],flush->[flush],resetTestResult->[init],addResult->[addRow,addRows],close->[close],getOutputString->[toString],StringWriter,resetTestResult,PrintWriter]] | reset the test result. | is sync actually needed? |
@@ -53,7 +53,8 @@ export class SaveButton {
this.color = rootElement.getAttribute('data-color');
this.count = rootElement.getAttribute('data-count');
this.lang = rootElement.getAttribute('data-lang');
- this.round = rootElement.getAttribute('data-round');
+ this.round = rootElement.getAttribute('da... | [No CFG could be retrieved] | General button for saving a pin count. Fetches the remote Pin count for a given URL. | Are the `height` and `width` attributes required? If they're not provided by the publisher it'd come down to `null === null`, is this expected? Also, not a big deal, but I think the internal JavaScript styleguide asks for strict equality checks when possible :) |
@@ -89,7 +89,7 @@ class Link
}
/**
- * @return ConstraintInterface|null
+ * @return ConstraintInterface
*/
public function getConstraint()
{
| [Link->[getPrettyString->[getPrettyString]]] | Returns the constraint of the node. | phpdoc on the property itself needs to be updated and also in the constructor, since null is not allowed |
@@ -240,7 +240,7 @@ func (w *walWrapper) performCheckpoint(immediate bool) (err error) {
if err := os.MkdirAll(checkpointDirTemp, 0777); err != nil {
return errors.Wrap(err, "create checkpoint dir")
}
- checkpoint, err := wal.New(nil, nil, checkpointDirTemp, true)
+ checkpoint, err := wal.New(nil, nil, checkpoin... | [Log->[Log],performCheckpoint->[Stop,Log],run->[Stop,Log],checkpointSeries->[Log],Log] | performCheckpoint attempts to perform a checkpoint on the underlying WAL. If the WAL is not yet create a new WAL checkpoint This function is used to delete the latest segment and checkpoints. It is fine to delete. | No need for compression anymore? |
@@ -1722,6 +1722,7 @@ def _merge_info(infos, force_update_to_first=False, verbose=None):
for k in other_fields:
info[k] = _merge_info_values(infos, k)
+ info['meas_date'] = infos[0]['meas_date']
info._check_consistency()
return info
| [write_info->[write_meas_info],write_meas_info->[_check_consistency],create_info->[_update_redundant,_check_consistency],_empty_info->[Info,_update_redundant,_check_consistency],Info->[copy->[Info],__repr__->[_stamp_to_dt,_summarize_str]],_simplify_info->[Info,_update_redundant],read_meas_info->[_read_dig_fif,read_bad_... | Merges multiple info objects into one info object. info is a dictionary with the key trans_name from the measurement infos and the value Return info for unknown field. | If you are going to do this, then `meas_date` can be removed from the `other_fields` list as you undo whatever it would have done (I think). |
@@ -11,7 +11,7 @@
public async Task When_file_content_larger_than_buffer_size()
{
var originalContent = string.Join("", Enumerable.Repeat("a#~×ψؾࢯ‽%1", 2000));
- const string filePath = "test.txt";
+ var filePath = Path.Combine(TestContext.CurrentContext.TestDirector... | [AsyncFileTests->[Task->[WriteText,Join,ReadText,AreEqual,Repeat,Delete]]] | When file content larger than buffer size test. txt. | this seems to be an issue when running via vstest. If we agree on this, we probably have to use the proposed solution on quite a few more tests |
@@ -85,6 +85,15 @@ func (r ReplicationSet) Includes(addr string) bool {
return false
}
+// GetAddresses returns the addresses of all instances within the replication set.
+func (r ReplicationSet) GetAddresses() []string {
+ addrs := make([]string, 0, len(r.Ingesters))
+ for _, desc := range r.Ingesters {
+ addrs ... | [Do->[Stop,NewTimer,WithCancel,Err,Done],Includes->[GetAddr],Equal,Sort] | Includes returns true if the given address is in the ReplicationSet false otherwise. | Suggest this should have a unit test, even though it doesn't seem exactly complex. |
@@ -640,10 +640,14 @@ frappe.views.CommunicationComposer = Class.extend({
this.message = localStorage.getItem(doctype + docname) || '';
}
}
-
- if(this.real_name) {
- this.message = '<p>'+__('Dear') +' '
- + this.real_name + ",</p><!-- salutation-ends --><br>" + (this.message || "");
+
+ const SALU... | [No CFG could be retrieved] | View functions related to email account signature Get the last email context. | Thanks for fixing! By the way, `__('Dear')` is impossible to translate correctly without knowing how it is used here. `__('Dear {},', [this.real_name], 'Salutation in Email')` would be a bit easier. |
@@ -1631,8 +1631,14 @@ public class KafkaSupervisor implements Supervisor
// reset partitions offsets for this task group so that they will be re-read from metadata storage
partitionGroups.get(groupId).replaceAll((partition, offset) -> NOT_SET);
- sequenceTaskGroup.remove(generateSequen... | [KafkaSupervisor->[updateCurrentAndLatestOffsets->[updateCurrentOffsets,updateLatestOffsetsFromKafka],emitLag->[getHighestCurrentOffsets],checkpointTaskGroup->[apply->[taskIds],taskIds],createKafkaTasksForGroup->[generateSequenceName,getRandomId],discoverTasks->[apply->[generateSequenceName,TaskGroup,TaskData]],addDisc... | Checks if all pending completion tasks have completed. This method will kill all tasks in this group and remove all tasks in this group that failed. | I think if `generateSequenceName` took a TaskGroup object, you could just pass in `group` and not worry about a null check. It won't be null, since it was pulled out of `taskGroupList` earlier. |
@@ -1,3 +1,4 @@
<?php
list($hardware, $features, $version) = explode(',', $poll_device['sysDescr']);
+$serial = trim(snmp_get($device, ".1.3.6.1.4.1.4413.1.1.1.1.1.4.0", "-Ovq"), '" ');
| [No CFG could be retrieved] | Get the list of available features and version. | Named OID here as well. |
@@ -2725,3 +2725,12 @@ export let SizeDef;
export function installResourcesServiceForDoc(ampdoc) {
registerServiceBuilderForDoc(ampdoc, 'resources', Resources);
}
+
+/**
+ * @param {!./ampdoc-impl.AmpDoc} ampdoc
+ */
+export function installOwnersServiceForDoc(ampdoc) {
+ registerServiceBuilderForDoc(ampdoc, 'own... | [No CFG could be retrieved] | Installs the Resources service for the AMP doc. | Does this rely on Dima's change to make FIE an ampdoc? |
@@ -374,6 +374,10 @@ TEMPLATES = [
},
]
+# Default datetime format in templates
+# https://docs.djangoproject.com/en/3.2/ref/templates/builtins/#std:templatefilter-date
+DATETIME_FORMAT = 'N j, Y, H:i'
+
X_FRAME_OPTIONS = 'DENY'
SECURE_BROWSER_XSS_FILTER = True
| [path->[join],get_sentry_release->[split,get,str,startswith,read,join,exists,open,loads],read_only_mode->[get,Exception],get_db_config->[update,db],,gethostname,join,CeleryIntegration,env,dict,init,Env,r'^,bool,list,datetime,dirname,format,items,exists,float,read_env,Queue,path,DjangoIntegration,get,get_sentry_release,... | Provides a list of extensions that can be used to handle a specific HTTP response. This is a hack to avoid the SSL header and the SSL port if it is not set. | what's the default we're overriding? |
@@ -100,6 +100,7 @@ public class FunctionTest extends InitializedNullHandlingTest
{
assertExpr("strlen(x)", 3L);
assertExpr("strlen(nonexistent)", NullHandling.defaultLongValue());
+ assertExprFail("strlen(a)", AssertionError.class, null);
}
@Test
| [FunctionTest->[testLower->[assertExpr],testArrayOffset->[assertExpr,assertArrayExpr],testArrayAppend->[assertArrayExpr],testStringToArray->[assertArrayExpr],testStrlen->[defaultLongValue,assertExpr],assertExpr->[value,parse,stringify,nil,assertEquals],testRpad->[assertExpr,assertArrayExpr],testArrayContains->[assertEx... | test strlen and strpos test. | This test should be adjusted since you removed the strlen change. |
@@ -21,4 +21,6 @@ class Libjwt(AutotoolsPackage):
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
+ # Needs openssl at runtime to ensure we can generate keys
+ depends_on('openssl')
depends_on('jansson')
| [Libjwt->[depends_on,version]] | Find all the packages that are required for the build. | Is this only a `run` dependency or , maybe, `('build', 'run')`? |
@@ -147,6 +147,12 @@ class AmpYoutube extends AMP.BaseElement {
/** @override */
buildCallback() {
+ if (getMode().runtime === 'inabox') {
+ this.user().error(
+ TAG,
+ 'amp-youtube is deprecated in AMPHTML ads. See https://github.com/ampproject/amphtml/issues/21340'
+ );
+ }
... | [No CFG could be retrieved] | Replies the video object that is returned by the YouTube API. This is the callback for the object. It is called when the user has requested. | Do you also need a warning for non-Inabox? |
@@ -115,7 +115,7 @@ class Exchange:
logger.info('Using Exchange "%s"', self.name)
- if validate:
+ if validate and not exchange_config.get('skip_validation'):
# Check if timeframe is available
self.validate_timeframes(config.get('timeframe'))
| [available_exchanges->[is_exchange_bad,ccxt_exchanges],Exchange->[fetch_ticker->[fetch_ticker,markets],validate_pairs->[markets,get_pair_quote_currency],sell->[create_order,dry_run_order],fetch_order_or_stoploss_order->[fetch_order],_async_get_trade_history->[_async_get_trade_history_time,_async_get_trade_history_id],_... | Initializes the object with the given config and checks whether the specified exchange and pairs are valid. This method is called to initialize the Cxt API and the Exchange. | Personally, i would be more specific with this. Skipping all validations can be dangerous... This will skip "all" validations - but at least for your usecase, only "validate_pairs" should be skipped - as stake-currency should still match (otherwise your backtests may show very odd results). |
@@ -260,7 +260,7 @@ def _clone_and_build_model(mode,
is_input=False)
else:
target_tensors = [
- _cast_tensor_to_floatx(
+ _convert_tensor(
sparse_tensor_lib.convert_to_tensor_or_sparse_tensor(labels))
]
| [model_to_estimator->[_save_first_checkpoint,_create_keras_model_fn],_create_keras_model_fn->[model_fn->[_clone_and_build_model,_in_place_subclassed_model_state_restoration]],_save_first_checkpoint->[_clone_and_build_model],_create_ordered_io->[_cast_tensor_to_floatx],_clone_and_build_model->[_cast_tensor_to_floatx,_cr... | Clone and build the given keras model and return the resulting model. Keras model configuration. | Thanks @Dref360! nit, we can remove sparse_tensor_lib.convert_to_tensor_or_sparse_tensor here? |
@@ -48,6 +48,7 @@ import mne
from mne.datasets import eegbci
from mne.io import concatenate_raws, read_raw_edf
from mne.time_frequency import tfr_multitaper
+from mne.stats import permutation_cluster_1samp_test as pctest
def center_cmap(cmap, vmin, vmax):
| [center_cmap->[cmap,LinearSegmentedColormap,cdict,hstack,linspace,zip,abs],,center_cmap,pick_channels,read_raw_edf,ax,show,dict,crop,range,concatenate_raws,plot,find_events,suptitle,rename_channels,load_data,arange,subplots,strip,tfr_multitaper,colorbar,Epochs] | Center given colormap ranging from vmin to vmax at value 0. | Do we use the same abbrev. elsewhere? |
@@ -0,0 +1,17 @@
+RailsPerformance.setup do |config|
+ config.redis = Redis::Namespace.new("#{Rails.env}-rails-performance", redis: Redis.new)
+ config.duration = 48.hours
+
+ config.debug = false
+ config.enabled = ENV["RAILS_PERFORMANCE_ENABLED"]
+
+ # protect your Performance Dashboard with HTTP BASIC pa... | [No CFG could be retrieved] | No Summary Found. | Unused block argument - controller. You can omit the argument if you don't care about it. |
@@ -75,10 +75,11 @@ abstract class NodeBbForumPoster extends AbstractForumPoster {
}
}
- private String uploadSaveGame(final CloseableHttpClient client, final String token) throws IOException {
+ private String uploadSaveGame(final CloseableHttpClient client, final String token, final Path file)
+ thro... | [NodeBbForumPoster->[queryUserInfo->[getForumUrl],uploadSaveGame->[getForumUrl],deleteToken->[getForumUrl],viewPosted->[getForumUrl],getToken->[newPasswordParameter,getForumUrl],post->[getForumUrl]]] | POST the message to the Forum. | Might be less confusing if the `Path file` parameter were named `path` throughout this class. |
@@ -98,7 +98,8 @@ func create(
}
}
- return jobs, len(config.URLs), nil
+ errWrapped := monitors.WrapAll(jobs, monitors.WithErrAsField)
+ return errWrapped, len(config.URLs), nil
}
func newRoundTripper(config *Config, tls *transport.TLSConfig) (*http.Transport, error) {
| [NewBuffer,Unpack,LoadTLSConfig,NewBufferString,MakeDebug,TLSDialer,Bytes,RegisterActive,NetDialer,Parse,Encode,ProxyURL] | NewHTTPMonitorJob creates a list of monitors. Jobs that can be used to run. | I'm stumbling over the `errWrapped` naming here as I expect a list of jobs. |
@@ -5,9 +5,11 @@ import java.lang.reflect.Method;
import javax.inject.Inject;
import javax.inject.Singleton;
-import io.quarkus.security.identity.SecurityIdentity;
+import io.quarkus.runtime.BlockingOperationNotAllowedException;
+import io.quarkus.security.runtime.SecurityIdentityAssociation;
import io.quarkus.sec... | [SecurityConstrainer->[check->[apply,getSecurityCheck]]] | Produces a class which can be used to check a single object. | `SecurtyIdentity` is injected from `SecurityIdentityAssociation#getIdentity` and the GRPC filter sets it, so why it has to be replaced ? |
@@ -238,7 +238,7 @@ export class AmpAutocomplete extends AMP.BaseElement {
return this.mutateElement(() => {
this.renderResults_();
this.toggleResults_(true);
- });
+ }).catch(e => this.renderFallbackUI_(e));
}
/**
| [No CFG could be retrieved] | Adds event listeners to the input element and the container element. Apply the filter to the given data based on the given input. | I don't think this `catch` block is correctly placed since it is on the `mutateElement` call, which doesn't pass on an error thrown by `renderResults`. Where's a better place for it? |
@@ -22,7 +22,8 @@ class Local(Storage):
created for you.
"""
- def __init__(self, directory: str = "~/.prefect/flows") -> None:
+ def __init__(self, directory: str = None) -> None:
+ directory = directory or os.path.join(prefect.config.home_dir, "flows")
self.flows = dict() # ... | [Local->[__contains__->[isinstance],add_flow->[dump,slugify,ValueError,format,join,open],__init__->[abspath,dict,expanduser,super,exists,makedirs],get_flow->[open,values,load,ValueError]]] | Initialize a sequence of flow IDs. | Should we do an `expanduser` here, since we're referencing `~`? |
@@ -65,8 +65,13 @@ public class LoginHelper {
private static Logger log = Logger.getLogger(LoginHelper.class);
private static final String DEFAULT_KERB_USER_PASSWORD = "0";
- private static final Long MIN_PG_DB_VERSION = 90600L;
- private static final String MIN_PG_DB_VERSION_STRING = "9.6";
+ priv... | [LoginHelper->[checkExternalAuthentication->[getSgsFromExtGroups,getMessage,equals,CreateUserCommand,isDisabled,getRemoteUser,warn,lookupByLogin,setRawPassword,getRolesFromExtGroups,setFirstNames,isEmpty,setEmail,getExtGroups,getAttribute,error,getSatConfigLongValue,setLastName,updateUser,decodeFromIso88591,setOrg,getU... | Creates a login helper class. Checks if the given is externally authenticated. | Here it is 12, but the Long is 130000 . Is this intentional? |
@@ -233,6 +233,11 @@ func (d *Service) writeServiceInfo() error {
func (d *Service) checkTrackingEveryHour() {
ticker := time.NewTicker(1 * time.Hour)
+ d.G().PushShutdownHook(func() error {
+ d.G().Log.Debug("stopping checkTrackingEveryHour timer")
+ ticker.Stop()
+ return nil
+ })
go func() {
for {
<... | [GetExclusiveLock->[GetExclusiveLockWithoutAutoUnlock,ReleaseLock],writeServiceInfo->[ensureRuntimeDir],GetExclusiveLockWithoutAutoUnlock->[ensureRuntimeDir],SimulateGregorCrashForTesting->[HasGregor],Handle->[RegisterProtocols],ListenLoop->[Handle]] | checkTrackingEveryHour is a long running routine that checks for tracks on an hour. | can we consolidate these guys into the same ticker loop? |
@@ -67,7 +67,10 @@ func NewCmdUpdateRunner(g *libkb.GlobalContext) *CmdUpdate {
}
func (v *CmdUpdate) GetUsage() libkb.Usage {
- return libkb.Usage{}
+ return libkb.Usage{
+ API: true,
+ Config: true,
+ }
}
func (v *CmdUpdate) ParseArgv(ctx *cli.Context) error {
| [Run->[Debug,G,Errorf,Info,TODO,Update],ParseArgv->[String,Bool,Errorf],DefaultUpdaterConfig,Sprintf,SetLogForward,NewContextified,SetForkCmd,ChooseCommand] | GetUsage implements the command line interface for CmdUpdate. | these two needed for standalone mode, BTW... |
@@ -52,9 +52,7 @@ def atomic_save(state_dict: Any, path: str) -> None:
to disk. Works by writing to a temporary file, and then renaming the file to the
final name.
"""
- tf = tempfile.NamedTemporaryFile('wb', delete=False, dir=os.path.dirname(path))
- torch.save(state_dict, tf)
- tf.close()
+ ... | [PipelineHelper->[_place_modulelist->[trainable_parameters],guess_split_size->[guess_split_size],split->[guess_split_size,split],join->[join],make_parallel->[trainable_parameters],chunk_to->[chunk_to]]] | Atomic save of . max_len is optional. | ya this should be `os.rename(path + ".tmp", path)` |
@@ -241,11 +241,12 @@ module InfoRequestHelper
full_filename = File.expand_path(Rails.root.join('app',
'assets',
'images',
+ 'content_type',
... | [status_text_waiting_response_very_overdue->[_,help_requesting_path,public_body_link,is_external?,new_request_followup_path,link_to,public_body,id],status_text_user_withdrawn->[_],status_text_waiting_response_overdue->[_,help_requesting_path,public_body_link,date_response_required_by,simple_date,content_tag,link_to,pub... | link to attachment image tag and link to attachment file if it doesn t exist. | Use 2 (not -6) spaces for indentation. |
@@ -27,7 +27,7 @@ Streptococcus viridans, 0.005, 10, 40, positive
Diplococcus pneumoniae, 0.005, 11, 10, positive
"""
-drug_color = OrderedDict([
+drug_color = dict([
("Penicillin", "#0d3362"),
("Streptomycin", "#c64737"),
("Neomycin", ... | [rad->[log,sqrt],text,annular_wedge,sqrt,figure,rad,show,output_file,power,rect,read_csv,log,zeros,values,list,to_series,circle,len,StringIO,line,keys,arange,str,sin,cos,OrderedDict,array] | Generate a plot of the national sequence of the national sequence of the national sequence Plot a burtin plot of the national sequence. | this is to plot the legend in the desired order |
@@ -138,4 +138,14 @@ public class PrestoDriver
// TODO: support java.util.Logging
throw new SQLFeatureNotSupportedException();
}
+
+ private OkHttpClient newHttpClient()
+ {
+ OkHttpClient.Builder builder = new OkHttpClient.Builder()
+ .addInterceptor(userAgent(DRIVER_... | [PrestoDriver->[connect->[PrestoConnection,build,PrestoDriverUri,QueryExecutor,newBuilder,acceptsURL,setupClient],getParentLogger->[SQLFeatureNotSupportedException],getPropertyInfo->[getProperties,toArray],close->[shutdown,evictAll],acceptsURL->[startsWith],group,RuntimeException,find,parseInt,build,firstNonNull,nullTo... | Get the parent logger for a sequence number. | There's `JavaVersion.current()`. As far as I know, "java.version" should never be null, so you should be able to use that one instead. |
@@ -101,6 +101,13 @@ class TestSoftmaxFP16Op(TestSoftmaxOp):
if core.is_float16_supported(place):
self.check_output_with_place(place, atol=1e-3)
+ #TODO(dzhwinter):
+ # in softmax, there is a sum(along_class), which lead to overflow
+ # We need to change it to gemm.
+ def tes... | [TestSoftmaxOp->[test_check_output->[CUDAPlace,check_output,check_output_with_place],test_check_grad->[CUDAPlace,check_grad_with_place,check_grad],setUp->[apply_along_axis,np_dtype_to_fluid_dtype,uniform,get_x_shape,reshape,init_kernel_type]],TestSoftmaxFP16CUDNNOp->[test_check_output->[CUDAPlace,is_float16_supported,i... | Check that the output of the n - tuple is correct. | You can use `pass` here. |
@@ -84,6 +84,15 @@ public class CoreDirectoryInit implements RepositoryInit {
user1.setProperty("schema1", "bar", "bar1");
session.saveDocument(user1);
+ // Creates SHA1 passwords for unit test
+ String ENC_PWD_USERSHA1 = PasswordHelper.hashPassword(DOC_PWD_USERSHA1, PasswordHelper.SSH... | [CoreDirectoryInit->[createDomain->[createDocument],createDocument->[createDocument]]] | Populates the specified session with the missing root folder. This method is called when a unit test is done. It creates a User2 doc for. | It's better to hardcode the value and not depend on the implementation of `PasswordHelper.hashPassword` in the test. In which case you can actually use a real constant `public static final ENC_PWD_USERSHA1`. |
@@ -96,6 +96,15 @@ def get_or_process_password_form(request):
return form
+def get_or_process_name_form(request):
+ form = NameForm(data=request.POST or None, instance=request.user)
+ if form.is_valid():
+ form.save()
+ messages.success(request, pgettext(
+ 'Storefront message', ... | [account_delete->[pgettext,str,success,HttpResponseRedirect,reverse,delay],account_delete_confirm->[pgettext,redirect,Http404,str,success,TemplateResponse,delete],address_delete->[get_object_or_404,pgettext,success,HttpResponseRedirect,reverse,TemplateResponse,delete],logout->[success,redirect,_,logout],get_or_process_... | Edit an address. | We know what data was changed and we could give a more user-friendly feedback. What do you think about something like: "Account successfully updated"? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.