proposal: io: add NewReaderAt

io.ReadSeeker can easily be adapted to io.ReaderAt besides some nuances surrounding EOF and short-read conditions. Once you have io.ReaderAt, you can do useful things with it like constructing io.SectionReader.
I propose adding such an adapter to the io package, for example:
// NewReaderAt returns a ReaderAt that uses the provided ReadSeeker as the
// underlying data source. If the n = len(p) bytes returned by ReadAt are at
// the end of the input source, the ReadAt returns EOF.
func NewReaderAt(s io.ReadSeeker) io.ReaderAt {
	return &seekReaderAt{
		data: s,
	}
}

type seekReaderAt struct {
	l    sync.Mutex
	data io.ReadSeeker
}

func (r *seekReaderAt) ReadAt(p []byte, off int64) (int, error) {
	r.l.Lock()
	defer r.l.Unlock()

	// get current offset

	// perform read
	//   distinguish EOF & short-read conditions

	// restore offset back
}

Update: restore offset after read

The docs for io.ReaderAt state

Clients of ReadAt can execute parallel ReadAt calls on the same input source.

I don't think that there's any way to preserve that property using an implementation that's calling Seek() behind the scenes. If a user wants to do that manually for something they know is safe, that's one thing, but I don't know if a general adapter that is essentially guaranteed to violate the contract of the thing it's adapting to is a good idea.

io.ReaderAt also states:

If ReadAt is reading from an input source with a seek offset, ReadAt should not affect nor be affected by the underlying seek offset.

That constraint is clearly violated.

I think that one's slightly less clear, actually, since the returned io.ReaderAt does not technically have a Seek() method. That constraint reads more to me like it's intended to deal with the case of a type that has both available publicly, such as os.File.

Clients of ReadAt can execute parallel ReadAt calls on the same input source.

Since we have the lock on it, and ReadAt takes the offset as an input, I think we're okay on this one?

If ReadAt is reading from an input source with a seek offset, ReadAt should not affect nor be affected by the underlying seek offset.

Would this requirement be met if the original offset is put back? It could error, but we can bubble the error up.

It appears that os.File.ReadAt calls pread. And looks like GNU pread perform a seek-read-reset maneuver.

It appears that os.File.ReadAt calls pread. And looks like GNU pread perform a seek-read-reset maneuver.

That is libc's pread, which is distinct from the pread syscall. See https://man7.org/linux/man-pages/man2/pread.2.html

Would this requirement be met if the original offset is put back? It could error, but we can bubble the error up.

Technically no. Even though your ReadAt implementation has a lock to prevent concurrent use, nothing stops another goroutine from calling Seek on the underlying io.ReadSeeker concurrently. This includes indirect calls, like what happens if you call Read on the underlying io.ReadSeeker.

nothing stops another goroutine from calling Seek on the underlying io.ReadSeeker concurrently

Well, I'm not too concerned about this case, because it would be the caller's responsibility to ensure the appropriate concurrency control. The similar sort of expectations exists in say io.MultiReader where the caller could be having multiple goroutines calling Read on io.Readers that were passed into the io.MultiReader and Read on the io.MultiReader concurrently.

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

If it is up to the caller to not call read or seek on the underlying ReadSeeker then the implementation probably doesn't need to reset the position either and call this out in the docs like it does for io.MultiReader
How many people would really need this implementation and is it worth it to have it upstreamed to go vs having people implement this as needed (eschewing concurrency and/or seeking concerns).

This does allow for concurrent ReadAt calls, although all the competing seek-read-seek calls do effectively get serialized due to the mutex lock. The godoc on the function will be making it explicit that the implementation does seek-read-seek and the users can decide whether that's acceptable or not for performance. This is an adapter type intended to enable using io.ReadSeeker types at APIs where an io.ReaderAt is the input. So I think it's fine, and expected, that it will be sub-optimal when compared to true io.ReaderAt implementations. We could do a type assertion to see if the input io.ReadSeeker already satisfies io.ReaderAt and return that if so - this will be convenient to users of this API who might be working different io.ReadSeeker implementations where a subset of those also happen to satisfy io.ReaderAt.

No change in consensus, so declined.
— rsc for the proposal review group


Respect Order of Color Domain

Is your feature request related to a problem? Please describe
In the below example you can see that the order of the color_range and color_domain categories are such that A is blue and B is red. However, colors from the color_range list are assigned to the values of the color column based on the order that they appear in the data object. So in our key the fields and in the "wrong" order and the categories don't have the colors we would expect.
    # Plot two numeric columns by each other and color based on a third, categorical column
    q.page['scatter'] = ui.plot_card(
        box='1 1 4 5',
        title='Scatter Plot from Dataframe',
        data=data(
            fields=["x_value", "y_value", "category"],
            rows=[
                [10, 100, 'B'],
                [100, 10, 'A'],
                [99, 67, 'B'],
            ],
            pack=True,
        ),
        plot=ui.plot(marks=[ui.mark(
            type='point',
            x='=x_value', x_title='My X Value',
            y='=y_value', y_title='My Y Value',
            color='=category', shape='circle', color_range="blue red", color_domain=["A", "B"]
        )])
    )

Describe the solution you'd like
The color_range and color_domain features to be considered a "mapping" with a respected order.
Describe alternatives you've considered
Require the user to order their data appropriately. If we go with this we should add more documentation around it, and explicitly add a plot example that uses color_domain

the categories don't have the colors we would expect.

In the plot above, A is blue, and B is red. The legend items are in the wrong order, which is odd, but the mapping is correct.

You are totally right, I confused myself with the comment in #1267 where I first noticed this - it's just that the key is in an unexpected order.


[Feature]: Change "Create a Dandiset" Archive and License selectors to radio button?

What would you like to see added to the NWB GUIDE?
Minor UI QoL suggestion. On the Create a Dandiset page:

Clicking the Archive text field opens a dropdown with options "Development Server" and "Main Archive". I then click to select one. Do we expect there to be additional options? Currently if I want to change the option, I have to click the text field and delete all the text to see the other option. If there are only two options, a radio button may be better. With a radio button, it would also be one fewer click to select one. The dropdown allows search and custom values but I think that is not necessary here and provides room for user error, e.g., if they type an invalid value.
Similarly for License. There are only two options and I have not heard from DANDI about possibly expanding that.
(I know DANDI wants to support distributed archives eventually, such as those that run on institutional servers, but I think that is a longer-term feature and would require more fields to specify than a dropdown option.)
Do you have any interest in helping implement the feature?
No.
Code of Conduct
Yes
Did you confirm this feature was not already reported?
Yes

Summarized and moved to https://github.com/NeurodataWithoutBorders/nwb-guide/issues/846
Re-open again whenever this starts active development


Add inlines to ForceFieldHelpers header functions

Added some inlines to header functions at ForceFieldHelpers. Without these including
<GraphMol/ForceFieldHelpers/MMFF/MMFF.h> to an external C++ project caused "already defined" linker issue at least in MSVC.

Thanks @JLVarjo !


investigate the OTEL breakage

We've had issues lately with otel upgrades. This issue is filed to track that we spent time investigating where the issue is and hopefully record the outcome.
Assigning to @blkt who already spent time doing that but -- @blkt please don't feel pressured to work on this unless you already planned on.

I managed to narrow down the issue to some extent and wrote a minimal script to reproduce.
https://github.com/blkt/panicrepro
I also opened an issue in the repo that I guess is responsible for the bug, although I'm not 100% sure.
https://github.com/signalfx/splunk-otel-go/issues/3430

This is confirmed as a regression on otel libraries.
https://github.com/open-telemetry/opentelemetry-go/pull/5828
We'll probably have to close all PRs from dependabot for those libraries until a new version is released, as it looks like there's no workaround to the problem.


Fully qualified url in the labels for SHA and url-repository.

Based on the ODC Pipelines meetings, It is decided that SHA should be a clickable link that takes the user to the original commit in the VCS. Right now the labels doesn't have the full qualified URL, so frontend do not have a way to determine if it is from github, gitlab, etc.
labels:
   pipelinesascode.tekton.dev/sha: 1f06540627c00f72a31bcd7182712d447eaee24f
   pipelinesascode.tekton.dev/url-org: karthikjeeyar
   pipelinesascode.tekton.dev/url-repository: demo-app

Request is to add url-repository and sha to have the fully qualified url or new labels that contain the full url.

what about if we have a "pipelinesascode.tekton.dev/vcs-type" that can do github/gitlab and let the UI/CLI do this ?
the only place to have url is annotations since we can't put it in labels due of limitations, but since we use annotations for configurations in PAC because we don't have a better place for it we end up starting to mix the configuration with the state in there in the annotations and may start to be confusing for users.

If we go with the vcs-type label :thinking:    If the user have hosted gitlab server and have configured a custom domain, then it would be difficult for the UI/CLI to figure out the proper URL.

I am adding the url directly, it's probably not going to scale to add every bit of information in pipelinerun as annotations so the logic would have to be in client.


2pc: alert on unresolved prepares.

If data loss causes a distributed transaction metadata to
be lost, prepared transactions can linger forever. Add an
alert for this condition.
This is the last of the code changes for 2PC. After this,
I'll update the design doc and make a user guide.

LGTM


Snake Basin Return Button-Change to "Current Returns and Forecasts" and "Historical Returns"

Splitting out into two buttons in header, each to be covered by either Jason/Jack-Current Returns and Forecasts, and Jay-Historical Returns.

New buttons added; "Current Returns and Forecasts" and "Historical Returns" with drop-down menus including additional options. No pages created for any of the drop downs or the two buttons but navbar is setup to for future pages to be created and linked.


How to get the actual region code for numbers from DO,JM,GD, ...

Is there a way to get the actual "region code" (iso 3166-1) for countries which share the same international prefix (country code in terms of libphonenumber)?
e.g.  Number of Punta Cana airport (dominican republic):
+1<PHONE_NUMBER>
I need to get "DO".
Is this possible with libphonenumber (java)?

PhoneNumberUtil.getInstance().getRegionCodeForNumber(phonenumber);

Almost perfect.
But it seems to have problems with NANPA toll free numbers outside US. e.g. Torontos airport number is  +1-866-207-1690 - but "US" is returned. If it's not possible to return the country of a NANPA toll free number, I'd expect an exception instead.

@patric-r
Thank you for taking the time to improve libphonenumber!
libphonenumber returns the correct region code for input “+1<PHONE_NUMBER>”.
See demo: https://libphonenumber.appspot.com/phonenumberparser?number=%2B1+809-959-2376
(we return as valid FIXED_LINE_OR_MOBILE number for region DO)
+1-866-207-1690, however, is a NANPA toll free number. See demo: https://libphonenumber.appspot.com/phonenumberparser?number=%2B1-866-207-1690
Since +1-866-207-1690 is non-geographical, we end up resorting to a country name, but we don't know which one to choose. We could decide to return "US or Canada or ..." but the list will be long. We regret to say that this is working as intended and cannot do a region specific implementation for this case.
Please check PhoneNumberOfflineGeocoder.java.
Also see #1198 for a similar issue filed recently for Finland.

@penmetsaa Thank you for your detailed answer.
There are use cases where "no region code could be determined" would be much better than a possibly wrong answer.
Maybe an overloaded method of getRegionCodeForNumber() would make sense which would return null (or an exception) in such cases. Or at least a check for PhoneNumber objects, something like PhoneNumber.isNonGeographical().
When looking at the source, this should be fairly easy to implement.

@patric-r
Thanks for providing all the details we need! This sounds like a good idea.
We will add new API for this. However, metadata updates are the priority for us to ensure the data is fresh. We will get to this as soon as we have some free time.


More Uber sensor fixes

Description:
Uber sensor now works with UberPool and has a bit cleaner logic. Also upgraded to latest version of the SDK and switched all single quotes to double quotes.
Checklist:
If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.io

If code communicates with devices, web services, or a:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Looks good! :dolphin:

Out of curiosity, what's the benefit of using double quoted strings vs single quoted strings? I'm no python dev, but aren't usually single quoted strings preferred?

@michaelarnauts Normally I would use single quotes but Python requires use of triple double quotes for comments and such. PEP-8 doesn't require use of one style over the other..


Checking version of from_raw_fd

In cases where a file descriptor is provided from a parent process or over a socket, we might get a non-directory fd. If you just use from_raw_fd on it, you'll only find out when you try to use the resulting Dir, which might make it harder to provide a nice fail-early error message. I recommend:

Add impl-specific documentation to the Dir implementation of from_raw_fd noting that the user should guarantee the fd is a directory first
Add a from_raw_fd_checked or similar that handles this check for the user (using fstat), returning an Option.

Sounds good. Do you want to make a PR?


Q: Seek advice on how to troubleshoot proxying issue

Hi, I running an oauth2_proxy application on heroku that points to my upstream app (which is just a dummy web app that returns hello world message if hit /hello endpoint).
So I hit https://trung-proxy-auth.herokuapp.com/hello (after I have signed into my Google on initial prompt) and got following output in the background:
2017-12-07T11:48:59.659576+00:00 app[web.1]: <IP_ADDRESS> -<EMAIL_ADDRESS>[07/Dec/2017:11:48:55 +0000] trung-proxy-auth.herokuapp.com GET trung-upstream.herokuapp.com "/hello" HTTP/1.1 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0) Gecko/20100101 Firefox/57.0" 400 0 3.942

The proxying did not work as the status returned is 400 as seen above. I also double-check the log output of my upstream app and I did not see any new hit. This proves that the request is not yet sent to my upstream.
I am wondering if core team could guide me on how to troubleshoot to see what's really going wrong with my configuration?
Much thanks in adv

I managed to get to the bottom of it. It is due to some misconfiguration.


Update Red Hat Logo - Stacked

Use the stacked version of the Red Hat logo.
Pre-submission checklist:
Please check each of these after submitting your pull request:

[ ] Are you only including a repo_url if your project is 100% open source? If so, pick the single best GitHub repository for your project, not a GitHub organization.
[x] Does it follow the guidelines for new entries?
[x] Have you added an SVG to hosted_logos and referenced it there?
[x] Does your logo clearly state the name of the project/product and follow logo guidelines?
[x] Have you verified that the Crunchbase data for your organization is correct (including headquarters and LinkedIn)?
[ ] ~5 minutes after opening the pull request, the CNCF-Bot will post a link for you to preview your changes. Have you confirmed that they are correct and then added a comment to the PR saying "LGTM"?

I put the hold label and converted this to draft. Once it is ready for review, just remove the draft and it will ping me.

LGTM
@markyjackson-taulia hold can be lifted - stacked logo looks good.


code of tensorflow

Thank you for your excellent work in few-shot learning! I am very interset in your work.But when I run your code of tensorflow, I got an error
absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'exp_string'
I check the main.py, I not find flags.DEFINE_string('exp_string' ......)
the error was caused by code ?
my tewnsorflow version is 1.9.0 and I not sure it caused by version?
Thank you very much!

Thanks for your interest in our work.
The variable exp_string is defined at https://github.com/yaoyao-liu/meta-transfer-learning/blob/adf6351bfb9c1953ca280ab7eaabb15317cf711d/tensorflow/main.py#L74. If you are using TensorFlow 1.3.0, it is able to create a variable like exp_string by directly assigning value to it instead of using the function flags.DEFINE_string. If you are using other versions of TensorFlow, you may need to change the code according to the official document.
If you have any other questions, feel free to add additional comments or create a new issue.

Thanks for your interest in our work.
The variable exp_string is defined at:
https://github.com/yaoyao-liu/meta-transfer-learning/blob/adf6351bfb9c1953ca280ab7eaabb15317cf711d/tensorflow/main.py#L74
and
https://github.com/yaoyao-liu/meta-transfer-learning/blob/adf6351bfb9c1953ca280ab7eaabb15317cf711d/tensorflow/main.py#L97
If you are using TensorFlow 1.3.0, it is able to create a variable like exp_string by directly assigning value to it instead of using the function flags.DEFINE_string. If you are using other versions of TensorFlow, you may need to change the code according to the official document.
If you have any other questions, feel free to add additional comments or create a new issue.

OK,Thank you very much for your reply! I have changed the code and run it succeed.

how do you change the code ,can you help me solve this problem? thank you


Can not convert Table Transformer to ONNX format

Hi,
I am trying to convert the model Table Transformer to ONNX format and meet this warning
"Warning: Shape inference does not support models with experimental operators: ATen
Warning: Unsupported operator ATen. No schema registered for this operator."
And when I infer the model by onnxruntime, it gives an error "onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from model.onnx failed:Fatal error: ATen is not a registered function/op"

Same here

@tofuai , @MarkusDressel Do you have any solution about this?


Allow force and torque in Wrench to be scaled separately

since force and torque are different quantities, the units of their scalings are different (meters per Newton and meters per Newton-meter, respectively), and so they should really have separate scalings. Practically, the torques in my Wrench are usually much smaller than the forces if I use the same scaling.
I am on Groovy, but it looks like this patch can apply to all releases up to present.

Thanks for the pull request, the changes look ok, but I'm going to release any more Groovy versions of rviz. Can you please open the pull request against the indigo-devel branch?

+1

I'm going to merge this into groovy-devel, but I will not be releasing a new version.

And we'll have to forward-port it to latest versions, right?
On Apr 2, 2015 6:21 PM, "William Woodall"<EMAIL_ADDRESS>wrote:

Merged #862 https://github.com/ros-visualization/rviz/pull/862.
—
Reply to this email directly or view it on GitHub
https://github.com/ros-visualization/rviz/pull/862#event-272160545.

Yeah, #870 is for indigo, I'll backport to hydro when I do the next release.

I also back ported @chapulina's commit fixing the indention up: d24eadc

Thank you so much!


configurable language picker

New Feature Summary
whisper supports auto-detection of spoken language, but also supports manual configuration at runtime (https://github.com/openai/whisper/blob/ba3f3cd54b0e5b8ce1ab3de13e32122d0d5f98ab/whisper/tokenizer.py#L10). From our anecdotal experience, the auto-detection accuracy is not quite satisfying, and AAPB users often know what the primary language used in a collection, we'd like to support the language picker as a runtime parameter in this wrapper as well.
Related
No response
Alternatives
No response
Additional context
No response

closing as a duplicate with #17 (that one is newer, but has a better description)


fix(wallet): fetch updated channels and balance after a new transaction

Make a call to fetch the updated balance and channels list whenever a new transaction is detected.
Fix #579

Pull Request Test Coverage Report for Build 3766

0 of 6 (0.0%)  changed or added relevant lines in 2 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.09%) to 12.599%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

app/lib/lnd/subscribe/channelgraph.js
0
2
0.0%

app/reducers/transaction.js
0
4
0.0%

Files with Coverage Reduction
New Missed Lines
%

app/reducers/transaction.js
2
0.0%

Totals

Change from base Build 3763:
-0.09%

Covered Lines:
479

Relevant Lines:
3333

💛  - Coveralls

Tested ACK b3044b2


fix(openapi.ts): filter out empty params before passing them to the request method

Partially addresses #1870
It's better to design APIs to only require parameters that are actually used, so this should not really create issues. Some API, as highlighted in my issue, will try to consume a provided query if it's empty, and will throw a 400 status code if the param is not an expected value

Thanks for this, makes sense. I think the linter is going to complain though - can you run yarn format and yarn lint?

Thanks for this, makes sense. I think the linter is going to complain though - can you run yarn format and yarn lint?

My mistake, I successfully ran both commands and got rid of whitespaces.

Hey @danny-avila thanks for flagging this - I added something for this in #1879 since there was another issue along with it.
It's still not picking up the sort parameter description super well, but you can check out this for an example of how you could hard-code it for now: https://github.com/hwchase17/langchainjs/pull/1879/files#diff-8afac4804a91b5b650b0785978047bd91a0b097a960b6f93e320adb34618f020R148

Well ideally the spec should just use something like this:
https://swagger.io/docs/specification/data-models/enums/

Well ideally the spec should just use something like this: https://swagger.io/docs/specification/data-models/enums/

I edited the spec and I tried this but unfortunately it still didn't work. Passing params to the chain is a nice workaround that will have to do for now


facebook authentication (external) not working

Ok I've been at this for several weeks now, I'm getting similar issues to some I've seen here.  The bottom line is I've followed the directions as outlined in the documentation, and authentication to facebook is NOT working as described.  Has ANYONE gotten it to work? If you have, can you detail EXACTLY what is needed gem wise, versions etc, and some example configuration as to how you got it to work? Clearly the current documentation is severely lacking.  For example one of the errors seems to be that a certificate file is needed, I got one, added it to my project, but where and how does one tell sorcery about it?  I've poured through the documentation and some of the source, but I'm still stumped.

which version of sorcery do you have? 0.7.5 or 0.7.6?

ok, so don't upgrade it to 0.7.6 if you use facebook extension ;-)

All I know from my own usage efforts V0.7.5 of sorcery does NOT play well with oauth2 V0.5.1, when I backed oauth2 down to V0.4.1 things are working great!  I do not have any experience with Sorcery V0.7.6 and can not comment weather it will play well with oauth2 V0.5.1 perhaps if any of you have tried it you can share your experiences here?

here is fix ... but only for face, it should be refactored becouse I should not modify protocols/oauth2.rb file.


Update mempool_test_helpers.go

Overview
When I follow the instructions here: https://rollkit.dev/tutorials/gm-world#macos-setup, I encountered the following error:
github.com/cosmos/cosmos-sdk/server imports
        github.com/rollkit/rollkit/node imports
        github.com/rollkit/rollkit/mempool/v1 imports
        github.com/cometbft/cometbft/abci/example/code: package github.com/cometbft/cometbft/abci/example/code provided by github.com/cometbft/cometbft at latest version v0.37.2 but not at required version v0.38.0-rc2

Then I finally found package github.com/cometbft/cometbft/abci/example/code has been removed. Use the code defined in the abci types instead.
Checklist

[ ] New and updated code has appropriate documentation
[ ] New and updated code has new and/or updated testing
[ ] Required CI checks are passing
[ ] Visual proof for any user facing features like CLI or documentation updates
[ ] Linked issues closed with keywords

Thank you for your contribution! We will update the gm tutorial with the new upcoming release, so you should have a go with that after that. Currently, the docs are under construction so we appreciate your patience while things get updated 🙏


Alt+click to follow link does nothing on Ubuntu

VSCode Version: Code 1.16.1 (27492b6bf3acb0775d82d2f87b25a93490673c6d, 2017-09-14T16:26:20.018Z)
OS Version: Linux x64 4.10.0-35-generic
Extensions:

Extension
Author (truncated)
Version

vscode-eslint
dba
1.3.2

prettier-vscode
esb
0.23.1

sublime-keybindings
ms-
2.9.1

color-highlight
nau
2.3.0

vscode-subword-navigation
ow
1.1.5

(1 theme extensions excluded)

Steps to Reproduce:

Put a URL into a document (new, empty document suffices)
Hover over it and hit Alt+Click as suggested by the tooltip to follow the link

Expected: URL is launched in the default browser in a new tab
Actual: Nothing happens (as in absolutely no feedback/reaction happens)
Note: I can open URLs from an external terminal by clicking it.

Reproduces without extensions: Yes
(Bot gets tripped up by the report template, eh? :p)

I have this same issue, did Alt-clicked worked before VS Code 1.16.1?

@ajitid Unfortunately, I cannot comment on that as I started using VSCode on the current version.

Try this dconf write /org/gnome/desktop/wm/preferences/mouse-button-modifier '"<Super>"'

@ajitid I don’t know the purpose of that command. What is it doing?

Found this on stackoverflow, Alt + Click is bound to drag window, so you map this Alt + click to Super + click with this command. https://askubuntu.com/questions/521423/how-can-i-disable-altclick-window-dragging

This would be merely a workaround. The overall issue still persists.
Also, VSCode is still able to use the Alt modifier for this purpose, without affecting or triggering Ubuntus window dragging.

I agree. Let's wait from someone from VS Code team to respond.

Alt+click moves windows on Linux as an OS level. To get multi-cursor with the mouse working, you can either:

Disable alt+click at the OS level, or
Add this setting: "editor.multiCursorModifier": "ctrlCmd", note that this will move the go to definition/follow link action to alt+click.

@Tyriar I see. This setting has an intentional side-effect of moving the shortcuts.
This issue is not really resolved right now, because the tooltip shown by VS Code suggests an interaction that is not available with the given shortcut.
So the intentional side-effect of mentioned setting has another side-effect: It renders a subset of users unable to perform the interaction instead of avoiding the conflict.

@kleinfreund which tooltip are you referring to?

@Tyriar see original question

@kleinfreund if you're talking about the tooltip saying press alt+click then we're probably not going to fix this. I don't even know where to begin detecting whether alt+click is bound to anything at the OS level, let alone detecting this across all the distributions in a reasonable way.

I understand.
The only reasonable way of working arounds this I can think of right now would be using Shift as the fallback instead of Alt.

@kleinfreund this is the real fix for this issue https://github.com/Microsoft/vscode/issues/3130, allowing real customization of mouse bindings

@kleinfreund I've also contributed a fix for the tooltip text here https://github.com/Microsoft/vscode/pull/36764
Just to confirm, does Ctrl + Alt + click work?


adding normalization for SAR scoring

Description
Adding optional normalization to SAR scoring output
This lets you normalize (using L1 norm) the outputs for each user, for example prior you might get the following scores for all items and a given user:

user
item_1
item_2
item_3

Bob
3
20
2

now you will get the following if normalized flag is set to True

user
item_1
item_2
item_3

Bob
0.12
0.8
0.08

Related Issues

Checklist:

[x] My code follows the code style of this project, as detailed in our contribution guidelines.
[x] I have added tests.
[x] I have updated the documentation accordingly.

@miguelgfierro we had a document on ways to do this, right?

We could also have an option to renormalize in a certain range e.g. [0, 5] instead of [0, 1].

I wonder, if this is the right kind of obtaining normalized scores from the outputs of SAR. This normalization depends on the number of items, which can change over time. But I think the rating of e.g. a movie should not depend on how many movies are in the database.

normalization range is a good idea, although it would be fairly easy for the user to multiply them once they are in a range of [0, 1] and would be one less additional parameter to add in for this edge case
the number of items will be fixed at train
at prediction this implementation of sar does let you use unseen items, but it maps them all to a single unseen column before prediction. so the item count shouldn't be a problem
other approaches for normalization can be quite expensive, so this is the justification for a just normalizing over all items for each user.

normalization range is a good idea, although it would be fairly easy for the user to multiply them once they are in a range of [0, 1] and would be one less additional parameter to add in for this edge case

Agree.

Capturing results of offline discussion here.
Prior work was laid out to enable SAR to produce ratings in the same range as the original ratings. This provides a more generally useful approach than L1 normalization across all items, as it independently scales each user-item score and provides a result that can be directly related to original rating values (which is useful for offline rating-based metrics like RMSE, MAE and others).
This is accomplished by computing the user-item SAR score as usual, then dividing by a normalizing factor. That factor can be calculated by first forming a unity-rating user-affinity vector (basically, computing the user-affinity vector assuming all user ratings were equal to 1). This includes applying the same time-decay as was done for the original affinity vector. Then the dot product between unity-rating user-affinity vector and the item similarity vectors can be taken to provide the normalizing constant.
Next steps here are to implement this scaling approach. The easiest path forward would be to maintain a new unity user-affinity matrix calculated during fit. This would increase memory usage of the algorithm, so perhaps there's a flag at algorithm construction that can enable/disable this.

@anargyri if you can take a look at the updated implementation, I think this should be done

Next steps here are to implement this scaling approach. The easiest path forward would be to maintain a new unity user-affinity matrix calculated during fit. This would increase memory usage of the algorithm, so perhaps there's a flag at algorithm construction that can enable/disable this.

What is the roadmap of this? if you are going to implement RegressionSAR, do you plan to have SAR with the normalization option and implement RegressionSAR as an independent algo?

Next steps here are to implement this scaling approach. The easiest path forward would be to maintain a new unity user-affinity matrix calculated during fit. This would increase memory usage of the algorithm, so perhaps there's a flag at algorithm construction that can enable/disable this.

What is the roadmap of this? if you are going to implement RegressionSAR, do you plan to have SAR with the normalization option and implement RegressionSAR as an independent algo?

good question, I hadn't really considered additional work in the regression direction beyond what is implemented here. I think it makes sense to keep that as an independent algorithm / implementation.

We could separate completely the rescaling and regression (i.e. score()) from fit(). In this way, if one does not want to compute RMSE etc., the overall time would be less. I don't think you need to compute unity_user_affinity inside fit() anyway. Also, someone may prefer getting ratings with a regression method rather than rescaling, so unity_user_affinity is unnecessary in this case.
The regression can be any method that fits the unnormalized scores to the ground truth. E.g. any regression method from sklearn. So, we don't really need to have a method for this, maybe showing how it is done is enough.

One thing to note is that rescaling does not preserve the ranking of the items for each user. I.e. the original SAR scores are 15, 6, 3, 8, the normalized scores could be 5, 4, 1, 3, so recommending top-2 items would differ depending on which scores you use.
So, for recommending top-k we should probably use the original scores, but for rating metrics we should use the normalized scores.
With regression you could have the same problem, but it is possible to constrain the function to be monotonic and in particular the linear function will be such.

Next steps here are to implement this scaling approach. The easiest path forward would be to maintain a new unity user-affinity matrix calculated during fit. This would increase memory usage of the algorithm, so perhaps there's a flag at algorithm construction that can enable/disable this.

What is the roadmap of this? if you are going to implement RegressionSAR, do you plan to have SAR with the normalization option and implement RegressionSAR as an independent algo?

good question, I hadn't really considered additional work in the regression direction beyond what is implemented here. I think it makes sense to keep that as an independent algorithm / implementation.

We could separate completely the rescaling and regression (i.e. score()) from fit(). In this way, if one does not want to compute RMSE etc., the overall time would be less. I don't think you need to compute unity_user_affinity inside fit() anyway. Also, someone may prefer getting ratings with a regression method rather than rescaling, so unity_user_affinity is unnecessary in this case.
The regression can be any method that fits the unnormalized scores to the ground truth. E.g. any regression method from sklearn. So, we don't really need to have a method for this, maybe showing how it is done is enough.

the issue is to properly capture the time decayed inputs the values must be captured during fit, or some other method that accesses the same information provided during fit.


Refactor AudioQnA

Description
Successive PR of https://github.com/opea-project/GenAIExamples/pull/1267 for cooperative CI test.

[x] Remove 3 asr/tts/llm wrapper services
[x] refactor links

Issues
https://github.com/opea-project/GenAIComps/pull/1083
Type of change
List the type of change like below. Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[x] Breaking change (fix or feature that would break existing design and interface)
[ ] Others (enhancement, documentation, validation, etc.)

Dependencies
na
Tests
ut

TBD: revert editing of AudioQnA Dockerfile link, manifest test, test print statement.

Hi @chensuyue @lvliang-intel , all CI passed. Please review and merge, thanks.

Code scan pass, functionality passed before, so this PR is ok for merge.


Bug Report: Remove tokens outside of text tange

Bug Report:
How to reproduce: Get any tokens returned with docstrings outside of text range
What should happen instead: Should keep the tokens in the places necessary but remove ones outside of view

OS: N/A
Git branch: All
Commit that bug started: N/A

(COPY PASTE SECTION): Moving from v0.8.0 milestone to v0.7.0 milestone to put time between releases and make release more substantial


Uncaught DivisionByZeroError in v2

What version of phpCacheAdmin are you using?
2.0.0
Cache system and version
Redis 7.0.15
Extension or client and version
PHP Redis extension v6.0.2
PHP Version
8.3.12
Operating System
Ubuntu 24.04
Describe the issue
I got a division by zero error on my fresh install
Fatal error: Uncaught DivisionByZeroError: Division by zero in /src/Dashboards/Redis/RedisTrait.php:45 Stack trace: #0 /src/Dashboards/Redis/RedisDashboard.php(123): RobiNN\Pca\Dashboards\Redis\RedisDashboard->panels() #1 /index.php(83): RobiNN\Pca\Dashboards\Redis\RedisDashboard->dashboard() #2 {main} thrown in /src/Dashboards/Redis/RedisTrait.php on line 45
So i changed line 45 to
$memory_usage = $max_memory > 0 ? round(($used_memory / $max_memory) * 100, 2) : 0;
so i can use it.

Fixed in https://github.com/RobiNN1/phpCacheAdmin/commit/9b63720128c244ec61865e611f09f27101ee9709
V2 is still w.i.p. so there are probably more errors like this.


When devtools is open page starts dragging

Version
6.0.8
Browser and OS info
Firefox Developer Edition 98.0b3 - MacOS Monterrey 12.1
Steps to reproduce
Open an app with Vue3 served in dev mode.
Open the devtools
Navigate to the Vue tab
What is expected?
Page of the app to behave normally
What is actually happening?
Page starts dragging when trying to scroll and
input text on text fields gets slow and eventually unresponsive for a few seconds.

I'm working on an app with Quasar Framework v2 and VueJS v3, not sure how relevant Quasar is in this issue, but I think it's worth mentioning.
Devtools v5 was not having this issue, but I can't recall which minor version I was using, sorry.

Please provide a runnable reproduction so I can investigate your issue. Thanks

I have the same issue. Everything on the page becomes incredibly slow the moment I switch to the Vue tab. I was on the latest v5, and as soon as I changed to v6 this started happening. Currently on v6.0.6.
I can't share my app, but it has nothing crazy: Vue2, Vuex.

i got the same Problem, have a Custom Dropdown component which renders a country list (about 200 entries).
Hovering the dropdown entries is getting crazy slow after switching to the Vue Devtools Tab.
also can't share my App, but my guess is that it has something todo with the event tracking? not sure, but feels like.
using Vue 3 with Pinia, but the Dropdown content is not in pinia so i guess it has nothing todo with it.

This is very weird. I never had this issue until I updated to v6+. But then I reverted to previous version I had V5.4.3 and the issue persists. I installed it using https://chrome.google.com/webstore/detail/vuejs-devtools/iaajmlceplecbljialhhkmedjlpdblhp.

I run into this once in awhile, but usually it's fine. Closing and reopening the entire web inspector usually helps.

I have this issue too, i use vue2.
when  i reverted to v5.4.3, it works fine. But v6.1.4, my page got very slow, and devtool's search components also working slow

Having this issue too, need to toggle inspector off and on again as @symmetriq  mentioned. Tried to turn off the updates tracking features as well with other features in vue devtools settings, but not helping a lot. As soon as switching to vue-dev tools, and if page with list of records were loaded, things will slow down a lot. Loading a table with 20 recods will need around 3 seconds.


Fix issues on services discrepancies on transaction serialization

There's discrepancy between services in how they return a rawtx.
This may also cause some assertions to fail.
Normalize the outputs, and support the new serialization format https://bitcoincore.org/en/segwit_wallet_dev/

Should be handled by 706b9b5d9d2b80b996d7075821d28c67e835a840, 3f3d209811905b9bcd65e9c38bd734a0b6a19684, and 265b9a813b2d0e7eacee99e112881f0f7455a0bb


How to show characters for all spaces

Hello,
This plugin is working perfectly with vim except one thing. I need to see some character (which I have set to · using let g:indentLine_leadingSpaceChar = '·') for all the spaces used in file, not just indentation spaces. Please guide how this can be done.
If this feature is out of scope of this plugin, then please let me know which other feature of vim / plugin I can use to enable this. Thanks in advance.

You can refer to here:
https://github.com/vim/vim/blob/6f72e90dd843a7342395b31f31c2073a3859869d/runtime/doc/options.txt#L4763-L4842
For example,
set list
set lcs=tab:>-,eol:$,space:.

Thanks.


Add test for Block UnmarshalJSON

Motivation
In familiarizing myself with the project, I noticed https://github.com/rosetta-dogecoin/rosetta-dogecoin/pull/50 and thought it might be nice to have some test cases around this behavior.
Solution
This adds the aforementioned test cases.
Open questions

Did I get the "Copyright" comment right here, given that this is a new file?

@michilumin Hi Michi - could you approve the CI actions from running then look at merging this PR? Thank you.

No problem - running now.


Fix vault reorder

Fix #229
Also Im fixing chain order and creating a relation between vault and chain order in another PR.

@yvebe
I also fixed the relationship between vault and chain order, so when a vault is deleted, the associated chain orders are deleted too.
Additionally, I tried to make the order table more generic so we can easily use it for other pages in the future, if needed (like token orders).


Fixes button states

The bid button now displays the correct button state, including the "highest bidder" state. Users are notified when they're outbid. The bid button's opacity is no longer affected by disabling it.

        2 Warnings

  </th>
 </tr>

:warning:
Needs testing on a Phone if change is non-trivial

:warning:
Detected some Swift building time outliers

Time | Class | Function |
| --- | ----- | ----- |245.2ms | AuctionViewController.swift | @objc dynamic func showRefineTappedAnimated(animated: Bool)
205.5ms | SwiftyJSON.swift | get {}
168.5ms | WebSocket.swift | private func processRawMessage(buffer: UnsafePointer, bufferLen: Int)
100.1ms | Observable.swift | private final func nextTokenHash() -> Int
71.0ms | LiveAuctionsAdminViewController.swift | @objc override func viewDidLoad()
64.1ms | AuctionLotMetadataStackScrollView.swift | required init(viewModel: LiveAuctionLotViewModelType, sideMargin: String)
61.7ms | RefinementOptionsViewController+Private.swift | func stackView() -> ORStackView

  Generated by :no_entry_sign: danger

Merging this, as it goes into #1602

Excited for this one!!
-devang
On Fri, Jun 3, 2016 at 2:58 PM -0700, "Orta"<EMAIL_ADDRESS>wrote:
Merged #1605.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Check Codacy vs Coveralls

AFAIK Codacy runs its own linter, and does not allow you to run your own.
It has Eslint 4.7.1 which seems to have issues with current Airbnb standard and thus Codacy finds irrelevant issues in coding style.
Do you have any expirience with this @jirutka?
I will try disabling linting, but it will probably kill even the complexity watcher and It will remain just as a coverage watcher, leaving it probably no better than Coveralls.

https://support.codacy.com/hc/en-us/requests/1735

codacy-eslint PR update hass been merged, but shan't be used in production. Outdated linter will stick there till a custom version changer will be implemented, which should be somewhere in summer as I have been told. Till then useless for the project.


Create v1.0.0 release for top-level SWODLR repo

Roll up all components to top-level swodlr repo as official release as v1.0.0

@cqbanh  to work with @frankinspace to automate the process

https://github.com/podaac/swodlr/releases


Ship with binary libs in our wheels

FYI setup.py has already been configured to include any binaries in the wgpu.resources folder, we just don't include them yet.
The idea is to have our friends build wgpu-native binaries upstream (see https://github.com/gfx-rs/wgpu/issues/414) and to provide a simple download script in this repo that can be used in development and on CI to acquire the binaries.

https://github.com/gfx-rs/wgpu/pull/416 was merged. Until they perform a release, we can use a snapshot build I released on my fork: https://github.com/Korijn/wgpu/releases/tag/v0.5dev


SFML segfaults

Describe the bug
I am running Arch Linux, with KDE Plasma 5.27.8 & Xorg 21.1.8.
Nix 2.18.1, on channel nixos-23.05. (Though the issue persists on any version of nixpkgs, as far as I am aware).
When I try to run any application that uses SFML, it segfaults. (Including the ones I build myself)
Steps To Reproduce
Take, for example, extremetuxracer.
$ nix-shell -p extremetuxracer

[nix-shell:~]$ etr
Segmentation fault (core dumped)

[nix-shell:~]$ echo $?
139

[nix-shell:~]$ which etr
/nix/store/ihn08cikk8zg9rfpxkcxfz13y60iw0df-extremetuxracer-0.8.2/bin/etr

Additional context
Maybe it's an upstream SFML bug, but when I use SFML from Arch repos, things work just fine.
So not sure who to blame: nix, xorg, sfml, arch, or KDE.
Notify maintainers
@astsmtl
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.8-arch1-1, Arch Linux, noversion, rolling`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/home/sandarukasa/.nix-defexpr/channels/nixpkgs`

It works fine for me on NixOS unstable.
Have you tried adding --pure flag to nix-shell?
Also since you're on Arch , did you run it with NixGL?

It works fine for me on NixOS unstable.

Yeah, I tested NixOS-23.05 in a VM, the same version works fine there.

Have you tried adding --pure flag to nix-shell?

Refuses to work without $XAUTHORITY set. With it set, segfaults again.

Example
$ nix-shell -p extremetuxracer --pure

[nix-shell:~]$ etr
Authorization required, but no authorization protocol specified
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted (core dumped)

[nix-shell:~]$ echo $DISPLAY
:0

[nix-shell:~]$ XAUTHORITY=/tmp/xauth_rBccpX etr
Segmentation fault (core dumped)

[nix-shell:~]$ XAUTHORITY=/tmp/xauth-1000-_0 etr
Segmentation fault (core dumped)

[nix-shell:~]$ XAUTHORITY=/tmp/this-path-does-not-exist etr
Authorization required, but no authorization protocol specified
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted (core dumped)

Also since you're on Arch , did you run it with NixGL?

Works for me! Thank you a lot.


BQ Data Transfer Auth causes failure in schedule.py

Running the python3 schedule.py --query_file=changes.sql --table=changes --access_token=${token} part of setup.sh initially fails with the following exception.
Traceback (most recent call last):
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/grpc/_channel.py", line 923, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/grpc/_channel.py", line 826, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "Failed to find a valid credential. The request to create a transfer config is supposed to contain an authorization code."
	debug_error_string = "{"created":"@1607609612.827897000","description":"Error received from peer ipv4:<IP_ADDRESS>:443","file":"src/core/lib/surface/call.cc","file_line":1063,"grpc_message":"Failed to find a valid credential. The request to create a transfer config is supposed to contain an authorization code.","grpc_status":3}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "schedule.py", line 105, in <module>
    app.run(create_or_update_scheduled_query)
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "schedule.py", line 100, in create_or_update_scheduled_query
    response = client.create_transfer_config(parent, transfer_config)
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.py", line 811, in create_transfer_config
    return self._inner_api_calls["create_transfer_config"](
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/google/api_core/gapic_v1/method.py", line 145, in __call__
    return wrapped_func(*args, **kwargs)
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/google/api_core/retry.py", line 281, in retry_wrapped_func
    return retry_target(
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/google/api_core/retry.py", line 184, in retry_target
    return target()
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/Users/segan3/Library/Python/3.8/lib/python/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 Failed to find a valid credential. The request to create a transfer config is supposed to contain an authorization code.

This was from running it with an auth token from my personal account, which had the Owner role in the project.
There are probably better solutions, but I managed to get around it by first creating a similar scheduled query manually to there get option to grant access to the needed scope.

Interesting.  I'm going to try to recreate the bug.  Did you use the "create new project" option or did you use a pre-existing project?

I ran it a couple times, one using a pre-existing project and one with a new project.  So far unable to recreate.  What system are you using?  And to confirm, this does work when you run it manually?
token=$(gcloud auth print-access-token)
python3 schedule.py --query_file=changes.sql --table=changes --access_token=${token}

I used a pre-existing project, but I believe the issue was that is was a new account, that had never used data transfers before.
Once I had created my first scheduled query manually and approved the "BigQuery Data Transfer Service" to do things on my behalf, the script worked as indented.

There was no difference in running the full setup.sh script and running the schedule creation in isolation.

Thank you for that! I don't think there is a way to enable this automatically, but I'm going to look into forcing the prompt to pop-up before running the rest of the setup script.

I'm experiencing this problem consistently (even after manually creating a transfer and doing the OAuth dance as part of that process).
One thing that I just thought of which might be relevant: my dev environment is a remote SSH connection (in VSCode) to a cloud instance. I wonder if there's something happening where the BigQuery auth prompt is trying to launch, but because the process is actually running remotely, it's not triggering my computer to launch a browser.(???)

I'm experiencing this problem consistently (even after manually creating a transfer and doing the OAuth dance as part of that process).
One thing that I just thought of which might be relevant: my dev environment is a remote SSH connection (in VSCode) to a cloud instance. I wonder if there's something happening where the BigQuery auth prompt is trying to launch, but because the process is actually running remotely, it's not triggering my computer to launch a browser.(???)

Interesting.  Can you try this from Cloud Shell?

Interesting.  Can you try this from Cloud Shell?

So, it seems we're not the only ones having trouble with BigQuery+Python+Auth.
Anyway, Cloud Shell didn't fix it for me but I was able to push through it: I found a workaround, using bq instead of the Python SDK. Here's my replacement for the  schedule_bq_queries() method in setup.sh:
schedule_bq_queries(){
  echo "Check BigQueryDataTransfer is enabled"
  enabled=$(gcloud services list --enabled --filter name:bigquerydatatransfer.googleapis.com)

  while [[ "${enabled}" != *"bigquerydatatransfer.googleapis.com"* ]]
  do gcloud services enable bigquerydatatransfer.googleapis.com
  # Keep checking if it's enabled
  enabled=$(gcloud services list --enabled --filter name:bigquerydatatransfer.googleapis.com)
  done

  cd ${DIR}/../queries/
  pip3 install -r requirements.txt -q --user

  echo "Delete existing scheduled queries for derived tables..."; set -x
  # NOTE: this will delete ALL scheduled queries in `$FOURKEYS_PROJECT`
   for config in $(bq ls --project_id=$FOURKEYS_PROJECT --transfer_config --transfer_location=US --format=prettyjson | jq -r '.[].name')
   do
    bq rm --transfer_config -f $config
   done

  echo "Creating BigQuery scheduled queries for derived tables.."; set -x

  bq query --use_legacy_sql=false --destination_table=$FOURKEYS_PROJECT:four_keys.changes --display_name=changes \
    --schedule="every 24 hours" --replace=true "`cat changes.sql`"
  bq query --use_legacy_sql=false --destination_table=$FOURKEYS_PROJECT:four_keys.deployments --display_name=deployments \
    --schedule="every 24 hours" --replace=true "`cat deployments.sql`"
  bq query --use_legacy_sql=false --destination_table=$FOURKEYS_PROJECT:four_keys.incidents --display_name=incidents \
    --schedule="every 24 hours" --replace=true "`cat incidents.sql`"

  set +x; echo
  cd ${DIR}

...there are two things I'd like to work through before opening a PR: 1) it requires jq and I bet with some fancy text mangling, we can get rid of that. 2) it destroys and recreates all scheduled queries; that could also be fixed with fancy text mangling.

So, it seems we're not the only ones having trouble with BigQuery+Python+Auth.
Anyway, Cloud Shell didn't fix it for me but I was able to push through it: I found a workaround, using bq instead of the Python SDK. Here's my replacement for the  schedule_bq_queries() method in setup.sh:
schedule_bq_queries(){
  echo "Check BigQueryDataTransfer is enabled"
  enabled=$(gcloud services list --enabled --filter name:bigquerydatatransfer.googleapis.com)

  while [[ "${enabled}" != *"bigquerydatatransfer.googleapis.com"* ]]
  do gcloud services enable bigquerydatatransfer.googleapis.com
  # Keep checking if it's enabled
  enabled=$(gcloud services list --enabled --filter name:bigquerydatatransfer.googleapis.com)
  done

  cd ${DIR}/../queries/
  pip3 install -r requirements.txt -q --user

  echo "Delete existing scheduled queries for derived tables..."; set -x
  # NOTE: this will delete ALL scheduled queries in `$FOURKEYS_PROJECT`
   for config in $(bq ls --project_id=$FOURKEYS_PROJECT --transfer_config --transfer_location=US --format=prettyjson | jq -r '.[].name')
   do
    bq rm --transfer_config -f $config
   done

  echo "Creating BigQuery scheduled queries for derived tables.."; set -x

  bq query --use_legacy_sql=false --destination_table=$FOURKEYS_PROJECT:four_keys.changes --display_name=changes \
    --schedule="every 24 hours" --replace=true "`cat changes.sql`"
  bq query --use_legacy_sql=false --destination_table=$FOURKEYS_PROJECT:four_keys.deployments --display_name=deployments \
    --schedule="every 24 hours" --replace=true "`cat deployments.sql`"
  bq query --use_legacy_sql=false --destination_table=$FOURKEYS_PROJECT:four_keys.incidents --display_name=incidents \
    --schedule="every 24 hours" --replace=true "`cat incidents.sql`"

  set +x; echo
  cd ${DIR}

...there are two things I'd like to work through before opening a PR: 1) it requires jq and I bet with some fancy text mangling, we can get rid of that. 2) it destroys and recreates all scheduled queries; that could also be fixed with fancy text mangling.

The difference between the bq command is that it defaults to user credentials, whereas the Python client libraries default to service account credentials. You can use user credentials with the Python client libraries by passing in a credentials object. Follow the tutorial at : https://cloud.google.com/bigquery/docs/authentication/end-user-installed for instructions on creating such an object.

The difference between the bq command is that it defaults to user credentials, whereas the Python client libraries default to service account credentials. You can use user credentials with the Python client libraries by passing in a credentials object. Follow the tutorial at : https://cloud.google.com/bigquery/docs/authentication/end-user-installed for instructions on creating such an object.

Hi Tim,
I believe we're doing that here:
https://github.com/GoogleCloudPlatform/fourkeys/blob/main/queries/schedule.py#L39
This works for me and many other users.  But I believe the key difference is that when I first ran the script, I had to go to my browser and allow the BQ service to use my account.  This is also what the user reports above.  However, Dave isn't getting that prompt or pop-up and thus is having trouble authenticating with his access-token.

Hi Tim,
I believe we're doing that here:
https://github.com/GoogleCloudPlatform/fourkeys/blob/main/queries/schedule.py#L39
This works for me and many other users.  But I believe the key difference is that when I first ran the script, I had to go to my browser and allow the BQ service to use my account.  This is also what the user reports above.  However, Dave isn't getting that prompt or pop-up and thus is having trouble authenticating with his access-token.

This should be solved via the switch to a bash script.  Closing for now.


fix(metrics): longhorn_volume_robustness not collected for detached volume

Which issue(s) this PR fixes:

Issue longhorn/longhorn#8139
What this PR does / why we need it:
Do not return early for non-engine-related metric collections.
Special notes for your reviewer:
Additional documentation or context

test result: https://ci.longhorn.io/job/private/job/longhorn-tests-regression/6619/

@mergify backport v1.6.x


Real time chart

If it possible create real time chart with spark streaming?
Like this:
object ChartSingleton {
  private var instance:highcharts = _

  def getInstance(df:DataFrame):highcharts = {
    if (instance == null) {
      instance = highcharts(df
        .seriesCol("Kind")
        .series("x" -> "Time", "y" -> "Count")
        .orderBy(col("Time")))
    } else {
      instance.update(df)
    }
    instance
  }
}

...

// some spark streaming code

lines.foreachRDD { rdd =>
  val df = rdd.map(x=>(x._1._1, x._1._2, x._2)).toDF("Time", "Kind", "Count")
  val chart = ChartSingleton.getInstance(df)
  chart.plot()
}

...

the chart object does not hold real content. It just used to convert to Javascript. So it is not necessary to keep it.
It should work, each time plot a new chart. While it will have a flash.
The plot function is designed to be used in Zeppelin. The html method is designed to open directly in a browser or create a HTML page.

After some study, I think Spark Structured Streaming is well suited.
The final interface shall be almost the same with normal DataFrame. It might be finished in a week or two.
For the following structure streaming example.
import spark.implicits._

// start netcat with
// nc -l -p 9999 <IP_ADDRESS>
// then type in sentence and hit enter
// there should be something print out on spark-shell

val lines = (spark.readStream
  .format("socket")
  .option("host", "localhost")
  .option("port", 9999)
  .load())

// Split the lines into words
val words = lines.as[String].flatMap(_.split(" "))

// Generate running word count
val wordCounts = words.groupBy("value").count()

Create a bar chart, will be update automatically
val chart = highcharts(wordCounts
  .series("x" -> name, "y" -> $"count"))
  .orderBy($"count".desc")
  .take(20)).chart(Chart.bar)
chart.plot()

Implemented in code, will wrap up with documents.
http://stackoverflow.com/questions/40490087/how-to-plot-a-real-time-graph-in-zeppelin/


Timeline design iteration: row headings and density

Closing in favor of more specific tickets in aerie-ui.


All generated signs now have weird hours: 10am-9:45am

https://munisign.org/14021

Seems to be fixed