patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -163,10 +163,6 @@ module ApplicationHelper
end
end
- def safe_logo_url(logo)
- logo.presence || SiteConfig.logo_png
- end
-
def community_name
@community_name ||= Settings::Community.community_name
end
| [invite_only_mode?->[invite_only_mode?],title_with_timeframe->[title],community_name->[community_name],community_emoji->[community_emoji]] | svg - node with logo. | This helper was only used to wrap `SiteConfig.secondary_logo` so it can be removed now. All call sites have been changed to directly use `SiteConfig.logo_png`. |
@@ -41,6 +41,7 @@ func Start(cfg *common.Config) {
// register handlers
mux.HandleFunc("/", rootHandler())
+ mux.HandleFunc("/state", stateHandler)
mux.HandleFunc("/stats", statsHandler)
mux.HandleFunc("/dataset", datasetHandler)
| [Header,Itoa,Fprintf,Unpack,NotFound,NewServeMux,GetRegistry,GetNamespace,Experimental,StringToPrint,ListenAndServe,String,Info,HandleFunc,Set,CollectStructSnapshot,Query] | Start starts the metrics api endpoint on the configured host and port. statsHandler reports the expvar and all libbeat metrics. | I wonder if it would make more sense to call this `/modules`, do you plan to add anything else? |
@@ -39,8 +39,17 @@ func (p *Proxy) ServeTCP(conn WriteCloser) {
// maybe not needed, but just in case
defer connBackend.Close()
-
errChan := make(chan error)
+
+ switch p.proxyProtocolVersion {
+ case "1", "2":
+ version, _ := strconv.Atoi(p.proxyProtocolVersion)
+ header := proxyproto.HeaderProxyFromAddrs(by... | [ServeTCP->[RemoteAddr,DialTCP,Close,connCopy,Errorf,WithoutContext,Debugf],connCopy->[Copy,Add,CloseWrite,Now,WithoutContext,SetReadDeadline,Debugf],ResolveTCPAddr] | ServeTCP handles a TCP connection. | Nit: Same here, we usually use `if` statements when the number of branches is less than 2. |
@@ -45,7 +45,7 @@ class AutocompleteTest(unittest.TestCase):
('tha', ((1, 'that'), )),
('that', ((1, 'that'), )),
]))
- p.run()
+ p.run().wait_until_finish()
if __name__ == '__main__':
unittest.main()
| [AutocompleteTest->[test_top_prefixes->[Create,TopPerPrefix,assert_that,tuple,equal_to,run,Map,Pipeline]],main] | Test top prefixes. | Should this be updated to use the TestPipeline instead? |
@@ -2,5 +2,6 @@
<%= render :partial => "boot.js" %>
<div id="title_bar"><h1><%= I18n.t(:create_new_assignment) %></h1>
+<p>Required Fields <span style='color:red;'>*</span></p>
</div>
<%= render :partial => 'form' %>
| [No CFG could be retrieved] | Renders the . | Same thing here (i18n) |
@@ -399,7 +399,7 @@ class Delivery {
$headers = 'From: '.Email::encodeHeader($local_user[0]['username'],'UTF-8').' <'.$local_user[0]['email'].'>'."\n";
}
} else {
- $headers = 'From: '. Email::encodeHeader($local_user[0]['username'],'UTF-8') .' <'. L10n::t('noreply') .'@'.$a->get_hostname() ... | [Delivery->[execute->[get_hostname]]] | Execute a delivery command This function is used to find all items that are not moderated and are visible and not This is a basic check for the top level post. This function is used to determine if an item should be delivered to another user or to a This function is called to add a new message to a user or group. | Standards: - Please wrap concatenation operators with spaces. - Please add a space after commas. |
@@ -192,9 +192,11 @@ func createKubernetesMasterResourcesVMSS(cs *api.ContainerService) []interface{}
}
if isKMSEnabled {
+ // TODO (aramase) remove storage account creation as part of kms plugin v0.0.11
keyVaultStorageAccount := createKeyVaultStorageAccount()
keyVault := CreateKeyVaultVMSS(cs)
- masterRe... | [SystemAssignedIDEnabled,IsAvailabilitySet,RequireRouteTable,IsPrivateCluster,Join,HasCosmosEtcd,PrivateJumpboxProvision,IsAKSBillingEnabled,UserAssignedIDEnabled,HasManagedDisks,IsStorageAccount,HasAvailabilityZones,IsFeatureEnabled,Split,Bool,HasMultipleNodes,IsCustomVNET] | hasDistinctControlPlaneVNET returns whether or not the VNET config of the control plane VnetSubnetID is a utility function to get the VnetSubnetID from the Master. | should we do this in this PR? |
@@ -0,0 +1,12 @@
+from saleor.product.filters import ProductCategoryFilter
+
+
+def test(product_type, categories_tree):
+ product_filter = ProductCategoryFilter(data={}, category=categories_tree)
+ (product_attributes, variant_attributes) = product_filter._get_attributes()
+
+ attribut = product_type.product_... | [No CFG could be retrieved] | No Summary Found. | We could use a more meaningful name that describes what this test is actually testing ;) |
@@ -70,10 +70,13 @@ public class RestApiTest {
private static final String PAGE_VIEW_STREAM = "pageviews_original";
private static final int NUM_RETRIES = 5;
+ private static final int COMMAND_RETRY_LIMIT = 3;
private static KsqlRestApplication restApplication;
private static String serverAddress;
+ ... | [RestApiTest->[startRestServer->[start,DummyVersionCheckerAgent]]] | Sets up the class. | mocks should never be `static`. For this 'single use' mock I'd just create it inline in `startRestServer`. |
@@ -160,15 +160,10 @@ func bulkEncode(metaBuilder MetaBuilder, body []interface{}) bytes.Buffer {
return buf
}
-func readBulkResult(obj []byte) (*BulkResult, error) {
+func readBulkResult(obj []byte) (BulkResult, error) {
if obj == nil {
- return nil, nil
+ return BulkResult{}, nil
}
- var result BulkResul... | [sendBulkRequest->[execRequest,Debug],Flush->[sendBulkRequest,Debug,Truncate,Len],BulkWith->[sendBulkRequest,Len,Debug],Bulk->[BulkWith],Send->[Encode,Truncate,Len],startBulkRequest->[NewEncoder],NewEncoder,Unmarshal,Len,Truncate,Encode] | readBulkResult - reads bulk result object from JSON. | It looks like this `if` could be dropped since the effective return object will be the same in both cases. |
@@ -276,8 +276,12 @@ class ManualAdvancement extends AdvancementConfig {
// TODO(newmuis): This will need to be flipped for RTL.
const elRect = this.element_./*OK*/getBoundingClientRect();
- const offsetLeft = elRect.x;
+
+ // Using `left` as a fallback since Safari returns a ClientRect in some
+ /... | [No CFG could be retrieved] | Determines if a click should be performed for navigation and if so performs a time based advancement The constructor for a window object. | Perhaps check `== null` instead to avoid triggering fallback on `x == 0`. |
@@ -21,13 +21,13 @@ class {package_name}Conan(ConanFile):
generators = "cmake"
def source(self):
- self.run("git clone https://github.com/memsharded/hello.git")
- self.run("cd hello && git checkout static_shared")
+ self.run("git clone https://github.com/conan-io/hello.git")
+ se... | [cmd_new->[ci_get_files,split,tokens,ConanException,sub,update,len,ConanFileReference,format,compile]] | Create a package with a single tag. Package information for a specific . | useless ``cd hello`` |
@@ -78,10 +78,12 @@ func (cfg *LifecyclerConfig) RegisterFlagsWithPrefix(prefix string, f *flag.Flag
f.IntVar(&cfg.NumTokens, prefix+"num-tokens", 128, "Number of tokens for each ingester.")
f.DurationVar(&cfg.HeartbeatPeriod, prefix+"heartbeat-period", 5*time.Second, "Period at which to heartbeat to consul.")
f.... | [ClaimTokensFor->[setTokens],loop->[GetState],changeState->[updateConsul,setState,GetState],autoJoin->[setTokens,setState,GetState],initRing->[setTokens,setState,GetState],updateConsul->[getTokens,GetState],RegisterFlagsWithPrefix->[RegisterFlagsWithPrefix]] | RegisterFlagsWithPrefix registers flags that are specific to the lifecycler. seqno - config - var - config - consul - server - lifecycle - client - id. | - `token-file-dir` > `tokens-file-dir` - I would also suggest `Directory in which the token file is to be stored.` > `Directory in which the tokens file is stored. If empty, tokens are not stored at shutdown and restored at startup.` |
@@ -744,6 +744,8 @@ public class ConfigurationKeys {
* Hive registration properties
*/
public static final String HIVE_REGISTRATION_POLICY = "hive.registration.policy";
+ // Set to true if hive registration is done in taskStateTracker on task commit.
+ public static final String PIPELINED_HIVE_REGISTRATION... | [ConfigurationKeys->[name,toString,toMillis]] | region Private methods This class defines the configuration properties that are related to Flows and Flows. | Remove this option. I think it is clearer if setting TASK_STATE_COLLECTOR_HANDLER_CLASS means a handler is being used. Also, in the future there may be other handler types. |
@@ -47,13 +47,12 @@ public class PlayerChatRenderer extends DefaultListCellRenderer {
final Set<String> players = m_playerMap.get(value.toString());
if (players != null && !players.isEmpty()) {
sb.append(" (");
- final Iterator<String> iter = players.iterator();
- while (iter.hasNex... | [PlayerChatRenderer->[getListCellRendererComponent->[getListCellRendererComponent]]] | Override to add a missing icon or player to the list. | Use Guava Joiner instead, it'll be something like: `Joiner.on(",").join(players)` |
@@ -132,6 +132,11 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
return Role.VIRTUAL_ROUTER.toString();
}
+ public boolean shouldIncludeHealthCheckResults() {
+ return includeHealthCheckResults == null ? false : includeHealthCheckResults.booleanValue();
+ }
+... | [ListRoutersCmd->[getRole->[toString],execute->[setResponseObject,setResponseName,getCommandName,searchForRouters],getLogger,getName]] | get the command name. | This can be simplified to BooleanUtils.isTrue(includeHealthCheckResults) from the apache lang package |
@@ -306,8 +306,6 @@ def f_mway_rm(data, factor_levels, effects='all', alpha=0.05,
* ``'all'``: all effects (equals 'A*B' in a 2 way design)
If list, effect names are used: ``['A', 'B', 'A:B']``.
- alpha : float
- The significance threshold.
correction : bool
The correctio... | [f_mway_rm->[_map_effects,_iter_contrasts],f_threshold_mway_rm->[_map_effects,_iter_contrasts],_iter_contrasts->[_get_contrast_indices]] | Compute M - way repeated measures ANOVA for fully balanced designs. Iteratively compute the missing - free components. df1 df2 df3 pvalues. | you need to deprecate. So there is one release that will trigger a warning. Otherwise you take the risk of breaking someone's code. |
@@ -251,6 +251,7 @@ class HookManager
//dol_syslog("Call method ".$method." of class ".get_class($actionclassinstance).", module=".$module.", hooktype=".$hooktype, LOG_DEBUG);
$resaction = $actionclassinstance->$method($parameters, $object, $action, $this); // $object and $... | [No CFG could be retrieved] | Execute hooks for a given method This function is called by the _getlineprogress function. It will loop on each module This method is called when a hook is found in the action class. It will check if This method is called from the form - builder - builder - builder - builder - builder - finds a single action object by ... | If we call 3 hooks at same level, we want result of hook to be concatenated. For example 3 hooks, at same level, that add html content return into ->resprints And we want to concat the 3 into $resPrint so once the 3 pass into the loop of $actionclassinstance is finished, we have a ->resPrint that is complete. But here ... |
@@ -130,6 +130,11 @@ public class Sink implements Iterable<FireHydrant>
makeNewCurrIndex(interval.getStartMillis(), schema);
}
+ public void clearDedupCache()
+ {
+ dedupSet.clear();
+ }
+
public String getVersion()
{
return version;
| [Sink->[canAppendRow->[canAppendRow],getBytesInMemory->[getBytesInMemory],makeNewCurrIndex->[add],add->[add],isEmpty->[isEmpty],iterator->[iterator]]] | Returns the version of the node. | This method is called only by `RealTimePlumber`. When should this method be called? |
@@ -140,8 +140,11 @@ class MultiSelectAutocomplete extends Component {
<MultiSelectStateless
filterValue = { this.state.filterValue }
isDisabled = { isDisabled }
+ isLoading = { this.state.loading
+ && Boolean(this.stat... | [No CFG could be retrieved] | Renders the content of a single result item. This method is called when the user changes the filter value. | what's the check for filterValue here? if loading can be true without filterValue being truthy, doesn't that mean that isLoading should be true? if not, is it useful to have loading be true but it not actually be considered 'loading'? |
@@ -90,6 +90,9 @@ class Checkout(models.Model):
def __len__(self):
return self.lines.count()
+ def get_customer_email(self):
+ return self.user.email if self.user else self.email
+
def is_shipping_required(self):
"""Return `True` if any of the lines requires shipping."""
... | [Checkout->[get_shipping_price->[is_shipping_required],get_total->[get_shipping_price,get_subtotal],is_shipping_required->[is_shipping_required]],CheckoutLine->[is_shipping_required->[is_shipping_required]]] | Returns the number of items in the cart. | Do we really need this? Checkout is creating in API and forms. We should just confirm that `email` is always fulfilled. We could explicitly save it `checkout.save()`. |
@@ -580,7 +580,7 @@ public class DruidCoordinator
);
}
- final int startingLeaderCounter = leaderCounter;
+ startingLeaderCounter = leaderCounter;
for (final Pair<? extends CoordinatorRunnable, Duration> coordinatorRunnable : coordinatorRunnables) {
ScheduledExecu... | [DruidCoordinator->[moveSegment->[execute->[execute],execute],dropSegment->[dropSegment,execute],becomeLeader->[start,createNewLeaderLatch],enableDatasource->[enableDatasource],start->[start],getCurrentLeader->[isLeader],removeSegment->[removeSegment],CoordinatorRunnable->[run->[stopBeingLeader,run]],removeDatasource->... | Becomes the leader of the coordinators. I am a zombie but I ll be able to do this. | If a master starts runnables, then stops being leader, then starts being leader again (while the runnables are still running) this will not prevent the old, bad runnables from taking actions. The checks against startingLeaderCounter will see the new version of startingLeaderCounter and think they are okay. |
@@ -584,6 +584,12 @@ public class ReportLineageToAtlas extends AbstractReportingTask {
return;
}
+ final String nifiUserId = context.getProperty(NIFI_USER_ID).evaluateAttributeExpressions().getValue();
+ if (isEmpty(nifiUserId)) {
+ getLogger().warn("NiFi user id is empt... | [ReportLineageToAtlas->[customValidate->[parseAtlasUrls],initAtlasProperties->[parseAtlasUrls],getSupportedDynamicPropertyDescriptor->[getSupportedDynamicPropertyDescriptor],createNiFiAtlasClient->[parseAtlasUrls],onTrigger->[createNiFiAtlasClient]]] | Check if a node has a unique ID and if so create a NiFi type if we have a non - existing entity with the same id in the atlas we can t. | Is this for backward compatibility? Reason why I'm asking is, if we are making `NIFI_USER_ID.required(true)` and setting appropriate validator, is this check required? |
@@ -93,7 +93,10 @@ public abstract class AbstractOioByteChannel extends AbstractOioChannel {
allocHandle.readComplete();
pipeline.fireChannelReadComplete();
pipeline.fireExceptionCaught(cause);
- if (close || cause instanceof IOException) {
+
+ // If oom will close the read even... | [AbstractOioByteChannel->[doRead->[isInputShutdown,closeOnRead,handleReadException],closeOnRead->[shutdownInput],handleReadException->[closeOnRead]]] | Handles a read exception. This method is called when a buffer is available and there is no more room in the buffer. | This change doesn't seem to be related to this pr ... please revert |
@@ -255,6 +255,7 @@ public class AceEditor implements DocDisplay,
@Inject
public AceEditor()
{
+ id_ = StringUtil.makeRandomId(16);
widget_ = new AceEditorWidget();
snippets_ = new SnippetHelper(this);
editorEventListeners_ = new ArrayList<HandlerRegistration>();
| [AceEditor->[print->[PrintIFrame,getValue,getCode],setUseWrapMode->[setUseWrapMode],addCapturingKeyPressHandler->[addCapturingKeyPressHandler],scrollToBottom->[getCurrentLineCount],getPositionBounds->[getValue],indentPastedRange->[getValue],scrollToLine->[scrollToLine],setUseVimMode->[updateKeyboardHandlers],addCursorC... | Injects a single command to the Editor widget. onChange - Fold event. | Where is this used? |
@@ -262,9 +262,9 @@ class PexBinary(Target):
alias = "pex_binary"
core_fields = (
*COMMON_TARGET_FIELDS,
- InterpreterConstraintsField,
OutputPathField,
- PexBinarySources,
+ DeprecatedPexBinaryInterpreterConstraints,
+ DeprecatedPexBinarySources,
PexBina... | [PythonRequirementsField->[compute_value->[format_invalid_requirement_string_error]]] | A class to hold the values of the non - standard non - standard non - standard non A function to register a target with a test run. | It's not clear that the field classes needed to be renamed when they were deprecated, but seems harmless. |
@@ -106,6 +106,9 @@ public class StreamBufferingEncoder extends DecoratingHttp2ConnectionEncoder {
private final TreeMap<Integer, PendingStream> pendingStreams = new TreeMap<Integer, PendingStream>();
private int maxConcurrentStreams;
private boolean closed;
+ private Integer goAwayLastStreamId;
+ ... | [StreamBufferingEncoder->[remoteSettings->[remoteSettings],cancelGoAwayStreams->[close,Http2GoAwayException],HeadersFrame->[send->[writeHeaders]],writeRstStream->[writeRstStream],writeData->[writeData],tryCreatePendingStreams->[close],close->[Http2ChannelClosedException,close],writeHeaders->[Http2ChannelClosedException... | Exception that is thrown when a GOAWAY is received. Write a chain of headers. | This buffer needs to be released |
@@ -11,7 +11,7 @@
itemref="breadcrumb-<%=(i+1)%>"
<%-end%>>
<a href="<%=c[:url]%>" itemprop="url" class='badge-wrapper bullet'>
- <span class="badge-category-bg"></span>
+ <span class="badge-category-bg" style='background-color: #<%= c[:color] %>'></span>
<span itemprop="ti... | [No CFG could be retrieved] | Renders the content of the n - node node that is used to display a unique identifier. Renders a page with a page with a header that contains all the content of the post. | how is this going to work? where is the foreground? My call is not to even style this cause its just too annoying. |
@@ -1184,7 +1184,13 @@ def plot_tfr_topomap(tfr, tmin=None, tmax=None, fmin=None, fmax=None,
if not show_names:
names = None
- data = tfr.data
+ data = tfr.data[picks, :, :]
+
+ # merging grads before rescaling makes ERDs visible
+ if merge_grads:
+ from ..channels.layout import _merg... | [_init_anim->[set_values,_check_outlines,_hide_frame,_autoshrink,_GridData,_draw_outlines],plot_ica_components->[plot_ica_components,_check_outlines,_prepare_topo_plot,_add_colorbar,plot_topomap,_autoshrink],_plot_topomap->[set_locations,_check_outlines,_show_names,_GridData,_draw_outlines,_plot_sensors],plot_evoked_to... | Plot a topographic map of specific time - frequency intervals of TFR data. Plots a colorbar or a colorbar label if a specific channel type is missing. Plots a single key in the current figure. Plots a colorbar of the critical block. | Maybe this should actually be refactored into its own function, or `_merge_grad_data` amended, something like `data = _merge_grad_data(data, merge_grads)` which would just pass the data unprocessed if `merge_grads == False` |
@@ -38,6 +38,9 @@ public class ObjectToJsonTransformerParser extends AbstractTransformerParser {
if (StringUtils.hasText(objectMapper)) {
builder.addConstructorArgReference(objectMapper);
}
+ if (element.hasAttribute(MessageHeaders.CONTENT_TYPE)){
+ builder.addPropertyValue("contentType", element.getAttrib... | [ObjectToJsonTransformerParser->[parseTransformer->[getAttribute,addConstructorArgReference,hasText]]] | Parse the transformer. | Aren't you coupling runtime and schema attributes here? |
@@ -592,3 +592,9 @@ def closed_orders(billing_address):
orders.append(Order.objects.create(billing_address=billing_address))
return orders
+
+
+@pytest.fixture
+def variant_choice_field_form():
+ form = VariantChoiceField(Mock)
+ return form
| [size_attribute->[create],open_orders->[append,create,group_data],permission_edit_group->[get],admin_user->[create_superuser],permission_edit_shipping->[get],order_with_variant_from_different_stocks->[create,get,Decimal],order_with_lines_and_stock->[recalculate_order,create,refresh_from_db,Decimal],permission_edit_sale... | Get closed orders for a given billing address. | I think this doesn't have to be a fixture. We use fixtures mostly for reusable data needed in various tests. |
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include "crkbd.h"
+
+char host_led_state_str[24];
+
+const char *read_host_led_state(void)
+{
+ uint8_t leds = host_keyboard_leds();
+ snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
+ (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
+ ... | [No CFG could be retrieved] | No Summary Found. | I'm pretty sure this isn't a corne..... :D Also, I don't see these used in any keymap. All of these should be removed (except maybe the glcdfont.c file. |
@@ -47,6 +47,8 @@ require "support/gobierto_site_constraint_helpers"
require "support/asymmetric_encryptor_helpers"
require "support/site_config_helpers"
require "capybara/email"
+require "capybara/rails"
+require "capybara/minitest"
require "minitest/retry"
require "vcr"
require "mocha/mini_test"
| [with_hidden_elements->[ignore_hidden_elements],teardown->[reset_session!],default_driver?->[default_driver,current_driver],with_javascript->[default_driver,javascript_driver,reset_session!,current_driver],javascript_driver?->[javascript_driver,current_driver],GobiertoControllerTest->[require,include],setup->[default_d... | Add the application groups a. reset_session! reset_session! reset_session! reset_session!. | Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -1209,7 +1209,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc
for (AutoScaleVmGroupPolicyMapVO asVmgPmap : listMap) {
AutoScalePolicyVO policyVO = _asPolicyDao.findById(asVmgPmap.getPolicyId());
if (policyVO != null) {
- ... | [StatsCollector->[AutoScaleMonitor->[getPairofCounternameAndDuration->[toString],runInContext->[toString],getCounternamebyCondition->[toString],getAutoscaleAction->[toString]],init->[getInstance],createSearchCriteriaForHostTypeRoutingStateUpAndNotInMaintenance->[toString],retrieveExternalStatsPortFromUri->[toString],Ab... | This method returns the autoscale action for the given group id and currentVM. Checks if the average value is greater or equal to the threshold value. | The variable 'quitetime' is only assigned values of primitive type and is never 'null', but it is declared with the boxed type 'Integer'. |
@@ -212,6 +212,9 @@ class SubmissionCollector < ActiveRecord::Base
grouping.save
new_submission = Submission.create_by_revision_number(grouping, rev_num)
+ new_submission = apply_penalty_or_add_grace_credits(grouping,
+ apply_late_penalty,
+ ... | [SubmissionCollector->[collect_next_submission->[instance,remove_grouping_from_queue],start_collection_process->[instance],manually_collect_submission->[start_collection_process,remove_grouping_from_queue]]] | This method is called by the child process when it is able to collect a specific from. | Trailing whitespace detected. |
@@ -7,14 +7,15 @@ from satchless.item import InsufficientStock
def contains_unavailable_variants(cart):
try:
- [line.variant.check_quantity(line.quantity) for line in cart]
+ [line.variant.check_quantity(line.quantity)
+ for line in cart.lines.all()]
except InsufficientStock:
... | [check_product_availability_and_warn->[contains_unavailable_variants,remove_unavailable_variants],get_category_variants_and_prices->[get_product_variants_and_prices]] | Checks if the cart contains any unavailable variants. | Why are we using a list comprehension here instead of an explicit for loop? |
@@ -134,14 +134,12 @@ if ( ! file_exists( $robots_file ) ) {
}
}
else {
- $f = fopen( $robots_file, 'r' );
-
- $content = '';
- if ( filesize( $robots_file ) > 0 ) {
- $content = fread( $f, filesize( $robots_file ) );
+ $content = $wp_filesystem->get_contents( $robots_file );
+ if ( $content === false ) {
+ $cont... | [admin_header,admin_footer] | Creates a form with a hidden field that can be used to create a new file. Renders a form with a hidden field that can be used to edit the content of the robots. | Similar blocks of code found in 2 locations. Consider refactoring. |
@@ -44,4 +44,16 @@ class Raja(CMakePackage):
'-DENABLE_CUDA=On',
'-DCUDA_TOOLKIT_ROOT_DIR=%s' % (spec['cuda'].prefix)])
+ if '+targetopenmp' in spec:
+ options.extend([
+ '-DENABLE_TARGET_OPENMP=On'])
+
+ if '+tbb' in spec:
+ options... | [Raja->[cmake_args->[append,format,extend],variant,depends_on,version]] | Return a list of CMake command line options for the object. | Switch `extend([...])` to `append(...)`. Also, I would explicitly disable all of these in an else-clause. CMake likes to automatically enable things if it can find the dependencies, leading to non-deterministic builds. |
@@ -490,14 +490,14 @@ function $RootScopeProvider(){
// only track veryOldValue if the listener is asking for it
var trackVeryOldValue = (listener.length > 1);
var changeDetected = 0;
- var objGetter = $parse(obj);
+ var changeDetector = $parse(obj, $watchCollectionInterceptor);... | [No CFG could be retrieved] | Creates a function that will watch the object s properties and update the values of the object s check if the items in the array are not the same. | you no like whitespace? :) |
@@ -206,9 +206,9 @@ public class RemoveUnsupportedDynamicFilters
return combineConjuncts(metadata, extractResult.getStaticConjuncts());
}
- private Expression removeNestedDynamicFilters(Expression expression)
- {
- return ExpressionTreeRewriter.rewriteWith(new Expression... | [RemoveUnsupportedDynamicFilters->[Rewriter->[removeAllDynamicFilters->[combineConjuncts,extractDynamicFilters,removeNestedDynamicFilters,getStaticConjuncts,isEmpty],visitFilter->[removeAllDynamicFilters,getNode,PlanWithConsumedDynamicFilters,equals,build,FilterNode,getPredicate,removeDynamicFilters,getConsumedDynamicF... | Removes all nested dynamic filters from the given expression and returns the rewritten expression. | Unrelated formatting change |
@@ -27,7 +27,7 @@ import javax.annotation.Nullable;
import java.util.Objects;
// logical operators live here
-
+@SuppressWarnings("ClassName")
class BinLtExpr extends BinaryEvalOpExprBase
{
BinLtExpr(String op, Expr left, Expr right)
| [BinGtExpr->[canVectorize->[canVectorize],copy->[BinGtExpr],getOutputType->[getOutputType]],BinOrExpr->[eval->[eval],copy->[BinOrExpr]],BinEqExpr->[canVectorize->[canVectorize],copy->[BinEqExpr],getOutputType->[getOutputType]],BinAndExpr->[eval->[eval],copy->[BinAndExpr]],BinGeqExpr->[canVectorize->[canVectorize],copy-... | Creates an object that represents the minimum value of a logical expression. Replies the type of the that can be used to create an expression. | I guess the issue is there's no public class BinaryLogicalOperatorExpr? I suppose that's strange, but fine. |
@@ -69,14 +69,15 @@ type ImageC struct {
}
// NewImageC returns a new instance of ImageC
-func NewImageC(options Options, strfmtr *streamformatter.StreamFormatter, getArchiveReader GetArchiveReader) *ImageC {
+func NewImageC(options Options, strfmtr *streamformatter.StreamFormatter, proxy proxy.VicArchiveProxy) *Im... | [CreateImageConfig->[String],prepareTransfer->[ParseReference],dockerImageFromVicImage->[String],PullImage->[LayersToDownload],PrepareManifestAndLayers->[String],WriteImageBlob->[String],Close->[Close],ListLayers->[LayersToDownload],String] | NewImageC creates a new instance of ImageC with the given options. Get the image of a single sequence number. | Is this variable used for the sanity check of layer tars when running imagec in standalone mode? Should it be false by default? Will you have another PR to add this variable as a flag option in `cmd/imagec`? |
@@ -54,6 +54,11 @@ LIVE_CHECKPOINT_SCRIPT = dedent(
@pytest.fixture
def live_stage(tmp_dir, scm, dvc):
+ try:
+ import dvclive # noqa, pylint:disable=unused-import
+ except ImportError:
+ pytest.skip("no dvclive")
+
def make(summary=True, html=True, live=None, live_no_cache=None):
... | [test_live_provides_metrics->[live_stage],test_live_html->[live_stage],test_live_provides_no_metrics->[live_stage],test_live_checkpoints_resume->[checkpoints_metric,live_checkpoint_stage],test_experiments_track_summary->[live_stage],test_export_config->[live_stage]] | A context manager for the live stage of the DVC. | Need to consider not using dvclive in the dvc func tests here or creating separate integration tests for dvclive. |
@@ -138,7 +138,7 @@ class Exchange(object):
# Find matching class for the given exchange name
name = exchange_config['name']
- if name not in ccxt_module.exchanges:
+ if not is_exchange_supported(name, ccxt_module):
raise OperationalException(f'Exchange {name} is not suppo... | [retrier->[wrapper->[wrapper]],Exchange->[cancel_order->[cancel_order],get_trades_for_order->[exchange_has],create_order->[symbol_amount_prec,symbol_price_prec,create_order],buy->[create_order,dry_run_order],sell->[create_order,dry_run_order],_load_markets->[_load_async_markets],stoploss_limit->[symbol_price_prec,creat... | Initialize a new instance of the Cxt API with the given config. | I don't think passing in ccxt_module makes too much sense. i see that it's been there before - however ccxt supports the same exchanges in sync and async mode - so it either fails for both - or succeeds for both possible types of ccxt_module |
@@ -631,7 +631,7 @@ fake_function() {
gettext("Server side occlusion culling");
gettext("If enabled the server will perform map block occlusion culling based on\non the eye position of the player. This can reduce the number of blocks\nsent to the client 50-80%. The client will not longer receive most invisible\nso ... | [ gettext->[gettext]] | A fake gettext function that can be used to translate messages. Safe gettext. A translation for the user s keys. A command has a plural message for each of the various commands. Get the translation strings for the menu items. | This may be in a 2nd PR, about storing textures. |
@@ -511,7 +511,9 @@ class WriteToAvro(beam.transforms.PTransform):
end in a common extension, if given by file_name_suffix. In most cases,
only this argument is specified and num_shards, shard_name_template, and
file_name_suffix use default values.
- schema: The schema to use, as returne... | [WriteToAvro->[__init__->[_use_fastavro]],_FastAvroSource->[read_records->[advance_file_past_next_sync_marker]],_create_avro_source->[_use_fastavro],_AvroSource->[read_records->[size,records,advance_file_past_next_sync_marker,read_block_from_file,offset,read_meta_data_from_file]],ReadAllFromAvro->[__init__->[_use_fasta... | Initialize a WriteToAvro transform object. _name_suffix _num_shards _shard_name_template _mime_type. | Does fastavro support a more structured definition for schemas or does is have to be a dict ? |
@@ -205,6 +205,16 @@ def argmin_v2(input,
Returns:
A `Tensor` of type `output_type`.
+
+ Usage:
+ ```python
+ import tensorflow as tf
+ a = [1, 10, 26.9, 2.8, 166.32, 62.3]
+ b = tf.math.argmin(input = a)
+ c = tf.keras.backend.eval(b)
+ # c = 0
+ # here a[0] = 1 which is the smallest element of a acro... | [reduce_max->[_may_reduce_to_scalar,_ReductionDims],to_double->[cast],reduce_sum->[_may_reduce_to_scalar,_ReductionDims],scalar_mul_v2->[scalar_mul],_ReductionDims->[range],reduce_std->[reduce_variance],reduce_all->[_may_reduce_to_scalar,_ReductionDims],accumulate_n->[add_n,_input_error],truediv->[_truediv_python3],to_... | Returns the index with the smallest value across axes of a tensor. | This line should start on the same column as `:` above |
@@ -226,7 +226,7 @@ module.exports = class bitflyer extends Exchange {
'baseVolume': this.safeNumber (ticker, 'volume_by_product'),
'quoteVolume': undefined,
'info': ticker,
- };
+ });
}
async fetchTicker (symbol, params = {}) {
| [No CFG could be retrieved] | Get a list of orders by symbol id. This function returns an object that represents a sequence of conditions that can be met in a specific. | Same story here, let's propagate the `market` (everywhere in all exchanges). |
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
-"""Keras data preprocessing utils."""
+"""Provides keras data preprocessing utils to pre-process tf.data.Datasets ... | [set_keras_submodules] | Function to create a Keras object from a tensorflow object. | Is this intended to be used with tf.data.Dataset? IIUC it should be the layers under tensorflow/python/keras/layers/preprocessing |
@@ -264,7 +264,6 @@ func apmMiddleware(m map[request.ResultID]*monitoring.Int) []middleware.Middlewa
middleware.TimeoutMiddleware(),
middleware.RecoverPanicMiddleware(),
middleware.MonitoringMiddleware(m),
- middleware.RequestTimeMiddleware(),
}
}
| [firehoseHandler->[Wrap,Handler],profileHandler->[Wrap,Handler],backendIntakeHandler->[Wrap,Handler,BackendProcessor],rumIntakeHandler->[Wrap,Compile,Handler],rootHandler->[Wrap,Handler],Handle,HandlerFunc,TimeoutMiddleware,RequestTimeMiddleware,ResponseHeadersMiddleware,rumIntakeHandler,Wrap,handlerFn,NewHandler,CORSM... | MiddlewareFunc returns a middleware. Middleware that can be used to handle requests to the APM Middleware - A function to register middleware for the response. | Were we resorting to this middleware because previously the APMEvent didn't have a timestamp we could rely on for the timings? |
@@ -2332,13 +2332,11 @@ public abstract class SSLEngineTest {
encryptedClientToServer.flip();
assertEquals(SSLEngineResult.Status.CLOSED, result.getStatus());
+ SSLEngineResult.HandshakeStatus hs = result.getHandshakeStatus();
// Need an UNWRAP to read the response of... | [SSLEngineTest->[clientInitiatedRenegotiationWithFatalAlertDoesNotInfiniteLoopServer->[initChannel->[userEventTriggered->[],TestByteBufAllocator]],MessageDelegatorChannelHandler->[channelRead0->[messageReceived]],writeAndVerifyReceived->[messageReceived],testBeginHandshakeAfterEngineClosed->[cleanupClientSslEngine],tes... | This test tests the close_notify sequence. This method checks if the result is a valid handshake result. This method is called when the client and server side side have been closed. | This line can also use the extracted `hs` variable. |
@@ -4,6 +4,4 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
-from .v2_0.models import *
-from .v2_1.models import *
-from .v3_0_preview_1.models import *
+from .v2021_09_30_preview.models... | [No CFG could be retrieved] | License for the specified node. | I know this is the generated code, but is it right for these to be removed? |
@@ -40,6 +40,16 @@ def setup_parser(subparser):
create_parser.add_argument(
'specs', nargs=argparse.REMAINDER,
help="specs of packages to put in mirror")
+ create_parser.add_argument(
+ '-a', '--all', action='store_true',
+ help="mirror all versions of all packages in Spack, or a... | [mirror_create->[create,colify,msg,_read_specs_from_file,die,set,get_env,values,list,error,sort,concretize,all_package_names,len,Spec,format,traverse,now,parse_specs,isdir,cformat,disable_compiler_existence_check,add,exit],mirror_remove->[die,msg,pop,get,set,syaml_dict],_read_specs_from_file->[die,debug,append,enumerat... | Setup the parsers for the mirror command. Adds an argument to the list parser to read a lease. | shouldn't `--all` be mutually exclusive from the other, spec/file-oriented arguments? |
@@ -91,6 +91,7 @@ var sliceServiceNames = []string{
}
var mapServiceNames = []string{
+ "accessanalyzer",
"amplify",
"apigateway",
"apigatewayv2",
| [Strings,Write,Create,Execute,New,Close,Source,Parse,Fatalf,Funcs,Bytes] | This function is exported to the user. Reads the template and executes it. | This service supports updating tags via the `TagResource` and `UntagResource` API calls, which means it can be added to `aws/internal/keyvaluetags/generators/updatetags/main.go` as well for completeness. Will add its service entry and generate the new update function on merge. |
@@ -106,7 +106,7 @@ def submit_file(addon_pk, upload_pk, channel):
@transaction.atomic
-def create_version_for_upload(addon, upload, channel):
+def create_version_for_upload(addon, upload, channel, parsed_data=None):
fileupload_exists = addon.fileupload_set.filter(
created__gt=upload.created, version... | [recreate_previews->[_recreate_images_for_preview],validate_and_submit->[validate]] | Create a version for a given add - on and upload. | I forgot we have this complicated non-task in tasks.py ... should it be move to devhub/utils.py? |
@@ -318,11 +318,6 @@ class SingleFileExecutable:
self.directory_digest = snapshot.directory_digest
-@dataclass(frozen=True)
-class ExpandedArchive:
- digest: Digest
-
-
@dataclass(frozen=True)
class SourcesSnapshot:
"""Sources matched by command line specs, either directly via FilesystemSpecs or ... | [Workspace->[materialize_directories->[materialize_directories],materialize_directory->[materialize_directory]],SingleFileExecutable->[_raise_validation_error->[ValidationError],__init__->[_raise_validation_error]],Digest->[load->[_path,Digest],dump->[_path],clear->[_path]],Snapshot,Digest] | A class constructor for a single - file or directory - based . All the possible root rules for the n - tuple. | This snuck into a previous change by mistake, and isn't needed. |
@@ -212,7 +212,7 @@ def main():
try:
start_time = timeit.default_timer()
subprocess.check_output(fixed_args + dev_arg + case_args,
- stderr=subprocess.STDOUT, universal_newlines=True)
+ ... | [main->[option_to_args->[resolve_arg],collect_result,option_to_args,temp_dir_as_path,prepare_models,parse_args],parse_args->[parse_args],main] | Entry point for the missing - nag - sequence command. Check if a missing key is found in the model_info. Exit if there is no n - ary case in the device. | FWIW, this should be unnecessary once I fix the CI environment (my MR is on review). |
@@ -41,14 +41,9 @@ define([
}
function decodeQuantizedDracoTypedArray(dracoGeometry, attribute, quantization, vertexArrayLength) {
- var vertexArray;
- var attributeData = new draco.DracoInt32Array();
- if (quantization.octEncoded) {
- vertexArray = new Int16Array(vertexArray... | [No CFG could be retrieved] | Decode index array read all of the attributes. | While working on `decodeDracoPointCloud` I realized my suggestion to use `Int16Array` for oct-encoded attributes was incorrect, so I fixed it here as well. |
@@ -0,0 +1,14 @@
+module.exports = {
+ "parser": "babel-eslint",
+ "plugins": [
+ "flowtype"
+ ],
+ "extends": [
+ "airbnb",
+ "plugin:flowtype/recommended"
+ ],
+ rules: {
+ "react/jsx-filename-extension": 0,
+ "import/no-extraneous-dependencies": 0
+ }
+};
| [No CFG could be retrieved] | No Summary Found. | we probably should use `eslint-config-uber-universal-stage-3` instead |
@@ -353,10 +353,10 @@ void MortarContactCondition<TDim, TNumNodes, TFrictional, TNormalVariation, TNum
const bool dual_LM = DerivativesUtilitiesType::CalculateAeAndDeltaAe(r_slave_geometry, r_normal_slave, r_master_geometry, derivative_data, general_variables, consider_normal_variation, conditions_points_sl... | [No CFG could be retrieved] | This function is called when a master element is detected. This method is used to integrate the mortar operators. | This is just a minor optimization |
@@ -102,6 +102,8 @@ namespace Microsoft.Xna.Framework {
/// This event is only supported on the Windows DirectX, Windows OpenGL and Linux platforms.
/// </remarks>
public event EventHandler<TextInputEventArgs> TextInput;
+
+ public bool IsTextInputHandled { get { return TextInput != null; } }
#endif
... | [GameWindow->[EndScreenDeviceChange->[EndScreenDeviceChange]]] | This abstract method is called when the user enters a full screen. | Shouldn't this be internal? |
@@ -324,7 +324,9 @@ export class AmpAutocomplete extends AMP.BaseElement {
this.minChars_ = this.element.hasAttribute('min-characters')
? parseInt(this.element.getAttribute('min-characters'), 10)
: 1;
- this.maxEntries_ = this.element.hasAttribute('max-entries')
+ this.maxItems_ = this.element.... | [No CFG could be retrieved] | Reads the given configuration attributes and creates a container element. Replies the form element of the given element if any. | Wrap the entire ternary in a `parseInt`? `max-entries` needs to be parsed as well. |
@@ -2115,8 +2115,10 @@ class MixedSourceEstimate(_BaseSourceEstimate):
a tuple with two arrays: "kernel" shape (n_vertices, n_sensors) and
"sens_data" shape (n_sensors, n_times). In this case, the source
space data corresponds to "numpy.dot(kernel, sens_data)".
- vertices : list of array
-... | [SourceEstimate->[estimate_snr->[copy,sum],center_of_mass->[_center_of_mass,sum],save->[_write_stc,_write_w],extract_label_time_course->[extract_label_time_course]],_make_stc->[guess_src_type->[_get_src_type],guess_src_type],_BaseSourceEstimate->[__imul__->[_verify_source_estimate_compat,_remove_kernel_sens_data_],__ne... | Returns the center of mass of the cluster. The hemisphere is the center of mass of the other hemisphere. | I don't think this is correct for a MixedSourceEstimate |
@@ -70,4 +70,18 @@ var _ = g.Describe("[Feature:Platform] OLM should", func() {
}
})
}
+
+ // OCP-24061 - [bz 1685230] OLM operator should use imagePullPolicy: IfNotPresent
+ g.It("have imagePullPolicy:IfNotPresent on thier deployments", func() {
+ var deploymentResource = [3]string{"catalog-operator", "olm-o... | [ContainSubstring,Describe,Equal,Output,NewCLI,Args,Sprintf,AsAdmin,Expect,HaveOccurred,To,GinkgoRecover,It,Run,KubeConfigPath,NotTo] | } ) ; }. | Actually, the same `imagePullPolicy` setting for all of the 2nd(Managed by CVO) operators. It would be great if you can automate it for all other components in one automation case. Anyway, for this automation case, it looks good to me. |
@@ -5,8 +5,12 @@
package application
import (
+ "sync"
"time"
+ "github.com/pkg/errors"
+
+ "github.com/elastic/beats/libbeat/common/backoff"
"github.com/elastic/beats/x-pack/agent/pkg/core/logger"
"github.com/elastic/beats/x-pack/agent/pkg/fleetapi"
"github.com/elastic/beats/x-pack/agent/pkg/scheduler"
| [Start->[worker],worker->[Error,Debug,WaitTick,Dispatch,execute],Stop->[Stop],execute->[Events,NewCheckinCmd,Execute],NewPeriodicJitter] | EC2 - related functions er creates a new instance of the gateway. | can you use custom errors package and do a `errors.TypeNetwork` type with `errors.M(errors.MetaKeyURI, "URI")`? |
@@ -632,9 +632,9 @@ func (b *Builder) execChangePeerV2(needEnter bool, needTransferLeader bool) {
var stateFilter = filter.StoreStateFilter{ActionScope: "operator-builder", TransferLeader: true}
-// check if the peer has the ability to become a leader.
-func (b *Builder) hasAbilityLeader(peer *metapb.Peer) bool {
... | [planRemovePeer->[allowLeader],planReplaceLeaders->[allowLeader],planAddPeer->[allowLeader],comparePlan->[Empty],Copy->[Set],execChangePeerV2->[execTransferLeader],planDemotePeer->[allowLeader],peerPlan->[Empty],planPreferReplaceByNearest->[labelMatch]] | hasAbilityLeader returns true if the given peer is a leader of the cluster. | Is there a better name for `ignoreClusterLimit`? |
@@ -29,7 +29,7 @@ eeg_map = mne.sensitivity_map(fwd, ch_type='eeg', mode='fixed')
# Show gain matrix a.k.a. leadfield matrix with sensitivity map
import matplotlib.pyplot as plt
-plt.matshow(leadfield[:, :500])
+plt.matshow(leadfield[:, :500], cmap='RdBu_r')
plt.xlabel('sources')
plt.ylabel('sensors')
plt.title(... | [matshow,hist,show,dict,print,read_forward_solution,plot,data_path,legend,title,ylabel,sensitivity_map,xlabel,figure,ravel] | Plot the gradient of the leadfield matrix with sensitivity map. | Did you mean to include these tweaks in this PR? It's fine to have them, just want to make sure you meant to... |
@@ -1188,8 +1188,12 @@ void modify_roi_in (struct dt_iop_module_t *module,
distort_paths_raw_to_piece (module, piece->pipe, roi_in->scale, ©_params);
- cairo_rectangle_int_t pipe_rect
- = { 0, 0, piece->buf_in.width * roi_in->scale, piece->buf_in.height * roi_in->scale };
+ cairo_rectangle_int_t pipe_... | [No CFG could be retrieved] | Modify the input and output regions. region of all paths. | Makes sense, but maybe `lround()` since we want an integer. |
@@ -447,10 +447,10 @@ function $SceDelegateProvider() {
* ```
*
* Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE
- * disabled, this application allows the user to render arbitrary HTML into the DIV.
- * In a more realistic example, one may be rendering user comments, blog arti... | [No CFG could be retrieved] | A simple example of how to ensure that a value is not allowed to be used in a This is a helper method that can be used to specify the directory where the files are stored. | maybe `XSS security bug` or `XSS security hole in your application`? Users might not know what this means, being explicit might make them look it up. |
@@ -39,6 +39,8 @@ module Engine
# Two lays or one upgrade, second tile costs 20
TILE_LAYS = [{ lay: true, upgrade: true }, { lay: :not_if_upgraded, upgrade: false, cost: 20 }].freeze
+ PREPRINT_COLOR_ON_BORDER = %w[F12].freeze
+
def stock_round
Round::Stock.new(self, [
St... | [G1882->[init_train_handler->[find,size,events,each,last,name,delete],setup->[new,name,find,add_ability],action_processed->[reject!,id,closed?,corporation?],stock_round->[new],operating_round->[new],init_company_abilities->[par_via_exchange,corporation,corporation_by_id,include?,each,abilities],event_nwr!->[clear_graph... | Returns a new instance of the stock class for the given node if it is a . | Could this auto-calculate the preprinted tiles as part of the base class? |
@@ -126,7 +126,9 @@ namespace NServiceBus
eventAggregator,
criticalError,
settings.ErrorQueueAddress(),
- hostingComponent);
+ hostingComponent,
+ pipelineSettings,
+ containerComponent.ContainerConfiguration)... | [EndpointCreator->[ReceiveConfiguration->[Build,Set],StartableEndpointWithExternallyManagedContainer->[Value,FinalizeConfiguration,Initialize,ConfigureComponent,ContainerComponent,InitializeWithExternallyManagedContainer,Settings,SingleInstance],RegisterCriticalErrorHandler->[RegisterSingleton,TryGet],FinalizeConfigura... | Initializes the components. Initialize the configuration. | We usually pass the whole component but I see nothing wrong with just passing the container config |
@@ -199,6 +199,12 @@ public final class OmBucketArgs extends WithMetadata implements Auditable {
return this;
}
+ public Builder setDefaultReplicationCOnfig(
+ DefaultReplicationConfig defaultRepConfig) {
+ this.defaultReplicationConfig = defaultRepConfig;
+ return this;
+ }
+
... | [OmBucketArgs->[getFromProtobuf->[getBucketName,getFromProtobuf,getStorageType,getQuotaInNamespace,getIsVersionEnabled,getQuotaInBytes,getVolumeName,OmBucketArgs],Builder->[build->[OmBucketArgs]],getProtobuf->[setBucketName,newBuilder,build,setQuotaInBytes,setQuotaInNamespace,setStorageType,setIsVersionEnabled]]] | Sets the quota in namespace. | Ah, this is where the new method is defined I mentioned above. Typo in the method name COnfig -> Config. |
@@ -15,8 +15,11 @@ return array(
'groups:delete' => 'Delete group',
'groups:membershiprequests' => 'Manage join requests',
'groups:membershiprequests:pending' => 'Manage join requests (%s)',
+ 'groups:invitedmembers' => "Manage invitations",
'groups:invitations' => 'Group invitations',
'groups:invitations:pen... | [No CFG could be retrieved] | Menu items and titles Group management. | we hardly/never use numbered variables... should we do this? |
@@ -288,12 +288,11 @@ def load_agent_module(opt):
del new_opt['batchindex']
# only override opts specified in 'override' dict
if opt.get('override'):
- for k in opt['override']:
- v = opt[k]
- if str(v) != str(str(new_opt.get(k, None))):
- ... | [_create_task_agents->[create_task_agent_from_taskname,create_agent],create_agents_from_shared->[create_agent_from_shared],MultiTaskTeacher->[share->[share],shutdown->[shutdown],reset->[reset],reset_metrics->[reset_metrics],num_examples->[num_examples],num_episodes->[num_episodes],save->[save],epoch_done->[epoch_done]]... | Load the module that implements the object. | you don't need to convert that last new_opt.get(k, None) to a str? and anyway you could also do this once... |
@@ -42,6 +42,15 @@ public class DnsEntry {
this.name = name;
this.type = type;
this.dnsClass = dnsClass;
+ this.timeToLive = timeToLive;
+ }
+
+ /**
+ * Number of seconds that a cache may retain this record
+ * @return A number of seconds for which this entry may be treat... | [DnsEntry->[hashCode->[hashCode],toString->[toString],equals->[name,equals]]] | Creates a class representing a resource record in a DNS packet. Replies if the given object is an instance of the class. | missing '.' at end of line |
@@ -172,9 +172,9 @@ def goto_entry_block(builder):
yield
-def alloca_once(builder, ty, name=''):
+def alloca_once(builder, ty, size=None, name=''):
with goto_entry_block(builder):
- return builder.alloca(ty, name=name)
+ return builder.alloca(ty, size=size, name=name)
def terminate(... | [for_range_slice->[append_basic_block,terminate,goto_block],if_likely->[set_branch_weight],if_unlikely->[set_branch_weight],ifelse->[append_basic_block,set_branch_weight],is_not_null->[get_null_value],ifthen->[append_basic_block,terminate,goto_block],IfBranchObj->[__exit__->[terminate]],get_strides_from_slice->[unpack_... | Allocate a node only once. | Can you add a docstring to this? It's worth explaining what happens when `size` is None and when it is not. |
@@ -384,6 +384,11 @@ def read_forward_solution(fname, force_fixed=False, surf_ori=False,
The forward solution.
"""
+ if not fname.endswith(('-fwd.fif', '-fwd.fif.gz')):
+ warnings.warn('This filename does not conform to mne naming convention'
+ 's. All projection files sho... | [compute_depth_prior->[_restrict_gain_matrix],restrict_forward_to_label->[is_fixed_orient],_apply_forward->[is_fixed_orient,_stc_src_sel],do_forward_solution->[read_forward_solution],apply_forward_raw->[_fill_measurement_info,_apply_forward],apply_forward->[_fill_measurement_info,_apply_forward],compute_orient_prior->[... | Read a forward solution from a. k. a. lead file. Read the next N - th tag in the FITS file. Transform the source spaces to the correct coordinate frame. Returns a list of all the channels in the order of the last in src. | forward files :) |
@@ -83,7 +83,11 @@ public class CodeSearchOracle extends SuggestOracle
result += matchPos;
}
- // Debug.logToConsole("Score for suggestion '" + suggestion + "' against query '" + query + "': " + result);
+ // Penalize file targets
+ if (suggestion.isFileTarget())
+ result... | [CodeSearchOracle->[CodeSearchCommand->[performAction->[onResponseReceived->[compare->[score]]]],clear->[clear],CodeSearchCommand]] | Score for a given suggestion against a given query. suggestions are the suggestions for the query and the suggestions for the server. | Let's not check in the debug output |
@@ -31,12 +31,9 @@ def details(request, token):
orders = orders.select_related(
'billing_address', 'shipping_address', 'user')
order = get_object_or_404(orders, token=token)
- notes = order.notes.filter(is_public=True)
- ctx = {'order': order, 'notes': notes}
- if order.is_open():
- u... | [checkout_success->[authenticate,PasswordForm,save,attach_order_to_user,get,update,redirect,copy,login,filter,LoginForm,is_valid,TemplateResponse,get_object_or_404],connect_order_with_user->[pgettext_lazy,attach_order_to_user,get,redirect,success,warning],payment_success->[reverse,redirect],payment->[all,is_fully_paid,... | Show a list of orders and notes. | What about we set `note_form` to `None` and then, we move `ctx = {...}` at the end and add everything we need to the context to save some useless instructions? ```python def details(request, token): note_form = None orders = Order.objects.confirmed().prefetch_related( 'lines__variant', 'fulfillments', 'fulfillments__li... |
@@ -867,6 +867,10 @@ func (e *Identify2WithUID) runIdentifyUI(m libkb.MetaContext) (err error) {
_, err = e.state.Result().GetErrorLax()
}
+ if outcome.IsOK() {
+ e.maybeNotify(m, "runIdentifyUI complete IsOk")
+ }
+
return err
}
| [isSelfLoad->[Equal],checkLocalAssertions->[BaseProofSet,GetName],FullThemUser->[Full],Result->[exportToResult],loadUsers->[loadThem,Equal,loadMe],loadThem->[loadUserOpts,GetStatus],storeSlowCacheToDB->[getNow,dbKey,GetUID],GetStatus->[GetStatus],checkRemoteAssertions->[GetName],dbKey->[GetUID],runReturnError->[untrack... | runIdentifyUI runs the IdentifyUI. Identify is called from the UI thread and is called from the UI thread. Checks if the command is a remote check. | I don't really understand what's behind this. Why `TrackStatus_NEW_FAIL_PROOFS` isn't considered IsOk. But I tried a bunch of stuff and this seems like the behavior that is desired. The ideal is to find a condition that means that the state of their identity satisfies your tracking of them, or that you don't track them... |
@@ -447,6 +447,16 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
isTrafficEligible: () => true,
branches: Object.values(PTT_EXP_BRANCHES),
},
+ {
+ experimentId: IDLE_CWV_EXP,
+ isTrafficEligible: () => () => {
+ return (
+ !!this.performance... | [AmpAdNetworkDoubleclickImpl->[postTroubleshootMessage->[dict,stringify,now,devAssert,userAgent],extractSize->[height,extractAmpAnalyticsConfig,dev,get,width],getBlockParameters_->[height,getFlexibleAdSlotData,isInManualExperiment,serializeTargeting,devAssert,googleBlockParameters,width],constructor->[user,extensionsFo... | Sets the page - level experiments. add a node to the list of possible errors. | is this intended to be a nested function? |
@@ -23,9 +23,10 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+from spack.build_systems.cuda import CudaPackage
-class Relion(CMakePackage):
+class Relion(CMakePackage, CudaPackage):
... | [Relion->[variant,conflicts,depends_on,version]] | This file is part of Spack. - - - - - - - - - - - - - - - - - -. | If you rebase off of develop, you can remove this line now that #6746 has been merged. |
@@ -76,8 +76,12 @@ class MailchimpBot
return false unless user.tag_moderator?
success = false
- tags = user.roles.where(name: "tag_moderator").map { |tag| Tag.find(tag.resource_id).name }
+
+ tag_ids = user.roles.where(name: "tag_moderator").pluck(:resource_id)
+ tag_names = Tag.where(id: tag_ids).... | [MailchimpBot->[upsert_to_newsletter->[upsert],manage_community_moderator_list->[upsert],target_md5_email->[md5_email],manage_tag_moderator_list->[upsert]]] | check if user has a tag moderator list in gibbon. | instead of loading roles and tag objects, we only load arrays |
@@ -0,0 +1,15 @@
+using Robust.Shared.Analyzers;
+using Robust.Shared.GameObjects;
+using Robust.Shared.Serialization.Manager.Attributes;
+
+namespace Content.Server.Flash.Components
+{
+ [RegisterComponent, Friend(typeof(FlashSystem))]
+ public class FlashImmunityComponent : Component
+ {
+ public over... | [No CFG could be retrieved] | No Summary Found. | VV too IMO. |
@@ -538,7 +538,7 @@ class NioBuffer extends AdaptableBuffer<NioBuffer> implements ReadableComponent,
woff += 2;
return this;
} catch (IndexOutOfBoundsException e) {
- throw checkWriteState(e, woff);
+ throw checkWriteState(e, woff, 2);
} catch (ReadOnlyB... | [NioBuffer->[writableBuffer->[writerOffset],getUnsignedInt->[getInt],getLong->[getLong],outOfBounds->[capacity],getInt->[getInt],readUnsignedInt->[getInt],openReverseCursor->[capacity],getDouble->[getDouble],getChar->[getChar],copy->[writerOffset,NioBuffer],capacity->[capacity],getUnsignedShort->[getShort],newConstChil... | Writes a char to the buffer. | sad that there is no `Character.BYTES`. We could use `Character.SIZE / 2` but this doesn't sound better |
@@ -900,6 +900,7 @@ public class DruidCoordinator
);
}
+ log.info("Duties group %s starting", dutiesRunnableAlias);
for (CoordinatorDuty duty : duties) {
// Don't read state and run state in the same duty otherwise racy conditions may exist
if (!coordinationPa... | [DruidCoordinator->[markSegmentAsUnused->[markSegmentAsUnused],becomeLeader->[call->[isLeader],start],UpdateCoordinatorStateAndPrepareCluster->[stopPeonsForDisappearedServers->[stop],startPeonsForNewServers->[start]],start->[stopBeingLeader->[stopBeingLeader],becomeLeader->[call->[],becomeLeader]],isLeader->[isLeader],... | This method is called when the coordinator thread is running. No log message. | This could be candidate for debug level |
@@ -171,15 +171,11 @@ func (c *clientImpl) GetIngresses() []*extensionsv1beta1.Ingress {
func (c *clientImpl) UpdateIngressStatus(namespace, name, ip, hostname string) error {
keyName := namespace + "/" + name
- item, exists, err := c.factories[c.lookupNamespace(namespace)].Extensions().V1beta1().Ingresses().Infor... | [GetService->[Informer,GetStore,V1,Core,lookupNamespace,Services,GetByKey],GetIngresses->[Lister,List,Errorf,Extensions,V1beta1,Ingresses],GetSecret->[Informer,GetStore,Secrets,V1,Core,lookupNamespace,GetByKey],WatchAll->[Informer,AddEventHandler,Secrets,V1,Endpoints,Start,newResourceEventHandler,Core,String,NewFiltere... | UpdateIngressStatus updates the status of an ingress. | I think we should omit the `with error` part now. It used to be necessary to distinguish between the "missing" and "true error" cases, but now the upstream error will include this information. |
@@ -92,6 +92,16 @@ class HelpInfoExtracter:
return metavar
+ @staticmethod
+ def compute_choices(kwargs):
+ """Compute the option choices to display based on an Enum or list type."""
+ typ = kwargs.get('type', [])
+ if inspect.isclass(typ) and issubclass(typ, Enum):
+ values = (choice.value for... | [HelpInfoExtracter->[get_option_scope_help_info->[OptionScopeHelpInfo],get_option_help_info->[OptionHelpInfo,compute_default,compute_metavar]]] | Compute the metavar to display in help for an option registered with these kwargs. | Good choice to have this be a generator comprehension rather than a list comprehension! +1 for lazy evaluation. |
@@ -142,7 +142,7 @@ class ShareSmbSettings(GeneratedShareSmbSettings):
:param SmbMultichannel multichannel: Required. Sets the multichannel settings.
"""
- def __init__(self, multichannel):
+ def __init__(self, multichannel, **kwargs):
self.multichannel = multichannel
| [service_properties_deserialize->[_from_generated],Metrics->[_from_generated->[_from_generated]],SharePropertiesPaged->[_extract_data_cb->[_from_generated]],HandlesPaged->[_extract_data_cb->[_from_generated]],ShareProperties->[_from_generated->[_from_generated],__init__->[LeaseProperties]],FileProperties->[_from_genera... | Initialize the object with a single multichannel. | move multichannel into kwargs, also move the positional param of other classes into kwargs |
@@ -31,14 +31,13 @@ public class IndexProperties {
}
public void setProperties(Map<String, Object> properties) {
- properties.entrySet().stream()
- .forEach(property -> setProperty(property.getKey(), property.getValue()) );
+ properties.forEach(this::setProperty);
}
public Confi... | [IndexProperties->[createPropertySource->[withOverride,defaultProperties,fromMap,withPrefix],setProperty->[startsWith,put],defaultProperties->[DefaultAnalysisConfigurer,put],setProperties->[forEach,getValue,setProperty,getKey]]] | This method is used to set the properties of the configuration. | Are you sure about this? I think we discussed this at some point and the Search 6 defaults weren't acceptable for Infinispan. I.e. for each index 10 indexing queues, and *for each cache* about as many threads as the number of processor cores available to the JVM on startup. Note that having more indexing queues than th... |
@@ -749,10 +749,7 @@ namespace Dynamo.Tests
[Test]
public void TestStringInput()
{
- var model = dynSettings.Controller.DynamoModel;
- model.CreateNode(0, 0, "String");
-
- var strNode = Controller.DynamoViewModel.Model.Nodes[0] as StringInput;
+ va... | [UndoRedoRecorderTests->[TestDeletionUndoRedo->[AddModel,RemoveModel],TestDeletionsUndoRedo->[RemoveModels,AddModel],TestCreationUndoRedo->[AddModel],TestModificationUndoRedo01->[ModifyModel,AddModel],TestModificationUndoRedo00->[ModifyModel,AddModel],TestClearingStacks00->[AddModel],TestPopFromUndoGroup->[AddModel],Te... | Test method for string input. | Since `String` node is deprecated, the `CreateNode` method above won't result in the node being created. Since these test cases are primarily aimed at testing the `SerializeCore/DeserializeCore` methods, there's not reason why we can't instantiate the classes themselves (which is what I did here to fix these test cases... |
@@ -1000,6 +1000,15 @@ define([
vs += ' gl_PointSize = u_pointSize; \n';
}
+ vs += ' vec4 position_EC = czm_view * vec4(position_absolute, 1); \n';
+ vs += ' position_EC.z *= -1.0; \n';
+
+ vs += ' float attenuationFactor = \n' +
+ ' ((position_EC... | [No CFG could be retrieved] | \ n version of the functions Private functions - vertex and fragment shaders. | Change `1` to `1.0` |
@@ -725,13 +725,13 @@ class DeformConvTester(OpTester, unittest.TestCase):
return ops.deform_conv2d(x_, offset_, weight_, bias_, stride=stride,
padding=padding, dilation=dilation, mask=mask_)
- gradcheck(func, (x, offset, mask, weight, bias), nondet_tol=1e-5)
... | [BoxAreaTester->[test_box_area->[area_check]],RoIAlignTester->[test_qroialign->[make_rois],expected_fn->[bilinear_interpolate],_test_boxes_shape->[_helper_boxes_shape]],GenBoxIouTester->[test_gen_iou->[gen_iou_check]],PSRoIAlignTester->[expected_fn->[bilinear_interpolate],_test_boxes_shape->[_helper_boxes_shape]],Defor... | Test backward with batch size. 2 - D convolution. | fast_mode is False by default, why this change? Also the title says turn on fast gradcheck? |
@@ -21,4 +21,5 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("PythonNodeModelsWpf")]
[assembly: InternalsVisibleTo("PythonMigrationViewExtension")]
[assembly: InternalsVisibleTo("DynamoCoreWpf")]
+[assembly: TypeForwardedTo(typeof(PythonNodeModels.PythonEngineVersion))]
| [No CFG could be retrieved] | region Public API [ Assembly. | Can you explain the motivation for moving this to a different assembly? |
@@ -33,6 +33,14 @@ public interface ImmutableBitmap
*/
IntIterator iterator();
+ /**
+ * @return a peekable iterator which can skip to a position
+ */
+ default PeekableIntIterator peekableIterator()
+ {
+ return new PeekableIteratorAdapter(iterator());
+ }
+
/**
* @return a batched iterator ... | [batchIterator->[BatchIteratorAdapter,iterator]] | iterator returns an IntIterator that returns all the items in the underlying array. | nit: IntelliJ is complaining about raw types here `return new PeekableIteratorAdapter<>(iterator());` |
@@ -65,13 +65,13 @@
</button>
<ul id="reportGenerateMenuDropdown" class="dropdown-menu dropdown-menu-right" aria-labelledby="reportGenerateMenu">
<li>
- <%= link_to '#', remote: true, id: 'createNewReport' do %>
+ <%= link_to reports_path, remote: true, id: '... | [No CFG could be retrieved] | Displays a list of objects that can be used to generate a unique identifier. | spaces are missing after brackets |
@@ -268,7 +268,7 @@ public class Connection {
return spk;
} catch (ClassNotFoundException e) {
- throw new Error(e); // impossible
+ throw new LinkageError(e.getMessage(), e); // impossible
}
}
| [Connection->[writeObject->[writeObject],readBoolean->[readBoolean],readKey->[readUTF],detectKeyAlgorithm->[detectKeyAlgorithm],verifyIdentity->[readObject,readKey,readUTF],close->[close],writeUTF->[writeUTF],encryptConnection->[Connection],readUTF->[readUTF],writeBoolean->[writeBoolean],writeKey->[writeUTF],readObject... | This method reads the key from the input stream and verifies that the shared secret is the same. | Arguably should be `AssertionError` because we believe it should never happen. |
@@ -172,11 +172,13 @@ public abstract class FileBasedSource<S, D> extends AbstractSource<S, D> {
try {
log.info("Running ls command with input " + path);
results = this.fsHelper.ls(path);
+ for (int i = 0; i < results.size(); i++) {
+ String filePath = state.getProp(ConfigurationKeys.SOUR... | [FileBasedSource->[initLogger->[getProp,append,nullToEmpty,toString,StringBuilder,put],shutdown->[info,error,close],getcurrentFsSnapshot->[getMessage,error,getProp,ls,size,get,set,info],getWorkunits->[setProp,toArray,size,removeAll,getPropAsBoolean,getcurrentFsSnapshot,toString,addAll,join,info,IllegalArgumentException... | Gets the current snapshot of the file system. | Can you make `:::` a constant, and use that constant here and in the changes to `getWorkunits` |
@@ -359,10 +359,12 @@ public abstract class Prefs
public class EnumValue extends JsonValue<String>
{
private EnumValue(String name, String title, String description,
- String[] values, String defaultValue)
+ String[] values, String defaultValue, String[] rea... | [Prefs->[string->[StringValue],object->[ObjectValue],integer->[IntValue],bool->[BooleanValue],dbl->[DoubleValue],enumeration->[EnumValue],JsonValue->[setGlobalValue->[setValue,setGlobalValue],setProjectValue->[setProjectValue,setValue],removeGlobalValue->[getValue],setValue->[doSetValue,setValue,getValue,doGetValue],ge... | Gets the value of the . | This is a private constructor so I'd suggest moving this check upstream, and adding a debug.warn statement that logs the enum in question to the console. |
@@ -152,6 +152,8 @@ class Opus::Types::Test::Props::SerializableTest < Critic::Unit::UnitTest
assert_equal(MySerializable, storytime[:klass])
assert_equal(:foo, storytime[:prop])
assert_equal("Won't respond like hash", storytime[:value])
+
+ T::Configuration.soft_assert_handler = nil
end
... | [ComplexStruct->[nilable,new,prop],SuperStruct->[nilable,include,prop],ReopenedSuperStruct->[nilable,include,prop],BooleanStruct->[nilable,prop],CustomType->[serialize->[value],deserialize->[freeze,value],attr_accessor,extend],CustomSerializedForm->[prop],a_serializable->[name,new,foo],MyNilableSerializable->[nilable,i... | It prints out some basic information about the object that can be serialized and serialized. includes relevant generated code on serialize. | Can we do this in an `ensure`? if one of the asserts fails, we won't have reset the soft_assert_handler, and it will be wrong for the other tests. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.