patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -62,7 +62,6 @@ class IfElseTransformer(gast.NodeTransformer):
self.after_visit(self.root)
def visit_If(self, node):
- assert isinstance(node, gast.If)
if_condition_visitor = IfConditionVisitor(node.test,
self.static_analysis_visitor)
... | [get_name_ids->[NameVisitor,visit],IfConditionVisitor->[is_control_flow->[transform],transform->[set_compare_nodes_with_tensor,get_compare_nodes_with_tensor,get_new_assign_nodes,transform],__init__->[NodeTestTransformer,IsControlFlowVisitor]],NameVisitor->[_visit_child->[visit],_find_new_name_ids->[is_required_ctx]],If... | If node is a if node transform it and add it to the list of new nodes. | Why did you delete this assertion? Is gast.IfExp also goes through visit_If? |
@@ -85,7 +85,11 @@ public class HoodieCleanClient<T extends HoodieRecordPayload> extends AbstractHo
// If there are inflight(failed) or previously requested clean operation, first perform them
table.getCleanTimeline().filterInflightsAndRequested().getInstants().forEach(hoodieInstant -> {
LOG.info("Ther... | [HoodieCleanClient->[clean->[clean],runClean->[clean,runClean],scheduleClean->[scheduleClean]]] | Performs a clean operation on the Hoodie table. | @lamber-ken : Can we rollback the corrupted instant seamlessly in this case ? Can you also add a CLI (called timeline upgrade) which would read the timeline and fix upgrade issues. For now, the CLI can just handle only known issue - to deal with corrupted inflight clean instants. We can have users run them before upgra... |
@@ -674,6 +674,7 @@ public class DeckPicker extends NavigationDrawerActivity implements
int[] studyOptionsCounts = getCol().getSched().counts();
if (studyOptionsCounts[0] + studyOptionsCounts[1] + studyOptionsCounts[2] == 0) {
UIUtils.showSimpleSnackbar(this, R.string.studyopt... | [DeckPicker->[handleDbError->[showDatabaseErrorDialog],exit->[exit],mediaCheck->[onPostExecute->[showMediaCheckDialog]],updateDeckList->[onPostExecute->[onCollectionLoadError,scrollDecklistToDeck]],onDestroy->[onDestroy],onOptionsItemSelected->[onOptionsItemSelected],onCreate->[onCreate],openStudyOptions->[loadStudyOpt... | Override onActivityResult to handle missing key - value responses. This method is called when the user clicks on the dialog. It will check if the dialog. | Is there a risk of this getting triggered at the same time as the existing auto-sync trigger if they're both enabled? |
@@ -670,9 +670,8 @@ static void output_csv(struct callback_data *p, const char *z, int bSep) {
*/
static void interrupt_handler(int signal) {
if (signal == SIGINT) {
- osquery::Initializer::requestShutdown(130);
+ seenInterrupt = 1;
}
- seenInterrupt = 1;
}
#endif
| [No CFG could be retrieved] | Outputs a single term of CSV. function to handle the n - ary callback. | Note, that the previous introduction of ^C in the shell is now (again) removed. The shell does not really support an interrupt nor does that experience mimic normal shell REPLs. |
@@ -71,6 +71,12 @@ import java.util.TreeMap;
public class SearchQueryRunner implements QueryRunner<Result<SearchResultValue>>
{
private static final EmittingLogger log = new EmittingLogger(SearchQueryRunner.class);
+
+ private static final double HIGH_FILTER_SELECTIVITY_THRESHOLD_FOR_CONCISE = 0.99;
+ private st... | [SearchQueryRunner->[getStartIndexOfTime->[length,getLongSingleValueRow],makeReturnResult->[apply->[getValue,SearchHit,getKey,intValue,getDimension],newArrayList,of,SearchResultValue,limit,transform,simple,getStart,entrySet],run->[accumulate->[isDone,getValue,newHashMap,MutableInt,SearchHit,size,accept,entrySet,get,get... | This class is used to run a search query on a specific segment. Returns the segment that matches the given query. | can the strategies themselves return these constants? This way if we add additional bitmap algorithms we can just add new strategies |
@@ -1,4 +1,5 @@
import os
+import mock
def compare_dict(source, target):
| [compare_dict->[difference,keys,AssertionError,set,isinstance,join,map],SideEffect->[__call__->[callable,next,isinstance,value],__init__->[iter]],touch->[dirname,close,exists,open,makedirs]] | Utility method to compare two dictionaries. | pep8: blank should be left in. |
@@ -65,13 +65,12 @@ def test_freeze_basic(script):
_check_output(result, expected)
-@pytest.mark.network
-def test_freeze_svn(script, tmpdir):
+def test_freeze_svn(script, tmpdir, data):
"""Test freezing a svn checkout"""
checkout_path = local_checkout(
'svn+http://svn.colorstudy.com/INITo... | [test_freeze_basic->[_check_output],test_freeze_svn->[_check_output],test_freeze_bazaar_clone->[_check_output],_check_output->[banner],test_freeze_with_local_option->[_check_output],test_freeze_mercurial_clone->[_check_output],test_freeze_with_requirement_option->[_check_output],test_freeze_git_clone->[_check_output],t... | Test freezing a svn checkout. | Spurious "tidy up" change, presumably? |
@@ -52,6 +52,12 @@ public final class SqlStruct extends SqlType {
return fields;
}
+ public Optional<Field> field(final String name) {
+ return fields.stream()
+ .filter(f -> f.name().equals(name))
+ .findFirst();
+ }
+
@Override
public boolean supportsCast() {
return false;
| [SqlStruct->[toString->[toString],Builder->[field->[field],build->[SqlStruct]],equals->[equals]]] | Returns a list of fields that can be cast to a type. | what do you think about having `SqlStruct` create an `ImmutableMap`? If we're already making a copy of fields and iterating through the entire array then there shouldn't be a problem by just indexing it by name to make field fetching more efficient. |
@@ -0,0 +1,11 @@
+from django.conf.urls import url
+
+from . import views
+
+
+urlpatterns = [
+ url(r'^$', views.page_list, name='page-list'),
+ url(r'^add/$', views.page_add, name='page-add'),
+ url(r'^(?P<pk>[0-9]+)/detail/$', views.page_detail, name='page-detail'),
+ url(r'^(?P<pk>[0-9]+)/edit/$', views... | [No CFG could be retrieved] | No Summary Found. | I think the URL could be simple `/dashboard/page/<pk>/`, that's what we use in other details views in the dashboard. |
@@ -1485,6 +1485,10 @@ int MAIN(int argc, char **argv)
X509_CRL_free(crl);
NCONF_free(conf);
NCONF_free(extconf);
+#ifndef OPENSSL_NO_ENGINE
+ if (e != NULL)
+ release_engine(e);
+#endif
OBJ_cleanup();
apps_shutdown();
OPENSSL_EXIT(ret);
| [No CFG could be retrieved] | function to free all variables in the system Reads a certificate request from a file and checks that it matches the signature. | release_engine does the NULL check, so you don't need it here (and elsewhere). And in fact you could make release_engine be a no-op and remove the #ifdef's too. Much less invasive I think. |
@@ -398,6 +398,10 @@ class Backtesting:
'Backtesting with data from %s up to %s (%s days)..',
min_date.isoformat(), max_date.isoformat(), (max_date - min_date).days
)
+
+ # Store reprocessed data for later use in export
+ preprocessed_data[self.strate... | [Backtesting->[start->[load_bt_data,backtest,_set_strategy],backtest->[_get_sell_trade_entry,_get_ohlcv_as_lists],_get_sell_trade_entry->[BacktestResult,_get_close_rate]]] | Run backtesting and print results. Get a single unknown node ID from the backtest results. | You might wanna extract the "datadump" function from after the loop into here. Assuming this is running for 20 strategies, you'd force me to be able to have enough RAM available to store the data 20+ times. Previously, the "per strategy" data was scoped to the for-loop, releasing memory after each iteration. |
@@ -301,6 +301,7 @@ public class StateConsumerImpl implements StateConsumer {
}
stateTransferLock.releaseExclusiveTopologyLock();
stateTransferLock.notifyTopologyInstalled(cacheTopology.getTopologyId());
+ remoteCommandsExecutor.checkForReadyTasks();
try {
// fetch transacti... | [StateConsumerImpl->[requestSegments->[findSources],notifyEndOfRebalanceIfNeeded->[hasActiveTransfers,stopApplyingState],retryTransferTask->[getOwnedSegments,findSources],getSegment->[getSegment],onTopologyUpdate->[stopApplyingState],onTaskCompletion->[call->[retryTransferTask,removeTransfer,notifyEndOfRebalanceIfNeede... | Called when a topology is updated. Returns a that can be used to request the segments we own. check if there is a node in the cache and if so add it to the list of Remove transactions who have left the cache. | haven't we decided that this is bad (and the line 390 too) and we should move it after the command is processed? |
@@ -203,7 +203,7 @@ class AugeasDirectiveNode(AugeasParserNode):
self.metadata == other.metadata)
return False
- def set_parameters(self, parameters):
+ def set_parameters(self, parameters: List[str]):
"""
Sets parameters of a DirectiveNode or BlockNode object.
| [AugeasParserNode->[save->[save]],AugeasBlockNode->[add_child_block->[AugeasBlockNode],_aug_resolve_child_position->[_aug_get_name],add_child_directive->[AugeasDirectiveNode],find_comments->[find_comments],_create_directivenode->[AugeasDirectiveNode],unsaved_files->[unsaved_files],_create_commentnode->[AugeasCommentNod... | Checks if two nodes are equal. | Could be an `Iterable[str]`. |
@@ -103,7 +103,7 @@ class WebspaceCollectionBuilder
$collection = new WebspaceCollection();
// reset arrays
- $this->webspaces = array();
+ $webspaces = array();
$this->portals = array();
$this->portalInformations = array();
| [WebspaceCollectionBuilder->[buildUrls->[buildUrlPartialMatch,buildUrlFullMatch]]] | Builds a collection of all possible configuration files. | Don;t know why this was class-scoped. |
@@ -19,5 +19,5 @@ func init() {
// AssetEnterprisesearch returns asset data.
// This is the base64 encoded zlib format compressed contents of module/enterprisesearch.
func AssetEnterprisesearch() string {
- return "eJzsnEuP47gRx+/9KQp9SoB0B/u69GGByewGs4vMYIGZzR6CQEuRZZtjidTwYbf30wckJZu2KFmSZXeQdB8WCz+qfv9isVik6HmANe... | [SetFields] | AssetEnterprisesearch returns the base64 encoded compressed contents of the module s enter This function is used to create a new instance of the class that is used to create a This function is used to create a new instance of the class that is used to create a. | I don't know how to verify this machine-generated string. I trust it's machine-generated. :) |
@@ -2633,6 +2633,7 @@ void wait_for_async(SSL *s)
fds++;
}
select(width, (void *)&asyncfds, NULL, NULL, NULL);
+ OPENSSL_free(fds);
#endif
}
| [No CFG could be retrieved] | Opens a bio with the given name mode and format. - - - - - - - - - - - - - - - - - -. | since fds has been increased, this won't actually work. You'll need to keep the original pointer. |
@@ -39,6 +39,9 @@ func ValidateDeploymentConfigSpec(spec deployapi.DeploymentConfigSpec) field.Err
if spec.Template == nil {
allErrs = append(allErrs, field.Required(specPath.Child("template"), ""))
} else {
+ originalContainerImageNames := getContainerImageNames(spec.Template)
+ defer setContainerImageNames(s... | [ValidatePodLogOptions,Index,ValidateLabels,ValidatePodTemplateSpec,SplitImageStreamTag,IsDNS1123Subdomain,NewPath,Required,Atoi,Error,ValidateImageStreamName,MatchString,DeploymentToPodLogOptions,New,Child,Errorf,MustCompile,ValidateObjectMeta,TemplateImageForContainer,ValidateAnnotations,Invalid,ValidateObjectMetaUpd... | ValidateDeploymentConfig validates a deployment config ValidateDeploymentConfigUpdate validates a deployment config. | We should defer only if we actually mutated. |
@@ -62,10 +62,12 @@ func (nsu *nodeStatusUpdater) UpdateNodeStatuses() error {
for nodeName, attachedVolumes := range nodesToUpdate {
nodeObj, exists, err := nsu.nodeInformer.GetStore().GetByKey(nodeName)
if nodeObj == nil || !exists || err != nil {
- return fmt.Errorf(
- "failed to find node %q in NodeInf... | [UpdateNodeStatuses->[CreateStrategicMergePatch,GetVolumesToReportAttached,Infof,Marshal,GetStore,Nodes,Core,V,Errorf,PatchStatus,GetByKey,ResetNodeStatusUpdateNeeded]] | UpdateNodeStatuses updates the status of all nodes in the cluster ResetNodeStatusUpdateNeeded - reset status of a node if it is not already set. | return or continue? bigger question, should errors later in the loop return or continue? |
@@ -210,10 +210,8 @@ func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
if config.Hostname != "" {
g.AddProcessEnv("HOSTNAME", config.Hostname)
}
-
- for _, sysctl := range config.Sysctl {
- s := strings.SplitN(sysctl, "=", 2)
- g.AddLinuxSysctl(s[0], s[1])
+ for sysctlKey, sysctlVal := ran... | [GetVolumeMounts->[Wrapf,Split,Relabel],GetContainerCreateOptions->[WithNetNS,WithStopSignal,IsHost,WithName,WithStdin,WithStopTimeout,Debugf],GetTmpfsMounts->[Split],CreateBlockIO->[Minor,Wrapf,Major],SetLinuxResourcesCPURealtimePeriod,GetAnnotations,IsContainer,SetLinuxResourcesMemoryReservation,AddLinuxSysctl,SetLin... | createConfigToOCISpec creates a spec that represents a container in the specified OCI runtime. if - Set all the fields of the nexus - resource object to their default values. | Are you verifying the syscalls as legal? We can do that in a separate PR. |
@@ -170,6 +170,15 @@ class PyLower(BaseLower):
else:
raise NotImplementedError(type(inst), inst)
+ @utils.cached_property
+ def _omitted_typobj(self):
+ """Return a `OmittedArg` type instance as a LLVM value suitable for
+ testing at runtime.
+ """
+ from numba.... | [PyLower->[get_builtin_obj->[get_module_dict],_freeze_string->[lower_const],is_null->[is_null],incref->[incref],alloca->[alloca],storevar->[_getvar],cleanup_vars->[_getvar],decref->[decref],loadvar->[return_exception_raised,is_null],lower_expr->[lower_binop],delvar->[_getvar]]] | Lower the object in the chain. Returns a new object with a specific type. _OmittedArg - Optional argument to get the default value of . | this here due to circular import problems? |
@@ -59,7 +59,13 @@ class ModelProfiler:
nn.AdaptiveAvgPool3d: self._count_adap_avgpool,
nn.Upsample: self._count_upsample,
nn.UpsamplingBilinear2d: self._count_upsample,
- nn.UpsamplingNearest2d: self._count_upsample
+ nn.UpsamplingNearest... | [ModelProfiler->[_count_convNd->[_get_result],count_module->[_push_result],_count_linear->[_get_result],_count_bn->[_get_result],_count_avgpool->[_get_result],_count_adap_avgpool->[_get_result],_count_upsample->[_get_result],_count_relu->[_get_result],_get_result->[_get_params]],count_flops_params->[sum_params,ModelPro... | Initialize the object with the sequence of all possible non - zero elements. Flag a node - level as having a custom operation. | just curious, why only `conv` and `linear` are supported by default? |
@@ -400,10 +400,13 @@ function compile(
.on('error', reject)
.pipe(sourcemaps.write('.'))
.pipe(
- gulpIf(
- !!argv.esm,
- gap.appendText(`\n//# sourceMappingURL=${outputFilename}.map`)
- )
+ gulpIf(function(file) {
+ // Do not appen... | [No CFG could be retrieved] | Check for unknown dependencies. | Can you move out the condition function and the processing function into helpers called `shouldAppendSourceMappingUrl()` and `appendSourceMappingUrl()`? |
@@ -101,8 +101,8 @@ public class HoodiePartitionMetadata {
fs.rename(tmpMetaPath, metaPath);
}
} catch (IOException ioe) {
- LOG.warn("Error trying to save partition metadata (this is okay, as long as atleast 1 of these succced), "
- + partitionPath, ioe);
+ LOG.warn(String.forma... | [HoodiePartitionMetadata->[trySave->[hsync,Path,create,hflush,rename,store,warn,close,exists,delete],readFromFS->[Path,HoodieException,close,open,load],getPartitionDepth->[HoodieException,containsKey,getProperty,parseInt],hasPartitionMetadata->[exists,Path,HoodieException],getLogger,depth,setProperty,Properties,valueOf... | try to save the partition metadata to disk. | Since we have used slf4j, we may not need to use `String.format`. The slf4j framework supports `placeholder`. |
@@ -19,6 +19,15 @@
namespace Kratos
{
+ /// Compare component type utility
+ // This auxiliar function prevents [-Wpotentially-evaluated-expression]
+ // from triggering in clang3.7 and higher
+ template<typename A_Type, typename B_Type>
+ inline bool isTypeIndexEq(const A_Type & component_A, const B... | [No CFG could be retrieved] | Constructor for a single n - line object. Constructor with stream. | This is not the equivalent to `std::is_same`? |
@@ -17,13 +17,7 @@ from pants.engine.unions import UnionRule
class ProtobufDependencies(Dependencies):
- """Addresses to other targets that this target depends on, e.g. `['protobuf/example:lib']`.
-
- Pants will automatically inject any targets that you configure in the option `runtime_targets`
- in the `... | [rules->[collect_rules,UnionRule],inject_dependencies->[InjectedDependencies,Get,UnparsedAddressInputs]] | Provides a function to inject dependencies into a target that depends on a specific target. Returns a list of rules that can be used to filter a sequence of tokens. | This option is deprecated. Its replacement is in `[python-protobuf]`, so it's wrong to talk about it in the generic `Dependencies` field for a `protobuf_library`. In some feature, you might activate `pants.backend.codegen.protobuf.java`, and that `[python-protobuf]` option would never be used. |
@@ -279,7 +279,8 @@ class SetChannelsMixin(object):
mne.set_bipolar_reference
"""
from ..io.reference import set_eeg_reference
- return set_eeg_reference(self, ref_channels, copy=False)[0]
+ return set_eeg_reference(self, ref_channels, copy=False,
+ ... | [ContainsMixin->[__contains__->[_contains_ch_type]],_get_T1T2_mag_inds->[pick_types],UpdateChannelsMixin->[pick_types->[pick_types],_pick_drop_channels->[inst_has]],read_ch_connectivity->[_recursive_flatten],fix_mag_coil_types->[pick_types],SetChannelsMixin->[set_channel_types->[_check_set],rename_channels->[rename_cha... | Rereference EEG channels to new reference channel. Returns the position of the last residue in the sequence. | you don't need to pass `verbose` to the underlying function, so just undo this change |
@@ -680,6 +680,18 @@ func (e *Env) GetLogFile() string {
)
}
+func (e *Env) GetStoredSecretAccessGroup() string {
+ var override = e.GetBool(
+ false,
+ func() (bool, bool) { return e.config.GetSecurityAccessGroupOverride() },
+ )
+
+ if override {
+ return ""
+ }
+ return "99229SGT5K.group.keybase"
+}
+
func ... | [GetGpgHome->[GetGpgHome,GetString,GetHome],GetAPIDump->[GetBool,GetAPIDump,getEnvBool],GetGpg->[GetString,GetGpg],GetStandalone->[GetBool,GetStandalone,getEnvBool],GetLogFormat->[GetString,GetLogFormat],GetTimers->[GetString,GetTimers],getHomeFromCmdOrConfig->[GetString,GetHome],GetNoPinentry->[GetPinentry,GetBool,Get... | GetLogFile returns the log file name for the environment. | Allow mobile to change this since it doesn't work on the simulator |
@@ -224,6 +224,11 @@ public class SerializableCoder<T extends Serializable> extends CustomCoder<T> {
return typeDescriptor;
}
+ @Override
+ public String toString() {
+ return "SerializableCoder";
+ }
+
// This coder inherits isRegisterByteSizeObserverCheap,
// getEncodedElementByteSize and regist... | [SerializableCoder->[of->[of],SerializableCoderProvider->[coderFor->[of]],SerializableCoderProviderRegistrar->[getCoderProviders->[of,getCoderProvider]],hashCode->[hashCode],getEncodedTypeDescriptor->[of]]] | Returns the encoded type descriptor of this type. | This should be more of a debug string where no info is skipped, like `MoreObjects.toStringHelper(this).add(clazz)` |
@@ -57,7 +57,9 @@ public class GemfireInboundChannelAdapterParser extends AbstractChannelAdapterPa
listeningMessageProducer.addPropertyReference(OUTPUT_CHANNEL_PROPERTY, channelName);
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(listeningMessageProducer, element, ERROR_CHANNEL_ATTRIBUTE);
-
+ if (e... | [GemfireInboundChannelAdapterParser->[doParse->[getAttribute,hasAttribute,setValueIfAttributeDefined,error,getBeanDefinition,genericBeanDefinition,addConstructorArgReference,setReferenceIfAttributeDefined,addPropertyReference]]] | Parses the given element and returns the bean definition. | The same here. Revert your changes, please. |
@@ -138,6 +138,12 @@ func (app *ChainlinkApplication) AddJob(job models.JobSpec) error {
return app.JobSubscriber.AddJob(job, nil) // nil for latest
}
+// ArchiveJob silences the job from the system, preventing future job runs.
+func (app *ChainlinkApplication) ArchiveJob(ID string) error {
+ _ = app.JobSubscriber... | [NewBox->[NewBox],Stop->[Stop],Start->[Start],AddServiceAgreement->[AddJob],RemoveAdapter->[GetStore],AddAdapter->[GetStore],AddJob->[AddJob]] | AddJob adds a job to the application. | Wondering if we should still return an error here, possibly just `mutierr.Join` and in the happy path where they're both nil no change. I get that there's not much we can do if RemoveJob fails, but it would at least be good to surface the error in the case where it does turn up. |
@@ -432,15 +432,15 @@ describes.sandboxed('UrlReplacements', {}, () => {
it('should add extra params to SOURCE_URL', () => {
const win = getFakeWindow();
win.location = parseUrlDeprecated(
- 'https://cdn.ampproject.org/a/o.com/foo/?amp_r=hello%3Dworld');
+ 'https://cdn.ampproject.or... | [No CFG could be retrieved] | Checks that the URL replacements for the window. AMPDOC is loaded from the AMP This stub is used to test if the trackImpressionPromise is called. | @brandondiamond Is the trailing `=` right? |
@@ -220,7 +220,7 @@ func (s *serverCreator) CheckConfig(cfg *common.Config) error {
func (s *serverCreator) Create(p beat.PipelineConnector, rawConfig *common.Config) (cfgfile.Runner, error) {
integrationConfig, err := config.NewIntegrationConfig(rawConfig)
- if err != nil {
+ if integrationConfig == nil || err !=... | [Create->[MustNewConfigFrom,NewIntegrationConfig,Merge],Stop->[Unlock,Infof,Seconds,Do,stopServer,Lock,Wait],start->[Unlock,Stop,NewRunnerList,AfterFunc,Close,Start,Enabled,Lock,MustRegisterList],CheckConfig->[NewIntegrationConfig],Start->[Done,Add,run],registerPipelineCallback->[NewConnectedClient,New,IsEnabled,Regist... | Create creates a new server runner. | It doesn't make sense to return a `nil` `cfgfile.Runner` unless there's an error being returned, and `integrationConfig` will/should only be `nil` if `config.NewIntegrationConfig` returns an error -- so I don't think this is right. |
@@ -402,10 +402,11 @@ class Evoked(ProjMixin, ContainsMixin, UpdateChannelsMixin,
channel traces will not be shown.
window_title : str | None
The title to put at the top of the figure window.
- spatial_colors : bool
- Color code lines by mapping physical sensor coord... | [Evoked->[detrend->[detrend],resample->[resample]],read_evokeds->[Evoked,_get_evoked_node],grand_average->[copy]] | Plot evoked data as butterfly plots with a specific number of channels. Plots a single critical channel type plot. | Uh ... no `bool` where False equals None and True defaults to 'skirt'? Sorry to keep harping on about this ... I just think, semantically, a True is always simpler. Also, semantically, "skirt" isn't really an argument of "spatial_colors", but of legend, so it's already odd. Allowing a default True would make that a bit... |
@@ -64,8 +64,8 @@ namespace Internal.IL
if (_ilBytes != null)
return _ilBytes;
- byte[] ilBytes = _methodBody.GetILBytes();
- return (_ilBytes = ilBytes);
+ Interlocked.CompareExchange(ref _ilBytes, _methodBody.GetILBytes(), null);
+ return _il... | [EcmaMethodIL->[GetObject->[GetObject],GetILBytes->[GetILBytes]]] | Get the ILBytes of the method body. | Why is it important for this method to use `CompareExchange` but other methods in this type, say `GetLocals` are okay with not using it? |
@@ -53,6 +53,7 @@ void AddTrilinosConvergenceAcceleratorsToPython(pybind11::module &m)
using TrilinosBaseConvergenceAcceleratorType = ConvergenceAccelerator<TrilinosSparseSpaceType, TrilinosLocalSpaceType>;
py::class_<TrilinosBaseConvergenceAcceleratorType, typename TrilinosBaseConvergenceAcceleratorType::P... | [AddTrilinosConvergenceAcceleratorsToPython->[TrilinosBaseConvergenceAcceleratorType>,Pointer>],AuxiliarUpdateSolution->[GetReference,UpdateSolution]] | Add trilinos accelerators to Python module. A sequence of objects that can be initialized with a constant constant. | I would not allow this why do you want to add it? IMO the only CTor we have should be the one that accepts `Parameter`s |
@@ -647,7 +647,7 @@ class OutputTimer(object):
windows=(self._window, ),
clear_bit=False,
fire_timestamp=ts,
- hold_timestamp=self._input_timestamp,
+ hold_timestamp=ts,
paneinfo=self._paneinfo)
self._timer_coder_impl.encode_to_stream(timer, self._output_stream, Tr... | [create_combine_per_key_precombine->[get_only_output_coder,augment_oldstyle_op,get_input_windowing],StateBackedSideInputMap->[__getitem__->[MultiMap->[],MultiMap,_StateBackedIterable]],create_read_from_impulse_python->[get_only_output_coder],ReadModifyWriteRuntimeState->[commit->[commit],read->[read],clear->[clear]],cr... | Sets a single key - value entry in the user s timer. | Can we only use fire_timestamp as hold_timestamp when in event time domain? |
@@ -14,7 +14,6 @@ As usual we'll start by importing the modules we need and loading some
import os
import numpy as np
import matplotlib.pyplot as plt
-from mpl_toolkits.mplot3d import Axes3D # noqa
import mne
sample_data_folder = mne.datasets.sample.data_path()
| [plot_alignment,where,make_standard_montage,join,figure,set_3d_view,read_layout,read_raw_fif,plot,add_subplot,print,dirname,data_path,endswith,sorted,make_eeg_layout,gca,plot_sensors,view_init,listdir] | Create a plot of the given . Attribute of the # attribute. | this was not needed? |
@@ -215,11 +215,10 @@ public class DefaultSearchSubPage extends AbstractSearchSubPage {
assert(path != null && !path.isEmpty());
int lastPartIndex = path.lastIndexOf('/');
String folderName = path.substring(lastPartIndex + 1);
- WebElement e = selectPathDiv.findElement(By.xpath(
- ... | [DefaultSearchSubPage->[selectPath->[apply->[isEnabled,findElement,id,isDisplayed],split,charAt,waitForAjaxRequests,isEmpty,AjaxRequestManager,watchAjaxRequests,length,closeFancyBox,click,waitUntilGivenFunction],getAvailableAuthorAggregate->[getAggregates,Select2AggregateElement],getAvailableCoverageAggregate->[getAggr... | Deselects a folder in the select path. | Why just not use Locator.findElementWaitUntilEnabledAndClick directly? |
@@ -209,7 +209,6 @@ add_filter( 'jetpack_should_use_minified_assets', 'jetpack_should_use_minified_a
// @todo: Abstract out the admin functions, and only include them if is_admin()
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack.php' );
require_once( JETPACK__PLUGIN_DIR . 'class.jetpack-network.php'... | [No CFG could be retrieved] | Jetpack installation. Requires all of the plugin files. | Should we also add `automattic/jetpack-client` to the root `composer.json`? |
@@ -495,9 +495,9 @@ public final class GameParser {
.collect(Collectors.toList());
}
- private static List<Node> getNonTextNodesIgnoring(final Node node, final String ignore) {
+ private static List<Node> getNonTextNodesIgnoring(final Node node) {
final List<Node> nonTextNodes = getNonTextNodes(nod... | [GameParser->[getProductionFrontier->[getValidatedObject],getDocument->[parse],parseRepairRules->[getChildren],findAttachment->[getRelationshipType,getUnitType,getTerritoryEffect,getTerritory,newGameParseException,getTechnology,getPlayerId,getResource],parseHeldUnits->[getPlayerId,getUnitType],parseShallow->[parseShall... | Get children of a node ignoring the ignore tag. | I would've renamed to method to `getNonTextNodesIgnoringValue` or something |
@@ -152,7 +152,7 @@ public class CanalAttachment extends DefaultAttachment {
m_excludedUnits = value;
}
- public HashSet<UnitType> getExcludedUnits(final GameData data) {
+ public HashSet<UnitType> getExcludedUnits() {
if (m_excludedUnits == null) {
return new HashSet<>(
Match.getMatc... | [CanalAttachment->[validate->[GameParseException,size,thisErrorMsg],setExcludedUnits->[equalsIgnoreCase,split,thisErrorMsg,IllegalStateException,getAllUnitTypes,getUnitType,addAll,add],get->[hasNext,getName,IllegalStateException,get,iterator,getAttachment,add,startsWith,next,getAttachments],setLandTerritories->[split,g... | Sets the unit types that should be excluded from the game. | This parameter was unused. |
@@ -1226,6 +1226,9 @@ function createBaseCustomElementClass(win) {
const isReLayoutNeeded = this.implementation_.unlayoutCallback();
if (isReLayoutNeeded) {
this.reset_();
+ if (this.isLoadableV2()) {
+ this.getResources().scheduleLoad(this);
+ }
}
this.dispat... | [No CFG could be retrieved] | This method is called by the UI thread when a resource of a given type is available. Determines if the element is a duplicate of another element and if so moves it to the owner. | nit: isReLayoutNeeded --> isRelayoutNeeded |
@@ -44,7 +44,14 @@ func getCredsFilePath() (string, error) {
return "", fmt.Errorf("failed to create '%s'", pulumiFolder)
}
- return path.Join(pulumiFolder, "credentials.json"), nil
+ // If we are running as part of unit tests, we want to save/restore a different set
+ // of credentials as to not modify the deve... | [IsNotExist,Join,Stat,Current,ReadFile,Marshal,WriteFile,New,Unmarshal,Remove,Errorf,MkdirAll] | getStoredCredentials returns the credentials stored on disk if it exists. Otherwise nil and related OS storeCredentials updates the stored credentials on the machine. | Feels like this constant should be defined in the workspace package. |
@@ -539,6 +539,7 @@ describe Category do
@category.destroy
expect(Category.exists?(id: @category_id)).to be false
expect(Topic.exists?(id: @topic_id)).to be false
+ expect(Topic.with_deleted.exists?(id: @topic_id)).to be true
expect(SiteSetting.shared_drafts_category).to be_blank
e... | [minute,create,let,freeze_time,trash!,it,set_subfolder,contain_exactly,to,cooked,before_all,max_category_nesting,types,change,track_publish,match,destroy!,context,uncategorized_category_id,add,enable_category_group_moderation,reload,shared_drafts_category,ensure_consistency!,be,to_not,custom_fields,match_array,slug,cre... | The following methods are defined in the category topic s section of the template. These methods check requires that the category has been created. | We can remove the assertion above as it is testing the same thing. |
@@ -77,7 +77,7 @@ public class TaskToolboxFactory
DataSegmentMover dataSegmentMover,
DataSegmentArchiver dataSegmentArchiver,
DataSegmentAnnouncer segmentAnnouncer,
- FilteredServerView newSegmentServerView,
+ SegmentHandoffNotifierFactory handoffNotifierFactory,
QueryRunnerFactory... | [TaskToolboxFactory->[build->[manufacturate,getTaskWorkDir,TaskToolbox,getId],checkNotNull]] | Creates a new instance of the class. Sets the index merger. | minor nit, but we should keep the arguments in the same order and just replace newSegmentServerView with handoffNotifierFactory. Makes it easier to track changes and resolve conflicts. |
@@ -437,7 +437,7 @@ def _find_events(data, first_samp, verbose=None, output='onset',
@verbose
def find_events(raw, stim_channel=None, verbose=None, output='onset',
- consecutive='increasing', min_duration=0):
+ consecutive='increasing', min_duration=None, one_sample=True):
"""Find... | [_find_events->[_find_stim_steps],read_events->[pick_events,_read_events_fif],find_stim_steps->[_find_stim_steps],find_events->[_find_events]] | This function finds events in a sequence of events in a stimulated time series or a stim Find events at a specific node in a stim channel. | default should be `min_duration=0` |
@@ -39,6 +39,13 @@ class CmdRemoteAdd(CmdConfig):
)
section = Config.SECTION_REMOTE_FMT.format(self.args.name)
+
+ try:
+ self._prevent_config_overwriting(section)
+ except DvcException as exc:
+ logger.error(exc)
+ return 1
+
ret = self._s... | [CmdRemoteAdd->[run->[resolve_path]],add_parser->[add_parser],CmdRemoteRemove->[run->[_remove_default]]] | Run the remote command. | There is no point in raising an exception just to catch it right here. You could simply print the error and `return 1`. |
@@ -2366,6 +2366,12 @@ public class HiveMetadata
return accessControlMetadata.listRoles(session);
}
+ @Override
+ public Set<RoleGrant> listAllRoleGrants(ConnectorSession session, Optional<Set<String>> roles, Optional<Set<String>> grantees, OptionalLong limit)
+ {
+ return ImmutableSet.c... | [HiveMetadata->[dropRole->[dropRole],dropColumn->[dropColumn],dropView->[dropTable],listTablePrivileges->[listTables,listTablePrivileges],makeCompatiblePartitioning->[min],grantTablePrivileges->[grantTablePrivileges],listViews->[listSchemas],finishCreateTable->[createTable,buildTableObject],getTableMetadata->[getTableM... | List roles. | @electrum Can you please take a look at this pull request too? I would like to have a second pair of eyes before adding any new table to `information_schema`? |
@@ -77,6 +77,9 @@ import apache_beam.internal.pickler
from apache_beam import coders
from apache_beam import io
from apache_beam import typehints
+from apache_beam import version
from apache_beam.pipeline import Pipeline
from apache_beam.transforms import *
# pylint: enable=wrong-import-position
+
+__version__ = ... | [RuntimeError] | import a single node from a single Beam. | Why do we need the changes to this file? |
@@ -342,6 +342,7 @@ final public class GenerateExtensionConfigurationDoc {
List<? extends TypeMirror> typeArguments = declaredType.getTypeArguments();
if (!typeArguments.isEmpty()) {
+ // FIXME: this is super dodgy: we should check the type!!
... | [GenerateExtensionConfigurationDoc->[recordConfigItems->[recordConfigItems]]] | Method recordConfigItems. Adds a config item to the list of config items. | About the FIXME: may be we have to add a check for `java.util.Map` type. |
@@ -122,8 +122,6 @@ build.flags = {
watch.description = 'Watches for changes in files, re-builds when detected';
watch.flags = {
- with_inabox: ' Also watch and build the amp-inabox.js binary.',
- with_shadow: ' Also watch and build the amp-shadow.js binary.',
with_video_iframe_integration:
' Also watc... | [No CFG could be retrieved] | Creates a module with the given flags. | Why not delete `with_video_iframe_integration` as well? I'm sure it was a copy-paste from long ago, and is no longer necessary. |
@@ -477,7 +477,7 @@ func (a awsStorageClient) getDynamoDBChunks(ctx context.Context, chunks []Chunk)
result := []Chunk{}
unprocessed := dynamoDBReadRequest{}
backoff, numRetries := minBackoff, 0
- for outstanding.Len()+unprocessed.Len() > 0 {
+ for outstanding.Len()+unprocessed.Len() > 0 && numRetries < maxRetrie... | [NextPage->[NextPage],PutChunks->[BatchWrite],getDynamoDBChunks->[Send,Data,Retryable],HasNextPage->[HasNextPage],TakeReqs->[Len],Send->[Send],RegisterFlags->[RegisterFlags],Add] | getDynamoDBChunks retrieves the specified chunks from the DynamoDB table. This function takes a list of requests and processes the response. It will retry any unprocessed items. | There's no error thrown if we exceed maxRetries, previously the ingester would try forever, right? |
@@ -105,10 +105,18 @@ export class AmpAdXOriginIframeHandler {
this.iframe, 'send-embed-state', true,
() => this.sendEmbedInfo_(this.baseInstance_.isInViewport()));
+ // To provide position to inabox.
+ this.inaboxPositionApi_ = new SubscriptionApi(
+ this.iframe, MessageType.SEND_POS... | [No CFG could be retrieved] | Initializes the object with all necessary components. Triggered by the external object. | we might consider re-organize the code here (can be a separate PR later). the method is too long |
@@ -1337,6 +1337,10 @@ need_flush(struct agg_merge_window *mw)
if (mw->mw_lgc_cnt != mw->mw_phy_cnt)
return true;
+ /* Need to cleanup remaining removal records */
+ if (last && mw->mw_rmv_cnt != 0)
+ return true;
+
clear_merge_window(mw);
D_DEBUG(DB_EPC, "Skip window flush "DF_EXT"\n", DP_EXT(&mw->mw_ext))... | [No CFG could be retrieved] | finds the last physical entry in the merge window and flushes it if necessary. region SegmentManager API. | I think current window needs be processed if any 'deleted' entry is overlapping with current window, right? |
@@ -7,9 +7,10 @@ from pants.option.custom_types import file_option, shell_str
class Isort(PythonToolBase):
options_scope = 'isort'
- default_version = 'isort==4.3.20'
+ default_version = 'isort>=4.3.21,<4.4'
default_extra_requirements = ['setuptools']
default_entry_point = 'isort.main'
+ default_interpre... | [Isort->[register_options->[register,super]]] | Register options for isort. | Technically, this is a lie. isort currently works when run with Python 2.7. But, it doesn't matter what Python version you run isort with, unlike `flake8` and `bandit`. We can be confident that the user has Python 3.6+ on their machine because that's how they're running Pants. So, we can safely set the constraints to P... |
@@ -2,5 +2,5 @@ class StepAsset < ActiveRecord::Base
validates :step, :asset, presence: true
belongs_to :step, inverse_of: :step_assets
- belongs_to :asset, inverse_of: :step_asset
+ belongs_to :asset, inverse_of: :step_asset, :dependent => :destroy
end
| [StepAsset->[belongs_to,validates]] | Initializes a new instance of the Rule class. | Use the new Ruby 1.9 hash syntax. |
@@ -47,7 +47,7 @@
<h2 title="Get the most out of Jetpack with these features"><?php _e( 'Get the most out of Jetpack with...', 'jetpack' ); ?></h2>
<div class="modules"></div>
<?php if ( current_user_can( 'jetpack_manage_modules' ) ) : ?>
- <a href="<?php echo admin_url( 'admin.php?page=jetpack_module... | [build_connect_url,load_view] | Displays a list of all modules that have the most out of Jetpack. Show Jetpack network. | No. Revert this line so we're not breaking translation strings. |
@@ -332,7 +332,7 @@ export class AmpA4A extends AMP.BaseElement {
*/
this.fromResumeCallback = false;
- /** @protected {string} */
+ /** @type {string} */
this.safeframeVersion = DEFAULT_SAFEFRAME_VERSION;
/**
| [AmpA4A->[extractSize->[user,get,Number],tryExecuteRealTimeConfig_->[user,maybeExecuteRealTimeConfig],constructor->[AmpAdUIHandler,AmpAdXOriginIframeHandler,dev,generateSentinel,getBinaryTypeNumericalCode,getBinaryType,protectFunctionWrapper,now],tearDownSlot->[dev],renderViaNameAttrOfXOriginIframe_->[NAMEFRAME,utf8Dec... | Private methods for the keyset. Private methods for handling missing flags. The base configuration for the missing element. | Why change the visibility on this? |
@@ -815,7 +815,11 @@ def test_matrix_invitee_receives_invite_on_restart(matrix_transports):
@pytest.mark.parametrize("matrix_server_count", [3])
@pytest.mark.parametrize("number_of_transports", [3])
-def test_matrix_user_roaming(matrix_transports):
+@pytest.mark.parametrize(
+ "roaming_peer",
+ [pytest.param(... | [test_matrix_invitee_receives_invite_on_restart->[is_reachable,wait_for_peer_reachable,wait_for_peer_unreachable],wait_for_peer_reachable->[_wait_for_peer_reachability],test_matrix_invite_retry_with_offline_invitee->[is_reachable,wait_for_peer_unreachable],test_matrix_message_sync->[MessageHandler,wait_for_peer_unreach... | Test that matrix_transports are reachable and have no message received. | How does this make sure they're ordered? |
@@ -0,0 +1,6 @@
+import contracts from '../../contracts'
+
+export default async (_, { address, message }) => {
+ //TODO: get this right
+ return await contracts.web3.eth.sign(message, address)
+}
| [No CFG could be retrieved] | No Summary Found. | is there an issue with this? |
@@ -36,7 +36,8 @@ static int test_is_fips_enabled(void)
if (!TEST_ptr(sha256))
return 0;
if (is_fips
- && !TEST_str_eq(OSSL_PROVIDER_name(EVP_MD_provider(sha256)), "fips")) {
+ && !TEST_str_eq(OSSL_PROVIDER_name(EVP_MD_get0_provider(sha256)),
+ ... | [int->[TEST_int_eq,OSSL_PROVIDER_name,EVP_MD_fetch,TEST_str_eq,EVP_default_properties_is_fips_enabled,EVP_MD_free,EVP_MD_provider,OSSL_PROVIDER_available,TEST_ptr],setup_tests->[TEST_error,ADD_TEST,test_skip_common_options,test_get_argument,strcmp,test_get_argument_count]] | test_is_fips_enabled - Test if FIPS mode is enabled. | Should this be OSSL_PROVIDER_get_name or OSSL_PROVIDER_get0_name? |
@@ -1198,7 +1198,7 @@ define([
//>>includeStart('debug', pragmas.debug);
throw new DeveloperError('Operator "-" requires a vector or number argument. Argument is ' + left + '.');
//>>includeEnd('debug');
- return -left; // jshint ignore:line
+ return -left; // eslint-disable-lin... | [No CFG could be retrieved] | Evaluates the binary operator and returns the result. Construct a < - node from the given arguments. | @lilleyse Shouldn't these be `RuntimeError` or has style validation already happened at this point? Assuming we change them to runtime errors, that would get rid of the elint error as well because the below returns would never happen. Even if they are runtime errors, this code makes no sense, we know left is not a numb... |
@@ -322,7 +322,7 @@ public abstract class HiveRegister implements Closeable {
}
}
- protected boolean needToUpdateTable(HiveTable existingTable, HiveTable newTable) {
+ public boolean needToUpdateTable(HiveTable existingTable, HiveTable newTable) {
return getTableComparator(existingTable, newTable).com... | [HiveRegister->[createOrAlterTable->[alterTable,createTableIfNotExists],get->[get],addOrAlterPartition->[alterPartition,addPartitionIfNotExists]]] | Gets the table comparator. | this seems not necessary if you move `HiveMetadataWriter.java` into the same package. I believe putting `HiveMetadataWriter.java` under iceberg package isn't you wanted ? |
@@ -387,13 +387,10 @@ public final class SourceBuilder {
* </pre>
*/
private static String changelogTopic(
- final KsqlQueryBuilder queryBuilder,
+ final RuntimeBuildContext queryBuilder,
final String stateStoreName
) {
- return ReservedInternalTopics.KSQL_INTERNAL_TOPIC_PREFIX
- ... | [SourceBuilder->[buildSourceConsumed->[timestampExtractor],getAutoOffsetReset->[get]]] | Returns the changelog topic for the given reserved internal node. | to make sure that I understand, this line is the "meat" of the PR, right? |
@@ -154,11 +154,6 @@ public class Checksum {
public ChecksumData computeChecksum(ChunkBuffer data)
throws OzoneChecksumException {
- if (checksumType == ChecksumType.NONE) {
- // Since type is set to NONE, we do not need to compute the checksums
- return new ChecksumData(checksumType, bytesPerC... | [Checksum->[newChecksumByteBufferFunction->[int2ByteString],verifyChecksum->[verifyChecksum,computeChecksum,Checksum],computeChecksum->[newChecksumFunction,computeChecksum],valueOf->[valueOf],newChecksumByteBufferFunction,newMessageDigestFunction]] | Computes checksum for the given data. | On a second thought, we should not remove this if-statement since some other code paths depend on it. Let's revert the commit. |
@@ -76,6 +76,12 @@ Alaveteli::Application.routes.draw do
resources :info_request_batch, :only => :show
+ #### OutgoingMessage controller
+ resources :outgoing_messages, :only => [] do
+ resources :mail_server_logs, :only => [:index]
+ end
+ ####
+
#### User controller
# Use /profile for things to do... | [draw,resources,scope,resource,get,post,filter,join,each,match,load] | This is a route that matches all of the routes in the application. It is a route Returns a view to view the user. | Trailing whitespace detected. |
@@ -57,13 +57,13 @@ public class SettingsAction implements NavigationWsAction {
@Override
public void handle(Request request, Response response) throws Exception {
- boolean isRoot = userSession.isRoot();
+ boolean isSysAdmin = userSession.isSystemAdministrator();
JsonWriter json = response.newJson... | [SettingsAction->[define->[setSince],handle->[isRoot,close,endObject,getBoolean,endArray,getGlobalPages,prop,beginArray,beginObject]]] | This method is called when the user has not requested a critical page. | a UT should be added, right? now System admin of default org can see when organizations are disabled |
@@ -53,13 +53,16 @@ function getAmpCacheHref() {
/**
* Determine if <link rel="amphtml" href="..."> exists in the page and
- * return the href's value if it does. Otherwise returns empty string.
+ * return the href's value iff it starts with http:// or https://.
+ * Otherwise returns empty string.
*
* @return ... | [No CFG could be retrieved] | Determines if an AMP page link exists in the page and returns the href s value if Determines if the page is from an AMP cache. | The `GetAttribute` method needs to be lower-cased. See #31893. |
@@ -49,6 +49,5 @@ public class AWSSQSBatchMessagesCustomizer implements ComponentProxyCustomizer {
}
}
in.setBody(messageList);
- in.setHeader(SqsConstants.SQS_OPERATION, SqsOperations.sendBatchMessage);
}
}
| [AWSSQSBatchMessagesCustomizer->[customize->[setBeforeProducer],beforeProducer->[hasNext,getIn,getMessage,setHeader,setBody,getBody,iterator,isEmpty,add,next]]] | This method is called before the producer is called. | Had a live conversation already about this, it seems it may be needed. |
@@ -58,4 +58,11 @@ public class XmlLibrariesVerificationTestCase extends AbstractMuleTestCase
TransformerFactory factory = TransformerFactory.newInstance();
assertThat(factory, instanceOf(org.apache.xalan.processor.TransformerFactoryImpl.class));
}
+
+ @Test
+ public void schema()
+ {
+ ... | [XmlLibrariesVerificationTestCase->[saxParser->[instanceOf,assertThat,newInstance],transformer->[instanceOf,assertThat,newInstance],documentBuilder->[instanceOf,assertThat,newInstance],xmlInput->[instanceOf,assertThat,newInstance]]] | Checks if a transformer is missing. | can you confirm the Validator implementation won't change based on how the classpath is fromed? |
@@ -144,7 +144,7 @@ def test_read_write_epochs():
raw, events, picks = _get_data()
tempdir = _TempDir()
epochs = Epochs(raw, events, event_id, tmin, tmax, picks=picks,
- baseline=(None, 0))
+ baseline=(None, 0), preload=True)
evoked = epochs.average()
data ... | [test_epochs_bad_baseline->[_get_data],test_drop_channels_mixin->[_get_data],test_event_ordering->[_get_data],test_resample->[_get_data],test_detrend->[_get_data],test_illegal_event_id->[_get_data],test_epochs_proj->[_get_data],test_drop_epochs_mult->[_get_data],test_epoch_eq->[_get_data],test_epoch_combine_ids->[_get_... | Test read and write epochs with a specific filter. read - epochs Tests that there are no bad events in the file. | why these changes? |
@@ -48,8 +48,10 @@ class GrammarBasedText2SqlDatasetReader(DatasetReader):
"""
def __init__(self,
schema_path: str,
+ database_file: str,
use_all_sql: bool = False,
remove_unneeded_aliases: bool = True,
+ use_prelinked_entit... | [GrammarBasedText2SqlDatasetReader->[text_to_instance->[split,Token,get_action_sequence_and_all_actions,append,startswith,ProductionRuleField,IndexField,join,enumerate,ListField,Instance,TextField,is_global_rule],__init__->[Text2SqlTableContext,Text2SqlWorld,SingleIdTokenIndexer,str,super],_read->[text_to_instance,base... | Initialize a new object with the given configuration. | I think most of the literature refers to this as "entity anonymization" so we might also want to name it that or "variable anonymization" or something like that for consistency. |
@@ -31,7 +31,7 @@ def get_powertrain_can_parser(CP, canbus):
("LKATorqueDeliveredStatus", "PSCMStatus", 0),
]
- if CP.carFingerprint in (CAR.VOLT, CAR.MALIBU):
+ if CP.carFingerprint == CAR.VOLT:
signals += [
("RegenPaddle", "EBCMRegenPaddle", 0),
]
| [get_powertrain_can_parser->[CANParser],CarState->[__init__->[KF1D,matrix],update->[bool,int,mean,parse_gear_shifter,update,is_eps_status_ok,float,abs]]] | Returns a list of all possible signals for a powertrain can parser. canparse. canparse. canparse. canparse. canparse. canparse. | Missing ATS in the` if` below |
@@ -146,7 +146,7 @@ defineSuite([
expect(provider.maximumLevel).toBeUndefined();
expect(provider.minimumLevel).toBe(0);
expect(provider.tilingScheme).toBeInstanceOf(WebMercatorTilingScheme);
- expect(provider.rectangle).toEqual(rectangle);
+ expect(provider.r... | [No CFG could be retrieved] | This method is called when the server is ready to use. Checks that the image is loaded and has the required minimum and maximum levels. | Before someone asks, this change was necessary because the `UrlTemplateImageryProvider` now intersects the input rectangle with the tiling scheme's rectangle, and `Rectangle.intersect` does a bunch of things that together can introduce very tiny rounding errors. |
@@ -511,5 +511,5 @@ class TorchRankerAgent(TorchAgent):
A child class may choose to overwrite this method to perform vectorization as
well as encoding if so desired.
"""
- return [self._vectorize_text(cand, truncate=self.truncate, truncate_left=False)
- for cand in cands... | [TorchRankerAgent->[eval_step->[score_candidates],train_step->[score_candidates,get_train_preds,get_batch_train_metrics]]] | Convert a batch of text to vectors . | :-O it was more readable before |
@@ -0,0 +1,14 @@
+from django.db import models
+
+from ..account.models import User
+from . import JobStatus
+
+
+class Job(models.Model):
+ status = models.CharField(
+ max_length=50, choices=JobStatus.CHOICES, default=JobStatus.PENDING
+ )
+ user = models.ForeignKey(User, related_name="jobs", on_delet... | [No CFG could be retrieved] | No Summary Found. | `user` is not descriptive about what it is. `created_by` instead (I assume)? |
@@ -90,6 +90,9 @@ class IssueHandler extends Handler {
$this->_setupIssueTemplate($request, $issue, ($showToc == 'showToc') ? true : false);
$templateMgr->assign('issueId', $issue->getBestIssueId());
+ $ArticleCommentDAO =& DAORegistry::getDAO('ArticleCommentDAO');
+ $templateMgr->assign('ArticleCommentDAO', ... | [IssueHandler->[_showIssueGalley->[getGalley,getIssue],validate->[setGalley,getGalley,setIssue]]] | Displays a page of an issue. | As above, $lowerCamelCase and assigning DAOs to templates. |
@@ -394,3 +394,15 @@ func (r *Runtime) Info() ([]InfoData, error) {
return info, nil
}
+
+// SaveDefaultConfig saves a copy of the default config at the given path
+func SaveDefaultConfig(path string) error {
+ var w bytes.Buffer
+ e := toml.NewEncoder(&w)
+
+ if err := e.Encode(&defaultRuntimeConfig); err != nil ... | [Shutdown->[ID,Wrapf,Unlock,AllContainers,Shutdown,Close,Lock,StopWithTimeout,Errorf],refresh->[Wrapf,AllContainers,Close,OpenFile,refresh,Refresh],Info->[storeInfo,Wrapf,hostInfo],GetConfig->[Copy,RUnlock,To,RLock],Copy,IsNotExist,Wrapf,Join,Unlock,Stat,GetStore,SetStore,GetLockfile,Shutdown,InitCNI,To,Lock,Errorf,ref... | Info returns the host and store information. | What do you plan to do with this? |
@@ -58,6 +58,18 @@ class CasualtyOrderOfLosses {
* provided. (Veqryn)
*/
List<Unit> sortUnitsForCasualtiesWithSupport(final Parameters parameters) {
+ PerfTimer.time("OLD", () -> oldsortUnitsForCasualtiesWithSupport(parameters));
+
+ return PerfTimer.time(
+ "NEW",
+ () ->
+ Or... | [CasualtyOrderOfLosses->[sortUnitsForCasualtiesWithSupport->[size,equals,getType,getInt,reversed,addAll,remove,put,of,isAmphibious,getTotalPower,getUnitPowerAndRollsForNormalBattles,hasNext,isDefending,sort,subtractPower,iterator,subtractRolls,next,UnitBattleComparator,getName,compare,frequency,get,getTotalRolls,getTer... | Sort units for casualties with support. This method is called to find the best unit to take as casualty. Add any power from support rolls that it provides to other units. Check if the unit has the highest power and if so add it to the list. | Method `oldsortUnitsForCasualtiesWithSupport` has 221 lines of code (exceeds 30 allowed). Consider refactoring. |
@@ -38,6 +38,10 @@ class NativeDemo:
def fixed_args(self, source_dir, build_dir):
return [str(build_dir / self._name)]
+class MultichannelNativeDemo(NativeDemo):
+ def models_lst_path(self, source_dir):
+ return source_dir / 'multichannel_demo' / 'models.lst'
+
class PythonDemo:
def __in... | [combine_cases->[join_cases],NativeDemo,device_cases,single_option_cases,combine_cases,PythonDemo] | Return a list of fixed arguments for . | I don't think it makes sense for these demos to share one `models.lst` file. I don't think they even have any models in common. I think you should split it into per-demo ones. |
@@ -3,13 +3,13 @@
import collections
import logging
-from typing import List, Dict, Optional, OrderedDict, Tuple, Any
+from typing import List, Dict, Optional, Tuple, Any
import torch
from torch.nn import Module
from nni.common.graph_utils import TorchModuleGraph
-from nni.compression.pytorch.utils import ge... | [Compressor->[generate_graph->[_wrap_model,_unwrap_model],_unwrap_model->[_setattr,get_modules_wrapper],generate_module_groups->[_wrap_model,_unwrap_model,LayerInfo],_wrap_model->[_setattr,get_modules_wrapper],set_wrappers_attribute->[get_modules_wrapper],_detect_modules_to_compress->[LayerInfo]]] | Creates a base class for a single node of a network. This function is called by the compresser when a module is compressed. | Import path is too long~ Please remove `pruning` |
@@ -268,13 +268,16 @@ class JobStatusResult(object): # pylint: disable=useless-object-inheritance, to
documents_in_progress_count=batch_status_details.summary.in_progress,
documents_not_yet_started_count=batch_status_details.summary.not_yet_started,
documents_cancelled_count=batc... | [DocumentStatusResult->[_from_generated->[_from_generated]],TranslationGlossary->[_to_generated_list->[_to_generated]],DocumentTranslationInput->[_to_generated->[_to_generated_list],_to_generated_list->[_to_generated]],JobStatusResult->[_from_generated->[_from_generated]],FileFormat->[_from_generated_list->[_from_gener... | Create a new batch status object from a generated batch status object. | I think "Cancelling" should also be in this list. edit: same for below |
@@ -91,11 +91,6 @@ public class PythonProcess {
String line = null;
while (!(line = reader.readLine()).contains(STATEMENT_END)) {
logger.debug("Read line from python shell : " + line);
- if (line.equals("...")) {
- logger.warn("Syntax error ! ");
- output.append("Syntax error ! ");
-... | [PythonProcess->[close->[close],interrupt->[close]]] | Send a command to the python shell and get the result. | break here could cause chaos afterwards. |
@@ -39,3 +39,4 @@ class RRhtslib(RPackage):
depends_on('r@3.4.0:3.4.9', when='@1.8.0')
depends_on('r-zlibbioc', type=('build', 'run'))
+ depends_on('autoconf@2.69', type='build')
| [RRhtslib->[depends_on,version]] | Requires r - zlibbioc and r - build. | > version 2.67 or higher so it should be `depends_on('autoconf@2.67:', type='build')` ? |
@@ -614,13 +614,6 @@ MSG_PROCESS_RETURN tls_process_key_update(SSL *s, PACKET *pkt)
{
unsigned int updatetype;
- s->key_update_count++;
- if (s->key_update_count > MAX_KEY_UPDATE_MESSAGES) {
- SSLfatal(s, SSL_AD_ILLEGAL_PARAMETER, SSL_F_TLS_PROCESS_KEY_UPDATE,
- SSL_R_TOO_MANY_KEY_U... | [No CFG could be retrieved] | Internal function to construct and process a key update message. END of function keyupdate. | The MAX_KEY_UPDATE_MESSAGES define probably still exists |
@@ -34,6 +34,9 @@ from .utils import (check_fname, logger, verbose, estimate_rank,
from .externals.six.moves import zip
+DEFAULTS = dict(scalings=dict(eeg=1e6, grad=1e13, mag=1e15))
+
+
def _check_covs_algebra(cov1, cov2):
if cov1.ch_names != cov2.ch_names:
raise ValueError('Both Covariance do not h... | [make_ad_hoc_cov->[Covariance],_get_covariance_classes->[_ShrunkCovariance->[fit->[fit]],_RegCovariance->[fit->[fit,Covariance]]],_undo_scaling_array->[_apply_scaling_array],write_cov->[save],Covariance->[__iadd__->[_check_covs_algebra],__add__->[_check_covs_algebra]],_estimate_rank_meeg_signals->[_apply_scaling_array,... | Check that both Covariance objects have the same number of channels and projections. | these values are not always the best. For whitening the valus that you removed were better. |
@@ -37,8 +37,8 @@ describes.realWin('iframe-messaging-client', {}, env => {
it('should send the request via postMessage', () => {
const callbackSpy = sandbox.spy();
client.makeRequest('request-type', 'response-type', callbackSpy);
- expect(postMessageStub).to.be.calledWith(
- serializeM... | [No CFG could be retrieved] | JS - Functions - Definitions - Definitions - Definitions - Definitions - Definitions This is a test method that should not invoke callback on receiving a message of irrelevant response. | Are the changes in this file related to the PR? |
@@ -0,0 +1,13 @@
+module DataUpdateScripts
+ class TouchArticlesWithCapitalizedPaths
+ def run
+ offending_articles = Article.where("path != lower(path)")
+
+ # Some log visibility for troubleshooting/monitoring
+ Rails.logger.info("Updating #{offending_articles.count} articles...")
+
+ # touch ... | [No CFG could be retrieved] | No Summary Found. | Turns out `touch_all` doesn't run the `before_save` callbacks (only `before_touch` and others), which is how we're intending to fix the problem. The idea is that if the logic is correct (fix introduced to `app/models/article.rb`) then this update and all subsequent (user triggered) will continue to work as expected. |
@@ -394,8 +394,7 @@ void WbDragRotateAroundAxisEvent::apply(const QPoint ¤tMousePosition) {
mManipulator->showRotationLine(true);
mManipulator->updateRotationLine(mViewpoint->pick(mObjectScreenPosition.x(), mObjectScreenPosition.y(), mZEye),
mViewpoint->pick(currentMouseP... | [WbDragTransformEvent->[instance,setActive],setActive->[instance,setActive,unlock],unlock->[unlock],instance->[instance,unlock],apply->[]] | Drag rotate around axis event. if we have a negative value we can rotate the label. | This doesn't seem related with this PR. |
@@ -131,9 +131,7 @@ func (h *Harvester) Run() error {
"redis": common.MapStr{
"slowlog": subEvent,
},
- "beat": common.MapStr{
- "read_timestamp": common.Time(time.Now()),
- },
+ "read_timestamp": common.Time(time.Now()),
"prospector": common.MapStr{
"type": "redis",
},
| [Run->[Time,Flush,Unix,Join,Values,Now,UTC,Close,Send,Errorf,NewData,Scan,Receive,Err],NewV4] | Run executes all the commands in the slowlog This function creates a new event in the log and sends it to the forwarder. | That means `read_timestamp` is now a "common" global field in filebeat? |
@@ -14,6 +14,12 @@ class RepositoryCell < ApplicationRecord
.where(repository_cells: { value_type: 'RepositoryTextValue' })
end),
optional: true, foreign_key: :value_id
+ belongs_to :repository_number_value,
+ (lambda do
+ includes(:repository_cell)... | [RepositoryCell->[repository_column_data_type->[add,name,data_type],create_with_value!->[new,value,transaction,save!,new_with_payload,constantize],repository_columns,belongs_to,validate,validates,where,attr_accessor,lambda]] | A model that can be used to create a model instance from a list of components. relations between time_value and date_time_range_value. | Rails/InverseOf: Specify an :inverse_of option. |
@@ -830,6 +830,9 @@ function createBaseCustomElementClass(win) {
// Resources can now be initialized since the ampdoc is now available.
this.resources_ = Services.resourcesForDoc(this.ampdoc_);
}
+ if (!this.owners_) {
+ this.owners_ = Services.ownersForDoc(this.ampdoc_);
+ }
... | [No CFG could be retrieved] | Method to initialize a node in the AMPDocument. This method is called from the AMP package. It is called from the AMP package. | i'd not have it as a member field. i hope we can remove its only usage in L1632, but fine for now. |
@@ -258,6 +258,7 @@ class HyperoptTuner(Tuner):
trial['state'] = hp.JOB_STATE_DONE
trials.insert_trial_docs([trial])
trials.refresh()
+ self.update_parameters_queue()
def miscs_update_idxs_vals(self, miscs, idxs, vals,
assert_all_vals_used=True,
| [json2vals->[json2vals],HyperoptTuner->[receive_trial_result->[json2vals],update_search_space->[_choose_tuner,json2space],generate_parameters->[_split_index,json2parameter],__init__->[OptimizeMode]],json2parameter->[json2parameter],json2space->[json2space]] | Receives a result of a . Unpack idxs - vals format into a list of dictionaries that can be used by miscs. | release memory of queue? |
@@ -141,6 +141,16 @@ class SimpleTagger(Model):
predictions = output_dict["class_probabilities"].data.squeeze(0)
_, argmax = predictions.max(-1)
indices = argmax.squeeze(1).numpy()
- tags = [self.vocabulary.get_token_from_index(x, namespace="tags") for x in indices]
+ tags = [se... | [SimpleTagger->[forward->[softmax,size,tag_projection_layer,max,dim,sequence_loss,embedding,stacked_encoders,view],__init__->[TimeDistributed,get_vocab_size,LSTM,super,Linear,Embedding,CrossEntropyLoss],tag->[forward,output_dict,get_padding_lengths,max,squeeze,get_token_from_index,as_array,numpy,Variable,index]]] | Perform inference on a TextField to produce predicted tags and class probabilities over the possible tags. | Is there a benefit to using `cls()` over `SimpleTagger` (more wondering than anything else, I think it's marginally clearer.)? |
@@ -81,12 +81,6 @@ public class JdbcBinaryCacheStoreTest extends BaseCacheStoreTest {
jdbcBucketCacheStore.stop();
}
- @Test(enabled = false, description = "See ISPN-2102")
- @Override
- public void testPurgeExpired() throws Exception {
- super.testPurgeExpired();
- }
-
public void testPur... | [JdbcBinaryCacheStoreTest->[testPurgeExpired->[testPurgeExpired],FixedHashKey->[equals->[equals]]]] | This test is not used in tests. Returns a new instance of the class that will be used to create the class. | this to enable it? |
@@ -197,8 +197,10 @@ class DLSDKLauncher(Launcher):
optional=True, is_directory=True, description="TF Object Detection API Config."
),
'_tf_custom_op_config_dir': PathField(
- optional=True, is_directory=True, description="TF Custom Operation Config."
+ ... | [DLSDKLauncher->[parameters->[CPUExtensionPathField],_prepare_bitstream_firmware->[_is_fpga],_set_affinity->[_devices_list],get_cpu_extension->[get_cpu_extensions_list],create_ie_plugin->[get_cpu_extension,_is_vpu,set_nireq,_is_multi,_devices_list],_create_network->[output_preprocessing,_set_batch_size,_is_hetero,_set_... | Returns a dict of all the parameters of the Kaldi model. Parameters for a single - device mode. | The `_dir` suffix here seems to be in conflict with `is_directory=False`. |
@@ -277,6 +277,7 @@ class CertificateOutputSchema(LemurOutputSchema):
serial = fields.String()
serial_hex = Hex(attribute="serial")
signing_algorithm = fields.String()
+ key_type = fields.String(allow_none=True)
status = fields.String()
user = fields.Nested(UserNestedOutputSchema)
| [CertificateInputSchema,CertificateOutputSchema,CertificateExportInputSchema,CertificateEditInputSchema,CertificateRevokeSchema,CertificateShortOutputSchema,CertificateNotificationOutputSchema,CertificateUploadInputSchema] | description = A description of the individual MAC related objects. Returns a LemurOutputSchema object with all required fields populated. | Adding key_type to output schema so that is available for use when needed |
@@ -567,6 +567,11 @@ namespace System.Net.Sockets
}
else
{
+ if (SocketsTelemetry.IsEnabled(EventLevel.Warning))
+ {
+ SocketsTelemetry.Log.ConnectCanceled();
+ }
+
// ... | [SocketAsyncEventArgs->[FinishOperationAsyncFailure->[OnCompleted,FinishOperationSyncFailure],ExecutionCallback->[OnCompleted],FinishWrapperConnectSuccess->[SetResults,OnCompleted,Complete],FinishOperationAsyncSuccess->[FinishOperationSyncSuccess,OnCompleted],CancelConnectAsync->[Dispose],FinishOperationSyncSuccess->[S... | CancelConnectAsync - cancels the ConnectAsync if the current operation is in progress and the. | For events that don't do anything expensive with arguments you don't save much time by doing a level-check first, likely just a few ns. I'd suggest skipping it to keep the code smaller unless you are operating with very tight perf goals. |
@@ -678,7 +678,7 @@ class DistributeTranspiler:
return prefetch_block
def _create_table_optimize_block(self, pserver_index, pserver_program,
- pre_block_idx):
+ pre_block_idx, grad_to_block_id):
def _clone_var(block, var, p... | [DistributeTranspiler->[_create_table_optimize_block->[_clone_var],_is_op_connected->[_append_inname_remove_beta],_append_pserver_ops->[_get_optimizer_input_shape,same_or_split_var,_orig_varname],get_startup_program->[_get_splited_name_and_shape->[same_or_split_var],_get_splited_name_and_shape],_create_ufind->[_is_op_c... | Create table optimize block. table_opt_block. append_op creates the necessary op for adding the necessary gradients. | Can use block.clone_variable instead? |
@@ -195,8 +195,10 @@ def install(opts):
os.system('chmod 3775 /var/log/pulp')
os.system('chmod 3775 /var/lib/pulp')
- # Update for certs
- os.system('chown -R apache:apache /etc/pki/pulp')
+ # Generate certificates
+ print 'generating certificates'
+ os.system('server/bin/pulp-gen-ca-certific... | [create_dirs->[debug],install->[create_dirs,warning,getlinks],uninstall->[getlinks,debug],_create_link->[debug],create_link->[warning,debug],install,parse_cmdline,uninstall] | Installs a pulp - specific package. | both of these paths should be joined with the `currdir` value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.