patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -0,0 +1,11 @@
+// @flow
+// export {default as StatefulTextarea} from './stateful-textarea';
+// export {default as StatefulContainer} from './stateful-container';
+export {default as Textarea} from './textarea';
+export {default as StatefulTextarea} from './stateful-textarea';
+// Styled elements
+export {
+ Texta... | [No CFG could be retrieved] | No Summary Found. | Will we ultimately export a container? |
@@ -3803,12 +3803,14 @@ namespace Js
case AsmJsRetType::Uint32x4:
case AsmJsRetType::Uint16x8:
case AsmJsRetType::Uint8x16:
+#if _WIN32 || _WIN64 //WASM.SIMD ToDo: Enable thunk for Xplat
#if _M_X64
X86SIMDValue simdVal;
simdVal.m128_value = JavascriptFunction::CallA... | [No CFG could be retrieved] | Calls a function in the given register. - - - - - - - - - - - - - - - - - -. | Not sure if PAL was defining `_WIN64`.. If all we want is to rule `xplat` out, can we use `#ifdef _WIN32` instead? |
@@ -147,7 +147,6 @@ export default [
'stereo',
'subject',
'testing',
- 'useIPv6',
'useNicks',
'useStunTurn',
'useTurnUdp',
| [No CFG could be retrieved] | Add any extra config whitelist that should be used for the daemon. | Maybe you want to remove this one too? |
@@ -135,6 +135,10 @@ class PagesSitemapProvider extends AbstractSitemapProvider
);
foreach ($contentPage->getUrls() as $urlLocale => $href) {
+ if (null === $href) {
+ continue;
+ }
+
$url = $this->webspaceManager->findUrlByResourceLocator(
... | [PagesSitemapProvider->[build->[getNodeType,getLocalization,getPortalKey,getMapping,getLocale,findPortalInformationsByHostIncludingSubdomains,generateSitemapUrl,getUrl,findAllByPortal],generateSitemapUrl->[getUrls,getWebspaceKey,findUrlByResourceLocator,getLocale,getUrl,addAlternateLink]]] | Generate a SitemapUrl object given a ContentPage PortalInformation and a sequence of parameters. | This is the required change. The rest is more typo and for better debugging. |
@@ -126,6 +126,17 @@ public interface FlinkPipelineOptions
void setFailOnCheckpointingErrors(Boolean failOnCheckpointingErrors);
+ @Description(
+ "Shuts down sources which have been idle for the configured time of milliseconds. Once a source has been "
+ + "shut down, checkpointing is not possibl... | [No CFG could be retrieved] | Sets the number of times the failed tasks are re - executed. A value of zero effectively. | Add link to the Flink checkpointing issue here? |
@@ -714,6 +714,12 @@ export class AmpStoryPage extends AMP.BaseElement {
return new Promise((resolve) => {
switch (mediaEl.tagName.toLowerCase()) {
case 'amp-audio':
+ if (mediaEl.getAttribute('layout') === Layout.NODISPLAY) {
+ whenUpgradedToCustomElement(mediaEl)
+ ... | [AmpStoryPage->[setState->[NOT_ACTIVE,BOOKEND_STATE,dev,PAUSED,PLAYING],isAutoplaySupported_->[resetIsAutoplaySupported,getMode,isAutoplaySupported],constructor->[resolve,timerFor,getAmpdoc,NOT_ACTIVE,getStoreService,mutatorForDoc,platformFor,promise,getMediaPerformanceMetricsService,debounce,reject],emitProgress_->[di... | Waits for playback media layout to be ready. | It looks like amp-video supports `NODISPLAY` too... Could you move this block so we support both audio and video? |
@@ -36,11 +36,14 @@ func newStackLsCmd() *cobra.Command {
}
// Get a list of all known backends, as we will query them all.
- bes, hasClouds := allBackends()
+ b, err := currentBackend()
+ if err != nil {
+ return err
+ }
// Get the current stack so we can print a '*' next to it.
var curr... | [CloudURL,CloudName,IsZero,Strings,Itoa,Append,New,RunFunc,Time,CurrentStack,Wrapf,Name,DetectProjectPath,ListStacks,Printf,Fprintf,Sprintf,OrgName,Snapshot] | newStackLsCmd returns a command that lists all known stacks and prints a list of Print all the cloud - related information. | Totally not directly related to your changes, however, instead of `CLOUD`, I wonder if we should rename this to `PERMALINK` and include a link to the stack's permanent URL in the service when available. |
@@ -223,10 +223,10 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success_OnOptimism(t *testing.T)
defer cleanup()
key, fromAddress := cltest.MustAddRandomKeyToKeystore(t, store, 0)
store.KeyStore.Unlock(cltest.Password)
+ store.Config.Set("OPTIMISM_GAS_FEES", "true")
config, cleanup := cltest.NewConfig(t)... | [Exec,MustAddRandomKeyToKeystore,BootstrapThrowawayORM,NewStore,Events,Stop,Should,New,NotNil,GetSignedTx,Len,Receive,MustInsertRandomKey,NewEthValue,Parallel,NoError,Subscribe,Raw,NewStoreWithConfig,NewEthBroadcaster,Trigger,EqualError,Value,MatchedBy,FindEthTxWithAttempts,Now,Close,NewConfig,Eventually,IncrementNextN... | TestEthBroadcaster_ProcessUnstartedEthTxs_Success_OnOptimism Construct a new ethernet key object. | I just realised, I don't think this correctly covers the case. We assume here that the etx got inserted with the correct gas limit, but the gas limit is actually decided at insert time and we don't have logic for that. Check: - orm.IdempotentInsertEthTxTaskRun - core/services/offchainreporting/transmitter.go:39 - core/... |
@@ -431,7 +431,9 @@ class InstallRequirement(object):
# Python2 __file__ should not be unicode
if six.PY2 and isinstance(setup_py, six.text_type):
- setup_py = setup_py.encode(sys.getfilesystemencoding())
+ fs_enc = sys.getfilesystemencoding()
+ if fs_enc is not None... | [parse_editable->[_strip_postfix,_strip_extras],InstallRequirement->[from_path->[from_path],from_line->[_strip_extras],get_dist->[egg_info_path],install->[prepend_root],_correct_build_location->[build_location],move_wheel_files->[move_wheel_files],run_egg_info->[_correct_build_location],archive->[pkg_info],pkg_info->[e... | Returns a function to setup. py and. toml files for a specific package. | This is wrong - whether `setup_py` is bytes or Unicode depends on whether `fs_enc` is `None`. Even if this doesn't cause tests to fail, it will cause maintenance issues in the long run. |
@@ -118,7 +118,8 @@ func newDriver(env *serviceenv.ServiceEnv, txnEnv *txnenv.TransactionEnv, etcdPr
if err != nil {
return nil, err
}
- chunkStorage := chunk.NewStorage(objClient, chunk.NewPostgresStore(db), tracker, chunkStorageOpts...)
+ memCache := kv.NewMemCache(10)
+ chunkStorage := chunk.NewStorage(objCli... | [subscribeCommit->[inspectCommit],flushCommit->[inspectCommit],clearCommit->[inspectCommit],listBranch->[inspectRepo],inspectCommit->[inspectCommit],listCommit->[inspectCommit,inspectRepo],del->[search],createBranch->[resolveCommit],listRepo->[getAccessLevel],deleteAll->[listRepo,deleteRepo],propagateCommits->[resolveC... | newDriver creates a new driver for the given environment. createRepo creates a new repository in the PFS. | We should probably go ahead and setup the configuration for this. |
@@ -662,6 +662,16 @@ public class PullQueryExecutorMetrics implements Closeable {
private final PullPhysicalPlanType planType;
private final RoutingNodeType routingNodeType;
+ /**
+ * Constructor representing an "unknown key" for situations in which we record metrics for an
+ * API call that didn... | [PullQueryExecutorMetrics->[MetricsKey->[equals->[equals]]]] | Creates a MetricsKey object that can be used to add the metrics to the MetricsGroup. Replies the hash code of this MetricsKey. | Assert non null values for the non error constructor? We don't ever have partial keys, do we? It's either all known or all unknown? |
@@ -122,7 +122,12 @@ func reformatAndRemoveIncorrectTopics(x *xorm.Engine) (err error) {
}
}
+ sess.Init()
+
log.Info("Deleting superfluous topics for repositories (more than 25 topics)...")
+ if err := sess.Begin(); err != nil {
+ return err
+ }
for _, repoTopic := range delRepoTopics {
log.Info("Deleti... | [Commit,Exec,ValidateTopic,Find,Close,Delete,Info,In,Limit,Having,TrimSpace,ID,Asc,Join,ToLower,Where,Cols,NewSession,Update,Begin,GroupBy,Table,Replace] | check if there are any superfluous topics in the repositories and delete them. Update updates repositories topics and topic_name fields. | In this case we execute `len(repoTopic) * 2` queries. I think it's better to delete them at once and update the count of all hereby touched repositories, this would decrease the necessary database calls. |
@@ -426,7 +426,7 @@ async def package_python_dist(
"Creating a raw dump of the generated setup.py and its chroot",
"This exposed an internal implementation detail, and is no longer supported.",
)
- dirname = f"{chroot.setup_kwargs.name}-{chroot.setup_kwargs.version}"
+ d... | [declares_pkg_resources_namespace_package->[is_call_to->[is_name],has_args,is_call_to],get_sources->[SetupPySources],get_owned_dependencies->[OwnedDependency,OwnedDependencies],generate_chroot->[SetupPySourcesRequest,InvalidSetupPyArgs,_format_entry_points,SetupPyChroot,DependencyOwner,FinalizedSetupKwargs],get_require... | Package a built - in Python distribution from a field set. Get a built - package from the chroot digest. | Th `path_safe_spec` is already a `str`. |
@@ -667,6 +667,7 @@ class WPSEO_Admin {
'dismiss_about_url' => $this->get_dismiss_url( 'wpseo-dismiss-about' ),
'dismiss_tagline_url' => $this->get_dismiss_url( 'wpseo-dismiss-tagline-notice' ),
'help_video_iframe_title' => __( 'Yoast SEO video tutorial', 'wordpress-seo' ),
+ 'scrollableTableHin... | [WPSEO_Admin->[enqueue_assets->[enqueue_style],stopwords_check->[stopwords],register_settings_page->[get_manage_options_cap,get_premium_indicator,get_notification_count],add_action_link->[license_is_valid],localize_admin_global_script->[get_dismiss_url],filter_stopwords_from_slug->[remove_in],stopwords->[list_stop_word... | Localize the admin global script. | For the sake of consistency, please use `_` instead of camel case. |
@@ -160,10 +160,15 @@ export default /** @const {!LocalizedStringBundleDef} */ ({
description: 'Button label for the share target that shares a link via ' +
'WhatsApp.',
},
+ [LocalizedStringId.AMP_STORY_TOOLTIP_EXPAND_INSTAGRAM]: {
+ string: 'Expand Post',
+ description: 'Label in the tooltip t... | [No CFG could be retrieved] | A list of all possible share targets. Generalized description of how the window width is to be shown. | Now that we're going to use the internal translation process, we need to keep in mind that people who will translate this string will have zero external context. They might not even know what product it's for, or where it will be displayed. :( Explaining that it's the label of a button that gets visible when X, and tha... |
@@ -53,6 +53,7 @@ class ServiceBusClient(mixins.ServiceBusMixin):
def __init__(self, *, service_namespace=None, host_base=SERVICE_BUS_HOST_BASE,
shared_access_key_name=None, shared_access_key_value=None, loop=None,
+ transport_type=None,
http_request_timeout=DE... | [QueueClient->[_get_entity->[get_queue]],SubscriptionClient->[_get_entity->[get_subscription]],TopicClient->[_get_entity->[get_topic]],ServiceBusClient->[list_topics->[list_topics],list_subscriptions->[list_subscriptions],get_subscription->[get_subscription],get_topic->[get_topic],get_queue->[get_queue],list_queues->[l... | Initialize the object with the given parameters. | Docstrings please :) |
@@ -182,7 +182,8 @@ public final class WebSocketServerBenchmarkPage {
"}" + NEWLINE +
"</script>" + NEWLINE +
"</body>" + NEWLINE +
- "</html>" + NEWLINE, CharsetUtil.US_ASCII);
+ "</html>" + NEWLINE).getBytes(US_ASCII);
+ return al... | [WebSocketServerBenchmarkPage->[getContent->[copiedBuffer]]] | Get the content of a web socket. This function is executed in a loop in order to avoid potential race conditions. This function is called when a client sends a message to the server. It is called when This function is called when a benchmark is running. | nit: Why not directly write via `writeCharSequence` ? This was you will remove one allocation |
@@ -40,6 +40,8 @@ class Jetpack_WPCOM_Block_Editor {
add_filter( 'admin_body_class', array( $this, 'add_iframed_body_class' ) );
}
+ add_filter( 'jetpack_auth_cookie_samesite', array( $this, 'set_samesite_auth_cookie' ) );
+
add_action( 'login_init', array( $this, 'allow_block_editor_login' ), 1 );
add_... | [Jetpack_WPCOM_Block_Editor->[enqueue_block_editor_assets->[is_iframed_block_editor],add_tinymce_plugins->[is_iframed_block_editor]]] | Constructor for the block editor. | I wonder if this could help fixing some of the issues found in p1HpG7-8gO-p2. In that case, we might want to add this to a more generic module rather than to the `wpcom-block-editor` one. |
@@ -32,7 +32,7 @@ public class UdpServerListeningEvent extends IpIntegrationEvent {
private final int port;
- public UdpServerListeningEvent(UnicastReceivingChannelAdapter adapter, int port) {
+ public UdpServerListeningEvent(Object adapter, int port) {
super(adapter);
this.port = port;
}
| [No CFG could be retrieved] | Get the port. | Gary, I don't understand this problem. I don't see how `org.springframework.integration.ip.util` and `org.springframework.integration.ip.udp` packages use each other. Unless you have included to your report `test` directory as well... |
@@ -43,7 +43,7 @@ import cmath
import unittest
-test_disabled = unittest.skipIf(True, 'Test disabled')
+disabled_test = unittest.skipIf(True, 'Test disabled')
x86_only = unittest.skipIf(platform.machine() not in ('i386', 'x86_64'), 'x86 only test')
_GLOBAL_INT_FOR_TESTING1 = 17
| [TestParforsMisc->[test_no_state_change_in_gufunc_lowering_on_error->[BreakParfors->[__init__->[__init__]],foo],test_alias_analysis_for_parfor1->[check],test_init_block_dce->[get_init_block_size],test_issue_5098->[_get_method1->[_foo->[baz]],DummyType,Dummy,test1],check->[compile_all,check_parfors_vs_others],test_state... | Imports a single object from numba. core. Initialize the object with the default flags. | Should this just go in `numba.tests.support` and be imported from there? |
@@ -73,6 +73,7 @@ public class TimestampBasedCopyableDataset implements CopyableDataset, FileSyste
private final VersionSelectionPolicy<TimestampedDatasetVersion> versionSelectionPolicy;
private final ExecutorService executor;
private final FileSystem srcFs;
+ private final CopyableFileFilter copyableFileFilt... | [TimestampBasedCopyableDataset->[CopyableFileGenerator->[generateCopyableFile->[build],run->[generateCopyableFile,Path,RuntimeException,debug,isCopyableFile,listStatus,add,printStackTrace,relativizePath,getMillis,getPath],isCopyableFile->[exists,getModificationTime]],copyableFileFilter->[HiddenFilter],datasetURN->[toSt... | Creates a new TimestampBasedCopyableDataset. Default version finder for the dataset. | This class already has a method copyableFileFilter() that returns a HiddenFilter. You can use AndPathFilter to merge this filter with the filter specified in member variable copyableFileFilter. |
@@ -82,10 +82,10 @@
<profile.tls />
<!-- Dependency versions -->
- <jhipster-dependencies.version>3.7.0-SNAPSHOT</jhipster-dependencies.version>
+ <jhipster-dependencies.version><%= JHIPSTER_DEPENDENCIES_VERSION %></jhipster-dependencies.version>
<!-- The spring-boot version s... | [No CFG could be retrieved] | XmlElement for all possible N - Class objects Diagnostics are reported in the order of the version of the Hibernate Hibernate Hibernate. | Just an idea while I see that: would it be possible to add a conditional on this property? if (JHIPSTER_DEPENDENCIES_VERSION .endwith("-SNAPSHOT") { // declare Snapshot repository in pom or gradle build file } |
@@ -59,9 +59,8 @@ public class MatchingDimExtractionFn extends DimExtractionFn
@Override
public String apply(String dimValue)
{
- dimValue = (dimValue == null) ? "" : dimValue;
- Matcher matcher = pattern.matcher(dimValue);
- return matcher.find() ? dimValue : null;
+ Matcher matcher = pattern.matc... | [MatchingDimExtractionFn->[hashCode->[hashCode],equals->[equals]]] | Returns the expression for the specified dimValue if it is a match. | if `dimValue` is null, then it doesn't matter whether the pattern matches or not, we will always return null, so we can skip both the nullToEmpty and the pattern matching, no? |
@@ -385,6 +385,7 @@ public final class Xml {
public static void transform(Element xml, Path styleSheetPath, OutputStream out) throws Exception {
StreamResult resStream = new StreamResult(out);
transform(xml, styleSheetPath, resStream, null);
+ out.close();
}
//-----------------... | [Xml->[selectBoolean->[selectString],transformFOP->[transform],loadStream->[getSAXBuilderWithPathXMLResolver],selectString->[selectString,prepareXPath],selectNodes->[selectNodes,prepareXPath],JeevesURIResolver->[resolve->[resolvePath,resolve]],selectDocumentNodes->[selectNodes],validate->[getString],filterElementValues... | Transform the XML document with the specified stylesheet. | I'm not sure if this could throw an `IllegalStateException` in the application server, since usually the `OutputStream` passed to this methods is the one from `HttpServletResponse.getOutputStream()` method. Usually you want to close the streams in the place where they are created, and the response stream lifecycle is m... |
@@ -19,6 +19,7 @@ from ..fluid import core, layers
from ..fluid.layers import nn, utils
from ..nn import Layer
from ..fluid.initializer import Normal
+from ..fluid.framework import in_dygraph_mode
from paddle.common_ops_import import *
from paddle import _C_ops
| [DeformConv2D->[forward->[deform_conv2d],__init__->[_get_default_param_initializer]],read_file->[read_file],yolo_box->[yolo_box],decode_jpeg->[decode_jpeg]] | Creates a new object with the YOLOv3 loss based on given predict given a given number of bounding boxes this given number of class one - hot key of each. | `from paddle.common_ops_import import *` in_dygraph_mode |
@@ -24,8 +24,8 @@ func NewBuildMutator(build *buildapi.Build) ImageReferenceMutator {
func (m *buildSpecMutator) Mutate(fn ImageReferenceMutateFunc) field.ErrorList {
var errs field.ErrorList
- for i, image := range m.spec.Source.Images {
- if err := fn(&image.From); err != nil {
+ for i := range m.spec.Source.Im... | [Mutate->[Index,Child],NotFound,String,IsNotFound,InternalError,NewPath] | Mutate calls the provided MutateFunc for each of the images in the source. | @smarterclayton @csrwng fyi, this was never doing what it was supposed to do before, it was only mutating the copy of image that the range iterator was making. yay go. |
@@ -322,7 +322,8 @@ class ServiceBusClient(object):
sessionful subscription, otherwise it must be None. In order to receive messages from the next available
session, set this to ~azure.servicebus.NEXT_AVAILABLE_SESSION.
:paramtype session_id: Union[str, ~azure.servicebus.NEXT_AVAILABLE_SESS... | [ServiceBusClient->[get_queue_receiver->[append,get,ServiceBusReceiver,ValueError,generate_dead_letter_entity_name],get_queue_sender->[append,ServiceBusSender],get_subscription_receiver->[append,get,ServiceBusReceiver,ValueError,generate_dead_letter_entity_name],__enter__->[_create_uamqp_connection],__exit__->[close],g... | Returns a ServiceBusReceiver for the given topic and subscription. Creates a new ServiceBusReceiver instance. Creates a new service bus receiver object. | Do we want to add to the docstring something like: Possible values include 'deadletter', 'transferdeadletter'. |
@@ -47,6 +47,11 @@ def add_flow():
return f
+@pytest.fixture
+def clear_context_cache():
+ prefect.context["caches"] = {}
+
+
class TestCreateFlow:
""" Test various Flow constructors """
| [test_flow_run_handles_error_states_when_initial_state_is_provided->[AddTask,run],TestFlowRunMethod->[test_flow_dot_run_handles_mapped_cached_states_with_differing_lengths->[StatefulTask,MockSchedule,run,store_output],test_flow_dot_run_handles_cached_states_across_runs->[StatefulTask,store_output,return_x,run,MockSched... | Test if Flow creates a Flow with no arguments. | This might be a useful enough function to elevate to a utility file? `prefect.utilities.cache.clear_session_cache()` |
@@ -210,7 +210,7 @@ class Compiler(object):
def __init__(self, cspec, operating_system, target,
paths, modules=[], alias=None, environment=None,
- extra_rpaths=None, implicit_rpaths=None,
+ extra_rpaths=None, enable_implicit_rpaths=None,
**kwarg... | [Compiler->[cxx_version->[default_version],f77_version->[default_version],fc_version->[default_version],determine_implicit_rpaths->[parse_implicit_rpaths,verbose_flag],__init__->[check->[_verify_executables],check,tokenize_flags],parse_implicit_rpaths->[_parse_implicit_rpaths],default_version->[get_compiler_version_out... | Initialize a object. | Shouldn't this default to `True`? |
@@ -219,7 +219,7 @@ func checkDocumented(t *testing.T, data []common.MapStr) {
if _, ok := keys[prefix+".*"]; ok {
continue
}
- t.Fatalf("key missing: %s", k)
+ t.Fatalf("check if fields are documented error: key missing '%s'", k)
}
}
}
| [LoadFields,Hash,HandlerFunc,ReportingFetchV2Error,Close,MarshalIndent,NewMetricSet,Encode,Set,WriteFile,Put,StandardizeEvent,ReadFile,NewReportingMetricSetV2,ReportingFetchV2,Bool,HasSuffix,SliceStable,Join,Equal,GetKeys,Fatalf,NewReportingMetricSetV2Error,Split,Query,Printf,Header,Write,NewServer,GetFields,Unmarshal,... | writeDataJSON writes the data. json file for the given module and metricSet. server starts a server with a mock output. | @ruflin I added this because the original message did not show very clearly what was failing and it took me a while to figure out (until I checked the error line in fact). I hope this is ok :) |
@@ -53,5 +53,5 @@ class DataIterator:
from . import iterators
# TODO(Mark): The adaptive iterator will need a bit of work here,
# to retrieve the scaling function etc.
- iterator_type = params.pop_choice("type", iterators.keys())
- return iterators[iterator_type](**params.as_dic... | [DataIterator->[__call__->[range,_yield_one_epoch],from_params->[as_dict,pop_choice,keys],_yield_one_epoch->[as_arrays,get_padding_lengths,Dataset,_create_batches]]] | Create a new object from a set of parameters. | Why doesn't this one type check? |
@@ -29,7 +29,7 @@ class TestGetTensorFromSelectedRows(unittest.TestCase):
def check_with_place(self, place):
scope = core.Scope()
- x_rows = [0, 5, 5, 4, 20]
+ x_rows = [0, 5, 5, 4, 19]
height = 20
row_numel = 2
| [TestGetTensorFromSelectedRows->[test_check_output->[get_places,check_with_place]]] | Checks that the selected rows in the network have a tensor with the specified place. | why change this? |
@@ -128,7 +128,11 @@ class CI_Session_redis_driver extends CI_Session_driver implements SessionHandle
}
$redis = new Redis();
- if ( ! $redis->connect($this->_config['save_path']['host'], $this->_config['save_path']['port'], $this->_config['save_path']['timeout']))
+ if ($this->_config['save_path']['type'] ==... | [CI_Session_redis_driver->[write->[setTimeout,_get_lock,_release_lock,set],close->[ping,close,getMessage,delete],_get_lock->[setTimeout,setex,ttl],_release_lock->[delete],read->[_get_lock,get],destroy->[_cookie_destroy,delete],open->[select,connect,auth]]] | Opens a connection to the Redis instance and saves the session to the specified database. | We put spaces around the `!` operator, and preferrably use compare by type (`===` vs. `==`). |
@@ -1198,8 +1198,15 @@ class _BaseEpochs(ProjMixin, ContainsMixin, UpdateChannelsMixin,
The scalings of the channel types to be applied for plotting.
If None, defaults to `scalings=dict(eeg=1e6, grad=1e13, mag=1e15,
eog=1e6)`.
- cmap : matplotlib colormap
- Color... | [EpochsArray->[__init__->[_detrend_offset_decim,drop_bad]],combine_event_ids->[copy],equalize_epoch_counts->[drop,drop_bad],_BaseEpochs->[equalize_event_counts->[drop,_key_match,drop_bad],plot_drop_log->[plot_drop_log],_get_data->[_get_epoch_from_raw,_detrend_offset_decim,_is_good_epoch,_project_epoch],get_data->[_get_... | Plots an event related potential in the image. Plots the reaction times of a single epoch. | AFAIK we don't use RdBu_r all the time eg if we plot grads norm. Write If 'interactive', the default colormap is used with interactive support. |
@@ -49,8 +49,10 @@ module RepositoryDatatableHelper
"<span class='circle-icon disabled'> </span>"
end
elsif record.assigned_my_modules_count.positive?
- tooltip = "#{record.assigned_my_modules_count} tasks, #{record.assigned_experiments_count} " \
- "experiments, #{record.ass... | [default_table_order_as_js_array->[to_json],default_table_columns->[to_json],assigned_row->[assigned_my_modules_count,assigned_projects_count,assigned_experiments_count,positive?],can_perform_repository_actions->[can_manage_repository_rows?,can_manage_repository?,can_create_repositories?,team,can_read_repository?],prep... | Returns the element of the next node that can be used to display the record s assigned tasks. | Layout/AlignHash: Align the elements of a hash literal if they span more than one line. |
@@ -48,6 +48,10 @@ class User < ApplicationRecord
has_many :throttles, dependent: :destroy
has_one :registration_log, dependent: :destroy
has_one :proofing_component, dependent: :destroy
+ has_many :service_providers,
+ -> { merge(Identity.not_deleted) },
+ through: :identities,
+ ... | [User->[decorate->[new],default_phone_configuration->[first],send_devise_notification->[deliver_later],need_two_factor_authentication?->[two_factor_enabled?],confirmed_email_addresses->[not],active_profile->[find],active_identities->[order],last_identity->[take,new],confirmed?->[any?],include,enum,ignored_columns,encry... | Returns the list of email addresses that have not been confirmed. | 1. Is this a confusing condition to put on here? I could also move this scope into the call site 2. Is it OK to assume that we **do not** want to notify revoked SPs of credential changes? |
@@ -49,6 +49,14 @@ class Search_Replace_Command extends WP_CLI_Command {
public function __invoke( $args, $assoc_args ) {
$old = array_shift( $args );
$new = array_shift( $args );
+ if ( $old == $new ) {
+ $msg = 'Identical <old> and <new> values will not give proper replacement counts.';
+ if ( ! isset( $... | [Search_Replace_Command->[get_table_list->[prepare,get_col],handle_col->[update,run],__invoke->[setHeaders,setRows,display],get_columns->[get_results]]] | This method is invoked by the CLI when a user is editing a row. Returns a new instance of the class that will be used to create the class. | When a warning is issued, the command continues. When an error is issued, the command exits with status 1. So, you should use `WP_CLI::error()` here, which automatically calls `exit(1)`. |
@@ -39,8 +39,14 @@ func main() {
}
}
-func mainInner(g *libkb.GlobalContext) error {
+func warnNonProd(log logger.Logger, e *libkb.Env) {
+ mode := e.GetRunMode()
+ if mode != libkb.ProductionRunMode {
+ log.Warning(fmt.Sprintf("Running in %s mode", mode))
+ }
+}
+func mainInner(g *libkb.GlobalContext) error {
... | [ConfigureAll,GetAutoFork,GetForkCmd,StartLoopbackServer,Exit,Error,NewLogUIProtocol,Warning,Init,GetExtraFlags,Notify,RegisterProtocols,Errorf,InitUI,GetStandalone,ForkServerNix,GetDebug,SetLogLevel,Debug,GetCommands,NewService,Shutdown,NewCommandLine,IsNoStandalone,AddCommands,IsService,Parse,Cancel,GetCtlClient,Run] | mainInner is the main entry point for the command line interface. Checks if the command is in client - server mode and if so runs it now. | log.Warning can take format string, so fmt.Sprintf unnecessary here. |
@@ -3,6 +3,7 @@ class Profile < ApplicationRecord
validates :data, presence: true
validates :user_id, uniqueness: true
+ validates :location, :website_url, length: { maximum: 100 }
validates_with ProfileValidator
has_many :custom_profile_fields, dependent: :destroy
| [Profile->[clear!->[update],refresh_attributes!->[type,to_sym,attribute_name,any?,table_available?,store_attribute,find_each],custom_profile_attributes->[pluck],attributes->[map],validates_with,freeze,belongs_to,validates,refresh_attributes!,has_many,store_attribute]] | Creates a Profile object for a given user record. Creates an array of all currently defined store_attribute accessors. | Since these are normal columns now we can validate them here. `summary` is still validate via the `ProfileValidator` since it has some special cases for users with previously too long summaries. |
@@ -28,7 +28,11 @@ type DockerClient interface {
RemoveImage(name string) error
}
-// pushImage pushes a docker image to the registry specified in its tag
+// pushImage pushes a docker image to the registry specified in its tag.
+// The method will retry to push the image when following scenarios occur:
+// - Dock... | [RemoveImage,Flush,CreateTarFile,Close,V,ParseRepositoryTag,PushImage,Errorf,Open,BuildImage,Sleep,HandleError] | This package is exported to allow the builder to be used by the common builder methods client is the client for the Docker build process. | We retry when the registry is permanently down?! |
@@ -18,13 +18,11 @@ CONFIRM_NOTE_TEMPLATE = 'order/note/confirm_note'
def get_email_context(order_token):
"""Prepares context required for email template rendering."""
site = Site.objects.get_current()
+ logo_url = build_absolute_uri(
+ location=None) + static('images/logo-document.svg')
order... | [send_fulfillment_update->[collect_data_for_fullfillment_email],send_note_confirmation->[collect_data_for_email],collect_data_for_email->[get_email_context],send_fulfillment_confirmation->[collect_data_for_fullfillment_email],send_payment_confirmation->[collect_data_for_email],send_order_confirmation->[collect_data_for... | Prepares context required for email template rendering. | That one is still a duplicated code as well. |
@@ -355,7 +355,7 @@ static void _expose_info_bar(dt_lib_module_t *self, cairo_t *cr, int32_t width,
pango_font_description_set_absolute_size(desc, fontsize * PANGO_SCALE);
pango_layout_set_font_description(layout, desc);
char model[4096] = { 0 };
- sprintf(model + strlen(model), "%s", lib->data.camera_model);... | [No CFG could be retrieved] | Draw infobar on top of the image \ battery - battery value. | Nice one :) with model being empty the strlen() was a no-op! |
@@ -31,9 +31,14 @@ class DigitalFactoryFileProvider(FileProvider):
Function called every time the 'From Digital Factory' option of the 'Open File(s)' submenu is triggered
"""
self.loadWindow()
+ print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa")
if self._account.isLoggedIn a... | [DigitalFactoryFileProvider->[loadWindow->[getInstance,log,requestActivate],_onLoginStateChanged->[emit,userAccountHasLibraryAccess],__init__->[userAccountHasLibraryAccess,dirname,connect,getInstance,super,join],run->[loadWindow,show,initialize,userAccountHasLibraryAccess]]] | Create the GUI window for the Digital Library Open dialog. | Personally I like debugging with `print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1")` ;-) |
@@ -53,7 +53,7 @@ class Archives(abc.MutableMapping):
_name = safe_encode(name)
values = self._archives.get(_name)
if values is None:
- raise KeyError
+ raise NoArchiveError
ts = parse_timestamp(values[b'time'].decode())
return ArchiveInfo(name=name, id... | [Manifest->[write->[get_raw_dict],check_repository_compatibility->[MandatoryFeatureUnsupported],load->[set_raw_dict],__init__->[Archives]],Archives->[list_considering->[list]]] | A class method to provide access to a specific node in the cluster. | this is a good idea to support wide-scope catching, but not needed here, see below. |
@@ -1479,7 +1479,7 @@ function conv_sort(array $item_list, $order)
$parents[$i]['children'] = sort_item_children($parents[$i]['children']);
}
- if (PConfig::get(local_user(), 'system', 'smart_threading', 0)) {
+ if (!PConfig::get(local_user(), 'system', 'no_smart_threading', 0)) {
foreach ($parents as $i => $... | [localize_item->[match,attributes],builtin_activity_puller->[match],get_responses->[getId],visible_activity->[match,isHidden],conversation->[getTemplateData,addParent,determineCategoriesTerms,getPage]] | Sort the items in an array This function takes a list of parent objects and returns a list of all the parent objects. | Please rename to `dumb_threading`. |
@@ -642,6 +642,11 @@ public class Searches {
.filter(Objects::nonNull)
.collect(Collectors.toList());
+ final Optional<String> nonNumericFieldError = errors.stream().filter(error -> error.startsWith("Expected numeric type on field")).findAny();
+ if (nonNumericF... | [Searches->[standardSearchRequest->[standardSearchRequest],count->[count],fieldHistogram->[getMillis,tookMsFromSearchResult],filteredSearchRequest->[filteredSearchRequest,standardSearchRequest],histogram->[histogram,tookMsFromSearchResult],standardAggregationFilters->[standardFilters],determineAffectedIndicesWithRanges... | Checks for failed shards. | Would it make sense to store all errors for this operation in the `errorDetails` field of the exception? |
@@ -6,11 +6,12 @@ from cereal import log
class LatControlPID():
- def __init__(self, CP):
+ def __init__(self, CP, CI):
self.pid = PIController((CP.lateralTuning.pid.kpBP, CP.lateralTuning.pid.kpV),
(CP.lateralTuning.pid.kiBP, CP.lateralTuning.pid.kiV),
... | [LatControlPID->[reset->[reset],update->[reset,update]]] | Initialize a lateral control object. Get the output_steer angle_steers_des steering_feed. | Is this more efficient? Or should we pass CI to update() and call get_steer_feedforward() there? |
@@ -55,14 +55,9 @@ class Services:
@classmethod
def start(cls):
url = config.get('messaging', 'url')
- # watchdog
- journal = Journal('/var/lib/pulp/journal/watchdog')
- cls.watchdog = WatchDog(url=url, journal=journal)
- cls.watchdog.start()
- log.info('AMQP watchd... | [Services->[start->[start]],ReplyHandler->[start->[start],succeeded->[_bind_failed,_bind_succeeded,_unbind_succeeded],failed->[_bind_failed]]] | Start the AMPP watchdog and reply handler. | Agent timeouts story: Watchdog was providing simulated agent timeout feedback. |
@@ -70,8 +70,7 @@ namespace Internal.NativeCrypto
public static SafeAlgorithmHandle BCryptOpenAlgorithmProvider(string pszAlgId, string pszImplementation, OpenAlgorithmProviderFlags dwFlags)
{
- SafeAlgorithmHandle hAlgorithm = null;
- NTSTATUS ntStatus = Interop.BCryptOpenAlgo... | [Cng->[BCryptDecrypt->[BCryptDecrypt],BCryptEncrypt->[BCryptEncrypt]]] | Get an algorithm provider with the specified algorithm ID and implementation. | Please undo this style change |
@@ -195,11 +195,12 @@ func checkProofInner(m metaContext, pvlS string, service keybase1.ProofType, inf
}
}
- if len(errs) == 0 {
+ switch len(errs) {
+ case 0:
return nil
- } else if len(errs) == 1 {
+ case 1:
return errs[0]
- } else {
+ default:
for _, err := range errs {
debug(m, "multiple failure... | [AtSelectorPath,Size,GetRemoteUsername,Find,GetServers,Compile,Eq,HasPrefix,Set,GetHTML,GetUsername,Error,FindBase64Block,MatchString,GetExternalAPI,SetQuestion,FindStringSubmatch,WhitespaceNormalize,GetProtocol,Errorf,GetText,Ban,Contents,GetAPIURL,HasSuffix,NewBuffer,ToMediumID,Join,XapiError,NewDocumentFromReader,Co... | mknewstate creates a new state from the scripts in scripts. Check if the user has a hint. | Switch is clearer. Fine to merge anyway. Hope disabling this rule works out |
@@ -48,11 +48,13 @@ def main(argv):
with open(os.path.join(metrics_output_dir, "gpu_metrics"), "w") as outputFile:
pass
os.chmod(os.path.join(metrics_output_dir, "gpu_metrics"), 0o777)
- cmd = 'nvidia-smi -q -x'
+ cmd = 'nvidia-smi -q -x'.split()
while(True):
try:
- smi... | [parse_nvidia_smi_result->[outPut,getElementsByTagName,write,print,enumerate,flush,exc_info,len,asctime,dumps,localtime,processes,join,format,open,parseString],main->[parse_nvidia_smi_result,print,sleep,exc_info,chmod,check_output,format,join,open,exit,check_ready_to_run],check_ready_to_run->[list,int,append,pop,len,ge... | Main function of the GPU metrics collector. | there is try catch within `parse_nvidia_smi_result` |
@@ -55,6 +55,9 @@ __all__ = (
)
log = structlog.get_logger(__name__) # pylint: disable=invalid-name
+_senders_cache = LRUCache(maxsize=128)
+_hashes_cache = LRUCache(maxsize=128)
+_bytes_cache = LRUCache(maxsize=128)
def assert_envelope_values(nonce, channel, transferred_amount, locked_amount, locksroot):
| [Secret->[__init__->[assert_envelope_values]],from_dict->[from_dict],LockedTransferBase->[unpack->[Lock],__init__->[assert_envelope_values,assert_transfer_values]],RefundTransfer->[from_event->[Lock],from_dict->[from_dict],to_dict->[to_dict],unpack->[Lock]],EnvelopeMessage->[sign->[packed,sign],sign2->[decode],message_... | Check that all values in the envelope are valid. | Nitpick: The name seems a bit generic, maybe something like `_lock_bytes` or so would be more clear. |
@@ -364,7 +364,10 @@ func (f *InitializeLabelsForm) Validate(ctx *macaron.Context, errs binding.Error
// \/ \/ |__| \/ \/
// MergePullRequestForm form for merging Pull Request
+// swagger:model MergePullRequestOption
type MergePullRequestForm struct {
+ // re... | [HasInvalidChannel->[IsValidSlackChannel],HasEmptyContent->[ReviewType,TrimSpace],ParseRemoteAddr->[IsDir,UserPassword,CanImportLocal,String,Parse,HasPrefix,TrimSpace]] | Validate - description description - description of the label. Validate - validates the fields of the object. | This should have been without spaces to have correct values in swagger json |
@@ -215,6 +215,7 @@ class PipelineOptionsTest(unittest.TestCase):
parser.add_argument(
'--fake_multi_option', action='append', help='fake multi option')
+ @pytest.mark.no_xdist
def test_display_data(self):
for case in PipelineOptionsTest.TEST_CASES:
options = PipelineOptions(flags=ca... | [PipelineOptionsTest->[test_option_modifications_are_shared_between_views->[MockOptions],test_get_all_options_subclass->[MockOptions],test_views_can_be_constructed_from_pipeline_option_subclasses->[FakeOptions],test_value_provider_options->[UserOptions],test_sublcalsses_of_pipeline_options_can_be_instantiated->[MockOpt... | Adds the necessary arguments to the argparse parser. | The setUp and tearDown code was an attempt at fixing the flakiness, by removing side-effects. Perhaps there are additional side-effects we didn't account for? |
@@ -54,6 +54,18 @@ return array(
*/
'key' => 'YourSecretKeyGoesHere!',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application cache
+ |--------------------------------------------------------------------------
+ |
+ | Laravel automatically caches your views to save t... | [No CFG could be retrieved] | Application key type of object. | This isn't related to the pull request. |
@@ -231,7 +231,7 @@ public abstract class Proc {
return pb;
}
- private LocalProc( String name, ProcessBuilder procBuilder, InputStream in, OutputStream out, OutputStream err ) throws IOException {
+ private LocalProc( String name, ProcessBuilder procBuilder, InputStream in, Output... | [Proc->[joinWithTimeout->[run->[kill],join],LocalProc->[join->[join,isAlive],environment->[environment],kill->[join]]]] | check if environment contains missing values in process builder. | I'm not a normal contributor to this project so it's probably not my place to nitpick, but all of the changes in this file appear to be purely cosmetic--did you mean to commit these? |
@@ -39,7 +39,7 @@ func (s *Server) StreamAggregatedResources(server discovery.AggregatedDiscoveryS
Namespace: cnMeta.Namespace,
Service: cnMeta.ServiceName,
}
- log.Info().Msgf("cert: cn=%s, service=%s", cn, namespacedService)
+ log.Info().Msgf("Client %s connected: Subject CN=%s; Service=%s", ip, cn, namespa... | [StreamAggregatedResources->[Context,Msgf,SetLastAppliedVersion,Wrap,ValidateClient,Info,Done,sendAllResponses,Error,TypeURI,GetCommonName,GetIPFromContext,Debug,GetLastSentNonce,UnregisterProxy,GetLastSentVersion,newAggregatedDiscoveryResponse,GetCertificateCommonNameMeta,GetAnnouncementsChannel,Send,NewProxy,ParseUin... | StreamAggregatedResources streams aggregated resources from the Envoy proxy This function is called when a request is received from Envoy. It is called by the This method is called when a new discovery request is received from Envoy. | Logging the ip as `Service=` is misleading. |
@@ -288,6 +288,7 @@ define([
* @param {Color} [options.silhouetteColor=Color.RED] The silhouette color. If more than 256 models have silhouettes enabled, there is a small chance that overlapping models will have minor artifacts.
* @param {Number} [options.silhouetteSize=0.0] The size of the silhouette in pi... | [No CFG could be retrieved] | Options for glTF binary version 1 and 2 Model constructor for a object. | Mention in `CHANGES.md` that this flag is added. It can go alongside the Draco bullet. |
@@ -75,12 +75,10 @@ def pack_reward_proof(
non_closing_signature: Signature,
) -> bytes:
return proofs.pack_reward_proof(
- monitoring_service_contract_address=to_checksum_address(
- monitoring_service_contract_address
- ),
+ monitoring_service_contract_address=to_hex_address(... | [pack_reward_proof->[pack_reward_proof],pack_balance_proof->[pack_balance_proof]] | Pack a reward proof into a binary representation. | We shouldn't need the explicit cast here |
@@ -62,6 +62,8 @@ class Visit(CMakePackage):
extendable = True
+ executables = ['^xml2cmake$']
+
version('develop', branch='develop')
version('3.1.1', sha256='0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0')
version('3.0.1', sha256='a506d4d83b8973829e68787d8d721199523ce7ec73... | [Visit->[cmake_args->[satisfies,append,extend,str,format,join],patch->[filter_file,find],depends_on,conflicts,version,patch,when,variant]] | Short description of method Get all the possible version of a sequence. | This seems like an odd choice for finding a VisIt executable. Is that the only binary available from visit that can print a version? |
@@ -16,7 +16,7 @@
function response (response) {
var headers = Object.keys(response.headers()).filter(function (header) {
- return header.endsWith('app-alert') || header.endsWith('app-params');
+ return header.indexOf('app-alert', header.length - 'app-alert'.length)... | [No CFG could be retrieved] | Notification interceptor. | Very similar line (using `endsWith`) exists at `_alert-error.directive.js`. It could need to be changed as well. |
@@ -64,6 +64,13 @@ public class KsqlRestConfig extends RestConfig {
+ "will not start serving requests until all preconditions are satisfied. Until that time, "
+ "requests will return a 503 error";
+ static final String KSQL_SERVER_ENABLE_UNCAUGHT_EXCEPTION_HANDLER =
+ KSQL_CONFIG_PREFIX + "serve... | [KsqlRestConfig->[getKsqlConfigProperties->[getOriginals],getPropertiesWithOverrides->[getOriginals],getCommandConsumerProperties->[getPropertiesWithOverrides],getCommandProducerProperties->[getPropertiesWithOverrides]]] | This class defines the configuration for the server. Adds missing properties to the object. | we should try to name these hierarchically, so the prefix is as general as possible, e.g.: `server.exception.uncaught.handler.enable` |
@@ -75,6 +75,12 @@ if ($action == 'dolibarr2ldap') {
$dn = $object->_load_ldap_dn($info);
$olddn = $dn; // We can say that old dn = dn as we force synchro
+ if ($ldap->serverType == "activedirectory") {
+ $info['sAMAccountName'] = $object->name;
+ }
+
+ unset($info['member']);
+
$result = $ldap->update(... | [fetch,getAttribute,connect_bind,unbind,loadLangs,update,getNextGroupGid,trans,getrights,close,_load_ldap_dn,_load_ldap_info] | Creates a Usergroup object and populates it with data from the given user object. Print a group header. | Are you sure we must unset this all the times or only if ($ldap->serverType == "activedirectory") { |
@@ -453,6 +453,11 @@ public final class OmUtils {
return dirFile;
}
+ public static RepeatedOmKeyInfo prepareKeyForDelete(OmKeyInfo keyInfo,
+ RepeatedOmKeyInfo repeatedOmKeyInfo) throws IOException {
+ return prepareKeyForDelete(keyInfo, repeatedOmKeyInfo, 0L);
+ }
+
/**
* Prepares key info ... | [OmUtils->[getOMNodeIds->[addSuffix],addKeySuffixes->[addSuffix,concatSuffixes],getHttpAddressForOMPeerNode->[addKeySuffixes],getConfSuffixedWithOMNodeId->[addKeySuffixes],getHttpsAddressForOMPeerNode->[addKeySuffixes]]] | create a directory in the current working directory if it doesn t exist. | This looks brittle, if someone mistakenly sent for normal key deletes trxnLogIndex we will update it. (I think no harm) So, make this logic generic for all requests, instead of special cases, and remove the above method. |
@@ -1546,14 +1546,14 @@ resource "aws_codebuild_project" "test" {
`, rName, tagKey, tagValue)
}
-func testAccAWSCodeBuildProjectConfig_VpcConfig(rName string, subnetCount int) string {
+func testAccAWSCodeBuildProjectConfig_VpcConfig1(rName string) string {
return testAccAWSCodeBuildProjectConfig_Base_ServiceRole... | [ParallelTest,StringValue,Meta,BatchGetProjects,Sprintf,TestMatchResourceAttr,TestCheckResourceAttr,RandString,RootModule,ComposeTestCheckFunc,String,Errorf,Fatalf,RandomWithPrefix,Getenv,Skipf,MustCompile] | testAccAWSCodeBuildProjectConfig_Tags returns a string that can be used to create region Private functions. | Seeing as the check is for one subnet is count needed? |
@@ -1,8 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
using Internal.TypeSystem;
-
+using CORINFO_DEVIRTUALIZATION_DETAIL = Internal.JitInterface.CORINFO_DEVIRTUALIZATION_DETAIL;
using Debug = System.... | [DevirtualizationManager->[IsEffectivelySealed->[IsEffectivelySealed]]] | Creates a new object that represents a base class of a given type. is the type that the method is declared on. | This is technically a layering violation since DevirtualizationManager is the general purpose component that can be used with different codegen backends. But I don't know if I really want to ask you to create a separate enum. Fortunately this will not be a build break in NativeAOT because we already violated the layeri... |
@@ -1020,7 +1020,6 @@ namespace System.Net.WebSockets
if (thisLockTaken || sessionHandleLockTaken)
{
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
}
| [WebSocketBase->[OutstandingOperationHelper->[TryStartOperation->[ThrowIfDisposed],CompleteOperation->[Dispose],Dispose->[Dispose]],StartOnCloseReceived->[ThrowIfDisposed],Abort->[Abort],OnBackgroundTaskException->[Abort],OnKeepAlive->[EnsureKeepAliveOperation,ThrowIfConvertibleException,ReleaseLock,OnBackgroundTaskExc... | Release locks. | You can remove the empty try block as well in such cases. |
@@ -67,8 +67,8 @@ public class FinishedBattle extends AbstractBattle {
}
final Territory attackingFrom = route.getTerritoryBeforeEnd();
attackingUnits.addAll(units);
- m_attackingFromMap.putIfAbsent(attackingFrom, new ArrayList<>());
- final Collection<Unit> attackingFromMapUnits = m_attackingFromM... | [FinishedBattle->[unitsLostInPrecedingBattle->[isEmpty],isEmpty->[isEmpty],removeAttack->[isEmpty]]] | Adds a change to the attacking map. | Not sure if this is actually more readable. When I see computeIfAbsent, I'm expecting more of a true function so then I have to more closely read it where it then ends up just being an empty array list. I'd be interested in @ssoloff and @DanVanAtta thoughts. |
@@ -205,9 +205,6 @@ func Init() {
rIndexer, populate, err = NewElasticSearchIndexer(setting.Indexer.RepoConnStr, setting.Indexer.RepoIndexerName)
if err != nil {
- if rIndexer != nil {
- rIndexer.Close()
- }
cancel()
indexer.Close()
close(waitChannel)
| [GetMaxID,Warn,Index,Now,Close,Delete,Info,Done,IsErrRepoNotExist,Stack,IsShutdown,Error,GetRepositoryByID,CreateUniqueQueue,RunAtTerminate,IsTableNotEmpty,set,GetUnindexedRepos,ParseInt,Trace,After,Since,Debug,IsChild,UpdateIndexerStatus,RunWithShutdownContext,DeleteAllRecords,GetManager,IndexByte,Background,FormatInt... | Initialize the repository indexer Start processing the queue and populate the repository indexer. | We may need to `Close` inside `NewElasticSearchIndexer` like `NewBleveIndexer` |
@@ -62,8 +62,7 @@ public class AlertConditionFactory {
final Configuration configuration = new Configuration(parameters);
requestedConfiguration.check(configuration);
} catch (ConfigurationException e) {
- final String conditionTitle = isNullOrEmpty(title) ? "" : "'" + titl... | [AlertConditionFactory->[createAlertCondition->[create,error,checkArgument,isNullOrEmpty,Configuration,get,check,getRequestedConfiguration],getLogger]] | Creates an alert condition with the given parameters. | It would be helpful to include the stream title in here as well. |
@@ -106,7 +106,7 @@ if ($action == 'add' || $action == 'update')
}
else
{
- setEventMessages($object->error, $object->errors, 'errors');
+ setEventMessages($object->error, null, 'errors');
$action='create';
}
}
| [fetch,create,fetch_address,loadLangs,update,trans,select_ziptown,select_country,fetch_lines,formconfirm,close,delete] | Adds a new address and sets all necessary properties to the object Updates an object s node in the system. | If we have $object->error as first param, we should have $object->errors at second. Why removing this ? |
@@ -67,8 +67,8 @@ class GoLocalSource(GoTarget):
# for example via plain old filesystem access.
globs = Globs(ParseContext(rel_path=address.spec_path, type_aliases={}))
sources = globs('*', exclude=[globs('BUILD*'),
- # This skips dirents.
- ... | [GoLocalSource->[import_path->[local_import_path]]] | Initialize a GoLocalSource object. | I'm not sure that this is a legal glob... should it be `*/**/*`? Should check that it still compiles in latest master now that v2 is enabled. |
@@ -398,15 +398,8 @@ class TopCombineFn(core.CombineFn):
than largest to smallest
"""
- _MIN_BUFFER_OVERSIZE = 100
- _MAX_BUFFER_OVERSIZE = 1000
-
- # TODO(robertwb): Allow taking a key rather than a compare.
def __init__(self, n, compare=None, key=None, reverse=False):
self._n = n
- self._b... | [_MergeTopPerBundle->[process->[_ComparableValue]],_TopPerBundle->[process->[_ComparableValue]],TupleCombineFn->[add_input->[add_input]],PhasedCombineFnExecutor->[__init__->[curry_combine_fn],merge_only->[merge_accumulators],full_combine->[apply],add_only->[create_accumulator,add_inputs],extract_only->[extract_output]]... | Initialize the object with n n - ary objects. | Let's repurpose this TODO to remove "compare" (and only keep key) for Python 3. |
@@ -26,7 +26,16 @@ func newUnifiedChunkQueryable(ds, cs ChunkStore, distributor Distributor, chunkI
mint: mint,
maxt: maxt,
},
- }, nil
+ }
+
+ // Include ingester only if maxt is within 2 times ingester chunk age w.r.t. current time.
+ if maxt >= time.Now().Add(-2*ingesterMa... | [Select->[Time,Get,metadataQuery,partitionChunks],Get->[Get],QueryableFunc] | newUnifiedChunkQueryable returns a queryable that returns a list of chunks from the Select returns a series set of the last N chunks that match the provided matchers. | Ditto, skip the else and use append. And initialise `ucq.stores` to `[]ChunkStore{cs}`. |
@@ -312,10 +312,7 @@ func mapToErrorModel(from *errorEvent, metadata *model.Metadata, reqTime time.Ti
if from.TransactionID.IsSet() {
out.TransactionID = from.TransactionID.Val
}
- if experimental {
- out.Experimental = from.Experimental.Val
- }
- out.RUM = false
+ out.RUM = config.RUM
}
func mapToException... | [Values,Duration,ParseURL,Clone,IsZero,IsSet,Add,Atoi,Put,Sprint,Errorf,Labels,Join,Custom,ExtractIPFromHeader,Get,Split,ParseIP,Reset,TrimSuffix,validate,Decode,TransactionMark,CanonicalMIMEHeaderKey] | val to provide a more detailed description of the error. mapToMetadataModel maps from. Info to model. Info. | Maybe we should leave setting the RUM field to `processor/stream`? The decoder doesn't really care whether it's RUM or not. |
@@ -1152,6 +1152,7 @@ func (s *localizerPipeline) localizeConversation(ctx context.Context, uid gregor
conversationLocal.Expunge = conversationRemote.Expunge
conversationLocal.ConvRetention = conversationRemote.ConvRetention
conversationLocal.TeamRetention = conversationRemote.TeamRetention
+ conversationLocal.Mi... | [Localize->[filterSelfFinalized,filterInboxRes],TeamTypeChanged->[handleInboxError,TeamTypeChanged,getConvLocal],ReadUnverified->[Read,fetchRemoteInbox],SetTeamRetention->[SetTeamRetention,getConvsLocal,handleInboxError],modConversation->[handleInboxError,getConvLocal],NewMessage->[getConvLocal,handleInboxError,NewMess... | localizeConversation takes a conversation remote and returns a conversationLocal with all the fields that are Private functions related to the conversation object. Private methods related to the max messages in a conversation. | You don't need `Local` here |
@@ -114,7 +114,7 @@ class MockTorchAgent(TorchAgent):
"""
Return confirmation of training.
"""
- return Output(['Training {}!'.format(i) for i in range(len(batch.text_vec))])
+ return Output(['Training {}!'.format(i) for i in range(batch.batchsize)])
def eval_step(self, b... | [SilentTorchAgent->[__init__->[build_model,build_criterion]]] | Train and evaluation step. | nit: can use f string here |
@@ -137,10 +137,7 @@ class Config(ABC):
return default
raw_value = self.get_value(section, option)
- # We jump through some hoops here to deal with the fact that `six.string_types` is a tuple of
- # types.
- if (type_ == six.string_types or
- (isinstance(type_, type) and issubclass(type_, ... | [_ChainedConfig->[get_source_for_option->[get_source_for_option,has_option],get_value->[has_section,get_value],sections->[sections],sources->[sources],has_option->[has_option],has_section->[has_section]],_SingleFileConfig->[get_source_for_option->[sources,has_option],get_value->[get],sections->[sections],has_option->[h... | Get an instance of a from the configuration. | Can `str` be subclassed? should we use issubclass() for safety? |
@@ -66,4 +66,8 @@ public class QueuedCommandStatus {
setStatus(status);
future.complete(status);
}
+
+ public void setCommandOffset(final long offset) {
+ commandOffset = offset;
+ }
}
\ No newline at end of file
| [QueuedCommandStatus->[setFinalStatus->[setStatus]]] | Sets the final status of the command. | We should split this interface into an un-mutable/reader interface with the getters and another interface or just the implementation with the setters. Kind of out-of-scope for this PR though. I'll file an issue for this. |
@@ -0,0 +1,18 @@
+class CreateAccountRecoveryRequests < ActiveRecord::Migration[5.1]
+ disable_ddl_transaction!
+
+ def up
+ create_table :account_recovery_requests do |t|
+ t.integer :user_id, null: false
+ t.string :request_token, null: false
+ t.datetime :requested_at, null: false
+ t.timest... | [No CFG could be retrieved] | No Summary Found. | We're gonna want a migration to drop this table here |
@@ -4024,11 +4024,9 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass
r = ::serialization::parse_binary(buf, cache_file_data);
THROW_WALLET_EXCEPTION_IF(!r, error::wallet_internal_error, "internal error: failed to deserialize \"" + m_wallet_file + '\"');
- crypto::... | [No CFG could be retrieved] | Load the wallet keys file and read it as encrypted cache. cache_data is a list of bytes of the binary in the archive. | Should use `key` instead of `m_cache_key ` |
@@ -216,6 +216,10 @@ class QuantumEspresso(Package):
options.append(
'FFTW_INCLUDE={0}'.format(join_path(env['MKLROOT'],
'include/fftw')))
+ options.append(
+ 'LIBDIRS={0}'.format(join_path(env['MKLROOT'],
+ ... | [QuantumEspresso->[install->[join_path,install,mkdirp,append,extend,glob,format,join,configure,make],depends_on,conflicts,version,patch,variant]] | Installs a new in the system. External Fourier W3 interface. Initialize the object. | @adamjstewart Isn't there away to add `lib/intel64` in an architecture agnostic manner? |
@@ -104,4 +104,13 @@ public class ExtensionResourcesGeneratorAnnotationProcessor extends AbstractProc
{
processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, message);
}
+
+ private class FixedVersionResolver extends VersionResolver
+ {
+ @Override
+ public String fallbac... | [ExtensionResourcesGeneratorAnnotationProcessor->[process->[getMessage,getFullStackTrace,generateFor,findExtensions,AnnotationProcessorResourceGenerator,log,format,printMessage,dumpAll,parseExtension,SpiServiceRegistry],log->[printMessage],parseExtension->[classFor,getRootDeclaration,createFrom,AnnotationsBasedDescribe... | Log a message if it is a . | validate the option is actually set and throw descriptive exception otherwise |
@@ -182,8 +182,8 @@ public class JarClassPathElement implements ClassPathElement {
}
//multi release jars can add additional entries
if (JarFiles.isMultiRelease(jarFile)) {
- Set<String> copy = new HashSet<>(paths);
- for (String i... | [JarClassPathElement->[getProvidedResources->[withJarFile],readStreamContents->[close],withJarFile->[apply],getManifest->[apply->[getUrl->[],getManifest],withJarFile],close->[close],getResource->[apply->[getUrl->[getPath]]]]] | Provided resources. | I'm wondering if `paths` can contain duplicates and if that is the reason a `Set` was being used |
@@ -18,6 +18,7 @@
package org.apache.beam.runners.dataflow.worker;
import static org.apache.beam.runners.dataflow.util.Structs.getString;
+import static org.apache.beam.runners.dataflow.worker.MetricsToCounterUpdateConverter.Kind.*;
import static org.apache.beam.sdk.util.WindowedValue.valueInGlobalWindow;
import ... | [IsmSideInputReaderTest->[verifyList->[verifyIterable],sideInputReader->[toSideInputInfo],initInputFile->[encodeKeyPortion,initInputFile],forMap->[windowOf],verifyMap->[compare],fromValues->[windowOf],serialSideInputReader->[toSideInputInfo],fromKvsForList->[windowOf]]] | Imports a variable number of items from the System as a parameter of type String. Missing imports for Counter. | We can import just `SUM` |
@@ -593,6 +593,11 @@ func (d *driver) AddShard(shard uint64) error {
if err := d.insertDiffInfo(diffInfo); err != nil {
return err
}
+ if diffInfo.Finished == nil {
+ if _, ok := d.commitConds[diffInfo.Diff.Commit.ID]; !ok {
+ d.commitConds[diffInfo.Diff.Commit.ID] = sync.NewCond(&d.lock)
+ ... | [FinishCommit->[getBlockClient],AddShard->[getBlockClient],DeleteRepo->[getBlockClient],GetFile->[getBlockClient],Read->[Read,blockRef],PutFile->[getBlockClient],CreateRepo->[getBlockClient],DeleteFile->[ListFile,InspectFile,DeleteFile],branchParent->[canonicalCommit]] | AddShard adds a shard to the diff list Error - if not found - return nil. | No need for this, `DiffInfo`s only get serialized when the commit is finished. So we can assume that the commits we receive in `AddShard` are all finished. Why don't we make that an assert in this function so the invariant is obvious? |
@@ -120,9 +120,12 @@ public final class DataConversion {
/**
* Obtain the configured {@link MediaType} for this instance, or assume sensible defaults.
*/
- private MediaType getStorageMediaType(Configuration configuration, boolean embeddedMode, boolean internalCache) {
+ private MediaType getStorageMe... | [DataConversion->[Externalizer->[writeObject->[writeTo],readObject->[readFrom]],toStorage->[toStorage],isConversionSupported->[isConversionSupported],extractIndexable->[fromStorage],equals->[equals],withWrapping->[DataConversion],writeTo->[isDefault],newValueDataConversion->[DataConversion],withRequestMediaType->[DataC... | Returns the storage media type for the given configuration. | IMO if the cache has a user marshaller and the storage type is not OBJECT, then the cache should already be initialized with the user marshaller's media type as the storage type, we shouldn't do this check only when the `DataConversion` is shipped to another node and has its dependencies injected. |
@@ -202,9 +202,13 @@ class RemoteLOCAL(RemoteBASE):
def is_hardlink(path_info):
return System.is_hardlink(path_info)
- @staticmethod
- def reflink(from_info, to_info):
- System.reflink(from_info, to_info)
+ def reflink(self, from_info, to_info):
+ tmp_info = to_info.parent / tmp_f... | [RemoteLOCAL->[pull->[_process],isfile->[isfile],unprotect->[exists,_unprotect_dir,isdir,_unprotect_file],push->[_process],_unprotect_file->[is_symlink,is_hardlink,remove],remove->[exists,remove],symlink->[symlink],_create_unpacked_dir->[makedirs],_unprotect_dir->[_unprotect_file,walk_files],copy->[copy,remove],move->[... | Check if path_info is hardlink or not. | Yes, you can change mode on reflink without affecting the source. This is because reflinks have their own inodes, so from fs perspective they are separate files that have their own perms. |
@@ -103,7 +103,7 @@ public class RegexTreeHelper {
// after the edge won't directly follow what's before the edge. However, we do consider the end-of-lookahead
// state itself reachable (but not any state behind it), so that we can check whether the end of the lookahead
// can be reached without in... | [RegexTreeHelper->[onlyMatchesEmptySuffix->[onlyMatchesEmptySuffix],canReachWithoutConsumingInput->[canReachWithoutConsumingInput],isAnchoredAtEnd->[isAnchoredAtEnd]]] | Checks whether a given state can be reached without consuming input from a given place within the lookahead. | Not directly related to your change, but inverting the two operands would avoid a useless recursion when the LHS is true. |
@@ -33,6 +33,9 @@ class PruningScheduler(BasePruningScheduler):
evaluator
Evaluate the pruned model and give a score.
If evaluator is None, the best result refers to the latest result.
+ reset_weight
+ Reset model weight to the begining before return in one step.
+ ... | [PruningScheduler->[get_best_result->[get_best_result]]] | Initialize the object with the given parameters. | reset_weight is True means every iteration uses original model weights, right? |
@@ -161,6 +161,12 @@ class Jetpack_Instant_Search extends Jetpack_Search {
$excluded_post_types = array();
}
+ $group_id = '';
+ $p2_workspace_hub_blog_id = get_option( $prefix . 'p2_workspace_hub_blog_id' );
+ if ( $p2_workspace_hub_blog_id ) {
+ $group_id = 'p2_workspace_hub_blog_id:' . $p2_workspace_hu... | [Jetpack_Instant_Search->[load_assets_with_parameters->[load_and_initialize_tracks,inject_javascript_options,inject_polyfill_js_options],filter__posts_pre_query->[should_handle_query],action__parse_query->[add_aggregations_to_es_query_builder,build_aggregation,instant_api],load_assets->[load_assets_with_parameters],aut... | Inject JS options into the search widget This function is used to filter the search results. Config for the Jetpack API. Provides a list of options for instant search. | Perhaps `null` or `false` would be more appropriate here? |
@@ -349,6 +349,11 @@ class Backtesting:
trades: List[LocalTrade] = []
self.prepare_backtest(enable_protections)
+ # Update dataprovider cache
+ for pair, dataframe in processed.items():
+ self.dataprovider._set_cached_df(pair, self.timeframe, dataframe)
+ self.strateg... | [Backtesting->[start->[load_bt_data,backtest_one_strategy],backtest->[handle_left_open,_enter_trade,prepare_backtest,_get_sell_trade_entry,_get_ohlcv_as_lists],_get_sell_trade_entry->[_get_close_rate],backtest_one_strategy->[backtest,_set_strategy]]] | This method is used to backtest the data for a given time range and returns a DataFrame Add a new node to the open list and return a DataFrame of the new node. Get all results of a single iteration. | I am not sure why/how `strategy.dp` gets unset, but it does in hyperopt. This workaround does the job.. But there may be a way to fix this more proper. |
@@ -359,8 +359,7 @@ namespace Js
varThis = scriptContext->GetLibrary()->GetNull();
}
- Js::Arguments args(1, (Js::Var*) &varThis);
- varResult = pfuncScript->CallFunction(args);
+ varResult = CALL_FUNCTION(pfuncScript->GetScriptContext()->GetThreadContext(), pfuncScript, Cal... | [GetScriptContext->[GetScriptContext],GetDisplayName->[GetFunction],GetRootObject->[GetFunction],EvaluateImmediate->[GetFunction,GetScriptContext,IsStrictMode,TryFetchValueAndAddress,TryGetFunctionForEval],DoEval->[GetThisFromFrame,GetFrameDisplay,GetScriptContext],GetArgumentsObject->[GetArgumentsObject],GetFrameDispl... | This function is called when the JS function is evaluated. private static int countForVerification = 0 ;. | >CALL_FUNCTION [](start = 20, length = 13) Noticed that CallFunction does stack probe but CALL_FUNCTION macro doesn't, will it be safe to not have probe stack in all new code? |
@@ -194,6 +194,9 @@ class PipelineFile(FileMixin):
with open(self.path) as fd:
data = parse_stage_for_update(fd.read(), self.path)
else:
+ logger.info(
+ "%s does not exist, creating…", styled(self.relpath, "bold")
+ )
open(self.pa... | [check_dvc_filename->[is_valid_filename],Lockfile->[load->[exists,validate,LockfileCorruptedError],dump->[exists,relpath]],SingleStageFile->[stages->[_load],remove_with_prompt->[exists,relpath,remove],stage->[_load],dump->[relpath,check_dvc_filename]],is_dvc_file->[is_valid_filename],FileMixin->[exists->[exists],relpat... | Dumps pipeline file with given stage. | Minor: Do we use ` ` (ellipsis character) a lot? I'm guessing it's mostly `...` (3 period chars) in other files, if any. |
@@ -124,6 +124,7 @@ def with_repository(fake=False, invert_fake=False, create=False, lock=True,
def wrapper(self, args, **kwargs):
location = args.location # note: 'location' must be always present in args
append_only = getattr(args, 'append_only', False)
+ storage_quota =... | [main->[get_args,run,Archiver],with_repository->[decorator->[wrapper->[argument]]],Archiver->[_export_tar->[item_to_tarinfo->[print_warning,item_content_stream],build_filter,print_warning,build_matcher,item_to_tarinfo],do_prune->[print_error],do_mount->[print_error],do_check->[print_error],do_extract->[build_filter,pri... | Decorator to add a repository to a command. Decorator to create a with the correct arguments. | getattr must be used here, because not every borg command has the `--storage-quota` argument. |
@@ -159,7 +159,7 @@ async function launchWebServer() {
await startServer(
{host: HOST, port: PORT},
{quiet: !argv.webserver_debug},
- {compiled: argv.compiled}
+ {compiled: true}
);
}
| [No CFG could be retrieved] | Creates a new percy agent and launches it if it is not already running. Creates a new tab with a specific numeric . | No actual objections to this change, but is there a use case where it might be useful to run visual tests on minified code? For comparison: E2E and integration tests allow usage with and without `--compiled`, while performance tests and coverage map tests assume minified code and don't support the `--compiled` flag. |
@@ -462,6 +462,11 @@ class ProductVariant(ModelWithMetadata):
images = list(self.images.all())
return images[0] if images else self.product.get_first_image()
+ def set_as_default(self):
+ self.product.variants.update(default=False)
+ self.default = True
+ self.save(update_fie... | [ProductVariant->[is_digital->[is_shipping_required],get_first_image->[get_first_image]],DigitalContent->[create_new_url->[create]],BaseAttributeQuerySet->[get_visible_to_user->[user_has_access_to_all,get_public_attributes]],ProductsQueryset->[visible_to_user->[published_with_variants]],AttributeQuerySet->[variant_attr... | Get first image in the product. | We should avoid this kind of utils. Each usage of this function generates 2 database queries. It's hard to optimize. |
@@ -969,6 +969,10 @@ def box_dtype(typ, val, c):
np_dtype = numpy_support.as_dtype(typ.dtype)
return c.pyapi.unserialize(c.pyapi.serialize_object(np_dtype))
+@unbox(types.DType)
+def unbox_dtype(typ, obj, c):
+ raise NotImplementedError("dtype unboxing unsupported ")
+
@box(types.PyObject)
@box(types... | [unbox_optional->[cleanup->[cleanup]],reflect_set->[_native_set_to_python_list],unbox_set->[_python_set_to_native],_python_list_to_native->[check_element_type->[typeof],_NumbaTypeHelper,typeof,check_element_type],unbox_list->[_python_list_to_native],box_set->[_native_set_to_python_list],box_namedtuple->[box_tuple]] | Box a value of the specified type. | I'm not sure what to do here! |
@@ -1656,6 +1656,7 @@ class ProductImageReorder(BaseMutation):
product = cls.get_node_or_error(
info, product_id, field="product_id", only_type=Product
)
+ product_variant_exist(product)
if len(images_ids) != product.images.count():
raise ValidationError(
... | [CollectionCreate->[save->[save],Arguments->[CollectionCreateInput]],ProductImageDelete->[perform_mutation->[ProductImageDelete]],ProductImageReorder->[perform_mutation->[save,ProductImageReorder]],ProductImageCreate->[Arguments->[ProductImageCreateInput],perform_mutation->[ProductImageCreate]],VariantImageAssign->[per... | Perform a mutation on the product and images. | Reordering product images seems independent from variants, why do we disallow it here? |
@@ -23,7 +23,16 @@ if is_py2:
fs_encoding = "utf-8"
-class PathInfo(pathlib.PurePath):
+class _BasePath(object):
+ def overlaps(self, other):
+ if isinstance(other, basestring):
+ other = self.__class__(other)
+ elif self.__class__ != other.__class__:
+ return False
+ ... | [PathInfo->[relpath->[relpath],with_name->[with_name],fspath->[__fspath__],__fspath__->[__str__]],URLInfo->[parents->[_URLPathParents],isin->[isin],_path->[_URLPathInfo],__div__->[replace],from_parts->[__new__],parent->[replace],replace->[from_parts],relative_to->[relative_to]],_URLPathInfo->[__str__->[__fspath__]]] | Creates a new object of type cunique_unique_name and returns it as a string Return a relative path to a file object. | There is a more efficient implementation out there) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.