patch
stringlengths 18
160k
| callgraph
stringlengths 4
179k
| summary
stringlengths 4
947
| msg
stringlengths 6
3.42k
|
|---|---|---|---|
@@ -200,5 +200,13 @@ class ASTMergeSuite(DataSuite):
typ = type_map[expr]
a.append('{}:{}: {}'.format(short_type(expr),
expr.line,
- typ.accept(self.type_str_conv)))
+ self.format_type(typ)))
return a
+
+ def format_type(self, typ: Type) -> str:
+ return typ.accept(self.type_str_conv)
+
+
+def is_dumped_module(id: str) -> bool:
+ # TODO: Don't dump __main__
+ return id not in NOT_DUMPED_MODULES and (not id.startswith('_') or id.startswith('__'))
|
[ASTMergeSuite->[dump_typeinfos_recursive->[dump_typeinfos_recursive],dump_typeinfo->[dump],build->[build]]]
|
Dump the types of the modules in the graph.
|
You could just add `'__main__'` to `NOT_DUMPED_MODULES`?
|
@@ -81,6 +81,18 @@ import org.apache.spark.util.LongAccumulator;
import scala.Option;
import scala.Tuple2;
+import java.io.IOException;
+import java.io.Serializable;
+import java.nio.charset.StandardCharsets;
+import java.text.ParseException;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
/**
* Hoodie Write Client helps you build datasets on HDFS [insert()] and then
* perform efficient mutations on a HDFS dataset [upsert()]
|
[HoodieWriteClient->[clean->[clean],rollbackInflightCommits->[rollback],commit->[commit],savepoint->[savepoint],updateIndexAndCommitIfNeeded->[commitOnAutoCommit],rollback->[rollback]]]
|
Imports a single Hoodie record from the HDFS dataset. Creates a HoodieWriteClient for a single Hoodie object.
|
In general, can you please avoid extra formatting changes with code reviews, it's hard to look at the file list and get a pulse on the PR.
|
@@ -246,15 +246,15 @@ func TestCreateUpdateConfig(t *testing.T) {
name: "GetInitContainerImage",
initialMeshConfigData: &v1alpha1.MeshConfigSpec{},
checkCreate: func(assert *tassert.Assertions, cfg Configurator) {
- assert.Equal("openservicemesh/init:v0.9.0", cfg.GetInitContainerImage())
+ assert.Equal("openservicemesh/init:v0.9.1-rc.1", cfg.GetInitContainerImage())
},
updatedMeshConfigData: &v1alpha1.MeshConfigSpec{
Sidecar: v1alpha1.SidecarSpec{
- InitContainerImage: "openservicemesh/init:v0.8.2",
+ InitContainerImage: "openservicemesh/init:v0.9.0",
},
},
checkUpdate: func(assert *tassert.Assertions, cfg Configurator) {
- assert.Equal("openservicemesh/init:v0.8.2", cfg.GetInitContainerImage())
+ assert.Equal("openservicemesh/init:v0.9.0", cfg.GetInitContainerImage())
},
},
{
|
[GetConfigResyncInterval,Duration,False,checkUpdate,IsPermissiveTrafficPolicyMode,GetEnvoyImage,GetPubSubInstance,Info,getMeshConfigCacheKey,GetOutboundPortExclusionList,GetProxyResources,GetTracingPort,MeshConfigs,GetOutboundIPRangeExclusionList,New,GetFeatureFlags,GetTracingHost,GetMeshConfigJSON,getMeshConfig,Run,Nil,GetMaxDataPlaneConnections,ConfigV1alpha1,Create,GetTracingEndpoint,Equal,IsDebugServerEnabled,IsEgressEnabled,UseHTTPSIngress,IsPrivilegedInitContainer,Subscribe,Update,NewSimpleClientset,True,GetInboundPortExclusionList,Msg,TODO,checkCreate,Unsub,GetServiceCertValidityPeriod,GetInitContainerImage,IsTracingEnabled,MustParse,GetEnvoyLogLevel]
|
SidecarSpec returns a Sidecar spec that can be used to configure a Sidecar. returns an object that can be used to create or update a negative number of missing values.
|
Shouldn't this also be v0.9.1-rc.1 ?
|
@@ -67,6 +67,15 @@ func NewVolumeModel(volume *models.VolumeResponse, labels map[string]string) *ty
type Volume struct {
}
+// acceptedVolumeFilters are filters that are supported by VIC
+var acceptedVolumeFilters = map[string]bool{
+ "dangling": true,
+ "name": true,
+ "driver": true,
+}
+
+var errPortlayerClient = fmt.Errorf("failed to get a portlayer client")
+
// Volumes docker personality implementation for VIC
func (v *Volume) Volumes(filter string) ([]*types.Volume, []string, error) {
defer trace.End(trace.Begin("Volume.Volumes"))
|
[VolumeRm->[NewErrorWithStatusCode,RemoveVolume,Begin,NewRequestNotFoundError,WithName,End,Errorf,NewRemoveVolumeParamsWithContext,NewRequestConflictError],Volumes->[NewErrorWithStatusCode,Infoln,Error,Infof,Begin,End,NewListVolumesParamsWithContext,Errorf,WithFilterString,ListVolumes],volumeCreate->[Infof,Begin,NewCreateVolumeParamsWithContext,CreateVolume,New,End,String,Errorf,WithVolumeRequest],VolumeInspect->[NewErrorWithStatusCode,Error,Begin,WithName,GetVolume,End,NewGetVolumeParamsWithContext,Errorf],VolumeCreate->[NewErrorWithStatusCode,Error,Begin,volumeCreate,End,Errorf],Match,Marshal,Compare,Unmarshal,ToLower,Errorf,ParseInt,MustCompile,FromHumanSize]
|
Volumes returns a list of volumes.
|
This err string is mentioned 4 times in this file. How about we make this a const or a var and return that instead?
|
@@ -4,14 +4,6 @@ module Constants
SVG_PLACEHOLDER = "<svg ...></svg>".freeze
DETAILS = {
- allow_email_password_registration: {
- description: "People can sign up using their email and password",
- placeholder: ""
- },
- allow_email_password_login: {
- description: "People can login using their email and password",
- placeholder: ""
- },
require_captcha_for_email_password_registration: {
description: "People will be required to fill out a captcha when
they're creating a new account in your community",
|
[freeze]
|
The main configuration for the user. Missing properties for the object.
|
Deleted because we no longer have these fields in the `config` show page
|
@@ -77,7 +77,13 @@ func SetVisibilityEmail(mctx libkb.MetaContext, email keybase1.EmailAddress, vis
}
_, err := mctx.G().API.PostJSON(mctx, arg)
- return err
+ if err != nil {
+ return err
+ }
+ if visibility == keybase1.IdentityVisibility_PRIVATE {
+ clearEmailsFromContactCache(mctx, email)
+ }
+ return nil
}
func SetVisibilityAllEmail(mctx libkb.MetaContext, visibility keybase1.IdentityVisibility) error {
|
[PostJSON,LoadUserEmails,G]
|
SetVisibilityEmail sets the user s visibility and email.
|
good catch, also need to do it below for SetVisibilityAllEmail
|
@@ -112,7 +112,7 @@ namespace System.Security.Cryptography.Pkcs.Tests.Pkcs12
// orapki wallet create -wallet ewallet.p12
// mkstore -wrl ewallet.p12 -createUserCredential a b c d
// mkstore -wrl ewallet.p12 -createCredential a_prod_db a_test_user
- // (prompted secret: "potatos are tasty")
+ // (prompted secret: "potatoes are tasty")
internal static readonly ReadOnlyMemory<byte> SimpleOracleWallet = (
"308202AC0201033082027206092A864886F70D010701A08202630482025F3082" +
"025B3082025706092A864886F70D010706A0820248308202440201003082023D" +
|
[Pkcs12Documents->[HexToByteArray]]
|
The list of possible keys that can be used to create a wallet. This is a wrapper around mkstore - wrl ewallet. p12. 8 - 7 - 15 - 14.
|
This typo is also hidden in the hex blob below. You would need to regenerate the blob to fix it.
|
@@ -84,7 +84,7 @@ export default class Tabs extends React.Component<TabsPropsT> {
{...tabContentProps}
{...props}
>
- {isActive ? child.props.children : null}
+ {child.props.children}
</TabContent>
);
});
|
[No CFG could be retrieved]
|
A component that renders a tab - menu with a single key.
|
It would be nice for performance to optionally not render children. Or rather the other way around where it defaults to the current functionality, and will apply this seo benefit based on a boolean prop.
|
@@ -19,9 +19,8 @@ import {Services} from '../../../../src/services';
import {VideoEvents} from '../../../../src/video-interface';
import {listenOncePromise} from '../../../../src/event-helper';
-const EXAMPLE_VIDEOID = 'myfwarfx4tb';
-const EXAMPLE_VIDEOID_URL =
- 'https://cdn.mowplayer.com/player.html?code=myfwarfx4tb';
+const EXAMPLE_VIDEOID = 'v-myfwarfx4tb';
+const EXAMPLE_VIDEOID_URL = 'https://mowplayer.com/watch/v-myfwarfx4tb';
describes.realWin(
'amp-mowplayer',
|
[No CFG could be retrieved]
|
Creates an element with the specified attributes and returns it. Adds a new media object to the DOM and calls the layoutCallback.
|
Could you please update the validator tests in `validator-amp-mowplayer.html` with this video ID and re-run validator tests using `gulp validator --update_tests`?
|
@@ -496,6 +496,11 @@ class TestDistBase(unittest.TestCase):
def start_pserver(self, model_file, check_error_log, required_envs):
ps0_ep, ps1_ep = self._ps_endpoints.split(",")
ps_cmd = "%s %s --role pserver --endpoints %s --trainer_id 0 --current_endpoint %s --trainers %d --update_method pserver"
+
+ if os.getenv('WITH_COVERAGE', 'OFF') == 'ON':
+ required_envs['COVERAGE_FILE'] = os.getenv('COVERAGE_FILE', '')
+ ps_cmd = "%s -m coverage run --branch -p %s --role pserver --endpoints %s --trainer_id 0 --current_endpoint %s --trainers %d --update_method pserver"
+
ps0_cmd = ps_cmd % \
(self._python_interp, model_file, self._ps_endpoints, ps0_ep,
self._trainers)
|
[TestDistRunnerBase->[run_gpu_fleet_api_trainer->[my_print,eprint,get_model,get_data],run_pserver->[get_model,get_transpiler,my_print],run_trainer->[get_model,get_transpiler,my_print,get_data]],runtime_main->[run_gpu_fleet_api_trainer,run_pserver,run_trainer],TestDistBase->[start_pserver->[my_print],setUp->[_setup_config,_after_setup_config],check_with_place->[_run_cluster_nccl2,_run_cluster,_run_local],_run_cluster_nccl2->[_get_nccl2_trainer_cmd,my_print,_find_free_port],_run_cluster->[my_print,start_pserver],_find_free_port->[__free_port->[my_print],__free_port]],TestParallelDyGraphRunnerBase->[run_trainer->[get_model,_get_data,my_print,run_one_loop]]]
|
start pserver process.
|
Duplicate with 498
|
@@ -85,15 +85,15 @@ def print_results_from_args(args: argparse.Namespace):
results_dict = {}
for root, _, files in os.walk(path):
-
if metrics_name in files:
full_name = os.path.join(root, metrics_name)
- metrics = json.load(open(full_name))
+ with open(full_name) as file:
+ metrics = json.load(file)
results_dict[full_name] = metrics
sorted_keys = sorted(list(results_dict.keys()))
print(f"model_run, {', '.join(keys)}")
for name in sorted_keys:
results = results_dict[name]
- keys_to_print = [str(results.get(key, "N/A")) for key in keys]
+ keys_to_print = (str(results.get(key, "N/A")) for key in keys)
print(f"{name}, {', '.join(keys_to_print)}")
|
[print_results_from_args->[walk,list,keys,print,get,sorted,str,join,open,load],PrintResults->[add_subparser->[add_parser,set_defaults,add_argument]],getLogger]
|
Print results from an argparse. Namespace object. .
|
Don't use `file` as a variable name (notice how it's colored in the syntax highlighting here?). Why did you make changes to this file, anyway?
|
@@ -486,9 +486,12 @@ def standard_gru(inputs, init_h, kernel, recurrent_kernel, bias, activation,
def cudnn_gru(inputs, init_h, kernel, recurrent_kernel, bias, mask, time_major,
go_backwards):
"""GRU with CuDNN implementation which is only available for GPU."""
- if not time_major:
+ if not time_major and mask is None:
inputs = array_ops.transpose(inputs, perm=(1, 0, 2))
- init_h = array_ops.expand_dims(init_h, axis=0)
+ seq_axis, batch_axis = (0, 1)
+ else:
+ seq_axis, batch_axis = (0, 1) if time_major else (1, 0)
+ init_h = array_ops.expand_dims(init_h, axis=seq_axis)
weights = array_ops.split(kernel, 3, axis=1)
weights += array_ops.split(recurrent_kernel, 3, axis=1)
|
[GRU->[call->[step->[call]]],_canonical_to_params->[convert],LSTM->[call->[step->[call]]],gru_with_backend_selection->[cudnn_gru_with_fallback->[input_not_right_padded->[standard_gru],input_right_padded->[cudnn_gru],cudnn_gru]],lstm_with_backend_selection->[cudnn_lstm_with_fallback->[input_not_right_padded->[standard_lstm],input_right_padded->[cudnn_lstm],cudnn_lstm]],cudnn_lstm->[_canonical_to_params]]
|
GRU with CuDNN implementation. 2 - D cudnn rnn_rnn_v2.
|
if the kernel supports batch major input, does it mean this transpose should be skipped?
|
@@ -7177,9 +7177,9 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->AttributesEx7 |= SPELL_ATTR7_INTERRUPT_ONLY_NONPLAYER;
});
- for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
+ for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
- SpellEntry* spellInfo = (SpellEntry*)sSpellStore.LookupEntry(i);
+ SpellInfo* spellInfo = mSpellInfoMap[i];
if (!spellInfo)
{
continue;
|
[No CFG could be retrieved]
|
Apply spell fixes to the given node. This function is called to determine if a specific effect is available.
|
`uint32` should just be `auto`
|
@@ -62,7 +62,7 @@ public class VirtualSystemSetupAction extends RhnAction
public List<VirtualSystemOverview> getResult(RequestContext context) {
User user = context.getCurrentUser();
- DataResult<VirtualSystemOverview> dr = SystemManager.virtualSystemsList(user, null);
+ DataResult<VirtualSystemOverview> dr = SystemManager.virtualSystemsListNew(user, null);
for (VirtualSystemOverview current : dr) {
if (current.isFakeNode()) {
|
[VirtualSystemSetupAction->[getResult->[getVirtualSystemId,isFakeNode,setSystemId,processList,getUuid,virtualSystemsList,getHostSystemId,getServerName,setName,getCurrentUser],execute->[findForward,setWillClearSet,setListName,setDataSetName,ListRhnSetHelper,execute]]]
|
Get the list of virtual systems which are not yet available.
|
This whole class will not be used any more since this was what was behind the old JSP. You should also remove the corresponding `<action>` in `java/code/webapp/WEB-INF/struts-config.xml` and the corresponding jsp page: `/WEB-INF/pages/systems/virtuallist.jsp`
|
@@ -79,10 +79,10 @@ export class AmpImgur extends AMP.BaseElement {
iframe.setAttribute('frameborder', '0');
iframe.setAttribute('allowfullscreen', 'true');
- iframe.src =
- 'https://imgur.com/' +
- encodeURIComponent(this.imgurid_) +
- '/embed?pub=true';
+ const sanitizedID = this.imgurid_.startsWith('a/')
+ ? 'a/' + encodeURIComponent(this.imgurid_.replace('a/', ''))
+ : encodeURIComponent(this.imgurid_);
+ iframe.src = 'https://imgur.com/' + sanitizedID + '/embed?pub=true';
this.applyFillContent(iframe);
this.element.appendChild(iframe);
return this.loadPromise(iframe);
|
[No CFG could be retrieved]
|
A class that represents an AMP image. Check if event data starts with a tag and if it does add AMP imgur element.
|
Is `a/` the only pattern change? Can the values also include `b/` etc?
|
@@ -262,7 +262,7 @@ export class AmpImg extends BaseElement {
/** @override */
prerenderAllowed() {
- return this.prerenderAllowed_;
+ return !this.element.hasAttribute('noprerender');
}
/** @override */
|
[No CFG could be retrieved]
|
Private methods - This method is called by the constructor of the Component. Callback function for the next action.
|
Is this method called multiple times?
|
@@ -960,7 +960,13 @@ define([
// that we can assign if we know the types before runtime
Node.prototype._evaluateNot = function(frameState, feature) {
- return !(this._left.evaluate(frameState, feature));
+ var left = this._left.evaluate(frameState, feature);
+ //>>includeStart('debug', pragmas.debug);
+ if (typeof(left) !== 'boolean') {
+ throw new DeveloperError('Error: Operation is undefined.');
+ }
+ //>>includeEnd('debug');
+ return !left;
};
Node.prototype._evaluateNegative = function(frameState, feature) {
|
[No CFG could be retrieved]
|
Evaluates the node and returns the value of the node if it is found. Evaluates the node and returns the number of nanoseconds that can be found.
|
These exceptions are all fine, but can we be more precise about the type mismatch and any other info we can provide to help devs track down the issue?
|
@@ -164,12 +164,11 @@ public class ListProperty extends AbstractProperty implements List<Property> {
if (children.isEmpty()) {
return new ArrayList<String>();
}
- // noinspection CollectionDeclaredAsConcreteClass
- ArrayList<Object> list = new ArrayList<>(children.size());
+ var list = new ArrayList<>(children.size());
for (Property property : children) {
list.add(property.getValue());
}
- // TODO XXX FIXME for compatibility - this treats sclar lists as array
+ // TODO XXX FIXME for compatibility - this treats scalar lists as array
// see NXP-1653. remove this when will be fixed
// see also isContainer(), setValue() and accept()
// if (getType().isScalarList()) {
|
[ListProperty->[getValueForWrite->[getValueForWrite,getDefaultValue],applyListDiff->[setValue,get,remove,clear,addValue],get->[get],remove->[remove],isEmpty->[isEmpty],toArray->[toArray],accept->[accept,isContainer],getDefaultValue->[getDefaultValue],listIterator->[listIterator],convertTo->[convertTo],init->[init],setValue->[setValue],normalize->[isNormalized],isSameAs->[get,isSameAs],indexOf->[get],getType->[getType],set->[set],clear->[clear],getDirtyChildren->[isContainer],moveTo->[remove,indexOf],clone->[clone],clearDirtyFlags->[clearDirtyFlags]]]
|
This method is called by the PropertyAccessor to retrieve the value of the .
|
Since you are cleaning here, why not typing with <Property> since it's used as such next line ?
|
@@ -83,7 +83,7 @@ export default Controller.extend({
@action
groupChanged(_, groupAttrs) {
// First param is the group name, which include none or 'all groups'. Ignore this and look at second param.
- this.set("group", groupAttrs.id);
+ this.set("group", groupAttrs ? groupAttrs.id : null);
},
@action
|
[No CFG could be retrieved]
|
Displays a popup which shows the user hierarchy and the list of groups that the user has access.
|
Tip you can do `groupAttrs?.id`
|
@@ -84,6 +84,9 @@ class ProductClass(models.Model):
is_shipping_required = models.BooleanField(
pgettext_lazy('Product class field', 'is shipping required'),
default=False)
+ vat_rate_type = models.CharField(
+ pgettext_lazy('Product class field', 'vat rate type'), max_length=60,
+ blank=True)
class Meta:
verbose_name = pgettext_lazy(
|
[ProductVariant->[get_absolute_url->[get_slug],get_cost_price->[select_stockrecord],as_data->[get_price_per_item],get_first_image->[get_first_image]],Product->[is_in_stock->[is_in_stock],ProductManager],ProductImage->[delete->[get_ordering_queryset],save->[get_ordering_queryset],ImageManager],Stock->[StockManager]]
|
Return a string that can be used as a URL for a node in the hierarchy. Return queryset of Product objects.
|
Shouldn't this be `default='standard'` instead of `blank=True`?
|
@@ -152,9 +152,9 @@ describe CriteriaController do
context '#new' do
before(:each) do
- get_as @admin,
+ get_as admin,
:new,
- params: { assignment_id: @assignment.id, criterion_type: 'FlexibleCriterion'},
+ params: { assignment_id: assignment.id, criterion_type: 'FlexibleCriterion'},
format: :js
end
|
[create,new,find,be,let,describe,match_array,post_as,fixture_file_upload,eql,first,it,assignment,put,map,contain_exactly,to,respond_with,before,pending,post,to_s,include,delete_as,get_as,extract_text,id,delete,context,include_examples,get,not_to,class,eq,find_by,render_template,raise_error,and_return]
|
An authenticated and authorized admin doing a GET one - to - one edit of a single criterion.
|
Layout/SpaceInsideHashLiteralBraces: Space inside } missing.
|
@@ -10,6 +10,9 @@ Rails.application.routes.draw do
get "forbidden", :to => "application#forbidden", as: "forbidden"
get "not_found", :to => "application#not_found", as: "not_found"
+ # Pre tutorial modal
+ get "pre_tutorial_modal", :to => "application#pre_tutorial_modal", as: "pre_tutorial_modal"
+
# Settings
get "users/settings/preferences", to: "users/settings#preferences", as: "preferences"
put "users/settings/preferences", to: "users/settings#update_preferences", as: "update_preferences"
|
[draw,collection,resources,member,root,new,get,post,devise_scope,patch,devise_for,match,put,delete]
|
Route for all users organization_name - Name of organization to view.
|
Prefer single-quoted strings when you don't need string interpolation or special symbols.<br>Use the new Ruby 1.9 hash syntax.<br>Line is too long. [93/80]
|
@@ -437,9 +437,9 @@ void BattlegroundAV::StartingEventOpenDoors()
{
LOG_DEBUG("bg.battleground", "BG_AV: start spawning mine stuff");
for (uint16 i = BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_N_MAX; i++)
- SpawnBGObject(i, RESPAWN_IMMEDIATELY);
+ SpawnBGObject(i, RESPAWN_IMMEDIATELY, 5 * MINUTE);
for (uint16 i = BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_S_MAX; i++)
- SpawnBGObject(i, RESPAWN_IMMEDIATELY);
+ SpawnBGObject(i, RESPAWN_IMMEDIATELY, 5 * MINUTE);
for (uint8 mine = AV_NORTH_MINE; mine <= AV_SOUTH_MINE; mine++) //mine population
ChangeMineOwner(mine, TEAM_NEUTRAL, true);
|
[EventPlayerDefendsPoint->[UpdatePlayerScore,GetNodeThroughObject,PopulateNode],EventPlayerAssaultsPoint->[DePopulateNode,UpdatePlayerScore,GetNodeThroughObject],ResetBGSubclass->[InitNode],EventPlayerDestroyedPoint->[UpdateScore],resize->[resize],ChangeMineOwner->[AddAVCreature],PostUpdateImpl->[UpdateScore],SetupBattleground->[AddAVCreature,GetNodeThroughObject,PopulateNode],UpdateNodeWorldState->[GetWorldStateType],PopulateNode->[AddAVCreature]]
|
This method is called from the background thread when the background object is starting to open Doors.
|
I might suggest to add brackets here if you want
|
@@ -830,6 +830,13 @@ export class AmpA4A extends AMP.BaseElement {
/** @override */
layoutCallback() {
+ // Shorthand for: reject promise if current promise chain is out of date.
+ const checkStillCurrent = promiseId => {
+ if (promiseId != this.promiseId_) {
+ throw cancellation();
+ }
+ };
+ const promiseId = this.promiseId_;
// Promise may be null if element was determined to be invalid for A4A.
if (!this.adPromise_) {
if (this.shouldInitializePromiseChain_()) {
|
[AmpA4A->[constructor->[AmpAdUIHandler,AmpAdXOriginIframeHandler,dev,generateSentinel,platformFor,protectFunctionWrapper,now,SAFEFRAME,cryptoFor],renderViaNameAttrOfXOriginIframe_->[NAMEFRAME,utf8Decode,dev,user,getContextMetadata,getDefaultBootstrapBaseUrl,stringify,SAFEFRAME,reject,length],verifyCreativeSignature_->[cryptoKey,then,some,resolve,round,keys,dev,user,getMode,serviceName,reject,map],onLayoutMeasure->[status,size,dev,getMode,isEnumValue,headers,creative,reject,CLIENT_CACHE,arrayBuffer,utf8Decode,byteLength,user,extensionsFor,cancellation,loadExtension,customElementExtensions,resolve,checkStillCurrent,bytes,signature,viewerForDoc],preconnectCallback->[forEach,getDefaultBootstrapBaseUrl],renderNonAmpCreative_->[NAMEFRAME,resolve,incrementLoadingAds,user,SAFEFRAME],viewportCallback->[setFriendlyIframeEmbedVisible],buildCallback->[AmpAdUIHandler],renderAmpCreative_->[installFriendlyIframeEmbed,customElementExtensions,setFriendlyIframeEmbedVisible,setStyle,round,dev,whenIniLoaded,customStylesheets,iframe,body,protectFunctionWrapper,win,installAnchorClickInterceptor,createElementWithAttributes,minifiedCreative,getTimingDataAsync,push,installUrlReplacementsForEmbed],getKeyInfoSets_->[resolve,isArray,keys,dev,xhrFor,user,endsWith,getMode,serviceName,isObject],getAmpAdMetadata_->[customElementExtensions,isArray,dev,parse,customStylesheets,lastIndexOf,minifiedCreative,slice,length,isObject],onCrossDomainIframeCreated->[dev],layoutCallback->[round,resolve,dev,user,cancellation],renderOutsideViewport->[is3pThrottled,getAmpAdRenderOutsideViewport],isLayoutSupported->[isLayoutSizeDefined],forceCollapse->[dev,LOADED_NO_CONTENT,LOADING],renderViaCachedContentIframe_->[xhrFor,stringify,getContextMetadata],registerAlpHandler_->[viewerForDoc,document,handleClick,isExperimentOn],iframeRenderHelper_->[AmpAdXOriginIframeHandler,dev,protectFunctionWrapper,assign,createElementWithAttributes],shouldInitializePromiseChain_->[height,dev,user,isAdPositionAllowed,width],getSigningServiceNames->[getMode],unlayoutCallback->[dev,platformFor,NOT_LAID_OUT,SAFEFRAME],promiseErrorHandler_->[isCancellation,duplicateErrorIfNecessary,user,dev,ignoreStack,message,getMode,args,random],sendXhrRequest_->[xhrFor],resumeCallback->[isMeasureRequested,hasBeenMeasured],BaseElement],apply,unshift]
|
Callback for A4A layout.
|
I would do: `const promiseId = this.promiseId_;` `const checkStillCurrent = () => {` ` if (promiseId != this.promiseId_) {` ` throw cancellation();` ` }` `};` Then you shouldn't need to pass down promiseId
|
@@ -79,7 +79,7 @@ func (rc *TwitterChecker) findSigInTweet(h SigHint, s *goquery.Selection) ProofE
}
func (rc *TwitterChecker) CheckStatus(g *GlobalContext, h SigHint) ProofError {
- res, err := G.XAPI.GetHTML(APIArg{
+ res, err := g.XAPI.GetHTML(APIArg{
Endpoint: h.apiURL,
NeedSession: false,
})
|
[CheckStatus->[findSigInTweet,ScreenNameCompare],NormalizeRemoteName->[NormalizeUsername]]
|
CheckStatus checks the status of the post.
|
can you contextify APIArg too?
|
@@ -37,6 +37,9 @@ import (
"github.com/pulumi/pulumi/pkg/util/contract"
"github.com/pulumi/pulumi/pkg/util/retry"
"github.com/pulumi/pulumi/pkg/workspace"
+
+ survey "gopkg.in/AlecAivazis/survey.v1"
+ surveycore "gopkg.in/AlecAivazis/survey.v1/core"
)
const (
|
[CloudConsoleURL->[CloudURL],CreateStack->[CreateStack],runEngineAction->[Preview,Close,Update,Destroy],tryNextUpdate->[CloudURL],GetStack->[GetStack],ListTemplates->[ListTemplates],EncryptValue->[EncryptValue],DownloadTemplate->[DownloadTemplate],ListStacks->[ListStacks],Read->[Read],CloudConsoleStackPath->[CloudConsoleProjectPath],Logout->[CloudURL],DecryptValue->[DecryptValue],updateStack->[GetStack,CloudConsoleURL,CloudConsoleStackPath,createAndStartUpdate],Close->[Close],GetLogs->[GetStack],DownloadPlugin->[DownloadPlugin]]
|
Package names of the modules that are used by the Pulumi API. ValueOrDefaultURL returns the default cloud URL if no cloud is specified.
|
Group in with other external deps.
|
@@ -19,5 +19,5 @@ import javax.wsdl.WSDLException;
*/
public interface WsdlRetrieverStrategy
{
- Definition retrieveWsdlFrom(URL url) throws WSDLException;
+ Definition retrieveWsdlFrom() throws WSDLException;
}
|
[No CFG could be retrieved]
|
Retrieve the WSDL definition from the given URL.
|
This method ended up with a wrong name if the URL parameter is gone.
|
@@ -107,9 +107,11 @@ class ShellTask(prefect.Task):
sub_process.wait()
if sub_process.returncode:
msg = "Command failed with exit code {0}: {1}".format(
- sub_process.returncode, line
+ sub_process.returncode,
+ "\n".join(lines) if self.log_stderr else line,
)
self.logger.error(msg)
+
raise prefect.engine.signals.FAIL(msg) from None # type: ignore
if self.return_all:
return lines
|
[ShellTask->[__init__->[super],run->[TypeError,NamedTemporaryFile,write,debug,error,append,flush,FAIL,update,copy,decode,wait,Popen,iter,format,encode],defaults_from_attrs]]
|
Runs a shell command and returns the result as a string.
|
This is about the previous behavior, but what's the reason for logging the last line from `stdout`? This feels like the wrong selection to me (in the case of multi-line output, this will look strangely cropped), and depending on the CLI may leak something secret if the user wasn't expecting it to be logged to cloud. Also note that if no stdout is sent `line` will be `None`. If there's not a good reason, I might drop the `line` bit, and only log the stderr if requested.
|
@@ -211,7 +211,7 @@ class CryptographyClient(KeyVaultClientBase):
:param algorithm: encryption algorithm to use
:type algorithm: :class:`~azure.keyvault.keys.crypto.EncryptionAlgorithm`
:param bytes plaintext: bytes to encrypt
- :keyword bytes iv: optional initialization vector. For use with AES-CBC encryption.
+ :keyword bytes iv: optional initialization vector. Required for AES-CBC(PAD) encryption.
:keyword bytes additional_authenticated_data: optional data that is authenticated but not encrypted. For use
with AES-GCM encryption.
:rtype: :class:`~azure.keyvault.keys.crypto.EncryptResult`
|
[CryptographyClient->[unwrap_key->[_initialize,unwrap_key],decrypt->[_initialize,decrypt,_validate_arguments],verify->[_initialize,verify],sign->[_initialize,sign],encrypt->[_initialize,_validate_arguments,encrypt],wrap_key->[_initialize,wrap_key]]]
|
Encrypt bytes using the client s key. Return EncryptResult object for given key_id.
|
`_validate_arguments` requires an iv for AES-CBC and raises when one's given for any other algorithm, so this isn't really optional--in all cases a caller either must, or must not, provide a value.
|
@@ -1052,8 +1052,16 @@ def create_basic_wheel_for_package(
path.parent.mkdir(exist_ok=True, parents=True)
path.write_bytes(ensure_binary(files[fname]))
+ # The base_dir cast is required to make `shutil.make_archive()` use
+ # Unicode paths on Python 2, making it able to properly archive
+ # files with non-ASCII names.
retval = script.scratch_path / archive_name
- generated = shutil.make_archive(retval, 'zip', script.temp_path)
+ generated = shutil.make_archive(
+ retval,
+ 'zip',
+ root_dir=script.temp_path,
+ base_dir=text_type(os.curdir),
+ )
shutil.move(generated, retval)
shutil.rmtree(script.temp_path)
|
[_create_test_package_with_subdirectory->[_create_main_file,run,_git_commit],_check_stderr->[make_check_stderr_message],_git_commit->[run],TestPipResult->[assert_installed->[TestFailure]],_vcs_add->[run,_git_commit],create_really_basic_wheel->[add_file->[digest],digest->[urlsafe_b64encode_nopad],add_file],_create_test_package->[_create_main_file,_vcs_add],make_test_finder->[make_test_link_collector],need_bzr->[need_executable],_create_svn_repo->[path_to_url,run],assert_raises_regexp->[run],need_mercurial->[need_executable],TestData->[backends->[path_to_url],find_links3->[path_to_url],find_links->[path_to_url],index_url->[path_to_url],find_links2->[path_to_url]],_create_test_package_with_srcdir->[_vcs_add],diff_states->[prefix_match],make_test_link_collector->[make_test_search_scope],_change_test_package_version->[_create_main_file,_git_commit],assert_all_changes->[TestFailure,diff_states],PipTestEnvironment->[pip->[run],run->[TestPipResult,_check_stderr],__init__->[copy],pip_install_local->[path_to_url,pip],easy_install->[run]],need_svn->[need_executable]]
|
Create a basic wheel for a package. Returns the path to the generated .
|
Oh, that is also a tricky one :o
|
@@ -578,11 +578,17 @@ public class RemoteCacheManager implements BasicCacheContainer {
started = true;
}
+ /**
+ * Stop the remote cache manager, disconnecting all existing connections.
+ * As part of the disconnection, all registered client cache listeners will
+ * be removed since client no longer can receive callbacks.
+ */
@Override
public void stop() {
if (isStarted()) {
transportFactory.destroy();
asyncExecutorService.shutdownNow();
+ listenerNotifier.stop();
}
started = false;
}
|
[RemoteCacheManager->[start->[start],ping->[ping],getCache->[getCache]]]
|
Start the cache.
|
Shouldn't this happen before you shut down the asyncExecutorService to which it is bound ?
|
@@ -1154,6 +1154,11 @@ class SourceEstimate(_BaseSourceEstimate):
The label (as created for example by mne.read_label). If the label
does not match any sources in the SourceEstimate, a ValueError is
raised.
+
+ Returns
+ -------
+ stc : SourceEstimate | VectorSourceEstimate
+ The source estimate restricted to the given label.
"""
# make sure label and stc are compatible
if label.subject is not None and self.subject is not None \
|
[SourceEstimate->[center_of_mass->[_center_of_mass],expand->[copy,_remove_kernel_sens_data_],__init__->[__init__],to_original_src->[SourceEstimate],in_label->[_hemilabel_stc,SourceEstimate],save->[_write_stc,_write_w],extract_label_time_course->[extract_label_time_course]],save_stc_as_volume->[save],_BaseSourceEstimate->[__imul__->[_verify_source_estimate_compat,_remove_kernel_sens_data_],__neg__->[_remove_kernel_sens_data_],__iadd__->[_verify_source_estimate_compat,_remove_kernel_sens_data_],data->[_remove_kernel_sens_data_],__isub__->[_verify_source_estimate_compat,_remove_kernel_sens_data_],resample->[_remove_kernel_sens_data_,resample],bin->[_make_stc],__idiv__->[_verify_source_estimate_compat,_remove_kernel_sens_data_],mean->[mean],transform->[copy,transform_data],__ipow__->[_remove_kernel_sens_data_]],spatial_dist_connectivity->[spatio_temporal_dist_connectivity],VolSourceEstimate->[save->[_write_stc,_write_w],__init__->[__init__]],_read_w->[_read_3],_morph_sparse->[copy,_sparse_argmax_nnz_row],_gen_extract_label_time_course->[mean,_get_label_flip,sqrt],spatial_tris_connectivity->[spatio_temporal_tris_connectivity],compute_morph_matrix->[_get_subject_sphere_tris,_morph_buffer],_write_w->[_write_3],_center_of_mass->[mean,sqrt],grade_to_vertices->[sqrt],morph_data_precomputed->[SourceEstimate],spatial_src_connectivity->[spatio_temporal_src_connectivity],MixedSourceEstimate->[plot_surface->[SourceEstimate],__init__->[__init__]],morph_data->[_get_subject_sphere_tris,SourceEstimate],read_source_estimate->[_read_stc,_read_w],extract_label_time_course->[_gen_extract_label_time_course]]
|
Get a SourceEstimate object restricted to a label.
|
incorrect formatting, needs `-------`
|
@@ -60,7 +60,8 @@ public final class DimensionHandlerUtils
.setDictionaryEncoded(false)
.setDictionaryValuesUnique(false)
.setDictionaryValuesSorted(false)
- .setHasBitmapIndexes(false);
+ .setHasBitmapIndexes(false)
+ .setHasMultipleValues(false);
private DimensionHandlerUtils()
{
|
[DimensionHandlerUtils->[makeStrategy->[getEffectiveCapabilities],converterFromTypeToType->[convertObjectToType],makeVectorProcessor->[getEffectiveCapabilities,makeVectorProcessor],convertObjectToDouble->[convertObjectToDouble],convertObjectToType->[convertObjectToType,convertObjectToFloat,convertObjectToString,convertObjectToLong],convertObjectToFloat->[convertObjectToFloat],compareObjectsAsType->[convertObjectToType],convertObjectToLong->[convertObjectToLong]]]
|
Creates a DimensionHandler object from a column capabilities. Replies the LongDimensionHandler if the dimension is Long.
|
Why this change? As I understand it, the previous behavior is roughly equivalent to returning unknown for HMV. (Because it would return false, but complete is also false.)
|
@@ -13,10 +13,9 @@ public class MacLobbyWrapper {
// i think the java validator triggers this
public static void registerMacShutdownHandler(final LobbyFrame frame) {
// new Application();
- final Application application = Application.getApplication();
- application.addApplicationListener(new ApplicationAdapter() {
+ Application.getApplication().setQuitHandler(new QuitHandler(){
@Override
- public void handleQuit(final ApplicationEvent event) {
+ public void handleQuitRequestWith(QuitEvent arg0, QuitResponse arg1) {
if (frame != null) {
frame.shutdown();
} else {
|
[MacLobbyWrapper->[registerMacShutdownHandler->[handleQuit->[shutdown,exit],ApplicationAdapter,getApplication,addApplicationListener]]]
|
Register a shutdown handler for Mac OS X.
|
Please rename parameters `arg0` and `arg1` I recommend 'quitEvent' and 'quitResponse'
|
@@ -24,11 +24,12 @@
##############################################################################
from spack import *
-
-class Caliper(Package):
- """Caliper is a generic context annotation system. It gives programmers the
- ability to provide arbitrary program context information to (performance)
- tools at runtime.
+class Caliper(CMakePackage):
+ """Caliper is a program instrumentation and performance measurement
+ framework. It provides data collection mechanisms and a source-code
+ annotation API for a variety of performance engineering use cases,
+ e.g., performance profiling, tracing, monitoring, and
+ auto-tuning.
"""
homepage = "https://github.com/LLNL/Caliper"
|
[Caliper->[install->[working_dir,cmake,make],variant,depends_on,version]]
|
Creates a generic context annotation system which provides a function to provide arbitrary program context information.
|
For variants like this, you should _explicitly enable_ the flag `if '+variant' in spec` and _explicitly disable_ the flag otherwise.
|
@@ -271,7 +271,7 @@ class Grouping < ActiveRecord::Base
if user && user.student?
if user.hidden
errors.add(:base, I18n.t('invite_student.fail.hidden',
- :user_name => user.user_name))
+ user_name: user.user_name))
m_logger.log("Student failed to invite '#{user.user_name}' (account has been " +
'disabled).', MarkusLogger::ERROR)
|
[Grouping->[deletable_by?->[is_valid?],update_repository_permissions->[is_valid?],write_repo_permissions?->[repository_external_commits_only?],revoke_repository_permissions_for_membership->[write_repo_permissions?],remove_member->[membership_status],remove_rejected->[membership_status],assign_tas_by_csv->[add_tas_by_user_name_array],past_due_date?->[section],marking_completed?->[has_submission?],revoke_repository_permissions_for_students->[write_repo_permissions?],can_invite?->[pending?],membership_status->[membership_status],revoke_repository_permissions->[write_repo_permissions?],decline_invitation->[membership_status],grant_repository_permissions->[write_repo_permissions?]]]
|
Checks if the given user can invite this student. Check if the user is already part of another group and if not add an error message.
|
Align the parameters of a method call if they span more than one line.
|
@@ -1145,7 +1145,7 @@ class FreqtradeBot(LoggingMixin):
profit_trade = trade.calc_profit(rate=profit_rate)
# Use cached rates here - it was updated seconds ago.
current_rate = self.exchange.get_rate(
- trade.pair, refresh=False, side="sell") if not fill else None
+ trade.pair, refresh=False, side=trade.exit_side) if not fill else None
profit_ratio = trade.calc_profit_ratio(profit_rate)
gain = "profit" if profit_ratio > 0 else "loss"
|
[FreqtradeBot->[cleanup->[cleanup],fee_detection_from_trades->[apply_fee_conditional],handle_trailing_stoploss_on_exchange->[create_stoploss_order],__init__->[__init__],handle_stoploss_on_exchange->[create_stoploss_order],execute_sell->[_safe_sell_amount,handle_insufficient_funds],create_stoploss_order->[handle_insufficient_funds],update_trade_state->[_notify_buy_fill,_notify_sell],get_real_amount->[apply_fee_conditional],create_trade->[get_free_open_trades],check_handle_timedout->[_check_timed_out],handle_cancel_buy->[_notify_buy_cancel]]]
|
Send rpc notification when a sell occurred.
|
Below this - we'll need to make sure to use the correct `RPCMessageType`. it's currently only using SELL/SELL_FILL - is that OK /will that be handled in rpc for shorts, or will we need a seperate sell-messagetype (apart from that, it's not sending the "direction" - so we currently can't handle this in rpc).
|
@@ -189,7 +189,7 @@ func (p *plugin) buildEvent(m *message, pkt *protos.Packet) (*beat.Event, error)
return &evt, nil
}
-func populateRequestFields(m *message, pbf *pb.Fields, fields *ProtocolFields) {
+func populateRequestFields(m *message, evt beat.Event, pbf *pb.Fields, fields *ProtocolFields) {
fields.Type = "request"
fields.Method = bytes.ToUpper(m.method)
fields.URIOriginal = m.requestURI
|
[populateHeadersFields->[AddHost,Equal,AddUser,ToLower,ToUpper,Split,Atoi],init->[IsDebug,setFromConfig],doParse->[parse,buildEvent,publish],populateEventFields->[ToLower,Sprintf],ParseUDP->[doParse,Recover],publish->[results],buildEvent->[populateHeadersFields,populateEventFields,MarshalStruct,getEndpoints,SetDestination,NewBeatEvent,SetSource],AddIP,Index,AddUser,Atoi,Put,init,SplitN,TrimSpace,AddHost,Unpack,Equal,MakeDebug,ToLower,ToUpper,Register,Split,IndexByte,Beta,String,ParseFloat,Trim]
|
buildEvent builds a beacon event from a message and a packet.
|
I understand this new parameter is unused, maybe this is a leftover?
|
@@ -537,7 +537,7 @@ define([
var docUri = new Uri(document.location.href);
var modelUri = new Uri(model._basePath);
model._baseUri = modelUri.resolve(docUri);
- });
+ }, getFailedLoadFunction(model, 'gltf', url));
return model;
};
|
[No CFG could be retrieved]
|
Creates a new Model object from a glTF file. Get the node with the given name.
|
Instead of passing a second argument to `then`, you should use `.otherwise(getFailedLoadFunction(model, 'gltf', url));` `otherwise` will catch all exceptions that may get generated while the second argument only catches exceptions in the first argument's function.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.