The FreeIPA AMIs should be hardened

🚀 Feature Proposal
The FreeIPA AMIs should have the ability to be hardened.
Motivation
In the COOL, the FreeIPA instances are part of the static environment and therefore must be hardened.
Pitch
Ideally the Packer playbook would apply a hardening Ansible role at the end of the AMI building process.

We have been told to follow the CIS guidance.  In this case, this is the CIS distribution-independent guidance.

See this branch in cisagov/freeipa-server-packer and cisagov/ansible-role-hardening.

Hardening guide: CIS_Distribution_Independent_Linux_Benchmark_v2.0.0.pdf

@jsf9k has created this draft PR: https://github.com/cisagov/freeipa-server-packer/pull/35

I'm going to close this issue since the initial hardening PR was merged some time ago.  If any new details come up we can create new issues for them.


New agar.io client update

you guys know what to do with the new client update.
PacketHandler.js
if (this.handshakeProtocol < 1 || this.handshakeProtocol > 13)
change to 15
but leaderboard not working.

ok not trying to spam but i was able to get leaderboard to work on my server.
UpdateLeaderboard.js
line 101:  writer.writeUInt8(0x33); // Packet ID
change to:  writer.writeUInt8(0x35); // Packet ID

UpdateLeadboard.js
or add this after the closing brace on line 152 };
I guess it keeps backwards compatibility.
// FFA protocol 15
UpdateLeaderboard.prototype.buildFfa13 = function () {
var writer = new BinaryWriter();
writer.writeUInt8(0x35);                                 // Packet ID
for (var i = 0; i < this.leaderboardCount; i++) {
var item = this.leaderboard[i];
if (item == null) return null;  // bad leaderboardm just don't send it
    if (item === this.playerTracker) {
    	writer.writeUInt8(0x09);
    	writer.writeUInt16(1);
    } else {
    var name = item._name;
    writer.writeUInt8(0x02);
    if (name != null && name.length)
        writer.writeStringZeroUtf8(name);
    else
        writer.writeUInt8(0);
}

}
var thing = this.leaderboard.indexOf(this.playerTracker) + 1;
var place = (thing <= 10) ? null : thing;
if (this.playerTracker.cells.length && place != null) {
    writer.writeUInt8(0x09);
    writer.writeUInt16(place);
}
return writer.toBuffer();

};

@cowpits Well I PR'ed the protocol bit, not the leaderboard bit tho :-)

Make a PR on this.

PR = pull request? it's ok you can if you want to or if you don't mind.

@cowpits You do it, I don't understand what ur sayin so u do it and it will be extremely helpful :)

or add this after the closing brace on line 152 };

dat bit confused meh

lol i know you're pulling my leg.
i'll do the pull request tonight, even though i've never done one before but i'll give it a shot.

lemme do the pr on behalf of @cowpits

correct, i didn't look at the other gamemodes because i don't use them lol

Hi, PR created, many thanks @cowpits for decoding the packet. I've put proper credit everywhere.

damn im late.

XD


TTLock: Battery Value Variations between SDK and API

We've noticed some inconsistencies in the battery values retrieved from the TTLock SDK and the TTLock API. This affects both Android and iOS devices across multiple models. Below, We've listed the devices along with the observed battery values.

iOS SDK Method:
TTLock.getElectricQuantity(withLockData: lockData) { value in
    completion(.success(value))
} failure: { _, errorMSG in
    if let errorMSG {
        completion(.failure(TTLockHelperError.custom(errorMSG)))
    } else {
        completion(.failure(TTLockHelperError.somethingWentWrong))
    }
}

Android SDK Method:
private void getLockBatteryLevel() {
    showConnectLockToast();
    TTLockClient.getDefault().getBatteryLevel(
        mCurrentLock.getLockData(),
        mCurrentLock.getLockMac(),
        new GetBatteryLevelCallback() {
            @Override
            public void onGetBatteryLevelSuccess(int electricQuantity) {
                makeToast("lock battery is " + electricQuantity + "%");
            }
            @Override
            public void onFail(LockError error) {
                makeErrorToast(error);
            }
        });
}

Expected Behavior:
The battery values retrieved from both the SDK and the API should be consistent and accurate across all supported devices.

TTLock app and TTLock API have done calculations.
int electricQuantity = electricQuantity / 5  * 5 ;  (such as 18->15, 31->30, 20->20)
The reading of electricity level is not as accurate, and a slight fluctuation is normal.


Password reset

Subject: Password reset
Description:
Forgot password
Results:
A password reset email should have been sent
Backend version: develop-7c33e18d
Frontend version:
User Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1
Page: https://couchers.org/password-reset
User:

dupe #3520


allow flexibility in error messaging for JsonSchemaMismatch error type

JsonSchemaMismatch is returned for all vaildation errors. We we're only handling bad types, not additional properties. Add the later, and don't require fields to be present in returned error message. New error message for additional properties:
cli (issue-#498)$ dcos package install --yes kafka --options=tmp123.json
This will install Apache Kafka DCOS Service.
Error: Options JSON failed validation
Unexpected properties: ['broker-count', 'placement-strategy', 'plan-strategy', 'pv']
Path: kafka

Please create a JSON file with the appropriate options, and pass the /path/to/file as an --options argument.

#499

LGTM!


Improve naming of the different components

Motivation
Currently, our naming is not consistent. With the upcoming Helm chart, the naming is even more chaotic 😓

Suggestion
Change the deployments name as follow:

scheduler
lifecycle-operator
metrics-operator
certificate-operator

Notes
I suggest having the name [action]-operator to follow the nomenclature of other well-established projects, e.g., Prometheus and Jaeger.

I like this names, looks very clean 👍


The plus (+) and minus (-) on diffs are not obvious

[Enter feedback here]
I thought the green plus or minus on the diff meant lines were added or subtracted to that side. But sometimes I see + and sometimes minus and it is not clear at all why

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 1b3cfc74-27af-298a-e4a6-7777fbaacbca
Version Independent ID: ac0163dc-cd4d-82a8-6ab8-56fa09f4c99a
Content: Compare files using Team Foundation Version Control - Azure Repos
Content Source: docs/repos/tfvc/compare-files.md
Service: azure-devops-repos
Sub-service: azure-devops-repos-tfvc
GitHub Login: @MaximMalygin
Microsoft Alias: vijayma

@MScottAdams Thanks for your question. We'll look into any changes for the article.


Add change self password UI for  User [Feature request]

I think the basic password management of changing own password would be very useful feature in the Kibana Plugin. Right now I am unable to see any option that will allow users to change their password from Kibana User interface.

True, this feature is not there. The main reason is that it would only work if you use the internal user database to store users. For all other authentication methods like LDAP, Active Directory, JSON web token, certificate based auth and so on it would not work since the user credentials are stored on an external system. We'll keep this issue open for the moment and investigate how much effort it is to implement this for the internal user database.


[BUG] SQLAlchemy-2.0.29, ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE

Describe the bug

[6/9] RUN pip3 install -r requirements.txt --no-cache-dir:
62.83 Downloading SQLAlchemy-2.0.29-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
62.85    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 174.4 MB/s eta 0:00:00
67.33 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
67.33     unknown package:
67.33         Expected sha256 0d1c580e379c0d48f0f0a08ea28d8e373295aa254de4f9ad0631f9ed8bc04c24
67.33              Got        a7b93b6c4c0e258ff588d7690bf5e5d577d78ae3ce6b11dd991b3578757c37aa
67.33

Could you please provide clear reproduction steps and any other contexts along with a detailed explanation? (Without this information, I will not be able to analyze the root cause). I'd be appreciated if you could provide detail information using existing bug reporting template.


IgnoreMap should be ignored when listing rome missing dependencies

Enhancement Suggestion
When using rome list --missing, the projects listed under [IgnoreMap] are skipped thus it is not possible to use it to "checkout" or "bootstrap" dependencies that are not stored in Rome. For example:
"rome list --missing --platform ios | awk '{print $1}' | xargs carthage bootstrap --platform ios --cache-builds"
**Current and suggested behavior**

Add a parameter to allow returning ignored projects from "rome list"

Implemented in #108
please try the binary at https://github.com/blender/Rome/releases/tag/v<IP_ADDRESS>


Viscoelasticty updates

Code is now general and should work for symmetric and unsymmetric case with any loadings in elasticity and viscoelasticity.

Accepted


Extant RP-0 releases should be for KSP 0.90 only.

Attn @NathanKell.
Thanks to @magico13 and @Murdabenne for spotting this.
Thanks to Perl for making this easy:
perl -i -pe's/("download_size":\s*\d+),?/$1,\n    "ksp_version": "0.90"/' *.ckan

LGTM,


Bootstrap modal new/edit forms

Spiritual successor to #74
I would like the new/edit forms found throughout the website to be implemented as Bootstrap modals on the index pages (Tasks#index would hold the Tasks#new and Tasks#edit forms, etc). Naturally, I think it would be best to have these fields appear in a column with a save button at the bottom, much like the Bootstrap static example.
I think using render and keeping the forms in their respective partials would work well, but I'm open to alternate implementations.

on it @J3RN

@rishiraj824 Any progress on this?

Will be done today. Been travelling. @J3RN

@rishiraj824 Now that Hacktoberfest is over, do you still want to work on this, or should I reassign it?

I'm closing this in favor of using a fat client JavaScript frontend to somehow do creation of new tasks, tags, time entries, etc, inline.


Swap tracks example

Example showing how to simulate RTPSender.ReplaceTrack as mentioned in #1020

This is fantastic! Thank you so much @cretz :)
Merging now

This is really amazing @cretz
I don't very often see demos in WebRTC that makes me go 'Damn that is cool', but this does :) the animation is so fluid, and the switching is so perfect. Really fantastic work.
I am excited to share this on Twitter, you have a lot of cool concepts going on here that people should see. Would you be interested in joining the Pion org? We have a talked a few times, but seeing this really makes me want to get you more involved :)

Would you be interested in joining the Pion org? We have a talked a few times, but seeing this really makes me want to get you more involved :)

I am in awe of your dedication, but I fear I don't share it :-) I come back to this project every so often, make a toy, move on, heh. I fear me joining the org would be doing it a disservice as I can just go radio silent here and there. Offer appreciated though.
Here is some code I hacked together for a project I'm working on (untested yet) that lets you switch an inbound stream if it helps anyone:

import (
	"context"
	"io"
	"sync/atomic"

	"github.com/pion/rtp"
	"github.com/pion/webrtc/v2"
)

// TrackSink pipes an incoming track to an outgoing one and allows the incoming
// track to be changed.
type TrackSink struct {
	out            interface{ WriteRTP(*rtp.Packet) error }
	outSSRC        uint32
	inTrack        atomic.Value
	inTrackUpdated chan struct{}
}

// NewTrackSink creates a new TrackSink for the given out track (given as a
// writer and a SSRC value).
func NewTrackSink(out interface{ WriteRTP(*rtp.Packet) error }, outSSRC uint32) *TrackSink {
	return &TrackSink{
		out:     out,
		outSSRC: outSSRC,
		// Buffer one
		inTrackUpdated: make(chan struct{}, 1),
	}
}

type inTrack struct {
	track         *webrtc.Track
	lastTimestamp uint32
}

// SetInTrack changes the current incoming track to the given one. If a nil
// track is given, the outbound writes are stopped until a non-nil track is
// given.
func (t *TrackSink) SetInTrack(track *webrtc.Track) {
	// Change and signal non-blocking
	t.inTrack.Store(&inTrack{track: track})
	select {
	case t.inTrackUpdated <- struct{}{}:
	default:
	}
}

// Run continuously writes to the outbound track as needed until the context is
// closed or an error occurs. If an error occurs on read of a track, onReadError
// is invoked if it's non-nil. Only if the result of onReadError is non-nil will
// the process be stopped and that error returned. Otherwise the read error is
// swalled. All write errors stop this process and are returned. If the context
// is closed, the process is stopped and that error is returned. This always
// returns a non-nil error.
func (t *TrackSink) Run(ctx context.Context, onReadError func(error) error) error {
	// Keep track of the timestamp
	var currTimestamp, lastTimestampDelta uint32
	// The byte buffer and rtp packet to reuse
	buf := make([]byte, 1460)
	var rtpPacket rtp.Packet
	// Keep track of last failed reader to ignore
	var lastFailedIn *inTrack
	// Sequence number to increment each successful packet
	var seqNum uint16
	// Run until context canceled
	for ctx.Err() == nil {
		// Grab in track
		in, _ := t.inTrack.Load().(*inTrack)
		// If the track is not there, wait for signal and try again
		if in == nil || in.track == nil || in == lastFailedIn {
			select {
			case <-ctx.Done():
				return ctx.Err()
			case <-t.inTrackUpdated:
				continue
			}
		}
		// Read info byte buf
		// TODO: What about deadlines?
		n, err := in.track.Read(buf)
		// If no error, unmarshal into packet. We confirmed only the following two
		// header values need to be cleared.
		if err == nil {
			rtpPacket.ExtensionProfile, rtpPacket.ExtensionPayload = 0, nil
			err = rtpPacket.Unmarshal(buf[:n])
		}
		// If there's an error, notify, mark failed, continue
		if err != nil {
			// Send read error
			if onReadError != nil {
				if err = onReadError(err); err != nil {
					return err
				}
			}
			// Mark as last failed and continue
			lastFailedIn = in
			continue
		}
		// Set the ssrc and sequence number
		rtpPacket.SSRC = t.outSSRC
		seqNum++
		rtpPacket.SequenceNumber = seqNum
		// Apply last timestamp delta if there is a prev timestamp. If there's not,
		// it means it's the first time we've seen this track, so we use the last
		// delta from the previous stream.
		if in.lastTimestamp != 0 {
			lastTimestampDelta = rtpPacket.Timestamp - in.lastTimestamp
		}
		// Apply the last timestamp
		currTimestamp += lastTimestampDelta
		in.lastTimestamp = rtpPacket.Timestamp
		rtpPacket.Timestamp = currTimestamp
		// Attempt write. We ignore ErrClosedPipe. We have confirmed that the packet
		// is not referenced beyond the call.
		if err := t.out.WriteRTP(&rtpPacket); err != nil && err != io.ErrClosedPipe {
			return err
		}
	}
	return ctx.Err()
}

Merged with 97c8f5290c0c00bb4fa7cab989f5a4e9631293fb
No worries about joining, when you get the bug though and want to get deep into jitterbuffer stuff I am here :p
I ended up dropping the channel completely, I just continue if trackCount == 0! I ended up leaving the reader goroutine, I think that is good. I might reorganize things, maybe it would feel better if it right next to the OnTrack? I tend to overthink things, but these examples are probably the most important thing we have, lots of people launch their projects off of them :)


Fix #550: conflicting types for _errno

Thanks to @jbmaggard for finding this and the fix.

Avg response time
coverage on master

Summary of changes
errno --> iso_errno in iso_fortran_binding tests
Rationale for changes
Fix errors on Windows
Additional info and certifications
This pull request (PR) is a:

[X] Bug fix
[ ] Feature addition
[ ] Other, Please describe:

I certify that

[X] I reviewed and followed the contributing guidelines, including
- Increasing test coverage for all feature-addition PRs
- Increasing test coverage for all bug-fix PRs for which there
does not already exist a related test that failed before the PR
- At least maintaining test coverage for all other PRs
- Ensuring that all tests pass when run locally
- Naming PR  to indicate work in progress (WIP) and to attach the PR
to the appropriate bug report or feature request issue
- White space (no trailing white space or white space errors may
be introduced)
- Commenting code where it is non-obvious and non-trivial
- Logically atomic, self consistent and coherent commits
- Commit message content
- Waiting 24 hours before self-approving the PR to give another
OpenCoarrays developer a chance to review my proposed code

LGTM


Add support for hidden columns

Allow report classes to control which columns are displayed in the formatted report by overriding display_column?(name).
Fixes #51

:+1: :smile: :clap:

+1 as well. I did the custom report view workaround in my project.

Thanks for the positive comments. Are there any plans for a release in the near future? Hoping this can be merged :)

Hey @jezstephens thank you so much for the excellent pull request.  I'm sorry I haven't gotten back to merging in dossier recently.  Merging now and doing some more cleanup before a release this afternoon.  I always need more contributors to help manage dossier so if you are interested in that, please let me know.  Thanks!


Bug: Rendering bug when editing JSON

When you edit a JSON file and try to add a new entry the other keys of the json file disappears.
See video: https://i.imgur.com/To2P44S.mp4

I think this was an issue with the old syntax highlighting, am I'm not able to reproduce now, so I'll close this out.
If its still happening, can open back up though!


Update microsoft-edge-policies.md for ForceEphemeralProfiles

Clarified that enabling the requirement of ephemeral profiles negates use of implicit sign-in and an interactive sign-in is expected when launching Microsoft Edge.

Closing this PR, ongoing discussion internally to update the policy doc.


All support for parallel processing in the CLI

If you pass in --cpus <number_of_cpus> to the CLI, it will run face recognition in parallel across multiple cpus.

Is there any way to implement cpus in python program


Can't download video

Keep showing "No URL specified, make sure to pass a valid URL to the Get Contents of URL action."

Updated the shortcut. Please let me know if it's working now.
Download link:

https://www.icloud.com/shortcuts/83f661ac621e4ea5b81e4d33092e93d0

Error message "Can't connect to gallery"

Updated the shortcut. Please let me know if it's working now. Download link:

https://www.icloud.com/shortcuts/83f661ac621e4ea5b81e4d33092e93d0

It's working now, thank you.


[Relax] Enhance Relax op and ONNX frontend

This PR adds:

relax.op.one_hot
relax.op.mod and relax.op.floor_mod
relax.op.eye and relax.op.eye_like
ONNX frontend for one_hot
ONNX frontend for mod
ONNX frontend for one_hot and hardmax
ONNX frontend for eye_like

@tvm-bot rerun


IExecutionListener multiple runs

TestNG Version
6.10
Expected behavior
onExecutionStart and onExecutionFinish should only run once per a TestNG run
Actual behavior
onExecutionStart and onExecutionFinish run per suite tag in xml
Is the issue reproductible on runner?
Yes

[ ] Shell
[x] Maven
[ ] Gradle
[ ] Ant
[ ] Eclipse
[x] IntelliJ
[ ] NetBeans

Test case sample

IExecutionListener class:
public class TestRunExecutioner2 implements IExecutionListener {
@Override
public void onExecutionStart() {
System.out.println("TESTNG starts");
}
@Override
public void onExecutionFinish() {
System.out.println("TESTNG ends");
}
}

Test class:
ContextConfiguration(classes = TestConfig.class)
@Listeners({TestRunExecutioner2.class})
public class BaseTeridionTest extends AbstractTestNGSpringContextTests {
....}

Suites xml (each inner suite is with several tests):

TestNG run via Maven/intellij:

T E S T S
Running TestSuite
log4j:WARN No appenders could be found for logger (com.ullink.slack.simpleslackapi.impl.SlackWebSocketSessionImpl).
log4j:WARN Please initialize the log4j system properly.
TESTNG starts
TESTNG starts
TESTNG starts
[INFO] - [2019-04-16T12:35:04.723Z] - [oren2]: Suite started
[INFO] - [2019-04-16T12:35:04.723Z] - [oren]: Suite started
Apr 16, 2019 12:35:05 PM com.google.api.client.googleapis.services.AbstractGoogleClient
WARNING: Application name is not set. Call Builder#setApplicationName.
[INFO] - [2019-04-16T12:35:06.992Z] - [t3a]: Test started
[INFO] - [2019-04-16T12:35:07.007Z] - [t2a]: Test started
[INFO] - [2019-04-16T12:35:07.013Z] - [t1a]: Test started
test3a
[INFO] - [2019-04-16T12:35:07.760Z] - [t3a]: Test completed successfully!
[INFO] - [2019-04-16T12:35:08.137Z] - [oren2]: Suite finished
test2a
[INFO] - [2019-04-16T12:35:08.337Z] - [t2a]: Test completed successfully!
[INFO] - [2019-04-16T12:35:08.696Z] - [t2b]: Test started
test2b
[INFO] - [2019-04-16T12:35:09.121Z] - [t2b]: Test completed successfully!
test1a
[INFO] - [2019-04-16T12:35:09.430Z] - [t1a]: Test completed successfully!
[INFO] - [2019-04-16T12:35:09.971Z] - [t1b]: Test started
test1b
[INFO] - [2019-04-16T12:35:12.405Z] - [t1b]: Test completed successfully!
[INFO] - [2019-04-16T12:35:12.756Z] - [t1c]: Test started
test1c
[INFO] - [2019-04-16T12:35:15.181Z] - [t1c]: Test completed successfully!
[INFO] - [2019-04-16T12:35:15.550Z] - [oren]: Suite finished
TESTNG ends
TESTNG ends
TESTNG ends
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.058 sec - in TestSuite
Results :
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
--->
"TESTNG starts" and "TESTNG ends" strings are printed 3 times while should be a single print

Latest released version of TestNG is 7.0.0-brta5. Please retry using that and post back your results

Works on 7.0.0-beta6


[wip] feat: add entrypoint for server-side bodyClass param

Hello! 👋  First of all, love the framework. I'm using it for a project and it's a joy to work with.
I'm running into an issue with SSR & dark mode though, as there's currently no way to modify the server-rendered HTML to send the correctly themed content down to the client (by adding a class, re: #473). Adding this (optional) parameter to TemplateOptions in conjunction with client hints headers would enable correct theme preference on the server and avoid an annoying screen flicker on the client on pageload.
Let me know if this is something that could be added & if you have other suggestions! Thanks.

@brycedorn Looking at how lang is developed, I don't think the | undefined should be in a bunch of places. maybe just an empty string and then when rendering, only setting it if it isn't an empty string. Also maybe it should have a setter to set per routes just like lang can.
I wasn't able to replicate using bodyClass in the opts of start, what's the intended usage so I could give it a test?

Thanks for taking a look @ZackarySantana! I agree with enforcing the string type, updated.
And re: your other question, I had assumed that any context modifications a middleware applies would propagate to the render fn, but these appear to be different contexts entirely. As it stands the renderer appears isolated with no way to dynamically set something like this.
I've implemented what I understand to be the requirement here: adding header logic within server/context.ts so that device theme preference can be detected server-side to be applied to set <body class="dark">. I wouldn't consider this mergeable anymore but it helps to show what I'm trying to do.
If anyone has an alternative approach that could accomplish the same thing let me know! Would love to see support for this. Additionally this could be applied to support server-side lang logic in response to the Accept-Language header, etc.

Updated approach; closing this for cleaner PR history.


messageID API users want an API that works for all topics / datatypes

The current messageID API only works for covid.  This ticket is to make it work for all future datatypes, by using the new ITEM table, created in #8032.
This ticket includes some tech debt cleanup on the messageID API as well.
Acceptance criteria
REST API Name change
The concept of message is HL7 specific.   Generalize to the term item which can be a message, a row, or a bundle, as follows:

Change api/messages/search?messageID=xxx to api/items?trackingId=xxx.
Change api/message/{covid_results_metadata_id} to api/item/{item_id}
Fix the documentation too (docs/api/message.yml, release notes, kotlin code).
Rename Message to something else (probably not Item, as that'll be generated by Jooq).  Maybe ItemHistory?

Search on item_id, not covid_results_metadata_id

The "id' returned in the new ItemHistory object, (returned by the api/items endpoint) should now always be the item_id, the primary key of the item table.
For each item found by any query in the ITEM table, also return its metadata.

Other improvements

Add 'topic' to the ItemHistory object so we know which metadata table it came from.  THis is found in the ReportFile table.

Tech debt cleanup:

The .kt files for this need to move to src/kotlin/history/azure.  messageID queries are history API queries, so they properly belong in history/azure.
ItemHistory (was Message) should be its own class to parallel DeliveryHistory.kt etc.

Implementation Notes
The linking of ITEM  - via Topic - to the corresponding ***_Metadata table can be accomplished in several different ways.

returns just the generic ITEM data, then requiring a second, topic-specific query, to get the *_metadata.   I think the way you would do this is that the api/items... query would only return generic non-topic-specific info, then the single-result api/item/{item_id} query could grab all the metadata.   This is a nice MVP solution.
using a fancy table inheritance design.    If queries are going to go across topics, or return a large number of ITEMs along with their metadata, this is the most performant solution.  However, I think its its own separate ticket.
Require the user to send a topic parameter.   Use the topic to determine which metadata table to join with.     A query can only get data for one topic.  Return metadata in both api/items... and api/item/{item_id} queries.

Waiting on Uinversal Search design to create Epic.


update pre commit as suggested by CLI

Noticed this in CI for the last PR and figured I'd fix it while code is building

Still saying it for the MD link check, but pre-commit autoupdate --repo https://github.com/tcort/markdown-link-check doesn't fix it

CI failing because #44 hasn't gone in yet


Mpumalanga COVID 19 Expenditure Report - Clinipro spend

Nice Website for a company that had a Turnover of  +/- R 186 Mil


Getting returned non-zero exit status 2 in ROUGUE-1.5.5.pl

@Wendy-Xiao I am trying to reproduce the results, but I am getting the following error, can you please guide me if I am missing something here?
 python test.py --train_input datasets/pubmed/inputs/train --train_label datasets/pubmed/labels/train --test_input datasets/pubmed/inputs/test --test_label datasets/pubmed/labels/test --refpath datasets/pubmed/human-abstracts/test --gloveDir embeddings --length_limit 200 --dataset Pubmed --device 0 --model attentive_context --model_path pretrained_models/Pubmed/attentive_context
Namespace(batchsize=32, cell='gru', dataset='Pubmed', device=0, embedding_dim=300, gloveDir='embeddings', hidden_dim=300, length_limit=200, mlp_size=100, model='attentive_context', model_path='pretrained_models/Pubmed/attentive_context', refpath='datasets/pubmed/human-abstracts/test', remove_stopwords=False, result_file_name=None, runtime=0, stemmer=False, test_file_list=None, test_input='datasets/pubmed/inputs/test', test_label='datasets/pubmed/labels/test', train_file_list=None, train_input='datasets/pubmed/inputs/train', train_label='datasets/pubmed/labels/train', vocab_size=50000)
Load vocabulary from vocabulary_Pubmed.json
Compute pos weight done! There are 4464502 sentences in total, with 203135 sentences as positive
Start loading model.
Start evaluating.
Batch 1, Loss: 1.053281
Can't locate XML/DOM.pm in @INC (you may need to install the XML::DOM module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /Data/santosh_1821cs03/.cache/Python-Eggs/rouge_papier_v2-0.0.1-py3.7.egg-tmp/rouge_papier_v2/data/ROUGE-1.5.5.pl line 173.
BEGIN failed--compilation aborted at /Data/santosh_1821cs03/.cache/Python-Eggs/rouge_papier_v2-0.0.1-py3.7.egg-tmp/rouge_papier_v2/data/ROUGE-1.5.5.pl line 173.
Traceback (most recent call last):
  File "test.py", line 140, in <module>
    r2, l = eval_seq2seq(test_dataloader,model,hyp_path,LENGTH_LIMIT,pos_weight,device,USE_SECTION_INFO,remove_stopwords,stemmer,meteor=True,lcs=lcs,saveas=SAVE_RESULT_NAME)
  File "/Data/santosh_1821cs03/Santosh/Extractive-SUMM/extractive-summarization/run.py", line 86, in eval_seq2seq
    rouge2,df = get_rouge(summ_path, ref_path, length_limit,remove_stopwords,stemmer,lcs)
  File "/Data/santosh_1821cs03/Santosh/Extractive-SUMM/extractive-summarization/utils.py", line 98, in get_rouge
    remove_stopwords=remove_stopwords,stemmer=stemmer,set_length = False, length=length_limit)
  File "/Data/santosh_1821cs03/anaconda3/envs/extractive-summarization/lib/python3.7/site-packages/rouge_papier_v2-0.0.1-py3.7.egg/rouge_papier_v2/wrapper.py", line 61, in compute_rouge
  File "/Data/santosh_1821cs03/anaconda3/envs/extractive-summarization/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/Data/santosh_1821cs03/anaconda3/envs/extractive-summarization/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'perl /Data/santosh_1821cs03/.cache/Python-Eggs/rouge_papier_v2-0.0.1-py3.7.egg-tmp/rouge_papier_v2/data/ROUGE-1.5.5.pl -e /Data/santosh_1821cs03/.cache/Python-Eggs/rouge_papier_v2-0.0.1-py3.7.egg-tmp/rouge_papier_v2/rouge_data -a -n 2 -d -r 1000 -f A -z SPL ./config' returned non-zero exit status 2.

In the following command:
perl /Data/santosh_1821cs03/.cache/Python-Eggs/rouge_papier_v2-0.0.1-py3.7.egg-tmp/rouge_papier_v2/data/ROUGE-1.5.5.pl -e /Data/santosh_1821cs03/.cache/Python-Eggs/rouge_papier_v2-0.0.1-py3.7.egg-tmp/rouge_papier_v2/rouge_data -a -n 2 -d -r 1000 -f A -z SPL ./config
there is ./config , what is this file ?

This was happening probably because of old version of Perl. Here is the solution: perl -MCPAN -e 'install XML::DOM'
For more details:
https://stackoverflow.com/questions/37591185/cant-locate-xml-dom-pm-in-inc-you-may-need-to-install-the-xmldom-module


Delete the sample in v4 and update the readme

1.Delete v4 code.
2.Update the readme to point to the samples in the mono-repo that do the same thing as what is in this repo.

@lmazuel - Can you please review?

The link in line 34 of the README seems to point to a private repository, or none at all -- clicking the "Deploy to Azure" button brings up the following error in the Azure Portal:
There was an error downloading the template from URI 'https://raw.githubusercontent.com/Azure-Samples/app-service-msi-keyvault-python/master/azuredeploy.json'. Ensure that the template is publicly accessible and that the publisher has enabled CORS policy on the endpoint. To deploy this template, download the template manually and paste the contents in the 'Build your own template in the editor' option below.
I can't find an app-service-msi-keyvault-python repository in Azure Samples from GitHub, so it must not be public if one exists.

It looks like the original repo that the link points to has been renamed. Replacing the link href with https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure-Samples%2Fazure-sdk-for-python-keyvault-secrets-get-set-managedid%2Fmaster%2Fv4%2Fazuredeploy.json would resolve the issue.


Install falco and sysdig on compute nodes

This provides some useful tools like:

csysdig (a top for containers)
falco (a service that audits suspicious activity inside containers)

For now only in compute.yml (so not for ansible-pull).
Use CSCfi/ansible-falco fork. The old sysdig role we looked at in #191
has disappeared
Have tested that "journalctl -xefu falco" writes things to the journal
when "event_generator -a all" is run from within this container:
singularity run docker://sysdig/falco-event-generator

This has been running on one of our compute nodes in the test cluster for a week.
The log file of that node on the admin node's central log is about 5x larger gzip compressed (from 100KiB to 500KiB).
A lot of the messages are from falco (which are matching because it's complaining about ansible).

$ sudo zcat io1.log-20180411.gz |wc -l
22344
$ sudo zcat io1.log-20180411.gz |grep -c falco
18805

I'm thinking before this is merged we should add some rules to have falco not complain about ansible-pull.
https://github.com/draios/falco/wiki/Falco-Rules

Can this old PR from 2018 be closed now?
I'm looking at old PRs from my organizations, and this is a very old PR, and I guess it can be closed now since probably there is another solution.  But I can't do it myself.

Yeah lets close it.


Files are downloaded as a folder with the files name

Prerequisites

[ X] Put an X between the brackets on this line if you have done all of the following:

Checked that your issue isn't already filed: https://github.com/icetee/remote-ftp/issues

Description
I'm having issues with all files. They seem to be processed as folders when trying to access them directly but when downloading the parent folder they are processed correctly as files.
This is the same as https://github.com/icetee/remote-ftp/issues/1022 the issue still persists in 1.2.6.
Screenshot of create files: https://puu.sh/y0dp0/488af110f2.png
In 1.2.6 - https://puu.sh/y3ntw/cfb0dfaddd.png
For example when I try to download a /folder/style.css the progress bar is trying to download /folder/style.css/style.css
Steps to Reproduce
Create a file on your FTP server and try downloading it with the remote-ftp plugin in Atom.
Expected behavior:

Downloading a file that doesnt exist on my computer from the server creates the file with the same name and contents.
Downloading the parent directory of my files creates/updates the files and the directory
Uploading the file to server updates the file on the server

Actual behavior:

Downloading a file that doesnt exist on my computer from the server creates a folder instead.
Downloading the parent directory of my files creates files correctly
Uploading the file to server gets stuck.

Reproduces how often: [100%]
Versions
remote-ftp - 1.2.6
Atom - 1.21.1
OS - Windows 10 Pro 64bit
Additional Information
I'm not experiencing this behavior in IntelliJ Remote Host plugin, or FileZilla app..

Did the previously downloaded file have been removed?
What type of server do you have? vsftpd?

Yes I did delete the file and try to download again with the same issue, even for files I didn't previously download. It only works correct when I download through the parent folder.
Our server is used for a Java library that our CMS uses. It's org.apache.ftpserver - ftpserver-core 1.0.6 https://mvnrepository.com/artifact/org.apache.ftpserver/ftpserver-core/1.0.6

Hi,
I have a similar Problem:
I'm connected to the ftp Server (sftp) but when trying to sync/download it just Downloads the folders not the files. Only whenn download the direct folder then the subfiles will be downloaded.
Is this corrected? Remote-ftp does not work otherwise.
Atom: 1.21.1
Remote-FTP: 1.2.6
SFTP
OS: Windows 7


[submodule] Use https clone url for bluez

Problem
Currently, we are using git protocol for bluez submodule clone, the backend of git protocol is ssh, and the clone process is very slow (3 KB/s) in China. However, when using the https url, the speed is acceptable (1 MB/s).

Summary of Changes
Change the repo url of bluez https://kernel.googlesource.com/pub/scm/bluetooth/bluez.git to according to https://git.kernel.org/pub/scm/bluetooth/bluez.git/

Fixes #3431

should we be using https://git.kernel.org/pub/scm/bluetooth/bluez.git instead?

should we be using https://git.kernel.org/pub/scm/bluetooth/bluez.git instead?

@erjiaqing is this a protocol issue or a problem with the kernel.org site? If the former I agree we should stick with kernel.org instead of the googlesource.com mirror.

should we be using https://git.kernel.org/pub/scm/bluetooth/bluez.git instead?

@erjiaqing is this a protocol issue or a problem with the kernel.org site? If the former I agree we should stick with kernel.org instead of the googlesource.com mirror.

This is a protocol issue, and seems using the https url on kernel.org will result in "cannot fetch unpublished objects"

should we be using https://git.kernel.org/pub/scm/bluetooth/bluez.git instead?

@erjiaqing is this a protocol issue or a problem with the kernel.org site? If the former I agree we should stick with kernel.org instead of the googlesource.com mirror.

This is a protocol issue, and seems using the https url on kernel.org will result in "cannot fetch unpublished objects"

Is "cannot fetch unpublished objects" the literal error you get?  What are the steps to reproduce that error?

should we be using https://git.kernel.org/pub/scm/bluetooth/bluez.git instead?

@erjiaqing is this a protocol issue or a problem with the kernel.org site? If the former I agree we should stick with kernel.org instead of the googlesource.com mirror.

This is a protocol issue, and seems using the https url on kernel.org will result in "cannot fetch unpublished objects"

Is "cannot fetch unpublished objects" the literal error you get? What are the steps to reproduce that error?

The actual error is  Error: error: Server does not allow request for unadvertised object e8f8a59660670d22214ecdfdf7014e353c3f56f2
And the failed CI can be found at https://github.com/project-chip/connectedhomeip/runs/1306602174
git submodule update --init will not throw this error.

should we be using https://git.kernel.org/pub/scm/bluetooth/bluez.git instead?

@erjiaqing is this a protocol issue or a problem with the kernel.org site? If the former I agree we should stick with kernel.org instead of the googlesource.com mirror.

This is a protocol issue, and seems using the https url on kernel.org will result in "cannot fetch unpublished objects"

Is "cannot fetch unpublished objects" the literal error you get? What are the steps to reproduce that error?

The actual error is  Error: error: Server does not allow request for unadvertised object e8f8a59660670d22214ecdfdf7014e353c3f56f2
And the failed CI can be found at https://github.com/project-chip/connectedhomeip/runs/1306602174
git submodule update --init will not throw this error.
Since https://kernel.googlesource.com/pub/scm/bluetooth/bluez.git is a url listed on https://git.kernel.org/pub/scm/bluetooth/bluez.git/, I think it is ok to use.

ok, I see.  --depth=1 is a problem for kernel.org, apparently


#14544 ability to read columns with constraints implemented

with the new connection setting

Try to use isFullyCached

Let's read constraints along with columns but not read them on demand.

Verified


Remove BundlerMinifier in bundling-and-minification-md

Fixes #21659
Internal review page

As part of this PR, I suggest we also retire https://docs.microsoft.com/aspnet/core/client-side/using-grunt. Grunt is an open-source tool that Microsoft doesn't own, and this doc is seriously outdated. Grunt was used for bundling & minification is the very early days of ASP.NET Core (in the days of DNX and project.json). It too was removed from the project templates. After retiring the doc, you can redirect to https://gruntjs.com.

@scottaddie, I will remove using-grunt.md as a 2nd pr today since an number of topics reference it, and this needs to be published right away.

@scottaddie, The gulpfile.js example we specify bundleconfig = require('./bundleconfig.json');     The json could be named anything in this case, and it makes sense to call your own bundleconfig.json, but that might also cause some confusion since the template used to provide that.  I'm thinking we should just leave it named thus however.

@wadepickett Let's remove that entire Consume bundleconfig.json from Gulp section. The VS extension provided an option to right-click the bundleconfig.json file and convert it to gulpfile.js. We don't want to lead anyone to believe that's still supported.

@scottaddie, per our discussion I will remove the sample folder plus these sections in moment.
•	Consume bundleconfig.json from Gulp
•	Run Gulp tasks

@madskristensen, for visibility, review.

LGTM

Updates per review all in, however OPS services are not available as of a few minutes ago, so I can't get a doc validation and build until that is fixed.  I'm watching for it...

@wadepickett The doc build failure is likely related to the current Azure AD outage. Try retriggering the build once that outage is resolved.


issue with Dictionary

There's an issue when opening a json file containing a dictionary. Dictionary values serialization doesn't seems to be supported?
DictionaryIssue.zip
See the attached files

Nope dictionaries are not yet supported... would you like to create a pr for that?

Hallo, any progress with Dictionary?


Articles on website are not ordered by date

See https://inbo.github.io/tutorials/articles/ -- the latest one is not at the top but at the bottom.

@niconoe would you be able to investigate this?

Absolutely. Thanks for your patience, adding this to my 2021 to-do list

Solved by @niconoe in #276. Thanks!


Google Login Window

How can i implement a google login portion on the drawer like the one in google apps (Gmail, Play Store, etc).  Some like this: http://www.google.com/design/spec/patterns/navigation-drawer.html
Im thinking adding the Google Plus API, but cant find any good tutorial about it.
If you can point me in the right direction, i would thank you.

This is not an issue and has nothing to to with the template. This template enforces developers to implement their own material design application giving them something to start work on.
What you're asking can be simple found by googling a little bit.
http://bit.ly/1zXcAmI


When trying to add 'bind:' before 'value={selected}', the cursor moved to the end of line.

Going through the 'select bindings' lesson.
Just noticed that when trying to add 'bind:' before 'value={selected}', the cursor moved to the end of line.
Copy and paste works, but once I move the cursor to beginning of line and start writing, the letters appear end of line.

I came to report this same issue.


Application of the method on regression problems

Dear authors,
Thank you for your wonderful and interesting work! I have one question about the adaptation of your method on regression problems. When the label space is continuous, like monocular depth estimation, could you please provide some insights on how to modify the current version?
Thanks in advance!

Hi,
Similar to the classification task which backprop from the logits, it's
applicable to backprop from the prediction before calculating the loss on
regression problems. There might be some small modifications to the code
when switching from classification to regression, but the idea is the same.
If you don't mind, please share the part of the regression implementation
with me(zeyih(at)andrew(dot)cmu(dot)edu). I can take a look quickly.
On Tue, Apr 26, 2022 at 9:39 AM silvia1993 @.***> wrote:

I have the same doubt.
I'm trying to apply this approach to a binary classification problem
characterized by a single final FC that gives a probability from 0 to 1.
I'm afraid that RSC is not easily applicable when we have a continuous
output.
However, I hope that the authors @Justinhzy https://github.com/Justinhzy
@dghuangGH https://github.com/dghuangGH will give us some insights.
—
Reply to this email directly, view it on GitHub
https://github.com/DeLightCMU/RSC/issues/22#issuecomment-1109879986, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AFI42GXQ5B3ASOMTJPDPEWLVG75YVANCNFSM5P7XJX2A
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Warm Regards
---Zeyi Huang

@Justinhzy Thank you for your quick reply!
Yes, of course I can share the code.
I start from the DomainBed implementation -> here
This is my implementation considering a regression problem, my main concern is about Equation (1) for the element-wise product that should be done with the one-hot y vector.
def __init__(self,opt, modelpath=None, learning_rate=1e-4):

        self.model = ResNet50(n_classes=1, pretrained=True)
        self.drop_f = (1 - 1/3) * 100
        self.drop_b = (1 - 1/3) * 100

def do_iteration_RSC(self, loader):

        self.model.train()

        images, targets = next(loader)

        # Resnet50 model
        # all_f -> features before average pooling
        # all_p -> final output, made by just one value (regression problem)
        all_p, all_f = self.forward(images)

        # Equation (1): compute gradients with respect to representation
        # HERE MY DOUBT ->  in DomainBed (all_p * all_o) with all_o one-hot label vector
        all_g = autograd.grad((all_p).sum(), all_f)[0]

        # Equation (2): compute top-gradient-percentile mask
        percentiles = np.percentile(all_g.cpu(), self.drop_f, axis=1)
        percentiles = torch.Tensor(percentiles)
        percentiles = percentiles.unsqueeze(1).repeat(1, all_g.size(1))
        mask_f = all_g.lt(percentiles).float()

        # Equation (3): mute top-gradient-percentile activations
        all_f_muted = all_f * mask_f

        # Equation (4): compute muted predictions
        all_p_muted = self.model.classifier(all_f_muted)

        # Section 3.3: Batch Percentage
        changes = (all_p).sum(1) - (all_p_muted).sum(1)
        percentile = np.percentile(changes.detach().cpu(), self.drop_b)
        mask_b = changes.lt(percentile).float().view(-1, 1)
        mask = torch.logical_or(mask_f, mask_b).float()

        # Equations (3) and (4) again, this time mutting over examples
        all_p_muted_again = self.model.classifier(all_f * mask)

        self.optimizer.zero_grad()

        lossbce = torch.nn.BCEWithLogitsLoss()
        loss = lossbce(all_p_muted_again.squeeze(), targets)
        loss.backward()
        self.optimizer.step()

        return loss.item()

@Justinhzy Thank you for your quick reply!
Yes, of course I can share the code.
This is my implementation considering a regression problem.
I started from your implementation and commented out some parts, It compiles but I'm not sure that it is conceptually correct. I commented with #### REMOVED #### the lines that I removed and with #### CHANGED #### the lines that I modify to fit the regression problem.
class ResNet50(nn.Module):
    def __init__(self, n_classes=1, pretrained=True, hidden_size=2048, dropout=0.5):
        super().__init__()
        self.resnet = torchvision.models.resnet50(pretrained=pretrained)
        self.resnet.fc = nn.Linear(2048, hidden_size)
        self.fc = nn.Linear(hidden_size, n_classes)
        self.relu = nn.ReLU()
        self.dropout = nn.Dropout(dropout)

        self.pecent = 1/3

    def require_all_grads(self):
        for param in self.parameters():
            param.requires_grad = True

    def forward(self, x,gt=None,flag=None,epoch=None):

        x = self.resnet.conv1(x)
        x = self.resnet.bn1(x)
        x = self.resnet.relu(x)
        x = self.resnet.maxpool(x)

        x = self.resnet.layer1(x)
        x = self.resnet.layer2(x)
        x = self.resnet.layer3(x)
        x = self.resnet.layer4(x)

        if flag:
            interval = 10
            if epoch % interval == 0:
                self.pecent = 3.0 / 10 + (epoch / interval) * 2.0 / 10

            self.eval()
            x_new = x.clone().detach()
            x_new = torch.tensor(x_new.data, requires_grad=True)
            x_new_view = self.resnet.avgpool(x_new)
            x_new_view = x_new_view.view(x_new_view.size(0), -1)
            output = self.fc(self.dropout(self.relu(x_new_view)))
            class_num = output.shape[1]
            index = gt
            num_rois = x_new.shape[0]
            num_channel = x_new.shape[1]
            H = x_new.shape[2]
            HW = x_new.shape[2] * x_new.shape[3]
            one_hot = torch.zeros((1), dtype=torch.float32).cuda()
            one_hot = torch.tensor(one_hot, requires_grad=False)
            sp_i = torch.ones([2, num_rois]).long()
            sp_i[0, :] = torch.arange(num_rois)
            sp_i[1, :] = index
            sp_v = torch.ones([num_rois])
            **#### REMOVED ####** one_hot_sparse = torch.sparse.FloatTensor(sp_i, sp_v, torch.Size([num_rois, class_num])).to_dense().cuda()
            **#### REMOVED ####** one_hot_sparse = torch.tensor(one_hot_sparse, requires_grad=False)
            **#### CHANGED ####** one_hot = torch.sum(output*one_hot_sparse)
            one_hot = torch.sum(output)
            self.zero_grad()
            one_hot.backward()
            grads_val = x_new.grad.clone().detach()
            grad_channel_mean = torch.mean(grads_val.view(num_rois, num_channel, -1), dim=2)
            channel_mean = grad_channel_mean
            grad_channel_mean = grad_channel_mean.view(num_rois, num_channel, 1, 1)
            spatial_mean = torch.sum(x_new * grad_channel_mean, 1)
            spatial_mean = spatial_mean.view(num_rois, HW)
            self.zero_grad()

            choose_one = random.randint(0, 9)
            if choose_one <= 4:
                # ---------------------------- spatial -----------------------
                spatial_drop_num = math.ceil(HW * 1 / 3.0)
                th18_mask_value = torch.sort(spatial_mean, dim=1, descending=True)[0][:, spatial_drop_num]
                **#### CHANGED ####**  th18_mask_value = th18_mask_value.view(num_rois, 1).expand(num_rois, 49)
                th18_mask_value = th18_mask_value.view(num_rois, 1).expand(num_rois, 16)
                mask_all_cuda = torch.where(spatial_mean > th18_mask_value, torch.zeros(spatial_mean.shape).cuda(),
                                            torch.ones(spatial_mean.shape).cuda())
                mask_all = mask_all_cuda.reshape(num_rois, H, H).view(num_rois, 1, H, H)
            else:
                # -------------------------- channel ----------------------------
                vector_thresh_percent = math.ceil(num_channel * 1 / 3.2)
                vector_thresh_value = torch.sort(channel_mean, dim=1, descending=True)[0][:, vector_thresh_percent]
                vector_thresh_value = vector_thresh_value.view(num_rois, 1).expand(num_rois, num_channel)
                vector = torch.where(channel_mean > vector_thresh_value,
                                     torch.zeros(channel_mean.shape).cuda(),
                                     torch.ones(channel_mean.shape).cuda())
                mask_all = vector.view(num_rois, num_channel, 1, 1)

            # ----------------------------------- batch ----------------------------------------
            **#### CHANGED ####** cls_prob_before = F.softmax(output, dim=1)
            cls_prob_before = torch.sigmoid(output).squeeze()
            x_new_view_after = x_new * mask_all
            x_new_view_after = self.resnet.avgpool(x_new_view_after)
            x_new_view_after = x_new_view_after.view(x_new_view_after.size(0), -1)
            x_new_view_after = self.fc(self.dropout(self.relu(x_new_view_after)))
            **#### CHANGED ####** cls_prob_before = F.softmax(output, dim=1)
            cls_prob_after = torch.sigmoid(x_new_view_after).squeeze()#F.softmax(x_new_view_after, dim=1)

            sp_i = torch.ones([2, num_rois]).long()
            sp_i[0, :] = torch.arange(num_rois)
            sp_i[1, :] = index
            sp_v = torch.ones([num_rois])
            **#### REMOVED ####** one_hot_sparse = torch.sparse.FloatTensor(sp_i, sp_v, torch.Size([num_rois, class_num])).to_dense().cuda()
            **#### CHANGED ####** before_vector = torch.sum(one_hot_sparse * cls_prob_before, dim=1)
            before_vector = cls_prob_before
            **#### CHANGED ####** after_vector = torch.sum(one_hot_sparse * cls_prob_after, dim=1)
            after_vector = cls_prob_after
            change_vector = before_vector - after_vector - 0.0001

            change_vector = torch.where(change_vector > 0, change_vector, torch.zeros(change_vector.shape).cuda())
            th_fg_value = torch.sort(change_vector, dim=0, descending=True)[0][int(round(float(num_rois) * self.pecent))]
            drop_index_fg = change_vector.gt(th_fg_value).long()
            ignore_index_fg = 1 - drop_index_fg
            not_01_ignore_index_fg = ignore_index_fg.nonzero()[:, 0]
            mask_all[not_01_ignore_index_fg.long(), :] = 1

            self.train()
            mask_all = torch.tensor(mask_all, requires_grad=True)
            x = x * mask_all

        features = self.resnet.avgpool(x)
        features = features.view(features.size(0), -1)
        outputs = self.fc(self.dropout(self.relu(features)))

        return outputs, features

I hope it is clear.
Thank you in advance for your help.
Silvia

Looks good to me. Again, I haven't fully explored RSC on regression. So I
list some suggestions and minor issues below.

it's better to start with vanilla RSC, which fixes the hyperparameters
and only uses spatial dimension.
I suggest removing the lines below first.
"interval = 10
if epoch % interval == 0:
self.pecent = 3.0 / 10 + (epoch / interval) * 2.0 / 10"
and change "if choose_one <= 4:" to "if choose_one <= 9:"
if it works fine, and you can change the above part back.
if I remember correctly, official Resnet doesn't use the dropout layer.
Using an additional high ratio dropout layer for Resnet will degrade RSC
performance. I suggest not using self.dropout for our implementation.
Btw, if you are curious about a more fair comparison, feel free to take a
look at the latest paper: https://arxiv.org/abs/2106.03721.

On Wed, Apr 27, 2022 at 12:52 PM silvia1993 @.***>
wrote:

@Justinhzy https://github.com/Justinhzy Thank you for your quick reply!
Yes, of course I can share the code.
This is my implementation considering a regression problem.
I started from your implementation and commented out some parts, It
compiles but I'm not sure that it is conceptually correct. I commented with ####
REMOVED #### the lines that I removed and with #### CHANGED #### the
lines that I modify to fit the regression problem.
class ResNet50(nn.Module):
def init(self, n_classes=1, pretrained=True, hidden_size=2048, dropout=0.5):
super().init()
self.resnet = torchvision.models.resnet50(pretrained=pretrained)
self.resnet.fc = nn.Linear(2048, hidden_size)
self.fc = nn.Linear(hidden_size, n_classes)
self.relu = nn.ReLU()
self.dropout = nn.Dropout(dropout)
    self.pecent = 1/3

def require_all_grads(self):
    for param in self.parameters():
        param.requires_grad = True

def forward(self, x,gt=None,flag=None,epoch=None):

    x = self.resnet.conv1(x)
    x = self.resnet.bn1(x)
    x = self.resnet.relu(x)
    x = self.resnet.maxpool(x)

    x = self.resnet.layer1(x)
    x = self.resnet.layer2(x)
    x = self.resnet.layer3(x)
    x = self.resnet.layer4(x)

    if flag:
        interval = 10
        if epoch % interval == 0:
            self.pecent = 3.0 / 10 + (epoch / interval) * 2.0 / 10

        self.eval()
        x_new = x.clone().detach()
        x_new = torch.tensor(x_new.data, requires_grad=True)
        x_new_view = self.resnet.avgpool(x_new)
        x_new_view = x_new_view.view(x_new_view.size(0), -1)
        output = self.fc(self.dropout(self.relu(x_new_view)))
        class_num = output.shape[1]
        index = gt
        num_rois = x_new.shape[0]
        num_channel = x_new.shape[1]
        H = x_new.shape[2]
        HW = x_new.shape[2] * x_new.shape[3]
        one_hot = torch.zeros((1), dtype=torch.float32).cuda()
        one_hot = torch.tensor(one_hot, requires_grad=False)
        sp_i = torch.ones([2, num_rois]).long()
        sp_i[0, :] = torch.arange(num_rois)
        sp_i[1, :] = index
        sp_v = torch.ones([num_rois])
        **#### REMOVED ####** one_hot_sparse = torch.sparse.FloatTensor(sp_i, sp_v, torch.Size([num_rois, class_num])).to_dense().cuda()
        **#### REMOVED ####** one_hot_sparse = torch.tensor(one_hot_sparse, requires_grad=False)
        **#### CHANGED ####** one_hot = torch.sum(output*one_hot_sparse)
        one_hot = torch.sum(output)
        self.zero_grad()
        one_hot.backward()
        grads_val = x_new.grad.clone().detach()
        grad_channel_mean = torch.mean(grads_val.view(num_rois, num_channel, -1), dim=2)
        channel_mean = grad_channel_mean
        grad_channel_mean = grad_channel_mean.view(num_rois, num_channel, 1, 1)
        spatial_mean = torch.sum(x_new * grad_channel_mean, 1)
        spatial_mean = spatial_mean.view(num_rois, HW)
        self.zero_grad()

        choose_one = random.randint(0, 9)
        if choose_one <= 4:
            # ---------------------------- spatial -----------------------
            spatial_drop_num = math.ceil(HW * 1 / 3.0)
            th18_mask_value = torch.sort(spatial_mean, dim=1, descending=True)[0][:, spatial_drop_num]
            **#### CHANGED ####**  th18_mask_value = th18_mask_value.view(num_rois, 1).expand(num_rois, 49)
            th18_mask_value = th18_mask_value.view(num_rois, 1).expand(num_rois, 16)
            mask_all_cuda = torch.where(spatial_mean > th18_mask_value, torch.zeros(spatial_mean.shape).cuda(),
                                        torch.ones(spatial_mean.shape).cuda())
            mask_all = mask_all_cuda.reshape(num_rois, H, H).view(num_rois, 1, H, H)
        else:
            # -------------------------- channel ----------------------------
            vector_thresh_percent = math.ceil(num_channel * 1 / 3.2)
            vector_thresh_value = torch.sort(channel_mean, dim=1, descending=True)[0][:, vector_thresh_percent]
            vector_thresh_value = vector_thresh_value.view(num_rois, 1).expand(num_rois, num_channel)
            vector = torch.where(channel_mean > vector_thresh_value,
                                 torch.zeros(channel_mean.shape).cuda(),
                                 torch.ones(channel_mean.shape).cuda())
            mask_all = vector.view(num_rois, num_channel, 1, 1)

        # ----------------------------------- batch ----------------------------------------
        **#### CHANGED ####** cls_prob_before = F.softmax(output, dim=1)
        cls_prob_before = torch.sigmoid(output).squeeze()
        x_new_view_after = x_new * mask_all
        x_new_view_after = self.resnet.avgpool(x_new_view_after)
        x_new_view_after = x_new_view_after.view(x_new_view_after.size(0), -1)
        x_new_view_after = self.fc(self.dropout(self.relu(x_new_view_after)))
        **#### CHANGED ####** cls_prob_before = F.softmax(output, dim=1)
        cls_prob_after = torch.sigmoid(x_new_view_after).squeeze()#F.softmax(x_new_view_after, dim=1)

        sp_i = torch.ones([2, num_rois]).long()
        sp_i[0, :] = torch.arange(num_rois)
        sp_i[1, :] = index
        sp_v = torch.ones([num_rois])
        **#### REMOVED ####** one_hot_sparse = torch.sparse.FloatTensor(sp_i, sp_v, torch.Size([num_rois, class_num])).to_dense().cuda()
        **#### CHANGED ####** before_vector = torch.sum(one_hot_sparse * cls_prob_before, dim=1)
        before_vector = cls_prob_before
        **#### CHANGED ####** after_vector = torch.sum(one_hot_sparse * cls_prob_after, dim=1)
        after_vector = cls_prob_after
        change_vector = before_vector - after_vector - 0.0001

        change_vector = torch.where(change_vector > 0, change_vector, torch.zeros(change_vector.shape).cuda())
        th_fg_value = torch.sort(change_vector, dim=0, descending=True)[0][int(round(float(num_rois) * self.pecent))]
        drop_index_fg = change_vector.gt(th_fg_value).long()
        ignore_index_fg = 1 - drop_index_fg
        not_01_ignore_index_fg = ignore_index_fg.nonzero()[:, 0]
        mask_all[not_01_ignore_index_fg.long(), :] = 1

        self.train()
        mask_all = torch.tensor(mask_all, requires_grad=True)
        x = x * mask_all

    features = self.resnet.avgpool(x)
    features = features.view(features.size(0), -1)
    outputs = self.fc(self.dropout(self.relu(features)))

    return outputs, features

I hope it is clear.
Thank you in advance for your help.
Silvia
—
Reply to this email directly, view it on GitHub
https://github.com/DeLightCMU/RSC/issues/22#issuecomment-1111309578, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AFI42GVBQMDU4O3RSP3XC3DVHF5FLANCNFSM5P7XJX2A
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Warm Regards
---Zeyi Huang

Thank you for the reply @Justinhzy
But I have still some doubts, in particular when I apply Formula (1) of your paper.
In the standard classification problem (so not continuous) we want (h(z; θtop) ⊙ y) to be high (because we want the maximum probability prediction for the correct classes). When we compute the gradient ∂(h(z; θtop) ⊙ y)/∂z we individuate the components of z that produce the larger increase of (h(z; θtop) ⊙ y) and so the formula works.
In the regression problem instead, we cannot do the element-wise multiplication since h(z; θtop) is already a (1 x Batch_size) vector, and we don't want its maximization since we want a low probability value for samples from class 0 and a large probability value for samples from class 1. So it should be something likes [0.1, 0.9 , 0.1, 0.95] with ground truth [0 , 1 , 0 , 1]. If I compute the formula ∂(h(z; θtop))/∂z it doesn't make sense because I will found the components of z that produce a larger h(z; θtop).
I don't know if I was clear. What do you think about that?
Thank you again,
Silvia

Your implementation looks good to me If you intend to do backprop from
prediction.
Also, you can try to backprop from loss (all_g = autograd.grad(loss,
all_f)[0]). I haven't tried it but I guess there should be some difference
between classification and regression.
Let me know if you have any questions.
On Wed, Apr 27, 2022 at 2:41 AM silvia1993 @.***> wrote:

@Justinhzy https://github.com/Justinhzy Thank you for your quick reply!
Yes, of course I can share the code.
I start from the DomainBed implementation -> here
https://github.com/facebookresearch/DomainBed/blob/8f231f293470b46486182fbb19f3e2b05994de80/domainbed/algorithms.py#L866
This is my implementation considering a regression problem, my main
concern is about Equation (1) for the element-wise product that should be
done with the one-hot y vector.
def init(self,opt, modelpath=None, learning_rate=1e-4):
    self.model = ResNet50(n_classes=1, pretrained=True)
    self.drop_f = (1 - 1/3) * 100
    self.drop_b = (1 - 1/3) * 100

def do_iteration_RSC(self, loader):
    self.model.train()

    images, targets = next(loader)

    # Resnet50 model
    # all_f -> features before average pooling
    # all_p -> final output, made by just one value (regression problem)
    all_p, all_f = self.forward(images)

    # Equation (1): compute gradients with respect to representation
    # HERE MY DOUBT ->  in DomainBed (all_p * all_o) with all_o one-hot label vector
    all_g = autograd.grad((all_p).sum(), all_f)[0]

    # Equation (2): compute top-gradient-percentile mask
    percentiles = np.percentile(all_g.cpu(), self.drop_f, axis=1)
    percentiles = torch.Tensor(percentiles)
    percentiles = percentiles.unsqueeze(1).repeat(1, all_g.size(1))
    mask_f = all_g.lt(percentiles).float()

    # Equation (3): mute top-gradient-percentile activations
    all_f_muted = all_f * mask_f

    # Equation (4): compute muted predictions
    all_p_muted = self.model.classifier(all_f_muted)

    # Section 3.3: Batch Percentage
    changes = (all_p).sum(1) - (all_p_muted).sum(1)
    percentile = np.percentile(changes.detach().cpu(), self.drop_b)
    mask_b = changes.lt(percentile).float().view(-1, 1)
    mask = torch.logical_or(mask_f, mask_b).float()

    # Equations (3) and (4) again, this time mutting over examples
    all_p_muted_again = self.model.classifier(all_f * mask)

    self.optimizer.zero_grad()

    lossbce = torch.nn.BCEWithLogitsLoss()
    loss = lossbce(all_p_muted_again.squeeze(), targets)
    loss.backward()
    self.optimizer.step()

    return loss.item()

—
Reply to this email directly, view it on GitHub
https://github.com/DeLightCMU/RSC/issues/22#issuecomment-1110657428, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AFI42GSL7GEL66S3UWIVGELVHDVTVANCNFSM5P7XJX2A
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Warm Regards
---Zeyi Huang


Migration to Jira

@tomwells98 Have you considered GitHub Projects

Tom to have conversation with Sharad and Shreya

Change freeze could be a good window

closing as this has been duplicated


[units/urb-persister-sql] Implement persister for SQL

Use Bookshelf ORM as shown in this DataLoader walk through:
http://gajus.com/blog/9/using-dataloader-to-batch-requests
Bookshelf supports:
PostgreSQL, MySQL, and SQLite3
http://bookshelfjs.org/

Seems like there are no automatic migrations which is unfortunate

Apparently Knex/Bookshelf lack automatic migrations, so they are out.


[gardening] Dead File Elimination

Resolves SR-10016.

@swift-ci please test and merge

@milseman - lol, love the commit message!  That should totally be a pass!


Fix escaping in single sourcing of version

See issue #388 for discussion of these changes.
Release checklist

[ ] Authors updated in cf-conventions.adoc?
[ ] Next version in cf-conventions.adoc up to date? Versioning inspired by SemVer.
[ ] history.adoc up to date?
[ ] Conformance document up-to-date?

For maintainers
After the merge remember to delete the source branch.
Tags are set at the conclusion of the annual meeting; until then master always is a draft for the next version.

Thank you - this works, see https://github.com/zklaus/cf-conventions/actions/runs/3053126502


Bookmark: "Stay on top of your Literature"

With the new design, the title of the page is "Stay on top of your Literature".
The issue is that this is also the title of the bookmark (at least with Firefox). This makes the bookmark difficult to identify afterwards.

Thanks for the report! Should be fixed now

Indeed, fixed!


Add support for local tarballs

I found this useful in https://gitlab.haskell.org/ghc/head.hackage/-/merge_requests/228.
In short, a tarball source may either be a remote tarball (specified using the url attribute) or a local tarball (specified using path).

Hi @bgamari,
thanks for this contribution. Supporting different source locations is definitely something I intend to do. That said, I think we already have a better way to help you with MR 228 (the force-version flag) so I am going to prioritise that instead. I'll get back to this later.

Indeed, force-version works nicely. I've migrated to it in https://gitlab.haskell.org/ghc/head.hackage/-/merge_requests/228.


feat: Add command line interface with basic commands.

Closes https://github.com/bvanelli/actualpy/issues/60


opening composer bot in Power Virtual Agent

Hi,
I am able to open a PVA bot inside Composer but could you please let me know the steps how to open a composer bot in PVA.
In Pva there is option to open composer with in PVA platform

But if  I create a bot directly in composer, there is no option to open it in PVA.
Thanks....

@BeheraMadan PVA applies some constraints to the functionality available to a bot created in Composer. When attempting to publish a bot directly to PVA it may return validation errors or other issues.
The recommendation is to start in PVA and click that button that you highlighted and it will start a Composer project with these constraints applied and should allow you to publish back to the bot.
Closing as a how-to


add Update struct for identifying how a melange package can be updated

fixes #336

If this looks good I'll add update this PR with docs to describe the new update fields.

LGTM.


add unit tests

Currently there are no unit tests, partly because I don't know of a good way to unit test UI code, and partly out of laziness. Certainly the reducer logic can be unit tested in a straightforward way.

We could always use more unit tests, but there are plenty of these now, with good examples of how to test reducer and middleware logic.


Peer-peer

#REVIEW

We would suggest changing how you over-repeat the container classes.
We would advise following the dimensions of the design.

Fix dimension and other issues.

#Congratrations

You are now good to go.


vale: init at 0.10.1

Motivation for this change
Add Vale package
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[X] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[X] Fits CONTRIBUTING.md.

Are you willing to add yourself as the maintainer of this package?

@GrahamcOfBorg build vale

Success on x86_64-linux (full log)
Partial log (click to expand)
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/scripts/sign.sh: interpreter directive changed from "/bin/bash" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash"
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/github.com/gobwas/glob/bench.sh: interpreter directive changed from " /bin/bash" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash"
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/github.com/jdkato/regexp/export.sh: interpreter directive changed from "/bin/sh" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/sh"
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/unix/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash"
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/unix/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash"
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash"
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: interpreter directive changed from "/bin/sh" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/sh"
/nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash"
checking for references to /tmp/nix-build-vale-0.10.1.drv-0 in /nix/store/x2zc57cyy6axwz83rfsja1272w95sl7j-vale-0.10.1...
/nix/store/90c20shhbyii6r5wm94gnkzwzn6dda42-vale-0.10.1-bin

Success on x86_64-darwin (full log)
Attempted: vale
Partial log (click to expand)
patching script interpreter paths in /nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/scripts/sign.sh: interpreter directive changed from "/bin/bash" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash"
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash"
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash"
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: interpreter directive changed from "/bin/sh" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/sh"
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/unix/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash"
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/unix/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash"
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/github.com/jdkato/regexp/export.sh: interpreter directive changed from "/bin/sh" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/sh"
/nix/store/77qr4paailczvb2jl2s9grgpqz8fxp8p-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/github.com/gobwas/glob/bench.sh: interpreter directive changed from " /bin/bash" to "/nix/store/pkjmwq7sqrvjg7cjiph6hq0khsmfl6p8-bash-4.4-p12/bin/bash"
/nix/store/5278yjpvaynd2rsf175s3dxzx9zmrgs8-vale-0.10.1-bin

Success on aarch64-linux (full log)
Attempted: vale
Partial log (click to expand)
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/scripts/sign.sh: interpreter directive changed from "/bin/bash" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/bash"
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/github.com/gobwas/glob/bench.sh: interpreter directive changed from " /bin/bash" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/bash"
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/github.com/jdkato/regexp/export.sh: interpreter directive changed from "/bin/sh" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/sh"
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/bash"
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/bash"
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: interpreter directive changed from "/bin/sh" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/sh"
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/unix/mkall.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/bash"
/nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1/share/go/src/github.com/ValeLint/vale/vendor/golang.org/x/sys/unix/mkerrors.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/lnws52qanbi5vz8qg24v4ym57nznfndg-bash-4.4-p12/bin/bash"
checking for references to /build in /nix/store/h1zky3ammj76ksy7qzpvw17fwhz3ff4s-vale-0.10.1...
/nix/store/3plgfkvvfvvkfd84rjrzjics25l7770b-vale-0.10.1-bin

@ryantm sure, do I add myself to maintainer-list.nix?

Yes, please!

done :)


Fix formatting

Description
Updates code style and pre-commit checks to match sqlalchemy. A few things to note:

# fmt: off + # fmt: on was needed to keep black and zimports from fighting
I added flake8-pyi and did not include flake8-builtins, flake8-docstrings, and flake8-rst-docstrings because they are irrelevant for pyi files

Checklist

This pull request is:

[ ] A documentation / typographical error fix

Good to go, no issue or tests are needed

[x] A short code fix

please include the issue number, and create an issue if none exists, which
must include a complete example of the issue.  one line code fixes without an
issue and demonstration will not be accepted.
Please include: Fixes: #<issue number> in the commit message
please include tests.   one line code fixes without tests will not be accepted.

[ ] A new feature implementation

please include the issue number, and create an issue if none exists, which must
include a complete example of how the feature would look.
Please include: Fixes: #<issue number> in the commit message
please include tests.

Have a nice day!

fmt: off + # fmt: on was needed to keep black and zimports from fighting

Interesting. Sqlalchemy uses both and they are nice to each other. What's the issue?

# fmt: off + # fmt: on was needed to keep black and zimports from fighting

Interesting. Sqlalchemy uses both and they are nice to each other. What's the issue?

zimports doesn't really work for .pyi files because there are special meanings to a statement like:
from .foo import Foo as Foo
vs.
from .foo import Foo
zimports doesn't know about that.   I've removed zimports from the .pre-commit-config.yml for sqlalchemy2 so there should be no need to worry about zimports for now.

# fmt: off + # fmt: on was needed to keep black and zimports from fighting

Interesting. Sqlalchemy uses both and they are nice to each other. What's the issue?

The issue is that black wants to take long imports such as:
from .langhelpers import monkeypatch_proxied_specials as monkeypatch_proxied_specials

Into:
from .langhelpers import (
    monkeypatch_proxied_specials as monkeypatch_proxied_specials,
)

And zimports turns the black output back into:
from .langhelpers import monkeypatch_proxied_specials as monkeypatch_proxied_specials

The # fmt: off / # fmt: on switch tells black to leave the imports alone and let zimports handle it.

zimports doesn't really work for .pyi files because there are special meanings to a statement like:

It doesn't do too bad of a job, to be honest. IMO, it would be better to keep it on and match the import format of sqlalchemy.

# fmt: off + # fmt: on was needed to keep black and zimports from fighting

Interesting. Sqlalchemy uses both and they are nice to each other. What's the issue?

The issue is that black wants to take long imports such as:
from .langhelpers import monkeypatch_proxied_specials as monkeypatch_proxied_specials

Into:
from .langhelpers import (
    monkeypatch_proxied_specials as monkeypatch_proxied_specials,
)

And zimports turns the black output back into:
from .langhelpers import monkeypatch_proxied_specials as monkeypatch_proxied_specials

The # fmt: off / # fmt: on switch tells black to leave the imports alone and let zimports handle it.

zimports doesn't really work for .pyi files because there are special meanings to a statement like:

It doesn't do too bad of a job, to be honest. IMO, it would be better to keep it on and match the import format of sqlalchemy.

I was hitting the same problems as you and was not able to commit, which is why it's not in pre-commit right now.   I'm not sure how to commit w/o disabling checks if zimports is in pre-commit.    overall I dont have time to figure it out.

I was hitting the same problems as you and was not able to commit, which is why it's not in pre-commit right now. I'm not sure how to commit w/o disabling checks if zimports is in pre-commit. overall I dont have time to figure it out.

Sorry if I wasn't clear: using the # fmt: off / # fmt: on trick lets zimports alone handle the formatting so pre-commit works. In other words, I figured it out for you.

from .foo import Foo as Foo
vs.
from .foo import Foo

oh, what's the difference? Sorry but I'm still a noob on python stubs and mypy.

The issue is that black wants to take long imports such as: ...

the issue seems to be the line length then. @zzzeek thoughts on using 89 or 100 for the stubs?

oh, what's the difference? Sorry but I'm still a noob on python stubs and mypy.

Foo as Foo means that Foo is public and can be imported from other modules.  This is to distinguish between symbols you import for annotation purposes and symbols you genuinely want to export as part of your API.  mypy in strict mode will emit an error if you attempt to import a symbol which isn't declared as being public, either by adding a synonymous 'as' clause or by referencing the symbol in __all__.

Thanks! I guessed it was something like this but I wanted to be sure.
At first thought it's a strange convention, since it's the opposite of pythons (one usually use from .foo import Foo as _Foo to make things private). But I guess we will have to adapt :)

from .foo import Foo as Foo
vs.
from .foo import Foo

oh, what's the difference? Sorry but I'm still a noob on python stubs and mypy.

No need to apologize. Stub files only re-export a subset of the symbols that are in the scope of the file. The stub files section of PEP 484 does a pretty good job of explaining it, but the basics are:

All symbols that do not begin with _ are re-exported except imports.
Only imports that are imported with import X as X or from Y import X as X will be re-exported.

I was hitting the same problems as you and was not able to commit, which is why it's not in pre-commit right now. I'm not sure how to commit w/o disabling checks if zimports is in pre-commit. overall I dont have time to figure it out.

Sorry if I wasn't clear: using the # fmt: off / # fmt: on trick lets zimports alone handle the formatting so pre-commit works. In other words, I figured it out for you.

oh, OK using fmt on/off, sure.    That's fine.  thanks!    do folks here want to be part of the sqlalchemy2-stubs project for now and I can just grant commit access?   this is all new stuff that just needs to get done.

do folks here want to be part of the sqlalchemy2-stubs project for now and I can just grant commit access? this is all new stuff that just needs to get done.

@layday we also have a gitter chat at https://gitter.im/sqlalchemy/devel if you want to talks things

OK I read the PR now, it looks great.     There's no CI for the stubs right now except for when they are merged to master, so I will just go for it.

OK I read the PR now, it looks great. There's no CI for the stubs right now except for when they are merged to master, so I will just go for it.

if you have some commands to run to test the pr I can add one here on github. But at the moment I don't know what would need to run

yeah how can we "test" these anyway?    I've noticed that mypy just ignores stubs that have obvious mistakes like missing imports.  whats the right way to test things like that?

yeah how can we "test" these anyway?

Three ways:

Run mypy on the stub files themselves to ensure they are valid stub files (we'd need to do this for all supported versions, including 2.7)
We can use something like pytest-mypy-plugins to ensure that the stubs and plugin behave correctly (ex. a method returning a generic type returns the correct type)
Use stubtest to ensure all public methods/properties are covered by the stubs


iOS crash

Hi,
we have a problem with a crash on line 1109 in renderer_gl.cpp:
glCompressedTexImage2D(GL_TEXTURE_2D, 0, internalFmt, 16, 16, 0, size, data);
We can temporarily fix it by commenting this line but this is clearly not the correct fix.
It is possible to reproduce the crash also with the metaballs example on at least iPad Mini, iPad 3 and iPhone 4S.

I think you can comment out this line (as fix for now):
https://github.com/bkaradzic/bgfx/blob/master/src/renderer_gl.cpp#L1680

Yes, that works.

I get the same crash too, applied Branimir's fix too, but didn't solve it.
I get the crash on same line with ETC2 texture format.
Testing on iPhone5 (I don't think it doesn't even have ETC2 support)
Log:
...
TextureFormat::RGBA32U is not supported (502: GL_INVALID_OPERATION).
TextureFormat::R5G6B5 is not supported (500: GL_INVALID_ENUM).
TextureFormat::RGBA4 is not supported (500: GL_INVALID_ENUM).
TextureFormat::RGB5A1 is not supported (500: GL_INVALID_ENUM).
TextureFormat::RGB10A2 is not supported (500: GL_INVALID_ENUM).
TextureFormat::R11G11B10F is not supported (502: GL_INVALID_OPERATION).
TextureFormat::D24 is not supported (502: GL_INVALID_OPERATION).
TextureFormat::D16F is not supported (502: GL_INVALID_OPERATION).
TextureFormat::D24F is not supported (502: GL_INVALID_OPERATION).
TextureFormat::D32F is not supported (502: GL_INVALID_OPERATION).
TextureFormat::D0S8 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC1 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC1 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC2 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC2 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC3 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC3 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC4 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC5 is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC6H is not supported (500: GL_INVALID_ENUM).
TextureFormat::BC7 is not supported (500: GL_INVALID_ENUM).
TextureFormat::ETC1 is not supported (500: GL_INVALID_ENUM).
[Crash]

I have the same crash on iPhone 4S (iOS 9.3.5), but if I change the line:
https://github.com/bkaradzic/bgfx/blob/b0a122449c0167520f854e341ca7b2f7d1b8d96b/src/renderer_gl.cpp#L1163
to
GLsizei size = ((16*16*bimg::getBitsPerPixel(bimg::TextureFormat::Enum(_format) ) )/8) + 16;

Notice the + 16 at the end there? It works with anything larger than 0.
We're using it like this in our own fork and we'll see if there's any issue with this on other devices.

Is this just for minimum size? Can you try bx::uint32_max(size, 16); instead of +16?

I think the size is 128, because it's an ETC2 texture. But I will try it just in case.

latest version is still crashing for me (on iPod Touch 5G, iOS 9.3.5)
bgfx_crash.log

I see the same on all A5/A6 devices :(

This fixes it for me https://gist.github.com/jimon/34c83f24adb84cff7d0b47c7f065d71f but my game doesn't use compressed textures.


Fix double unary minus

If AstBuilder is processing UnaryMinus -> [Parenthesized]* -> UnaryMinus -> IntLiteral, the "inner" UnaryMinus helpfully defers inversion to the IntLiteral and returns it directly. The "outer" UnaryMinus, none the wiser, then does the exact same thing. There needs to be a way to force only the inner-most UnaryMinus to delegate to the literal node, which seems tricky in context.
This is my naive attempt at that, but this feels messy. More than happy to take suggestions on a better way to do this!
Resolves #650

@HT154 Here is a simpler fix:
  @Override
  public ExpressionNode visitUnaryMinusExpr(UnaryMinusExprContext ctx) {
    var childCtx = ctx.expr();
    var childExpr = visitExpr(childCtx);
    if (childCtx instanceof IntLiteralContext || childCtx instanceof FloatLiteralContext) {
      // negation already handled (see visitIntLiteral/visitFloatLiteral)
      return childExpr;
    }
    return UnaryMinusNodeGen.create(createSourceSection(ctx), childExpr);
  }

@translatenix Slick, thanks!


Dockerfile now mentions the correct property-builder.sh

One of the Dockerfile in the score collector incorrectly mentioned a nonexistent property-builder.sh.

no worries 😊


Backport 2.16: key_app_writer writes invalid private key DER file

Description
Backport of #2239 to mbedtls-2.16
Status
READY

This has two approving reviews and a passing CI, and is a valid backport, so ready for merge.


cleanup: move test utility methods in ScopedRdsIntegrationTest to base class HttpIntegrationTest

Signed-off-by: Xin Zhuang<EMAIL_ADDRESS>Description: cleanup tracked by #8050
Risk Level: LOW [refactor only]
Testing: no
Docs Changes: N/A
Release Notes: N/A
[Optional Fixes #Issue] #8050

/assign htuch
PTAL.


docs: flesh out mkdocs pages

#94  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


Compressing JS code

Hi @Ricardo-Ke @ggcong  I have been testing this tool https://gtmetrix.com/reports/www.omicsdi.org/hXGKpjOx and they suggest to compress some of our JS dependencies. This will decrease our render time by 76%. What do you think, do you have experience with that?
Regards
Yasset

It is necessary to do that due to our many and large js files and cdn is also required to accelerate


Communication Chat Readme issue

Section Link:

Suggestion:
Add Link [Create the chat client](#create-the-chat-client)
@jongio for notification

Thanks @Melanie-Ma. The issue has been addressed: https://github.com/Azure/azure-sdk-for-java/pull/20584


searchBy is not working for particular mentioned key

Let's consider my object is like below mentioned

{
'id' : 1001,
'name' : 'Manoj',
'description' : 'Cuppa Labs Multi-select drop-down'
}
Here we configure searchBy: ['name'] in settings, but if we type in search box is 1001 or Cuppa, search shows the same result. Means searchBy is not working for particular mentioned key , its work over all the keys present in object.

Works as expected. Follow the new example at https://cuppalabs.github.io/angular2-multiselect-dropdown/#/searchFilterByOneProperty


Don't render non-string value for app

Fixes #1721
I'm just filtering out non-string values for the app here.
What do you think of that as a solution?
Should we filter the name and version object values? I don't know if any other apps are using this format.

It's not a standard format, so we might ignore that as for now.

Might be better to use lodash indexOf, that way we aren't reassigning an object property
Just saw that you did this, but I made a PR for it but I closed it - https://github.com/busyorg/busy/pull/1734/files

@jm90m ok, I'm applying the changes from your closed pull request.
I'm not sure how to use lodash indexOf to check if an attribute is a string.
I see there is if(_.isString(myVar)).
Feel free to edit this PR directly, I will take a look at how you do it and try to remember for next time. Trying to use lodash more.


comments aren't saved in the database

Regression between 272 and 281 results in comments not being saved to the database.

Fixed in development


What is zhiyuan_objv2_train_cleaned.json file?

Hello! In the path catalog I see that you use a clean version of Objects365 for grounding pre-training here. I wonder how do you built it. There is no mention on the DATA.md as far as I'm concerned. Thanks for your answer!

Hi @valentingol,
Thank you for your interest in our work. The "zhiyuan_objv2_train_cleaned.json" file simply removes some invalid images from the official json file. Using the official json file is equally suitable, as long as it is in COCO format.

Thank you for your answer!


Passwords in URL is a security concern

Just an FYI that putting passwords into the URL is a really bad idea.  Pretty much every server creates log files that include the URL requests.  This means that the user's password are clearly visible in these log files.  You should never assume that these log files are secure.
https://github.com/n1kdo/lotw-gridmapper/blob/2b1500419e97b75c7b5bda9d8e226ed8340edb50/GridMapper.html#L904
The proper way to pass passwords are through a post request.

See http://www.arrl.org/adif -- this is how ARRL's interface works -- with a GET.  There used to be undocumented, unsupported support for POST, but that stopped working around a year ago.  That broke another app I wrote and I had to change that app to use GET.
The proxy that works around same origin policy issues with ARRL's service implements this "feature" with the same vulnerability. Bug-for-bug compatibility!
I agree that passing plaintext passwords in http get requests is not a best practice, the reality is that I have no control of the service side API, so I cannot make this app do POST until ARRL makes it work on the their end first.
FWIW, my server does not include any complete URLs in the log.
Thanks for looking at the code!


Uncaught SyntaxError: Unexpected end of input

Jenkins and plugins versions report

Environment
Jenkins v2.482
Lockable Resources 1322.v102a_16ce25ec

What Operating System are you using (both controller, and any agents involved in the problem)?
Windows 10 Pro 22H1 (19045.4894)
Reproduction steps

Go to Lockable Resources page when there is a queue.
Open the developer console

Expected Results
No Errors
Actual Results
Uncaught SyntaxError: Unexpected end of input
Anything else?
No response
Are you interested in contributing a fix?
The following event handler seems to be missing a closing brace & bracket:
  document.querySelectorAll(".lockable-resources-change-queue-order").forEach(function (button) {
    button.addEventListener("click", function (event) {
      changeQueueOrder(event.target.dataset.queueItemId);
    });
  }); <--- add this

Sorry about that. This was fixed in #724.


Deserialising a JSON that contains a field called description

This is more of a question than an issue but looking at the examples I don't see an obvious solution.
We have a JSON object response that contains a field called description.
By default we have the following in our code:
+(JSONKeyMapper*)keyMapper {
    return [JSONKeyMapper mapperFromUnderscoreCaseToCamelCase];
}

Is there a way to augment this so that we have have a field called ticketDescription which maps to description in our JSON while using a global key mapper?

Declare the ticketDescription as the property name in the .h model class file. Implement the following key mapper class method in the .m file of your model class. That's it.
+ (JSONKeyMapper*)keyMapper{
    return [[JSONKeyMapper alloc]initWithDictionary:@{
                                                      @"description":@"ticketDescription"
                                                     }];

}

I use this on a global level for all my models.
[JSONModel setGlobalKeyMapper:[[JSONKeyMapper alloc] initWithDictionary:@{@"description":@"_description"}]];

Thanks for clarification, I will try this out today, appreciate the comments, will let you know