patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -674,6 +674,16 @@ module PermissionHelper
is_normal_user_or_admin_of_organization(organization)
end
+ def can_edit_custom_field(custom_field)
+ custom_field.user == current_user ||
+ is_admin_of_organization(custom_field.organization)
+ end
+
+ def can_delete_custom_field(custom_field)
+ cust... | [can_view_module_samples->[can_view_module],can_clone_protocol->[is_normal_user_or_admin_of_organization],can_view_project_notifications->[can_view_project],can_add_user_to_project->[is_owner_of_project],can_archive_module->[is_user_or_higher_of_project],can_view_or_download_result_assets->[can_view_project,is_member_o... | Check if the user can create a custom field in an organization. | In specs it says you have to be Admin only for deleting custom columns. So I assume you don't have to be one for editing. |
@@ -123,8 +123,9 @@ public class LocalConfigStorage extends ConfigStorage {
Path destinationFilePath = defaultFileSystem.getPath(file.getCanonicalPath());
try {
file.getParentFile().mkdirs();
- Files.move(tempFile.toPath(), destinationFilePath,
- StandardCopyOption.ATOMIC_MOVE);
+ ... | [LocalConfigStorage->[atomicWriteToFile->[write,getDefault,deleteOnExit,getCanonicalPath,FileOutputStream,mkdirs,toPath,move,close,toFile,getPath,delete],loadInterpreterSettings->[readFromFile,info,warn,exists,buildInterpreterInfoSaving],readFromFile->[FileInputStream,toString],save->[info,getAbsolutePath,atomicWriteTo... | Atomically writes content to a file. | this extra file operation can be costly in some storage system? also if the operation fails we need to clean up an extra file? L131 for example |
@@ -3,10 +3,15 @@
"""
from __future__ import absolute_import
+from ...properties import abstract
from ...properties import Int, String
from ..widget import Widget
-class Paragraph(Widget):
+@abstract
+class Markup(Widget):
+ """ Base class for HTML markup widget models. """
+
+class Paragraph(Markup):
"... | [Paragraph->[String,Int]] | A widget that contains a block of markup. | Is this just clean up along the way? |
@@ -21,6 +21,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.config.xml.AbstractOutboundChannelAdapterParser;
+impor... | [GemfireOutboundChannelAdapterParser->[parseConsumer->[getAttribute,hasAttribute,error,getBeanDefinition,genericBeanDefinition,parseMapElement,addConstructorArgReference,getChildElementByTagName,addPropertyValue]]] | Creates a new instance of the GemfireOutboundChannelAdapterParser which parses a single Adds a cache writing message handler to the given element. | Unused import. Revert changes |
@@ -76,6 +76,11 @@ public class IncrementalIndexSchema
return metrics;
}
+ public boolean isRollup()
+ {
+ return rollup;
+ }
+
public static class Builder
{
private long minTimestamp;
| [IncrementalIndexSchema->[Builder->[withTimestampSpec->[getTimestampSpec],withDimensionsSpec->[getDimensionsSpec],build->[IncrementalIndexSchema]]]] | Returns the metrics for this aggregator. | minor nit : would be nice If we can extract it as a constant somewhere, DEFAULT_ROLLUP, will be helpful if we plan to change the default in future. |
@@ -1058,7 +1058,7 @@ def is_verbose(manager: BuildManager) -> bool:
def target_from_node(module: str,
- node: Union[FuncDef, MypyFile, OverloadedFuncDef, LambdaExpr]
+ node: Union[FuncDef, MypyFile, OverloadedFuncDef, LambdaExpr, Decorator]
) -> Option... | [lookup_target->[lookup_target,not_found],update_module_isolated->[ensure_trees_loaded,restore],find_symbol_tables_recursive->[find_symbol_tables_recursive,update],FineGrainedBuildManager->[update_module->[update]],ensure_trees_loaded->[find_unloaded_deps]] | Returns the target name corresponding to a deferred node. | Again, could we prevent this function from being called with a `Decorator` argument earlier on? |
@@ -769,12 +769,12 @@ namespace System
// Return any exact bindings that may exist. (This method is not defined on the
// Binder and is used by RuntimeType.)
- public static MethodBase? ExactBinding(MethodBase[] match, Type[] types, ParameterModifier[]? modifiers)
+ public static Runt... | [DefaultBinder->[FindMostDerivedNewSlotMeth->[GetHierarchyDepth],FindMostSpecificMethod->[FindMostSpecific]]] | ExactBinding finds the most derived slot method that matches the given match. | Using RuntimeConstructorInfo will make sharing of this code problematic with NativeAOT. DefaultBinder is a super slow path. An extra casts here won't make difference. |
@@ -280,7 +280,7 @@ public class ReferenceConfig<T> extends AbstractReferenceConfig {
map.put(SIDE_KEY, CONSUMER_SIDE);
appendRuntimeParameters(map);
- if (!isGeneric()) {
+ if (!Boolean.valueOf(getGeneric())) {
String revision = Version.getVersion(interfaceClass, version)... | [ReferenceConfig->[destroy->[destroy],finalize->[finalize],createProxy->[get],get->[checkAndUpdateSubConfigs],setInterface->[setInterface]]] | Initializes the object. This method is called by the application code to register the device with the application model. | getGeneric() can return non-boolean-literal value, such as 'bean' or 'nativejava' |
@@ -40,8 +40,10 @@ class RIranges(RPackage):
homepage = "https://www.bioconductor.org/packages/IRanges/"
url = "https://git.bioconductor.org/packages/IRanges"
list_url = homepage
+
+ version('2.12.0', git='https://git.bioconductor.org/packages/IRanges', commit='1b1748655a8529ba87ad0f223f035ef0c08... | [RIranges->[depends_on,version]] | This function returns a list of all the possible versions of the IRAF system. | I assume these dependencies are needed for all versions of `r-iranges`? |
@@ -149,6 +149,7 @@ def main(unused_argv):
control_address=service_descriptor.url,
worker_count=_get_worker_count(sdk_pipeline_options),
worker_id=_worker_id,
+ state_cache_size=_get_state_cache_size(sdk_pipeline_options),
profiler_factory=profiler.Profile.factory_from_options... | [main->[start,StatusServer],StatusServer->[start->[StatusHttpHandler->[do_GET->[get_thread_dump]]]],main] | Main entry point for SDK Fn Harness. Get a lease from the SDK. | It might be better to pass the pipeline options to SDKHarness and have it extract what it needs. There is currently quite some (parameter related) noise wherever SdkHarness is constructed in general. |
@@ -49,6 +49,14 @@ public class ReloadResult {
return deployedBundles;
}
+ public Stream<Bundle> deployedBundlesAsStream() {
+ return deployedBundles().stream();
+ }
+
+ public Stream<File> deployedFilesAsStream() {
+ return deployedBundlesAsStream().map(Bundle::getLocation).map(F... | [ReloadResult->[merge->[addAll]]] | merge bundles. | missing since annotation |
@@ -3,6 +3,7 @@ from collections import OrderedDict
from contextlib import contextmanager
from funcy import reraise
+from jinja2 import Template
from ruamel.yaml import YAML
from ruamel.yaml.error import YAMLError
| [dumps_yaml->[_dump],_dump->[_get_yaml],parse_yaml->[YAMLFileCorruptedError],parse_yaml_for_update->[parse_yaml]] | Creates a class which can be used to create a new object of type . Get a object from a YAML file. | Hm, not quite sure that jinja template is the best format we can use in dvc files, feels like it is still a bit unusual, at least coming from python. It is mature and powerful though, no doubt about it :slightly_smiling_face: |
@@ -44,8 +44,8 @@ type Server struct {
// Map of authenticator IDs to authenticators.
// Note: dex wraps this with a ResourceVersion, but that is due to storing
// connectors in the database -- we don't do this
+ TokenStorage tokens.Storage
authenticators map[string]authenticator.Authenticator
- token... | [fetchLocalTeams->[Wrapf,GetName,GetTeamsForUser,GetTeams],ServeHTTP1->[Handle,ListenAndServe,NewServeMux],Serve->[RegisterAuthenticationHandlerFromEndpoint,Listen,NewGRPCServer,DialOptions,Background,ServeHTTP1,NewServeMux,Wrap,Info,WithIncomingHeaderMatcher,Serve],NewFactory,Wrap,Dial,Cause,New,GetTokenIDWithValue,Wr... | NewServer creates a new server from the provided config. NewGRPCServer creates a new gRPC server for the authentication service. | could we rename this to TokenService or Server? Tokens needs a refactor in general but that would make it slightly more consistent with authz/teams service naming |
@@ -432,7 +432,7 @@ __palettes__ = [
"Greens3", "Greens4", "Greens5", "Greens6", "Greens7", "Greens8", "Greens9",
"Oranges3", "Oranges4", "Oranges5", "Oranges6", "Oranges7", "Oranges8", "Oranges9",
"Reds3", "Reds4", "Reds5", "Reds6", "Reds7", "Reds8"... | [_cmap_func_generator->[func->[int,linspace,floor,len]],dict,_cmap_func_generator,update] | Returns a list of all possible values for the given sequence. Returns a list of all known components. Returns a list of all known types of variables. | Missing a comma. I'd also remove the extra whitespace (not try to align with vertically with other 256 palettes) and just put it in the next sequential column after `Greys9`. |
@@ -175,11 +175,14 @@ class AutotoolsPackage(PackageBase):
tty.msg('Skipping default sanity checks [method `check` not implemented]') # NOQA: ignore=E501
def check(self):
- """Default test : search the Makefile for targets `test` and `check`
- and run them if found.
+ """Run ma... | [AutotoolsPackage->[configure->[configure_args],patch->[do_patch_config_guess]]] | Default test method. | I wouldn't change the `check` method here. If you need some custom behavior for `Blitz++` it's better to code it in the package. |
@@ -515,6 +515,11 @@ func (h *Harvester) newLogFileReader() (reader.Reader, error) {
return nil, err
}
+ if h.config.DockerJSON {
+ // Docker json-file format, add custom parsing to the pipeline
+ r = reader.NewDockerJSON(r)
+ }
+
if h.config.JSON != nil {
r = reader.NewJSON(r, h.config.JSON)
}
| [cleanup->[SendStateUpdate],Stop->[stop],Setup->[open]] | newLogFileReader returns a new log file reader. | It's interesting that form an implementation point of view it just comes down to adding a reader in the harvester (simplified). Seems like the log harvester is pretty generic and perhaps should be extracted. Prospectors then could configure "readers" on the harvester. (just thinking out loud for later and @urso was als... |
@@ -13,6 +13,8 @@ import QueryError from 'components/QueryError'
import query from 'queries/Reviews'
import EthAddress from './EthAddress'
+import LoadingSpinner from 'components/LoadingSpinner'
+
export default class Reviews extends Component {
readMore(fetchMore, after) {
fetchMore({
| [No CFG could be retrieved] | Component that renders a single node in a chain of Reviews. Notify on network status change. | It may just be me, but I like to keep all the sibling `import`s grouped together, aka this one on line 11, perhaps. |
@@ -53,7 +53,7 @@ def open_and_wait_for_channels(app_channels, registry_address, token, deposit, s
settle_timeout,
)
)
- gevent.wait(greenlets)
+ gevent.joinall(set(greenlets), raise_error=True)
wait_for_channels(app_channels, registry_address, [token], deposit)
| [test_regression_unfiltered_routes->[open_and_wait_for_channels],test_regression_payment_complete_after_refund_to_the_initiator->[open_and_wait_for_channels]] | Open and wait for all channels. | Nitpick, why not make `greenlets` a set in the first place? |
@@ -2848,7 +2848,10 @@ class TestCreateAddon(BaseUploadTest, TestCase):
self.post(is_listed=False)
addon = Addon.with_unlisted.get()
assert not addon.is_listed
- assert addon.latest_version.channel == amo.RELEASE_CHANNEL_UNLISTED
+ version = addon.find_latest_version(
+ ... | [TestSubmitBase->[get_version->[get_addon],setUp->[get_addon]],TestRequestReview->[check_400->[post],test_renominate_for_full_review->[check,get_version],test_renomination_doesnt_reset_nomination_date->[get_version],check->[post,get_addon],test_public->[check_400]],TestAPIAgreement->[test_agreement_second->[post]],Test... | Test success and unlisted. | heh, one would hope so |
@@ -61,13 +61,13 @@ type TemplateInstanceController struct {
}
// NewTemplateInstanceController returns a new TemplateInstanceController.
-func NewTemplateInstanceController(config *rest.Config, oc client.Interface, kc kclientsetinternal.Interface, templateclient templateclient.Interface, informer internalversion.T... | [sync->[getTemplateInstance,copyTemplateInstance],processNextWorkItem->[sync],instantiate->[Run,copyTemplate]] | NewTemplateInstanceController returns a new TemplateInstanceController. Get the current state of the plugin. | Why not just passing `buildclient.BuildInterface` here? I doubt you'll be needing the `Discovery` part of that `Interface` |
@@ -419,7 +419,7 @@ func resourceComputeInstanceGroupManagerRead(d *schema.ResourceData, meta interf
}
manager, err := getManager(d, meta)
- if err != nil {
+ if err != nil || manager == nil {
return err
}
| [Patch,SetPartial,SetNamedPorts,Delete,StringInSlice,Partial,Set,Error,GetOk,HasChange,RecreateInstances,Errorf,SetId,SetAutoHealingPolicies,Timeout,Do,Contains,Id,SetInstanceTemplate,Get,SetTargetPools,Printf,Resize,Sprintf,ListManagedInstances,WaitForState,Insert,IntBetween,Sleep] | Get the object of the resource that we have if it s not imported. update_strategy. ( string ). | This additional condition will cause some unexpected results, I think - you'll return `nil` as the error, where I think you probably want something like `fmt.Errorf("Instance Group Manager %s does not exist", d.Id())`. What do you think? |
@@ -260,6 +260,10 @@ class TextAnalyticsClient(TextAnalyticsClientBase):
be used for scoring, e.g. "latest", "2019-10-01". If a model-version
is not specified, the API will default to the latest, non-preview version.
:keyword bool show_stats: If set to true, response will contain docu... | [TextAnalyticsClient->[recognize_entities->[process_http_response_error,pop,update,_validate_input,entities_recognition_general],analyze_sentiment->[process_http_response_error,NotImplementedError,pop,update,str,sentiment,_validate_input],detect_language->[process_http_response_error,_validate_input,languages,pop],extr... | Recognize entities containing personal information for a batch of documents. Recognize personally identifiable information entities in a batch of documents. | believe it's "Protected Healthcare Information" |
@@ -8,6 +8,7 @@ module Users
virtual_articles = user.articles.map { |article| Article.new(article.attributes) }
user.articles.find_each do |article|
article.reactions.delete_all
+ article.buffer_updates.delete_all
article.comments.includes(:user).find_each do |comment|
... | [call->[bust_article,new,attributes,user,purge,each,delete,bust_comment,any?,bust_user,delete_all,remove_algolia_index,find_each,commentable,map]] | Remove all articles of a user that have no virtual articles. | @Zhao-Andy Please let me know if there's anything else we need to do in regards to this. |
@@ -272,6 +272,17 @@ def set_experiment(experiment_config, mode, port, config_file_name):
def launch_experiment(args, experiment_config, mode, config_file_name, experiment_id=None):
'''follow steps to start rest server and start experiment'''
nni_config = Config(config_file_name)
+
+ # check packages for ... | [set_remote_config->[get_log_path,set_trial_config],set_experiment->[get_log_path],print_log_content->[get_log_path],launch_experiment->[set_remote_config,set_experiment,print_log_content,start_rest_server,set_pai_config,set_kubeflow_config,set_frameworkcontroller_config,set_local_config],start_rest_server->[get_log_pa... | Launch the experiment. Set config on remote or local machine This function is called from the CLI to set the config and start a new experiment Returns a new instance of the class that will be used to create the class. | @chicm-ms do you have any concern here? |
@@ -585,6 +585,9 @@ class Exchange(object):
def refresh_latest_ohlcv(self, pair_list: List[Tuple[str, str]]) -> List[Tuple[str, List]]:
"""
Refresh in-memory ohlcv asyncronously and set `_klines` with the result
+ Loops asyncroneously over pair_list and dowloads all pairs async (semi-paral... | [retrier->[wrapper->[wrapper]],Exchange->[cancel_order->[cancel_order],get_trades_for_order->[exchange_has],create_order->[symbol_amount_prec,symbol_price_prec,create_order],buy->[create_order,dry_run_order],validate_pairs->[markets],sell->[create_order,dry_run_order],get_valid_pair_combination->[markets],_load_markets... | Refresh the latest ohlcv data for the given pair_list. | space after the comma (yes, I'm a kind of grammar-nazi, sorry) |
@@ -170,7 +170,8 @@ func (s *authzServer) FilterAuthorizedProjects(
}, nil
}
-func isBeta2p1(version api.Version) bool {
+func (s *authzServer) isBeta2p1() bool {
+ version := s.vSwitch.Version
return version.Major == api.Version_V2 && version.Minor == api.Version_V1
}
| [FilterAuthorizedPairs->[V2FilterAuthorizedPairs,Error,Subjects],getAllProjects->[ContextWithoutProjects,Error,ListProjects],Interceptor->[New,WithDetails,Errorf,HasPrefix,Err],FilterAuthorizedProjects->[ContextWithoutProjects,Error,SliceContains,ListProjects,Subjects,V2FilterAuthorizedProjects],ProjectsAuthorized->[V2... | FilterAuthorizedProjects returns a list of projects that are authorized to access ListProjects never returns UnassignedProjectIDException because it s not available in the ListProjects. | It's a bit of a hack, but fine, I expected eventually regretting that this field is public After all, we've already got a "re-architect `authz-service`" card in the backlog. |
@@ -113,14 +113,14 @@ void MPMGridLineLoadCondition2D::CalculateAll(
noalias( rRightHandSideVector ) = ZeroVector( mat_size ); //resetting RHS
}
- IntegrationMethod integration_method = IntegrationUtilities::GetIntegrationMethodForExactMassMatrixEvaluation(rGeom);
+ IntegrationMethod integration_m... | [No CFG could be retrieved] | Get the element of the system that is not part of the system. pressure - on - condition - on - nodes - pressure - on - conditions - node. | could be r_DN_De |
@@ -10,7 +10,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Shared.Damage.Container
{
/// <summary>
- /// Prototype for the DamageContainer class.
+ /// Prototype for DamageableComponents.
/// </summary>
[Prototype("damageContainer")]
[Serializable, NetSerializable]
| [DamageContainerPrototype->[AfterDeserialization->[IoCManager,DamageTypes,_prototypeManager,Add]]] | DamageContainerPrototype is the base DamageContainer class. - The number of objects in the DamageGroup that are not supported by this. | what is this doc meant to convey? |
@@ -96,6 +96,12 @@ public class GobblinServiceFlowConfigResourceHandler implements FlowConfigsResou
String flowName = flowConfig.getId().getFlowName();
String flowGroup = flowConfig.getId().getFlowGroup();
+ if (flowConfig.getProperties().containsKey(ConfigurationKeys.FLOW_EXECUTION_ID_KEY)) {
+ thr... | [GobblinServiceFlowConfigResourceHandler->[deleteFlowConfig->[deleteFlowConfig],partialUpdateFlowConfig->[updateFlowConfig,getFlowConfig],getFlowConfig->[getFlowConfig],updateFlowConfig->[updateFlowConfig],createFlowConfig->[createFlowConfig]]] | This method creates a flowConfig in the cluster. | Will this be executed only in master mode? |
@@ -1488,7 +1488,13 @@ public abstract class AbstractJournalStorageManager extends CriticalComponentImp
beforeStart();
- singleThreadExecutor = executorFactory.getExecutor();
+ ThreadFactory tFactory = AccessController.doPrivileged(new PrivilegedAction<ThreadFactory>() {
+ @Override
+ ... | [AbstractJournalStorageManager->[confirmPendingLargeMessage->[getContext],getContext->[getContext],storePageCompleteTransactional->[generateID],storePendingCounter->[generateID,readUnLock,readLock],storeDuplicateID->[getContext,readUnLock,readLock],deleteMessage->[getContext,readUnLock,readLock],prepare->[getContext,re... | Start the managed thread. | nope.. that's wrong... executorFactory.getExecutor() is returning on thread executor from the pool. it won't always be the same thread.. but it will always be the same context.. this patch is not valid. in what situation do you see a deadlock. hornetq it might be different.. I would need a test to be able to accept a p... |
@@ -99,6 +99,17 @@ public class OrFilter implements BooleanFilter
return filters.stream().allMatch(Filter::canVectorizeMatcher);
}
+ @Override
+ public boolean shouldUseIndex(BitmapIndexSelector bitmapIndexSelector)
+ {
+ for (Filter f : filters) {
+ if (!f.shouldUseIndex(bitmapIndexSelector)) {
+ ... | [OrFilter->[makeVectorMatcher->[match->[match],makeVectorMatcher],supportsSelectivityEstimation->[supportsSelectivityEstimation],supportsBitmapIndex->[supportsBitmapIndex],getBitmapResult->[getBitmapResult],estimateSelectivity->[estimateSelectivity],makeMatcher->[matches->[matches],makeMatcher]]] | Makes a ValueMatcher if all of the filters in this list can be vectorized. | Looks like this impl of `shouldUseIndex()` and `supportsBitmapIndex()` could be moved up to `BooleanFilter` and `AndFilter` could also use them. |
@@ -209,11 +209,7 @@ namespace System.Numerics
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
{
- return new Vector4(
- value1.X + (value2.X - value1.X) * amount,
- value1.Y +... | [Vector4->[ToString->[ToString],Equals->[Equals],GetHashCode->[GetHashCode]]] | Lerp - Smaller version of Vector4. | Why not just `value1 + (value2 - value1) * amount`? It keeps the same ordering as we had originally (even if the eventual order of ops is still the same) and relies on the existing JIT optimization around `Vector4 * float`... |
@@ -1362,6 +1362,7 @@ export class ResourcesImpl {
// Build all resources visible, measured, and in the viewport.
if (
!r.isBuilt() &&
+ !r.isBuilding() &&
!r.hasOwner() &&
r.hasBeenMeasured() &&
r.isDisplayed() &&
| [No CFG could be retrieved] | Phase 3 - Sets all elements in the viewport just before they are actually visible. Fix the top - coord of the fixed elements. | Why did this not exist beforehand / why add it now? |
@@ -78,7 +78,8 @@ public class SchedulerUtilsTest {
jobProps3.setProperty("k8", "a8");
jobProps3.setProperty("k9", "${k8}");
// test-job-conf-dir/test1/test11/test111.pull
- jobProps3.store(new FileWriter(new File(subDir11, "test111.pull")), "");
+ final File jobsProps3File = new File(subDir11, "te... | [SchedulerUtilsTest->[testLoadJobConfigs->[assertTrue,size,loadJobConfigs,getProperty,get,containsKey,setProperty,Properties,assertEquals],tearDown->[File,fullyDelete],testLoadJobConfigsWithDoneFile->[size,loadJobConfigs,getProperty,get,copy,setProperty,Properties,File,assertEquals],setUp->[mkdirs,setProperty,Propertie... | Sets up the sequence of properties that are not part of the job. region test - job - conf - dir. | Why you explicitly make it a final? |
@@ -362,7 +362,7 @@ function groups_entity_menu_setup($hook, $type, $return, $params) {
/* @var ElggMenuItem $item */
foreach ($return as $index => $item) {
- if (in_array($item->getName(), array('access', 'likes', 'unlike', 'edit', 'delete'))) {
+ if (in_array($item->getName(), array('access', 'edit', 'delete'... | [groups_access_default_override->[getContentAccessMode],groups_set_icon_url->[exists,setFilename],groups_write_acl_plugin_hook->[getContentAccessMode,canWriteToContainer],groups_entity_menu_setup->[getMembers,isPublicMembership,getName],groups_setup_sidebar_menus->[getGUID,isPublicMembership,canEdit],groups_user_entity... | Setup menu for groups entity Add action tokens to the featured menu. | this should have been left intact... the menu items were remove probably for aesthetic reasons and not to 'disable' liking on groups (as that is current possible with stock Elgg, but only via the river entity menu). |
@@ -109,7 +109,17 @@ public class TypeAnnotationParser {
*/
public static AnnotatedType buildAnnotatedSupertype(Class clazz) {
byte[] attr = getAttributeData(clazz);
- AnnotatedType annotatedSuperclass = sun.reflect.annotation.TypeAnnotationParser.buildAnnotatedSuperclass(attr, AnnotationParser.getConstantPoo... | [TypeAnnotationParser->[buildAnnotatedInterfaces->[buildAnnotatedInterfaces,getAttributeData],buildAnnotatedSupertype->[getAttributeData],getAttributeData->[getTypeAnnotationsData]]] | Build an annotated supertype from the given class. | here you should use `Integer.toUnsignedLong(Unsafe.getUnsafe().getInt(attr, offset));` I believe this is the cause for the sign extension. You'll need this change in a couple other places as well. |
@@ -224,6 +224,15 @@ static int verify_chain(X509_STORE_CTX *ctx)
ctx->param->flags);
CB_FAIL_IF(err != X509_V_OK, ctx, NULL, ctx->error_depth, err);
+ /* In the non-DANE case (re-)check direct trust in the root of the chain */
+ if (!DANETLS_ENABLED(ctx->dane)) {
+ ... | [No CFG could be retrieved] | Verify chain signature and expiration times. finds the n - node node in the tree that matches the path. | The DANE case can be more strict than non-DANE when the matched TLSA record is PKIX-TA(0) or PKIX-EE(1) so such a check would need to also happen in that case (and not with DANE-TA(2)/DANE-EE(3)). BUT: I think this PR is not warranted. Test coverage should ensure that build chains correctly, and I don't see much point ... |
@@ -223,6 +223,10 @@ const (
StandardVMType = "standard"
// DefaultRunUnattendedUpgradesOnBootstrap sets the default configuration for running a blocking unattended-upgrade on Linux VMs as part of CSE
DefaultRunUnattendedUpgradesOnBootstrap = true
+ // DefaultEnableUnattendedUpgrades sets the default configuratio... | [No CFG could be retrieved] | DefaultMaximumLoadBalancerRuleCount sets the default values for the loadbalancer rule Set the default values for the AzureStackAcceleratedNetworking and AzureStackAcceleratedNetworking settings. | Could you please change this default to `false`? |
@@ -42,10 +42,11 @@ class AuthHandler(object):
form of :class:`letsencrypt.achallenges.AnnotatedChallenge`
"""
- def __init__(self, dv_auth, cont_auth, acme, account):
+ def __init__(self, config, dv_auth, cont_auth, acme, account):
self.dv_auth = dv_auth
self.cont_auth = cont_au... | [_report_failed_challs->[dict,getUtility,add_message,setdefault,_generate_failed_chall_msg,itervalues],_find_smart_path->[AuthorizationError,enumerate,fatal,get],_find_dumb_path->[append,len,set,isinstance,add,enumerate,is_preferred],_generate_failed_chall_msg->[dict,append,sorted,setdefault,format,join],gen_challenge_... | Initialize the object with the values of the nanoseconds. | move it up, order the same as in function args |
@@ -19,6 +19,7 @@ class ResolveRequirements(ResolveRequirementsTaskBase):
def execute(self):
req_libs = self.context.targets(has_python_requirements)
- if req_libs:
+ dist_tgts = self.context.targets(is_local_python_dist)
+ if req_libs or dist_tgts:
pex = self.resolve_requirements(req_libs)
... | [ResolveRequirements->[execute->[targets,resolve_requirements,register_data]]] | Execute the task. | I'm not seeing how `dist_tgts` is used here? ..but maybe `has_python_requirements` should be expanded to also match `PythonDistribution` targets if they now provide a resolvable requirement on the surface? |
@@ -311,7 +311,14 @@ async function depCheck() {
.then(runRules)
.then(errorsFound => {
if (errorsFound) {
- process.exit(1);
+ log(
+ yellow('NOTE:'),
+ 'If a dependency is valid, add it to one of the whitelists in',
+ cyan('build-system/dep-check-config.js')
+... | [No CFG could be retrieved] | Get the from the given modules. The dependency check module. | nit: outputting this after the task failed is a little redundant because the error logging is so clear now |
@@ -43,10 +43,10 @@ final class ImmutableConfiguration extends AbstractCapableDescribed implements C
Set<Object> capabilities)
{
super(name, description, capabilities);
- checkNullOrRepeatedNames(parameters, "parameters");
+ validateRepeatedNames(paramet... | [ImmutableConfiguration->[checkArgument,immutableList,checkNullOrRepeatedNames]] | Creates an immutable configuration with the given name description and parameters. | Use dynamic imports if possible |
@@ -121,7 +121,7 @@ public class AppenderatorImpl implements Appenderator
private final IndexIO indexIO;
private final IndexMerger indexMerger;
private final Cache cache;
- private final Map<SegmentIdWithShardSpec, Sink> sinks = new ConcurrentHashMap<>();
+ private final ConcurrentHashMap<SegmentIdWithShardS... | [AppenderatorImpl->[abandonSegment->[apply->[close],getBytesInMemory,pushBarrier,add],getBytesInMemory->[getBytesInMemory],persistHydrant->[createPersistDirIfNeeded],getQueryRunnerForIntervals->[getQueryRunnerForIntervals],createPersistDirIfNeeded->[computeIdentifierFile,computePersistDir],getQueryRunnerForSegments->[g... | Creates a new Appenderator implementation that can be used to collect data from a single segment. | Same, change `ConcurrentHashMap` to `ConcurrentMap`. |
@@ -86,6 +86,7 @@ type Connection struct {
URL string
Username string
Password string
+ ApiKey string
Headers map[string]string
http *http.Client
| [RequestURL->[Marshal,Reader,execRequest,Warn],publishEvents->[sendBulkRequest,Reset,init,NewBatch,Failed,Now,Duplicate,GetVersion,Acked,Err,Sub,ErrTooMany,Dropped],Test->[Warn,Dial,Port,Connect,TestTLSDialer,NetDialer,Hostname,String,Fatal,Parse,Info,TestNetDialer,Run],execRequest->[NewRequest,execHTTPRequest,AddHeade... | Connection manages the connection for a given Elasticsearch client. missing name error. | struct field ApiKey should be APIKey |
@@ -67,9 +67,9 @@ CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(cipher_generic)
CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(cipher_generic)
static const OSSL_PARAM cipher_known_settable_ctx_params[] = {
- OSSL_PARAM_int(OSSL_CIPHER_PARAM_KEYLEN, NULL),
- OSSL_PARAM_int(OSSL_CIPHER_PARAM_PADDING, NULL),
- OSSL_PARAM_... | [No CFG could be retrieved] | region SetCipherParams Method cipher_aead_gettable_ctx_params - Gettable cipher functions for get. | Again, really? I don't think it is a length. |
@@ -46,8 +46,8 @@ class WarehouseQueries(graphene.ObjectType):
@traced_resolver
def resolve_warehouse(self, info, **data):
warehouse_pk = data.get("id")
- warehouse = graphene.Node.get_node_from_global_id(info, warehouse_pk, Warehouse)
- return warehouse
+ _, id = from_global_id_... | [StockQueries->[resolve_stocks->[all],resolve_stock->[get_node_from_global_id,get],ID,Field,FilterInputConnectionField,StockFilterInput,permission_required],WarehouseMutations->[Field],WarehouseQueries->[resolve_warehouses->[all],resolve_warehouse->[get_node_from_global_id,get],Field,FilterInputConnectionField,Argument... | Resolve a Warehouse object from the given data. | Maybe we should extract ORM to dedicated resolvers file like we've done in many other places? |
@@ -25,8 +25,7 @@ class ParallelNetcdf(AutotoolsPackage):
return url.format(version.dotted)
- version('develop', branch='develop')
- version('master', branch='master')
+ version('develop', branch='master')
version('1.12.1', sha256='56f5afaa0ddc256791c405719b6436a83b92dcd5be37fe860dea103aee825... | [ParallelNetcdf->[install->[make],url_for_version->[Version,format],configure_args->[append,format,extend,satisfies],variant,depends_on,version]] | Returns the URL for a specific version of the ParallelNetcdf. | Why these changes? |
@@ -20,7 +20,7 @@ module BadgeRewarder
# ID 3 is the proper ID in prod. We should change in future to ENV var.
badge_id = Badge.find_by(slug: "beloved-comment")&.id || 3
Comment.where("positive_reactions_count > ?", 24).find_each do |comment|
- message = "You're DEV famous! [This is the comment](htt... | [award_top_seven_badges->[award_badges],award_streak_badge->[pluck,times,award_badges,where,any?,username,find_each],award_yearly_club_badges->[create,id,pluralize,find_by!,valid?,each,save,find_each],award_tag_badges->[path,slug,pluck,award_badges,title,first,name,username,find_each],award_contributor_badges->[award_b... | Award beloved comment badges. | should we rename this to `famous` instead of `DEV famous` ? Or use `COMMUNITY_NAME` here too? |
@@ -31,8 +31,12 @@ tasks = {
'sign_addons': {'method': sign_addons, 'qs': []},
'add_firefox57_tag_to_webextensions': {
'method': add_firefox57_tag,
- 'qs': [Q(status=amo.STATUS_PUBLIC,
- _current_version__files__is_webextension=True)]},
+ 'qs': [
+ Q(status=am... | [Command->[add_arguments->[add_argument],handle->[group,chord,keys,CommandError,chunked,append,get,apply_async,task,filter,join]],distinct,version_int,Q] | Get all of the tasks that are available on the system. Create a command object for the command. | We could actually filter this by `_current_version__apps__max__version_int__gte=firefox_57_star` but I wonder if that's correct, hmm. |
@@ -410,6 +410,18 @@ class ModelBase(backwards_compatible(Keyed)):
print("No model summary for this model")
+ def model_parameters(self):
+ """
+ Retrieve original model's parameters.
+
+ :returns: Model parameters as an H2OTwoDimTable
+ """
+ model = self._mod... | [ModelBase->[download_pojo->[download_pojo],aic->[aic],mean_residual_deviance->[mean_residual_deviance],score_history->[scoring_history],_plot->[show,scoring_history],mse->[mse],gini->[gini],std_coef_plot->[coef_norm,show],varimp_plot->[show,varimp],auc->[auc],rmsle->[rmsle],logloss->[logloss],model_performance->[type]... | Print innards of model without regards to type. | I guess we want to leverage curent `_parms` coming from backend and use usual ways of displaying them. Is this necessary ? |
@@ -45,12 +45,14 @@ var _ = g.Describe("[Feature:Builds][Serial][Slow][Disruptive] alter builds via
exutil.DumpPodLogsStartingWith("", oc)
exutil.DumpConfigMapStates(oc)
}
- oc.AsAdmin().Run("apply").Args("-f", defaultConfigFixture).Execute()
- oc.AsAdmin().Run("apply").Args("-f", defaultbuildConfigFi... | [Context,CurrentGinkgoTestDescription,KubeClient,By,CoreV1,StartBuildAndWait,Expect,HaveOccurred,FixturePath,It,DumpConfigMapStates,WaitForServiceAccount,Args,AsAdmin,DumpPodLogsStartingWith,To,Namespace,Skip,LogsNoTimestamp,ContainSubstring,Execute,NewCLI,BeforeEach,AssertSuccess,ServiceAccounts,PreTestDump,AssertFail... | BeforeEach runs the tests AssertSuccess asserts that the given build logs are present and that docker. io was the default. | Note this approach in fact did *NOT* reset the `cluster` build.config instance in my testing. I left `defaultConfigFixture` alone since the image related stuff is being skipped, and the card for this PR if focused on build. |
@@ -522,7 +522,9 @@ public class SqlQueryExecution
{
requireNonNull(cause, "cause is null");
- stateMachine.transitionToFailed(cause);
+ if (stateMachine.transitionToFailed(cause)) {
+ stateMachine.updateQueryInfo(Optional.empty());
+ }
}
@Override
| [SqlQueryExecution->[SqlQueryExecutionFactory->[createQueryExecution->[getSession,SqlQueryExecution]],recordHeartbeat->[recordHeartbeat],getQueryInfo->[getQueryId],analyze->[analyze],getExecutionStartTime->[getExecutionStartTime],addStateChangeListener->[addStateChangeListener],getUserMemoryReservation->[getUserMemoryR... | Fails the task with the specified cause. | The current method `SqlQueyExecution.fail(Throwable)` is called from many places. Some of these places are after the query execution has started, so we want to have the final query info. Putting this call here, will not allow us to wait for the final query info in these cases. Instead, I think we should move this call ... |
@@ -1,8 +1,14 @@
class UsersController < ApplicationController
def destroy
- return unless current_user.destroy!
-
+ destroy_user
flash[:success] = t('sign_up.cancel.success')
redirect_to root_path
end
+
+ private
+
+ def destroy_user
+ user = current_user || User.where(confirmation_token: s... | [UsersController->[destroy->[redirect_to,t,destroy!]]] | destroy a node with no user id. | I think this could be `User.find_by(confirmation_token: session[:user_confirmation_token])` instead of `.take` since there should only be one? |
@@ -476,7 +476,7 @@ class BOHB(MsgDispatcherBase):
var, choices=search_space[var]["_value"]))
elif _type == 'randint':
cs.add_hyperparameter(CSH.UniformIntegerHyperparameter(
- var, lower=0, upper=search_space[var]["_value"][0]))
+ ... | [Bracket->[inform_trial_end->[get_n_r,create_bracket_parameter_id],_record_hyper_configs->[increase_i],get_hyperparameter_configurations->[create_bracket_parameter_id]],BOHB->[handle_report_metric_data->[_handle_trial_end,_get_one_trial_job],generate_new_bracket->[Bracket],_handle_trial_end->[_send_new_trial,generate_n... | change json format to ConfigSpace format dict<dict > - > ConfigSpace format Adds a CSH hyperparameter to the search_space if the type is unknown. | is upper exclusive here ? |
@@ -118,6 +118,17 @@ public class MetadataComponentModelValidator implements ModelValidator {
}
+ private void validateMetadataOutputAttributes(ExtensionModel extensionModel, ComponentModel component) {
+ MetadataResolverFactory resolverFactory = getMetadataResolverFactory(component);
+ if (isVoid(compone... | [MetadataComponentModelValidator->[validateCategoryNames->[getName,getSimpleName,size,ifPresent,format,collect,join,getComponentModelTypeName,toSet,IllegalModelDefinitionException],validate->[walk],getAllInputResolvers->[toList,collect],validateMetadataReturnType->[visitObject->[getName,equals,getType,format,getId,Ille... | Validates that the MetadataKeyId parameter is present and that the type of the MetadataKeyPart is Visit an object type. | the wording of the message is very confusing. Why not just say "the coso has an attributes metadata resolver but it doesn't set any attributes"? |
@@ -214,13 +214,12 @@ func TestStackOutputsJSON(t *testing.T) {
e.RunCommand("pulumi", "login", "--cloud-url", e.LocalURL())
e.RunCommand("pulumi", "stack", "init", "stack-outs")
e.RunCommand("pulumi", "up", "--non-interactive", "--skip-preview")
- stdout, stderr := e.RunCommand("pulumi", "stack", "output", "--js... | [Value,ProgramTest,LocalURL,NewReference,DeleteEnvironment,Save,NewEnvironment,ParseReference,NotNil,NotEqual,Skip,Type,NotContains,RunCommandExpectError,Nil,IsProviderType,Join,Equal,RunCommand,Failed,NewProjectRuntimeInfo,ImportDirectory,Contains,Name,NoError,ParseKey,Fatalf,Printf,Println,String,LoadProjectStack,Rep... | TestStackTagValidation tests that the stack name and description are valid. TestStackOutputsNodeJS tests that the stack outputs are available on node. js. | Is this change necessary? |
@@ -79,6 +79,13 @@ func (cli *Client) errorOut(err error) error {
return nil
}
+func (cli *Client) Logger() logger.Logger {
+ if cli.lggr == nil {
+ cli.lggr = logger.ProductionLogger(cli.Config)
+ }
+ return cli.lggr
+}
+
// AppFactory implements the NewApplication method.
type AppFactory interface {
NewAppl... | [Patch->[doRequest],Cookie->[Retrieve],Delete->[doRequest],cookiePath->[Join,RootDir],Retrieve->[IsNotExist,Append,ReadFile,New,Cookies,cookiePath,Add],Put->[doRequest],Save->[cookiePath,String,WriteFile],Post->[doRequest],NewApplication->[NewExternalInitiatorManager,SetDB,Eth,DatabaseBackupMode,Wrap,ORMMaxIdleConns,Is... | errorOut returns an error if err is not nil otherwise it returns nil. | Can it race? |
@@ -65,7 +65,7 @@ type shuffleLeaderScheduler struct {
func newShuffleLeaderScheduler(opt *scheduleOption) *shuffleLeaderScheduler {
return &shuffleLeaderScheduler{
opt: opt,
- selector: newRandomSelector(),
+ selector: newRandomSelector(nil),
}
}
| [Schedule->[GetStoreId,randFollowerRegion,GetStorePeer],GetResourceLimit->[GetLeaderScheduleLimit],SelectTarget,SelectSource,getStores,randFollowerRegion,GetStorePeer,Errorf,allocPeer,getFollowerStores,GetId,randLeaderRegion] | GetName returns the name of the leader scheduler. | I suppose shuffle leader needs health filters too. |
@@ -57,7 +57,10 @@ class PantsRunner(object):
for message_regexp in global_bootstrap_options.ignore_pants_warnings:
warnings.filterwarnings(action='ignore', message=message_regexp)
- if global_bootstrap_options.enable_pantsd:
+ # TODO For kill-pantsd and clean-all, we cannot run them in the daemon i... | [PantsRunner->[_enable_rust_logging->[init_rust_logger,setup_logging_to_stderr,getLogger,upper],run->[create,reset_log_location,filterwarnings,RemotePantsRunner,reset_exiter,set_start_time,for_global_scope,_enable_rust_logging,format,warn,run,reset_should_print_backtrace_to_terminal]],getLogger] | Runs a single node in a background. | There are #7205 (issue) and #7206 (PR), that originally proposed this solution. So this PR should either close that, or leave a TODO linking to that. |
@@ -27,7 +27,12 @@ __all__ = ['DATA_HOME', 'download', 'md5file', 'split', 'cluster_files_reader']
DATA_HOME = os.path.expanduser('~/.cache/paddle/dataset')
if not os.path.exists(DATA_HOME):
- os.makedirs(DATA_HOME)
+ try:
+ os.makedirs(DATA_HOME)
+ except OSError as exc:
+ if exc.errno != er... | [download->[md5file],convert->[close_writers,write_data,reader,open_writers]] | Calculate the MD5 hash of a file. | I don't get it -- it seems that we create DATA_HOME only if it doesn't exist; why would we need to catch the EEXIST exception here? |
@@ -512,6 +512,13 @@ public class TimestampColumnReader
picosFraction = toIntExact(nanos * PICOSECONDS_PER_NANOSECOND);
}
+ if (!isFileUtc()) {
+ long millis = floorDiv(micros, MICROSECONDS_PER_MILLISECOND);
+ int microsFraction = floorMod(micros, MICROSECONDS_PER_MI... | [TimestampColumnReader->[readInstantMicros->[decodeNanos],readTimestampMicros->[isFileUtc,decodeNanos],readTimestampMillis->[isFileUtc,decodeNanos],readInstantNanos->[decodeNanos],close->[close],readNonNullBlock->[verifyStreamsPresent],readTimestampNanos->[decodeNanos],readInstantMillis->[decodeNanos],toString->[toStri... | readTimestampNanos - read timestamp nanos. | This should go before `Support for variable precision timestamps in Hive connector` commit (it's currently after). Also, is this change indivudally testable without your other changes? if not, you can just squash them. |
@@ -79,13 +79,6 @@ public abstract class SearchResource extends RestResource {
this.decoratorProcessor = decoratorProcessor;
}
- protected void validateInterval(String interval) {
- if (!SearchUtils.validateInterval(interval)) {
- LOG.warn("Invalid interval type <{}>. Returning HTTP... | [SearchResource->[fieldHistogram->[fieldHistogram],validateInterval->[validateInterval],fieldStats->[fieldStats]]] | Validate interval. | The protected method `splitStackedFields` can be deleted too. |
@@ -42,6 +42,7 @@ class GraphSuite(Suite):
reports=Reports('', {}),
options=Options(),
version_id=__version__,
+ plugin=Plugin((3, 6)),
)
return manager
| [GraphSuite->[test_order_ascc->[_make_manager],test_sorted_components->[_make_manager]]] | Create a build manager. | should this use `defaults.PYTHON3_VERSION`? |
@@ -15,6 +15,8 @@ namespace Content.Server.GameObjects.Components.Body.Respiratory
public override string Name => "Lung";
private float _accumulatedFrameTime;
+ private InventoryComponent _inventory;
+ private InventoryComponent Inventory => _inventory ??= Owner.GetComponent<InventoryC... | [LungComponent->[Exhale->[RemoveRatio,BreathPercentage,PumpToxins,Volume,TryGetTileAir,PumpGasTo,Merge,TryGetComponent],ExposeData->[DataReadWriteFunction,Pressure,ExposeData,DataField,Volume],Inhale->[Air,RemoveRatio,BreathPercentage,Volume,TryGetTileAir,PumpGasTo,Merge,TryGetComponent],Update->[Exhaling,Exhale,None,I... | Creates a class which implements the IUnknown object interface. region > Inhale. | This will throw if the Owner doesn't have an InventoryComponent. Just do a `TryGetComponent` when you need to use the inventory component and do nothing if it doesn't have it. |
@@ -0,0 +1,5 @@
+"""NIRS specific preprocessing functions."""
+
+from .nirs import short_channels, source_detector_distances
+from ._optical_density import optical_density
+from ._beer_lambert_law import beer_lambert_law
| [No CFG could be retrieved] | No Summary Found. | Can you had header to files with your name and license thx |
@@ -12,6 +12,6 @@ internal partial class Interop
internal partial class Kernel32
{
[DllImport(Libraries.Kernel32, EntryPoint = "GetModuleHandleW", CharSet = CharSet.Unicode, SetLastError = true)]
- internal static extern IntPtr GetModuleHandle(string moduleName);
+ internal static exter... | [Interop->[Kernel32->[IntPtr->[Kernel32,Unicode]]]] | Returns a module handle for the given module name. | It seems like this file needs a #nullable enable entry since it is under the `Common` path. |
@@ -82,9 +82,9 @@ uint8_t Servo::attach(int pin, uint16_t minUs, uint16_t maxUs)
void Servo::detach()
{
if (_attached) {
+ pinMode(_pin, INPUT);
stopWaveform(_pin);
_attached = false;
- digitalWrite(_pin, LOW);
}
}
| [attach->[attach],write->[improved_map],read->[improved_map],detach->[detach]] | This function is called when the user has not specified a lease value. | INPUT leaves the pin in a high impedance state and subject to noise unless an external pull-up/down resistor is added to the circuit. INPUT_PULLUP, however, will have a weak pull-to-VCC resistor placed on the pad. Two potential issues are: 1. Is "always 1" a valid, safe state for servo control inputs? 2. What is the "t... |
@@ -477,7 +477,7 @@ def pytest_runtest_teardown(item):
def report():
gevent.util.print_run_info()
- pytest.fail(
+ raise RetryTestError(
f"Teardown timeout >{item.timeout_setup_and_call}s. This must not happen, when "
f"the teardown times out not all finalizers go... | [timeout_for_setup_and_call->[handler->[report],report],pytest_runtest_call->[timeout_for_setup_and_call],pytest_runtest_teardown->[handler->[report]],set_item_timeouts->[timeout_from_marker],pytest_runtest_setup->[timeout_for_setup_and_call],pytest_runtest_protocol->[set_item_timeouts]] | A context manager for teardown of the test. | IMO this should be done on timeouts of transactions, not in the report of failure. |
@@ -19,6 +19,8 @@ namespace Content.Server.GameObjects.Components.MachineLinking
private List<SignalTransmitterComponent> _transmitters;
+ private int? _transmittersCountLimit;
+
public override void Initialize()
{
base.Initialize();
| [SignalReceiverComponent->[Interact->[Subscribe,Unsubscribe],Subscribe->[Subscribe],Initialize->[Initialize],Unsubscribe->[Unsubscribe],InteractUsing->[Interact],Shutdown->[Shutdown,Unsubscribe]]] | Initialize method. | Github complains, give it `= default;` And maybe change the name to maxTransmitters? idk |
@@ -38,7 +38,7 @@ class TemplateReader implements LoaderInterface
* TODO should be possible to inject from config
* @var array
*/
- private $reservedPropertyNames = array(
+ protected $reservedPropertyNames = array(
'template',
'changer',
'changed',
| [TemplateReader->[loadSection->[loadProperties],loadType->[loadProperties]]] | This method loads a single node - tag from a template. load basic template attributes and properties. | btw. should we add shadow-on, shadow-base etc. to these names? I guess ultimately we should refactor so that they live in a different NS. |
@@ -712,6 +712,10 @@ class Write(ptransform.PTransform):
super(Write, self).__init__(label)
self.sink = sink
+ def display_data(self):
+ return {'sink': self.sink.__class__,
+ 'sink_dd': self.sink}
+
def apply(self, pcoll):
from apache_beam.runners.dataflow.native_io import iobase as ... | [_finalize_write->[close,finalize_write,open_writer],Read->[_infer_output_coder->[default_output_coder]],_WriteBundleDoFn->[finish_bundle->[close],process->[write,open_writer]],_write_keyed_bundle->[close,write,open_writer],WriteImpl->[apply->[initialize_write]]] | Initializes a Write transform. . | The source/sink keys are asymmetric between Read/Write transforms (`source` vs `sink_dd`). Choose one convention. |
@@ -122,7 +122,7 @@ namespace MonoGame.Framework.Content.Pipeline.Builder
PipelineBuildEvent pipelineEvent;
try
{
- using (var textReader = new StreamReader(fullFilePath))
+ using (var textReader = new XmlTextReader(fullFilePath))
... | [PipelineBuildEvent->[AreParametersEqual->[Value,TryGetValue,Count,AreEqual,ContainsKey,Assert,Key],Save->[Value,Clear,Serialize,DirectorySeparatorChar,ConvertToString,CreateDirectory,GetDirectoryName,Add,GetFullPath,Key],ConvertToString->[GetType,GetConverter,ConvertToInvariantString],AreEqual->[ConvertToString,Equals... | Load a PipelineBuildEvent from a file. | Why does using XmlTextReader instead of StreamReader resolve this issue? |
@@ -184,7 +184,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
*/
@Override
public Result getResult() {
- Result r = super.getResult();
+ Result r = super.getResult();
for (MavenBuild b : getModuleLastBuilds().values()) {
Resul... | [MavenModuleSetBuild->[getDownstreamRelationship->[getDownstreamRelationship],notifyModuleBuild->[getModuleBuilds],getParent->[getParent],MavenModuleSetBuildExecution->[cleanUp->[cleanUp],doRun->[delete,getMavenOpts,setMavenVersionUsed,getEnvironment]],getDynamic->[getDynamic],onLoad->[onLoad],getMavenOpts->[getMavenOp... | Returns the result of the last build of the build. | Why? (If you change your mind while preparing a pull request and revert some section of code, it is polite to do so exactly, including whitespace.) |
@@ -184,6 +184,7 @@ public final class ConnectKsqlSchemaTranslator {
}
} catch (final UnsupportedTypeException e) {
log.error("Error inferring schema at field {}: {}", field.name(), e.getMessage());
+ throw e;
}
}
return schemaBuilder.optional().build();
| [ConnectKsqlSchemaTranslator->[toKsqlStructSchema->[toKsqlFieldSchema],toKsqlMapSchema->[toKsqlFieldSchema,checkMapKeyType]]] | Convert a schema to a KSQL struct schema. | Is this change related to KLIP-56? What's the motivation for this change? Also, this change is backwards incompatible, right? I think the impact of this change is that fields with certain types of incompatible schemas were ignored while now the entire statement would be rejected. Is that correct? AFAICT this method is ... |
@@ -0,0 +1,15 @@
+"""
+A collection of tasks for interacting with Google Sheets.
+"""
+try:
+ from prefect.tasks.gsheets.gsheets import (
+ GsheetUpdates,
+ GsheetResponse,
+ WriteGsheetRow,
+ ReadGsheetRow,
+ gsheet_helper,
+ )
+except ImportError:
+ raise ImportError(
+ ... | [No CFG could be retrieved] | No Summary Found. | You named the extra `"gspread"` so we should update this error message accordingly |
@@ -43,6 +43,8 @@ type User struct {
Website string `json:"website"`
// the user's description
Description string `json:"description"`
+ // User visibility level option: public(0) - default, limited(1), private(2)
+ Visibility int `json:"visibility"`
}
// MarshalJSON implements the json.Marshaler interface fo... | [MarshalJSON->[Marshal]] | MarshalJSON returns a JSON representation of the User. | can you change it to string? |
@@ -0,0 +1,11 @@
+module DeviceTracking
+ class CreateDevice
+ def self.call(user, request, current_cookie_uuid)
+ Device.create(user_id: user.id,
+ user_agent: request.user_agent || '',
+ cookie_uuid: current_cookie_uuid.presence || SecureRandom.hex(64),
+ ... | [No CFG could be retrieved] | No Summary Found. | These service classes look :100:. Looks like they could use some tests |
@@ -173,10 +173,16 @@ public class NiFiClientUtil {
}
public ParameterContextEntity createParameterContextEntity(final String name, final String description, final Set<ParameterEntity> parameters) {
+ return createParameterContextEntity(name, description, parameters, Collections.EMPTY_LIST);
+ }
+... | [NiFiClientUtil->[updateVariableRegistry->[updateVariableRegistry],createConnection->[createNewRevision,createConnection],stopTransmitting->[stopTransmitting],setParameterContext->[setParameterContext,createReferenceEntity],createControllerService->[createControllerService],createInputPort->[createNewRevision,createInp... | create a new parameter context entity. | emptyList() should be preferred over EMPTY_LIST |
@@ -195,11 +195,12 @@ func (acts *deployActions) Run(step deploy.Step) (resource.Status, error) {
}
}
- // Write out the current snapshot. Note that even if a failure has occurred, we should still have
- // a safe checkpoint. Note that any error that occurs when writing the checkpoint trumps the error
- // repor... | [Run->[Logical,Failf,Sprintf,Iterator,Apply,Snap,Op,Errorf,WriteString,SaveSnapshot],Deploy->[Require,planContextFromStack,deployLatest,QName],deployLatest->[plan,IgnoreClose,Success,Sprintf,New,Now,Assert,printPlan,WriteString,Since,Walk]] | Run executes a single deploy step Write out the current checkpoint. | If `resource.StatusOK`, but writing out the snapshot failed, is it really OK? This point in the program execution is interesting, because we now know for sure that the checkpoint is corrupt, and does not reflect our known reality. It makes me wonder if we should keep a secondary journal elsewhere to assist with recover... |
@@ -15,7 +15,7 @@ var (
)
const (
- tokensURL = "https://localhost/iam/v2/tokens" // nolint
+ tokensURL = "https://localhost/apis/iam/v2/tokens" // nolint
secretsURL = "https://localhost/api/v0/secrets/search" // nolint
)
| [Printf,NewBuffer,NewRequest,Do,Marshal,Decode,Close,String,Parse,Errorf,NewDecoder,Set] | main import imports and imports a single . Request - POST a new request to the secretsURL and return a list of clientToken objects. | woof hope no one ran into this |
@@ -134,6 +134,14 @@ public class PutSQL extends AbstractSessionFactoryProcessor {
.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)
.build();
+ static final PropertyDescriptor AUTO_COMMIT = new PropertyDescriptor.Builder()
+ .name("database-session-auto... | [PutSQL->[FragmentedEnclosure->[addFlowFile->[addFlowFile]],StatementFlowFileEnclosure->[hashCode->[hashCode],equals->[equals]],isFragmentedTransactionReady->[apply],pollFlowFiles->[apply],onBatchUpdateError->[apply],onTrigger->[FunctionContext,onTrigger],isSupportBatching,apply]] | This property is used to create a BeanDescriptor for a SQL statement. | @viswaug IIRC disable auto-commit is required to support "Support Fragmented Transactions" and/or "Rollback On Failure". We need to implement `customValidate` method, too, if we're going to make auto-commit configurable. If auto-commit is enabled, the processor should not allow using "Support Fragmented Transactions" a... |
@@ -170,6 +170,9 @@ def server_session(model, session_id, url="default", relative_urls=False, resour
probably not desired.
'''
+ if session_id is None:
+ raise ValueError("Must supply a session_id")
+
url = _clean_url(url)
app_path = _get_app_path(url)
| [_process_arguments->[str,startswith,format,items,quote_plus],server_session->[_process_arguments,encode_utf8,render,_clean_url,_process_session_id,_get_app_path,_process_resources,_process_app_path,_src_path,make_id,_process_relative_urls],server_html_page_for_session->[make_id,html_page_for_render_items,bundle_for_ob... | Returns a script tag that embeds content from a specific server session on a Bokeh server Generate a tag that can be used to load a single node in a collection. | This would be great with py3 keyword only args, some day... Also I'd like to make `server_session(session=mysession)` possible, it will complicate arg handling but I think it is the natural API we missed along the way. Ideally it would have been `server_session(mysession)` but that ship has sailed |
@@ -99,8 +99,9 @@ class ListGoalsTest(ConsoleTaskTestBase):
with self.assertRaises(GoalError) as ctx:
goal.install(TaskRegistrar(task_name, OtherNoopTask))
- self.assertIn('foo', ctx.exception.message)
- self.assertIn(self._LIST_GOALS_NAME, ctx.exception.message)
+ exception_message = ' '.join(ct... | [ListGoalsTest->[test_list_goals_all->[register,clear,assert_console_output,format],test_list_goals->[install,assert_console_output,register,format,clear],test_register_duplicate_task_name_is_error->[install,assertIn,register,TaskRegistrar,assertRaises,clear],test_list_goals_graph->[register,clear,assert_console_output... | Test register duplicate task name. | Py3 doesn't have `exception.message`. Both have `exception.args` though, which is a tuple we convert to a string. |
@@ -58,8 +58,9 @@ final class ApiLoader extends Loader
private $entrypointEnabled;
private $docsEnabled;
private $identifiersExtractor;
+ private $resourceCollectionMetadataFactory;
- public function __construct(KernelInterface $kernel, ResourceNameCollectionFactoryInterface $resourceNameCollecti... | [ApiLoader->[addRoute->[getAttribute,getIdentifiersFromResourceClass,resolveOperationPath,getItemOperations,getShortName,has,add],loadExternalFiles->[addDefaults,load,addCollection],load->[addResource,getAttribute,create,getItemOperations,getCollectionOperations,getShortName,loadExternalFiles,has,add,addRoute],__constr... | Initializes the configuration. | Couldn't we just remove the typehint of `ResourceNameCollectionFactoryInterface` instead of adding a new argument? If we don't do this, we'll have a problem to provide an upgrade path to 3.0. We need to find a way to reorder the arguments anyway. Basically, we should change the order and trigger a deprecation if the ol... |
@@ -196,7 +196,7 @@ namespace DotNetNuke.HttpModules.UrlRewrite
//if the TabId is not for the correct domain
//see if the correct domain can be found and redirect it
portalAliasInfo = PortalAliasController.Instance.GetPortalAlias(do... | [BasicUrlRewriter->[RewriteUrl->[StatusCode,GetPortalDomainName,RewriteUrl,Message,ProcessMessages,Host,PathAndQuery,StartsWith,Transfer,Redirect,TrimStart,SendTo,UrlDecode,HomeTabId,LastIndexOf,GetTabsByPortal,SSLEnabled,LoginTabId,Server,OrdinalIgnoreCase,AutoAddAlias,AddHeader,Split,GetPortalSettings,ApplicationPath... | Rewrite the URL in the application. This method checks if the current url can be identified by the user. If it can t This function will return a response if the user has not requested a child alias or if the load the neccesary object into the current context This function is called to determine if a redirect is necessa... | Please use `String#EndsWith(String, StringComparison)` |
@@ -60,11 +60,11 @@ public class DataTypeUtils {
private static final String Infinity = "(Infinity)";
private static final String NotANumber = "(NaN)";
- private static final String Base10Digits = "\\d+";
- private static final String Base10Decimal = "\\." + Base10Digits;
- private static final S... | [DataTypeUtils->[isFloatTypeCompatible->[isNumberTypeCompatible],toArray->[toArray],convertRecordMapToJavaMap->[convertRecordFieldtoObject],merge->[merge],convertRecordArrayToJavaArray->[convertRecordFieldtoObject],isShortTypeCompatible->[isNumberTypeCompatible,isIntegral],isTimeTypeCompatible->[isDateTypeCompatible],i... | Imports the given data type from the NIHM package. DEFAULT TIME FORMAT. | I think it'd be nice to have also: "(" + Base10Digits + "\\." + ")" + "|" + |
@@ -20,8 +20,11 @@
# include <windows.h>
/* On Windows Vista or higher use BCrypt instead of the legacy CryptoAPI */
# if defined(_MSC_VER) && _MSC_VER > 1500 /* 1500 = Visual Studio 2008 */ \
- && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600
+ && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0600 && defined... | [RAND_event->[RAND_poll,RAND_status],rand_pool_add_additional_data->[QueryPerformanceCounter,memset,GetCurrentThreadId,rand_pool_add],rand_pool_acquire_entropy->[CryptReleaseContext,rand_pool_entropy_available,CryptGenRandom,rand_acquire_entropy_from_tsc,rand_pool_bytes_needed,BCryptGenRandom,rand_pool_add_end,rand_acq... | Creates an object of type n_cin_u_t with the entropy of the Reads and returns a random number from the pool. | Shouldn't this guard be removed? |
@@ -50,6 +50,9 @@ import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
+/**
+ * Base test class for IT Test. helps to run cmd and generate data.
+ */
public abstract class ITTestBase {
public... | [ITTestBase->[executeHiveCommand->[getHiveConsoleCommand,executeCommandInDocker],executePrestoCommandFile->[executeCommandStringInDocker,getPrestoConsoleCommand],executeSparkSQLCommand->[executeCommandStringInDocker,getSparkShellCommand],assertStdOutContains->[saveUpLogs,assertStdOutContains],executeHiveCommandFile->[g... | Package private for unit testing purposes. Missing bundles for Hhoodie - Hive. | `Base test class for IT Test helps to run command and generate data.`? |
@@ -291,7 +291,7 @@ class Jetpack_Gutenberg {
* @return bool True if the file is found.
*/
public static function preset_exists( $preset ) {
- return file_exists( JETPACK__PLUGIN_DIR . self::get_blocks_directory() . $preset . '.json' );
+ return file_exists( JETPACK__PLUGIN_DIR . self::get_blocks_source_direc... | [Jetpack_Gutenberg->[is_registered->[is_registered]]] | Checks if a preset exists in the block directory. | Yeah, not super elegant :roll_eyes: Not really sure if there's any way around this. |
@@ -102,7 +102,7 @@ class ParticleMPMSolver(PythonSolver):
self.settings.ValidateAndAssignDefaults(default_settings)
# Construct the linear solvers
- import linear_solver_factory
+ from KratosMultiphysics import python_linear_solver_factory as linear_solver_factory
if(self.set... | [ParticleMPMSolver->[SearchElement->[SearchElement],FinalizeSolutionStep->[FinalizeSolutionStep],Predict->[Predict],InitializeSolutionStep->[InitializeSolutionStep,Initialize,SearchElement],SolveSolutionStep->[SolveSolutionStep]]] | Initialize the object with a KratosMultiphysics model and settings. Configuration for the missing parameters. This function is called when the user has not specified a configuration for a single node. | this is already part of #3974 I would prefer if you exclude it from this PR such that I don't have to solve conflicts many times. Thx! (and sorry for breaking your stuff) |
@@ -53,7 +53,7 @@ const createAnalysisWorker = async ( { workerUrl, researcherUrl, configuration =
);
}
- return worker;
+ return createAnalyzeFunction( worker, configuration );
};
export default createAnalysisWorker;
| [No CFG could be retrieved] | Efficiently returns a worker for the sequence number. | I like this, but I'm afraid we still need to provide some access to the worker to be able to provide the same API as before. |
@@ -0,0 +1,11 @@
+# -*- encoding : utf-8 -*-
+class InfoRequest
+ module Prominence
+
+ VALUES = [ 'normal',
+ 'backpage',
+ 'hidden',
+ 'requester_only' ]
+
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | I might well have missed something, but it seems like these could be included/set in `MessageProminence` and `MessageProminence` included in to `InfoRequest`? - seems a bit confusing to have to maintain the list twice. |
@@ -206,9 +206,9 @@ class Seq2seqAgent(TorchGeneratorAgent):
def build_criterion(self):
# set up criteria
if self.opt.get('numsoftmax', 1) > 1:
- return nn.NLLLoss(ignore_index=self.NULL_IDX, reduction='sum')
+ return nn.NLLLoss(ignore_index=self.NULL_IDX, reduction='none')
... | [Seq2seqAgent->[build_model->[Seq2seq,opt_to_kwargs,opt,print,get,len,load_state_dict,_copy_embeddings],__init__->[super],build_criterion->[NLLLoss,get,CrossEntropyLoss],state_dict->[super,hasattr],add_cmdline_args->[add_argument_group,super,add_argument,keys],is_valid->[super,warn_once],batchify->[super],load->[load_s... | Build a criterion for sequence2seq. . | Oy - I assume the `Metric.many()` operation is handling the reduction now |
@@ -27,11 +27,11 @@ from .pipeline import AsyncPipeline, PipelineStep
from .queue import Signal
-def run_pipeline(video, encoder, decoder, render_fn, fps=30):
+def run_pipeline(video, encoder, decoder, render_fn, decoder_seq_size=16, fps=30):
pipeline = AsyncPipeline()
pipeline.add_step("Data", DataStep(... | [softmax->[sum,exp],DataStep->[_open_video->[isOpened,int,next,VideoCapture],process->[_open_video,read,isOpened],end->[release],setup->[_open_video],__init__->[cycle,super,iter]],DecoderStep->[process->[infer,softmax,expand_dims,max,append,len,concatenate],__init__->[super,AsyncWrapper,deque]],RenderStep->[process->[u... | Runs a pipeline of the given video. | I can understand the sequence size being configurable when you're using the dummy decoder, but does it make sense to override it when using a real decoder? IMO, the code should only allow the `--seq` option to be set when `-m_de` is unspecified, and otherwise derive the sequence size from the decoder's input shape. |
@@ -246,10 +246,10 @@ class Project < ApplicationRecord
obj_filenames: obj_filenames },
assigns: { project: self, report: report }
parsed_page_html = Nokogiri::HTML(page_html_string)
- parsed_pdf_html = parsed_page_html.at_css('#report-content')
+ parse... | [Project->[assigned_modules->[user_role],space_taken->[space_taken]]] | Generate a new report for the specified user in the specified team. finds the first missing node in the report. | Layout/MultilineMethodCallIndentation: Align .zip with .css on line 251. |
@@ -2477,4 +2477,16 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
self._autohsts_save_state()
+def find_ssl_apache_conf(prefix):
+ """
+ Find a TLS Apache config in the dedicated storage.
+ :param str prefix: prefix of the TLS Apache config to find
+ :return: the path the... | [ApacheConfigurator->[perform->[restart,perform],install_ssl_options_conf->[option],prepare->[option,_prepare_options],add_vhost_id->[_find_vhost_id],_add_name_vhost_if_necessary->[is_name_vhost,add_name_vhost],cleanup->[restart],make_vhost_ssl->[_create_vhost],_find_best_vhost->[domain_in_names],update_autohsts->[_aut... | Register the ApacheConfigurator to be able to configure HSTS. | [super nit]: adding "file" after "...Apache config" would make reader to immediately grok what's going on in here. |
@@ -32,6 +32,7 @@ export function BentoFitText({
minFontSize,
maxFontSize
);
+ console.log('HERE');
setOverflowStyle(measurerRef.current, clientHeight, fontSize);
}, [maxFontSize, minFontSize]);
| [No CFG could be retrieved] | Provides a function to render a single component. Displays the hidden element that is a child of an element with a class named after the meas. | might want to remove this... |
@@ -413,6 +413,18 @@ func False(tb testing.TB, value bool, msgAndArgs ...interface{}) {
}
}
+// Panic checks that the callback panics.
+func Panic(tb testing.TB, cb func(), msgAndArgs ...interface{}) {
+ defer func() {
+ r := recover()
+ if r == nil {
+ fatal(tb, msgAndArgs, "Should have panicked.")
+ }
+ }()... | [MakeSlice,Index,ValueOf,DeepEqual,Compile,MapKeys,SliceOf,Set,Stack,SetMapIndex,Int,Error,MatchString,MakeMap,IsNil,Errorf,Len,Type,After,MapIndex,Logf,TypeOf,Fatalf,Sprintf,MapOf,IsValid,Kind,Elem,String,Interface,Helper] | True checks a value is true. | Can we call this `YesPanic` to match with `YesError`? |
@@ -1202,7 +1202,7 @@ class ICA(ContainsMixin):
See Also
--------
- find_bads_ecg
+ find_bads_ecg, find_bads_ref
"""
if verbose is None:
verbose = self.verbose
| [_find_sources->[get_score_funcs],run_ica->[fit,ICA,_detect_artifacts],get_score_funcs->[_make_xy_sfunc],corrmap->[get_components,_find_max_corrs],_sort_components->[copy],ICA->[_fit->[fit],_sources_as_evoked->[_transform_evoked],_apply_epochs->[_pre_whiten,_check_exclude],_transform_raw->[_pre_whiten,_transform],_fit_... | This function is used to find EOG related components using correlation. Compute the scores of a N - channel cross - validation. | I think it should be on a the next line to render fine. |
@@ -0,0 +1,16 @@
+from conans.client.generators.virtualrunenv import VirtualRunEnvGenerator
+
+
+def _python_paths(deps_env_info):
+ result = set()
+ for dep in deps_env_info.deps:
+ result.update(deps_env_info[dep].vars.get("PYTHONPATH", set()))
+
+ return list(result)
+
+
+class VirtualEnvPythonGenera... | [No CFG could be retrieved] | No Summary Found. | Not sure if we should access directly to the aggregated value of `deps_env_info.get("PYTHONPATH")`. Have you tried? (note: I don't remember if that works) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.