Invalid coordinates for geocoding

Hi
Can someone explain why I'm getting the python error 'invalid coordinates for geo-referencing' please?
I'm using an easting/northing such as  293427, 91642. The error message is below.
i'm using OSM Tools 3.1 in QGIS 3.0.2
Thanks in advance for any help.
David
An error has occurred while executing Python code:
ValueError: Your input coordinates are invalid for geocoding.
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
raise err
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
chunked=chunked)
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn
conn.connect()
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\connection.py", line 284, in connect
conn = self._new_conn()
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\requests\adapters.py", line 440, in send
timeout=timeout
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\urllib3\util\retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openrouteservice.org', port=443): Max retries exceeded with url: /geocoding?location=298938.05073099415%2C92780.57010551741&api_key=58d904a497c67e00015b45fc8bbc42b08cd34a23a92f5f00a69e3383 (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/lewisd/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\geocode.py", line 17, in reverse_geocode
response = client.request('/geocoding', params)['features'][0]
File "C:/Users/lewisd/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\client.py", line 148, in request
**final_requests_kwargs)
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\requests\sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\requests\sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\requests\sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\requests\adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.openrouteservice.org', port=443): Max retries exceeded with url: /geocoding?location=298938.05073099415%2C92780.57010551741&api_key=58d904a497c67e00015b45fc8bbc42b08cd34a23a92f5f00a69e3383 (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/lewisd/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\dialog.py", line 284, in _writeCoordinateLabel
point)
File "C:/Users/lewisd/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\geocode.py", line 19, in reverse_geocode
raise ValueError("Your input coordinates are invalid for geocoding.")
ValueError: Your input coordinates are invalid for geocoding.
Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)]
QGIS version: 3.0.2-Girona Girona, 307d082e3d
Python Path:
C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python
C:/Users/lewisd/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/lewisd/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.0\bin\python36.zip
C:\PROGRA~1\QGIS3~1.0\apps\Python36\DLLs
C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib
C:\Program Files\QGIS 3.0\bin
C:\PROGRA~1\QGIS3~1.0\apps\Python36
C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages
C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages\Pythonwin
C:/Users/lewisd/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\lewisd\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
C:\Users\lewisd\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins
N:/Delivery - Contracting and BI/Information/Urgent Care/QGIS/Projects/MIU attendances

From experience, I always use WGS 84 as this (and many other plugins done seem to work with other CRS - also ensure all CRS are matching and unload google maps if thats loaded in too.

Hi, really sorry about this! I had an old geocoding endpoint in there which we deprecated a few days/weeks ago.. It's fixed now though in master (QGIS v3.x) and branch v2.1 (QGIS v2.x). Hope that helps...
It's uploaded to the plugin repo, should be approved by tmrw.

Oh and you can use whatever CRS (or any CRS QgsCoordinateReferenceSystem knows of). Since a few releases, I actually implemented a datum transformator..

Thankyou Nils, much appreciated
David Lewis
Senior Information Specialist,
Finance, Contracting and Business Intelligence
NHS Northern, Eastern and Western Devon Clinical Commissioning Group
Direct Dial: 01392 675326| Email: david.lewis6<EMAIL_ADDRESS>NEW Devon CCG | 2nd Floor Main Building|County Hall |Topsham Road | Exeter |EX2 4QL
[Description: Description: NHS2]
Healthy people, living healthy lives, in healthy communities
From: Nils<EMAIL_ADDRESS>Sent: 03 July 2018 22:59
To: nilsnolde/OSMtools
Cc: LEWIS, David (NHS NORTHERN, EASTERN AND WESTERN DEVON CCG); Author
Subject: Re: [nilsnolde/OSMtools] Invalid coordinates for geocoding (#59)
Oh and you can use whatever CRS (or any CRS QgsCoordinateReferenceSystem knows of). Since a few releases, I actually implemented a datum transformator..
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/nilsnolde/OSMtools/issues/59#issuecomment-402304292, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AlcRML8wb7UT24w33LkzKH-OZNQpKW8Cks5uC-k4gaJpZM4UTSDf.

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in relation to its contents. To do so is strictly prohibited and may be unlawful. Thank you for your co-operation.
NHSmail is the secure email and directory service available for all NHS staff in England and Scotland. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.
For more information and to find out how you can switch, https://portal.nhs.net/help/joiningnhsmail

Hi,
I'm new to QGIS learning my ways around. Found the nice routing tool in OSM Tools. It worked a couple times last week but failed with the following message since yesterday. I used "Routing", "foot-hiking", "shortest", picked both "Start Location(s)" and "End Location(s)", "From Map" with "Map Coordinates" both on/by a trail.  Based on the discussion, it seems the problem has been resolved with the new release, but I'm using Rev 3.1.1. Any help is appreciated.

An error has occurred while executing Python code:
ValueError: Your input coordinates are invalid for geocoding.
Traceback (most recent call last):
File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\geocode.py", line 18, in reverse_geocode
response = client.request('/geocode/reverse', params)['features'][0]
File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\client.py", line 164, in request
result = self._get_body(response)
File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\client.py", line 196, in _get_body
error['message'])
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\osm_tools.py", line 145, in run
route.directions_calc()
File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\directions.py", line 88, in directions_calc
route_dict = self._selectInput()
File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\directions.py", line 235, in _selectInput
response_dict = geocode.reverse_geocode(self.client, *point_geom)
File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OSMtools\geocode.py", line 20, in reverse_geocode
raise ValueError("Your input coordinates are invalid for geocoding.")
ValueError: Your input coordinates are invalid for geocoding.
Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
QGIS version: 3.2.3-Bonn Bonn, 9b176802e5

I tried the same routing using the online service at https://maps.openrouteservice.org/. It works w/o any issue. I noticed the X, Y coordinate are reserved as compared to my QGIS project. The code (part of the plug-in) nilsnolde wrote shown at [https://github.com/nilsnolde/OSMtools/blob/master/geocode.py] is related to this. Checked the CRS and didn't seem to be the problem. What can cause this? Thanks.

Hi,
yes, we have a problem currently with our geocoding endpoints..  Specifically the /reverse endpoint. And OSM Tools is querying that in the background to extract info about city, street etc and map that to fields in the routing layer.
I'm really busy right now to fix that, so I can't take care of a hotfix for OSM tools right now. But it likely takes a couple of days. You can disable querying the reverse endpoint here. Likely have to alter a bit more code, but shouldn't be much.
In case, you can temporarily fix it, pls provide a PR on a new branch.
Thx

BTW, it only happens for the 'Map' button, routing from files should work. Although there's another bug, see workaround here

I really need to fix this tool...

@Blueridgesg, now it seems to work half the time.. Still not entirely resolved though. But if you try often enough, it will work after the 2nd or 3rd attempt..

@nilsnolde, thank you for the prompt reply. I tried playing with it today and it works (now), probably intermittent as you mentioned. I was using the Map Coordinates mode. Didn't seem to have luck using the From Layer mode. I created a simple shapfile layer, with Type set to Point. I added Name field on top of the default id field. Added a couple points on a trail to it, each with an unique name. I then use the From Layer mode. Selected the layer, picked Name from "Select Unique ID field" - What does this selection do? How is it related to selecting the From and To points? Upon hitting the confirm button the plugin runs w/o any error nor did it create the route like it does using the Map Coordinates mode. Thanks a again for your work.

@Blueridgesg our servers recovered 2 days ago. So you shouldn't have any problem now..
'Select Unique ID' doesn't do much I think. Not sure anymore, but I believe I copy all properties from the original file anyways, so not necessarily a need for a uid field. Like I said, didn't look into this in ages. But I will before the end of the year:)
See this workraound for file layers (it's always worth to look through older issues BTW, esp. the ones with workarounds): #47

@nilsnolde thank you for looking into this. It works now.
I actually read the workaround at #47 but couldn’t figure out how “select the features” in the layer(s) works. I have a Point layer (shapfile) with a “Name” field. Two points are in this layer with “origin” and “desti” as the Name. How do I use the From Layer mode to route from origin to desti? Thanks.

Should be fixed now. Proper transformation of CRS != 4326.


support for partial session creation via API

Allows the creation of partial sessions via the API

Codecov Report

Merging #33 (eafe4c1) into prep-release (5ad2206) will decrease coverage by 0.81%.
The diff coverage is 0.00%.

@@               Coverage Diff                @@
##           prep-release      #33      +/-   ##
================================================
- Coverage         27.88%   27.07%   -0.82%
================================================
  Files                56       56
  Lines              2973     3062      +89
================================================
  Hits                829      829
- Misses             2144     2233      +89

Impacted Files
Coverage Δ

src/django_peerctl/rest/serializers/peerctl.py
0.00% <0.00%> (ø)

src/django_peerctl/rest/views/peerctl.py
0.00% <0.00%> (ø)

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


[dxvk] Add (debug) suffix to debug builds in HUD

I think it looks cool

"looks cool" isn't really a good justification for code bloat to be honest. Is people accidentally using debug builds even an issue in practice, given that neither Lutris nor Proton ship them?


Update readme

Ha, you're cracking me up, @hinerm! Thanks!

As if I can resist a documentation opportunity!


try … catch

try-catch construction usually affect performance. I’m not familiar with libphonenumber, but is any way to get rid off this?

Unfortunately, I don't know the right way to do this.
libphonenumber if not passing validation number makes throws.


Combine single selection and multi-selection methods

As single selection can be considered as a special cases of the multi-selection,
some methods and variables of single selection and multi-selection can be combined.
More specifically, with this change, we

Replace DataView::selected_index_ by using one index in DataView::selected_indices_;
Replace DataView::GetSelectedIndex by returning an empty or single-valued vector with DataView::GetVisibleSelectedIndices;
Update the DataView::OnSelect method to support both single selection and multi-selection and so remove DataView::OnMultiSelect method;
Replace OnRowSelected(std::optional<int> row) and OnMultiRowsSelected(const std::vector<int>& rows) by
OnRowsSelected(const std::vector<int>& rows) in both OrbitTreeView and OrbitTableModel.

Bug: http://b/177814945.
Test: Check the selection, sorting and filtering behaviors in Live tab and Sampling tab, it should be same with the previous version.

Hi Florian and Pierric, thanks for reviewing this PR :-)
As this change is closely related to my previous PR on multi-selection, I think you would be more familiar with this part. I suggest to review it commit by commit. Thanks again!


ux(client/apple): phrasing in App Store looks odd

The sentences that start with a verb look out of place in the App Store.

Noted, will keep this in mind for the next release.


crictl segfaults on fedora-30

crictl v1.14.0 segfaults on Fedora 30
Installed using these instructions.
system info:
uname -a
Linux 5.0.9-301.fc30.x86_64 #1 SMP Tue Apr 23 23:57:35 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

crictl --help
Segmentation fault

building from src works.


Updated CRS

Changed the Preflabels to the code, e.g. GDA2020.
This is so the drop-down labels show the code, not the long name.

I think an anti-pattern has been introduced here! It's fine - preferable even - to have well-known short codes for the URIs and, if those codes need to be matched for drop-downs and so on, they should be in notation fields (as they are) and perhaps even altLabels for test search matching, but I don't think prefLabels should be based on short codes, even if well known. I do think prefLabels should be the written out titles of the items, so "Geocentric Datum of Australia 2020", rather than "GDA202". This is in keeping with the idea that SKOS has all these facilities for codes and that the prefLabel should be unambiguous fully spelled-out terms, not contractions etc.
For example, if GDA2020 has an "international CRS ID" of ABC that is used for GDA202 in some systems, it would be better that the Concept is called (prefLabel) "Geocentric Datum of Australia 2020" and has notations "GDA202" & "ABC" with the notation datatypes indicating the notation supplier source (the authority).

As per my previous comment higher up: it is sensible to use DGA202 etc. in the ID part of Concept's URIs though as these are stable and unambiguous and short.

Good conversation. I think that the preflabel is still GDA2020 etc. The skos:definition is the full "Geocentric Datum of Australia 2020". People refer to the concept as GDA2020.
The notation could better be the EPSG code (SRID) than a duplicate of the preflabel.


CI: remove used rules from mergify config file

Removed unused rules from the mergify config file.

@mergifyio rebase


Some ideas relating to the procedural generation of visual elements associated with notes/concepts

Greetings!
This looks like a really cool project! Thanks for making it open-source from the get-go!
I just wanted to share a few ideas relating to the possible application of viz/proc-gen, discussed briefly with @rufuspollock.
Basic thoughts:

It could be useful to associate each note (or topic/entity in an eventually knowledgebase implementation) with some visual element.
In addition to just making for a (potentially) more fun and playful experience, persistent visualizations associated with commonly-considered ideas can be a helpful way to reinforce the memory.
2d/3d procedural generation could be used to generate such visual entities. three.js is great for both of these.
If one can divide notes up into meaningful semantic groups (e.g. via clustering of document embeddings), then a color could be assigned to each semantic group and used for the procedurally-generated elements.
There are different types of visual elements one could imagine generating (e.g. trees, planets, etc.), but, given the theme of this tool, a good candidate might be to procedurally generate flowers and other plants as part of a garden.

ex. [here]((this ) (not procedurally-generated afaik, but a pretty reference example)

One could further imagine "growing" plants/flowers in the garden in proportion to the amount of activity the note/topic gets.

Some of these ideas might not be relevant at all to your goals, but it's something to consider, perhaps. :tulip:
Keep up the great work!
Keith

@khughitt welcome, thanks for posting!
Really like this idea.

It could be useful to associate each note (or topic/entity in an eventually knowledgebase implementation) with some visual element.

Great idea. Would this be an emoji or image or something else. Would it be auto-generated? (You mention that further down).
I really like the idea of autogenerating plants in some way 😄
🌹 🌷 🥀 💐


Would you please tell me if I use bert base model each fold could be run within 12 hours on a tpu v. 2?
Also, would you please tell me at the end of each fold your implementation generates test data scores? If so, which fold has the best results?
Thanks in advance,
Kind Regards

hi, yes it's less than 12 hours for each fold. The scores are written in the output directory. the final result is the average of 5 folds.

Excuse me, I mean after running each fold (not at the end of running all 5 fold) I have a rank list like https://zenodo.org/record/3974431/files/robust04.PARADE.runs.tar.gz for test set?

you can set a small number of training steps and see the output......

You are right but unfortunately, I could not find training step parameter to set. Would you please guide me where it is?
(I just set # of epoch to 1 instead of 36)


Add more types and improve API version management

Description
This PR does two main things:

Improve the API version management (ie: how and when we fetch Mangadex's API)
Add more types

Improved version management
See #2
Now, the current version on Mangadex won't be fetched upon simply requiring the package. One can simply check what the version is by doing the following:
Mangadex::Api::Context.version
=> "5.3.1"

More types
More sorbet types were added for:

Mangadex::Api::Context
Mangadex::Api::User
Mangadex::Api::Version
Mangadex::Auth

Bump version to <IP_ADDRESS>


Measures logging

make measure log files machine readable, skip updated and deleted measures

 [TARIFF17] Improve importer with additional debugging information to test imports


 Will try to update and see if I'm able to build.

Updating MacOS did fix the issue, thank you for the help! 👍


Moderation Extension: Clean Command

yeah, sometimes we need a little bit of cleaning.
Proposed

[x] Basic Functionality
[x] pass args on which to clean (Guild Admin only command, for example k.clean bots would clean anything bots, additing an additional integer for example k.clean bots 10 would clean the most recent 10 messages from bots)

Name it purge or prune because I plan on implementing bot only purging and calling it clean. Also you can pull and adapt this from knife-bot if you wish.

that would require tedious amounts of refactoring though

Milestone Done. Closing


optparse duplication

require "optparse"

opt = OptionParser.new
opt.def_option(/^[^-]/) {}

begin
  opt.parse(["-t"])
rescue OptionParser::InvalidOption
  p $!.args
end

I'm not sure what the issue here is. Both Ruby and prism outputs ["-t"] for me.

@peterzhu2118 really? Ruby outputs ["-t"] for me and prism outputs ["-t", "-t"]

This works for me on ruby/ruby@731367d0ab.

I found a minimum repro:
calls = []
begin
  begin
  rescue RuntimeError
    calls << 1
  else
    calls << 2
    raise RuntimeError
  end
rescue RuntimeError
end

calls

It should output [2] but outputs [2, 1].


[Bug?]: Build without SSR throw error on prerender  "Should be provided by compiler"

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
When building with ssr: false, I get the error "Should be provided by compiler".
Doesn't generate a .html anywhere
Expected behavior 🤔
generate a .html file that serves as an entry point like a conventional SPA
Steps to reproduce 🕹
Steps:

npm init solid@latest
choose: Which template do you want to use?  = basic
choose: Server Side Rendering? = no
choose: Use TypeScript? = yes
npm install
npm run build

package.json:
{   "name": "demo1",   "type": "module",   "scripts": {     "dev": "vinxi dev",     "build": "vinxi build",     "start": "vinxi start"   },   "dependencies": {     "@solidjs/meta": "^0.29.2",     "@solidjs/router": "^0.10.5",     "@solidjs/start": "^0.4.2",     "solid-js": "^1.8.7",     "vinxi": "0.0.59"   },   "engines": {     "node": ">=18"   } }
Context 🔦
Generate a simple SPA that I can upload as static site. I use SolidStart because of the file based routing.
Your environment 🌎
System:
  OS: Linux KDE Neon | Kernel 6.6.1-060601-generic
  Arquitecture: x86_64
Node Version: v18.17.1
SolidStart version: 0.4.2

I found a similar issue in vinxi, maybe helpful.
"Should be provided by compiler" Error #77

It is solve using "override" in the package.json to match de vinxi version in the dependencies. In mi case I am using vinxi 0.0.62.
{
  "dependencies": {
    "@solidjs/meta": "^0.29.2",
    "@solidjs/router": "^0.10.5",
    "@solidjs/start": "^0.4.2",
    "solid-js": "^1.8.7",
    "vinxi": "0.0.62"
  },
  "overrides": {
    "vinxi": "0.0.62"
  },
}

Ok new version of Start now matching ranges in Vinxi should fix this. Try 0.4.3


Upgrade etcd to 3.5.0

Fix the crash bug of test using race flag

bbolt has been upgraded to v1.3.6, the crash issue resolved.


Make exercises and solutions for 04

Done, see the resources here:

Video walkthrough on YouTube - https://youtu.be/vsFMF9wqWx0
Exercise template notebook - https://github.com/mrdbourke/pytorch-deep-learning/blob/main/extras/exercises/04_pytorch_custom_datasets_exercises.ipynb
Exercise solutions notebook - https://github.com/mrdbourke/pytorch-deep-learning/blob/main/extras/solutions/04_pytorch_custom_datasets_exercise_solutions.ipynb


Secure cookies

Currently Golf stores cookies explicitly. Let's create a secure cookie method Context.SecureCookie & Context.SetSecureCookie to allow encrypting the cookies using a symmetric key.
Before using the secure cookie, the user should set a secret_token, which will be used as the symmetric encryption key in the app configuration.

We can refer to Tornado's implementation:
https://github.com/tornadoweb/tornado/blob/b6998247702a960f0c73004a6b5f8ae775607c03/tornado/web.py#L570

Can i use this framework on my Getgolfstore website? Like on wordpress?


[pcl[surface-no-nurbs]] build failure

Operating system
Windows11
Compiler
MSVC vc143
Steps to reproduce the behavior
vcpkg install  pcl[apps,cuda,openni2,qt,simulation,surface-on-nurbs,tools,visualization,vtk]
Failure logs
Installing 1/1<EMAIL_ADDRESS>Building<EMAIL_ADDRESS>-- Using cached PointCloudLibrary-pcl-pcl-1.14.1.tar.gz.
-- Extracting source C:/Users/user/opt/vcpkg/downloads/PointCloudLibrary-pcl-pcl-1.14.1.tar.gz
-- Applying patch add-gcc-version-check.patch
-- Applying patch fix-check-sse.patch
-- Applying patch fix-numeric-literals-flag.patch
-- Applying patch install-layout.patch
-- Applying patch install-examples.patch
-- Applying patch fix-clang-cl.patch
-- Applying patch gh-5985-inline.patch
-- Applying patch io_ply.patch
-- Using source at C:/Users/user/opt/vcpkg/buildtrees/pcl/src/pcl-1.14.1-9b54503ead.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
Command failed: C:/Users/user/scoop/apps/cmake/3.30.5/bin/cmake.exe --build . --config Release --target install -- -v -j13
Working Directory: C:/Users/user/opt/vcpkg/buildtrees/pcl/x64-windows-rel
See logs for more information:
C:\Users\user\opt\vcpkg\buildtrees\pcl\install-x64-windows-rel-out.log
Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
ports/pcl/portfile.cmake:77 (vcpkg_cmake_install)
scripts/ports.cmake:192 (include)
Additional context
install-x64-windows-rel-out.log

Not a port bug.
C:\Users\user\opt\vcpkg\buildtrees\pcl\src\pcl-1.14.1-9b54503ead.clean\surface\src\3rdparty\opennurbs\opennurbs_lookup.cpp(675) : fatal error C1001: Internal compiler error.
(compiler file 'D:\a\_work\1\s\src\vctools\Compiler\Utc\src\p2\main.c', line 247)
 To work around this problem, try simplifying or changing the program near the locations listed above.
If possible please provide a repro here: https://developercommunity.visualstudio.com
Please choose the Technical Support command on the Visual C++
 Help menu, or open the Technical Support help file for more information
  cl!RaiseException()+0x6c
  cl!RaiseException()+0x6c
  cl!InvokeCompilerPass()+0x25f
  cl!InvokeCompilerPassW()+0x14607b
  cl!CloseTypeServerPDB()+0x209c9
  cl!CloseTypeServerPDB()+0x24924
  cl!CloseTypeServerPDB()+0x2386d
  cl!InvokeCompilerPassW()+0x6b80b
  cl!recalloc()+0xa3
  cl!BaseThreadInitThunk()+0x1d
  cl!RtlUserThreadStart()+0x28


feat: add  ResponseHeader.contentEncoding

What type of PR is this?
feat
Check the PR title.

[x] This PR title match the format: <type>(optional scope): <description>
[x] The description of this PR title is user-oriented and clear enough for others to understand.

(Optional) Translate the PR title into Chinese.
为ResponseHeader 添加 contentEncoding 及相关方法
(Optional) More detail description for this PR(en: English/zh: Chinese).
en: Adding a new field contentEncoding into ResponseHeader
Also fix Referer and Tests
zh(optional): 为ResponseHeader 添加一个字段 contentEncoding 同时修改测试以及其他方法中的引用
Which issue(s) this PR fixes:
Fixes #449

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.wangtingshun seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

@li-jin-gou plz approve running workflows & Review

@li-jin-gou  I'd add some ut  plz approve running workflows again

@li-jin-gou plz  review it ,thanks

Please change the title to the standard format

Please change the title to the standard format
like this?

PTAL

I think there is no need to handle it specific because it's not a high frequency header

最近新冠中，康复了之后我做一下修改发自我的 iPhone在 2022年12月15日，18:53，skyenought @.***> 写道：
@Skyenought commented on this pull request.
In pkg/protocol/header.go:

@@ -224,6 +225,7 @@ func (h *ResponseHeader) CopyTo(dst *ResponseHeader) {
dst.statusCode = h.statusCode
dst.contentLength = h.contentLength
dst.contentLengthBytes = append(dst.contentLengthBytes[:0], h.contentLengthBytes...)

dst.contentEncoding = append(dst.contentEncoding, h.contentEncoding...)

dst.Reset() 中应该有这样的逻辑吧
h.contentEncoding = h.contentEncoding[:0]
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>


Add Appveyor badge to README

Add a badge to the README to show Windows build status on the front page.

Coverage remained the same at 76.489% when pulling 1ebaa08b6d39658281acdb326ef63190e24fbc6d on snorfalorpagus:appveyor_badge into 5293ce7bd1de957d9a029538b2db76770fa8cc86 on Toblerity:master.

Coverage remained the same at 76.489% when pulling 1ebaa08b6d39658281acdb326ef63190e24fbc6d on snorfalorpagus:appveyor_badge into 5293ce7bd1de957d9a029538b2db76770fa8cc86 on Toblerity:master.

Coverage remained the same at 76.489% when pulling 1ebaa08b6d39658281acdb326ef63190e24fbc6d on snorfalorpagus:appveyor_badge into 5293ce7bd1de957d9a029538b2db76770fa8cc86 on Toblerity:master.


[Vulkan] Add device capabilities to Target, use in codegen

The end-to-end goal of this PR is to be able to specify all vulkan capabilities in the Target, initialize vulkan such that we can legally use those capabilities, then pass the device description to the SPIRVSupport struct.  This is broken down into the following subchanges, each of which is implemented in a separate commit for readability.

Enable instance/device extensions.  Vulkan requires that extensions be explicitly enabled if used.  Has explicitly list out which extensions are required (currently none) and which are optional.

Extract device information using vkGetPhysicalDeviceProperties and vkGetPhysicalDeviceFeatures, determine which Vulkan capabilities are supported, pack into a Target.

Query instance-supported apiVersion before creating instance. Vulkan requires no functions beyond the specified apiVersion be used.

Query support for dedicated allocation and push descriptors along with the rest of the device support.  Move the options to disable their use from compile-time variables to environment variables TVM_VULKAN_DISABLE_PUSH_DESCRIPTOR and TVM_VULKAN_DISABLE_DEDICATED_ALLOCATION.

Move option for vulkan validation layers to environment variable, to enable faster use as a debug tool.  If TVM_VULKAN_ENABLE_VALIDATION_LAYERS is a non-empty string, validation layers will be enabled.

Explicitly enable vulkan features in device creation.  Vulkan requires that features be explicitly enabled before use.  For each feature that the device supports and a shader might use, declare it in the call to vkCreateDevice.

Avoid repeated queries for device attributes, implementing VulkanDeviceAPI::GetAttr based on the per-device values stored in the Target.  This pulls all logic for querying device parameters is in a single location.

Implement "from_device" flag for the vulkan target.  With the number of device capabilities that may or may not be supported by a vulkan driver, it can be tedious to input them.  Specifying "-from_device=0" now indicates that any unspecified values should be read from the device.

Read vulkan device capabilities/limits from Target.  Previously, the codegen assumed that all device features were present.  Now, the codegen reads device capabilities from the Target, and throws an error if codegen would require use of an unsupported feature.

please fix the lint error

Whoops, thank you.  Linting now passes locally, and errors should be fixed now.

I think vulkan.cc is getting too big at this point, how about splitting VulkanModuleNode and VulkanDeviceAPI etc into their own file?

Definitely agreed, vulkan.cc could do with a bit of splitting for readability at this point.  I was also thinking that the VulkanContext would be good to split out into a separate file, and could have the device-specific initialization logic moved to it.  This PR pushes the VulkanDeviceAPI constructor to nearly 300 lines, which is a bit difficult for me to follow.

Though I think it would be best for me to do so in a separate PR, in order to separate out functionality changes from refactoring

Yes that's also what I was thinking, we can do that in a separate PR later.

@Lunderberg Very nice! As a follow up, I think we should

Add warp sync to fix reduction, use subgroup barrier if vulkan 1.1 is available (and update the validator)
Use a target specific max push constant bytes instead of hard coded value

@Lunderberg Very nice! As a follow up, I think we should
* Add warp sync to fix reduction, use subgroup barrier if vulkan 1.1 is available (and update the validator)

* Use a target specific max push constant bytes instead of hard coded value

Thank you, and agreed!  I've been making mental notes on other items that we can check or conditionally include, which will probably go in after the refactoring.

Pass boolean arrays in using smallest available integer type, instead of only 8-bit int.
Verify maximum UBO size (unlikely that we'll even get close to the spec-guaranteed size of 16k, but worth checking)
For loop indices, use largest available integer type, instead of only 64-bit int.

@bellkin , you are absolutely correct that it does break use of libtvm_runtime, and that was not my intention to do so.  Thank you for the report on it, and I'll uptime the implementation to avoid the dependency.


App Skill Confirmation Targeting Inaccuracy

While running an AutoSkill, my app would press the skill icon button pretty well but then would fail to hit the 'OK' button to confirm its use or, if the skill required, it would fail to select a target for the skill's use. I have tried turning on Ignore Notch Calculations since I'm on a Samsung Galaxy S6 Lite but it still didn't help. Are there any other setting I can use to adjust the skill use targeting or is the app just not compatible?

See https://github.com/MathewSachin/Fate-Grand-Automata/issues/386#issuecomment-691697380

This again 🤦


nginx reverse proxy "ERR_TOO_MANY_REDIRECTS"

it may be different from #4370!
my site is https://ghost.pluto0x0.xyz ,it works well on Firefox but meets "ERR_TOO_MANY_REDIRECTS" on Chrome and IOS Safari
Same as #4370, I use nginx reverse proxy and set https url in the ghost config,
At first, my blog's domain was "b.pluto0x0.xyz", but I made mistake same as  #4370, then I fixed it and changed the reverse proxy domain to 'ghost.pluto0x0.xyz'
However, I discovered that 'ghost.pluto0x0.xyz' the site is redirected(301) to "b.pluto0x0.xyz".
I have tried to clean the broser cache, but it didn't work. In fact, all the config about the site 'b.pluto0x0.xyz' is excluded by the nginx config file. It's puzzling...
I think it can't be the problem with the local 301 cache, bucause it didn't works on a new-installed broser either.

For me adding the X-Forwarded-Proto header helped as described in this issue comment:
https://github.com/TryGhost/Ghost/issues/7907#issuecomment-276918176
Example nginx config:

server {
...
    location / {
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass_request_headers on;
        proxy_http_version 1.1;
     ...
    }
}


Introduce dispose pattern in JSI API objects

Background:
Previously we've had some issues with memory and JSI objects where our internal allocations wouldn't be visible for the Hermes garbage collector. We've reported this to the Hermes team here, but this would probl. take some more time to fix.
We've discussed how to address this issue, and the idea we've landed on is to make all the JSI API Objects disposable so that we can release our internal allocations and let the garbage collector handle our JSI objects like it does today.
Example: When we're doing path interpolations where we're typically doing stuff like this:
const path = useComputedValue(() => path1.interpolate(path2, progress.current)!, [progress]);

For each animation iteration (typically 60 times pr. second) this would lead to an SkPath (Skia path) to be allocated internally inside our JsiSkPath object. This internal object would not be picked up by the garbage collector, leading to a perceived memory leak. (Note: the objects would eventually be garbage collected - but not without a high memory usage that might lead to the app being stopped when backgrounded etc.)
With the dispose pattern we can begin doing stuff like this:
const path = useComputedValue(() => {
  path?.current?.dispose();
  return path1.interpolate(path2, progress.current)!;
}, [progress]);

NOTE: This PR does not implement (except for the useLoading hook that already is using the dispose pattern for images, data and fonts) any mechanisms for automatic resource handling using the dispose pattern - only the infrastructure for creating them. A subsequent set of PRs will address this by introducing hooks that can be used in situations like the above.
Changes:

Added a dispose method on base classes for JSI API Host objects wrapping Skia resources in C++
Added dispose methods on base types and implementations in web implementation
Added macros and cleaned up the typename property in C++
Moved default fromValue implementation to parent class for the base implementation in C++
Added static_cast instead of asHostObject in fromValue in base classes to speed up conversion
Changed the __invalidate method name in Values to dispose to keep same pattern.
Updated the AnimatedTextOnPath example to dispose

Testing

All tests are running as expected
Memory usage in AnimatedTextOnPath is measured and is lower (marginally since paths are small resources)
Android / iOS / Web are tested and working.

I like it a lot.
I have some ideas about how we can document it that we can discuss offline.

Will add a few simple unit tests to ensure this is not crashing! :)


Crash at startup using ECrv2 jenkins build 68 (WAILA dependency)

I think there's an accidental dependency for Waila in the latest jenkins build. Crash at startup using forge 1286 and latest EC2 jenkins build...
http://pastebin.com/9wEqwt6g

I will fix this later Button first you can use the build before

Fixed

Thanks for the quick fix!


Add Da for Daltons

Couldn't resist test-driving the combination of Chemistry::Stoichiometry and Physics::Measure! FYI 'u' is the SI unit of Molecular Mass... previously 'Daltons'.
use Physics::Measure;
use Chemistry::Stoichiometry;
my $atoms = 23000;
my $mmu = ♎"{molecular-mass('C') * $atoms} u";
say "$atoms atoms of C have MM $mmu, making a diamond of {$mmu.in: 'carat'}.";
'#23000 atoms of C have MM 276253u, making a diamond of 2.293646059353e-18carat.'

done v1.1.24


Add bigNumberStrings option for forcing BIGINTs as strings (always)

This is in continuation of https://github.com/felixge/node-mysql/pull/437

Side note, this PR doesn't cover the OkPacket.insertId value. It's still returning a number. I will do the casting manually.


Question: Issues setting up dfm backend mssql

I have been using the dfm visual studio extension for a while but I would now like to have it hosted in azure. I am attempting to setup the mssql custom backend locally just for testing but I get the following errors when attempting to browse to
http://localhost:7072/

And I get the following error when browsing to http://localhost:7072/sqldb-lama-dev

What could be causing this and what can I check to determine the issue?

Hi @SandroDeJesus , are you trying to run this custom MSSQL backend locally or are you trying to run something else?
If you're trying to run that custom backend, can you post your local.settings.json file (omitting all secrets) ?
As for hosting DfMon for MSSQL in Azure, the easiest way is to use this blue button to deploy an instance of it. Does it or does it not work for you?

Hi @scale-tone, yes that is the one I am trying to run locally. I also forgot to mention that I have created my orchestrations using the durable task framework and have not used azure functions. This is what my local.settings looks like. The connection string below is what I use to connect via the vs code extension which works fine.
{   "IsEncrypted": false,   "Values": {     "AzureWebJobsSecretStorageType": "files",     "DFM_SQL_CONNECTION_STRING": "Server=tcp:{dbAddress},1433;Initial Catalog=sqldb-lama-dev; Persist Security Info=False;User ID={userName};Password={password}; MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;",     "DFM_HUB_NAME": "sqldb-lama-dev",     "DFM_NONCE": "i_sure_know_what_i_am_doing",     "FUNCTIONS_WORKER_RUNTIME": "dotnet"   },   "Host": {     "LocalHttpPort": 7072   } }

@SandroDeJesus , please, try to omit DFM_HUB_NAME setting.
Task Hub(s) should be resolved automatically and shown to you as a modal list. For MSSQL there's usually just one Task Hub, in which case you should be redirected to it automatically.
And definitely DFM_HUB_NAME (if specified) should contain Task Hub name, not DB name.

This means, that your DB schema version does not match DfMon version that you're running.
Can you hover over your browser tab to see which DfMon version it is and post it here?

@scale-tone, I've also got v<IP_ADDRESS> when I hover over the tab

I've just checked the packages in my application and these are the versions I am currently running, I have not updated these packages in some time which might explain why the schemas don't match?
Microsoft.Azure.DurableTask.Core 2.9.0
Microsoft.DurableTask.SqlServer 1.0.0-rc

Yes, durablefunctionsmonitor.dotnetbackend v6.2.1 expects Microsoft.DurableTask.SqlServer.AzureFunctions v1.1.
I suggest you either upgrade your solution to Microsoft.DurableTask.SqlServer.AzureFunctions v1.1 (which, I hope, will fix your DB schema automatically, but not sure about it).
Or you can try using an older DfMon version.
If you're saying that your DfMon's VsCode ext works with that DB, then you should use the same version of durablefunctionsmonitor.dotnetbackend.

I have tried using v5.5.0 of DfMon but I get the following error when running the func start. was the local.settings file slightly different in the older version?

was the local.settings file slightly different in the older version?

No, but there were many other differences.
I suggest you checkout the whole older version of this custom backend (from this tag) and try to run it as it is there.

I thought that done the job but as the site was loading I was greeted with this error now

Try navigating to http://localhost:7071/mssql instead. That older version doesn't know how to gather the list of hubs.
And anyway, I highly recommend to migrate to the production version of Microsoft.DurableTask.SqlServer.AzureFunctions.

I just got it working a few minutes ago by adding the below line to my local.settings
"DFM_HUB_NAME": "default",
Thank you for the suggestion, I will look to migrate

Hope we can close this one.
If anything else is missing, please, open another issue.


Avoid use of afterEvaluate

This can wait until later, but we should be judicious in the use of afterEvaluate.  This has been good so far.

You may want to review this again. Maybe I am overly cautious with the remaining use of afterEvaluate. Potentially we can avoid some of it through additional Provider API usage.

I see three remaining afterEvaluates:
https://github.com/gradle/play/blob/2e12a26ac1c2ad3be978bdbabea2d856af7d189f/src/main/java/com/lightbend/play/plugins/PlayTwirlPlugin.java#L39-L43
I think we could try removing this entirely and making it a documentation issue. If you use Java imports, you have to add a dependency.
https://github.com/gradle/play/blob/2e12a26ac1c2ad3be978bdbabea2d856af7d189f/src/main/java/com/lightbend/play/plugins/PlayTestPlugin.java#L31-L57
I think this could be slimmed down a bit.  I think if we do #55, a bulk of the configuration might go away and just leave us with the source/target compatibility properties.  Everything else should be able to come from the default Scala plugin.
https://github.com/gradle/play/blob/2e12a26ac1c2ad3be978bdbabea2d856af7d189f/src/main/java/com/lightbend/play/plugins/PlayApplicationPlugin.java#L68-L74
I think this is similar to the one above this.  If we used the regular configurations most of the configuration would go away for the tasks, but we'd still need the juggling that happens with the platform and deriving dependencies from it.

I think at least 1. would be a little awkward as you'd either have to know the full dependency notation with its variant or use the method that can prepare it for you.
dependencies {
    play or compile extensions.play.platform.getDependencyNotation('play-java').get()
}


[SPARK-46670][PYTHON][SQL][FOLLOW-UP] Do not pass static Python Data Sources around when cloning DataSourceManager

What changes were proposed in this pull request?
This PR is a followup of https://github.com/apache/spark/pull/44681 that proposes to remove the logic of passing static Python Data Sources around when cloning DataSourceManager. They are static Data Sources so we don't actually have to pass around.
Why are the changes needed?
For better readability.
Does this PR introduce any user-facing change?
No, dev-only.
How was this patch tested?
Existing test cases should cover.
Was this patch authored or co-authored using generative AI tooling?
No.

Merged to master.


Update README regarding making sure Cloud project is set up properly

Tighten up the FastQC and gzip examples as several fields now have defaults.

LGTM


Error: no probe was found

When I try to run anything with probe-run, it shows an error that says Error: no probe was found. I use the thumbv7em-none-eabi, and I know the file path is right. What causes this and how can it be fixed? I use Ubuntu 20, and probe-run 0.2.3.

This sounds weird, I thought probe-run was for simulating boards like qemu. I didn't know you needed a real board. So oops.

I'll reopen this if anyone actually uses this right and has this issue.

We will add this info to the error message and our troubleshooting section (#239). Therefore we can close it here I think 😄


Adding .editorconfig. This pull request resolves #88 as there already is a .gitattributes

I shamelessly copied this .editorconfig from Rehan Saeed on github.
https://github.com/RehanSaeed/EditorConfig/blob/master/.editorconfig
I am not able to check even the most basic of these at the moment, other than maybe
"indent_size = 4"
@benrick, maybe you can review the first 10 rules or so (and comment out or erase the rest if it's too much to review) and then we have a start to work from or perhaps you have an .editorconfig ready that you use for your projects. I assume we'll most likely follow your preferences anyway, rather than voting.

Yep, since I'm the one that has to code it live on stream, I think I'll agree and say we'll primarily do my style. 🤣

This should fix #88

Thanks for taking the time to edit this. It'll be useful for me to learn good standards.


manifest: fix url, add introduction

The URL was pointing the validation layer sync object instead of the layer documentation.
Add an the 'introduction' field which is use by Vulkan Configurator to describ the layer to the Vulkan developers and within the layer HTML user documentation generated by Vulkan Configurator.

CI Vulkan-ExtensionLayer build # 17 running.

CI Vulkan-ExtensionLayer build # 17 passed.


How do I preload retinaFace and other models?

I want to build a simple REST API for face recognition. Is there a way to preload retinaFace and other models beforehand (before first request).

What is the best way to use deepface with flask?

yes you can. load the pre-trained model in the following file and pass to analyze or verify funciton.
https://github.com/serengil/deepface/blob/master/api/api.py#L104

i am using flask with gunicorn

I mean - that in this case the first call of analyze on this particular gunicorn worker will take a long time, because it will be loading model into memory.
How do I load model when the flask application is starting. So even the first request is fast.

i mean that you can move loading pre-trained model logic in start up
if you change the line 104 as:
models = {}
models['emotion'] = build_model('Emotion')
models['age'] = build_model('Age')
models['gender'] = build_model('Gender')
models['race'] = build_model('Race')
resp_obj = DeepFace.analyze(instances, actions = ["age", "gender", "emotion", "race"], models = models)

this will spend time on app start up and your first request will be fast.
if you do not pass models to analyze function, then the library spend time to build models in the first request.

What models should I use for DeepFace.represent
and detect_faces?

facenet and retinaface

I mean how do I define it?
models = {}
models['emotion'] = build_model('Emotion')
models['age'] = build_model('Age')
models['gender'] = build_model('Gender')
models['race'] = build_model('Race')
models['represent'] = build_model('facenet512 ')?

this code snippet is for facial analysis. facenet is face recognition model. they are different.
you can find how to use it in the code docs: https://github.com/serengil/deepface/blob/master/deepface/DeepFace.py#L271
models = {}

models['emotion'] = build_model('Emotion')
models['age'] = build_model('Age')
models['gender'] = build_model('Gender')
models['race'] = build_model('Race')

resp_obj = DeepFace.analyze("img1.jpg",
                        actions = ["age", "gender", "emotion", "race"],
                        models = models,
                        detector_backend = "retinaface"
)


storage: Add perf statistics for scan detail (#8510)

cherry-pick #8510 to release-4.0

What problem does this PR solve?
Add perf statistics for scan detail, so we can investigate which slow operation of which CF affects the command duration.
The metrics would be like this

What is changed and how it works?
Record perf context diff every time calling next/prev/seek/seek_for_perv of cursor.
Related changes

Need to cherry-pick to the release branch

Check List

Manual test (add detailed scripts or steps below)

Side effects

Performance regression

Consumes more CPU (maybe)

Release note

Add perf statistics for cf scan detail

/merge

/merge


Support for subscriptions

We're currently planning on integrating to linear as one of the services we support at GitStart, and we're curious if the API support subscription. If it doesn't,  is that currently in the roadmap

Subscriptions aren't on the roadmap but you can subscribe to webhooks to get realtime updates https://newsletter.linear.app/issues/linear-changelog-webhooks-markdown-sub-issue-improvements-222646


Nice to have kubectl logs productpage output

Describe the feature request
Would be great to be able to use kubectl logs productpage-v1 -c productpage
Looks like the sample dumps it's output to a file called microservice.log in the root dir.  Would be great to have that tailed out to stdout to allow logs to pick it up.
Describe alternatives you've considered
Additional context

@johnma14 Did you have a chance to look at this?  I suspect it would be as easy as modifying samples/bookinfo/src/productpage/Dockerfile and replace CMD python productpage.py 9080 with something similar to CMD python productpage.py 9080touch /opt/microservices/microservice.log && tail -f /opt/microservices/microservice.log && python productpage.py 9080`

Is this only an issue for productpage? Do all the other bookinfo services (reviews, ratings, details) output log messages?

@frankbu I verified this is only an issue for Productpage.  Checked Feb 1 and verified today.


react-native compatibility, for reals this time

tests pass, demos work, webpack warning has gone away.
import {Spring, TransitionSpring} from 'react-motion/lib/SpringNative'; should now work on react-native (once published)

=D awesome
The parallel of require('react-motion') here is require('react-motion/lib/SpringNative'). I find that kinda weird. Is there some consistency we can have?

Point. How about react-motion/native?

:+1:

Yes, build/ still works too. Heading to catch a flight, will catch up in a few hours.

(caught up)

You're awesome.


Fix Numpy not available during compilation of C-extension

Fixes #9

Hi, @pspeter. Thanks for the pull request. Could you please show me the error that you get if you do not those changes to the setup.py file?

Also, what OS and Python version are you using?

Never mind, I saw you linked an issue with the explanation.


v2.10.0-pre.1 does not load

We were trying out the new pre-release and it does not load on a mac (we tried multiple versions).
It's hanging while waiting for the backend to load and disappears after ~1 minute.
Attached is the screenshot of what it looks like.

yes the new pre-release is totally broken i thought we said that in the meeting. don't use it. my demo during the meeting wasn't from the pre-release.

okay, thanks for the clarification we can close this


Hit the shortcut of "show complete content" does not trigger the import suggestion.

I have a simple module named "foo".

And wanna import to use it in another file. I type "foo" and hit the shortcut, nothing happened finally.

I Expect to show an import suggestions list to let me select which module to be imported, then add the import code automatically. Like:

THX!
os: macos 12.3.1
nova: 9.3

Hmm. Is this what you're referring to?
https://user-images.githubusercontent.com/73370025/170585163-041bae65-647f-4a1a-8c98-632fc0bbbe09.mov
You can make that list of options appear by pressing ⌃⌘A (control-command-A). You can also click the light bulb.

Hmm. Is this what you're referring to?
Screen.Recording.2022-05-26.at.16.44.06.mov
You can make that list of options appear by pressing ⌃⌘A (control-command-A) or by clicking on the light bulb.

Sooooooga. The action is "Show code action".
Em...Haven't I tried this before?
Many Thanks!


[FEA]: Kinetica vector DB service

Is this a new feature, an improvement, or a change to existing functionality?
New Feature
How would you describe the priority of this feature request
High
Please provide a clear description of problem this feature solves
We at Kinetica would like to provide an implementation of VectorDBService that works with the Kinetica database. The idea is to enable the write to vector db stage of a pipeline output the data to Kinetica DB as it does to Milvus right now.
Describe your ideal solution
A new module similar to milvus_vector_db_service.py.
Additional context
This would enable Kinetica to use the the nv_ingest microservice to be configured to be used with the Kinetica database.
Code of Conduct

[x] I agree to follow this project's Code of Conduct
[x] I have searched the open feature requests and have found no duplicates for this feature request

@efajardo-nv
class VectorDBServiceFactory:

    @typing.overload
    @classmethod
    def create_instance(
            cls, service_name: typing.Literal["milvus"], *args: typing.Any,
            **kwargs: dict[str,
                           typing.Any]) -> "morpheus_llm.service.vdb.milvus_vector_db_service.MilvusVectorDBService":
        pass

    @classmethod
    @handle_service_exceptions
    def create_instance(cls, service_name: str, *args: typing.Any, **kwargs: dict[str, typing.Any]):
        """
        Factory for creating instances of vector database service classes. This factory allows dynamically
        creating instances of vector database service classes based on the provided service name.
        Each service name corresponds to a specific implementation class.

        Parameters
        ----------
        service_name : str
            The name of the vector database service to create.
        *args : typing.Any
            Variable-length argument list to pass to the service constructor.
        **kwargs : dict[str, typing.Any]
            Arbitrary keyword arguments to pass to the service constructor.

        Returns
        -------
            An instance of the specified vector database service class.

        Raises
        ------
        ValueError
            If the specified service name is not found or does not correspond to a valid service class.
        """
        module_name = f"morpheus_llm.service.vdb.{service_name}_vector_db_service"
        module = importlib.import_module(module_name)
        class_name = f"{service_name.capitalize()}VectorDBService"
        class_ = getattr(module, class_name)
        instance = class_(*args, **kwargs)
        return instance

Why does this class return an instance of MilvusVectorDBService instead of returning VectorDBService ? Any particular reason ?

@am-kinetica Thanks for catching that. That's correct. Should be VectorDBService but shouldn't affect anything since it's overloaded. We'll get that updated.

@am-kinetica Thanks for catching that. That's correct. Should be VectorDBService but shouldn't affect anything since it's overloaded. We'll get that updated.

Thanks, doesn't affect anything, just looks restrictive.

@am-kinetica I was mistaken. The use of the typing.overload decorator here is actually to allow for more precise type checking when milvus is passed to create_instance (i.e. expected return type would be MilvusVectorDBService). Looks like we need one for FaissVectorDBService as well.

Alright. That makes sense, I am going to put one in for KineticaVectorDBService as well.

@efajardo-nv
Could you please provide me with some sample JSON file which would work as an input to the milvus_vector_service using write_tovector_db stage ? Since I am not finding any such example setting up the right input to a pipeline that I am trying to build using Milvus is becoming a challenge.

@efajardo-nv
@bsuryadevara
I have tried creating a sample input from the zilliz interface that looks like:
(morpheus) root@300-303-u28-vm04-v100:/workspace/examples/sample_milvus_pipeline# cat test.json
{
  "collectionName": "test_collection",
  "data": [
    {
      "id": 81,
      "metadata": "vozltxssn7l",
      "vector": [
        0.2659727795719654,
        0.8355436908247349,
        0.18610434690032607
      ]
    },
    {
      "id": 82,
      "metadata": "vozltxssn7l",
      "vector": [
        0.2659727795719654,
        0.8355436908247349,
        0.18610434690032607
      ]
    }
  ]
}

This works perfectly on zilliz but in the pipeline throws an error saying Unable to upload dataframe entries to vector database: 'id'.
Any help would be much appreciated.

Could you please provide me with some sample JSON file which would work as an input to the milvus_vector_db_service using write_to_vector_db stage ? Since I am not finding any such example setting up the right input to a pipeline that I am trying to build using Milvus is becoming a challenge.

@am-kinetica This test is an example of building a pipeline using WriteToVectorDBStage and MilvusVectorDBService:
https://github.com/nv-morpheus/Morpheus/blob/branch-25.02/tests/morpheus_llm/stages/test_milvus_write_to_vector_db_stage_pipe.py#L53-L130

Could you please provide me with some sample JSON file which would work as an input to the milvus_vector_db_service using write_to_vector_db stage ? Since I am not finding any such example setting up the right input to a pipeline that I am trying to build using Milvus is becoming a challenge.

@am-kinetica This test is an example of a pipeline using WriteToVectorDBStage and MilvusVectorDBService: https://github.com/nv-morpheus/Morpheus/blob/branch-25.02/tests/morpheus_llm/stages/test_milvus_write_to_vector_db_stage_pipe.py#L53-L130

Thanks

@efajardo-nv
I am getting the following error while building the Morpheus release container.
#29 51.84 + cmake -S . -B build -GNinja -DCMAKE_MESSAGE_CONTEXT_SHOW=ON -DMORPHEUS_USE_CLANG_TIDY=OFF -DMORPHEUS_PYTHON_INPLACE_BUILD=ON -DMORPHEUS_PYTHON_PERFORM_INSTALL=ON -DMORPHEUS_USE_CCACHE=ON -DMORPHEUS_USE_CONDA=ON -DMORPHEUS_SUPPORT_DOCA=OFF -DMORPHEUS_BUILD_MORPHEUS_CORE=ON -DMORPHEUS_BUILD_MORPHEUS_LLM=ON -DMORPHEUS_BUILD_MORPHEUS_DFP=ON -DCMAKE_AR=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-ar -DCMAKE_CXX_COMPILER_AR=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_C_COMPILER_AR=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_RANLIB=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_C_COMPILER_RANLIB=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_LINKER=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-ld -DCMAKE_STRIP=/opt/conda/envs/morpheus/bin/x86_64-conda-linux-gnu-strip -DMORPHEUS_BUILD_DOCS=ON -DMORPHEUS_PYTHON_BUILD_STUBS=OFF -DMORPHEUS_CUDA_ARCHITECTURES=RAPIDS
#29 51.87 CMake Error at CMakeLists.txt:76 (include):
#29 51.87   include could not find requested file:
#29 51.87
#29 51.87     morpheus_utils/load
#29 51.87
#29 51.87
#29 51.87 CMake Error at CMakeLists.txt:78 (morpheus_utils_initialize_package_manager):
#29 51.87   Unknown CMake command "morpheus_utils_initialize_package_manager".
#29 51.87
#29 51.87
#29 51.87 -- Configuring incomplete, errors occurred!
#29 ERROR: process "/bin/bash -c source activate morpheus &&    CONDA_ALWAYS_YES=true /opt/conda/bin/mamba install -n morpheus         -c local         -c conda-forge         -c huggingface         -c rapidsai         -c rapidsai-nightly         -c nvidia         -c nvidia/label/dev         -c pytorch         -c defaults         morpheus &&     cd ${MORPHEUS_ROOT_HOST} &&    CMAKE_CONFIGURE_EXTRA_ARGS=\"-DMORPHEUS_BUILD_DOCS=ON -DMORPHEUS_PYTHON_BUILD_STUBS=OFF -DMORPHEUS_CUDA_ARCHITECTURES=RAPIDS\"         ./scripts/compile.sh --target morpheus_docs" did not complete successfully: exit code: 1

#28 [runtime_conda_create 2/2] RUN --mount=type=bind,from=conda_bld_morpheus,source=/opt/conda/conda-bld,target=/opt/conda/conda-bld     --mount=type=cache,id=conda_pkgs,target=/opt/conda/pkgs,sharing=locked     python -m pip uninstall -y pip &&     source activate morpheus &&    CONDA_ALWAYS_YES=true /opt/conda/bin/mamba install -n morpheus         -c local         -c conda-forge         -c huggingface         -c rapidsai         -c rapidsai-nightly         -c nvidia         -c nvidia/label/dev         -c pytorch         -c defaults         morpheus &&     /opt/conda/bin/conda env update --solver=libmamba -n morpheus --file         conda/environments/runtime_cuda-125_arch-x86_64.yaml
#28 52.36 runc run failed: container process is already dead
#28 CANCELED
------
 > [build_docs 2/2] RUN --mount=type=cache,id=workspace_cache,target=/workspace/.cache,sharing=locked     --mount=type=bind,from=conda_bld_morpheus,source=/opt/conda/conda-bld,target=/opt/conda/conda-bld     --mount=type=cache,id=conda_pkgs,target=/opt/conda/pkgs,sharing=locked     source activate morpheus &&    CONDA_ALWAYS_YES=true /opt/conda/bin/mamba install -n morpheus         -c local         -c conda-forge         -c huggingface         -c rapidsai         -c rapidsai-nightly         -c nvidia         -c nvidia/label/dev         -c pytorch         -c defaults         morpheus &&     cd . &&    CMAKE_CONFIGURE_EXTRA_ARGS="-DMORPHEUS_BUILD_DOCS=ON -DMORPHEUS_PYTHON_BUILD_STUBS=OFF -DMORPHEUS_CUDA_ARCHITECTURES=RAPIDS"         ./scripts/compile.sh --target morpheus_docs:
51.87   include could not find requested file:
51.87
51.87     morpheus_utils/load
51.87
51.87
51.87 CMake Error at CMakeLists.txt:78 (morpheus_utils_initialize_package_manager):
51.87   Unknown CMake command "morpheus_utils_initialize_package_manager".
51.87
51.87
51.87 -- Configuring incomplete, errors occurred!
------
Dockerfile:285
--------------------
 284 |
 285 | >>> RUN --mount=type=cache,id=workspace_cache,target=/workspace/.cache,sharing=locked \
 286 | >>>     --mount=type=bind,from=conda_bld_morpheus,source=/opt/conda/conda-bld,target=/opt/conda/conda-bld \
 287 | >>>     --mount=type=cache,id=conda_pkgs,target=/opt/conda/pkgs,sharing=locked \
 288 | >>>     source activate morpheus &&\
 289 | >>>     CONDA_ALWAYS_YES=true /opt/conda/bin/mamba install -n morpheus \
 290 | >>>         -c local \
 291 | >>>         -c conda-forge \
 292 | >>>         -c huggingface \
 293 | >>>         -c rapidsai \
 294 | >>>         -c rapidsai-nightly \
 295 | >>>         -c nvidia \
 296 | >>>         -c nvidia/label/dev \
 297 | >>>         -c pytorch \
 298 | >>>         -c defaults \
 299 | >>>         morpheus && \
 300 | >>>     # Change to the morpheus directory and build the docs
 301 | >>>     cd ${MORPHEUS_ROOT_HOST} &&\
 302 | >>>     CMAKE_CONFIGURE_EXTRA_ARGS="-DMORPHEUS_BUILD_DOCS=ON -DMORPHEUS_PYTHON_BUILD_STUBS=OFF -DMORPHEUS_CUDA_ARCHITECTURES=RAPIDS"\
 303 | >>>          ./scripts/compile.sh --target morpheus_docs
 304 |
--------------------
ERROR: failed to solve: process "/bin/bash -c source activate morpheus &&    CONDA_ALWAYS_YES=true /opt/conda/bin/mamba install -n morpheus         -c local         -c conda-forge         -c huggingface         -c rapidsai         -c rapidsai-nightly         -c nvidia         -c nvidia/label/dev         -c pytorch         -c defaults         morpheus &&     cd ${MORPHEUS_ROOT_HOST} &&    CMAKE_CONFIGURE_EXTRA_ARGS=\"-DMORPHEUS_BUILD_DOCS=ON -DMORPHEUS_PYTHON_BUILD_STUBS=OFF -DMORPHEUS_CUDA_ARCHITECTURES=RAPIDS\"         ./scripts/compile.sh --target morpheus_docs" did not complete successfully: exit code: 1

Any suggestions on what to do ?

@am-kinetica You can try running the following and then building again:
git submodule update --init --recursive

Alternatively, our latest pre-built release container was just published last week. You can pull it from here:
https://catalog.ngc.nvidia.com/orgs/nvidia/teams/morpheus/containers/morpheus/tags
If you're developing new features for 25.02, you might want to use a development container or conda environment instead. You can find details here:
https://github.com/nv-morpheus/Morpheus/blob/branch-25.02/docs/source/developer_guide/contributing.md

@efajardo-nv
I am having some confusion around this code in write_to_vector_db.py.
def preprocess_vdb_resources(service, recreate: bool, resource_schemas: dict):
    for resource_name, resource_schema_config in resource_schemas.items():
        has_object = service.has_store_object(name=resource_name)

        if (recreate and has_object):
            # Delete the existing resource
            service.drop(name=resource_name)
            has_object = False

        # Ensure that the resource exists
        if (not has_object):
            # TODO(Devin)
            import pymilvus
            schema_fields = []
            for field_data in resource_schema_config["schema_conf"]["schema_fields"]:
                if "dtype" in field_data:
                    field_data["dtype"] = DATA_TYPE_MAP.get(field_data["dtype"])
                    field_schema = pymilvus.FieldSchema(**field_data)
                    schema_fields.append(field_schema.to_dict())
                else:
                    schema_fields.append(field_data)

            resource_schema_config["schema_conf"]["schema_fields"] = schema_fields
            # function that we need to call first to turn resource_kwargs into a milvus config spec.

            service.create(name=resource_name, **resource_schema_config)

While creating the resource why is it being specific to using pymilvus ? Does it mean that this was designed to support only milvus and nothing else ?


nixos/cockroachdb: create service

Motivation for this change
Ease of configuring CockroachDB on NixOS
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

Naming isn't quite consistent - the binary is called cockroach but the package is called cockroachdb. For consistency, I've used cockroachdb in all cases here.
I added one very basic test that checks if an insecure single-node cluster can boot and run SHOW ALL CLUSTER SETTINGS.
I wasn't quite sure who to put as the maintainer.

@thoughtpolice Feel free to take this over if you'd like.


Support for NVRTC kernels

This PR adds basic support for run-time compilation of kernels with the goals of reducing binary size, reducing compilation time, and enabling more configurable kernel optimizations.
Changes:

NVRTC infrastructure (influenced by MXNet and nvFuser)
NVRTC kernel for transpose using similar perf optimizations as https://github.com/NVIDIA/TransformerEngine/pull/101
Convenience functions for string manipulation, accessing environment variables, CUDA API calls, and more

Tasks:

[x] Implementation
[x] Evaluate performance
[x] Documentation
[x] Unit tests for NVRTC infrastructure
[x] Unit tests for convenience functions

Future work:

NVRTC kernels for other transpose operations
NVRTC kernels for layer norm
Refactor error checking infrastructure to use convenience functions

Evaluating FP8 transposes with square matrices on an H100 SXM with nice dims (power of two or halfway between powers of two):

The NVRTC kernel gets better performance with small sizes (dim<2k), although we are clearly hitting up against kernel launch overheads. I do observe a ~1% perf regression at large scale though.
Step times with nice dims and prime dims (primes 20, 40, ..., 400):

We see the generalized implementation gets much worse perf than the NVRTC kernel, likely due to the large amount of bounds checking. However, note that the existing implementation doesn't support these sizes.

I've implemented the transpose kernel optimizations from this technical report and now the NVRTC transpose kernel has strictly better performance than the existing implementation. Running on an H100 SXM with FP8 square matrices:
  Nice dims

By "nice" dims I mean powers of two or halfway between powers of two.

  Nice and ugly dims

By "nice" dims I mean powers of two or halfway between powers of two. By "ugly" dims I mean primes 10, 20, 40, ....

The kernel is 1.2x the runtime of cudaMemcpy at somewhat small scale (32<dim<1024). Strangely, I see a 1.2x speedup over cudaMemcpy at large scale (dim>=1024), and this speedup shows up on an H100 PCIe and in nsys profiles. I think I'm clearing the cache appropriately in my testing, but I'm still suspicious. In any case, these are strong performance results and we should apply these optimizations to the remaining transpose-like operations.

/te-ci

/te-ci

/te-ci

/te-ci

/te-ci


Refactor Starlite.construct_route_map

Addresses #203

Quick refactor of construct_route_map that extracts the logic into three separate methods.
Fixes the sonar issue related to code complexity.
Only real logic change is checking for conflicting path parameters (e.g. /foo/{a:int} vs /foo/{b:int}) by comparing the preexisting _path_parameters key on the terminating trie node of a route path to the route.path_parameters attribute on the route being added to the trie.  Previously used a set of previously seen paths.

Clearly there's more that can be done here, but still more context to learn before I attempt deeper changes!
Seems to be an opportunity to take a class-based approach whereby we have a RouteMap and PathSegmentNode's that could simplify some of this logic, but I'm not sure it's worth doing given that the route_map is only used by StarliteASGIRouter.traverse_route_map?

Hi, thanks for this. Please add tests.


Get cmd from options and correctly handle cb().

This fixes the issue I raised here and calls cb() in the proper place so multiple drush targets can be chained together (otherwise it would end after the first one).

We should probably pass drushResult to cb(), don't you think? That would let Grunt know that Drush failed if it did.

@IslandUsurper That's a good point. I wasn't able to find documentation on what grunt.fail() and grunt.warn() actually return so I'm not sure what drushResult is. cb() should take an error object or false if it failed. I don't have time to look into this right now, but can circle back around to it tonight.

I think grunt.warn() and grunt.error() return error objects. However, returning false in that close event doesn't work right either, so we have to be a little careful.

Seems I was wrong in my assumption that they return anything, seems they dont:
https://github.com/gruntjs/grunt/blob/master/lib/grunt/fail.js#L54

None of the examples on http://nodejs.org/api/child_process.html show any return values in 'close' and 'end' handlers, either.
That said, I think that's the wrong place to call cb(). If there are more than one file in the target, callDrush() is going to be called that many times, and cb() should only be called once. Shouldn't it? I think callDrush needs a return value, and if any fail, that error should be passed to cb().

@IslandUsurper you're write. The way I have it now works correctly when this.files is not an array, but does not when it is an array. This makes me wonder, do we really need to use this.files? I'm pretty sure drush make could run successfully just using args and options like the other tasks/commands.

@chasingmaxwell, to be honest, I don't think we need this.async(), either. Drush is almost certainly not thread-safe, because PHP isn't, and I can't think of anything I would want to try to do with Drush in parallel. Make and tests already have a concurrency option, I think.
@nickpack, what do think about simplifying grunt-drush down to just calling drush once with arguments?

I'm not used to working with Node. Therefore my comments about this.async() are nonsensical. That needs to stay because spawn() is asynchronous. But if we stop using this.files, we can leave cb() where it is.

Configuration changes

Instead of "dest", add the filename to the end of "args".
"cmd" and "cwd" must be wrapped in an "options" object either on the task or the target level. "cmd" must be relative to "cwd", the project root if "cwd" is false, or absolute.

@IslandUsurper this.files was only retained for BC, when I first wrote this a long time ago it seemed like a good idea to use it so that you had a src and dest for make, but in retrospect it wasnt that helpful at all. I am all for removing it, but left it in with the refactor because I didnt want to break BC and I simply dont use it so have no context on what it is and isnt used for.

@nickpack @IslandUsurper I just pushed up a commit that preserves backwards compatibility with file handling while still handling async correctly. It works correctly for me regardless of whether I use the file handling.

I can confirm that grunt-drush 0.0.5 has totally broken our builds, and this PR fixes them.

Will get this integrated and released tonight.


Issue with Policy not being triggered properly?

Laravel Version: 6.18.§
PHP Version: 7.4

Description:
So I have a route model binding like that:
            Route::model('questionnaireAttachment', \App\Models\QuestionnaireAttachment::class);

I also have policy registered in AuthServiceProvider.php:
            QuestionnaireAttachment::class => QuestionnaireAttachmentPolicy::class,

and the route I have is like this:
                Route::get('questionnaire/attachments/{questionnaireAttachment}', [AttachmentController::class, 'getAttachments'])->name('questionnaireAttachmentRetrieve')->middleware('can:view,questionnaireAttachment');

the policy has return false; in it so I know it fails however when I make the request to the endpoint, despite the return false; i still get to the controller and I get a valid 200 response

Please post all the code necessary to reproduce this on a fresh installation of Laravel.

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.


Configure power options to avoid session getting disconnected

Configure power options - to not turn off the display, so that it does not interfere with the UI testing.
Testing done : Tested that the powercfg commands work on all OS. Ran E2E on a Win8.1 TestAgent.

suggest to run e2e ui test on either 2008 R2 or win 7 (as there are powershell differences in these compared to others)

Seems fine

accept or close this


Unable to build on aarch64 Raspberry Pi

I'm hitting the following error on the compile step for ring:
warning<EMAIL_ADDRESS>error: unable to parse target query 'aarch64-unknown-linux-musl': UnknownOperatingSystem
warning<EMAIL_ADDRESS>ToolExecError: Command "/home/moderation/Library/llrt/linker/cc-aarch64-linux-musl" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=aarch64-unknown-linux-musl" "-I" "include" "-I" "/home/moderation/Library/llrt/target/aarch64-unknown-linux-musl/release/build/ring-27e1b34e3efd1c61/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-nostdlibinc" "-DNDEBUG" "-DRING_CORE_NOSTDLIBINC=1" "-o" "/home/moderation/Library/llrt/target/aarch64-unknown-linux-musl/release/build/ring-27e1b34e3efd1c61/out/fad98b632b8ce3cc-curve25519.o" "-c" "crypto/curve25519/curve25519.c" with args "cc-aarch64-linux-musl" did not execute successfully (status code exit status: 1).running: "/home/moderation/Library/llrt/linker/cc-aarch64-linux-musl" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=aarch64-unknown-linux-musl" "-I" "include" "-I" "/home/moderation/Library/llrt/target/aarch64-unknown-linux-musl/release/build/ring-27e1b34e3efd1c61/out" "-Wall" "-Wextra" "-fvisibility=hidden" "-std=c1x" "-Wall" "-Wbad-function-cast" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wnested-externs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wstrict-prototypes" "-Wundef" "-Wuninitialized" "-g3" "-nostdlibinc" "-DNDEBUG" "-DRING_CORE_NOSTDLIBINC=1" "-o" "/home/moderation/Library/llrt/target/aarch64-unknown-linux-musl/release/build/ring-27e1b34e3efd1c61/out/ca4b6ef5433f5aeb-aes_nohw.o" "-c" "crypto/fipsmodule/aes/aes_nohw.c"

I think the error is related to https://github.com/briansmith/ring/issues/563#issuecomment-676861003 however none of the work arounds are helping.
Not sure if related but downloading the latest release binary for Linux `aarch64 results in a crash:
llrt --version
fish: Job 1, 'llrt --version' terminated by signal SIGILL (Illegal instruction)

There was regression introduced by latest release so I had to pull it. Will take a look 👌

I've just made some progress by calling the command direct vs. through the Makefile.
cargo +nightly build -r --target aarch64-unknown-linux-musl --verbose just worked
The architecture logic below doesn't work on a Raspberry Pi which returns aarch64
ifeq ($(OS),Windows_NT)
    DETECTED_OS := Windows
	ARCH := x64
else
    DETECTED_OS := $(shell uname | tr A-Z a-z)
	ARCH := $(shell uname -m)
endif

which then breaks the subsequent lines
release: llrt-$(DETECTED_OS)-$(ARCH).zip
release-linux: | lambda-all llrt-linux-x64.zip llrt-linux-arm64.zip

Unblocked now and confirmed working. It may be some environment variables in the Makefile causing the issue.


lib/options: mkPackageOption: document better, add pkgsText and usePname options, refactor

Description of changes
I have noticed that changes to mkPackageOption have left the documentation behind. I have updated the documentation.
I also noticed the documentation encourages users to pass alternative package sets to the function,
but as it is implemented, this would lead to end-user confusion. I have added a parameter that alleviates this.
I added another parameter that could be useful in niche cases, which has necessitated a refactor,
but I think the refactor leaves the function easier to read anyways. However, for this change in particular I request feedback.
I have only done rudimentary tests by inspecting the output of the function in nix repl.

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

I have split the PR into seven commits, and added tests for each change.
I believe the pkgsText parameter is necessary if the function is to work as originally advertised. I have removed mentions of the functionality that would require it from the commits before the parameter is added, though.
About usePname, feel free to reject if you don’t see it being useful. It was just an idea.

Nice thanks! pkgsText sounds good. usePname seems a bit odd, I think it's better to remove it from this PR. Otherwise everything looks good.

Do you want to include the refactor? I originally made it to make adding usePname easier but it might actually be easier to read this way anyway.

I have removed usePname

Last-minute change! I’ve added a test that mkPackageOption does in fact use the package set passed to it


您需要安装旧 Java SE 6 运行环境才能打开“此 Java 应用程序”。

anybody know how to solve this problem? thank before

Hey, my Chinese is a little bit rusty but you should try to use java8 and not 6

thank you,i have solved id


Pure elm Task and Port runtime error.

createKey : Signal (Task x ())
createKey = let
  create : Task x ()
  create = Signal.send (.address input) Create
  g : Bool -> Maybe (Task x ())
  g b = if b then Just create else Nothing
  in Signal.filterMap g create Keyboard.enter

port run : Signal (Task x ())
port run = createKey

Causes an error at runtime.

What's the rest of the program? I can't reproduce. Using the following and then the code provided.
import Task exposing (Task)
import Keyboard

type Key = Create
input = Signal.mailbox Create

https://github.com/fresheyeball/elm-students

Where you able to reproduce it from my repo?

Sorry haven't had the chance. Maybe if you got it down to one file?

So I've been trying to get this down to one file. And Ive learned that the error only occurs in the reactor, with debug.

Should I move this issue? Or is elm-compiler the right place?

Possibly, but if you can get the error down to one file that crashes the debugger, that may be useful.

@vilterp - can you reproduce on the current version of elm-reactor you're working on?

I will get this fully reproduced asap

Ok, this reproduces easily:
module Main where

import Graphics.Element exposing (..)
import Signal exposing (..)
import Task exposing (..)
import Keyboard

type Input = Input

input : Mailbox Input
input =
  mailbox Input

createKey : Signal (Task x ())
createKey = let
  create : Task x ()
  create = Signal.send (.address input) Input
  in Signal.filterMap
    (\b -> if b then Just create else Nothing)
    create
    Keyboard.enter

port run : Signal (Task x ())
port run = createKey

main : Signal Element
main = show <~ input.signal

Awesome, thanks for crushing this down! Do you mind sharing this code snippet on elm-reactor so we can track it there?
I'd also be curious if the recent fix to tasks https://github.com/elm-lang/core/pull/304 helps.

Pardon my ignorance. But how do I share on elm reactor?

https://github.com/elm-lang/elm-reactor/issues/new

Done. https://github.com/elm-lang/elm-reactor/issues/137


KC 9.0.0 compatibility?

Hi,
I made an attempt to use argon2 in Keycloak v9 -- I think I am missing something here, because Keycloak complains the Password Hashing Provider "argon2" is not found.
Here is my Dockerfile - I'd appreciate your help.

Hi @iilei ,
I was working on bumping to 9.0.0, just had to perform some additional testing.
However, it could also be a missing system dependency; you may need to install argon2 package:
microdnf install argon2;

I'm not sure whether it's in the repositories of the jboss/keycloak container, you might need to check that.

Thank you for the swift response - I updated the Dockerfile so argon2 is available on he command line.
I'll proceed with my experiments once you released v9. Thanks :)

@iilei just updated to support Keycloak 9.0.0 as well.
Tested your Dockerfile, but noticed the provider was not loaded. I manually moved it to ./standalone/deployments (hot-deployment) and that worked. So you could either move it there, or open a PR to make it load via "providers" as well, I haven't tested that myself yet.

So is the Readme outdated on that matter?

... create the directory in ./modules/:
mkdir -p ./modules/system/layers/custom
Now simply copy the 2 jboss modules folders into the custom directory in Keycloak modules.

Regarding the PR to make it load via "providers" as well – once I managed that, I'll happily do so. Might take a while though.

@iilei README was not very clear, I improved the installation instructions.
The provider itself should be dropped in ./standalone/deployments/ directory such that it can be deployed by the Keycloak Deployer (see README).
But you'd still need to modify your Dockerfile:
RUN echo "layers=keycloak,custom" >| /opt/jboss/keycloak/modules/layers.conf && \
    mkdir -p /opt/jboss/keycloak/modules/system/layers/custom && \
    cp -R  /usr/src/${HASH_PROVIDER_NAME}-${HASH_PROVIDER_REF}/target/jboss-modules/de /usr/src/${HASH_PROVIDER_NAME}-${HASH_PROVIDER_REF}/target/jboss-modules/net /opt/jboss/keycloak/modules/system/layers/custom/ && \
    cp -r /usr/src/${HASH_PROVIDER_NAME}-${HASH_PROVIDER_REF}/target/argon2-password-hash-provider-${HASH_PROVIDER_REF}.jar /opt/jboss/keycloak/standalone/deployments/

Noticed that the artifact name is different from the repository name, which may cause problems so I'll rename the repository such that it reflects the artifact name, which is cleaner IMO.

@dreezey thank's a bunch, now I got it running.
☝🎩


defaultValue is String type

hi, I noticed the defaultValue property in Column is String type, but I wanna use it in bool column.
@Column(defaultValue: 'false')
bool? isRecycle;
I don't know if it can work, could you please give me some example? thanks.

above approch is correct.


pr-flow is broken on macOS

Problem

Not sure if this issue is related to macOS specifically.
But I haven't seen others with a different system reporting any issues.
Steps To Reproduce
run cargo make pr-flow
...

[cargo-make][2] INFO - Task: test-flow
[cargo-make][2] INFO - Profile: development
[cargo-make][2] INFO - Skipping Task: core::legacy-migration
[cargo-make][2] INFO - Execute Command: "cargo" "test" "--all-targets" "--workspace" "--exclude" "website-test"

...

failures:

---- html::component::lifecycle::tests::lifecycle_tests stdout ----
thread 'html::component::lifecycle::tests::lifecycle_tests' panicked at 'cannot call wasm-bindgen imported functions on non-wasm targets', /Users/my-user/.cargo/registry/src/github.com-some-random-string/js-sys-0.3.55/src/lib.rs:5412:9
stack backtrace:

...

Expected behavior
pr-flow runs.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:

Yew version: master
Rust version: 1.58
Target, if relevant: not relevant
Build tool, if relevant: not relevant
OS, if relevant: macOS
Browser and version, if relevant: not relevant

Questionnaire

[ ] I'm interested in fixing this myself but don't know where to start
[ ] I would like to fix and I have a solution
[x] I don't have time to fix this right now, but maybe later

I'm wondering if we should even have pr-flow. CI is enough to test it. It's just unnecessary step to run on contributor's computer

I actually have already had it fixed as I need to run tests.
I will file a pull request to fix it (alongside the thing I intend to add).

I always run tests by just running cargo test or wasm-pack test in the crate that I'm working on. That allows me to just run yew tests when I work on yew, without forcing me to also run clippy, router tests, etc

I don't disagree and I do prefer that if possible. But, ... I can never remember the correct command in the correct directory?
e.g.: wasm-pack test --firefox --headless -- --features wasm_test --test hydration in packages/yew
I wish tests can be as simple as cargo test --all --all-features.


Panel is not rendering anything on Ubuntu 21.04

Checklist

[x] I have read the appropriate section in the contributing
guidelines
[x] I believe this issue is a problem with polybar itself and not a misconfiguration on my part.
[x] I have searched for other open and closed issues that may have already reported this problem.
[x] I have checked the known issues page for this problem.

Describe the bug
Polybar is not rendering anything with a simple config.
Expected behavior:
When lauched it should render something.
Actual behavior:
Panel is empty.
Was it working before?
N/A, trying polybar for the first time.
To Reproduce
[bar/default]
modules-right = cpu

[module/cpu]
type = internal/cpu

; Seconds to sleep between updates
; Default: 1
interval = 0.5

Polybar Log
notice: Parsing config file: /home/nazar-pc/.config/polybar/config
- config_parser: Parsing /home/nazar-pc/.config/polybar/config
* Loaded monitor DP-1 (5120x2160+0+0)
* Bar geometry: 5120x24+0+0; Borders: 0,0,0,0
- bar: Attach X event sink
- bar: Attach signal receiver
- controller: Install signal handler
- controller: Setup user-defined modules
* Starting application
- controller: Main thread id = 1
* Starting module/cpu
* Entering event loop (thread-id=1)
- module/cpu: Thread id = 2
* Eventqueue worker (thread-id=3)
- bar: Create renderer
- renderer: Get TrueColor visual
- renderer: Allocate colormap
- renderer: Allocate output window
- renderer: Allocate window pixmaps
- renderer: Allocate graphic contexts
- renderer: Allocate alignment blocks
- renderer: Allocate cairo components
- renderer: Load fonts
* Configured DPI = 96x96
warn: No fonts specified, using fallback font "fixed"
notice: Loaded font "fixed" (name=DejaVu Sans, offset=0, file=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf)
* Bar window: 0x0a00001
- bar: Reconfigure window
- bar: Set window WM_NAME
- bar: Set window _NET_WM_WINDOW_TYPE
- bar: Set window _NET_WM_STATE
- bar: Set window _NET_WM_DESKTOP
- bar: Set window _NET_WM_PID
- bar: Map window
- bar: Draw empty bar
- bar: Setup tray manager
* Disabling tray manager (reason: missing `tray-position`)
* module/cpu: Rebuilding cache
- bar: Force update
* Redrawing bar window
- renderer: flush(3 geom=25x24+5095+0, falloff=0)
* module/cpu: Rebuilding cache
* Redrawing bar window
- renderer: flush(3 geom=25x24+5095+0, falloff=0)
* module/cpu: Rebuilding cache
* Redrawing bar window
- renderer: flush(3 geom=25x24+5095+0, falloff=0)
* module/cpu: Rebuilding cache
- bar: Ignoring update (unchanged)
* module/cpu: Rebuilding cache
* Redrawing bar window
- renderer: flush(3 geom=25x24+5095+0, falloff=0)

Screenshots
Panel takes space, but there is nothing on it, no need for screenshot
Environment:

WM: Qtile
Distro: Ubuntu 21.04
Output of polybar -vvv:

polybar 3.5.4

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Debian package, build flags removed from output for reproducibility
You can refer to the build logs at:
https://buildd.debian.org/status/package.php?p=polybar

Additional context
I have just upgraded from Ubuntu 20.10 to 21.04 and got a similar issue with tint2 panel (stopped rendering anything on it even with default config) that I used for years before (https://gitlab.com/o9000/tint2/-/issues/809). Polybar seems like a good replacement, but I get supposedly the same issue. I feel like something is off with Ubuntu 21.04 or the way some software like panels run on it.

Probably caused by https://github.com/qtile/qtile/issues/2642, closing for now.


Cannot load images if not declared

Hello,
I’m missing something here.
I want to display an image, let’s say inside the <MainLayout> in index.astro.
This is the code:
  <Image
    class="absolute lg:left-10 sm:left-5 -z-[1] -translate-y-1/2"
    src="/src/images/automated-tools.avif"
    height={126}
    width={126}
    alt=""
  />

When I run npm run dev, I can see the image correctly displayed. However, when I run npm run build and then npm run preview, the image is not displayed and is marked as not found. The final HTML looks like this, with the image’s absolute path preserved:

Instead, I should see something like this:

I know you can declare it like this import tools from<EMAIL_ADDRESS>but what I want to achieve is showing the images coming from a piece of .jsx code that renders a Swiper slider.
I paste here a piece of the Swiper code, running perfectly when npm run dev:
import { useRef, useState, useEffect } from "react";
import { Swiper, SwiperSlide } from "swiper/react";
import { Autoplay, Pagination, Navigation } from "swiper/modules";
import "swiper/css";
import "swiper/css/pagination";
import "swiper/css/navigation";
import "swiper/css/autoplay";

<Swiper>
    {list.map((item, i) => (
      <SwiperSlide key={`feature-${i}`}>

      </SwiperSlide>
    ))}
</Swiper>

Then, I created a component ProductsSlider.astro:
---
import ProductsSlider from "@function-components/ProductsSlider";
const { key_products } = Astro.props;
const { title, description, product_list } = key_products;
---

      <ProductsSlider list={key_products.product_list} client:load />

The data is fetched from the corresponding .md file:
key_products:
  title: Title
  description: Desc
  product_list:
    - title: Product 1
      image: "src/images/products/product-1.png"

Finally I can retrieve the localized data from the index.astro file:
import ProductsSlider from<EMAIL_ADDRESS>import { getEntry } from '@/config/getEntry';

const locale = Astro.url.pathname.startsWith('/fr') ? 'fr' : 'en';

const homepageContent = await getEntry('homepage', `${locale}/index`);

let { key_products } = homepageContent!.data;
key_products = homepageContent!.data.key_products;
---

<MainLayout>

  <ProductsSlider key_products={key_products} />

</MainLayout>

The images inside the slider does not show after build as the src is incorrect. Can you point me to the right direction?
Thanks 🙏

Hello @dwr-studio! Quick question before we dive deeper: where are the images located in your project? Based on your code, it seems Astro is looking for the image in public/src/images/automated-tools.avif instead of the src/ directory. If the images are in the src/ directory, we might need to adjust the markdown file to use relative paths correctly or consider moving the images to the public directory. Let me know, and we can investigate further.

@mearashadowfax, thanks for taking the time to respond!
The images are located in src/images.
I've adjusted the markdown file to use the relative path and now I can see the images after building.


Many infrastructure upgrades

Upgraded all deps, including TypeScript 2.5 and webpack 3.
Removed unused deps.
Added yarn.lock and switched scripts to yarn.
Removed custom types of fs-extra (in favor of official ones).
Added @types/klaw.
Cleaned up karma configuration.
Updated to GItHub's latest .gitignore file.

AppVeyor:

Tests on latest Node 6 (on windows)
Uses yarn and caches it across builds (which sped up builds to ~2:30mins).
Tests on both Headless Chrome and Firefox.

Travis CI:

Tests on Node 6 and 8 (for both Linux and Mac).
Simplified configuration.
Uses yarn and caches it across builds.
Tests on both Headless Chrome and Firefox (instead of just Firefox).

closes #80