patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -873,10 +873,6 @@ void ServerEnvironment::activateBlock(MapBlock *block, u32 additional_dtime)
elapsed_timer.position));
}
}
-
- /* Handle ActiveBlockModifiers */
- ABMHandler abmhandler(m_abms, dtime_s, this, false);
- abmhandler.apply(block);
}
void ServerEnvironment::addActiveBlockModifier(ActiveBl... | [No CFG could be retrieved] | finds a node in the world that is on path between two points and returns false if private static final int _MAX_SIZE = 0 ;. | Since blocks are more frequently activated only run the ABMs at their step intervals. I think this is better anyway. |
@@ -388,6 +388,9 @@ public class HoodieWriteClient<T extends HoodieRecordPayload> extends AbstractHo
final List<String> fileIDPrefixes =
IntStream.range(0, parallelism).mapToObj(i -> FSUtils.createNewFileIdPfx()).collect(Collectors.toList());
+ table.getActiveTimeline().transitionRequestedToInflight(... | [HoodieWriteClient->[doRollbackAndGetStats->[rollback],rollbackInflightCompaction->[rollback],startCommitWithTime->[startCommit],runCompaction->[compact,commitCompaction],rollbackInternal->[doRollbackAndGetStats,startContext,startInstant,finishRollback],startCommit->[startCommit],rollbackInflightCommits->[rollback],bul... | Bulk insert internal. | metapoint.. Should we have a `TransactionHandle` abstraction that takes the a given write operation through these stages, instead of just typing in the code at different places.. Would help add validation and logging easily. |
@@ -397,7 +397,7 @@ public class MaterializedResult
while (!pageSource.isFinished()) {
Page outputPage = pageSource.getNextPage();
if (outputPage == null) {
- break;
+ continue;
}
builder.page(outputPage);
}
| [MaterializedResult->[resultBuilder->[resultBuilder],convertToTestTypes->[toString],Builder->[rows->[row],build->[MaterializedResult,build]],equals->[equals],toTestTypes->[MaterializedResult],writeValue->[writeValue,equals],materializeSourceDataStream->[materializeSourceDataStream],toString->[toString],iterator->[itera... | Materialized result stream for a page source. | That's a bug fix. Please make it into a separate commit. Is it possible to test? Are we having similar problem somewhere else? |
@@ -77,7 +77,7 @@ class ProgressReport(Model):
kwargs (dict): keyword arguments to be passed on to the real save
"""
if self.task_id is None:
- self.task_id = Task.objects.get(id=util.get_current_task_id())
+ self.task = Task.objects.get(id=util.get_current_task_id())
... | [ProgressBar->[iter->[increment],increment->[save]],ProgressReport->[__exit__->[save],__enter__->[save]]] | Auto - set the task_id if running inside a task . | This line needs to be changed also. |
@@ -820,7 +820,14 @@ public class CardBrowser extends NavigationDrawerActivity implements
@Override
protected void onDestroy() {
Timber.d("onDestroy()");
- invalidate();
+ if(isDarkModeAtStart == AnkiDroidApp.getSharedPrefs(getApplicationContext())
+ .getBoolean(N... | [CardBrowser->[searchCards->[invalidate],openNoteEditorForCurrentlySelectedNote->[openNoteEditorForCard],MarkCardHandler->[actualOnValidPostExecute->[updateCardsInList]],onResetProgress->[getSelectedCardIds],updateList->[updatePreviewMenuItem],SearchCardsHandler->[actualOnPostExecute->[updatePreviewMenuItem,updateList]... | onDestroy - called by the component after it is destroyed. | Do we get this information on `onConfigurationChanged`? |
@@ -67,13 +67,6 @@
return queueCreator.CreateQueueIfNecessary(QueueBindings, username);
}
- public QueueBindings QueueBindings { get; }
-
- public IPushMessages BuildMessagePump()
- {
- return transportReceiveInfrastructure.MessagePumpFactory();
- }
-
... | [TransportComponent->[ToTransportAddress->[ToTransportAddress]]] | Create queues if necessary. | How where you able to remove this? (How do receive component get access to the message pump?) |
@@ -45,7 +45,7 @@ func (s *testMetricsSuite) TestConvertName(c *C) {
}
for _, input := range inputs {
- c.Assert(input.newName, Equals, convertName(input.name))
+ c.Assert(input.newName, Equals, camelCaseToSnakeCase(input.name))
}
}
| [TestGetCmdLabel->[CommandType,Assert],TestConvertName->[Assert]] | TestConvertName test convert name. | Change it to `c.Assert(camelCaseToSnakeCase(input.name), Equals, input.newName)`. Obtained value should be in front of expected value. Although it is not introduced by you, thanks for helping to fix it. |
@@ -38,13 +38,14 @@ func (client *Client) Close() {
}
// GetBlockHashes gets block hashes from all the peers by calling grpc request.
-func (client *Client) GetBlockHashes() *pb.DownloaderResponse {
+func (client *Client) GetBlockHashes(startHash []byte) *pb.DownloaderResponse {
ctx, cancel := context.WithTimeout... | [GetBlocks->[WithTimeout,Background,Fatalf,Query],Close->[Close],GetBlockHashes->[WithTimeout,Background,Fatalf,Query],Dial,NewDownloaderClient,Sprintf,WithInsecure,Fatalf] | GetBlockHashes returns the list of block hashes. | maybe you want to log the "err" as well. |
@@ -118,6 +118,17 @@ describes.sandboxed('Navigation', {}, () => {
expect(handleCustomProtocolSpy).to.be.calledWith(event, anchor);
});
+ it('should select a custom linker target', () => {
+ const handleClickSpy = sandbox.spy(handler, 'handleClick_');
+
+ event.target = nu... | [No CFG could be retrieved] | Example of how to handle a link from a nested target. proceed if event is cancelled. | I'm not familiar with this file, but both stubbing a private method and manually calling a private method are considered bad unit test patterns. They're testing the actual implementation and not the behavior, which reduces the tests coverage and makes the code harder to refactor. Is there any way to improve this at thi... |
@@ -1624,10 +1624,15 @@ static int kdf_test_init(EVP_TEST *t, const char *name)
if (!TEST_ptr(kdata = OPENSSL_zalloc(sizeof(*kdata))))
return 0;
kdata->ctx = EVP_PKEY_CTX_new_id(OBJ_sn2nid(name), NULL);
- if (kdata->ctx == NULL)
+ if (kdata->ctx == NULL) {
+ OPENSSL_free(kdata);
... | [No CFG could be retrieved] | The standard KDF test method. Private methods for EVP_TEST and EVP_TEST_METHOD. | Use after free. These statements should be the other way around. |
@@ -265,4 +265,10 @@ public class JaxrsScanningProcessor {
void integrate(JaxrsTemplate template, BeanContainerBuildItem beanContainerBuildItem) {
template.setupIntegration(beanContainerBuildItem.getValue());
}
+
+ @BuildStep
+ List<BeanDefiningAnnotationBuildItem> beanDefiningAnnotations() {
+ retu... | [JaxrsScanningProcessor->[build->[position,parameters,size,returnType,equals,forName,ServletInitParamBuildItem,InputStreamReader,openStream,toString,StringBuilder,name,getAllKnownImplementors,isInterface,flags,endsWith,isEmpty,kind,asList,nextElement,trim,getResources,append,indexOf,getClassByName,produce,RuntimeInitia... | Integrate a missing constraint. | It does not really matter, but you don't need to wrap this in a list. |
@@ -36,7 +36,13 @@ func TestNewOCR2Provider(t *testing.T) {
keystore := new(keystoreMock.Master)
keystore.On("Solana").Return(solKey, nil)
- d := relay.NewDelegate(&sqlx.DB{}, keystore, &chainsMock.ChainSet{}, logger.NewLogger())
+ tc := new(terraclient.Reader)
+ lggr := logger.TestLogger(t)
+ d := relay.NewDeleg... | [On,NewLogger,Return,Unmarshal,NoError,NewDelegate,AnythingOfType,Run,NewOCR2Provider,Helper] | TestNewOCR2Provider tests OCR2Provider. | Here we construct the relay by providing the `txm` and the `client`, so following the interface/code, what does the relay actually relay? The relay needs a storage adapter, a logger, some config (provided by CL as a framework), and the rest is on the relay to implement. This split-brain situation, while perhaps necessa... |
@@ -24,6 +24,12 @@ module TwoFactorAuthentication
private
+ def personal_key_allowed?
+ return if TwoFactorAuthentication::PersonalKeyPolicy.new(current_user).enabled?
+
+ redirect_to two_factor_options_url
+ end
+
def presenter_for_two_factor_authentication_method
TwoFactorAuthCode... | [PersonalKeyVerificationController->[password_reset_profile->[password_reset_profile],generate_new_personal_key_for_verified_users_otherwise_retire_the_key_and_ensure_two_mfa->[create],remove_personal_key->[create]]] | presenter for Two Factor Authentication Method Nic. | can we name this as an action? From the name I'd guess it would be a simple predicate. Maybe `check_personal_key_enabled` |
@@ -703,7 +703,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
}
cesiumWidget.screenSpaceEventHandler.setInputAction(pickAndSelectObject, ScreenSpaceEventType.LEFT_CLICK);
- cesiumWidget.screenSpaceEventHandler.setInputAction(pickAndTrackObject, ScreenSpa... | [No CFG could be retrieved] | The Viewer object is a component that can be used to display the object that is currently A property that returns the bottom container of the CesiumWidget. | I figure this will be the biggest breaking change. If this is commonly used it may be ok to keep LEFT_DOUBLE_CLICK. |
@@ -84,9 +84,13 @@ class Post < ActiveRecord::Base
register_custom_field_type(NOTICE, :json)
- scope :private_posts_for_user, ->(user) {
- where("posts.topic_id IN (#{Topic::PRIVATE_MESSAGES_SQL})", user_id: user.id)
- }
+ scope :private_posts_for_user, ->(user) do
+ where(
+ "posts.topic_id IN (#{... | [Post->[rebake!->[cook,is_first_post?,publish_change_to_clients!],excerpt->[excerpt],excerpt_for_topic->[excerpt],is_category_description?->[is_first_post?],omit_nofollow?->[add_nofollow?],cook->[cook,cook_methods,types,omit_nofollow?],archetype->[archetype],hide!->[types,hidden_reasons],recover_public_post_actions->[r... | Attribute accessors for all private message fields. Filters topics with new content. | Do test this out with a user with a lot of group messages. The last time I optimised this, I did a left join on both tables and had an OR filter as well. However, the performance of the query degraded significantly for a user with lots of group messages. |
@@ -899,6 +899,10 @@ func NewContext() {
log.Fatal("Failed to map Metrics settings: %v", err)
}
+ u := *appURL
+ u.Path = path.Join(u.Path, "api", "swagger")
+ API.SwaggerURL = u.String()
+
newCron()
newGit()
| [IsFile,LastIndex,Dir,SetValue,Warn,KeysHash,TrimRight,Count,RequestURI,MustBool,Close,TempDir,MustInt,LookupEnv,Strings,MapTo,Error,Clean,Append,Format,SetFallbackHost,Compare,Empty,MustInt64,New,NewJwtSecret,SaveTo,Trace,LookPath,SplitN,IsAbs,Key,NewInternalToken,Create,Join,NewLogger,Section,Contains,Name,ReadAll,To... | EnableFederatedAvatar enable federated avatar Check if language is available. | De-referenced the pointer in case anyone uses `appURL` in a later change, since right below this I fudge the `u.Path` manually. |
@@ -0,0 +1,14 @@
+from ggplot import *
+from bokeh import pyplot
+from bokeh import plotting
+
+g = ggplot(diamonds, aes(x='price', color='cut')) + \
+ geom_density()
+
+g.draw()
+
+plt.title("Density ggplot-based plot in Bokeh.")
+
+pyplot.show_bokeh(plt.gcf(), filename="ggplot_density.html")
+
+plotting.session().... | [No CFG could be retrieved] | No Summary Found. | I think there is no real value in saving JSON models for every example. If you want to inspect what was generated by bokeh, then issue `BOKEH_PRETTY=yes python examples/mpl/example_name.py` and you will get pretty-printed JSON in `*.html` files. |
@@ -74,6 +74,9 @@ type ContainerNetwork struct {
// set of network wide links and aliases for this container on this network
Aliases []string `vic:"0.1" scope:"hidden" key:"aliases"`
+ // Level of trust configured for this network
+ TrustLevel common.TrustLevel
+
Assigned struct {
Gateway net.IPNet `vic:... | [No CFG could be retrieved] | Set of network wide links and aliases for this container on this network. | Please add the base vic version annotation - you shouldn't need any of the others: `vic:"0.1"` This will inherit the scope defined for the ContainerNetwork struct which I presume is "read-only" - this value _should_ be read only. |
@@ -452,7 +452,7 @@ namespace DotNetNuke.Web.InternalServices
file = FileManager.Instance.AddFile(folderInfo, fileName, stream, true, false,
FileContentTypeManager.Instance.GetContentType(Path.GetExtension(fileName)),
... | [FileUploadController->[FileUploadDto->[IsImage,GetUrl,GetLocalizedString],GetUrl->[GetUrl],IsPortalIdValid->[GetMyPortalGroup],UploadFromLocal->[UploadFromLocal]]] | Creates a new file upload object with the specified parameters. Unzips a file and returns a new object with the name of the file and the. | Please use `String#Equals(String, StringComparison)` |
@@ -457,8 +457,13 @@ class Repo(object):
try:
with self._open(path, remote, mode, encoding) as fd:
yield fd
- except FileNotFoundError:
- raise OutputFileMissingError(relpath(path, self.root_dir))
+ except (FileNotFoundError, OutputNotFoundError):
+ ... | [Repo->[find_out_by_relpath->[find_outs_by_path],used_cache->[collect],unprotect->[unprotect],collect_stages->[_filter_out_dirs],init->[init,Repo],find_dvc_dir->[find_root],_open->[_open,find_outs_by_path,open],graph->[_collect_graph],close->[close],clone->[close,Repo,clone]]] | Opens a specified resource as a file descriptor. | Btw, this one doesn't handle `cache=False` cases, as it will try looking for uncached file in the remote and will raise an error. CC @Suor |
@@ -51,10 +51,10 @@ public class ClaimCheckInTransformer extends AbstractTransformer {
@Override
protected Object doTransform(Message<?> message) throws Exception {
Assert.notNull(message, "message must not be null");
- Object payload = message.getPayload();
- Assert.notNull(payload, "payload must not be null"... | [ClaimCheckInTransformer->[doTransform->[getHeaders,copyHeaders,build,addMessage,notNull,withPayload,getPayload,getId],notNull]] | This method is called to transform a message to a response. | Why just don't expose a local variable for both `storedMessage.getHeaders().getId()` calls? We won't need this `// NOSONAR` and won't spend time for more method calls. |
@@ -357,6 +357,12 @@ public class WindowNode
return frame;
}
+ @JsonProperty
+ public boolean ignoreNulls()
+ {
+ return ignoreNulls;
+ }
+
@Override
public int hashCode()
{
| [WindowNode->[getPartitionBy->[getPartitionBy],Frame->[equals->[equals]],Function->[equals->[equals]],Specification->[equals->[equals]],replaceChildren->[WindowNode],getOutputSymbols->[getOutputSymbols]]] | Returns the frame if it is a . | Rename this getter to `isIgnoreNulls` |
@@ -20,7 +20,7 @@ package <%=packageName%>.repository;
import <%=packageName%>.domain.<%=entityClass%>;
import org.springframework.stereotype.Repository;
-<% if (databaseType == 'cassandra') { %>
+<% if (databaseType === 'cassandra') { %>
import com.datastax.driver.core.*;
import com.datastax.driver.mapping.Mappe... | [No CFG could be retrieved] | Imports an entity - id non - empty object from a JHipster project. Cassandra 2. 0. | it can be done in another PR, need to be changed to: ` === 'sql'` |
@@ -99,8 +99,10 @@ final class ItemNormalizer extends AbstractItemNormalizer
*/
private function getComponents($object, string $format = null, array $context)
{
- if (false !== $context['cache_key'] && isset($this->componentsCache[$context['cache_key']])) {
- return $this->componentsCa... | [ItemNormalizer->[getAttributes->[getComponents],normalize->[getHalCacheKey,populateRelation,getComponents,getIriFromItem,getResourceClass,initContext],populateRelation->[getRelationIri,getAttributeValue],getComponents->[isResourceClass,create,isCollection,getFactoryOptions,getType,getCollectionValueType,getClassName,i... | Returns the components of the given object. | We know the object class in the `normalize` method right? Could we pass the information to this function to avoid calling `get_class`? Might be a micro-optimization though. (same below) |
@@ -588,6 +588,9 @@ static void *sh_malloc(size_t size)
OPENSSL_assert(WITHIN_ARENA(chunk));
+ /* zero the free list header as a precaution against information leakage */
+ memset(chunk, 0, sizeof(SH_LIST));
+
return chunk;
}
| [No CFG could be retrieved] | split smaller entry in 2 and return the next one Get the index of the n - th free area. | Would it make sense to make this a `CLEAR(ret, actual_size);` up in `CRYPTO_secure_malloc` instead, just as there is one in `CRYPTO_secure_free`? |
@@ -154,6 +154,7 @@ namespace PythonNodeModels
[NodeName("Python Script From String")]
[NodeCategory(BuiltinNodeCategories.CORE_SCRIPTING)]
[NodeDescription("PythonScriptFromStringDescription", typeof(Properties.Resources))]
+ [OutPortTypes("var[]")]
[SupressImportIntoVM]
[IsDesignScriptComp... | [PythonNode->[SerializeCore->[SerializeCore],DeserializeCore->[DeserializeCore],UpdateValueCore->[UpdateValueCore]],PythonStringNode->[GetInputIndex->[GetInputIndex],RemoveInput->[RemoveInput]]] | This class is used to add input and output port data to a PythonStringNode. | Should this not be var[]..[]? |
@@ -0,0 +1,15 @@
+package org.triplea.http.client;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+/**
+ * Utility class with constants for HTTP clients.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class HttpConstants {
+ public static final String ACCEPT_JSON = "Accept: app... | [No CFG could be retrieved] | No Summary Found. | I'm surprised that there isn't a built-in way to do this. The apache HTTPComponents library has constants for the most headers and common values |
@@ -8,6 +8,7 @@ class CAR:
ASCENT = "SUBARU ASCENT LIMITED 2019"
IMPREZA = "SUBARU IMPREZA LIMITED 2019"
FORESTER = "SUBARU FORESTER 2019"
+ LEGACY_2015 = "SUBARU LEGACY 2015 - 2018"
FINGERPRINTS = {
CAR.ASCENT: [
| [dbc_dict] | The following code is copied from django. contrib. cereal. cereal. Magic number of CAR. 8 - bit bit - masking. | Can you remove the model year? |
@@ -92,15 +92,13 @@ public class RecipientListRouter extends AbstractMessageRouter implements Initia
@Override
public void onInit() throws Exception {
- Assert.notEmpty(this.recipients, "recipient list must not be empty");
super.onInit();
}
@Override
protected Collection<MessageChannel> determineTarge... | [RecipientListRouter->[onInit->[onInit],Recipient->[accept->[accept]]]] | This method is overridden to determine the target channel for a given message. | Since we allow do not configure any `recepient` this method is becoming redundant |
@@ -199,7 +199,8 @@ UI.setLocalRaisedHandStatus
* Initialize conference UI.
*/
UI.initConference = function () {
- let id = APP.conference.getMyUserId();
+ const { id, avatarID, email, name }
+ = getLocalParticipant(APP.store.getState());
// Update default button states before showing the toolb... | [No CFG could be retrieved] | Initializes the related UI for a specific participant. This is a handler that will be called when a user is joined a conference. | can we get rid of that `displayJids` thing? I don't see it in use anywhere else and AFAIS it was introduced just for debugging purposes. @gpolitis do we still need it? |
@@ -58,6 +58,10 @@ public class MockRecordParser extends AbstractControllerService implements Recor
fields.add(new RecordField(fieldName, type.getDataType(), isNullable));
}
+ public void addSchemaField(final RecordField recordField) {
+ fields.add(recordField);
+ }
+
public void addRe... | [MockRecordParser->[addSchemaField->[addSchemaField]]] | Add a schema field to the record. | This preserves the full data type of the field. RecordFieldType.getDataType(), which is called from the other add() methods, returns the "base" type, such as "ARRAY" instead of "ARRAY[INT]", for equality purposes. |
@@ -644,7 +644,7 @@ class Raw(object):
return self.info['ch_names']
-def read_raw_segment(raw, start=0, stop=None, sel=None, data_buffer=None):
+def read_raw_segment(raw, start=0, stop=None, sel=None, data_buffer=None, verbose=False):
"""Read a chunck of raw data
Parameters
| [Raw->[__setitem__->[_parse_get_set_params],band_pass_filter->[filter],apply_hilbert->[apply_function],__getitem__->[_parse_get_set_params],high_pass_filter->[filter],low_pass_filter->[filter],close->[close],filter->[apply_function]],read_raw_segment_times->[read_raw_segment]] | Read a raw segment of a sequence of bytes. read the tag list and return the n - channel non - zero values in the order they Get data and times of objects. | this line seems too long. Avoid lines longer than 80 characters. |
@@ -8,12 +8,12 @@ import (
"fmt"
"path/filepath"
- "os"
-
"github.com/keybase/cli"
"github.com/keybase/client/go/install"
"github.com/keybase/client/go/libcmdline"
"github.com/keybase/client/go/libkb"
+ "golang.org/x/net/context"
+ "os"
)
const (
| [ParseArgv->[Args,Bool,Int],confirm->[GetTerminalUI,Printf,PromptForConfirmation,G],errJSON->[Sprintf],Run->[Marshal,confirm,G,NewContextified,Remove,errJSON,LogSend,Info,outputInstructions,logFiles,load,Debug],outputInstructions->[GetTerminalUI,Printf,G,Output],logFiles->[Join,SystemLogPath,GetLogDir,G,Errorf,InstallL... | NewCmdLogSend creates a new cli. Command that sends a log of the last n Get the id from the status command. | can you move this up with other std packages? |
@@ -293,6 +293,12 @@ public class SCMContainerManager implements ContainerManager {
" it's missing!", containerID);
}
scmContainerManagerMetrics.incNumSuccessfulDeleteContainers();
+ } catch (NodeNotFoundException nnfe) {
+ scmContainerManagerMetrics.incNumFailureDeleteContainers(... | [SCMContainerManager->[getContainer->[getContainer],allocateContainer->[allocateContainer],updateDeleteTransactionId->[updateDeleteTransactionId],updateContainerReplica->[updateContainerReplica],getMatchingContainer->[allocateContainer,getMatchingContainer],getContainerCountByState->[getContainerCountByState],removeCon... | Delete a container from the container store. | Can we add the node info to the Exception? Is it part of the NodeNotFoundException? |
@@ -35,7 +35,7 @@ class NoProxyPattern
*
* @param string $url
*
- * @return true if the URL matches one of the rules.
+ * @return bool if the URL matches one of the rules.
*/
public function test($url)
{
| [No CFG could be retrieved] | Checks if a given URL is a node in the chain. | should read like `@return bool true if the URL matches one of the rules.` |
@@ -2312,9 +2312,16 @@ def _get_var(name, program=None):
@contextlib.contextmanager
-def _imperative_guard(tracer):
+def _imperative_guard(tracer, place):
global _imperative_tracer_
tmp_trace = _imperative_tracer_
_imperative_tracer_ = tracer
+
+ global _current_expected_place_
+ tmp_place = _... | [NameScope->[child->[NameScope]],OpProtoHolder->[__init__->[get_all_op_protos]],_full_name_scope->[parent,name],dtype_is_floating->[convert_np_dtype_to_dtype_],get_all_op_protos->[get_all_op_protos],Operator->[attr_type->[attr_type],to_string->[_debug_string_],_block_attr->[_block_attr_id],output->[output],_rename_inpu... | This is a guard that is used to prevent the stack from being re - used in a. | don't do this now. just infer the place from input vars. |
@@ -87,7 +87,6 @@ public class InterceptorConfigurationBuilder extends AbstractCustomInterceptorsC
/**
* Sets interceptor properties
*
- * @param properties
* @return this InterceptorConfigurationBuilder
*/
public InterceptorConfigurationBuilder withProperties(Properties properties) {
| [InterceptorConfigurationBuilder->[read->[after,interceptor,before,index,position]]] | Adds the interceptor properties. | This still takes a properties argument |
@@ -93,7 +93,7 @@ stc = apply_lcmv(evoked, filters, max_ori_out='signed')
# Plot source space activity:
# take absolute values for plotting
-stc.data[:, :] = np.abs(stc.data)
+np.abs(stc.data, out=stc.data)
# Save result in stc files
stc.save('lcmv-vol')
| [read_events,max,pick_channels,plot_joint,plot_stat_map,figure,as_volume,show,dict,compute_covariance,read_forward_solution,apply_lcmv,read_raw_fif,crop,make_lcmv,abs,argsort,ylabel,plot,print,data_path,time_as_index,index_img,normalize_proj,xlabel,average,Epochs,save,pick_types] | Compute the covariance of a free orientation and a vector beamfomer. plot LCMV value for a given index. | again, unrelated change ... |
@@ -40,6 +40,7 @@ public class SketchBufferAggregator implements BufferAggregator
private final int maxIntermediateSize;
private final IdentityHashMap<ByteBuffer, Int2ObjectMap<Union>> unions = new IdentityHashMap<>();
private final IdentityHashMap<ByteBuffer, WritableMemory> memCache = new IdentityHashMap<>()... | [SketchBufferAggregator->[getMemory->[get],createNewUnion->[get],relocate->[get,createNewUnion],get->[get],getOrCreateUnion->[get]]] | Produces a buffer aggregation object that aggregates data into a single object. Gets the Holder object for the given buffer and position. | Please annotate `@GuardedBy("stripedLock")` |
@@ -62,16 +62,6 @@ public class BigEndianShortCoder extends AtomicCoder<Short> {
@Override
public void verifyDeterministic() {}
- /**
- * {@inheritDoc}
- *
- * @return {@code true}. This coder is injective.
- */
- @Override
- public boolean consistentWithEquals() {
- return true;
- }
-
/**
... | [BigEndianShortCoder->[encode->[writeShort,CoderException],decode->[readShort,CoderException],getEncodedElementByteSize->[CoderException],BigEndianShortCoder]] | Checks if the current node is consistent with the node s reserved node. | Does each of these need an implementation of structuralValue? Are there tests that fail if it is set to the wrong thing? |
@@ -67,10 +67,12 @@ class Docker(Storage):
are included.
- secrets (List[str], optional): a list of Prefect Secrets which will be used to populate `prefect.context`
for each flow run. Used primarily for providing authentication credentials.
- - base_url: (str, optional): a URL... | [Docker->[pull_image->[_get_client],_build_image->[build],push_image->[_get_client]]] | Initialize a new object. Return a dict of variables for the given . | Slight preference to have this as `build_kwargs={...}` rather than splitting in `**kwargs`. If a docker build kwarg conflicts with one of prefect's kwargs, there will be issues. It also leaves open the possibility of forwarding kwargs to other docker methods if needed. |
@@ -288,6 +288,10 @@ class Llvm(CMakePackage, CudaPackage):
compilers['cxx'] = exe
elif 'clang' in exe:
compilers['c'] = exe
+ elif 'flang' in exe:
+ compilers['fc'] = exe
+ elif 'flang' in exe:
+ compilers['f77'] = exe
... | [Llvm->[pre_install->[working_dir,Version,make],validate_detected_spec->[format],filter_detected_exes->[append,any],determine_version->[group,search,debug,Executable,compile,compiler],codesign_check->[join_path,satisfies,Executable,copy,codesign,RuntimeError,mkdir,which,setup],setup_run_environment->[join_path,set],set... | Determine the variants of the missing - node - index file. | This needs to add `+flang` to the variants |
@@ -358,7 +358,7 @@ public abstract class TemplateAdapterBase extends AdapterBase implements Templat
BooleanUtils.toBoolean(cmd.isFeatured()), BooleanUtils.toBoolean(cmd.isExtractable()), cmd.getFormat(), osTypeId,
cmd.getZoneId(), HypervisorType.getType(cmd.getHypervisor()), cmd.getCh... | [TemplateAdapterBase->[prepareUploadParamsInternal->[prepare],prepareDelete->[accountAndUserValidation],prepare->[getDefaultDeployAsIsGuestOsId,prepareUploadParamsInternal,prepare]]] | This method is overridden to provide the correct parameters for the template upload. | @nvazquez I think we have to pass params.isDeployAsIs() value in prepare() method inside prepareUploadParamsInternal() method. Otherwise I don't see the usage of deployAsIS from UploadParamsBase. |
@@ -3331,7 +3331,10 @@ elseif ($id > 0 || ! empty($ref))
// For example print 239.2 - 229.3 - 9.9; does not return 0.
// $resteapayer=bcadd($object->total_ttc,$totalpaye,$conf->global->MAIN_MAX_DECIMALS_TOT);
// $resteapayer=bcadd($resteapayer,$totalavoir,$conf->global->MAIN_MAX_DECIMALS_TOT);
- $resteapayer = pr... | [update_price,create,form_multicurrency_rate,get_OutstandingBill,jdate,getLinesArray,setValueFrom,getVentilExportCompta,getNomUrl,getSellPrice,select_incoterms,begin,select_comptes,insert_discount,getLibType,setProject,add_contact,showOptionals,printOriginLinesList,textwithpicto,fetch_optionals,free,transnoentitiesnoco... | - - - - - - - - - - - - - - - - - - This function returns the number of items that can be substracted to payments only and not to. | if one of them is not numeric $resteapayer is unknown |
@@ -28,12 +28,14 @@ class Analytics
end
# rubocop:disable Metrics/LineLength
+ ACCOUNT_CREATION_INTRO_VISIT = 'Account creation intro visited'.freeze
AUTHENTICATION_MAX_2FA_ATTEMPTS = 'Authentication: user reached max 2FA attempts'.freeze
EMAIL_AND_PASSWORD_AUTH = 'Email and Password Authentication'.free... | [Analytics->[track_event->[info,merge,merge!,key?],uuid->[uuid],request_attributes->[user_agent,remote_ip],attr_reader,freeze]] | The user object is a list of attributes that can be accessed by the user. Get a list of all messages that can be used to validate phone number. | Should it be `IdV: intro visited` for consistency? |
@@ -11,9 +11,9 @@
import time as timer
import KratosMultiphysics as KM
from KratosMultiphysics import Logger
-from .response_function import ResponseFunctionBase
+from KratosMultiphysics.response_functions.response_function_interface import ResponseFunctionInterface
-class PackagingResponseBase(ResponseFunctionBas... | [PackagingResponseBase->[CalculateGradient->[time,round,PrintInfo,_CalculateNodalGradient,_CalculateDistances,enumerate],_CalculateNodalValue->[_HasContribution,pow],_CalculateNodalGradient->[_HasContribution,pow],Initialize->[ReadModelPart,ModelPartIO,response_settings],CalculateValue->[time,round,PrintInfo,_Calculate... | Creates a base class for packaging response functions that agglomerate the nodal violations Missing part in model. | Looks a bit strange to me, but I guess this is the way to go |
@@ -72,13 +72,6 @@ class FileBasedSource(iobase.BoundedSource):
'%s: file_pattern must be a string; got %r instead' %
(self.__class__.__name__, file_pattern))
- if compression_type == fileio.CompressionTypes.AUTO:
- raise ValueError('FileBasedSource currently does not support '
- ... | [FileBasedSource->[estimate_size->[_get_concat_source],split->[_get_concat_source],get_range_tracker->[_get_concat_source],default_output_coder->[_get_concat_source],read->[_get_concat_source]],_SingleFileSource->[split->[_SingleFileSource],read->[read_records]]] | Initializes FileBasedSource object with the given parameters. Sets the splittable flag to True if the node has a sequence number that is not split. | Let's reverse the if / else clauses so you can do something like if compression_type in (fileio.CompressionTypes.UNCOMPRESSED, fileio.CompressionTypes.AUTO): ... |
@@ -431,8 +431,10 @@ def validate_key_csr(privkey, csr=None):
if csr:
if csr.form == "der":
- csr_obj = M2Crypto.X509.load_request_der_string(csr.data)
- csr = le_util.CSR(csr.file, csr_obj.as_pem(), "der")
+ csr_obj = OpenSSL.crypto.load_certificate_request(
+ ... | [view_config_changes->[view_config_changes],Client->[obtain_certificate_from_csr->[_obtain_certificate],obtain_and_enroll_certificate->[obtain_certificate],obtain_certificate->[_obtain_certificate]]] | Validate that the client key and CSR are valid. | This looks like you removed an error. Nice catch |
@@ -327,9 +327,10 @@ function project_admin_prepare_head()
* @param int $projectsListId List of id of project allowed to user (string separated with comma)
* @param int $addordertick Add a tick to move task
* @param int $projectidfortotallink 0 or Id of project to use on total line (link to se... | [task_prepare_head->[query,trans,fetch_object,liste_contact,getNbComments],project_prepare_head->[getTasksArray,liste_contact,getNbComments,trans],projectLinesPerAction->[loadTimeSpent,transnoentitiesnoconv,getNomUrl],project_timesheet_prepare_head->[trans],print_projecttasks_array->[textwithpicto,free,query,getNomUrl,... | projectLinesa - Project lines a This function is called to show a single line or a single line of a task. Print a list of all the objects in the tree that are part of a single branch. prints a list of all the tasks in a tree. | Can we put the array_values just after the foreach ? |
@@ -73,6 +73,11 @@ class Gcc(AutotoolsPackage):
variant('piclibs',
default=False,
description='Build PIC versions of libgfortran.a and libstdc++.a')
+ if sys.platform == 'darwin':
+ variant('rpathlibgcc',
+ default=False,
+ description='Apply patch ... | [Gcc->[configure_args->[satisfies,append,Version,extend,format,join],write_rpath_specs->[join_path,gcc,write,set_install_permissions,startswith,format,warn,open],spec_dir->[glob,format],patch->[join_path,Version,isfile,copyfile,filter_file,format,mkdirp],depends_on,conflicts,patch,version,provides,variant,run_after]] | Returns a list of all supported languages. See comments for details on the requirements of the libraries. | i would keep this variant unconditional and instead add `conflicts('+rpathlibgcc', when='platform!=darwin')` or alike. |
@@ -68,6 +68,15 @@ public class HoodieRealtimeInputFormat extends HoodieInputFormat implements Conf
public static final int HOODIE_COMMIT_TIME_COL_POS = 0;
public static final int HOODIE_RECORD_KEY_COL_POS = 2;
public static final int HOODIE_PARTITION_PATH_COL_POS = 3;
+ // Track the read column ids and names... | [HoodieRealtimeInputFormat->[listStatus->[listStatus],addRequiredProjectionFields->[addProjectionField],getRecordReader->[addRequiredProjectionFields,getRecordReader]]] | Get splits from parquet and parquet based on the delta commit timeline. This method returns an InputSplit array with the maxCommit from the last delta or compaction or. | yikes. file a tracking jira? |
@@ -53,8 +53,8 @@ module Api
files.each do |file|
if file.nil?
# No such file in the submission
- render 'shared/http_status', :locals => {:code => '422', :message =>
- 'File was not found'}, :status => 422
+ render 'shared/http_status', locals: {code: '422', mess... | [SubmissionDownloadsController->[index->[find_by_filename_and_submission_id,find_entry,send_file,nil?,get_output_stream,get_submission_by_group_and_assignment,find_all_by_submission_id,find_by_id,filename,open,each,present?,length,id,puts,path,send_data,render,retrieve_file,mkdir]],require] | Returns a single node in the system if it exists in the database. sends the n - node file if we only have 1 file in the submission otherwise zip. | Align the elements of a hash literal if they span more than one line.<br>Space inside } missing. |
@@ -166,7 +166,7 @@ func (i *importer) getOrCreateStackResource(ctx context.Context) (resource.URN,
typ, name := resource.RootStackType, fmt.Sprintf("%s-%s", projectName, stackName)
urn := resource.NewURN(stackName, projectName, "", typ, tokens.QName(name))
state := resource.NewState(typ, urn, false, false, "", r... | [registerExistingResources->[executeSerial],getOrCreateStackResource->[executeSerial],URN->[URN],registerProviders->[executeParallel],importResources->[getOrCreateStackResource,registerExistingResources,executeParallel,registerProviders]] | getOrCreateStackResource returns the resource URN of the stack resource if it exists or creates. | Should probably add a way to set retainOnDelete for imports, does that make sense? |
@@ -79,7 +79,15 @@ namespace Dynamo.UI.Controls
{
this.scheduler = nodeViewModel.DynamoViewModel.Model.Scheduler;
this.nodeViewModel = nodeViewModel;
- InitializeComponent();
+ try
+ {
+ InitializeComponent();
+ }
+ ... | [PreviewControl->[RefreshExpandedDisplay->[RunOnSchedulerSync],ProcessFadeIn->[SetCurrentStateAndNotify,RefreshCondensedDisplay,BeginNextTransition],HidePreviewBubble->[TransitionToState],BeginFadeOutTransition->[SetCurrentStateAndNotify,BeginNextTransition],BeginCondenseTransition->[SetCurrentStateAndNotify,RefreshCon... | Internal method to request the preview of a specific logical controller. Transitions the preview control to the next state. | so we want to continue when this exception is caught ? |
@@ -20,4 +20,12 @@ class SessionDecorator
end
def logo_partial; end
+
+ def timeout_flash_text
+ I18n.t('notices.session_cleared', minutes: Figaro.env.session_timeout_in_minutes)
+ end
+
+ def sp_name
+ nil
+ end
end
| [SessionDecorator->[registration_heading->[t],new_session_heading->[t]]] | Returns the partial logo for the current page. | might prefer `def sp_name; end` for consistency with other methods that return `nil` in this class |
@@ -22,6 +22,9 @@ class Libfuse(MesonPackage):
version('3.9.2', sha256='b4409255cbda6f6975ca330f5b04cb335b823a95ddd8c812c3d224ec53478fc0')
variant('useroot', default=False)
+ variant('system_install', default=False)
+
+ patch('0001-Do-not-run-install-script.patch', when='~system_install')
exec... | [Libfuse->[meson_args->[append],determine_version->[group,Executable,search],variant,version]] | Determine the version of the executable. | Can you add a very brief description, for later reference, of what the patch does and why it is needed? |
@@ -34,9 +34,15 @@ DEBUG = config('DEBUG', default=False, cast=bool)
ROOT = dirname(dirname(dirname(os.path.abspath(__file__))))
-ADMINS = config('ADMIN_EMAILS',
- default='mdn-dev@mozilla.com',
- cast=TupleCsv())
+ADMINS = zip(
+ config('ADMIN_NAMES', default='MDN devs', cast=Csv(... | [pipeline_one_scss->[pipeline_scss],_get_locales->[path],enable_candidate_languages,pipeline_scss,_get_locales,TupleCsv,path] | Django settings for a single kuma project. Initialize the mysql configuration. | This would be better with the other ``CELERYD_*`` settings, around line 1270 |
@@ -5557,6 +5557,10 @@ dump_zpool(spa_t *spa)
dump_metaslabs(spa);
if (dump_opt['M'])
dump_metaslab_groups(spa);
+ if (dump_opt['d'] > 2 || dump_opt['m']) {
+ dump_log_spacemaps(spa);
+ dump_log_spacemap_obsolete_stats(spa);
+ }
if (dump_opt['d'] || dump_opt['i']) {
spa_feature_t f;
| [No CFG could be retrieved] | finds the vdev that is missing in the top checkpoint loops through the checkpoint blocks and checks if the object in the MOS refd list. | It would be nice if this behavior (or even the existence of log space maps) was mentioned in `zdb(8)`. |
@@ -51,7 +51,7 @@ public class EpollSocketChannelBenchmark extends AbstractMicrobenchmark {
public void run() {
throw new AssertionError();
}
- }, 5, TimeUnit.MINUTES);
+ }, 30, TimeUnit.MINUTES);
serverChan = new ServerBootstrap()
.channel(... | [EpollSocketChannelBenchmark->[setup->[run->[AssertionError],schedule,writeByte,Runnable,EpollEventLoopGroup,directBuffer,channel],tearDown->[cancel,release,sync],pingPong->[sync]]] | Setup the event loop. | 5 minutes was slightly too close to firing with two benchmarks. Updated this to be a little farther out. |
@@ -71,8 +71,9 @@ func (dr *DataReader) DataRef() *DataRef {
// Get writes the data referenced by the data reference.
func (dr *DataReader) Get(w io.Writer) error {
+ logrus.Errorf("Offset:::: %v", dr.offset)
return Get(dr.ctx, dr.client, dr.memCache, dr.dataRef.Ref, func(chunk []byte) error {
- data := chunk[dr... | [Get->[Get,Iterate,Write],Iterate->[Is]] | Get reads the next chunk from the data reader and writes it to the writer. | Remove this log line. |
@@ -161,4 +161,18 @@ public class ChunkedFile implements ChunkedInput<ByteBuf> {
}
}
}
+
+ @Override
+ public long length() {
+ try {
+ return file.length();
+ } catch (IOException e) {
+ return -1;
+ }
+ }
+
+ @Override
+ public long ... | [ChunkedFile->[isEndOfInput->[isOpen],readChunk->[min,readFully,arrayOffset,writerIndex,release,heapBuffer,array],close->[close],NullPointerException,IllegalArgumentException,RandomAccessFile,seek,length]] | Reads a chunk of data from the file. | Shouldn't this be `endOffset - startOffset`? |
@@ -35,10 +35,11 @@ type NamespaceChecker struct {
// NewNamespaceChecker creates a namespace checker.
func NewNamespaceChecker(cluster schedule.Cluster, classifier namespace.Classifier) *NamespaceChecker {
filters := []filter.Filter{
- filter.StoreStateFilter{MoveRegion: true},
+ filter.StoreStateFilter{ActionSc... | [SelectBestStoreToRelocate->[NewRandomSelector,GetStoreIds,GetID,NewExcludedFilter,SelectTarget],filter->[Target],SelectBestPeerToRelocate->[SelectBestStoreToRelocate,GetID,Uint64,AllocPeer,Debug],getNamespaceStores->[GetStores,filter,GetRegionNamespace,NewNamespaceFilter],Check->[GetPeers,GetID,GetStoreId,Debug,Uint64... | Check creates a new namespace checker. getNamespaceStores returns a non - nil error if there are no peers in the region. | Does it seemed to be better to remove `name` in `namespaceCheckerName`? And other similar places. |
@@ -163,7 +163,8 @@ gulp.task('cloc', ['build'], function() {
//If running cloc on source succeeded, also run it on the tests.
return source.then(function() {
return new Promise(function(resolve, reject) {
- cmdLine = 'perl ' + clocPath + ' --quiet --progress-rate=0 --read-lang-def=' + clo... | [No CFG could be retrieved] | Create tasks that run cloc on the primary source files and then combine on the tests. Combine the unminified version of the application into a single release. | Do we want to exclude .eslintrc.json and the karma configurations? |
@@ -886,6 +886,7 @@ class BalanceProofSignedState(State):
'signature',
'sender',
'chain_id',
+ 'canonical_identifier',
)
def __init__(
| [PaymentMappingState->[__ne__->[__eq__]],TokenNetworkState->[__ne__->[__eq__]],BalanceProofUnsignedState->[__ne__->[__eq__]],MediatorTask->[__ne__->[__eq__]],NettingChannelEndState->[__ne__->[__eq__],__init__->[make_empty_merkle_tree]],TargetTask->[__ne__->[__eq__]],UnlockPartialProofState->[__ne__->[__eq__]],Transacti... | Initialize a new token chain identifier. This function is called when the user has requested a non - zero value. | This should have had a migration... but i am guessing there can be a follow-up PR to add it. |
@@ -77,7 +77,10 @@ export default function txHelper({
})
if (contracts.automine) {
setTimeout(() => {
- contracts.web3Exec.currentProvider.send(
+ // This needs to be sendAsync, because the provider engine used for
+ // the mobile wallet linker client doesn'... | [No CFG could be retrieved] | Add a new transaction to the transactions list. | Hrm it's still `send`... is it supposed to be sendAsync? |
@@ -206,6 +206,7 @@ function generateGroupId (items, pos) {
function removeExtraSeparators (items) {
// fold adjacent separators together
let ret = items.filter((e, idx, arr) => {
+ if (e === null) return false
if (e.visible === false) return true
return e.type !== 'separator' || idx === 0 || arr[id... | [No CFG could be retrieved] | Sort a template menu items and return a list of menu items sorted by command id and by Private method for radio menu items. | when does this happen? |
@@ -9,10 +9,14 @@ from pex.pex_builder import PEXBuilder
from pex.pex_info import PexInfo
from pants.backend.python.subsystems.pex_build_util import PexBuilderWrapper
+from pants.base.deprecated import deprecated_module
from pants.subsystem.subsystem import Subsystem
from pants.util.dirutil import is_executable, ... | [ExecutablePexTool->[bootstrap->[list,create,PEX,is_executable,safe_concurrent_creation,build,default,PEXBuilder,add_resolved_requirements],subsystem_dependencies->[super]]] | Creates a PEX object with the specified base requirements. | When would I use one vs the other? Are these 1-1 equal, and all I have to do is change the parent class, or will I have to update any of the class first? |
@@ -97,13 +97,16 @@ public class ElasticsearchInstance extends ExternalResource {
}
private static ElasticsearchContainer startNewContainerInstance(String image) {
+ final Stopwatch sw = Stopwatch.createStarted();
+
final ElasticsearchContainer container = new ElasticsearchContainer(image)
+... | [ElasticsearchInstance->[create->[ElasticsearchInstance,create]]] | Start a new container instance. | FYI there is a similar log line printed by the container itself inside `GenericContainer#start` |
@@ -38,6 +38,17 @@ class PortGroupController extends SelectController
return PortGroup::hasAccess($request->user())->select(['id', 'name']);
}
+ protected function formatResponse($paginator)
+ {
+ // inject 'no default Port group' as choice
+ $general = new PortGroup;
+ $gener... | [PortGroupController->[baseQuery->[select]]] | base query for port group. | One problem left, this will show up on every page. In fact I think mine have the same problem :/ should be able to check the page number from the paginator. |
@@ -242,7 +242,7 @@ func (fs FrontierSigner) SignatureValues(tx InternalTransaction, sig []byte) (r,
func (fs FrontierSigner) Hash(tx InternalTransaction) common.Hash {
return hash.FromRLP([]interface{}{
tx.Nonce(),
- tx.GasPrice(),
+ tx.RawGasPrice(),
tx.GasLimit(),
tx.ShardID(),
tx.ToShardID(),
| [SignatureValues->[SignatureValues],Sender->[Sender,Hash]] | Hash returns the hash of the transaction. | what's the reason to change GasPrice to RawGasPrice? |
@@ -23,7 +23,7 @@ class NerTagIndexer(TokenIndexer[int]):
We will use this namespace in the :class:`Vocabulary` to map strings to indices.
"""
# pylint: disable=no-self-use
- def __init__(self, namespace: str = 'ner_tags') -> None:
+ def __init__(self, namespace: str = 'ner_tag') -> None:
... | [NerTagIndexer->[pad_token_sequence->[pad_sequence_to_length,items],tokens_to_indices->[get_token_index]],register,getLogger] | Initialize the class with a namespace. | What if we make this `ner_tokens`? That seems like a better name. |
@@ -1868,6 +1868,7 @@ class GenerateSourcesRequest:
protocol_sources: Snapshot
protocol_target: Target
+ exportable: ClassVar[bool] = True
input: ClassVar[type[SourcesField]]
output: ClassVar[type[SourcesField]]
| [ExplicitlyProvidedDependencies->[maybe_warn_of_ambiguous_dependency_inference->[any_are_covered_by_includes,remaining_after_disambiguation],disambiguated->[any_are_covered_by_includes,remaining_after_disambiguation]],NestedDictStringToStringField->[compute_value->[InvalidFieldTypeException]],SourcesField->[can_generat... | Snapshot of the non - duplicate object. The name of the that should be used to identify the target. | Nit, should go lower because this has a default |
@@ -88,6 +88,8 @@
class ApplySubscriptions : FeatureStartupTask
{
+ static ILog Logger = LogManager.GetLogger<ApplySubscriptions>();
+
public ApplySubscriptions(IEnumerable<Type> messagesHandledByThisEndpoint, Func<Type, Task<bool>> asyncPredicate)
{
... | [AutoSubscribe->[GetMessageTypesHandledByThisEndpoint->[ToList],ApplySubscriptions->[Task->[DebugFormat,Completed,ConfigureAwait],messagesHandledByThisEndpoint,asyncPredicate,LogManager],Setup->[Any,b,RequireExplicitRouting,Multicast,FromResult,GetMessageTypesHandledByThisEndpoint,ConfigureAwait,Settings,TryGet,Registe... | Creates a task that will subscribe to all messages of the given type. region MessagesHandledByThisEndpoint - Async predicate. | This should probably be moved to bottom of the file |
@@ -119,7 +119,7 @@ func resourceAwsWafv2WebACL() *schema.Resource {
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
- "count": wafv2EmptySchema(),
+ "count": wafv2CountConfigSchema(),
"none": wafv2EmptySchema(),
},
},
| [StringLenBetween,GetChange,IgnoreAws,DeleteWebACL,StringInSlice,Set,NonRetryableError,Wafv2ListTags,Int64Value,GetOk,New,HasChanges,All,HasChange,Errorf,SetId,MustCompile,RetryableError,RemoveDefaultConfig,MergeTags,GetWebACL,ErrCodeEquals,IgnoreConfig,Id,Int64,Get,UpdateWebACL,Split,Map,RateBasedStatementAggregateKey... | The resource schema for the resource that is not referenced by any resource in the current context. expects tags field to be a list of tags. | let's also add these newly defined blocks in `wafv2_web_acl.html.markdown` |
@@ -362,7 +362,7 @@ func configMgmtToGatewayEventCollection(collection []*cmsRes.EventCollection, to
// complianceToGatewayEventCollection converts a compliance-service (feed) timeline "Slots" message
// to a Gateway EventCollection message. A FeedTimeline consists of ActionLines. Each Actionline has
// Timeslots wh... | [CollectEventGuitarStrings->[Join,Error,Errorf],ParseInLocation,Before,Duration,GetFilter,GetHoursBetween,Add,Done,Hours,Error,AddDate,Year,Location,Errorf,Sub,Wait,Round,GetStart,Equal,Date,GetEnd,GetTimezone,LoadLocation,GetFeedTimeline,Month,Day,GetEventStringBuckets,WithFields] | complianceToGatewayEventCollection converts a compliance - service message to a Gateway EventCollection message collectComplianceEventGuitarStrings - collects compliance event guitar strings for a given. | Switching to the new event feed service. |
@@ -53,6 +53,7 @@ namespace StressResponseDefinitions
{ "MZY", TracedStressType::MZY },
{ "MZZ", TracedStressType::MZZ },
{ "PK2", TracedStressType::PK2 },
+ { "VON_MISES_STRESS", TracedStressType::VON_MISES_STRESS }
};
auto stress_type_it = traced_s... | [No CFG could be retrieved] | Get the list of all traced stress types in a sequence of sequence of strings. Get the last available stress type for a given string. | @philbucher this is where it is used, if we change this we would need to adapt the others as well - definitely part of another MR if necessary. |
@@ -29,5 +29,15 @@ namespace System.Runtime.InteropServices
/// </remarks>
public static ref TValue GetValueRefOrNullRef<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull
=> ref dictionary.FindValue(key);
+
+ /// <summary>
+ /// Gets a ref to ... | [CollectionsMarshal->[AsSpan->[_size,_items],GetValueRefOrNullRef->[FindValue]]] | Get a value reference or null ref if key is not null. | Grammar: should read "added to or removed from" |
@@ -260,7 +260,8 @@ func TestRecreate_deploymentMidHookSuccess(t *testing.T) {
func TestRecreate_deploymentPostHookSuccess(t *testing.T) {
config := appstest.OkDeploymentConfig(1)
config.Spec.Strategy = recreateParams(30, "", "", appsapi.LifecycleHookFailurePolicyAbort)
- deployment, _ := appsutil.MakeDeployment(c... | [Pods->[Pods],ReplicationControllers->[ReplicationControllers],fakeScaleClient,scaledOnce] | TestRecreate_deploymentPostHookSuccess tests a deployment after a successful deploy. TestRecreate_deploymentPv2 = > TestRecreate_deploymentPv2. | check the error |
@@ -126,4 +126,12 @@ public abstract class ServletHttpServerTracer<RESPONSE>
}
return spanName;
}
+
+ public void updateServerSpanNameOnce(Context attachedContext, HttpServletRequest request) {
+ if (AppServerBridge.isPresent(attachedContext)
+ && !AppServerBridge.isServerSpanNameUpdatedFromServ... | [ServletHttpServerTracer->[unwrapThrowable->[unwrapThrowable],onRequest->[onRequest],startSpan->[startSpan]]] | Get the span name from the servlet path and context path. | Is this `isPresent` needed here? The result of `if` is the same without it |
@@ -401,10 +401,10 @@ def test_payment_timing_out_if_partner_does_not_respond( # pylint: disable=unus
app0, app1 = raiden_network
token_address = token_addresses[0]
- def fake_receive(room, event): # pylint: disable=unused-argument
- return True
+ def fake_send(room, event): # pylint: disabl... | [test_register_token_insufficient_eth->[get_tokens_list,TokenAmount,burn_eth,wait_for_block,token_network_register,get_block_number,RaidenAPI,raises],test_insufficient_funds->[get,RaidenAPI,isinstance],test_register_token->[Timeout,wait_for_state_change,get_tokens_list,TokenAmount,wait_for_block,token_network_register,... | Test to make sure that when our target does not respond payment times out then the payment will. | umm... what happened here? how did this change all of a sudden from handling receiving a message to `_send_raw`? |
@@ -1307,9 +1307,15 @@ def _get_xy(model):
:param model: H2O Model
:returns: tuple (x, y)
"""
+ names = model._model_json["output"]["original_names"] or model._model_json["output"]["names"]
y = model.actual_params["response_column"]
- x = [feature for feature in model._model_json["output"]["na... | [_get_leaderboard->[no_progress,get],_get_algorithm->[get],pd_plot->[no_progress,_get_top_n_levels,get,_factor_mapper,_add_histogram,NumpyFrame],residual_analysis_plot->[no_progress,get,_get_xy,NumpyFrame],_calculate_clustering_indices->[_flatten_list,sum],no_progress->[no_progress],_flatten_list->[_flatten_list],expla... | Get the x y. . Consolidated varimps with 0 . | I wrote this as a copy of the incorrect R code so I included the fix here to keep it in sync even though the name of the PR suggest it involves just R. |
@@ -607,12 +607,13 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
}
/** @override */
- getAdUrl(consentState, opt_rtcResponsesPromise) {
+ getAdUrl(consentTuple, opt_rtcResponsesPromise) {
if (this.useSra) {
this.sraDeferred = this.sraDeferred || new Deferred();
}
if (
- ... | [AmpAdNetworkDoubleclickImpl->[postTroubleshootMessage->[dict,stringify,now,devAssert,userAgent],extractSize->[height,extractAmpAnalyticsConfig,dev,get,width],getBlockParameters_->[width,height,getFlexibleAdSlotData,isInManualExperiment,serializeTargeting,devAssert,googleBlockParameters,Number],constructor->[user,exten... | Get the url of the Ad. Missing Ad Url. | Same here, consider getAdUrl({consentState, consentString}, ... |
@@ -2,7 +2,11 @@ Rails.application.configure do
# Verifies that versions and hashed value of the package contents in the project's package.json
config.webpacker.check_yarn_integrity = true
- config.action_controller.asset_host = Figaro.env.domain_name
+ config.action_controller.asset_host = proc do |source, r... | [new,formatter,check_yarn_integrity,after_initialize,default_options,domain_name,configure,consider_all_requests_local,asset_host,log_formatter,cache_classes,deprecation,alert,enabled,debug,email_from,bullet_logger,eager_load,ignore_actions,default_url_options,raise_on_missing_translations,enable,perform_caching,rails_... | Configure the package. | I think we don't need this, I didn't actually get this working locally, I think webpacker stuff may not use this? Or it was a caching issue? Anyways we really only care about this for prod anyways |
@@ -59,7 +59,7 @@ class HoodieLogFileReader implements HoodieLogFormat.Reader {
private final FSDataInputStream inputStream;
private final HoodieLogFile logFile;
- private static final byte[] MAGIC_BUFFER = new byte[6];
+ private final byte[] magicBuffer = new byte[6];
private final Schema readerSchema;
... | [HoodieLogFileReader->[close->[close],next->[readBlock],prev->[next,hasNext]]] | Creates a new HoodieLogReader for a log file. This is a private method to allow for lazy initialization of the class. | makes sense to be non-static. |
@@ -139,7 +139,7 @@ function askForClient() {
type: 'list',
name: 'clientFramework',
when: function (response) {
- return (applicationType !== 'microservice');
+ return (applicationType !== 'microservice' && applicationType !== 'uaa');
},
message: funct... | [No CFG could be retrieved] | Get a question which prompts the user to choose which test frameworks to use. Asks for more modules to be installed. | you need to add the condition here as well |
@@ -82,7 +82,9 @@ public class DefaultApplicationFactory implements ArtifactFactory<Application>
parent = getSharedLibClassLoader(descriptor, parent);
- final List<ApplicationPlugin> applicationPlugins = createApplicationPlugins(parent, descriptor.getPlugins());
+ final List<ApplicationPlugin... | [DefaultApplicationFactory->[createAppFrom->[setDeploymentListener]]] | Create an application from the given application descriptor. | Maybe these dependencies can be injected in order to make the class more testable |
@@ -278,9 +278,16 @@ def restock_order_lines(order):
for line in order:
if line.variant and line.variant.track_inventory:
if line.quantity_unfulfilled > 0:
- deallocate_stock(line.variant, country, line.quantity_unfulfilled)
+ deallocate_stock(line, line.quantity... | [restock_fulfillment_lines->[get_order_country],order_needs_automatic_fullfilment->[order_line_needs_automatic_fulfillment],update_order_prices->[recalculate_order],restock_order_lines->[get_order_country],add_variant_to_order->[get_order_country],get_voucher_discount_for_order->[get_products_voucher_discount_for_order... | Return ordered products to corresponding stocks. | The same here. It can be moved outside the for loop. |
@@ -427,6 +427,17 @@ func (c *Config) LoadAndValidate() error {
TokenSource: tokenSource,
}
+ bigtableAdminBasePath := removeBasePathVersion(c.BigtableAdminBasePath)
+ log.Printf("[INFO] Instantiating Google Cloud BigtableAdmin for path %s", bigtableAdminBasePath)
+
+ clientBigtable, err := bigtableadmin.NewServ... | [getTokenSource->[Printf,CredentialsFromJSON,DefaultTokenSource,Background,StaticTokenSource,Errorf,Read],LoadAndValidate->[Printf,getTokenSource,Sprintf,WithHTTPClient,Background,NewService,UserAgentString,NewClient,NewTransport,ParseDuration],ReplaceAllString,MustCompile] | LoadAndValidate loads and validates the configuration. Instantiates GCE Beta and Google Cloud DNS client for all projects. Instantiates all Google Cloud SDK client objects. Instantiates all of the Google Cloud SDK services. | Do you mind adding a logging message similar to other clients? This is mostly for consistency, it can also help with debugging if the value isn't being set. |
@@ -1713,6 +1713,8 @@ def _estimate_rank_meeg_signals(data, info, scalings, tol=1e-4,
thresholded to determine the rank are also returned.
"""
picks_list = _picks_by_type(info)
+ if scalings is None:
+ scalings = dict(mag=1e15, grad=1e13, eeg=1e6)
_apply_scaling_array(data, picks_list,... | [make_ad_hoc_cov->[Covariance],_get_covariance_classes->[_ShrunkCovariance->[fit->[fit]],_RegCovariance->[fit->[fit,Covariance]]],_undo_scaling_array->[_apply_scaling_array],write_cov->[save],Covariance->[__iadd__->[_check_covs_algebra],__add__->[_check_covs_algebra]],_estimate_rank_meeg_signals->[_apply_scaling_array,... | Estimate the rank of the M - EEG signals. | don't we have a scaling default value on the top of the file? |
@@ -339,7 +339,10 @@ public class MetadataInfo implements Serializable {
}
private String getMethodParameter(String method, String key, Map<String, Map<String, String>> map) {
- Map<String, String> keyMap = map.get(method);
+ Map<String, String> keyMap = null;
+ if (... | [MetadataInfo->[ServiceInfo->[toDescString->[getParams,getMatchKey],equals->[getParams,getMatchKey,equals],getMethodSignaturesString->[toString],hashCode->[getParams,getMatchKey],getMethodParameter->[getMethodParameter,getParameter],hasMethodParameter->[getMethodParameter],getParameter],getParameter->[getParameter]]] | Method parameter. | This check can avoid NPE from happing by checking before use, however, I don't think it can resolve the root `methodParams` initialization issue as it has a race condition that needs to be resolved. |
@@ -7,6 +7,7 @@ RSpec.describe MarkdownFixer, type: :labor do
<<~HEREDOC
---
title: #{title}
+ published: false
description: #{description}
---
HEREDOC
| [to,context,underscores_in_usernames,let,fix_all,include,describe,front_matter,eq,add_quotes_to_description,add_quotes_to_title,convert_new_lines,title,it,require,fix_for_preview] | Generates a front matter string of the object. | Suggestion: Is there a end-to-end test (or test for `fix-all`) this could be set to `Published: false` in? |
@@ -39,6 +39,7 @@ class Mpifileutils(AutotoolsPackage):
url = "https://github.com/hpc/mpifileutils/releases/download/v0.6/mpifileutils-0.6.tar.gz"
version('0.6', '620bcc4966907481f1b1a965b28fc9bf')
+ version('0.7', 'c081f7f72c4521dddccdcf9e087c5a2b')
depends_on('mpi')
depends_on('libcirc... | [Mpifileutils->[build_targets->[append],configure_args->[append],variant,depends_on,version]] | Creates a new object with all of the necessary information. Configure the command line options for the given . | Can you put versions in order from newest to oldest? |
@@ -192,6 +192,16 @@ public class OMKeyCommitRequest extends OMKeyRequest {
// Set the UpdateID to current transactionLogIndex
omKeyInfo.setUpdateID(trxnLogIndex, ozoneManager.isRatisEnabled());
+ // If bucket versioning is turned on during the update, between key
+ // creation and key commit,... | [OMKeyCommitRequest->[processResult->[error,debug,size,incNumKeyCommitFails,incNumKeys],preExecute->[getKeyName,setKeyName,validateAndNormalizeKey,getKeyArgs,build,getBoolean,getEnableFileSystemPaths,checkNotNull,getCommitKeyRequest,validateKeyName,removeEnd],validateAndUpdateCache->[acquireWriteLock,getParent,getUserI... | This method is called to validate and update the cache. This method is called from OzoneFSManager. This method is called when a key is being committed. | With this we need extra DB op for read. I see with this change it is required, |
@@ -7,6 +7,11 @@ namespace Dynamo.Logging
/// </summary>
public static class Analytics
{
+ /// <summary>
+ /// Disables all analytics collection (Google, ADP, etc.) for the lifetime of the process.
+ /// </summary>
+ public static bool DisableAnalytics;
+
/// <summary... | [Analytics->[TrackScreenView->[TrackScreenView],ShutDown->[Dispose,ShutDown],TrackException->[TrackException],TrackEvent->[TrackEvent],TrackTimedEvent->[TrackTimedEvent],Start->[Start],LogPiiInfo->[LogPiiInfo],TrackPreference->[TrackPreference]]] | Creates a generic base class for an application name and a time span. Magic number of events that can be tracked. | Is this using or setting the `AnalyticsUtils.DisableAnalyticsForProcessLifetime` property from Analytics.NET repo? |
@@ -125,6 +125,9 @@ class GlobalOptionsRegistrar(SubsystemClientMixin, Optionable):
'["DEPRECATED: scope some_scope will be removed"]. The regexps will be matched '
'from the start of the warning string, and will always be case-insensitive. '
'See the `warnings` ... | [GlobalOptionsRegistrar->[register_options->[register_bootstrap_options]],ExecutionOptions] | Register bootstrap options. Adds options related to the pants - version pants - runtime - python - version and This function is called by pants to find a sequence of packages that are available in the Registers all options that require a specific sequence number. | Minor - typo (`auggestions`) |
@@ -11,7 +11,7 @@ namespace System.Buffers.Text
{
private static bool TryParseByteN(ReadOnlySpan<byte> source, out byte value, out int bytesConsumed)
{
- if (source.Length < 1)
+ if (source.IsEmpty)
goto FalseExit;
int index = 0;
| [Utf8Parser->[TryParseByteN->[Length,Comma,MaxValue,IsDigit,Period],TryParseUInt64N->[Length,Comma,MaxValue,IsDigit,Period],TryParseUInt16N->[Length,Comma,MaxValue,IsDigit,Period],TryParseUInt32N->[Length,Comma,MaxValue,IsDigit,Period]]] | TryParseByteN parses a byte in the source string and returns the parsed value. If Checks if the fractional portion of the input string contained a non - zero digit. | It'd be great to pick one or two examples and validate that the assembly the JIT generates after this change is at least as good. It should be, if not better, but we should double-check, as some of these are likely hot-paths. |
@@ -43,7 +43,7 @@ except ImportError:
cmd = popenargs[0]
raise CalledProcessError(retcode, cmd)
return output
-from sys import exit, version_info
+import sys
from tempfile import mkdtemp
try:
from urllib2 import build_opener, HTTPHandler, HTTPSHandler
| [hashed_download->[HashError,read_chunks,opener],main->[get_index_base,hashed_download,check_output],main] | Check the output of a command and return the result. | Just in case you didn't know, it's perfectly possible to import some things deep from a module and other things shallow. |
@@ -64,6 +64,8 @@ namespace System
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern double Sin(double a);
+ public static (double Sin, double Cos) SinCos(double x) => (Sin(x), Cos(x));
+
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern doubl... | [Math->[Atanh->[InternalCall],Log10->[InternalCall],Acosh->[InternalCall],Tan->[InternalCall],Sin->[InternalCall],Tanh->[InternalCall],FMod->[InternalCall],Exp->[InternalCall],ILogB->[InternalCall],Pow->[InternalCall],Cos->[InternalCall],Atan2->[InternalCall],Asin->[InternalCall],FusedMultiplyAdd->[InternalCall],Asinh-... | double Sinh = Sinh ;. | @marek-safar, could I get sign off from you on the Mono changes here and could you let me know if there should be a tracking issue for any hook ups required on the Mono side? |
@@ -48,6 +48,17 @@ if ($vars['value'] == ACCESS_DEFAULT) {
}
if (is_array($vars['options_values']) && sizeof($vars['options_values']) > 0) {
+
+ if ($vars['value'] && !array_key_exists($vars['value'], $vars['options_values']) && $container && $container->canEdit()) {
+ // editing entity where access_id is a custom... | [getContentAccessMode] | View the access control. | I wonder if this code will cause a nasty merge conflict with #7766 (now in 1.x). |
@@ -24,10 +24,12 @@ print(__doc__)
# Set parameters and paths
plt.rcParams['image.cmap'] = 'gray'
-im_path = op.join(op.dirname(mne.__file__), 'data', 'image', 'mni_brain.gif')
+
+im_path = op.join(op.dirname(__file__), '..', '..', 'mne', 'data', 'image',
+ 'mni_brain.gif')
# We've already click... | [average,randn,imshow,hstack,print,arange,dirname,EpochsArray,imread,read_layout,len,plot_topo,join,zeros,create_info] | This function opens an image file then uses generate_2d_layout to turn those xy - The type of the block in the layout. | you cannot assume the example file is at a fixed place on disk. The previous option is more robust. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.