Text rendering is sometimes cut off a single pixel to the left.

Prerequisites

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

Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description
Text is offset a single pixel to the left in some panes after splitting. Resizing the pane a couple of times sometimes fixes this. It happens in both the editor as well as the gutter. I use a converted pixel font (Terminus TTF), so the cut-off pixel is clearly visible.
Steps to Reproduce

Set editor font to Terminus TTF.
Type some text in the editor.
Split the pane a couple of times.

Expected behavior: No text offset

Actual behavior: Text is offset a single pixel to the left.

Reproduces how often: +/- 50%
Versions
$ cat /proc/version
Linux version 4.9.51-1-MANJARO (builduser@manjaro) (gcc version 7.2.0 (GCC) ) #1 SMP PREEMPT Wed Sep 20 10:37:40 UTC 2017
$ atom --version
Atom    : 1.20.0
Electron: 1.6.11
Chrome  : 56.0.2924.87
Node    : 7.4.0
$ apm --version
apm  1.18.5
npm  5.3.0
node 8.5.0 x64
python 2.7.13
git 2.14.1

Additional Information
Terminus TTF is available as a package in all major Linux repositories. It can also be downloaded here.

I'd like to say I can add that this happens on Mac, too, but I have yet to actually reproduce it after it happened that one time.  It was visual apparent even without a pixel font.

Thanks @joedski - I'll remove the linux label for now but if you end up with steps to reproduce let us know.  Just to confirm, do you remember what version of Atom you were running when it happened?

It was on either 1.21.0 (current stable) or the version before that.  I remember it occurring pretty recently.
At present, atom --version gives this:
Atom    : 1.21.0
Electron: 1.6.9
Chrome  : 56.0.2924.87
Node    : 7.4.0

Will try to find steps to repro if I can!

A few additions that might help reproducing:

Only occurs on splitting panes horizontally
Only occurs after third or fourth split
Currently hacked a fix by adding .lines { padding-left: 2px } to my styles.less
Problem persists on switching tabs or splitting vertically

Finally had a chance to try this on my Ubuntu VM and on macOS (I used the Fonts package to use the Terminus font in both cases).  This is how I tried to repro @p0lm, can you let me know if this matches your steps?

If not can you share a GIF/screencast of your repro?

Doh. I meant split vertically. So the new pane is to the right. Sorry.

I finally got around to screencasting this:


Publish 0.6.6 onto NPM

The latest tag (0.6.6) isn't on NPM which includes the IE8 fix. Could someone publish it there?

I've done it, apologies for the delay.


Sound Slider Enhancement

Cause slider to emit sound at indicated volume to reduce back and forth between menus.

Added feature.


I can't migrate to androidX

@NetComTech Please describe what's wrong?

Hello @NetComTech !
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the issue, if you have any more information for us; we will reopen it right away!
Thank you for your contribution.
P.S. If anyone still experience the same problem, please file a new issue with the information required in the template.
All system setups can be slightly different so it’s always better to open new issues and reference related issues.


[NetAppFiles] update to 2024-03-01

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.ResourceManager.NetApp


[multistage] Support array type for select query

Fix the schema conversion to support Array types for sql select.

Codecov Report

Merging #10434 (60ba5aa) into master (0362ad3) will increase coverage by 33.17%.
The diff coverage is 6.45%.

@@              Coverage Diff              @@
##             master   #10434       +/-   ##
=============================================
+ Coverage     35.14%   68.32%   +33.17%
- Complexity      282     6096     +5814
=============================================
  Files          2053     2053
  Lines        111402   111418       +16
  Branches      16940    16960       +20
=============================================
+ Hits          39157    76124    +36967
+ Misses        68835    29841    -38994
- Partials       3410     5453     +2043

Flag
Coverage Δ

integration1
24.35% <0.00%> (-0.12%)
:arrow_down:

integration2
?

unittests1
67.96% <6.45%> (?)

unittests2
13.84% <0.00%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

.../java/org/apache/pinot/query/type/TypeFactory.java
25.92% <0.00%> (+25.92%)
:arrow_up:

...not/query/planner/logical/RelToStageConverter.java
75.00% <15.38%> (+75.00%)
:arrow_up:

... and 1260 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

the change looks good.
can we add some tests on both planner and runtime?

Added tests


fix typo in the to-bytes convertion

Minor typo issue regarding the bytes function, see https://github.com/typst/typst/issues/2066
The last word should be "bytes", the master branch says "converted to a string" which should be a typo.
(I was looking into typst and decide to start with this minor issue as labelled by good first issue, please let me know if my PR follows the norm of contribution to typst/typst)

Thanks!


Make use of httpx.AsyncClient.build_request

Solves the problem described in #25
Tests are failing on this branch as well as on master (Python 3.8, macOS 11.2)

Hi @dmontagu ! Could you review this PR please?

@ivasio, I see lots of unrelated formatting changes.
Please, follow the guidelines in https://github.com/dmontagu/fastapi_client#contributing
After that I'd suggest to add dmontagu to reviewers for better visibility.

Hi guys, I also need this feature to add headers for authentiction.
Is this repostiroy maintained now ?


Placeholder text is visible when fade_on_empty = true

I don't think it makes sense to show the placeholder for a split second when the input is fading out
Can be overcome by setting placeholder_text = "" in the config.
I think this can be fixed by defaulting fade_on_empty = false or placeholder_text = "" , or just don't show placeholder text when fade_on_empty is true

@vaxerski wdyt?
If fade_on_empty = true, should we disable placeholder_text and maybe also fail_text?

no, we should just make it fade properly no?

The input box fades properly, imho the point is that with the default configuration happens this:

I don't think it makes sense to show the placeholder for a split second when the input is fading out

Imho we could just change the default value of placeholder_text to an empty string to keep it unrelated from fade_on_empty.
Otherwise we could disable placeholder_text (and eventually the fail_text) when fade_on_empty is enabled.
Let me know if you agree with either one I will do a MR.

Just to be on the same page, this is how the fade currently looks with default fade_timeout. It was adjusted in https://github.com/hyprwm/hyprlock/commit/6fa65e1172d633e61ed957a49e7cf96010432623. So if you are on a tagged release, it does not look the same.
https://github.com/hyprwm/hyprlock/assets/78690852/edb5d767-2873-4b7a-9d3a-3d8dd19ff044

I don't think it makes sense to show the placeholder for a split second when the input is fading out

Since the commit I mentioned it shows for a second and I think it looks pretty ok.
I don't really know why you would want to set the default placeholder_text to an empty string. That looks worse for my taste.
I would get the argument that when you enter a wrong password, you might want to fade out, without having the placeholder show up before that. That currently works pretty well with fade_timeout=800 (That is since the failure display lasts 1 second, which is not configurable yet. So if fade_timeout is below that, it fades out before the placeholder text renders again). Look like that.
https://github.com/hyprwm/hyprlock/assets/78690852/31684404-177c-41a1-8deb-12160381c770

I don't really know why you would want to set the default placeholder_text to an empty string. That looks worse for my taste.

Not for my taste (and also @ZackMitkin which opened this issue). But well since there are different opinions let's keep the current behavior.
About the fail_text, imho it's hidden too early, I would increase the default timeout to 2 sec (equals the default fade_timeout) and make it configurable. I can try to make a MR for that if you agree.

About the fail_text, imho it's hidden too early, I would increase the default timeout to 2 sec (equals the default fade_timeout) and make it configurable. I can try to make a MR for that if you agree.

Ok I think I agree with you on that it could timeout a bit later. But having them equal does not work well, since the placeholder might render for a few frames before the timeout. I guess I would decrease the default fade_timeout a bit in that case, so that it is below the 2 secs.
I think it would be good to also make the timeout for the fail text configurable. Btw. the value is here.

I've added an option to make it configurable (ref. https://github.com/hyprwm/hyprlock/pull/406).

But having them equal does not work well, since the placeholder might render for a few frames before the timeout. I guess I would decrease the default fade_timeout a bit in that case, so that it is below the 2 secs.

You're right, it seems that if fail_timeout is greater than fade_timeout the input disappears when fail_timeout is over but without fade effect.

if fail_timeout is greater than fade_timeout the input disappears when fail_timeout is over without fade effect.

Hmm I cannot reproduce that. When fail_timeout is bigger that fade_timeout it still fades on my end. Also see recording above

Correct, likely there was something dirty in my local build. I think we can close this.

@ZackMitkin @vaxerski can you close this?


Cast Icon not Showing

Checklist:

[x ] I have checked that there are no issues with similar or the same content
YOU SHOULD CHECK CLOSED ISSUES ASWELL

[x ] I have checked the FAQ (https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/wiki/FAQ) and the answer I am looking for is not there

[ x] I have double checked and can reproduce the issue

OS: Windows 10 64 Bit
GPMDP Version:
Issue Descriptions: 4.6.0
I cannot get the cast icon to consistently display. 9/10 times the cast icon will not be there so I cannot use my Google Home speakers to play music. I've tried installing/uninstalling, resetting Google Home speakers, resetting the modem/router.

Steps to Reproduce:

On windows you need to install Bonjour Print Services for casting to work (sounds weird but roll with it)


feat: Debug console view

Details

Implementing the Debug console view, which displays logs from Logger in real time, with a possibility of saving it to the .txt file or sharing it as an attachment in a report.
Fixed Issues

$ https://github.com/Expensify/App/issues/34082
PROPOSAL:
Tests

Go to Profile -> About -> Troubleshoot
Verify "Client side logging" is disabled
Enable "Client side logging"
Verify "View debug console" option appears
Press "View debug console"
Verify Debug console screen is open and logs are displayed in a console in real-time
Type 5+5 in the input below the console and press "Execute"
Verify 10 was displayed in a console
Press "Save log"
Verify file is downloaded to a device
Press "Share log"
Verify you are navigated to the search page
Press on any report
Verify you are moved to the report and logs are sent as an attachment

[x] Verify that no errors appear in the JS console

Offline tests

n/a
QA Steps

Go to Profile -> About -> Troubleshoot
Verify "Client side logging" is disabled
Enable "Client side logging"
Verify "View debug console" option appears
Press "View debug console"
Verify Debug console screen is open and logs are displayed in a console in real-time
Type 5+5 in the input below the console and press "Execute"
Verify 10 was displayed in a console
Press "Save log"
Verify file is downloaded to a device
Press "Share log"
Verify you are navigated to the search page
Press on any report
Verify you are moved to the report and logs are sent as an attachment

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/13985840/1ab435a0-729c-4e53-bb84-38cceb1706c9

Android: mWeb Chrome

https://github.com/Expensify/App/assets/13985840/703534a3-1965-45c0-8a1d-2e664f39a96b

iOS: Native

https://github.com/Expensify/App/assets/13985840/6293c395-5e20-45d9-8862-3855f30941d3

iOS: mWeb Safari
https://github.com/Expensify/App/assets/13985840/d5c7a52c-d67a-4e2e-a3e6-d0154e7712db

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/13985840/77798618-acbe-4633-9216-5e6c68375fcd

MacOS: Desktop

https://github.com/Expensify/App/assets/13985840/36c45958-d9b9-43ba-b15e-6af74c075362

@TMisiukiewicz Just a little question about this behavior: Why the View debug console option appears only if we enable client side debugging? I think it will be helpful if we can still use the debug console without the client side debugging?

Yeah, I agree. We can make the debug console accessible to users even if when they haven't turned on client side debugging.

None of the above comments are concerning,, so I am going ahead with the merge.
We have one discussion about having the debug console feature independently available https://expensify.slack.com/archives/C01GTK53T8Q/p1707932836441509?thread_ts=1703982689.203629&cid=C01GTK53T8Q, which we can tackle after a consensus.

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/techievivek in version: 1.4.42-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.4.42-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


#7664 jumping issue fix

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[ ] Bugfix
[ ] Feature
[x] Refactoring

Needs QA check

@kodadot/qa-guild please review

Context

[x] Closes #7664
[ ] Requires deployment <snek/rubick/worker>

Did your issue had any of the "$" label on it?

[x] My DOT address: Payout

Screenshot 📸

[x] My fix has changed UI

https://github.com/kodadot/nft-gallery/assets/39299315/445230e0-64e6-4b71-82ba-5894ef0b466d
Copilot Summary

@prachi00 let's resolve conflicts

@prachi00 let's resolve conflicts

done

😍 Perfect, I’ve sent the payout
💵 $10 @ 3.73 USD/DOT ~ 2.681 $DOT
🧗 13Qx65nLd6SwdtjrRyuoEtp9CKXhF651xdHBPaXcvhwKm4N1
🔗 0x055b6baf08dbff511f7948d6056728893e0660d7aa265e65c95bf5030ede4ff5
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


Filename flag is not working on qwik-speak-extract

When use --filename flag on qwik-speak-extract is not working allways global translations is in app.json

Thanks for reporting. Should be fixed in latest release v0.15.2


Fresh install fails: "Unable to resolve scheduler/tracing"

Issue type
I'm submitting a ...  (check one with "x")

[x] bug report
[ ] feature request

Issue description
Current behavior:
App fails to load with an error that says: << Unable to resolve "scheduler/tracing" from "node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js" >>
Expected behavior:
App should load.
Steps to reproduce:
git clone  URL
cd DIR
npm install && npm start
Related code:
Please see screen grab

SOLVED! Here are the steps I followed to fix the error:
// from inside project directory //

rm -Rvf node_modules
rm package-lock.json
npm install
npm i scheduler
npm audit fix
npm start

@gouaf I have no idea what is scheduler as we don't use it in this app, but congrats with launching :)

wonderful!!!

We got this fixed in #241, please wait for the merge 👍


Azure.Template | Don't generate public client

Per conversation with @pakrym, setting public-clients: false in autorest.md is recommended.

@pakrym, is this what you had in mind?


Custom semiologies are added to widget even if no text is entered

as in what does it look for, a space character?


Add german slack channel and maintainer

The german documentation should point to the german maintainer and slack channel and not to the korean one. I don't think that there are that many koreans reading the german documentation :-)

/check-cla

/language de

ping @Xaseron

Thanks!
/lgtm
/approve


Possible action order mismatch with discrete actions (perhaps continuous as well)

There might have been a change in order of actions for discrete actions that makes inference not work with newer versions. This may or may not apply to continuous actions.
E.g. when training with:
func get_action_space() -> Dictionary:
	return {
		"move": {"size": 3, "action_type": "discrete"},
		"jump": {"size": 2, "action_type": "discrete"},
	}

then for inference, changing to:
func get_action_space() -> Dictionary:
	return {
		"jump": {"size": 2, "action_type": "discrete"},
		"move": {"size": 3, "action_type": "discrete"},
	}

Seems to make inference work.
I'm just adding this as a note until I investigate further, in case someone else runs into a similar issue. It might have been due to some differences in my local installation, so I'll reinstall the newest main branch and re-test. If there are issues, we can limit the version of dependencies until we investigate further.
Edit: I can confirm it when installing the newest version of GDRL from the repository.

Seems to work correctly now after re-checking. May have been due to some of my local modifications. Will keep in mind if it happens in the future.


Fix make monitorinfo a struct

What does the pull request do?
Passes MONITORINFO as a struct to overcome shortcomings in CoreRT
What is the current behavior?
MONITORINFO is a class that CoreRT can't currently marshall
What is the updated/expected behavior with this PR?
WindowsStartupLocation, menus and tooltips should work on windows CoreRT build

If the pull request fixes issue(s) list them like this:
Fixes #1923

Going to give @wieslawsoltes a little bit of time to respond, if he doesn't will merge tomorrow.

@grokys please merge


RemovedInDjango41Warning: 'pghistory' defines default_app_config = 'pghistory.apps.PGHistoryConfig'.

I am getting this warning while running pytest.
RemovedInDjango41Warning: 'pghistory' defines default_app_config = 'pghistory.apps.PGHistoryConfig'. Django now detects this configuration automatically. You can remove default_app_config.
    app_config = AppConfig.create(entry)

Also, Pytest that are using database_sync_to_async throwing integrity error.
Versions:
django-pgconnection==1.0.2
django-pghistory==1.4.0
django-pgtrigger==2.4.1
django==3.2.7

The first part of this issue was fixed via https://github.com/Opus10/django-pghistory/pull/35
Can you provide more information about the integrity error you are receiving in your test suite? A brief code example or the stack trace would be nice if possible. I'm not sure how to reproduce it

the app config issue has been resolved for a while. django-pghistory also no longer uses django-pgconnection and has changed substantially since this issue. If there are still errors with pytest, please open another issue!


How can I set the price?

I can't find any param that deals with pricing except royaltyInfo().
How to set the pricing of an edition? or this is not implemented?
Do I misunderstand something?

Hey, so ERC-1155/721 standards don't have functions for direct sales, only for transfers. Owners generally enter into separate smart contracts managed by exchanges to sell tokens, using the approval/approved functions in the ERC-1155/721 to grant transfer permissions to those separate contracts.
E.g., some of the OpenSea hacks emanate from vulnerabilities in their smart contracts vs. ERC-1155/721 standards.
More on the ERC-1155 specifications.


Unknown command: micro deployment ./manifest.yml

I was able to use bosh download public stemcell light-bosh to download the centos image however when I ran the below command I get:
bosh micro deployment ./manifest.yml
Unknown command: micro deployment ./manifest.yml

For this command you need to install "gem install bosh_cli_plugin_micro"
On Tue, Apr 7, 2015 at 1:09 PM, Jubilee Makanjuola
<EMAIL_ADDRESS>wrote:

I was able to use bosh download public stemcell light-bosh to download the centos image however when I ran the below command I get:
bosh micro deployment ./manifest.yml
Unknown command: micro deployment ./manifest.yml
Reply to this email directly or view it on GitHub:
https://github.com/cloudfoundry/bosh/issues/798

Thanks drnic!


isort, mypy and pylint in paproject.toml file

all linting config in one file

Coverage report

This PR does not seem to contain any modification to coverable code.


Postgresql connections not being dropped between tests

Similar: https://code.djangoproject.com/ticket/22420
Using the DjangoJobStore causes TestCase runs to fail with the following error:
django.db.utils.OperationalError: database "<name>" is being accessed by other users
DETAIL: There is 1 other session using the database.

I've tried the decorator suggested in that thread for closing all database connections, but the error still remains unless I use a different job storage. Using the current versions of all related libraries.

What version of Django, postgresql do you use?
Can you provide full traceback and detail explonation how to reproduce the bug?
Why did you run apscheduler tests with postgresql connection? Or it affects your project tests? If it is, I will be glad if you provide example of failing test.

Versions
Django==2.0.4
PostgreSQL 10.1, compiled by Visual C++ build 1800, 64-bit

Traceback
Testing started at 5:18 PM ...
...\Scripts\python.exe "...\pycharm\django_test_manage.py" test accounts.tests ...\Django\project
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
Destroying test database for alias 'default'...
Traceback (most recent call last):
  File "...\project\Lib\site-packages\django\db\backends\utils.py", line 83, in _execute
    return self.cursor.execute(sql)
psycopg2.OperationalError: database "test_projectdb" is being accessed by other users
DETAIL:  There is 1 other session using the database.

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

Traceback (most recent call last):
  File "...\helpers\pycharm\django_test_manage.py", line 168, in <module>
    utility.execute()
  File "...\helpers\pycharm\django_test_manage.py", line 142, in execute
    _create_command().run_from_argv(self.argv)
  File "...\project\Lib\site-packages\django\core\management\commands\test.py", line 26, in run_from_argv
    super().run_from_argv(argv)
  File "...\project\Lib\site-packages\django\core\management\base.py", line 288, in run_from_argv
    self.execute(*args, **cmd_options)
  File "...\project\Lib\site-packages\django\core\management\base.py", line 335, in execute
    output = self.handle(*args, **options)
  File "...\pycharm\django_test_manage.py", line 104, in handle
    failures = TestRunner(test_labels, **options)
  File "...\pycharm\django_test_runner.py", line 255, in run_tests
    extra_tests=extra_tests, **options)
  File "...\pycharm\django_test_runner.py", line 156, in run_tests
    return super(DjangoTeamcityTestRunner, self).run_tests(test_labels, extra_tests, **kwargs)
  File "...\project\Lib\site-packages\django\test\runner.py", line 604, in run_tests
    self.teardown_databases(old_config)
  File "...\project\Lib\site-packages\django\test\runner.py", line 577, in teardown_databases
    keepdb=self.keepdb,
  File "...\project\Lib\site-packages\django\test\utils.py", line 299, in teardown_databases
    connection.creation.destroy_test_db(old_name, verbosity, keepdb)
  File "...\project\Lib\site-packages\django\db\backends\base\creation.py", line 259, in destroy_test_db
    self._destroy_test_db(test_database_name, verbosity)
  File "...\project\Lib\site-packages\django\db\backends\base\creation.py", line 276, in _destroy_test_db
    % self.connection.ops.quote_name(test_database_name))
  File "...\project\Lib\site-packages\django\db\backends\utils.py", line 68, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "...\project\Lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "...\project\Lib\site-packages\django\db\backends\utils.py", line 85, in _execute
    return self.cursor.execute(sql, params)
  File "...\project\Lib\site-packages\django\db\utils.py", line 89, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "...\project\Lib\site-packages\django\db\backends\utils.py", line 83, in _execute
    return self.cursor.execute(sql)
django.db.utils.OperationalError: database "test_projectdb" is being accessed by other users
DETAIL:  There is 1 other session using the database.

Process finished with exit code 1

On additional test runs, the test database has to be destroyed manually.
Testing started at 5:33 PM ...
...\Scripts\python.exe "...\pycharm\django_test_manage.py" test accounts.tests ...
Creating test database for alias 'default'...
Got an error creating the test database: database "test_projectdb" already exists

Type 'yes' if you would like to try deleting the test database 'test_projectdb', or 'no' to cancel: yes
Destroying old test database for alias 'default'...
System check identified no issues (0 silenced).
Destroying test database for alias 'default'...

I wanted to include some integration tests for views that call scheduler.add_job(). Postgresql is used for both testing and live. In hindsight, it's probably overkill to test for task persistence when it's all going to be destroyed along with the database.
I'm currently using the MemoryJobStore when running tests, which is probably a better idea (see below).
Created a schedules.py file in an app module:
import sys

from apscheduler.jobstores.memory import MemoryJobStore
from apscheduler.schedulers.background import BackgroundScheduler
from django_apscheduler.jobstores import DjangoJobStore, register_events

scheduler = BackgroundScheduler()
for arg in sys.argv:
    if 'test' in arg:
        scheduler.add_jobstore(MemoryJobStore(), 'default')
        break
    else:  # pragma: no cover
        scheduler.add_jobstore(DjangoJobStore(), 'default')
        break
register_events(scheduler)
scheduler.start()

Awesome, thank you. I'll take a look in the week

Sorted out how to do integration tests with tasks. Same settings to use MemoryJobStore in testing. In your StaticLiveServerTestCase subclass (or LiveServerTestCase), add to your tearDown method:
def tearDown(self):
    ...
    scheduler.shutdown(wait=10)

After tinkering with different settings, I found it a requirement to set the wait kwarg high enough for all connections to be closed, else the test running returns the error.


proposal: component deletion goes inside settings form

@gloddy is into the idea that component deletion should perhaps go inside a component's settings form, which would remove a button from the selector. If we did this, we should also have some kind of keyboard shortcut that would (with a confirmation dialog) delete the currently selected component.
This would mean that every component on the page would reliably have a settings form, even though some (most?) of them would simply contain the delete button.

I'm not a huge fan of this idea because:

having discoverable delete is a nice thing
I can't figure out a keyboard shortcut that doesn't conflict with wysiwyg stuff
the editing experience on mobile would be awful


Operations' names is too good for esoteric programming language

I just want to change these to some weird names instead of PLUS, DIV etc.
Inspired by INTERCAL

Maybe these:

CodeName
New name

PLUS
JUNCTION

MINUS
STICK

MULT
PATRICK

DIV
FELLED TREE

DUMP
PEN

CHAR
VORTEX

CHAR-NL
VORTEX-AND-A-BUTTON

INPUT
ROAD

INPUT-NU
ROAD AND BROKEN TRAFFIC LIGHT

BREAK
TIC-TAC-TOE

HALT
PEN-TAC-TOE

DEBUG
TRUNK


demos: align build scripts with dldt

@IRDonch This is a fix for Windows demo build that you mentioned during stand-up. Could you please update Windows CI so that we check demo builds? Also please review and I'll merge.


View PIN bug fix

https://deloittedigital.atlassian.net/browse/BVPS-371

Updating manage PIN dropdown so that View PIN option on appears for Super Admins

Does this force the page to refresh? As if you try to create/regenerate a pin and then immediately check it, it won't show the new value, right?

Nope this doesn't fix that issue, it just hides the view PIN option for non-superadmins for now. But yeah the refresh fix still needs to be added


Provide access to unwrapped model in Lite

What does this PR do?
Fixes #12596
This PR enables attribute pass-through on the _LiteModule wrapper. When an attribute is not found on the wrapper, it tries to look it up on the original model that was passed into the setup method.
The _LiteModule wrapper now takes an optional argument original_module, which is the one passed in to the Lite.setup method. If we didn't do this, we wouldn't be able to access it, because the forward_module is potentially already wrapped by something like DistributedDataParallel.
Breaking change
This is a breaking change if you previously relied on LiteModule.state_dict() to save or load checkpoints. The old checkpoint won't load after this PR because of missing keys (_original_module, _forward_module).
Before submitting

[x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[x] Did you make sure to update the documentation with your changes? (if necessary)
[x] Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
[x] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
I made sure I had fun coding 🙃
cc @borda @tchaton @rohitgr7 @carmocca @justusschock @awaelchli

Gatekeeper merge


Qt reset

Admin changes relating to apply #730

[x] Add a confirmation modal
[x] Add a reset field to the statusLog when reseting

{
   status: activated,
   statusLog: {
      started: DATE,
      completed: DATE,
      reset: DATE,
   }
}

Based on discussions at 2/7/21 stand-up this ticket is to be progressed.


Support TOC Subheaders in PDF

Details

Project URL: https://docs.readthedocs.io/en/latest/
Build URL (if applicable): https://readthedocs.org/projects/docs/
Read the Docs username (if applicable):

Expected Result
Subheaders rendered in TOC
Actual Result
Did not render
Images of Proof

@rogersachan not sure to understand what you said, would you like to have the User Documentation, About Read the Docs, Feature Documentation, Developer Documentation, etc in the PDF? Is that what you mean?

@humitos That is what I mean.

This is an issue with Sphinx, not with Read the Docs. You'd need to open a bug with the sphinx project here: https://github.com/sphinx-doc/sphinx


Fixed evidently to <=0.1.40.dev0

Pre-requisites
Please ensure you have done the following:

[x] I have read the CONTRIBUTING.md document.
[x] If my change requires a change to the documentation, I have updated the documentation accordingly.
[x] I have added tests to cover my changes.

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Describe changes
This will be a backport to 0.5.7

We will have to change this back after the next release

I did it because this is intended to backport to 0.5.7


use posynegy for TCS reldiff?

The PR above needed SignomialsEnabled because left/right were being calculated.

It has been done.


Jumping between cells should skip separator rows

In Emacs navigation by Tab and Shift+Tab skips separator rows. Same should be done in this extension.

Feature implemented in master branch but not yet released


Pin Prevent unauthorized Bluetooth connection with rpi-audio-receiver device

HI,
It is possible to do it?
Pin protect the pairing process with the rip audio receiver so unauthorized devices can't connect to it.

I tried to use a PIN for pairing Bluetooth, however this requires switching to an old an less secure pairing mode that does not seem to work at all with iOS devices. See https://github.com/nicokaiser/rpi-audio-receiver/issues/48#issuecomment-686666414
You could try to change the files like in this commit: https://github.com/nicokaiser/rpi-audio-receiver/commit/3678cf9f0640b80e4a1083482ed58f31a8dcff14 but as I said, it simply did not work for me...


Feat: finalize the GitHub Action

Enhance TinySemVer: GitHub Release Creation & Security Improvements
This PR addresses current errors and adds new features to TinySemVer.
Key Changes

Automatic GitHub Release Creation

New 'create-release' flag using GitHub CLI to generate the release
Checks for CLI availability (especially for local runs)

Improved Security

Use persist-credentials: false for checkout action. Context is detailed in commit message / documentation
Added security considerations for PATs in README

Enhanced Error Handling

Extended error logging for better debugging

Verification
Changes tested and working on fork: https://github.com/grouville/tinysemver
Security Note
Current setup is secure, with pipelines running only on main and releases.
Future Consideration
Potential enhancement of release notes generation.
@ashvardanian Please review, especially the release note process.

Looks great! Will merge and try from the desktop in a couple of hours.


Disable animation when jumping to tab far away

Motivation
Jumping to tab far away makes bad user experience: can see a lot of empty tab scenes during animations.

Test plan
Disable animation when jumping to tab far away.  In my MR, I set this value to 0, but I have to admit that it's better to set by user manually or something else, rather than hard code.

@satya164   I'm the same guy with @bournewang (I got a problem on that Github account, so I use this account temporarily)

Hey, I just released a new alpha 2.0.0-alpha.0 of the library. It's rewritten using react-native-gesture-handler and react-native-reanimated addresses a many platform specific bugs and performance problems. It's gone through a major refactor and there will be conflicts with your PR.
Please try the new version and see if it addresses your issue. If not, please open a new PR with the change.


[bug] 'NoneType' object is not subscriptable

Describe the bug
A TypeError occurs when I try to use Chat completion models
To Reproduce
Steps to reproduce the behavior:

RAIL spec:

<rail version="0.1">

<output>
    <object name="patient_info">
        <string name="gender" description="Patient's gender" />
        <integer name="age" format="valid-range: 0 100"/>
        <list name="symptoms" description="Symptoms that the patient is currently experiencing. Each symptom should be classified into  separate item in the list.">
            <object>
                <string name="symptom" description="Symptom that a patient is experiencing" />
                <string name="affected area" description="What part of the body the symptom is affecting"
                    format="valid-choices: {['head', 'neck', 'chest']}"
                    on-fail-valid-choices="reask"
                />
            </object>
        </list>
        <list name="current_meds" description="Medications the patient is currently taking and their response">
            <object>
                <string name="medication" description="Name of the medication the patient is taking" />
                <string name="response" description="How the patient is responding to the medication" />
            </object>
        </list>
    </object>
</output>

<instructions>
You are a helpful assistant only capable of communicating with valid JSON, and no other text.

@json_suffix_prompt_examples
</instructions>

<prompt>
Given the following doctor's notes about a patient,
please extract a dictionary that contains the patient's information.
If the answer doesn't exist in the document, enter `null`.

{{doctors_notes}}

@xml_prefix_prompt

{output_schema}
</prompt>

</rail>

Runtime arguments

raw_llm_response, validated_output = guard(
    openai.ChatCompletion.create,
    prompt_params={"doctors_notes": doctors_notes},
    engine="chatgpt",
    max_tokens=1024,
    temperature=0.0,
)

Expected behavior
The same behaviour as with completion models
Library version:
Version (e.g. 0.1.6 & 0.1.7)
Additional context
The problem seems to come from the fact that 'json.loads' in run.py returns an error because the response from the chat model is not a single JSON or contains text around it

A fix can be to rework the 'post_process' function in run.py:
`   def post_process(self, output: str) -> str:
"""Post-process the raw output before parsing it.
    If the output is surrounded by triple backticks, remove them."""
    output = output.strip()
    # if output.startswith("```"):
    #     output = output[3:]
    #     if output.startswith("json"):
    #         output = output[4:]
    # if output.endswith("```"):
    #     output = output[:-3]
    output = output.replace(" False,","'False'").replace(" True,","'True'").replace(" None,","'None'")
    output = output.replace("json","JSON").split("JSON")[-1]
    output = "{" + output.split("{",1)[-1].rsplit("}",1)[0] + "}"
    return output`

Changing the high_level_reask_prompt to explicitly mention that it can only return the corrected JSON also improves the behaviour
<high_level_reask_prompt>
I was given the following JSON response, which had problems due to incorrect values.

{previous_response}

Help me correct the incorrect values based on the given error messages. Only return the corrected JSON.
</high_level_reask_prompt>

Hey, thanks for the improvement suggestions.
First off, I'm unable to replicate your example. engine="chatgpt" is invalid. Running it with model="gpt-3.5-turbo" worked for me. Could you double-check how you ran it?
Let me run through your suggestions one by one.

output = output.replace(" False,","'False'").replace(" True,","'True'").replace(" None,","'None'")

This seems to change the booleans and Nones to string equivalents. Their equivalents should be false, true and null (JSON uses javascript equivalents). This would be a reasonable change, if we can find a way to write this without it affecting the values within strings. Maybe there's a good regex solution?

output = output.replace("json","JSON").split("JSON")[-1]

If I'm reading this correctly, it assumes that the output will be annotated by a triple-quote json. If it's not, it'll parse the whole thing as it would otherwise. This sounds like a good change, except I'm worried it might hit a "json" substring in the json itself.

output = "{" + output.split("{",1)[-1].rsplit("}",1)[0] + "}"

I like this one a lot, and it would meaningfully replace the lines you commented out.

 <high_level_reask_prompt>
 I was given the following JSON response, which had problems due to incorrect values.

 {previous_response}

-Help me correct the incorrect values based on the given error messages.
+Help me correct the incorrect values based on the given error messages. Only return the corrected JSON, don't repeat the given JSON.
 </high_level_reask_prompt>

This change seems reasonable to me, though I've never personally encountered it repeating the given JSON.

The cases you're proposing to handle are weird, I haven't really seen openai's models make these errors. Could you please:

[ ] provide what model you used (the runtime arguments you provided are unreplicable),
[ ] submit a sample doctors_notes,
[ ] show some examples of the failed generations?

Okay, let me provide some more context:

I renamed my "gpt-3.5-turbo" engine to "chatgpt" in the Azure openAI service. So it is the same as the one you used (Sorry I should have clarified this).

the doctor notes that I used are the same ones as in the getting-started guide:
doctors_notes = """49 y/o Male with chronic macular rash to face & hair, worse in beard, eyebrows & nares. Itchy, flaky, slightly scaly. Moderate response to OTC steroid cream"""

An example where guardrails errored because the output from OpenAI was unexpected:

output openAI: '{\n    "patient_info": {\n        "symptoms": [\n            {\n                "affected area": {\n                    "incorrect_value": "face & hair",\n                    "error_message": "Value face & hair is not in choices ['head', 'neck', 'chest']."\n                }\n            },\n            {\n                "affected area": {\n                    "incorrect_value": null,\n                    "error_message": "Value None is not in choices ['head', 'neck', 'chest']."\n                }\n            },\n            {\n                "affected area": {\n                    "incorrect_value": null,\n                    "error_message": "Value None is not in choices ['head', 'neck', 'chest']."\n                }\n            },\n            {\n                "affected area": {\n                    "incorrect_value": null,\n                    "error_message": "Value None is not in choices ['head', 'neck', 'chest']."\n                }\n            }\n        ]\n    }\n}\n\nThe corrected JSON response is:\n\n{\n    "patient_info": {\n        "symptoms": [\n            {\n                "affected area": "face & hair"\n            },\n            {\n                "affected area": null\n            },\n            {\n                "affected area": null\n            },\n            {\n                "affected area": null\n            }\n        ]\n    }\n}'
Which cannot be processed by the JSON decoder and therefore the output_as_dict=None. This leads to errors in the reask functions.

@sophieDataroots thanks for sharing this.
If I understand correctly, in the examples you shared, the The corrected JSON response is: statement is part of the LLM response, in addition to the original JSON dictionary. And this causes the JSON parsing error.
I believe the reason this is happening is that:

Since you're testing out the example with a chat model, the way to get correctly structured JSON from the chat model is using a separate system instructions in addition to just the prompt.
Currently, all of the reasking logic assumes that the end user only a non-chat model, and so the reasking logic only creates a prompt, without creating system instructions to go with the prompt. This causes reasking output to be formatted incorrectly.

This is a pretty interesting bug, and should not be a super hard fix on our end.


Implement List Command

This PR updates the listHandler function of the manager to return a list of all names of registered functions.
Changes:

Added List function in ManagementService.
Updated listHandler to use this function.

Thanks, looks good!


docs: Fix installation instruction

Since a long time, the PyQt5 wheels have been available on PyPi. This part of instruction is no longer relevant.
Also specify PyQt5 dependency using napari[pyqt5] to enforce version constraints from napari (to not install incompatible version of PyQt5)

Thank you, much cleaner now!


Feat: Appwrite icon

As a follow-up on the issue https://github.com/tandpfun/skill-icons/issues/35 I created a PR.
The issue presents 3 different designs, and this PR is using the first option:

Review highly appreciated ❤

As a follow-up on the issue #35 I created a PR.
The issue presents 3 different designs, and this PR is using the first option:

Review highly appreciated heart

All icons should be submitted only in issues, not in pull requests.
Read: https://github.com/tandpfun/skill-icons/pull/5#issuecomment-1065478604

I do appreciate the PR, but I'd prefer if icons are added/suggested through issues. If you're able to share the figma link so I can grab the original file (the exported is different from the one designed in figma) I can probably merge this. I'd just like to have original files do I can make modifications in the future, or for other releases.


Allow aliases to have htm suffix

When specifying an alias, the only allowable extension is html. Allow htm as well.
Example:
+++
title = "Post 1"
date = 2020-10-13T06:50:53-04:00
draft = false
aliases = ["foo.html", "bar.htm"]
+++

See https://discourse.gohugo.io/t/allow-aliases-with-htm-suffix/28780.
PR to follow...

I proposed this to address a need expressed in the forum. I cannot find any other requests for this capability. Closing.


Property 'currentUser' has no initializer and is not definitely assigned in the constructor.

If somebody knows a solutions to this problem please help!
I tried using the exactly same packages as the example but nothing.
it breaks on this line
currentUser: User;
on the app.component.ts

This library does not contain currentUser: User;. You will need to provide much more context. First verify where the error occurs (in which code, yours, a library, which...)


Choco0.10.3

Updated the chocolatey lib to 0.10.3.
Things I had to fix:

Initialisation of the ChocolateyWrapper
Output of the PsLogger
Redirect of Verbose messages that (accidentally) were invoked on the Info method

Currently there are still some things up for improvement:

Duplicate lines in the output, especially warnings (probably related: https://github.com/mwrock/boxstarter/issues/80)

But at least this update fixes a handful of open compatibility issues with newer versions of chocolatey:

https://github.com/mwrock/boxstarter/issues/186
https://github.com/mwrock/boxstarter/issues/148
Probably https://github.com/mwrock/boxstarter/issues/198

https://github.com/chocolatey/choco/issues/1121

The unfortunate consequence of using Console is that remote runs of boxstarter lose all output. However, I can see why you went down that route. I've done a fair bit of tinkering myself and something is causing powershell to crash with a stackoverflowexception if you use the powershell host.

That's the reason I went for the console. It looks like the writes on PSHostUserInterface are intercepted (by chocolatey I presume) and fed back to the custom logger causing an infinite recursive loop resulting in a stack overflow. But I couldn't figure out where that interception was done and how I could work around it.

right. the exception occurs on the very first call to write-* by the caller of the choco library after initialization but before calling run on the choco instance. I'm torn between hunting this down in choco and just rewriting boxstarter as its design gets more grotesque every time I look at it. If I could only stop time.

Try with the fixes I implemented and see if it is still an issue. There should be an available build here - https://ci.appveyor.com/project/chocolatey/choco/build/<IP_ADDRESS>1/artifacts

Oh that does indeed address the stackoverflow! Nice @ferventcoder.

@ferventcoder any eta on when that fix will land in the nuget feed?

Jan/ early Feb is the best estimate.

cool. I'll keep an eye out.Closing this. Master should be good to go once that releases.

So February is what we are working with now. That date is unlikely to shift.

Hi Folks, is this waiting to be approved my @mwrock to be merged back into Master?

No master has most of what is necessary. I'm just waiting on the above referenced choco fix to land in the nuget feed and then I can prep a release.

@mwrock Thanks for the response! Once that choco version gets into NuGet, a new Boxstarter version is planned for release sometime thereafter?

correct!


Add dependencies for Psycopg

Follow Psycopg doc, add required dependencies to qontract-reconcile-base and qontract-reconcile-builder.
Required by https://github.com/app-sre/qontract-reconcile/pull/3793#discussion_r1329631207

thanks!


code forRetroTS-T5 and MVRoBERTa models

Hello, may I ask if you could upload the code related to RetroTS-T5 and MVRoBERTa models? Thank you very much, looking forward to your reply.

Hi, thanks for your interest in our work.
As for the MVRoBERTa, please check the codes in src/super_dialseg/models/superseg/modeling_superseg.py. SupersegSegmenter is the model you want.
As for the RetroTS-T5, currently, it has not been well integrated into our library yet. You can use the original codes from https://github.com/HuiyuanXie/tiage for your experiment now.

To follow up on the code request, do we have fine-tuned checkpoints ready and can be shared? Or do we need to download your dataset, process it, and then retrain the MVRoBERTa model?

Hello, thanks for your interest. Yes, we have fine-tuned checkpoints but I think you can also retrain the models by yourselves since the training process will not require much time.


WIP: initial sso updates

initial fixes for #718 #720 #722 and #730

FYI @heiko-braun mind taking a look?

thank you for the feedback @Ladicek, fixed,

Thanks @rhoads-zach, added just one more minor comment, otherwise LGTM. I'd welcome review from @heiko-braun / @cescoffier / @pmlopes, too.

thanks @Ladicek fixed and merging.

@Ladicek fixed in #733


Malformed redirect_url in Xamarin.Android

I'm trying to use oidc-client.js in a xamarin webview.  I got it working in Xamarin.UWP but in Xamarin.Android the IdentityServer4 service doesn't like the redirect_uri:
here is my config in javascript:
var settings = {
authority: 'https://someidp',
client_id: 'myclient',
redirect_uri: 'file%3A%2F%2F%2Fandroid_asset%2Fweb%2Foidc%2Foidc-client-sample-callback.html',
response_type: 'code id_token',
scope: 'openid smpcrmapi roles offline_access',
filterProtocolClaims: true,
loadUserInfo: true
};
I know what you are thinking, why in the world did I encode the redirect_uri.  If I don't encode it then the Xamarin Android Webview won't even launch the link, for some reason it doesn't like the file:/// part within the link and I get the classic "Webpage Not Found" error.  But unfortunately when I use the encoded redirect_uri like above, the Identity server complains that it's a malformed redirect_uri and the authentication process fails.
I would love to use something like a IdentityModel in a forms app but there is nothing that works with Windows Authentication that I know of so I can't.  Not to mention this issue
I'm fairly certain the above approach would work if the IdentityServer would only decode the redirect url before trying to use it.
Here is the full log of the error in IIS of the IdentityServer4 service:
2017-12-05 10:48:04.032 -06:00 [Information] Request finished in 13.1269ms 200 application/json
2017-12-05 10:48:06.199 -06:00 [Information] Request starting HTTP/1.1 GET http://someidp/idp01/v1.0/connect/authorize?client_id=myclient&redirect_uri=file%253A%252F%252F%252Fandroid_asset%252Fweb%252Foidc%252Foidc-client-sample-callback.html&response_type=code id_token&scope=openid myapi roles offline_access&state=a4c9a0e5d5564c6595efa11d4f8f2714&nonce=9ec4853b72234f0eb07ba6794ce4062a
2017-12-05 10:48:06.200 -06:00 [Information] Invoking IdentityServer endpoint: "IdentityServer4.Endpoints.AuthorizeEndpoint" for "/connect/authorize"
2017-12-05 10:48:06.200 -06:00 [Error] malformed redirect_uri: file%3A%2F%2F%2Fandroid_asset%2Fweb%2Foidc%2Foidc-client-sample-callback.html
"{
"SubjectId": "anonymous",
"RequestedScopes": "",
"Raw": {
"client_id": "myclient",
"redirect_uri": "file%3A%2F%2F%2Fandroid_asset%2Fweb%2Foidc%2Foidc-client-sample-callback.html",
"response_type": "code id_token",
"scope": "openid myapi roles offline_access",
"state": "a4c9a0e5d5564c6595efa11d4f8f2714",
"nonce": "9ec4853b72234f0eb07ba6794ce4062a"
}
}"

Never mind.  While this issue still occurs on my Samsung tablet (that I usually develop on) it's not happening on my Samsung phone.  So I guess it's something to do with the tablet.  I'm not sure using the oidc-client will work in Xamarin.Android though because it doesn't appear to popup the login dialog.


Bump d.py and add bot base

This bumps d.py up to a more recent commit, that includes the changes to make cog.ext loading async. See here for more reading https://gist.github.com/Rapptz/6706e1c8f23ac27c98cee4dd985c8120.
This also adds a BotBase class, which is intended to be used by all our bots. This base class implements a lot of our "boiler plate" code, such as stats, root aliases and wait_until_guild_available to name a few.
Since the extensions util is only used on bot startup, to load extensions, I have removed it from the documented utils, since that is now abstracted away by BotBase.load_extensions()
ToDo:
Update changelog to show breaking change (due to removal of public extensions util)
Rebase so original authors get credit for the utils

Force push was to add co-authors


Implementing a feature to delete old files based on the size parameter

Implementing a feature to delete old XML files based on the size parameter.

Would this get into a loop of trying to delete a log, throwing an exception for some reason, which would then cause Elmah to create a new log, calling the DeleteOldFiles function, and then failing again?

Hi @djsmith , looking at the code I believe that this problem could happen. Any suggestions?

Yea, I have some ideas, I'll put together a pull request for you.

Great @djsmith ! Who knows after that @atifaziz could accept this code to be merged into main code.


Bug fixes, Runtime & Performance optimization

This pull request includes significant optimizations and bug fixes.
ControlNetModel

Constructor Improvements:
Added type checks and exception handling.
Simplified block creation with loops to reduce redundancy.
Forward Method:

Streamlined the forward pass to enhance performance and clarity.
Ensured efficient tensor operations and minimized unnecessary computations.
General Code Clean-up:

Removed redundant checks and streamlined the logic.
Organized methods and attributes for better readability and maintainability.

BPETokenizer
Initialization Improvements:
Enhanced error handling in the initializer init(mergesAt:vocabularyAt:).
Removed force unwrapping to prevent runtime crashes.
Tokenization Process:
Simplified the tokenization process to improve readability and efficiency.
Optimized the encode function to reduce redundant operations and improve performance.
Pair and Update Functions:
Utilized zip in pairs(for:) to create pairs more efficiently.
Refined update(_:merging:) to handle edge cases better and avoid unnecessary computations.
Helper Functions:
Introduced static helper functions for reading merges and vocabulary, including error handling.
These improvements ensure that the BPETokenizer class is more robust, efficient, and easier to maintain.
The changes address potential runtime errors and enhance the overall performance of the tokenizer.

Alright

@kiruthikpurpose can you look into this?


feat: add factories to create ordered lists or maps

Codecov Report

:exclamation: No coverage uploaded for pull request base (0.8.x@ac786a8). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             0.8.x       #31   +/-   ##
=========================================
  Coverage         ?   100.00%
  Complexity       ?       121
=========================================
  Files            ?         6
  Lines            ?       397
  Branches         ?         0
=========================================
  Hits             ?       397
  Misses           ?         0
  Partials         ?         0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac786a8...5ed23a4. Read the comment docs.


Error on VSIX install: This extension is not installable on any currently installed products

4/14/2022 10:45:08 AM - Microsoft VSIX Installer
4/14/2022 10:45:08 AM - -------------------------------------------
4/14/2022 10:45:08 AM - vsixinstaller.exe version:
4/14/2022 10:45:08 AM - 17.1.1035-preview2
4/14/2022 10:45:08 AM - -------------------------------------------
4/14/2022 10:45:08 AM - Command line parameters:
4/14/2022 10:45:08 AM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\maraghu\Downloads\redhat.vscode-yaml-1.6.0.vsix
4/14/2022 10:45:08 AM - -------------------------------------------
4/14/2022 10:45:08 AM - Microsoft VSIX Installer
4/14/2022 10:45:08 AM - -------------------------------------------
4/14/2022 10:45:09 AM - Skipping product Microsoft.VisualStudio.Product.BuildTools (59357c76) since it does not support extensions
4/14/2022 10:45:09 AM - Initializing Install...
4/14/2022 10:45:09 AM - Extension Details...
4/14/2022 10:45:09 AM - 	Identifier         : vscode-yaml
4/14/2022 10:45:09 AM - 	Name               : YAML
4/14/2022 10:45:09 AM - 	Author             : redhat
4/14/2022 10:45:09 AM - 	Version            : 1.6.0
4/14/2022 10:45:09 AM - 	Description        : YAML Language Support by Red Hat, with built-in Kubernetes syntax support
4/14/2022 10:45:09 AM - 	Locale             : en-US
4/14/2022 10:45:09 AM - 	MoreInfoURL        :
4/14/2022 10:45:09 AM - 	InstalledByMSI     : False
4/14/2022 10:45:09 AM - 	SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
4/14/2022 10:45:09 AM -
4/14/2022 10:45:09 AM - 	SignatureState     : Unsigned
4/14/2022 10:45:09 AM - 	Supported Products :
4/14/2022 10:45:09 AM - 		Microsoft.VisualStudio.Code
4/14/2022 10:45:09 AM - 			Version :
4/14/2022 10:45:09 AM - 			ProductArchitecture : x86
4/14/2022 10:45:09 AM -
4/14/2022 10:45:09 AM - 	References         :
4/14/2022 10:45:09 AM - Signature Details...
4/14/2022 10:45:09 AM - 	Extension is not signed.
4/14/2022 10:45:09 AM -
4/14/2022 10:45:09 AM - Searching for applicable products...
4/14/2022 10:45:09 AM - Found installed product - Global Location
4/14/2022 10:45:09 AM - Found installed product - Visual Studio Professional 2022
4/14/2022 10:45:09 AM - VSIXInstaller.NoApplicableSKUsException: One or more extensions are for Visual Studio Code. Try installing them in Visual Studio Code.
at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable1& skuData)    at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable1& skuData)
at VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

This is not the correct repo for this issue.


Improve CanMakePhoneCall on iOS to check support of url and connection to a carrier

Improve detection of CanMakePhoneCall for iOS where iPad with version > iOS 8 was returning true.
This should fix #37

Thx


Lcat.data

Hey @gmingas and @aranas  - I'm going through the steps to better seperate out older code used for the LCAT data (which probably won't be re-run anytime soon) and then I'll update the R pipeline in another branch.
So much of this code will end up just being used in the LCAT processing and I will use a cleaned up version for the three cities processing!
Hope it makes sense!

@RuthBowyer if I remember correctly this is pretty crucial to merge in prep for December. Maybe this is the place to start? Note to myself on managing the necessary dependencies: https://github.com/rstudio/renv/issues/946

Hey there - it would be great to merge this (I note the conflicts which I will resolve!) - but this branch should relate to the work done to process the data for LCAT; for the 'three cities' pipeline I ran a slightly more general (but probably not helpfully general enough) version of the pipeline. I will add this to my list this week to sort out as I agree it needs to be sorted before December!
It does give me a thought though @dingaaling - should we invite the new LCAT data folks to the workshop?

Just looking at the merge conflict for R/misc/read_crop.fn.R. They both add in two similar functions:

main branch ==> hads_read_crop_df
LCAT.data branch ==> hads_read_crop2

Given that they don't appear to conflict functionally, I suggest that we add in both functions and then open an issue to work out which we should keep.
@RuthBowyer could you make a call on this please?

@RuthBowyer Assigning this to you. Since merging #122, it is not clear (to @griff-rees and me) whether or not there is anything in this PR that needs to be preserved and isn't already included in #122.

Hey @andrewphilipsmith @griff-rees
Sorry again for this! I think all is well, but I believe there are some files which are on the LCAT branch which are deleted on main - I'm sure all of which are my fault/I probably deleted them on the other branch, apologies.
They are all on the LCAT branch in R/misc and relate to converting data from rasters to data frames to make R processing easier
To explain why (I think) these issues arose, it's because we have since updated the pipelines and processing, but I was trying to keep a record of the old code for how I processed that data incase there were questions on it in future, until that UK wide dataset can be superseeded. I did not do this well, it would seem - apologies!!
Also, the conflict mentioned above was to deal with the version of data used for LCAT and then subsequently for the next interim data.
However, with the exception of 'R/misc/Data_Processing_to_df.R` on the LCAT branch, I don't think we need any of these  files anymore - if you agree I will close this PR therefore and just open a PR for that single file, moved to the LCAT folder?


Add an option for periodic boundaries for Voronoi and Delaunay Triangulation ENH:

Is your feature request related to a problem? Please describe.
Yes, many simulations can be set up to be periodic along a certain direction (e.g. periodic along x, non-periodic along y). For post-processing purposes, it would be great to implement this feature.
Describe the solution you'd like.
With respect to Voronoi diagrams, voro++ could be used or called to allow for mixed periodic boundary conditions. With respect to Delaunay diagrams, perhaps the standard could be used, and triangles that appear across the periodic boundary could be appended on afterwards.
Describe alternatives you've considered.
Voro++ is a great alternative to obtaining Voronoi diagrams that are periodic along a certain direction. However, no alternative exists for generating Delaunay triangulation. Either the libraries allow for ALL boundaries to be periodic (so no mixed conditions, like periodic along x) or no periodicity at all. One could construct Delaunay diagrams from the voro++, however it would be far more convenient to use an integrated implementation.
Additional context (e.g. screenshots, GIFs)
No response

This is probably a duplicate of gh-11858. Since I work on both spatial and in the MD simulation community, I certainly agree on the usefulness. Are you happy to have that issue be the main one? Feel free to chime in/upvote over there. Admittedly, not much has happened since that issue opened.

Yeah, that seems like a duplicate. I will participate in that thread.


Document \d client-side command with no argument

Also link to corresponding SHOW statements for client-side
commands, where relevant, and remove "as of xxx" references
to older versions.
Fixes #5376.

This change is

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/fd674467146f1418a266af3e7861b17f9580d3aa/
Edited pages:

v19.2/frequently-asked-questions.md
v19.2/sql-dump.md
v19.2/sql-faqs.md
v19.2/use-the-built-in-sql-client.md


Numbered Lists Show Up As Bullet Points

Numbered lists like:
1. Testing
2. Testing 2

show up in the preview window as:
* Testing
* Testing 2

It's an issue with Sublime Text. https://github.com/SublimeTextIssues/Core/issues/1767
Since there is nothing MarkdownLivePreview can do about it, I'm closing.


[BUG] TypeError appearing in the console.

Describe the bug
Your plugin is giving me the "TypeError" in the console, clogging the console in the developer tools.
To Reproduce

Download Outliner
Open a note.
Check the developer tools (ctrl + shift + i)
See Console TypeError.

Expected behavior
A clear and concise description of what you expected to happen.
I expected it to work normally without it giving any errors.
Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

OS: Microsoft
Obsidian Version: v1.5.8
Plugin Version: v4.8.0

Additional context
None.

Wait how do I delete this, there's already another bug related to this: https://github.com/vslinko/obsidian-outliner/issues/503


Add https support

Adds https support.

parameters
asks for missing parameters in console

I am not particularly happy with this. The read call is blocking and can hang forever if this is used from automated tooling.

Add parameter to only ask user input if enabled ?
Add timeout (by using lib. Played with tokio mio but it is super low level, there is another crate but it is not super reliable but can do the trick timeout_readwrite)

More robust https credentials fetching with support for 2FA (or at least indication how to achieve it.)
I am not sure whether I should log a warning when building the git auth or logging the actual error only if https is required and auth is not present.
Either way, as it stands it seems userpass_plaintext does not work. So.. 🤷


Why is memory usage so large

i have the following program looking at memory usage, why does an array of ascii characters take up 264 bytes and a 102 byte bytearray take 128 bytes?
import gc
gc.collect()
print(gc.mem_free())

xxx = "12345678901234567890" * 5 + "xx"
print(gc.mem_free())
gc.collect()
print(gc.mem_free())

yyy = bytearray(102)
gc.collect()
print(gc.mem_free())

and get results
63984
63712
63712
63584

It looks like free memory is used up in chunks. Try creating many strings and average the free memory reduction.

Memory is allocated in chunks of 16 bytes.  And the bytearray needs an outer object and an inner array to hold the data, so it takes: 16 + 112 = 128 bytes.
For the string, they way you've written it the program will create both the "123...890" * 5 string (length 100) and the final string of length 102.  That's at least 256 bytes.
In summary: this is expected.


[BUG] large log file,dose this normal?

Version
LiteDB 5.0.11ver
.net 6.0
Win10 X64
Describe the bug
the size of main db file stoped increase.
the size of log file keep increase
Code to Reproduce
//Full Code
class Program {
        static void Main(string[] args) {
            try {
                LiteDBTest.TestFileNameLengthEffects0();
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
            Console.ReadLine();
        }
}

    public class LiteDBTest {
        static LiteDBTest() {
            try {
                db = new LiteDatabase("Filename=TestDB.ldb;");//初始化数据库connection=shared
                BsonMapper.Global.IncludeFields = true;
            } catch (Exception ex) {
                Console.WriteLine(ex.Message);
            }
        }

        public static LiteDatabase db;

        public static List<CTS1> DataGen(ref int current, int count) {
            List<CTS1> list = new(count);
            for (int i = 0; i < count; i++) {
                var val = (current + i);
                var key = $"0d3deed1234567890abcd{(100000000 - (current + i)):D12}";
                list.Add(new(key, val));
            }
            current = current + count;
            return list;
        }

        static Random r = new Random();

        public static async void SelectTest() {
            while (!IsExit()) {
                await Task.Delay(r.Next(1, 10));//随机触发查询时间
                var sw = Stopwatch.StartNew();
                var sets = db.GetCollection<CTS1>();
                var rs = r.Next(0, 10000000);
                var key = $"0d3deed1234567890abcd{(100000000 - rs):D12}";
                var rlt = sets.FindById(key);
                if (sw.Elapsed.Seconds > 1)
                    Console.WriteLine($"查询时间大于1秒-{sw.ElapsedMilliseconds}ms");
                Interlocked.Increment(ref QueryCount);
            }
        }

        public static bool IsExit() {
            return Interlocked.Read(ref exit) == 1;
        }

        static long exit = 0;

        public static long QueryCount;

        public static void TestFileNameLengthEffects0() {
            //using var db1 = new LiteDatabase("Filename=TestDB0.ldb;");
            var sw = Stopwatch.StartNew();
            var swOutput = Stopwatch.StartNew();
            for (int t = 0; t < 50; t++)
                Task.Factory.StartNew(SelectTest);

            var set = db.GetCollection<CTS1>();
            int totalIdx = 26860000;
            for (int i = 0;i < 10000; i++) {
                var list = DataGen(ref totalIdx, 20000); //每2w一个批次
                try {
                    var rlt = set.InsertBulk(list);
                } catch (Exception ex) {
                    Console.WriteLine(ex.Message);
                }
                if (swOutput.Elapsed.TotalSeconds > 8) {
                    Console.WriteLine($" 当前数量:{totalIdx} 平均插入速度:{(totalIdx / sw.Elapsed.TotalSeconds)}op/s , 查询次数{(QueryCount / sw.Elapsed.TotalSeconds)}/s");
                    swOutput.Restart();
                }
            }
            exit = 1;
        }

    /// <summary>
    /// CodeTaskSmall
    /// </summary>
    public class CTS1 {
        public CTS1(string code, int taskId) {
            Code = code;
            TaskId = taskId;
        }
        [LiteDB.BsonId]
        public string Code;
        [LiteDB.BsonField("t")]
        public int TaskId;
    }

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots/Stacktrace

Additional context
Add any other context about the problem here.

im stop the test problem.and then use LiteDB.Studio open the dbfile,then disconnect.
the db and log files will be merged

I can't tell from your code, but I encountered this issue before when I failed to dispose of the LiteDatabase  before exisint the application.

Hi guys.
When you modify any data in LiteDB, all changes goes to log file. This file contains all changed. The CHECKPOINT command is responsable for read all this log file and persist in original datafile, and then crop/delete file. CHECKPOINT command runs when:

Manual run: When user call Checkpoint method
Atuomatic run: When database is closed (in Dispose)
Atuomatic run:  When log file get 1000 pages size (~8MB) ONLY if there is no other thread reading/writing. It´s because CHECKPOINT command need exclusive lock database.

So, if you want avoid large log files after long bulk inserts (in many threads) run Checkpoint command manually afer N documents. This manual run wait for exclusive lock and will remove your log file after execute.

thanks

@mbdavid Manually checkpoint didn't work, My insertion speed is 200 Records/Second. Can you please help me?
I already tried bulk insertion, Commit, Checkout.


enable AlterOpLayout to keep OP unchanged

Enable AlterOpLayout to keep OP unchanged (by return None)
Register AlterOpLayout for conv2d
Update tvm

need to merge https://github.com/dmlc/tvm/pull/1143 first.

ready for merge


⚠ Bofrost.es has degraded performance

In ea6e8d3, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1244 ms

Resolved: Bofrost.es performance has improved in 4eacbb9 after 10 hours, 4 minutes.


minor tweaks from initial pass - windows

@plaindocs - minor tweaks only. Suspect there'll be more to come once Nick and I get to grips with the Windows issues, but probably cleaner to keep them separate.


Stack Viewer colour update

From @Robbie1977 on October 24, 2017 10:57
on item loading sometimes there is no update after the new colour is applied.
Check the event handling and ensure update triggers after the change has passed through fully.
Copied from original issue: VirtualFlyBrain/geppetto-vfb#80

From @dosumis on October 24, 2017 14:27
Could be down balancer playing up.  Robbie to investigate further and document.

After latest unrelated fixes no longer present - Keeping an eye out for it again.


fix(callout): reorder the plugins to render latex on callout title

we should write test for this.
but for now.
latex as header.

toc here

anchor also works.
https://github.com/jackyzha0/quartz/assets/29749331/31455287-d17d-4606-9eea-f2ab0ea4e657

hmm but syntax highlighting broke !!


pycryptodome -> pycryptodomex; Crypto -> Cryptodome

pycryptodome is designed to be a drop-in replacement for pycrypto, however in some cases, pycryptodome is not fully compatible with pycrypto. I have ran in to one of these scenarios. My service has a third-party dependency which requires pycrypto, and pycryptodome is not able to replicate the functionality that this library requires.
pycryptodomex is the same as pycryptodome, however it doesn't function as a drop-in replacement and will not replace the Crypto class. More details about this exist here: https://pycryptodome.readthedocs.io/en/latest/src/installation.html

Hi @castrapel! I sorta figured this day would come eventually. Sorry to hear about the pycrypto dep, but thanks to you, at least pyjks won't be a blocker for others in your sitch. Thanks for the PR!

It's a good night to release software :) v19.0.0 is now up on PyPI!

Monday night is the best night for that! Thanks for the quick response!

Thanks Mahmoud for the fast follow-up on this
-Hossein


Attribute about model's tool use capability in model_info

In the current 'model_info' I'm missing a attribute that tells me that the model is capable of handling tool calls. One may check the template data for "$.Tools", which I find rather ugly. Therefore, I propose to add a an attribute like, e.g.:
general.supports_tool_calls: true

or similar attribute. If you plan to have different types of tool calls, or want to plan ahead for checking call compatibility you may want to add an attribute like:
general.tool_format: "1.0"

br,
Peter

https://github.com/ollama/ollama/issues/5794


1.20.2

Why does this PR include Cardinal Components?

Forget to elaborate this, sorry.
Without Cardinal Components, I was unable to build the mod.
It failed here. readFromNbt was not presented as well as whole Cardinal Components Base.
I think it happened because of this  comit in Trinkets mod.
Perhaps this problem could have been solved in a different way, but I wasn't able to.


fix staspay webhook for ln payment

Codecov Report

Merging #1148 (4e984ea) into main (28e35fb) will decrease coverage by 2.92%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main    #1148      +/-   ##
==========================================
- Coverage   51.64%   48.71%   -2.93%
==========================================
  Files         239      239
  Lines       13518    13518
==========================================
- Hits         6981     6585     -396
- Misses       6537     6933     +396

Impacted Files
Coverage Δ

lnbits/extensions/satspay/views.py
64.00% <0.00%> (ø)

lnbits/extensions/satspay/views_api.py
44.89% <ø> (+3.82%)
:arrow_up:

lnbits/extensions/satspay/tasks.py
44.11% <26.66%> (-10.89%)
:arrow_down:

lnbits/extensions/satspay/crud.py
27.77% <50.00%> (+0.50%)
:arrow_up:

lnbits/extensions/boltz/mempool.py
32.75% <0.00%> (-50.00%)
:arrow_down:

lnbits/extensions/boltz/crud.py
29.23% <0.00%> (-49.24%)
:arrow_down:

lnbits/extensions/boltz/utils.py
23.52% <0.00%> (-41.18%)
:arrow_down:

lnbits/extensions/boltz/boltz.py
17.91% <0.00%> (-39.31%)
:arrow_down:

lnbits/wallets/cln.py
19.00% <0.00%> (-29.76%)
:arrow_down:

lnbits/wallets/lndrest.py
17.09% <0.00%> (-29.06%)
:arrow_down:

... and 11 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Event handler and a config.json example in the readme

I did a little thing. Its been tested, just gotta add the message event yourself because i was too tired.

seems good to go


Content update

Add some extra status codes and images

Hi Long Pham,
Thank you for the contributions; these are really funny! 😂
Kind regards,
Peter

Hi Peter, It is my pleasure to contribute to such a cool and unique project. Stay well and keep up the good work 😉 !BRLong Pham Sent from Mail for Windows From: Peter WetherallSent: 06 February 2023 10:11To: pweth/status.pizzaCc: Long Pham; AuthorSubject: Re: [pweth/status.pizza] Content update (PR #4) Hi Long Pham,Thank you for the contributions; these are really funny! 😂Kind regards,Peter—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID<EMAIL_ADDRESS>
my bad btw :/ sent the message from an email


Reduce size of Token?

Token struct used in the parser is currently 48 bytes. This could be reduced to 40 bytes with a couple of reasonably small changes, or reduced to 32 bytes with more invasive changes.
Anatomy of a Token
Token is currently structured as:
// 48 bytes
pub struct Token<'a> {
  pub kind: Kind,             // 1 byte
  pub start: u32,             // 4 bytes
  pub end: u32,               // 4 bytes
  pub is_on_new_line: bool,   // 1 byte
  pub escaped: bool,          // 1 byte
  pub value: TokenValue<'a>,  // 32 bytes
  // padding for align 8      // 5 bytes
}

// 32 bytes
pub enum TokenValue<'a> {
  None,                       // 0 bytes
  Number(f64),                // 8 bytes
  BigInt(num_bigint::BigInt), // 32 bytes
  String(&'a str),            // 16 bytes
  RegExp(RegExp<'a>),         // 24 bytes
}

// 24 bytes
pub struct RegExp<'a> {
  pub pattern: &'a str,       // 16 bytes
  pub flags: RegExpFlags,     // 1 byte
}

Reducing the size
To reduce TokenValue to 24 bytes:
1. Box BigInt
BigInt is the largest variant of TokenValue enum. Replacing BigInt with Box<BigInt> would reduce that variant from 32 bytes to 8 bytes.
This would impose a cost of indirection when reading the value of TokenValue::BigInt, but BigInts are fairly rare in JS Code, so for most code this cost would be insignificant.
2. Remove RegExp variant
Move RegExpFlags into Token (using one of the 5 bytes currently used for padding).
Then all that remains in RegExp is a &str, which is identical to the String variant. So those 2 variants can be merged.
Result is:
// 40 bytes
pub struct Token<'a> {
  pub kind: Kind,                  // 1 byte
  pub start: u32,                  // 4 bytes
  pub end: u32,                    // 4 bytes
  pub is_on_new_line: bool,        // 1 byte
  pub escaped: bool,               // 1 byte
  pub regexp_flags: RegExpFlags,   // 1 byte
  pub value: TokenValue<'a>,       // 24 bytes
  // padding for align 8           // 4 bytes
}

// 24 bytes
pub enum TokenValue<'a> {
  // <discriminant>                // 8 bytes
  None,                            // 0 bytes
  Number(f64),                     // 8 bytes
  BigInt(Box<num_bigint::BigInt>), // 8 bytes
  String(&'a str),                 // 16 bytes
}

All the variants are now 16 bytes or less. The reason a discriminant is now required where it wasn't before is that the longest variant &'a str only has 1 niche which is insufficient to contain the discriminant. In current layout, BigInt has multiple niches, so Rust "smuggles" the discriminant in those niches.
Reducing TokenValue to 16 bytes
3. Remove the discriminant
The discriminant is not required, as it duplicates information which is already present in Token.kind. e.g. A Token with kind Ident always contains a string in value, whereas kind Number is associated with f64 in value.
So TokenValue could change from an enum to a union with no discriminant, saving a further 8 bytes.
TokenValue::as_number etc would become methods on Token, which read the kind field and return the requested value only if kind matches.
The difficulty is in producing a safe interface which doesn't allow setting incompatible kind and value pairs. Should be doable, but would require a lot of changes to the lexer.
Alternative + further optimization
Once new Atom is implemented (#1803), it will be 16 bytes and contain multiple niches, so if String(&'str) is replaced with String(Atom<'a>), that will also reduce TokenValue to 16 bytes without having to convert it to a union.
However, there's also an inefficiency around the use of TokenValue.
The parser is often doing things like this:
fn parse_literal_expression(&mut self) -> Result<Expression<'a>> {
  match self.cur_kind() {
    kind if kind.is_number() => {
      if self.cur_src().ends_with('n') {
        self.parse_literal_bigint().map(|literal| self.ast.literal_bigint_expression(literal))
      } else {
        self.parse_literal_number().map(|literal| self.ast.literal_number_expression(literal))
      }
    },
    // ...
  }
}

fn parse_literal_number(&mut self) -> Result<NumberLiteral<'a>> {
  let value = self.cur_token().value.as_number();
  // ...
}

parse_literal_expression branches on kind. Then in parse_literal_number, by calling value.as_number() it branches again on TokenKind's discriminant.
This is unnecessary - we already know value is a number, or we wouldn't be in parse_literal_number.
I'd imagine correct branch prediction removes most of the cost of the 2nd branch, but this is presumably a hot path.
Again, the difficultly is in finding a safe interface to express this.
Questions
Is any of this worthwhile? Would reducing the size of Token likely make a measurable impact on performance?
If so, how much work is it worth? Take the easy-ish gain of getting it down to 40 bytes, or go the whole hog to reach 32?

Love this investigation! I made various attempts to reduce the token size when I finished the lexer.

Is any of this worthwhile? Would reducing the size of Token likely make a measurable impact on performance?

Reducing the token size will have significant performance improvements. Less memory + better cpu cache.

If so, how much work is it worth? Take the easy-ish gain of getting it down to 40 bytes, or go the whole hog to reach 32?

We have a very easy performance measurement setup with codspeed, just make PRs and see their impacts.

To get started, let's try and box the bigint and regex variant, then merge in the Atom change.
To get aggressive, I also had the idea of making everything SoA (from the DoD talk https://vimeo.com/649009599), but unfortunately I don't have the time to experiment with such big changes.

I'll give you write access to the repo if you wish to take Oxc's performance to another level.

Thanks for your enthusiasm!
After I submitted this issue, I rethought and concluded it was probably a waste of time, and reducing the size of Token would make no significant difference.
I'm new to OXC's codebase, but from what I can see, the design means that only the tiny Kind is passed around to functions, and there's only a single Token in existence at any time, which doesn't move (well except for LexerCheckpoints when rewinding may be necessary, but presumably that's fairly uncommon).
So would be interested to know why you think it might have a significant impact.
But, like you say, the best way to find out is do it and look at the benchmarks. I'd like to finish Atom first, so can measure what difference that makes in isolation, without the knock-on effect of it reducing the size of Token, but will hopefully be able to try this out after.
Data-oriented design is not something I'd encountered before. Interesting. I'll watch that video when I get time.
PS Thanks for offer of write access. Really kind of you to have such faith! However, I have sadly little time for coding, so I think you might find my commitment lacking. Also, I'm pretty new to Rust, so I think it's better if others check my work. So I'd prefer if you don't mind to continue just tinkering and submit PRs.

Ah, I see now. next_token() does return a Token, and I guess that'll get called a lot, so reducing Token's size could make a difference.
Anyway, will try any make the changes above and see what benchmarks say.

I'm nerd sniped, rewatching the DoD video ... wish me luck this weekend.

Our token size would be 12 bytes if we remove the token value entirely.
Different from the zig parser:

lazy token values: this is going to be slightly slower for TypeScript's parser rewind, but the situations are rare.
getting the unescaped keyword, identifiers and strings: we can utilized the escaped value and derive things lazily. This is going to be hard one.

Making all the changes is going to be challenging, I'll plan them out.

I watched the Andrew Kelley video too. Fascinating stuff.
Something else occurred to me on this subject:
As I understand it, the flow between parser and lexer goes as follows:

Parser asks lexer for next token.
Lexer gets next token.
In some circumstances, lexer has to look ahead to disambiguate e.g. /* vs /=. But in the end, it makes a decision and ends up with a single token stored in lexer.current.token.
Lexer returns that token to the parser, and resets lexer.current.token, ready for next time.

My thinking is:
At any point in time in the parser, there's only a single token in play. So couldn't Lexer::next_token() return just Kind (1 byte), and then the parser gets whatever further info it needs about the token from lexer.current.token?
Lexer wouldn't reset lexer.current.token until start of the next call to next_token().
Result is that Tokens don't get passed around. The current token is always in the same place in memory, and it'll hopefully sit continuously in L1 cache. In that case, the size of Token is less important, as long as it's under 64 bytes.
I guess there are exceptions to this rule e.g. when parser receives the token ( as start of an expression. Is it a parenthesised expression or an arrow function? In such cases, it may need to retrieve many more tokens from the lexer before it can decide.
But I'd imagine that'd be the minority of cases. So maybe better to handle storing a backlog of ambiguous tokens in the parser as a special case, and preserve the advantage of "only one token in play at a time" in the general case.
I wonder if that might achieve some of the gains of a full-on DoD approach, without the massive overhaul of the codebase that it sounds like you're contemplating?
Does this make any sense? I'm not that familiar with OXC's parser yet, so I could be missing something really obvious.

At any point in time in the parser, there's only a single token in play.

This is untrue:
https://github.com/oxc-project/oxc/blob/24d209cdd44d0b54252ef69388ac024b5c829c77/crates/oxc_parser/src/lexer/mod.rs#L92

So couldn't Lexer::next_token() just return Kind

Theoretically yes, but parsing javascript is ridiculous, e.g.
ASI:
https://github.com/oxc-project/oxc/blob/24d209cdd44d0b54252ef69388ac024b5c829c77/crates/oxc_parser/src/cursor.rs#L145-L164
escaped keyword:
https://github.com/oxc-project/oxc/blob/24d209cdd44d0b54252ef69388ac024b5c829c77/crates/oxc_parser/src/cursor.rs#L92-L101

I'm heading to bed so just a brief-ish reply on 2 points:

This is untrue:
lookahead: VecDeque::with_capacity(4),

Ah yes, but that's in the lexer. My point was that the lexer only passes a single token back to the parser, and then that's the only token "in play" until next call to next_token() (probably with some exceptions which could be special-cased).
Well, at least that's if I understand how the parser works, which quite possibly I don't!

drop gets called on the token (because the token value's bigint has a drop)

Yes, I hadn't considered that. Removing the drop on Token and TokenValue would be a big improvement.
But... there's currently a memory leak due to BigInts in ASTs not getting dropped. Personally, I can't see a good way to solve that without replacing BigInt with an ArenaBigInt<'a> which stores its internal data in the arena (similar to replacing CompactString with Atom<'a>). If we go that way, the drop would disappear.
The other solution (which you suggested above) is to defer converting a slice of code to a BigInt until later, so TokenValue just contains a &str to represent a bigint. That'd also make TokenValue non-drop.
By the way, I wasn't trying to critique your planned approach. Just wanted to raise another option in case it's useful.

I woke up today, and suddenly the plan you outlined before clicked for me. It's genius!
Why optimize a structure, when you can remove it entirely?
I had missed the point before. If parsing a string/bigint/number/regex from a chunk of source code can be deferred until the AST node is being created, then all the info required to do that is kind, start, end, and a few flags.
As a side effect, that also removes the extraneous lookups of TokenValue's discriminant which I mentioned at top of this issue. That's another gain. Very nice indeed.
Apologies I completely missed the point before.
I do still wonder why it's necessary to copy Token to parser.token when Parser::cur_token() could just get it from parser.lexer.current.token. But that optimization is insignificant compared to what you're proposing.

https://github.com/oxc-project/oxc/pull/1924
https://github.com/oxc-project/oxc/pull/1926
https://github.com/oxc-project/oxc/pull/1945

We gain around 5 - 8% improvements from these 3 PRs, I'm now staring at TokenValue::String 😭

refactor(parser): remove TokenValue::BigInt from Token #1924
refactor(parser): remove TokenValue::RegExp from Token #1926
refactor(parser): remove TokenValue::Number from Token #1945

We gain around 5 - 8% improvements from these 3 PRs, I'm now staring at TokenValue::String 😭

We don't even need a TokenValue type, just use Option<&str> to represent the TokenValue::String is enough,
https://github.com/oxc-project/oxc/pull/1945/files#diff-1900da6e4d59908339755be451de7da17e7f4b3f62d9c412dbecd800dd2d6510R39-R42

refactor(parser): remove TokenValue::BigInt from Token #1924
refactor(parser): remove TokenValue::RegExp from Token #1926
refactor(parser): remove TokenValue::Number from Token #1945

We gain around 5 - 8% improvements from these 3 PRs, I'm now staring at TokenValue::String 😭

We don't even need a TokenValue type, just use Option<&str> to represent the TokenValue::String is enough, https://github.com/oxc-project/oxc/pull/1945/files#diff-1900da6e4d59908339755be451de7da17e7f4b3f62d9c412dbecd800dd2d6510R39-R42

The goal is to remove it from Token, Option<&str> is the same thing that doesn't affect anything.

Down to 16 bytes in #1962. I think we've strived for a balance between code complexity and performance. Shall resolve this issue?

Well this issue originally proposed reducing TokenValue down to 24 or 16 bytes, and you've got it down to 4. So I'd say this issue has been resolved!
The diff on #1962 is quite large, and I won't have time to go through it properly for a while.
So yes, feel free to close this issue, and if I can find an opportunity for further optimization later on, I'll open another one.
What was the grand total of the performance boost from all this work in the end? +15%?

https://codspeed.io/oxc-project/oxc/benchmarks/tasks/benchmark/benches/parser.rs::parser::bench_parser::parser[checker.ts]
Codspeed shows a reduction from 533 - 480, which is 11%.

Down to 12 bytes in https://github.com/oxc-project/oxc/pull/2010/files