Cryptic Error Loading Model

Error: HTTP Error (500): {"error":"invalid version"}

And in the terminal
Ollama server is running
Error: HTTP Error (500): {"error":"invalid version"}
    at Ollama.generate (/home/user/deepLearning/chatd/chatd-linux-x64/resources/app/src/service/ollama/ollama.js:286:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Ollama.run (/home/scott/deepLearning/chatd/chatd-linux-x64/resources/app/src/service/ollama/ollama.js:177:5)
    at async run (/home/user/deepLearning/chatd/chatd-linux-x64/resources/app/src/service/ollama/ollama.js:329:10)
    at async IpcMainImpl.runOllamaModel (/home/scott/deepLearning/chatd/chatd-linux-x64/resources/app/src/api.js:36:5)

It was solved by upgrading ollama with curl https://ollama.ai/install.sh | sh

Just posting for visibility, closing.

Thanks for documenting this.


Since 2.2.0 rollup build crash

Hey we are trying to use 2.2.0 but on our build we have the following error:
[!] Error: 'default' is not exported by node_modules/pako/index.js, imported by node_modules/jspdf/dist/jspdf.es.min.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/jspdf/dist/jspdf.es.min.js (49:10)
47:  *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
48:  *    kim3er, mfo, alnorth, Flamenco
49:  */import t from"pako";var e=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;}();function r(){e.console&&"function"==typeof e.console.log&&e.console.log.apply(e.console,arguments);}var n={log:r,warn:function(t){e.console&&("function"==typeof e.console.warn?e.console.warn.apply(e.console,arguments):r.call(null,arguments));},error:function(t){e.console&&("function"==typeof e.console.error?e.console.error.apply(e.console,arguments):r(t));}};/**
              ^
50:  * @license
51:  * FileSaver.js
Error: 'default' is not exported by node_modules/pako/index.js, imported by node_modules/jspdf/dist/jspdf.es.min.js
    at error (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:5215:30)
    at Module.error (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:9739:16)
    at handleMissingExport (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:9660:28)
    at Module.traceVariable (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:10130:24)
    at ModuleScope.findVariable (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:8692:39)
    at FunctionScope.findVariable (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:2762:38)
    at ChildScope.findVariable (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:2762:38)
    at FunctionScope.findVariable (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:2762:38)
    at ChildScope.findVariable (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:2762:38)
    at MemberExpression.bind (/Users/jrousseau/Documents/insight/frontend-monorepo/monorepo/node_modules/rollup/dist/shared/rollup.js:6396:49)

However pako seems to have a esm export (https://github.com/nodeca/pako/blob/master/dist/pako.esm.mjs).
No issue on 2.1.1.

Pako will be replaced with fflate in 2.3.0 which I'm just about to release ;) It probably makes sense to update before we spend time looking into this...

Pako will be replaced with fflate in 2.3.0 which I'm just about to release ;) It probably makes sense to update before we spend time looking into this...

great! I am waiting your 2.3.0 to test, thx

great! I am waiting your 2.3.0 to test, thx

It's out: https://github.com/MrRio/jsPDF/releases/tag/v2.3.0

It's out: https://github.com/MrRio/jsPDF/releases/tag/v2.3.0

And it works as expected, thx!!

And it works as expected, thx!!


OVDB-106: Add spare data support to OpenVDB operators

This PR adds a spare data mechanism to OP_Operators created with OpFactory.  I deliberately kept the API simple (we can extend it if the need arises, but multi-gigabyte spare data is already supported), and I have not included any ophide logic (I will file my pythonrc.py implementation as a separate PR).
To complement the C++ API, I've added HScript and Python functions to retrieve (but not set) spare data:
HScript
> opsparedata
opsparedata

    List spare data associated with an operator type.

    USAGE
      opsparedata <networktype> <opname> [<token>]

    When the token is omitted, all (token, value) pairs
    associated with the operator type are displayed.

    Currently, only operator types defined with OpenVDB's OpFactory
    can have spare data.  See www.openvdb.org for more information.

    EXAMPLES
      > opsparedata Sop DW_OpenVDBConvert
        lists all spare data associated with the Convert VDB SOP
      > opsparedata Sop DW_OpenVDBClip nativename
        displays the VDB Clip SOP's native name

> opsparedata Sop DW_OpenVDBClip
nativename vdbclip

> opsparedata Sop DW_OpenVDBClip nativename
vdbclip

> opsparedata Sop vdbclip

HOM
>>> help(hou.NodeType.spareData)
Help on method _spareData in module __main__:

_spareData(self, name) unbound hou.NodeType method
    spareData(name) -> str or None

    Return the spare data with the given name, or None
    if no data with that name is defined for this node type.

    Currently, only node types defined with OpenVDB's OpFactory
    can have spare data.  See www.openvdb.org for more information.

>>> help(hou.NodeType.spareDataDict)
Help on method _spareDataDict in module __main__:

_spareDataDict(self) unbound hou.NodeType method
    spareDataDict() -> dict of str to str

    Return a dictionary of the spare data for this node type.

    Currently, only node types defined with OpenVDB's OpFactory
    can have spare data.  See www.openvdb.org for more information.

>>> hou.nodeType('Sop/DW_OpenVDBClip').spareDataDict()
{'nativename': 'vdbclip'}

>>> hou.nodeType('Sop/DW_OpenVDBClip').spareData('nativename')
'vdbclip'

>>> hou.nodeType('Sop/vdbclip').spareDataDict()
{}

I think in general, this idea is good, but I do have a few concerns.
This introduces quite a bit of complexity in adding an hscript and a python accessor for this spare data. This also adds a Python dependency to the houdini_utils module that didn't previously have it. Would it be acceptable to consider adding just the hscript accessor for now and relying on using this from Python with hou.hscript() until we have a better idea of how useful/important a mechanism this is going to be?
As I understand it, spare data is both stored on each instance of the node and is serialized and deserialized with it, neither of which is desirable for native name. It can (and should) be re-generated on starting a Houdini session and it only needs to be stored once with the operator definition rather than on every node instance. I think the VDB version is a much better example of where this mechanism is needed as discussed here (#452), so perhaps we could start there?

This introduces quite a bit of complexity in adding an hscript and a python accessor for this spare data.

This PR adds fewer than 300 lines of code, including comments and documentation.  That's fewer lines than the solution proposed in PR #404, and this API is general-purpose, not specific to ophiding.  What complexity there is is in private code, not in the public API.

This also adds a Python dependency to the houdini_utils module that didn't previously have it.

This doesn't add any new library dependencies (the Python API used here is implemented in libHoudiniUT and libHoudiniPRM, AFAICT), and the header dependencies are on HDK and HBoost headers only, not on any libpython headers.

As I understand it, spare data is both stored on each instance of the node and is serialized and deserialized with it, neither of which is desirable for native name. It can (and should) be re-generated on starting a Houdini session and it only needs to be stored once with the operator definition rather than on every node instance.

The spare data is stored with OP_OperatorDW instances, not with node instances.  Nodes can access the data with getOperatorSpareData(*this->getOperator()).

This also adds a Python dependency to the houdini_utils module that didn't previously have it.

This doesn't add any new library dependencies (the Python API used here is implemented in libHoudiniUT and libHoudiniPRM, AFAICT), and the header dependencies are on HDK and HBoost headers only, not on any libpython headers.

I believe you're right regarding the libraries we would link against. It was really more a question of whether providing an implementation for both languages (HScript and Python) was essential from the perspective of the extra code maintenance and the new headers and classes we would pull in and have to adapt our code to if they change.
The right answer could be only offering the Python implementation, I don't know. It just seemed like a worthwhile question to ask considering how easy it is to access hscript functionality from python. In many cases SideFX doesn't even offer a Python implementation such as the oprename function you pointed out the other day.

This introduces quite a bit of complexity in adding an hscript and a python accessor for this spare data.

This PR adds fewer than 300 lines of code, including comments and documentation. That's fewer lines than the solution proposed in PR #404, and this API is general-purpose, not specific to ophiding. What complexity there is is in private code, not in the public API.

I wasn't comparing this to PR #404, that's very out-of-date now. I've closed that one and put in a new PR #464 to contain the much more lightweight implementation I'm now proposing.

As I understand it, spare data is both stored on each instance of the node and is serialized and deserialized with it, neither of which is desirable for native name. It can (and should) be re-generated on starting a Houdini session and it only needs to be stored once with the operator definition rather than on every node instance.

The spare data is stored with OP_OperatorDW instances, not with node instances. Nodes can access the data with getOperatorSpareData(*this->getOperator()).

I think where I'm confused is that my expectation was that to solve the VDB version issue we would need to store a version with each node instance and put that into the hip file. On re-opening we could override OP_Node::getVersion() to pull from spare data for each node instance and use syncNodeVersion to maintain previous behavior. I guess I'm still not clear how exactly this solves this problem if this data doesn't live with the node instance or indeed get serialized with the file? I'm going to experiment with this to better understand how we might use this to solve #452.

The spare data API doesn't solve the versioning problem on its own.  It solves the problem of communication between a node and its operator without introducing an OpenVDB dependency into houdini_utils.  Depending on when syncNodeVersion gets called during deserialization, that might not be sufficient.

@pcucka - are you waiting on any more feedback to merge this? I'm waiting for this to go in to be able to make updates to #452 and #464.


Add a license to the repository

I recently came across your project quantum-algorithms and I noticed that the repository github.com/dkomni/quantum-algorithms currently does not have a license specified.
Why Adding a License is Important?
As GitHub documents

Public repositories on GitHub are often used to share open source software. For your repository to truly be open source, you'll need to license it so that others are free to use, change, and distribute the software.

Would be possible to add a valid license to this repository? Probably something really OpenSource such as the Apache 2.0 license would fit really well.
Thanks!

Done!


Visual enhancements

1. Ability to change the overall theme of SuperPutty. Right now it's some blue
office like theme. Would be nice if you can choose between different manifests
(similar to puttycm, where you could choose between system/vs/office themes).

2. There's an extra raised border around all the putty session windows, can
that be removed? It just adds to visual clutter.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 8 May 2012 at 8:42

Closing this issue but all hope is not lost! We still want to help.
See: https://github.com/jimradford/superputty/wiki/Legacy-Imported-Issues on how to help us to help you!


Moving source code to src/pkg/app directory

Its just my opinion, but I think it will be much cleaner if you would take all the code that
is connected to the project itself and put it into an additional directory.
I have red that you want it to be as flat as possible, and it will be still flat, the code that matters, the way you implement DDD, all that is related somehow to the domain, application and infrastructure layers will all be in the same level as it is right now, but only inside another directory, separated from the other files that have a different purpose.
And then at the first level of the folder tree you would have the cmd directory, pkg (or src or app or whatever you want to call it) and all the other remaining files that are related to setting up the application itself, like docker files etc...

I'm on the fence on this, I'm not a huge fan of the pkg directory due to the extra level of indirection. Your arguments are valid though, so I would open this up for discussion.

mattermost Have a pretty neat app structure that follows DDD principles (I guess you can say that it also follows the clean architecture).
They have a model directory, it contains lots of file, that if would have been in the in the top level of the folder structure hierarchy would confuse you, and make you search for the README.md, or anything else that is related to the distribution of the project.
An even better name to what i proposed would be like in the project of Mattermost, to name the directory that holds all of the domain layer files, "model".
Descriptive name of what it contains and leave the first directory clean of confustion.


Mapper trait is not object safe

Reported in https://github.com/phil-opp/blog_os/issues/639.
The Mapper trait is not object safe because the map_to and identity_map methods are generic (prevents object safety since they can't be monomorphized).
To fix this, we could add Self: Sized bounds to the two methods, but I think this would make the methods not callable on a &dyn Mapper object. So maybe we should additionally add non-generic map_to_dyn/identity_map_dyn methods that take a &dyn mut FrameAllocator.

Fixed in #84


.hex file

Would it be possible to add a finished .hex file for download? For direct upload to MCU. Thanks

Good idea!
Added vgaterm.hex.


[FALSE-POSITIVE]

scoradar.pdf
Domains or links
Please list any domains and links listed here which you believe are a false positive.
https://disposableking.com.au
More Information
How did you discover your web site or domain was listed here?

Website was hacked
Incorrectly marked as Phishing on Phishtank or OpenPhish?
Answer: disposableking.com.au was hacked and we have run a scan with Anti-Malware Security and Brute-Force Firewall by Eli Scheetz and Security by CleanTalk Security and had the developer removed the malicious files.

Have you requested removal from other sources?
Please include all relevant links to your existing removals / whitelistings.
I have attached the screenshot from Scoradar stating the my website disposableking.com.au is free from Malware. https://github.com/user-attachments/files/18204454/scoradar.pdf
Additional context
Add any other context about the problem here.
I wish to get the whitelist of my domain asap as ISP is blocking my website access.
:exclamation:
We understand being listed on a Phishing Database like this can be frustrating and embarrassing for many web site owners. The first step is to remain calm. The second step is to rest assured one of our maintainers will address your issue as soon as possible. Please make sure you have provided as much information as possible to help speed up the process.
Send a Pull Request for faster removal
Users who understand github and creating Pull Requests can assist us with faster removals by sending a PR to mitchellkrogza/phishing repository, on the falsepositive.list file

https://github.com/mitchellkrogza/phishing/blob/main/falsepositive.list
Please include the same above information to help speed up the whitelisting process.

The URI provided do not look as a valid source or trust worthy source https://help.socradar.io/hc/requests/77324

hi @spirillen I have reported your encounter to Scoradar and please check the reply from them. I am able to go to the page you have listed above.
3280e328-7e26-46fd-857b-22e5744dc17c.pdf

Hello Team,
Your request (#77324) has been updated with the comment:
Dear Info team,
The following URL is secure and accessible only to you. Anyone outside will be unable to access the ticket you submitted.
As shown in the screenshots below, we have whitelisted your domain.
https://help.socradar.io/hc/requests/77324

Thank you for choosing SOCRadar.
Best Regards,
SOCRadar Enterprise Support
CTI Support Specialist
Please rate this ticket at anytime
Best Regards,
SOCRadar Team

Hello,
False Positive Reference #20241222538977
You receive this confirmation after your request for a URL that is a false positive.
We are pleased to inform you that the domain name "disposableking.com.au" have been removed from our database.
Thank you kindly note that the spread of the new corrected database may take some time (about 4 hours).
If you need to notify us of other domain names or if the application does not correspond to your expectations, thank you to send a request to https://threatcenter.crdf.fr/false_positive.html.
In any case, thank you kindly note that we take very seriously the reports that you send us the false positive and we thank you.
If you have any questions, please consult our FAQ accessible at the following address: https://threatcenter.crdf.fr/faq.html

Satisfied with our response? Feel free to leave us a feedback on:
https://threatcenter.crdf.fr/feedback.php?ref=67688f29973d78.07082079
Regards,
CRDF Labs,

Need to secure your infrastructure?
CRDF Labs offers data to help you anticipate threats via our Cyber Threat Intelligence and protect your organization.
To find out more: https://threatcenter.crdf.fr/private_access.html
Website: https://threatcenter.crdf.fr/
CRDF Labs contact : https://threatcenter.crdf.fr/contact.html
==== THIS MESSAGE HAS BEEN SENT AUTOMATICALLY.  May i know how long does it take to be removed from the Phishing Database?

removed from the Phishing Database

Yet again this question.... have been thinking of making a FAQ, but where.
Well the answer lies in GHA ⏫  ~ 2 hours, for VT you need to there for their cron job of importing.

Thanks for the information. Cheers


Use zen remote as dependency

Context
apply https://github.com/zigen-project/zen-remote/pull/7
Summary
apply https://github.com/zigen-project/zen-remote/pull/7
How to check behavior
Build it following the instruction at README

I intended to file this PR to immersive branch.


ratelimit: fix doc demo

Signed-off-by: hejianpeng<EMAIL_ADDRESS>part of https://github.com/envoyproxy/gateway/issues/857
cc @arkodg

Codecov Report

Merging #922 (c5aadda) into main (545702c) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #922      +/-   ##
==========================================
- Coverage   63.48%   63.44%   -0.05%
==========================================
  Files          53       53
  Lines        7476     7476
==========================================
- Hits         4746     4743       -3
- Misses       2431     2433       +2
- Partials      299      300       +1

Impacted Files
Coverage Δ

internal/provider/kubernetes/controller.go
46.74% <0.00%> (-0.39%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


ng update - Migration failed: Unexpected token  in JSON at position 0

Command
update
Is this a regression?

[ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
No response
Description
Command: ng update @angular/core@15 @angular/cli@15 @angular/material@15 --allow-dirty --verbose
Output:
Repository is not clean. Update changes will be mixed with pre-existing changes. Locating potential npmrc files: Trying 'C:\Users\alex.s\.npmrc'...found. The installed Angular CLI version is outdated. Installing a temporary Angular CLI versioned 15.2.10 to perform the update. ✔ Packages successfully installed. Repository is not clean. Update changes will be mixed with pre-existing changes. Using package manager: npm Collecting installed dependencies... Found 61 dependencies. NPM 7+ detected -- enabling force option for package installation Fetching dependency metadata from registry... Locating potential npmrc files: Trying 'C:\Users\user\.npmrc'...found. × Migration failed: Unexpected token  in JSON at position 0   See "C:\Users\user\AppData\Local\Temp\ng-bDvaNK\angular-errors.log" for further details.
[error] SyntaxError: Unexpected token  in JSON at position 0     at JSON.parse (<anonymous>)     at _buildPackageInfo (C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-sMhQUt\node_modules\@angular\cli\src\commands\update\schematic\index.js:430:30)     at C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-sMhQUt\node_modules\@angular\cli\src\commands\update\schematic\index.js:710:53     at Map.forEach (<anonymous>)     at C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-sMhQUt\node_modules\@angular\cli\src\commands\update\schematic\index.js:709:27     at runMicrotasks (<anonymous>)     at processTicksAndRejections (node:internal/process/task_queues:96:5)     at async callRuleAsync (C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-sMhQUt\node_modules\@angular-devkit\schematics\src\rules\call.js:78:18)
The issue happens because of some package's package.json file has encoding different from UTF-8. In my case that was a package with UTF-8 with BOM encoding.
Resolution
Find that package (possibly by trying all), open package.json file from that package in node_modules and re-save it with UTF-8.
Maybe it is fixed in future versions. Creating issue with resolution, so maybe it will help someone struggling
Minimal Reproduction

Assuming you have Angular 14 project
Add some package to you package.json with UTF-8 with BOM encoding package.json. Or modify some package.json manually in node_modules
run command ng update @angular/core@15 @angular/cli@15 @angular/material@15 --allow-dirty --verbose

Exception or Error
[error] SyntaxError: Unexpected token  in JSON at position 0
    at JSON.parse (<anonymous>)
    at _buildPackageInfo (C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-RIewm4\node_modules\@angular\cli\src\commands\update\schematic\index.js:430:30)
    at C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-RIewm4\node_modules\@angular\cli\src\commands\update\schematic\index.js:710:53
    at Map.forEach (<anonymous>)
    at C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-RIewm4\node_modules\@angular\cli\src\commands\update\schematic\index.js:709:27
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async callRuleAsync (C:\Users\alex.s\AppData\Local\Temp\angular-cli-packages-RIewm4\node_modules\@angular-devkit\schematics\src\rules\call.js:78:18)

Your Environment
Mine environment is below (but as this is update, it is using cli 15.2.10)

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 12.2.18
Node: 16.20.2 (Unsupported)
Package Manager: npm 8.19.4
OS: win32 x64

Angular: undefined
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1202.18 (cli-only)
@angular-devkit/core         12.2.18 (cli-only)
@angular-devkit/schematics   12.2.18 (cli-only)
@schematics/angular          12.2.18 (cli-only)

Anything else relevant?
No response

Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.
If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.


run_screening.py Script Fails with "IndexError: list index out of range" on Certain DEKOIS Targets

Description
While screening the DEKOIS set with the run_screening.py script, I encountered a recurring error that causes the screening to stop prematurely on approximately 15 target proteins. The error is as follows:
Traceback (most recent call last):
  File "/work/run_screening_origin.py", line 106, in <module>
    main(args)
  File "/work/run_screening_origin.py", line 79, in main
    docked_mol.append(outputs['mol_list'][0])
IndexError: list index out of range

Request for Assistance
I have reviewed the input molecules and found no apparent issues. Re-running the screenings for these specific target proteins consistently yields the same error. Could someone provide insights into what might be causing this IndexError? It seems that the outputs['mol_list'] might be empty, but I'm unsure why this would occur, especially since the inputs appear to be correct.
Any advice on how to resolve or debug this issue would be greatly appreciated.
Thank you!

Hi, there will be some ligands that fail in docking. They can be skipped.


[Spotify Player] Remove fetch limit from Your Library

Extension
https://www.raycast.com/mattisssa/spotify-player
Description
Remove the 50 item limit when fetching data from "Your Library" so it can search and load all the playlists and albums saved, and enable interaction with them directly from Raycast.
Who will benefit from this feature?
Every person with more than 50 playlists or items in each Library category.
Anything else?
No response

Duplicate of #7807

Thanks @erics118
For now it's a limitation as stated in #7807 but I do agree we should consider adding pagination. Will have a look


Changes made to 404.html and error.css pages

#3

Hi, am I supposed to do anything else to this repo now that my pull request has been accepted.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Niladri Mondal @.>
Sent: Tuesday, February 1, 2022 11:49:36 PM
To: imniladri/DevHub @.>
Cc: Lavanya Bisht[ECE - 2020] @.>; Mention @.>
Subject: Re: [imniladri/DevHub] Changes made to 404.html and error.css pages (PR #22)
@imniladri approved this pull request.
Good to go @Lavanyabisht11https://github.com/Lavanyabisht11
—
Reply to this email directly, view it on GitHubhttps://github.com/imniladri/DevHub/pull/22#pullrequestreview-869612895, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARQROCD7AYOVIS6E6Y2BXXTUZAP3RANCNFSM5NJ2P7PQ.
You are receiving this because you were mentioned.Message ID: @.***>

Hi, am I supposed to do anything else to this repo now that my pull request has been accepted.

No, you are good to go!


Error in js-examples/bucket-photo-gallery: "Unhandled Rejection (Error): API key not found or is invalid"

Hi,
Super cool project.  I was just trying to get a minimal app working with textile for a POC.  I wanted to test an app that is client-side only and saw that bucket-photo-gallery in the js-examples repo might fit the bill.  I'm get this error when running latest master (commit 86a7ed98):

Any ideas of what I might be doing wrong?

You need to setup a User Group key https://docs.textile.io/hub/apis/
And then update the app with a valid key for your account: https://github.com/textileio/js-examples/blob/master/bucket-photo-gallery/src/App.tsx#L19

Thanks @andrewxhill.  I replaced it with a new key I just created, but now get a different error:

I tried to do a PrivateKey.fromString() here https://github.com/textileio/js-examples/blob/72e4e506774def330501e61839e1ad62303d7200/bucket-photo-gallery/src/App.tsx#L82 with my private key thinking that may be the problem, but I still get the error.

Super! Let me know if you hit any other snags. I already pushed a small update to the root readme to help explain those two setup steps.


Link Border.Color to the RGB function

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

VBA/Excel-VBA/articles/border-color-property-excel.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

VBA/Excel-VBA/articles/border-color-property-excel.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

All content in this repository has been migrated to a new repository (https://github.com/MicrosoftDocs/VBA-Docs). The changes in this PR have been applied in the new repository (as part of pull request #61), so this PR is being closed. The changes will be published to the live docs soon. Thank you for your contribution!


Simplify resource management for iOS

Introduces a new task 'sync<FRAMEWORK_CLASSIFIER>ComposeIosResources', which collects resources from all source sets, included in iOS targets.
Now, CocoaPods integration does not require any configuration or calling 'pod install' after changing resources. * Important: existing projects need to remove 'extraSpecAttributes["resources"] = ...' from build scripts, and rerun ./gradlew podInstall once!
Regular static frameworks should also just work.
Regular dynamic frameworks were not tested.
Currently, the task only copies resources from the module, which exports the framework.
Resolves:

#3073
#3113
#3066

restructure sources in the way that resource management logic will be in a separate package


Component: Abode not loading

Error states import error: no module named urllib3.

Please complete the entire issue log.

Where do I find that?

When you create a new issue, it asks for lot of information. Provide all the details for someone to look at. Just saying no module named urllib3 is not enough and it sounds like it may not even be related to Abode.

You can find the logs in Developer Tools - Last Option i

Home Assistant release (hass --version):
0.54.0
Python release (python3 --version):
3.4
Component/platform:
Service MQTT.PUBLISH in automation
Description of problem:
Error during setup of Abode component
Problem-relevant configuration.yaml entries and steps to reproduce:
Traceback (if applicable):
2017-09-28 22:09:07 ERROR (MainThread) [homeassistant.setup] Error during setup of component abode
Traceback (most recent call last):
File "/srv/hass/lib/python3.4/site-packages/homeassistant/setup.py", line 194, in _async_setup_component
component.setup, hass, processed_config)
File "/usr/lib/python3.4/asyncio/futures.py",
line 385, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 288, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/hass/lib/python3.4/site-packages/homeassistant/components/abode.py", line 125, in setup
from abodepy.exceptions import
AbodeException
File "/srv/hass/lib/python3.4/site-packages/abodepy/init.py", line 37, in
from abodepy.event_controller import AbodeEventController
File "/srv/hass/lib/python3.4/site-packages/abodepy/event_controller.py", line 15, in
from urllib3.exceptions import HTTPError
ImportError: No module named 'urllib3'

Try manually installing pip install urllib3 inside the venv

That worked.


fix: cassandra-tool typo and missing method

Description
Follow up of https://github.com/run-llama/llama_index/pull/13423 with some fixes

I'm a bit confused as to why these methods were missing in the first place?

I guess @pmcfadin did a last-minute refactor but didn't update the usages


AWS Transcribe cost high

I've been playing with this work past few days, we've used it for demo 1-2 hours and got over 120 AUD. Is there anything that runs in the background?

could you help provide more details about the cost?  what's your media capture pipeline id?

Closing due to inactivity. @arunzeli feel free to re-open the issue if you have further questions.


[Bug]: Home Page

What happened?
I found a BUG 🐞
Home Page text and floating images overlap each other at approx. 740px of screen size
Add screenshots
Add screenshots
https://github.com/priyankarpal/ProjectsHut/assets/101205226/fc485f39-2ee9-4c74-98af-95265717fc43
What browsers are you seeing the problem on?
Chrome
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @priyankarpal i have created the same issue by mistake
This is the main issue #929

do you want to work on this issue?

do you want to work on this issue?

Yes

@parasss19 you can add keyframes and set the images with different screen sizes. great one feature!!

Completed. Thanks for your contributions 🎉 ❤


Multi chart legend selection

When I use a multi chart, with 1 line chart and 2 bar charts, it's not possible to disable the line chart with the legend : http://plnkr.co/edit/804FdTlS6xgeOUvDsrAT

Please, update to the latest versions, here your example.


Joblib example doesn't register dask's joblib

The joblib example here: http://ml.dask.org/joblib.html:
import numpy as np
from dask.distributed import Client

from sklearn.externals import joblib
from sklearn.datasets import load_digits
from sklearn.model_selection import RandomizedSearchCV
from sklearn.svm import SVC

client = Client(processes=False)             # create local cluster

digits = load_digits()

param_space = {
    'C': np.logspace(-6, 6, 13),
    'gamma': np.logspace(-8, 8, 17),
    'tol': np.logspace(-4, -1, 4),
    'class_weight': [None, 'balanced'],
}

model = SVC(kernel='rbf')
search = RandomizedSearchCV(model, param_space, cv=3, n_iter=50, verbose=10)

with joblib.parallel_backend('dask'):
    search.fit(digits.data, digits.target)

Fails with a KeyError from 'dask' not being registered. It needs:
import dask_ml.joblib  # registers joblib plugin

and the error does not occur. Is this correct? Can the example be updated?

This is no longer necessary as of sklearn 0.20
On Fri, Oct 12, 2018 at 1:47 PM Miles Cranmer<EMAIL_ADDRESS>wrote:

The joblib example here: http://ml.dask.org/joblib.html:
import numpy as np
from dask.distributed import Client
from sklearn.externals import joblib
from sklearn.datasets import load_digits
from sklearn.model_selection import RandomizedSearchCV
from sklearn.svm import SVC
client = Client(processes=False)             # create local cluster
digits = load_digits()
param_space = {
'C': np.logspace(-6, 6, 13),
'gamma': np.logspace(-8, 8, 17),
'tol': np.logspace(-4, -1, 4),
'class_weight': [None, 'balanced'],
}
model = SVC(kernel='rbf')
search = RandomizedSearchCV(model, param_space, cv=3, n_iter=50, verbose=10)
with joblib.parallel_backend('dask'):
search.fit(digits.data, digits.target)
Fails with a KeyError from 'dask' not being registered. It needs:
import dask_ml.joblib  # registers joblib plugin
and the error does not occur. Is this correct? Can the example be updated?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask-ml/issues/403, or mute the thread
https://github.com/notifications/unsubscribe-auth/AASszIZJ9EgMqBHGzfkJy36rCzpxz2zgks5ukNXOgaJpZM4XZ6X9
.

Thanks!


[BUG] can not monitor SSL certificates

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
I add one https website,then detect

it  ,and then show me "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
it's failed to monitor SSL certificate
Expected Behavior
it can monitor all SSL certificates
Steps To Reproduce
No response
Environment
HertzBeat version(s):

Debug logs
No response
Anything else?
No response

Hi would you mind providing the log file?If you start by source code, log file is located in logs dictionary

I have the same problem, this is my log file, please help me

这个问题依旧存在吗？ 我这边初次配置正常，快过期的时候，申请了证书给网站替换后，监控就开始报这个错了。我以为需要重启监控，但是重启完docker也没有效果。


use proper container names...

With out this change there are a few controller and eventing-controller containers...
so the deployment gets confused
part of that has been fixed in upstream:
https://github.com/knative/eventing/commit/40f0a540923eb858985e7c1df309e9d898dbbed1
/assign @aliok

/close


Added support for osx-arm64

Thanks for the contribution, @orrpan, but I plan to do this myself in a slightly different way. I will be updating some scripts/build steps at the same time I add support for arm64 (similar to this PR here: https://github.com/Azure/homebrew-functions/pull/96)
I'm just waiting to do that because I was working on signing arm64 binaries first. If we don't sign the binaries, any command you run will just silently fail

A comment about it here: https://github.com/Azure/azure-functions-core-tools/issues/2834#issuecomment-1102927470
A blog post about how Apple requires arm64 executables to be signed: https://eclecticlight.co/2020/08/22/apple-silicon-macs-will-require-signed-code/
My PR that was recently merged here (just hasn't been released yet): https://github.com/Azure/azure-functions-core-tools/pull/3033

Thanks for the contribution, @orrpan, but I plan to do this myself in a slightly different way. I will be updating some scripts/build steps at the same time I add support for arm64 (similar to this PR here: https://github.com/Azure/homebrew-functions/pull/96)
I'm just waiting to do that because I was working on signing arm64 binaries first. If we don't sign the binaries, any command you run will just silently fail

A comment about it here: https://github.com/Azure/azure-functions-core-tools/issues/2834#issuecomment-1102927470
A blog post about how Apple requires arm64 executables to be signed: https://eclecticlight.co/2020/08/22/apple-silicon-macs-will-require-signed-code/
My PR that was recently merged here (just hasn't been released yet): https://github.com/Azure/azure-functions-core-tools/pull/3033

Is there an ETA for this release?  Thanks!

Closing in favor of https://github.com/Azure/homebrew-functions/pull/103
In terms of ETA, we're just waiting for the next regularly scheduled release of core tools to pick up the signing changes. Should be in the next few weeks

Hi @orrpan @ahgraber just fyi we merged ARM support for brew in the other PR


Support null values for reset fields

Coverage decreased (-0.04%) to 56.836% when pulling 691974278b33d1d03a9cef1f28d126c9c8e69f79 on support-null-values-for-reset-fields into 8e1e4bf0b72ea64330ed2a5c75b23bd021a21ddd on master.


send message reports OK in spite of random SharedAccessKeyName and device id

Running the following on Mac using Docker:

OS and version used:  Ubuntu 16.04

Python runtime used:  3.5.2

SDK version used:  1.4.4

Description of the issue:
I have a problem in my application, messages from the cloud does not seem to reach my device. I ran iothub_messaging_sample.py as a base test. However, I don't understand what this script is supposed to test exactly. I send messages with IoTHubMessaging::send_async() and the send_complete_callback is called ("messagingResult : OK") for all messages, regardless of

value of SharedAccessKeyName inside the CONNECTION_STRING
value of the DEVICE_ID

i.e. I can put anything for these values. I'm surprised to get OK when putting a device id that doesn't exist. Is this expected?

With the Python v2 reaching General Availability we are recommending users move away from the v1 SDK.
We will be closing the v1 SDK issues whose features are covered by the v2 release.
Feel free to open an new issue if you find an issue with the v2 SDK.

Thank you for your patronage

@esidebo, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey


MySQL backend now uses decimal instead of numeric as data type for DecimalField

MySQL backend currently uses numeric as default type for DecimalField.
Even if the MySQL documentation says: "In MySQL, NUMERIC is implemented as DECIMAL, so the following remarks about DECIMAL apply equally to NUMERIC." this is not true at the moment (maybe because of a bug), so, some operations are not available for numeric type, eg: cast.
In Django trying to cast to a DecimalField, an error is raised:
from django.db.models import DecimalField
from django.db.models.functions import Cast
from myapp.models import MyModel

MyModel.objects.annotate(as_decimal=Cast('intfield', DecimalField(max_digits=8, decimal_places=2)))

[...]
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'numeric(8, 2)) AS `as_decimal` FROM `myapp_mymodel` LIMIT 21' at line 1")

I made this pull request in order to fix the cast to DecimalField in Django and because it seems there isn't a good reason to use numeric instead of decimal.

Thanks for the suggestion, however, this change is backwards incompatible considering that the type of existing fields won't be changed. You should raise the idea on the django-developers mailing list to see if there's consensus to make the change and if so, how to go about it.


Migrate tests to new testing framework

Solves https://github.com/napalm-automation/napalm-junos/issues/48

Coverage increased (+0.6%) to 84.964% when pulling c4691c09fe829ce358a63cbd2d7aabc856699be5 on mirceaulinic:NEW-TEST-FW into d92f07b51ef22bef8a2d18cce204c0fcc6926261 on napalm-automation:develop.

Coverage increased (+0.6%) to 84.964% when pulling e0de4840bdc75c0335fa208fa3f90d0757302fc9 on mirceaulinic:NEW-TEST-FW into d92f07b51ef22bef8a2d18cce204c0fcc6926261 on napalm-automation:develop.

+1


Allow jean85/pretty-package-versions 2.0 (backport of #1170)

@ste93cry @stayallive this is ready for review too!

@ste93cry @stayallive this is ready for review too!


FWI-4945 - Migrate from go-funk library to lo in insights-plugins repo

This PR fixes #
Checklist

[x] I have signed the CLA
[x] I have updated/added any relevant documentation

Description
For the sake of consistency and readability
Some of the plugins are still using go-funk, refactor to use https://github.com/samber/lo instead
plugins:
admission
opa
right-sizer
workloads

remove: github.com/thoas/go-funk
and use github.com/samber/lo
What's the goal of this PR?
Consistency within insights code when using functional programming libraries
What changes did you make?
Refactored code to use github.com/samber/lo instead of github.com/thoas/go-funk , where the former utilizes go generics
What alternative solution should we consider, if any?
Internal Ticket FWI-4945

Thanks, John! Not sure if we need a minor release for these changes, but I have no strong opinions.

I actually googled this, sounds like it could go either way: https://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api -- this falls more under "adding new functionality" I think since we are supporting generics, so I went with a minor bump

Ohh, yea, makes sense! :shipit:


refactor(MeasurementExplorer): dropdown items

Display some information in the dropdown (it uses the variable id, label and units).  The id is for avoiding confusion between variables with the same label (say both are "Transmittance").
But should we lowercase the label, uppercasing the first letter, or leave them as they appear in the files?
Before

After changes

Otherwise LGTM!

Codecov Report
Base: 89.13% // Head: 89.65% // Increases project coverage by +0.51% :tada:

Coverage data is based on head (6ab6e2c) compared to base (043abec).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #319      +/-   ##
==========================================
+ Coverage   89.13%   89.65%   +0.51%
==========================================
  Files          10       10
  Lines         856      860       +4
  Branches      129      133       +4
==========================================
+ Hits          763      771       +8
+ Misses         93       89       -4

Impacted Files
Coverage Δ

src/app/data/loaders/wdfLoader.ts
98.09% <0.00%> (+0.20%)
:arrow_up:

src/app/data/loaders/jcampLoader.ts
84.81% <0.00%> (+1.47%)
:arrow_up:

.../data/loaders/proprietary/agilent/cary500Loader.ts
100.00% <0.00%> (+2.81%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Since 1.68.0, opening a file no longer open the file dialog in the current opened file directory

Issue Type: Bug
Hello!
I'm using vscode for a long time (great job by the way!)
A greatly appreciated feature was that when I wanted to open a file (either from the menu or the Ctrl+o shortcut), the file dialog opened in the directory of the currently, already open, edited file.
Since 1.68.0, my file dialog open in the "recent files" section, with no possibility to go to "directory of the current edited file".
I'm using vscode 1.68.0 on Ubuntu 18.04.
Note: I downgraded to vscode 1.67.2, and I get the old expected behavior :)
To reproduce:

Update to 1.68.0
Start vscode
Open any file which is located in "/my/dir/any/where".
Use Ctrl-o or "open file" in menu
The file dialog is in "Recent files", not in "/my/dir/any/where"

This feature is very important when you work on big projects with many files opened. I don't want to go to my mouse, go to the explorer and then click on the file I want. Ctrl-o + completion is way more efficient :)
Thanks a lot, anyway !
Eric.
 Thanks! :)

You're welcome :)
I'm so accustomed to it that I had to downgrade to 1.67!
Le lun. 13 juin 2022 à 16:01, Orgad Shaneh @.***> a
écrit :

I was just about to report it, and found you already did. Thanks! :)
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/151945#issuecomment-1153954023,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADK5CNWDYTLO6CP3QOG437LVO45K7ANCNFSM5YUJVDMA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!

#151668

Sorry, unable to find the bug.


TO BE FAIR!

I'd originally written this to just watch for people sending "to be fair" (and only response 1/2 the time), change it to be a bang command for now.


Line style dashed

Hi,
Is it possible to have a dashed vertical line?
Thank you.

Duplicate of #14


Check if the input of ton global function is a valid number

This checked will solve the problem faced in  #113

I don't think it's necessary. If the number isn't valid, it throws an error during compilation which tells what exactly is wrong.

I don't think it's necessary. If the number isn't valid, it throws an error during compilation which tells what exactly is wrong.

You are right.
I have made another change hope you guys find it useful.

@mhbdev can you please explain what this change does?

@mhbdev can you please explain what this change does?

I decided to make this change to let the input contain separators like comma and underscore. So there would be no error using those separators to make your numbers more readable.

I decided to make this change to let the input contain separators like comma and underscore. So there would be no error using those separators to make your numbers more readable.

I'm not sure if it's correct to do that for in string literals. This needs clarification from @anton-trunov

Hey @mhbdev, thanks for the PR, however, I'm inclined to close it because it allows a bit too much freedom, like several commas in a row or leading or trailing commas, which would arguably allow for even less readable code. Hope this won't discourage you from future contribution.


Schematic for Combined Clocked Supply has error

Combined Clocked Supply calls for BAT54A, should be BAT54S according to schematic. The direction of the diodes is different, i think the 54S is the correct one.

you are right, I corrected it on the schematic, thank you for the hint


Client renderer random crashing with L-100 error on intel integrated graphics with 5th gen intel cpu

Describe the bug
Client crashes randomly with L-100 error. Tried Alpha, Beta and Stable via AppImage with several workarounds. Tried shadowcker too.
System

OS:  Ubuntu
OS Version: 20.04
Environment: KDE
Application: Appimage
Application Version: 5.0.632

Configuration

The user is in input group ? yes
The environment uses Xorg ? yes
VA API detects H264 ? And H265 ? yes

To Reproduce
Steps to reproduce the behavior:

Starting Shadow with allow_rgb10_configs=false LIBVA_DRIVER_NAME=iHD ./ShadowBeta.AppImage
Login and select display safe mode. Start Shadow and play your favourite game in non-fullscreen mode
Client crashed randomly with L-100 error code. Sometimes it just takes minutes and sometimes its running for hours without problems. I noticed it appears to crash more often during primetime, but i think thats just coincidence
After L-100 crash, start connection to shadow again.

Additional context
https://nicolasguilloux.eu/hostbin/1522024689
Crashes happen on h264 and on h265. I tried every setting possible, eg low-end config on, optimize streaming set to speed or reliability. CPU is Intel(R) Core(TM) i5-5300U with Intel Corporation HD Graphics 5500 . As its 5th gen intel cpu, i installed first installed only i965-va-driver, but it needs intel-media-va-driver-non-free too to even start. I tried both LIBVA_DRIVER_NAME=iHD and LIBVA_DRIVER_NAME=i965 .

FTR: im aware of
https://nicolasguilloux.github.io/blade-shadow-beta/setup
https://github.com/NicolasGuilloux/blade-shadow-beta/issues/52
https://github.com/NicolasGuilloux/blade-shadow-beta/issues/53
https://github.com/NicolasGuilloux/blade-shadow-beta/issues/62

As requested on discord my logs attached for one evening. If i recall correctly it crashed three times  within roughly 4 hours or so.
shadow-2020-07-05_20h-28m-09s.log

So i did some more testing with help from Alex on Discord:

running single screen only with fullscreen locked Appimage Beta does not help. Many L-100 crashes
running shadowcker beta dual screen NON fullscreen locked does also not help. Again many L-100 crashes

But running shadowcker beta with dualscreen setup and fullscreen locked reduces the number of L-100 crashes. I now only get crashes when disabling fullscreen lock to do something on my other screen. Its annoying but for the time being it works.
I run shadowcker with the following settings:
adding to docker-compose.yml:
         environment:
+            - LIBVA_DRIVER_NAME=i965

starting with:
make start && docker-compose logs -f


How to implement a PatternMaskingLayout for a LoggingEventCompositeJsonEncoder

Hi. I have the following problem. I'm using the LoggingEventCompositeJsonEncoder to generate JSON logs, but I found out that we have lots of confidential information that we want to filter out (basically just put *** in the corresponding key).
https://www.schibsted.pl/blog/logback-pattern-gdpr/
One idea here is to use this:
      <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
           <layout class="com.schibsted.payment.logback.PatternMaskingLayout">

However, this will not log everything nicely in JSON.
Is there a way to accomplish what I want?

One way to do this would be to wrap the default JsonGenerator used by logstash-logback-encoder into a custom MaskingJsonGenerator (which you would need to write).  The MaskingJsonGenerator could extend JsonGeneratorDelegate and inspect the keys/values being written, and when it detects sensitive keys/values, it could write **** to the delegate instead of passing the actual values.
You can plug your generator into logstash-logback-encoder by using a JsonGeneratorDecorator

Thanks! I think this would be useful for other people as well. Would you accept a PR that adds such a MaskingJsonGenerator?

Yes definitely!
And I'd love if the logic to detect what should be masked would be customizable.  And logstash-logback-encoder provided some detectors for standard use cases, I can think of three cases:

by field name, where if a field name in any object at any path matches a list of global field names to mask, then mask it
by sub path, where if the path of a field matches a list subpaths to mask, then mask it
by field value, where if a value matches a regex of values to mask

1 and 2 could potentially be combined if it's coded such that a single field name is just a subpath with one element.
Probably need to handle masking any type of field value (e.g. number fields, string fields, array fields, and object fields.)

Any update on this? I am running into a similar situation

I've written a simple version which worked for my specific needs. However, I don't feel like it's yet great. I might need some feedback from @phasebash.
The problem is that if I try to log some specific objects (for example, I wanted to log JSONObject s and JSONArrays. I ended up doing something like this in the writeObject method:
    } else if (JSONObject.class.isAssignableFrom(cls)) { // sub-class
      return sanitize((JSONObject) ob);
    } else if (JSONArray.class.isAssignableFrom(cls)) { // sub-class
      return sanitize((JSONArray) ob);

This is clearly not a generic use and you'll have to implement overloaded sanitize methods. I'm wondering what would be an alternative to this?

Also see https://github.com/tersesystems/terse-logback/tree/master/logback-censor/src/main/java/com/tersesystems/logback/censor

#378 is a work in progress for generic masking support.


Add deps file RH injection

Also appveyor is failing.

@pakrym I merged these changes with #732, that cool?

Yep.

Or let's just merge this if it works. You change would be smaller and don't have less related changes.


esbuild as peerDependency

Could esbuild be a peerDependency to allow for independent versioning by user of the plugin? At the moment it forces the user to use "latest" build.

Makes sense, I'll change that!


Error building projects using Govflow as dependency: migrate cli source code not found

When building a project using 0.0.18-alpha, I'm getting the following error:
#8 16.85 npm ERR! syscall chmod
#8 16.85 npm ERR! path /app/node_modules/@govflow/govflow/cli/migrate
#8 16.85 npm ERR! errno -2
#8 16.86 npm ERR! enoent ENOENT: no such file or directory, chmod '/app/node_modules/@govflow/govflow/cli/migrate'
#8 16.86 npm ERR! enoent This is related to npm not being able to find a file.
#8 16.86 npm ERR! enoent

*Not sure whether this is an issue with the Govflow project/package or there is some adaptation required on my project to support this

Relates to my comment here https://github.com/govflow/govflow/issues/36#issuecomment-999542612

current problem in 0.0.18-alpha may just be because of missing file extension

The issue is definitely in Gov Flow, fixing.

Should be resolved in https://github.com/govflow/govflow/commit/1318330c68b3f62e6697079498a7017cecb42018 but I will verify with a build from NPM (did verify locally with global install)

Fixed. npm run build in internal codebase with Gov Flow 0.0.19-alpha as a dependency, builds without errors.


Add DNS Block Bug - DNS Log page doesn't apply other inputs

On the "DNS Log" page. If you select the icon to create a block for that request. The client IP is auto populated, if you edit the "Client IP" field to nothing or "*" and add that block the client IP is still populated and the block is not applied to other devices.
This is not the case if you manually add a block on the "DNS Overrides" page, it defaults to * and applies to all device or can be set per client.

Thanks again for this, fix will be in the next release
https://github.com/spr-networks/super/commit/38288ffa6e882ffb18ade2f4d7c8ad562a21816e


Update CircleCI configuration for pushing to container registries

Towards https://github.com/giantswarm/roadmap/issues/2979
Context: announcement in #news-dev on Slack
This PR was created through automation by Team Honeybadger, to make sure that the container images built for this repository are available in the right registries.
For that, the CircleCI configuration is modified to use the new push-to-registries job instead of the old push-to-docker. This means that there is only one job for all registry pushes, and it simplifies the configuration by removing many parameters that are now set automatically or as defaults.
Notes

Since the PR is also changing the CircleCI job name to push-to-registries, the branch protection rules in this repository will likely require updating before the required checks can be green.
Dev images are sent to ACR (gsoci.azurecr.io) and Quay currently. If you need dev images elsewhere, you can add the according configuration as described in the documentation to the step configuration.

To the responsible team
Please,

[ ] Assign this PR to yourself
[ ] Verify that the check ci/circleci: push-to-registries has been executed successfully.
[ ] Double-check the job dependecies (requires)
[ ] Double-check the job filters. Especially if this PR replaces several jobs with one, and the previous jobs had different filters, make sure that the filter includes all cases.
[ ] Update the changelog if you think this deserves a mention
[ ] Approve and merge this PR once it's ready. No need to wait for the author in this case.

Please get this done until December 5, so that we can move on with the next migration steps. Thank you!

@giantswarm/team-bigmac @ssyno Looks this is ready. Can we merge this?


Implement let_chains.

Instead of a separate if_let_expression construct, we make
if_expression hold multiple conditions, each of which can be a
let_condition. This also applies to while let and match pattern
guards.

Overall, I really like the way you did this, and I'd like to merge it, since I know this feature is stabilizing.
My only worry is that with this change, the && operator will sometimes be parsed as the operator in a binary_expression, and sometimes (when at the top level of a condition) it will not be parsed that way.
It seems possible to address this (by introducing a new binary_expression-like rule whose operands can also be let_conditions), but I'm not sure if it's worth the complexity. Just wanted to raise the issue to see what you think.
/cc @jorendorff - I'm curious about your opinion on the best way to model this.

Some tests to include:
if foo && bar {} - however this is parsed, a test is wise
if foo && bar || baz {} - this one is tricky; it has to parse as binary expressions
if foo && let bar = || baz && quux {} - apparently closures always extend as far as possible, regardless of whatever else is going on; this parses as if foo && let bar = (|| baz && quux) {}.
if a && let b = || c || d && e {} for good measure, maybe? Again, the closure extends all the way to the {.

OK, how to model this...
I like how this PR models the non-chaining case if let P = E {}. It produces (if_expression condition: (let_condition)) and that is great.
Now take if ok && let Some(v) = x && p(v) {} as an example.

This PR models this using multiple condition: named children. That's an unfamiliar pattern to me; I don't think the Rust grammar can produce multiple named children with the same name anywhere else. Maybe that's normal in tree-sitter; I don't know. Here are two alternatives I like better.

Treat the let condition as an expression that's an operand of &&:
(if_expression condition: (binary_expression (identifier)
  (binary_expression (let_condition) (call_expression))) ...)

That would be all right. This is what the Rust compiler does.
However, for building scopes using tree-sitter it might be bad. There'd be two very different rules for scoping and-expressions, and it's not possible to query for "a binary_expression but only if any operand (even nested!) is a let_condition". So a third option:

Parse it as: (if_expression condition: (let_chain (identifier) (let_condition) (call_expression))).

The `(let_chain)` node would appear only when the condition contains both `let` and `&&`. In the absence of `let`, `&&` would continue to parse as a `(binary_expression)`.

I would like this best. It's clear and easy to query and use. I just don't know if it's implementable.

I know this feature is ~stabilizing~ stable.

It'll be stable in 1.64 which is the next release. We've got about a month.

if foo && bar || baz {} - this one is tricky; it has to parse as binary expressions

Good point. This is not handled correctly right now.

Yeah, I like the let_chain idea. I think ideally, you'd still create a binary_expression node wherever possible.
So for this code:
if a && b let Some(c) = d && e && f {
}

You'd get a tree like:
(if_expression
  condition: (let_chain
    (binary_expression ...)
    (let_condition ...)
    (binary_expression ...))
  body: (block))

It seems doable. @goffrie Are you up for exploring that direction?

Treat the let condition as an expression that's an operand of &&

So I really wanted to avoid allowing "let expressions" in arbitrary places, because they are not really allowed in Rust except in very specific places (you aren't even allowed to put parens around one). But having a separate construct for && in a condition creates ambiguity that I'm not sure tree-sitter's precedence rules are powerful enough to resolve. (Not that I have any experience with tree-sitter at all, mind you...)
So I'm tempted to just put let conditions into the expression grammar. Which as you noted, is basically how rustc's parser works anyway. (It also emits a parse-time error in some cases, such as if a || let b = c - but not all of them, e.g. if a && let b = c || d because it doesn't realize the let-expression is nested until after it's been created.)

if a && b let Some(c) = d && e && f {
}

(if_expression
  condition: (let_chain
    (binary_expression ...)
    (let_condition ...)
    (binary_expression ...))
  body: (block))

Feasibility aside, I don't think I agree with this parse tree. It implies that e && f is a sub-expression, but that's not actually the case since && is left-associative.
Also, I have no idea how this might be implemented :)

Feasibility aside, I don't think I agree with this parse tree. It implies that e && f is a sub-expression, but that's not actually the case since && is left-associative.

Are you saying you wouldn't have the binary expression nodes at all, and a, b, eandfwould all be direct children of thelet_chain`?

I think the only consistent parse tree would be one of:
(let_chain
  (let_chain
    (let_chain
      (binary_expression (identifier) (identifier))
      (let_condition ...))
    (identifier))
  (identifier))

(let_chain
  (identifier)
  (identifier)
  (let_condition ...)
  (identifier)
  (identifier))

I think the only consistent parse tree would be...

I don't think we should use the first parse tree, because it makes it much harder to find all of the patterns (which are important because they introduce new bindings).
I would be ok with the second parse tree. But I still think the parse tree that I suggested previously would be even better. Why not parse e && f as a binary expression? That sub-expression (e && f) is evaluated exactly like a normal binary expression, as long as the preceding conditions in the chain succeed, right?

That's only correct insofar as && happens to be associative (in the mathematical sense) - from a syntactic point of view, a && b && c && d && e && f should be parsed like ((((a && b) && c) && d) && e) && f, no? Which doesn't include e && f as a subtree anywhere.
Putting it another way: today, in the source if a && b && c && d && e && f { ... }, the parent node of e is a && b && c && d && e. But under your proposal, if I changed the source to if a && b let Some(c) = d && e && f, e's parent would be e && f instead. Which would be pretty mysterious, e.g. if using the tree for "expand selection" in an editor.

Yeah, either way (your 2nd proposal or my proposal), the tree would change somewhat when adding a let_condition.
With my proposal, the hierarchy of the binary expressions would change, because you've introduced a let_condition, which binds more tightly a binary expression. With your proposal, all binary expressions would be completely removed, flattening the entire tree of binary expressions expression tree.

Having said that, I'm fine with doing whichever is simpler from an implementation perspective.

I implemented my version of the proposal (flattened structure) using dynamic precedence. I'm not at all sure if this is a "good idea", but the idea is that we prefer to parse the condition as just a regular expression (which can't have a let-condition in it), or a single let_condition, but if it has nested lets inside of a && it becomes a let_chain node instead (which can have any number of children).
I think all the precedence rules are roughly right now, at least for correct code. Unfortunately, now if let a = b && c || d is accepted when it should not be. It parses as if (let a = b) && (c || d), which is wrong - the correct parse is if ((let a = b) && c) || d, which is then rejected.

Am i missing something? It seem like the behavior of 'expand selection' would be much more consistent if you kept the binary expressions under the let chain, as opposed to removing them all.

You are correct. For this use case the "nested let_chain" parse would be the most consistent, though (as it would expand the selection to the left, instead of to the right); but I agree with you that it's less practical for other uses.
Anyhow, I actually have no idea how to implement your proposal also 😄

It seem like the behavior of 'expand selection' would be much more consistent if you kept the binary expressions under the let chain, as opposed to removing them all.

Oh, I disagree. This would seem super weird to me, as a user. The way you'd typically see this construct formatted is like
    if first_variable_name.is_pretty_long()
        && second_variable.nothing_to_sneeze_at_either()
        && let Some(cfg) = the_config_record_if_any
        && cfg.enable_rambutans
        && cfg.enable_arugula
    {
        ...
    }

These should be treated as siblings, imho. I don't think a peculiar nesting will end up having more intuitive behavior in practice, and I think there's some minor risk in picking an interpretation that's so different from how the Rust team thinks of the feature.

The way you'd typically see this construct formatted is like

That's the same way that you format nested binary expressions though, and they are structured as a left-associative tree:
    if first_variable_name.is_pretty_long()
        && second_variable.nothing_to_sneeze_at_either()
        && the_config_record_if_any.is_some()
        && cfg.enable_rambutans
        && cfg.enable_arugula
    {
       //  ...
    }

I think there's some minor risk in picking an interpretation that's so different from how the Rust team thinks of the feature.

I agree with that, but I thought it was an argument in favor of keeping the binary expressions. Doesn't rustc parse these things as binary expressions? I thought that's what you were saying in your earlier comment.

I agree with that, but I thought it was an argument in favor of keeping the binary expressions. Doesn't rustc parse these things as binary expressions? I thought that's what you were saying in your earlier comment.

I'm really sorry for letting this sit for a month. I didn't know it was my turn. Fortunately we got a short reprieve, since the feature was bumped back to unstable due to bugs.
Rustc uses binary trees, but I worry more about how Rust programmers think about the structure of the code, because (1) we should ideally match what's already in people's brains, and (2) if our AST is idiosyncratic, future evolution of the language is a hazard. Left-associative binary trees vs. vectors in particular seems like a total implementation detail to me; parsers tend to use these almost interchangeably, even within a parser (including rustc_parse).
Taking up the example again, here's what I think about the possible parses:

Vector-like, (let_chain EXPR1 EXPR2 DECL3 EXPR4 EXPR5). This is best. We already use repeat for many things in the grammar, including block syntax, the only other place where let appears! As in blocks, each declaration would be in scope for later siblings.

Left-associative binary tree, (let_chain (let_chain (let_chain (let_chain EXPR1 EXPR2) DECL3) EXPR4) EXPR5). I can live with this, but look at how the scope nesting is the opposite of the tree structure. Deeper-nested nodes are in less-nested scopes. Weird, right? (A right-associative tree would have the opposite nesting, but nothing in the grammar is actually right-associative, so I think people would rightly find that astonishing.)

Integrated with expression syntax, (binary_expr && (binary_expr && (binary_expr && (binary_expr && EXPR1 EXPR2) (let_expr DECL3)) EXPR4) EXPR5). This is most like what rustc does. However, I think a departure from rustc here is consistent with existing departures elsewhere, espcially as let_expr would be invalid almost everywhere expressions are allowed. Also my earlier comment applies here:

for building scopes using tree-sitter it might be bad. There'd be two very different rules for scoping and-expressions, and it's not possible to query for "a binary_expression but only if any operand (even nested!) is a let_condition".

Mixed, maximizing the number of binary_expression nodes. (let_chain (binary && EXPR1 EXPR2) DECL3 (binary && EXPR4 EXPR5)). This is what I understand you to be proposing. To me this is the least desirable option. The AST structure it produces is more complex than a flat vector or left-associative tree, but the extra information doesn't carry any useful meaning. It suggests && has two different precedence levels.

here's what I think about the possible parses:

Yeah, for me, the choice is between 1 (a flat sequence of expressions and let bindings, delimited by &&) or 4 (the same, but still allowing the list to contain binary expressions with && as the operator in the list). I have a slight preference for 4, because there would be more consistency between the following two syntax trees:
if a
    && b
    && c
    && d {
    body()
}

if let P(x) = a
    && b
    && c
    && d {
    body()
}

With option 1, the addition of one "let condition" changes the structure of the entire if condition. With option 4, it leaves more of the structure intact. So IDE features like extend selection will work more consistently with option 4 than they will with option 1. Just to clarify @jorendorff - do you agree that this is a benefit of option 4 over option 1? I'm not claiming that this one benefit trumps all other concerns, but I'm not totally clear on whether you're acknowledging this aspect of the tradeoff.

The AST structure it produces is more complex than a flat vector or left-associative tree, but the extra information doesn't carry any useful meaning. It suggests && has two different precedence levels.

I agree with you about the two different precedence levels of &&. Both option 1 and option 4 have this drawback - that && now has two different meanings. The only way to prevent this would be to choose option 3, and always parse && as the operator in a binary expression.
The argument about the "complexity" of the AST is a bit unclear to me. The way that I'd assess the complexity is by thinking from the perspective of writing code (or queries) to consume this syntax tree. From the lense, I don't think that option 4 increases the complexity of that code at all, compared to option 1. Any code that's analyzing a let_chain already needs to be able to handle the existence of binary_expression nodes within the chain. So I don't think there's any complexity increase due to allowing these binary expressions to have && as an operator.
TLDR, for me the decision between options 1 and 4 comes down to:

option 1
option 4

'extend selection' in editors
:-1: less consistent
:+1: more consistent

code analysis
:+1: straightforward to locate pattern bindings
:+1: also straightforward

&& operator
:-1: two distinct meanings
:-1: also two meanings

implementation status
:+1: is already implemented in this PR
❓  has not been tried

Apologies all day for how long this is...

IDE features like extend selection will work more consistently with option 4 than they will with option 1. Just to clarify @jorendorff - do you agree that this is a benefit of option 4 over option 1?

I agree consistency of IDE behavior is as important a consideration as any other use case. I don't know anything about this IDE feature, so I'm liable to make mistakes trying to reason about it. But here goes.

Most chains will be short, like if let X = Y && Z which should behave the same under option 1 and option 4.

Same deal for longer conditions, when one of the let-declarations is selected.

I think the feature is already unpredictable for users. Suppose you're looking at if a && b && c { } and the current selection is c. "Expand selection" then selects the whole condition, right? As a user, even understanding why it's like that, I would find it weird that the behavior is different for c as opposed to a or b.

But wait: if we replace a with a let-declaration, then under option 4, it would expand from c to b && c instead? Then it's option 1 that is more consistent in this case!

Consider the behavior option 4 creates in a case with lots of siblings. The selection would first expand to the left, across multiple operands, all the way to the preceding let; then one operand at a time to the right, until the next let is reached; then to the whole condition in one go. It's self-inconsistent.

The argument about the "complexity" of the AST is a bit unclear to me. The way that I'd assess the complexity is by thinking from the perspective of writing code (or queries) to consume this syntax tree. From the lense, I don't think that option 4 increases the complexity of that code at all, compared to option 1.

...into deep nerd territory...
One fairly rigorous way to understand "complexity" is in terms of information conveyed to a human when they read the output. That argument goes like this:

A flat vector is one common way to represent a variable-length sequence of siblings as tree-sitter nodes. A left-associative binary tree is another.
These are by far the most common patterns. People can identify and understand them on sight.
Anything else has higher information content to a person consuming the AST. There is more there to think about. It is by an information-theoretic definition more complex.

There's something subtle going on here where a human user has to look at a small number of examples and infer the behavior of the tool, and that is work for the human. (Maybe I am wrong that this is how normal people learn what kind of output tree-sitter produces, but personally I do this a lot!) They may end up writing exactly the same code to consume either construct, as you say, but they'll have extra bits in their brain afterwards if we choose the offbeat one. Expensive bits!
Another way is the Kolmogorov complexity of the output: how well does it compress? The flatter AST would be shorter compressed (or uncompressed, come to think of it).
I hesitated before writing "complexity" because, you know, it's pretty subjective. But I think it's correct here.

Ok, well thanks for taking the time to make that argument.
Overall, I do agree with your points about complexity. I still don't really agree about the 'extend selection' issue, but that's ok. The current structure is implemented well, and there are very reasonable arguments that it is the best structure.
@goffrie, I spent a little time removing the conflicts that were added here. FWIW, the way that I avoided the local ambiguities with binary_expression was to restructure let_chain as a left-associative binary tree internally. I hid the left-associative inner nodes, so that from the user's perspective, a let_chain still looks like a flat list.


When target is not present, static target throws an error whereas target.find don't

Usure if it is an issue or a suggestion of improvements
I love using the static target definition and then call this.mytargetTarget.doSomething.
They are cases where the target are not always visible in the DOM.
Initially I had a function like this
if (this.targets.find("foo")) {
    console.log("if there is a foo target then do something with it");
}

This is working fine but wanted to fully update my code to use Stimulus static targets
  static targets = ["foo"]

  ...
  if (this.fooTarget) {
    console.log("if there is a foo target then do something with it");
  }
  ...

but with this last code I get the following error when the footarget is not available in the DOM
Error connecting controller

Error: Missing target element "myController.foo"

I thought it would be nice to get a false return from this.fooTarget so that we could use it to test presence or not of elements in the same way it is working with this.targets.find("foo")

This is by design. You can use this.hasFooTarget to see whether there’s a foo target in scope. See the Handbook for more details.

Thanks, I clearly overlooked this method, sorry about that

No problem!


Fix styling in the debugger when #wantsAnnotationPane preference is on

Also apply the same change to BPBrowser to make it more robust.
This is how the Babylonian debugger looked before this patch:

Pull Request Test Coverage Report for Build 956611883

0 of 8 (0.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.1%) to 64.26%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/Babylonian-UI.package/BPBrowser.class/instance/buildCodePaneWith..st
0
4
0.0%

packages/Babylonian-UI.package/BPDebugger.class/instance/buildCodePaneWith..st
0
4
0.0%

Totals

Change from base Build 925521120:
0.1%

Covered Lines:
4824

Relevant Lines:
7507

💛  - Coveralls

Overall coverage increased (+0.1%) to 64.26%

Haha, every small deduplication can be worthwhile. 😄


OSError: Unable to open file (unable to open file: name = 'D:/G/WORK/MODEL_OP/TfLearn.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

I am trying to save the model in hdf5 or h5 format, but I am getting error. I Have tried to install and upgrade packages but still getting same error again and again.
Tried all solutions available in google, git, etc.
with h5py.File(filepath, mode='r') as f:
File "C:\Users\admin\Anaconda3\envs\gss1\lib\site-packages\h5py_hl\files.py", line 312, in init
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "C:\Users\admin\Anaconda3\envs\gss1\lib\site-packages\h5py_hl\files.py", line 142, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 78, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = 'D:/G/WORK/MODEL_OP/TfLearn.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Please help me to solve this problem.
Thanks in advance

I get the same error and I am interested in how to deal with it
Thank you!

me too

This happens to me too. Has anyone solved this yet?
I noticed this error happening lately, it didn't happen before. My .h5 files used to load normally. I think it has to do with the hdf5 or h5 version or something.
Still trying to figure it out as I need to load the weights.

me too

me too

I did it when I change the model file (xx.h5) into another disk directory(not local disk, C:/)

Just to registred here I was able to bypass the error by using the variable HDF5_USE_FILE_LOCKING='FALSE' from the command line.


Feedback, some ideas for improvements

So far I am really liking this library, well done!
However, there is one thing that is kind of bugging me: making the request structs gets tedious, and takes quite a lot of lines of code.
struct LoginTokenRequest: JsonRequest {
  private struct Payload: Encodable {
    let email: String
    let password: String
  }

  typealias Result = Token

  let email: String
  let password: String

  var method: HttpMethod = .post
  var routes: HttpRoute = ["auth", "tokens"]

  var body: HttpBody {
    HttpData.Json(Payload(email: email, password: password))
  }
}

Now imagine having tens of requests - this gets so long so fast.
A few observations.
It's a bit annoying that the HttpData.Json payload needs to be an Encodable thing. This causes the need for one-off payload structs, and repeated code to copy the properties over. On the other hand, HttpQuery can be created using a simple dictionary. Is it an idea to add an initializer that takes a dictionary instead of an Encodable struct/object? That way we could get rid of the Payload struct in my example. Turning a dict into Data is simple enough of course.
Or... could LoginTokenRequest itself be the payload? It has the email and password properties after all, so in theory it could be the payload? 🤔 Like, any properties on the request will be sent as body payload. Not sure if that's a terrible idea haha.
Another thing that could work to reduce the code is if JsonRequest wasn't a protocol but a Struct - that way you could simply create them using an initializer, have them in an enum, whatever.
I tried to implement something like that myself, but the typealias Result is making me hit roadblocks:
struct CoreRequest<Result: Decodable>: JsonRequest {
  var method: HttpMethod
  var routes: HttpRoute
  var body: HttpBody
}

enum Requests {
  case getLoginToken(email: String, password: String)

  var request: CoreRequest {
    switch self {
    case .getLoginToken(let email, let password):
      return CoreRequest<Token>(method: .post, routes: ["auth", "tokens"], body: HttpData.Json(payload))
    }
  }
}

As you can see, having 10 or 20 requests like this vs the "normal" method of one struct per request would save a LOT of repeating typing. But sadly this doesn't work since there's the generic type requirement. I would love to get this to work though. See also https://github.com/gonzalezreal/SimpleNetworking for inspiration.
Very curious about your thoughts and I'd be happy to brainstorm some ideas, test any of them, etc.

Okay, this works:
struct CoreRequest<Result: Decodable>: JsonRequest {
  var method: HttpMethod
  var routes: HttpRoute
  var body: HttpBody
}

private struct LoginTokenPayload: Encodable {
  let email: String
  let password: String
}

extension CoreRequest {
  static func getLoginToken(email: String, password: String) -> CoreRequest<Token> {
    return CoreRequest<Token>(method: .post, routes: ["auth", "tokens"], body: HttpData.Json(LoginTokenPayload(email: email, password: password)))
  }
}

But that LoginTokenPayload is still quite annoying and causes so much repeated code of setting email and password over and over.
But the main thing it solves is that creating another request is now a lot simpler: less lines, and auto-completion works a lot nicer too.

And also created this extension to create payload directly using a dictionary:
extension HttpData {
  public struct Dictionary: HttpBody {
    private let value: [String: Any]

    public init(_ value: [String: Any]) {
      self.value = value
    }

    public func add(to request: inout URLRequest) throws {
      request.addValue(
        HttpMimeType.json.rawValue, forHTTPHeaderField: "Content-Type"
      )
      let jsonData = try JSONSerialization.data(withJSONObject: value, options: .prettyPrinted)
      request.httpBody = jsonData
    }
  }
}

I think with that I solved all the major problems I had, without needing a single library change :)

Happy to get so much feedback from you ;) some comments:

HttpData.Json requires an Encodable, however, Dictionary is also Encodable, so you can just pass a dictionary to its initializer. Similarly, nothing prevents you from letting a Request itself conform to Encodable and then pass self to the initializer of HttpData.Json. Depending on your preference, you can thus easily get rid of your Payload struct.
As a result, I don't really see the need for something like HttpData.Dictionary. In this instance it would also not be obvious which protocol to use for encoding (i.e. whether we would use JSON or something else).
There is something very similar to your CoreRequest in Squid: AnyRequest lets you create requests directly. If you go for your Requests enum, you could just replace the return value CoreRequest by some Request (I'm not sure if you're familiar with the some keyword - essentially, it lets you return a protocol with associated types, see https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md). Nonetheless, I would prefer the static method on some singleton class.

As a quick summary of my comments, you make take a look at the following code:
enum Requests {

    case getLoginToken(email: String, password: String)

    var request: some Request {
        switch self {
        case .getLoginToken(let email, let password):
            return AnyRequest(
                .post,
                url: "myapi.example.com/auth/tokens",
                body: HttpData.Json(["email": email, "password": password])
            )
        }
    }
}

Thanks for the comments! I missed AnyRequest while going through the docs, but now that I found it, I don't think I'll use it.

This request fixes the result type to Data such that the user can decode to the desired type via calling the decode(type:decoder:) function on the returned Response publisher when scheduling the request.

Also, having to give it a full url instead of a route is not so great for my use case. I think my CoreRequest does solve my problems just a little bit better - for my use case.

however, Dictionary is also Encodable

🤯 Okay, I didn't know that one yet haha
And yeah I am also preferring static methods over an enum. Enum just causes duplication for no real win (unless you want to go the Moya route where you have to give params, headers, urls etc etc separately).

Hm sadly I am still running into issues. I am guessing this is why you have AnyRequest have a fixed result type.
let request = CoreRequest.getLoginToken(email: email, password: password)
// error: Generic parameter 'Result' could not be inferred

Which seems weird to me, since it's right there?
static func getLoginToken(email: String, password: String) -> CoreRequest<Token> {
  return CoreRequest<Token>(method: .post, routes: ["auth", "tokens"], body: HttpData.Json(["email": email, "password": password]))
}

I know this isn't a bug with your library or even a feature request, so feel free to just close and shut down this GH issue :)

The last bug you described is a "problem" with Swift - since you're calling a static function on a generic type (aka CoreRequest), you have to give the generic parameter when calling the static function, i.e.:
let request = CoreRequest<Token>.whatever()

Obviously, this defeats the purpose, so in your case, I would suggest to just create some "singleton" class (maybe RequestFactory?) and define static methods returning CoreRequest instances on that type.


Error occurred when executing KSampler: calculate_weight() got an unexpected keyword argument 'intermediate_dtype'

I'm getting a new error,how do i fix it?

Fixed by https://github.com/huchenlei/ComfyUI-IC-Light-Native/pull/43


Tracking issue for making region size dynamic

RFC: https://github.com/tikv/rfcs/pull/82
Summary:
Make the size of a region dynamic, and only set a upper limit.
This is the first step that we try to support PB scale cluster.
Tasks:

[x] https://github.com/tikv/pd/issues/4428
[x] PD schedules well on both size balance and load balance.
[x] #11759
[x] https://github.com/tikv/tikv/issues/11718
[x] PD uses buckets to do hotspot split and deprecated TiKV local hotspot split
[x] #11976
[ ] Warming up in pretransfer leader
[x] #11579
[x] Lightening/BR presplit reconfiguration based on the new size
[x] #11595
[ ] (Optional) more efficient snapshot generation and apply

The feature is expected to be disabled by default when release as it may bring extra replication cost in current architecture.
The task item may change as the proposal is not approved yet.

Can these tasks be closed?