Fails at diamond blast, type error: expected string

I'm trying to run HGTector for the first time, and encountering problems at the diamond blast step. I'd very much appreciate any troubleshooting help you can give.
I have successfully set up my databases, but when I run hgtector search, I get the following error:
Traceback (most recent call last):   File "/home/kyle/miniconda3/envs/hgtector/bin/hgtector", line 96, in <module>     main()   File "/home/kyle/miniconda3/envs/hgtector/bin/hgtector", line 35, in main     module(args)   File "/home/kyle/miniconda3/envs/hgtector/lib/python3.11/site-packages/hgtector/search.py", line 171, in __call__     res = self.search_wf(           ^^^^^^^^^^^^^^^   File "/home/kyle/miniconda3/envs/hgtector/lib/python3.11/site-packages/hgtector/search.py", line 686, in search_wf     res = self.diamond_search(seqs)           ^^^^^^^^^^^^^^^^^^^^^^^^^   File "/home/kyle/miniconda3/envs/hgtector/lib/python3.11/site-packages/hgtector/search.py", line 1530, in diamond_search     ec, out = run_command(' '.join(cmd), merge=False)                           ^^^^^^^^^^^^^ TypeError: sequence item 5: expected str instance, NoneType found
it appears to be happening when it starts the first blast search. This is the last output from my run:
  GCA_002878455.fa: 5677 proteins.   GCA_001758765.fa: 5426 proteins. Done. Read 26 1098 proteins from 47 samples. Dropping sequences shorter than 30 aa... done. Initiating custom taxonomy database... done. Batch homology search of GCA_000013625.fa started at 2023-09-15 17:28:44.124043. Number of queries: 3838.
Thanks a ton!
Kyle Wolf

The output/error files:
hgtector.515643.out.txt
hgtector.515643.err.txt

Hello @kaw97 Kyle, thank you for using our program. I checked the code and located a plausible cause. However, I cannot reproduce it. Can you please let me know the specific hgtector search command you used? I suspect that there were custom parameters which were incorrectly casted into None by the program.

Hello @kaw97 Kyle, thank you for using our program. I checked the code and located a plausible cause. However, I cannot reproduce it. Can you please let me know the specific hgtector search command you used? I suspect that there were custom parameters which were incorrectly casted into None by the program.

Certainly! Thanks a bunch. I am running it with:
hgtector search -i /media/bigdrive1/kyle/janthino/input_genomes2/test_download/janthino_genomes/annotated_analysis/faa/ -o search -m diamond -p 16

@kaw97 Thanks! This is the default command, and I don't know where could a None pop up. Just in case, did you edit the configuration file to remove some default values? To further debug, you can open the file:
/home/kyle/miniconda3/envs/hgtector/lib/python3.11/site-packages/hgtector/search.py

Find this line
        ec, out = run_command(' '.join(cmd), merge=False)

Insert a new line before it. The content is:
        print(cmd)

Then run the program as you did. Before the same error happens, the program will print out the command. Let me see it so that I can check which parameter was incorretly assigned as None. Thanks!

hgtector search -i protein.fa -o . -m diamond -p 16 -d /data/maqin/Project/HGT/HGTector/hgtdb_20230102/diamond/db.dmnd -t /data/maqin/Project/HGT/HGTector/hgtdb_20230102/taxdump/
Homology search started at 2024-11-21 14:47:15.482917.
Settings:
Search method: diamond.
Self-alignment method: native.
Remote fetch enabled: no.
Reading input proteins...
protein: 2 proteins.
Done. Read 2 proteins from 1 samples.
Dropping sequences shorter than 30 aa... done.
Reading local taxonomy database... done.
Read 51329 taxa.
Batch homology search of protein started at 2024-11-21 14:47:15.592765.
Number of queries: 2.
Traceback (most recent call last):
File "/home/maqin/anaconda3/bin/hgtector", line 4, in
import('pkg_resources').run_script('hgtector==2.0b3', 'hgtector')
File "/home/maqin/anaconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 720, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/home/maqin/anaconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 1559, in run_script
exec(code, namespace, namespace)
File "/home/maqin/anaconda3/lib/python3.9/site-packages/hgtector-2.0b3-py3.9.egg/EGG-INFO/scripts/hgtector", line 96, in
main()
File "/home/maqin/anaconda3/lib/python3.9/site-packages/hgtector-2.0b3-py3.9.egg/EGG-INFO/scripts/hgtector", line 35, in main
module(args)
File "/home/maqin/anaconda3/lib/python3.9/site-packages/hgtector-2.0b3-py3.9.egg/hgtector/search.py", line 177, in call
res = self.search_wf(
File "/home/maqin/anaconda3/lib/python3.9/site-packages/hgtector-2.0b3-py3.9.egg/hgtector/search.py", line 692, in search_wf
res = self.diamond_search(seqs)
File "/home/maqin/anaconda3/lib/python3.9/site-packages/hgtector-2.0b3-py3.9.egg/hgtector/search.py", line 1539, in diamond_search
raise ValueError(f'diamond failed with error code {ec}.')
ValueError: diamond failed with error code 1.
I added print (CMD) and also reported an error


Does any version of Angular Js supports Firefox 1.7.13?

I have developed application in Angular Js 1.3.16 and it is working fine with latest version of chrome and Firefox.
But now i need to run this application in Firefox 1.7.35 in some old system and it does not work.
Is this a known issue or is there any workaround?

Sorry, there is no Angular version that would support such an old version of FFox. Currently we are using Firefox 39.0.0 in our unit tests.
I'm afraid that there is no work-around here.

Thanks powel,
Do you know which is the lowest version of Firefox, angular js supports ?


feat: add multiple arb files

Description

Support combining multiple ARB files, to avoid conflicting code between developer, manage localization per features.
Here's the suggested structure:
lib
├── app
│   ├── app.dart
│   └── locacalization
│       ├── app_es.arb
│       ├── app_gb.arb
│       └── app_us.arb
├── features
│   ├── home
│   │   ├── home.dart
│   │   ├── locacalization
│   │   │   ├── home_es.arb
│   │   │   ├── home_gb.arb
│   │   │   └── home_us.arb
│   │   ├── navigation
│   │   └── widgets
│   └── intro
├── main.dart

Let me know any updates if needed.
Type of Change

[x] ✨ New feature (non-breaking change which adds functionality)
[ ] 🛠 Bug fix (non-breaking change which fixes an issue)
[ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🧹 Code refactor
[x] ✅ Build configuration change
[x] 📝 Documentation
[x] 🗑 Chore

I've seen this has been closed.
Regardless, I wanted to add my two cents over here. I think the idea of having feature translations structure is quite interesting.
However, I think it would be better to create an issue and open up the discussion there instead.

Thank you for taking a look at my MR, @alestiago.


Created CORTX Troubleshooting Guide

Created CORTX Troubleshooting Guide
Signed-off-by: Saumya Sunder<EMAIL_ADDRESS>

Closing the PR as the Troubleshooting Guide is not structured correctly.

@Saumya-Sunder, do resolve conflicts

Closing the PR as it has conflicts as well as Saumya had left the org


Row names are not filtered to match new rows for forked tables

Potentially affects: where, order_by, limit, distinct, join, merge and compute

But the only obvious way for this to work without double-processing is for Rows to know their aliases, so we're back to #301


Wine offers not found on buyResources

Bug explanation
The buyResources function works well without any issues for me, apart from wine offers, specifically. No matter which account or town I try, wine offers are not found unlike for any other resource.
To clarify, I have tested with clean source and my own fork (which doesn't have any changes to the transporting or sellResources functions)
Operating System
Windows 10
Ikabot installation
I built Ikabot from sources
Ikabot version
v6.5.35 / Latest source
Python version
3.9.13

Maybe there really are no wine offers? If you've checked this and know it isn't true 100% then the best thing you can do is turn on request logging on line session.py:41 and then take a look at the logfile and figure out what's wrong.

Ok now it's even weirder, the log file does show wine offers even though the console states "No offers available"... I have no clue now lol. Who wrote the buyResources, anyway?
Here's the last bits of ikabot.log, I exited right after exiting buyResources.
                                   <\/td>\n                                                                            2980<\/td>\n                                                                        5,100<\/td>\n                                    <\/td>\n                                    7                                         Per Piece<\/td>\n                                    3<\/td>\n                                    <\/a><\/td>\n                                <\/tr>\n
\n                                    CENSORED
(CENSORED)\n                                    <\/td>\n                                                                            3312<\/td>\n                                                                        90,000<\/td>\n                                    <\/td>\n                                    7                                         Per Piece<\/td>\n                                    5<\/td>\n                                    <\/a><\/td>\n                                <\/tr>\n
\n                                    FFFF
(CENSORED)\n                                    <\/td>\n                                                                            1108<\/td>\n                                                                        90,000<\/td>\n                                    <\/td>\n                                    7                                         Per Piece<\/td>\n                                    5<\/td>\n                                    <\/a><\/td>\n                                <\/tr>\n
\n                            \n                                                            <\/td>\n                        <\/tr>\n                                            <\/td>\n                    <\/tr>\n                <\/table>\n            <\/div>\n
<\/div>\n        <\/div>\n",[]]],["updateTemplateData",""],["questData",{"showReward":false,"hideTutorialAdvisor":true}],["popupData",null],["ingameCounterData",null],["removeIngameCounterData",null],["updateBacklink",{"link":"index.php?view=branchOffice&cityId=CENSORED&position=8&backlink=1","title":"Back to the Trading Post"}]]

Added more Python versions into the start post that I have tried.
Python version
3.9.13 (Windows)
3.11.3 (Windows)
3.8.10 (Ubuntu)
3.10.6 (Ubuntu)

Hello, "Parser CDN Images to material type" is missing for wine
        #Parse CDN Images to material type
        if offer["tipo"] == '//gf2.geo.gfsrv.net/cdn19/c3527b2f694fb882563c04df6d8972':
             offer["tipo"] = 'wood'
        **elif offer["tipo"] == '//gf1.geo.gfsrv.net/cdnc6/94ddfda045a8f5ced3397d791fd064':
            offer["tipo"] == 'wine'**
        elif  offer["tipo"] == '//gf3.geo.gfsrv.net/cdnbf/fc258b990c1a2a36c5aeb9872fc08a':
             offer["tipo"] = 'marble'
        elif  offer["tipo"] == '//gf2.geo.gfsrv.net/cdn1e/417b4059940b2ae2680c070a197d8c':
             offer["tipo"] = 'glass'
        elif  offer["tipo"] == '//gf1.geo.gfsrv.net/cdn9b/5578a7dfa3e98124439cca4a387a61':
             offer["tipo"] = 'sulfur'
        else:
            continue

        offers.append(offer)
    return offers

Issue fixed in this PR.


Does automatic UTXO selection work for MockNetworkProvider?

ran into an issue while adding mocknet to the cashscript playground that automatic utxo selection didn't work, so inputs remained empty

related #209 where provider on the contract was different from the global provider


Originating TLS from egressgateway with custom trust store makes CDS push to mesh pods fail

Describe the bug
I want to validate TLS connections against external services originated at the egressgateway with custom cacerts.
It looks like the DestinationRule that defines the truststore results in Clusters being pushed to mesh pods with the file name.
As the secret is not mounted in these pods they reject the CDS messages:
2018-10-24T07:08:12.227006Z     warn    ads     ADS:CDS: ACK ERROR <IP_ADDRESS>:35160 sidecar~<IP_ADDRESS>~testcurl-f7dfd957-hsx9r.test~test.svc.cluster.local-1 version_info:"2018-10-24T06:57:38Z" node:<id:"sidecar~<IP_ADDRESS>~testcurl-f7dfd957-hsx9r.test~test.svc.cluster.local" cluster:"testcurl" metadata:<fields:<key:"INTERCEPTION_MODE" value:<string_value:"REDIRECT" > > fields:<key:"ISTIO_PROXY_SHA" value:<string_value:"istio-proxy:99cfc3f74c414dd4fa4aa784a0f8b13e22b81893" > > fields:<key:"ISTIO_PROXY_VERSION" value:<string_value:"1.0.2" > > fields:<key:"ISTIO_VERSION" value:<string_value:"1.0.2" > > fields:<key:"POD_NAME" value:<string_value:"testcurl-f7dfd957-hsx9r" > > fields:<key:"istio" value:<string_value:"sidecar" > > >
build_version:"0/1.8.0-dev//RELEASE" > type_url:"type.googleapis.com/envoy.api.v2.Cluster" response_nonce:"2018-10-24 07:08:12.182012541 +0000 UTC m=+2349.750883664" error_detail:<code:13 message:"unable to read file: /etc/istio/root-certs/rootca.pem" >

Also istioctl ps shows that clusters are not fully pushed:
$ istioctl ps
PROXY                                                  CDS        LDS        EDS               RDS          PILOT                           VERSION
istio-egressgateway-7865848f66-ghxl9.istio-system      SYNCED     SYNCED     SYNCED (100%)     SYNCED       istio-pilot-6bf48dc56-kltbj     1.0.2
istio-ingressgateway-8695db5498-ntkvr.istio-system     STALE      SYNCED     SYNCED (100%)     NOT SENT     istio-pilot-6bf48dc56-kltbj     1.0.2
testcurl-f7dfd957-hsx9r.sr-test                        STALE      SYNCED     SYNCED (100%)     SYNCED       istio-pilot-6bf48dc56-kltbj     1.0.2

Expected behavior
As there are no VirtualServices referencing the Subset of the DestinationRule that uses the caCertificates file, all clusters should be to all pods.
Steps to reproduce the bug

Create custom caCertificates and store them as a Secret:
kubectl create secret generic -n istio-system rootca --from-file=rootca.pem=rootca.pem
Install Istio with a configuration that mounts the certificates into the egressgateway:

gateways:
  istio-egressgateway:
    enabled: true
    labels:
      app: istio-egressgateway
      istio: egressgateway
    replicaCount: 1
    autoscaleMin: 1
    autoscaleMax: 5
    cpu:
      targetAverageUtilization: 80
    serviceAnnotations: {}
    type: ClusterIP #change to NodePort or LoadBalancer if need be
    ports:
      - port: 80
        name: http2
      - port: 443
        name: https
    secretVolumes:
      - name: egressgateway-certs
        secretName: istio-egressgateway-certs
        mountPath: /etc/istio/egressgateway-certs
      - name: egressgateway-ca-certs
        secretName: istio-egressgateway-ca-certs
        mountPath: /etc/istio/egressgateway-ca-certs
      # This is added
      - name: root-certs
        secretName: rootca
        mountPath: /etc/istio/root-certs

Create a Gateway:

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: test-gateway
  namespace: test
spec:
  selector:
    app: istio-egressgateway
    istio: egressgateway
  servers:
  - hosts:
    - testservice.test
    port:
      name: https
      number: 443
      protocol: HTTPS
    tls:
      caCertificates: /etc/certs/root-cert.pem
      mode: MUTUAL
      privateKey: /etc/certs/key.pem
      serverCertificate: /etc/certs/cert-chain.pem

Configure a VirtualService that redirects to the egress gateway:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: testservice
  namespace: test
spec:
  gateways:
  - mesh
  - test-gateway
  hosts:
  - testservice.test
  http:
  - match:
    - gateways:
      - mesh
      port: 80
    route:
    - destination:
        host: istio-egressgateway.istio-system.svc.cluster.local
        port:
          number: 443
        subset: egress-test
      weight: 100
  - match:
    - gateways:
      - test-gateway
      port: 443
    route:
    - destination:
        host: virtual-testservice.test
        port:
          number: 80
        subset: test
      weight: 100

Configure the DestinationRule for forwarding traffic to the egressgateway with mTLS:

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: egress-test
  namespace: test
spec:
  host: istio-egressgateway.istio-system.svc.cluster.local
  subsets:
  - name: egress-test
    trafficPolicy:
      loadBalancer:
        simple: ROUND_ROBIN
      portLevelSettings:
      - port:
          number: 443
        tls:
          mode: ISTIO_MUTUAL
          sni: testservice.test

Configure the DestinationRule to validate TLS connections in the egressgateway:

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: test
  namespace: test
spec:
  host: virtual-testservice.test
  subsets:
  - name: test
    trafficPolicy:
      connectionPool:
        tcp:
          connectTimeout: 5.000s
      tls:
        caCertificates: /etc/istio/root-certs/rootca.pem
        mode: SIMPLE

Clearly there is nobody using the subset test in a "mesh gateway".
Pilot should not try to push it as a Cluster.
Funnily it even pushes the routes and clusters that are required to get the call through over the gateway including TLS validation, but other clusters are affected.
Version
istioctl version:
Version: 1.0.2
GitRevision: d639408fded355fb906ef2a1f9e8ffddc24c3d64
User: root@66ce69d4a51e
Hub: gcr.io/istio-release
GolangVersion: go1.10.1
BuildStatus: Clean

kubectl version:
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:05:37Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

Installation
I installed istio with
helm install ~/istio/istio-1.0.2/install/kubernetes/helm/istio --name istio --namespace istio-system -f ~/istio/istio-1.0.2/install/kubernetes/helm/istio/values-istio-auth-tls.yaml  --set global.mtls.enabled=true

In comparison to the original values-istio-auth.yaml the config file only contains the configuration of the egress gateway.
Environment
Kubernetes on Docker for Mac.
Cluster state
{{ If you're running on Kubernetes, consider following the
instructions
to generate "istio-dump.tar.gz", then attach it here by dragging and dropping
the file onto this issue. }}

Looking at the output of istioctl pc cluster shows that it also generates a cluster configuration for the subset test for a "mesh  gateway" even though there is no route that would use this cluster.
virtual-testservice.test                          80        -                                                outbound      STRICT_DNS
virtual-testservice.test                          80        test                                             outbound      STRICT_DNS

I would expect that unused clusters are not pushed to the proxies as these might contain references to files that are only available on the gateways that are assigned to the corresponding routes.


Resolve callback is required with Laravel Mix Plugin

Hi @xiCO2k, thanks for the great plugin! 🙏
I'm wondering if/why the resolve callback is required even if we use the Laravel Mix plugin to import PHP files?
Is it possible to make this optional if my application only utilizes PHP based language files?
Thanks again for your time!

Definitely something I should look on it. Great suggestion 💪.
Will dig in on that.

Awesome, thank you for the quick reply! 🙏

Hey @stevebauman after digging it a lot on that, can't find a good way to have it full working.
If all the lang's are generated to the final build it can work, but if we want to use the lazy load when switching lang's, the import  needs to be on the client side 😞 .

No worries man, thanks for following up 😄 ❤


Access point still working at 2.4GHz when Standard = 802.11na

I set up an access point and I want it to work in the 5GHz band, so I configured it to use the 802.11na standard from the web interface. Even when configured like this, it auto-selects a channel in the 2.4GHz band. The hw_mode variable is not set in the hostap_*.conf configuration files, so this may be what is missing. (The hardware I'm using is 5GHz capable.)
(Edit) It should probably not be possible to select a 2.4GHz channel when the 802.11na standard is selected, and a 5GHz channel when the 802.11na standard is selected.

timeout (https://github.com/opnsense/core/commit/7338549ba5f295f5420e45ba74112af10d20c713)


Atom Animation for Preloader[React Version]

Sample Reference

Please do not use the same preloader we have in the master branch
Check out Dribble and Codepen.io for inspirations
All the assets (i.e. images/illustrations) should be local to the repository
One of the popular libraries for doing these things is Ant Design

I want to work on this. Please assign it to me.

Assigned for 3 days.


Alt+F, S doesn't always save

VSCode Version: Code 1.13.1 (379d2efb5539b09112c793d3d9a413017d736f89, 2017-06-14T18:21:47.485Z)
OS Version: Windows_NT ia32 10.0.15063
Extensions:

Extension
Author
Version

bracket-pair-colorizer
CoenraadS
0.10.7

sort-typescript-imports
miclo
1.3.0

csharp
ms-vscode
1.11.0

debugger-for-chrome
msjsdiag
3.1.6

Steps to Reproduce:

Try to save your changes with hotkeys: press "Alt+F" followed by "S".

Expected results: Your changes are saved and you can continue working.
Actual results: The File menu is still showing, changes are not saved, and subsequent keystrokes will be interpreted as File menu hotkeys.
Workaround #1: Press "S" again.
Workaround #2: Pause briefly after "Alt+F". The "S" will work the first time.
There seems to be a race condition where the "S" keystroke gets swallowed before the File menu is displayed.
Data loss has led me to develop an Alt+F,S twitch over the years - I do that key combination every few minutes, without thinking about it, in all applications, and have done so for more than a decade. I've never run into this obstacle in other applications, and it is kind of aggravating to trip over this every time I use VS Code.

It took me about twenty minutes one day to figure out why the web-site was not honoring my updated code file. I know i saved it. Refresh the web-page - old behavior.

Save again - Alt+F S
copy to the server

Still not working. I view the file on the server, and it's the old version. Huh, i guess i copied the file to the wrong place.

copy to the server again.

Still the wrong version. Open the server version on the server; its the old version.  Maybe i forgot to save it

Alt+F S
copy to server

Server still isn't working.

"I know i saved it. And i swear i copied it to the right location

Use Beyond Compare to diff my location version, and the version on the server. They're identical.

How can Beyond Compare say that the two versions match, when i know the version on the server is wrong?!

Look at the comparison inside Beyond Compare; it says that local copy is wrong.  That's not possible, i know i saved it!

Save again Alt+F S

See, no changes picked up by Beyond Compare; the file is current. To prove it i'll make a minor change in the text file, and save it. The file on the disk doesn't change.

Is it possible that Code isn't saving?

Click File menu
Click Save

changes picked up.
What? Does Alt+F S not work?

Alt+F S
Alt+F S
Alt+F S
Alt+F S

Ohhh, i see.
They decided to re-implement menus from scratch, rather than using the tried and true Windows menu control used by every other application on the planet.
Oh well.

cc @bpasero first to see if he has some ideas about what's happening there.

Duplicate of https://github.com/Microsoft/vscode/issues/20696 ?

https://github.com/Microsoft/vscode/issues/5556


UserFileCache.removeFile throws on success

Impact of the bug
CRAB
Describe the bug
UserFileCache.removeFile throws TypeError on success.
How to reproduce it
crab purge -d <CRAB Directory>
Alternatively, without crab:
from WMCore.Services.UserFileCache.UserFileCache import UserFileCache
ufc=UserFileCache({'endpoint': u'https://cmsweb.cern.ch/crabcache', 'pycurl': True})
hashkey=ufc.upload('some_file.tgz')['hashkey']
ufc.removeFile(hashkey)

Expected behavior
UserFileCache.removeFile returns successfully.
Additional context and error message
Traceback:
ufc.removeFile throws
Traceback (most recent call last):
  File "purge_test.py", line 10, in <module>
    res=crab('purge',dir=sys.argv[1])
  File "/cvmfs/cms.cern.ch/crab3/slc6_amd64_gcc493/cms/crabclient/3.3.2001/lib/python2.7/site-packages/CRABAPI/RawCommand.py", line 26, in crabCommand
    return execRaw(command, arguments)
  File "/cvmfs/cms.cern.ch/crab3/slc6_amd64_gcc493/cms/crabclient/3.3.2001/lib/python2.7/site-packages/CRABAPI/RawCommand.py", line 46, in execRaw
    res = cmdobj()
  File "/cvmfs/cms.cern.ch/crab3/slc6_amd64_gcc493/cms/crabclient/3.3.2001/lib/python2.7/site-packages/CRABClient/Commands/purge.py", line 65, in __call__
    ufcresult = ufc.removeFile(hashkey)
  File "/cvmfs/cms.cern.ch/crab3/slc6_amd64_gcc493/cms/crabclient/3.3.2001/lib/python2.7/site-packages/WMCore/Services/UserFileCache/UserFileCache.py", line 123, in removeFile
    return result[0]['result'][0]
TypeError: string indices must be integers, not str

Christopher, thanks for filing this bug and properly describing it.

Fixed by #9595


feat(language,core,connector)!: init @logto/language-kit package

Summary

Initialize @logto/language-kit package

const languages: contains language tag to native name pairs
type LanguageTag
utility function isLanguageTag
type guard languageTagGuard

core-kit and connector-kit import language-kit
core-kit remove LanguageKey, languageKeys and languageKeyGuard

Testing

Locally tested.
UTs

Updated: Since Localization feature is not ready to merge into logto master branch, we keep old language related type, constants, utility function for master branch compatible for now. (They will be removed after merging Localization feature into master branch.)


Not possible to enable Security Command Center Enterprise

Describe the bug
It looks like enabling SCC-E requires special handling for allowed_policy_member_domains. Using the recommended settings in FAST where iam.allowedPolicyMemberDomains is properly enforced, it is not possible to enable SCC-E. The activate button shows an error:

To Reproduce
Try to Activate SCC-E when the framework is enforcing iam.allowedPolicyMemberDomains.
Expected behavior
The framework should enable activating SCC-E using recommended security best practices.
Ideally, there are step-by-step instructions for the setup, and the framework includes the required Terraform code to allow organizations to fully utilize SCC-E.
Result
See previous image.

Just disable the policy, enable SCC Enterprise, then re-enable it. The policy is either on or off, and it should be on on a new install.

@ludoo thanks for the quick answer! Is this procedure documented somewhere? How can I be sure nothing breaks after re-enabling it?
Best regards,
Markus

Organization policies are not retroactive, this is the usual (hacky) way of dealing with a temporary exception. Another way would be to add the SCC service account to one of your Cloud Identity groups (I personally have never tried this but it should work).
I don't think there's explicit documentation for SCC, but temporary disablement is mention elsewhere in our documentation for similar use cases, AFAIR.

okay, thank you! :)

Thanks for flagging Markus, I'll leave this open so we can properly document it in our stage docs.


Request: resolve import issues for newbie programmers in vscode (ImportError from .api import init)

I know that dealing with different development environments and importing from relative paths on different machines can be a hassle on any project. I just cloned onlyfans-scraper into vscode and got this trying to run it:

from .api import init, highlights, me, messages, posts, profile, subscriptions
ImportError: attempted relative import with no known parent package

There's definitely an obvious explanation that you could tell me, but I'm wondering if we can write it down for the next guy who comes along :D

Can you post the stack? It should have details about which module is encountering the error.

I don't plan to make any real changes to the program aside from small patches to keep it working until the v3 api is released at which point it will likely be retired. Just seems like a waste of time. If you want you can make the changes and create a PR.


test(extension): cleanup staking

Checklist

[ ] JIRA - <link>
[ ] Proper tests implemented
[ ] Screenshots added.

Test results: results
Proposed solution
Explain how does this PR solves the problem stated in JIRA ticket.
You can also enumerate different alternatives considered while approaching this task.
Testing
Describe here, how the new implementation can be tested.
Provide link or briefly describe User Acceptance Criteria/Tests that need to be met
Screenshots
Attach screenshots here if implementation involves some UI changes

Allure Report
allure-report-publisher generated test report!

smokeTests: ✅ test report for 473411d3

passed
failed
skipped
flaky
total
result

Total
32
0
0
0
32
✅


Update deployment.composite.template.json

Needed to add Cmd option to tiny yolo to get tutorial to run
Purpose

...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install

Test the code

What to Check
Verify that the following are valid

...

Other Information

@anilmur - is this good to merge?


Minimizer DOM options

I need to use "lowerCaseTags" option. I've set
minimize: {
	quotes: true,
	empty: true,
	dom: {
		lowerCaseTags: false,
		lowerCaseAttributeNames: false
	}
}

but plugin don't read it. Found in code
new html.DomHandler(this.minimizer.emits('read')), {lowerCaseAttributeNames:false}

I have the same issue, all my html tags gets transformed to lower case and that screws up my angular2 components, because all of them use camel case selectors. Any fix on this?

Fix already merged. Wait for release or use master branch in package.json like this:
"gulp-angular-embed-templates": "git+https://github.com/laxa1986/gulp-angular-embed-templates.git"

I have the same issue as joakim-nordicfactory. I'm using PrimeNg which selectors are camelCase. Are there any news of an upcoming release?

Thanks for such bug fix. Closing this topic


[PriviblurBridge] Fix invalid favicon, use either Tumblr or blog icon

Either uses Tumblr's favicon or the blog's icon if feed is based on a specific blog

use a const or simply inline the string


Feature/make version to

Codecov Report
Patch and project coverage have no change.

Comparison is base (32a7f6a) 78.64% compared to head (c2462a9) 78.65%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2579   +/-   ##
=======================================
  Coverage   78.64%   78.65%
=======================================
  Files         630      630
  Lines       51506    51506
=======================================
+ Hits        40507    40510    +3
+ Misses       9013     9008    -5
- Partials     1986     1988    +2

Flag
Coverage Δ

go-1.15-386
78.67% <ø> (-0.01%)
:arrow_down:

go-1.15-amd64
78.68% <ø> (+0.02%)
:arrow_up:

go-1.16-386
78.67% <ø> (?)

go-1.16-amd64
78.70% <ø> (?)

go-1.17-386
78.65% <ø> (-0.02%)
:arrow_down:

go-1.17-amd64
78.69% <ø> (?)

go-1.18-386
78.62% <ø> (?)

go-1.18-amd64
78.64% <ø> (+0.03%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


Add more detail about http-server install

I added info about install http-server globally or as a dev dependency. Either should work. Since many will already have it install globally, npm install http-server --save-dev is an optional usage.


Reclist tutorial - Hit Rate by Brand graph

Description
I ran through the provided RecList Colab Notebook tutorial. I also read the blog on RecList.
In the blog post, it shows the Hit Rate @ 10 by brand. Picture below.

I did not see how to generate the HR@10 by brand in the Colab Notebook example. Would you mind sharing the code on how to generate that please?
Thank you

Hi @kmcmearty thanks for writing!
That pic (also in the paper originally) was generate with the original private dataset (https://arxiv.org/abs/2111.09963), sorry about the confusion.
As mentioned in the other comment, please do reach out and I'm happy to spend some time discussing your use case together!
Thanks again for the question!


Expose cronWorkflowWorkers as config item.

Summary
Currently `cronWorkflowWorkers' was hardcoded. In some scenarios, if the user is using cron workflow heavily, they need more workers to process the cronworkflow.
What change needs making?
Use Cases
When would you use this?

Message from the maintainers:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

does it mean if I have 9 different cronworkflows set to run hourly that one will be missed?

Added in #11457

does it mean if I have 9 different cronworkflows set to run hourly that one will be missed?

I believe it's more that there are 8 threads running by default. So if you have 9 trigger simultaneously, they all get added to the queue and up to 8 can be processed in parallel (also depends on number of cores and other things running etc).
A CronWorkflow primarily creates Workflows, so I'd imagine all 8 could be processed in less than a second before the 9th then gets processed.
@sarabala1979 feel free to correct me as you obviously know this code better than me!

(^that is also given a single controller instance without any sharding)


Raven_Client#user_context() no longer accepts $data = null as of 1.6.0

This commit breaks backwards-compatibility because if null is passed, the array_merge() triggers a PHP warning (which in my app is converted to an exception).
And indeed, null is sometimes passed. Monolog's RavenHandler does just that.

should be fixed in 1.6.1

Confirmed, 1.6.1 fixes the issue. Thanks!


New Lightning Component to display current Tags

New Lightning Component called: TagAnythingDisplayer
The component should be able to display the current Tags through a custom field. In the initialization should call APEX to get the first TAG config, but any deletion / insertion of any tag should be done with Lightning Data Service.
Also, the component must call a Child component called: TagAnythingBrowser

This child component will throw a Component event with the NEW tag selected. TagAnythingDisplayer component must handle this event to add the new TAG received with Lightning Data Service.

TagAnythingDisplayer should be able to render a X mark to remove any current tag, with Lightning Data Service.

QA this ticket in QA. If is working, release it into 'master'


NDM BlockDevice should support multiple mount points

Partitions can have multiple mount points in Linux. While the BlockDevice struct in NDM supports this, the BlockDevice k8s API resource can only store a single mount point.
https://github.com/openebs/node-disk-manager/blob/e4f921ce4494fc02e71a07669d4a6804de86cb9a/pkg/apis/openebs/v1alpha1/blockdevice_types.go#L202
The API resource definition should be updated to store an array of mount points similar to the BlockDevice struct in package blockdevice.
Tasks:

[x] Update mount package to return all mount points from mounts file
[ ] Update blockdevice CR to hold a list of mount points

@akhilerm is there any discussion required in this issue or should I go ahead with the patch?

@Z0Marlin It can be directly updated because that will require a change in the version of the resource. This is one change that we have planned while migrating blockdevice to v1 . Another issue which also falls in the same category is this.
You can make all the internal changes such that all the mountpoints get fetched using the mountprobe and stored in the internal blockdevice struct. Only while converting it to the blockdevice API resource, we will choose one mountpoint. This makes it easier after migration to fill in the details and also reduces the patch size.

I see. So we can't make changes to the crd yet. All right, I'll make changes in the mount package to return all mount points and then mount probe can only select the first one.

@akhilerm  We could add a new field called MountPoints of type []string which would store all the mount points. Adding new fields in the CRD without version change is fine as there's no best practice around this upstream too. All we have to do is ensure that the user has applied the CRD with the new field, this can be done via a preupgrade job too. WDYT?

yes @RealHarshThakur .Thats a valid point and we can do it. But in that case, the resource will be having 2 mountpoint fields, Mountpoint string and Mountpoints []string. Should check if its okay to do so . cc: @kmova If its fine, then we can include mountpoints and while migrating remove the other field.
@Z0Marlin , if we do as @RealHarshThakur mentioned then you can straightaway implement the multiple mount points to CRDs also.

Yeah, that would be small inconvenience we'll face until we move to next API version but we can avoid confusing the end users by just populating the Mountpoints field and leaving the Mountpoint empty. Similar change in kubectl output as well .
From implementation perspective, we can just stop using the Mountpoint field in the controllers.

Reopening as blockdevice custom resource needs to be updated with multiple mount points.

At this point, we are not seeing a use case for modifying the CRD to support multiple mount points.


Fix and test active function calls in status

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#896  👈
#895
#894
main

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

Join @dongreenberg and the rest of your teammates on  Graphite

Merge activity

Jun 16, 5:28 AM EDT: @dongreenberg started a stack merge that includes this pull request via Graphite.


[NeuralChat] Retrieval example failure

When running the retrieval example under intel_extension_for_transformers/neural_chat/examples/plugins/retrieval/, I met the following error:
2024-02-03 20:33:08,639 - sentence_transformers.SentenceTransformer - INFO - Load pretrained SentenceTransformer: BAAI/bge-base-en-v1.5
2024-02-03 20:33:08,639 - root - ERROR - Please select a proper embedding model.
2024-02-03 20:33:08,639 - root - ERROR - _load_sbert_model() missing 2 required positional arguments: 'token' and 'cache_folder'
2024-02-03 20:35:53,304 - root - INFO - The parsing for the uploaded files is finished.
2024-02-03 20:35:53,495 - root - INFO - The format of parsed documents is transferred.
2024-02-03 20:35:53 [ERROR] neuralchat error: Generic error
2024-02-03 20:35:53,496 - root - ERROR - build_chatbot: plugin init failed

My command to run:
python retrieval_chat.py

My dependencies that may affect:
sentence-transformers                    2.2.2
langchain                                0.0.354
langchain-community                      0.0.13
langchain-core                           0.1.11

It needs a re-install of sentence transformers
pip uninstall sentence-transformers
pip install git+https://github.com/UKPLab/sentence-transformers.git@5c838a705c24c2dfd151a71674c99d09d014c1a9

The original example has a wrong input path of the RAG
input_path: "./docs"


seata-spring-boot-starter compatible with file.conf and registry.conf configurations

Why you need it?
Is your feature request related to a problem? Please describe in details
可以参考以下pr进行兼容适配
You can refer to the following PR for compatibility adaptation.
https://github.com/apache/incubator-seata/pull/5717
How it could be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.
Other related information
Add any other context or screenshots about the feature request here.

I would like to claim this task


[FEATURE] Allow setting window's screen option to be a variable

Description of the requested feature
It would be nice to allow the screen option for windows to accept a variable e.g. screen="{{monitor}}". For my particular use case, I'm actually using eww as a notification frontend with tiramisu since I find dunst's theming options subpar. I want to be able to see the notification window on the monitor I'm currently focused on so that I don't miss the notification. Regardless, even if I was using eww as intended, it makes sense to pop up the eww window(s) on the monitor that is currently focused for whatever information I'm interested in. It's annoying to open eww and realize you hard set it for the far left monitor when you're currently focused on your far right monitor (assuming you're using a three or more monitor setup).

I now added support for --monitor when opening a widget, thus you can now override the value set in the configuration when opening the window. this isn't quite the same as having it in the config, but it is consistent with the other overrides provided by the CLI api. Thus, I'd say this can be closed

Hello, I found this issue and implemented the feature into my polybar like so:
[module/eww-left]
type = custom/script
click-left = eww open --monitor 1 sidebar
click-right = eww close sidebar
exec = "/home/gideon/.config/polybar/scripts/eww-button.sh"
format-foreground = ${colors.color5}
tail = true
interval = 90

When I was initially implementing this last night, running eww open --monitor 1 sidebar would open my window on my left most monitor.
 Wake up this morning, and the same eww open --monitor 1 sidebar opens the window on my middle screen. How can I keep this consistent?

shutdown like a sane person :p
but I really have no idea

Hah I'll keep an eye on it and see if I notice a pattern. After restarting polybar + eww after messing about it works "normally" now. On that note, is there any sort of eww toggle control? I can't figure out how to tell polybar whether to run eww open or eww close to toggle a window on or off.


Added support for installing and starting firewalld

What this PR does / why we need it:
I found differences in vanila centos 7.6 between the vagrant image and what exists on AWS. The AWS version does not have firewalld installed, as this could come up else where I’ve added support for installing the package and starting the service. For etcd nodes and k8s nodes.
Applies to Kubernetes versions:
Tested with kubernetes 1.13 but would apply to any.
Release note:
Support for installing and enabling firewalld on centos 7 as it is not always present

So this still has a dumb merge conflict, I can fix it locally merging to master and resolving the changes, but I cannot get my branch to resolve with out that. If you all want I can close this PR, do the merge locally and then open a PR against master for those changes.


Issue related to find_by_invitation_token

I am having an issue related to find_by_invitation_token. When using find_by_invitation_token with 1st param as token and second param as true, it is generating new token. so the invitation is failing.
What is the solution for this now ?
Note - I cannot change the versions as it is driven by client.
gem 'devise', '~> 3.2.4'
gem 'devise_invitable', '~> 1.3.5'

find_by_invitation_token never generates new token
it looks for resource with invitation token provided in first argument.
if second argument is false, and resource is not found, it returns a new record, with invitation token set, and error in invitation token column.
if second argument is true, only return record if is found, so you should get record with no error (errors.empty?)
However, invitation token in link is the raw token generated by devise invitable, and invitation token in database is the encrypted token (a hash generated from raw token).

This confused me too at first. I thought I encountered the same problem as @avinash-khushu until I realized that Devise::Models::Invitable#generate_invitation_token creates a token which is sent in the email link (@raw_invitation_token) and a hash digest of that token which gets assigned to invitation_token and stored in the database. Once @raw_invitation_token is sent out in the email it gets discarded (or so I think) and when the invited user clicks the link the raw token submitted is rehashed for lookup against the invitation_token column. I guess that makes it harder to impersonate an invited user, like why we encrypt passwords.
@avinash-khushu I'm not sure what is causing your invitation to fail, but it could be that you are applying the find_by_invitation_token method incorrectly.

It could differ if new token is generated after email is sent, because only hash for last token is saved in database


Inconsistency between PyTorch and JAX implementation

Hello!
In the PyTorch implementation, in the MLP, exact GeLU is used as a gating function.

In the JAX version, the approximate gelu is used.

Could you please clarify which version is the correct one?

I see this PR is fixing it, will help land it soon.
https://github.com/google/gemma_pytorch/pull/37

PR is checked in. Closing this.


Install Problems

I follow the instructions at https://docs.spatie.be/laravel-activitylog/v1/installation-and-setup which involves installing the package via composer, and adding it to the Providers array.
However, at that point:
vagrant@cprra:~/cprra$ php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="migrations"
Nothing to publish for tag [migrations].
It's as if it doesn't load the file in?
This is using PHP7.1 and Laravel 5.3...

Could you put a dd statement somewhere in vendor/spatie/activitylog/src/ActivitylogServiceProvider.php to make sure it's being loaded?

Apparently I needed to run php artisan config:clear before  I ran the rest of the commands. This now works (and the issue was found from a different package).


Wildcards for filenames

it would be great to have a
"*" wildcard that merges all found files
        <locales>
            <locale name="en-dev">./**/*.json</locale>
        </locales>

this helps if maaaany json files exist.
Keys and their neting path need to be unique anyway..(if one wants to use this feature)
so a recursive merge before comparing results should be fine.
only filenames cannot be displayed in that case

@boxblinkracer How exactly does the wildcard work? There is nothing in the documentation about it. This doesn't work for me:
<locales>
    <locale name="de">./Resources/snippet/de_DE/*.de-DE.json</locale>
    <locale name="en">./Resources/snippet/en_GB/*.en-GB.json</locale>
</locales>


Properly close request when HttpErrorException is encountered

The request isn't returned and can't be closed by the caller in case of an HttpErrorException.

Hi @evpaassen, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.
TTYL, AZPRBOT;

+1

+1

time to merge this one?


Updated nuget dependencies removing the reporting of CVE-2021-31957

Updated nuget dependencies removing the reporting of CVE-2021-31957 against the package.
Affected libraries referenced in Microsoft.ApplicationInsights.AspNetCore 2.12.0.
CVE-2021-31957
Enabled the targeting of .Net 6 as well as .Net Core 3.1

Happy to bump the version of Microsoft.ApplicationInsights.AspNetCore given MS have marked all the existing ones as deprecated.
However, not sure the benefit of bumping Hellang.Middleware.ProblemDetails. Setting the version as low as (reasonable) possible is beneficial as it avoids forcing consumers of CcAcca.ApplicationInsights.ProblemDetails to upgrade to Hellang.Middleware.ProblemDetails, or have to turn off warnings as error flag for their project.
Take for example, one of the projects I maintain which has a direct reference to Hellang.Middleware.ProblemDetails v6.4.0.
I now go to install into this project the latest version of CcAcca.ApplicationInsights.ProblemDetails which takes a dependency on Hellang.Middleware.ProblemDetails v6.5.1. I am faced with MSBuild error and MSBuild preventing the install of latest CcAcca.ApplicationInsights.ProblemDetails:

once targeting net6 let's make sure that the dotnet test command is explicitly selecting net6. So change azure-pipelines.yml line 48 from:
arguments: '--configuration $(BuildConfiguration)'

to
arguments: '--configuration $(BuildConfiguration) --framework net6'

Doing that will also hopefully cause the build failure go away!


xmedcon: init at 0.21.0

This allows reading DICOM images, including 3d stacks.
Motivation for this change
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@ofborg eval

ping @SuperSandro2000


Uninstall/Reset/Repair Tasks

Proposal: Uninstall/Reset/Repair Tasks
Summary
Provide an uninstall hook for custom activity equivalent to windows.preinstallConfigTask
and windows.updateTask.
Also potentially provide similar support for 'repair' and 'reset' operations.
Microsoft-internal task 34863092
Rationale
Packaged apps have the opportunity to have code run when a package is installed or updated via the
windows.preinstallConfigTask or windows.updateTask but have no equivalent option when a package
is uninstalled.
Applications can write data outside locations known by and managed by the Deployment stack (e.g.
locations under HKLM). Processes running in an AppContainer have constrained access to the system
so data is readily handled by Windows when a package is deregistered but MediumIL and elevated
processes can (and often do) write outside these managed locations. As a package can be removed
without the package's direct involvement a mechanism is needed to enable these apps to remove
data written to places or ways unknown to the Deployment stack.
'Reset' needs similar support. A 'reset' operation is functionally equivalent to
packageManager.RemovePackageAsync(p, RemovalOptions.PreserveApplicationData) but the package
package directory is not deleted followed by packageManager.AddPackageAsync(p). As this is
similar to but not exactly 'uninstall + install' the work performed by an uninstall task
may be inappropriate. Although an uninstall task could have a parameter indicating
Reason=<Remove|Reset> a separate specific task is simpler and more developer friendly.
In addition, the currently install/update task model is a separate task and
appxmanifest.xml schema.
A 'repair' operation is functionally equivalent to packageManager.RegisterPackageAsync(p) for a
package already registered to a user. However, register operations also occur for a loose file
package so there's no clear task to invoke for 'repair' scenarios. A windows.repairTask solves
this ambiguity.
Uninstall tasks must occur after a deregisteration operation is requested but before any
deregistration work can be performed. Thus, uninstall tasks are blocking operations. Similarly,
repair tasks are blocking operations. These should be time bound to prevent unconstrained delays
e.g. an uninstall task running for an hour would be a poor user experience.
Reset tasks are non-blocking to the Deployment pipeline. This occurs after Deployment work is
completed like a windows.updateTask. The latter have no time constraints imposed by Deployment
so reset tasks shouldn't need any Deployment imposed time constraints.
Scope

Capability
Priority

Support a windows.uninstallTask invoked when a package is deregistered for a user
Must

Support a windows.repairTask invoked when a package is repaired for a user
Must

Support a windows.resetTask invoked when a package is reset for a user
Must

Time bound windows.uninstallTask execution
Should

Time bound windows.resetTask execution
Should

Important Notes
Links to related discussions:

#16
#2322

Open Questions
N/A

[from rationale] As a package can be removed without the package's direct involvement a mechanism is needed to enable these apps to remove data written to places or ways unknown to the Deployment stack.

MSIX guarantees a clean uninstall, so what data are you referring to here? Sounds like if there's untracked data as suggested, this is a MSIX bug.
I'm very concerned this is being requested for a partner to pop open a web browser for some tracking, analytics, exit survey, and/or other generally unwanted behavior.

MSIX guarantees a clean uninstall, so what data are you referring to here?

Packaged apps can run MediumIL and elevation which can (and do) color outside the lines. For example, some unpackaged apps have extensibility or integration models requiring regkeys or files be written in places not managed by the Deployment stack. Apps running at >=MediumIL can write to these locations, but have no reliable mechanism to remove that data when their package is removed.

Sounds like if there's untracked data as suggested, this is a MSIX bug.

There's a lot of data across Windows (the OS and ecosystem) which isn't managed by MSIX that some apps need to modify. Some of these are impossible for MSIX to properly manage without breaking impact to these unpackaged apps so either there's zero unpackaged apps (only packaged) or we need a way to support these older mechanisms. The former doesn't seem likely anytime soon 😋 so this is a necessity for healthy systems.

I'm very concerned this is being requested for a partner to pop open a web browser for some tracking, analytics, exit survey, and/or other generally unwanted behavior.

Can a BackgroundTask pop open a web browser to engage in these activities today? That's what windows.preinstallConfigTask and windows.updateTask work today, they activate a manifested background task. Can a background task be defined imperatively (no manifest) and pop open a web browser?...
These uninstall/repair/reset tasks wouldn't enable these actions any more than possible today.
Also, this has been requested by other teams before (via other channels). The need/priority hasn't risen 'above the line' to act on it so far, but times and needs can change... This enhancement request is vFuture/backlog, noted to gather feedback and consideration in planning cycles yadda yadda all the usual reasons. Feedback is welcome - on all facets: functionality, restrictions, need, ...

The existing windows.preinstallConfigTask and windows.updateTask tasks seem to be targeting OEMs/MOs (akin to a rescap). Do you know if that's enforced? If so, should this task also have the same restrictions?

The existing windows.preinstallConfigTask and windows.updateTask tasks seem to be targeting OEMs/MOs (akin to a rescap). Do you know if that's enforced?

windows.preinstallConfigTask is restricted to provisioned (and inbox) packages. OEMs often provision packages but so do others (eg enterprises). Anyone can declare it, but it's only acted on if the package is provisioned (or inbox).
Anyone can provision a package via PackageManager.ProvisionPackageForAllUsersAsync(), the Powershell cmdlet Add-AppxProvisionedPackage or dism.exe if they have admin privilege. At that point you p3wn the machine anyway so there's no added threat.
windows.updateTask has no such constraint. Any package can declare it and it'll be invoked when a user's registered packaged is updated. No provisioning required, not any capability as I recall.

If so, should this task also have the same restrictions?

What do you think?

I think that there should also be an option for the uninstall action to run as administrator. Either by having something like RunAsAdmin="true" or allowing the uninstall app to elevate itself on launch.
As for the restrictions, I feel like runFullTrust should be enough.

https://task.ms/34863092

This looks awesome, we really could use this functionality. This is a definite improvement over using the customInstallActions restricted capability. See also https://github.com/MicrosoftDocs/winrt-related/issues/194
What is the status on development of this feature?

There is another important use case
Lets say that an msix app regsiters a font to the OS, now msix uninstall will failas the font maybe in use and hence locked
it is possibleto placethe font outside of sandbox and uninstall will succeed but this will keep the fonts registered with no means to unregister
this and similar use cases need custom hooks

Lets say that an msix app regsiters a font to the OS

Registers how? Sorry, I'm only lightly savvy about font registration. Is this a manifested registration like ` or via some Windows API to register a file in the package?
If the latter and the font is loaded and cannot be deleted it shouldn't fail the uninstall -- removing the package should not fail. This usually appears as an ERROR_SHARING_VIOLATION or E_ACCESSDENIED (depending) but remove is, by definition, a best-effort operation. Deployment should not fail an uninstall for such things but rather log the error and move on. Worst case the deployment operation succeeds but the package directory (or something under your ApplicationData directory) remains. In this event the unable-to-be-deleted files/dirs are tracked and 'cleanup' is periodically retried, including worst case after the next reboot.
Partially uninstalling a package won't fail the RemovePackage operation, but having that partial package directory/content hanging around can block a 'new' install of the package (well, it'll seem new since you uninstalled the the package and there's no record of it being present anymore).
But regardless, yes, this is an example where an app can register resources with Windows which the MSIX deployment stack has no knowledge of, and thus no ability to help clean up on uninstall (or update, reset or repair scenarios). ApplicationData.Local[Cache]Folder can be a viable option in some cases (copy files to LocalCacheFolder and register there), but only some. Hooks like the uninstall/reset/repair tasks proposed here provide a means to handle those more offbeat scenarios the deployment stack can't.
Manifested features like windows.sharedFonts are another matter entirely. They're designed to be savvy to this issue and shouldn't be a problem. If they are it's a bug and one we'd be very interested to hear about. Please let us know if you find such a thing.

https://task.ms/34863092

cant access

the inability to run custom uninstall hook means that my app cant do something simple as creating a user read protected directory to prevent access to proprietary stuff like mov, fonts.
if the folder is set these permissions
the msix uninstall leaves behind the package folder and then it cannot be installed again!
this is a critical issue

Lets say that an msix app regsiters a font to the OS

Registers how? Sorry, I'm only lightly savvy about font registration. Is this a manifested registration like ` or via some Windows API to register a file in the package?
If the latter and the font is loaded and cannot be deleted it shouldn't fail the uninstall -- removing the package should not fail. This usually appears as an ERROR_SHARING_VIOLATION or E_ACCESSDENIED (depending) but remove is, by definition, a best-effort operation. Deployment should not fail an uninstall for such things but rather log the error and move on. Worst case the deployment operation succeeds but the package directory (or something under your ApplicationData directory) remains. In this event the unable-to-be-deleted files/dirs are tracked and 'cleanup' is periodically retried, including worst case after the next reboot.
Partially uninstalling a package won't fail the RemovePackage operation, but having that partial package directory/content hanging around can block a 'new' install of the package (well, it'll seem new since you uninstalled the the package and there's no record of it being present anymore).
But regardless, yes, this is an example where an app can register resources with Windows which the MSIX deployment stack has no knowledge of, and thus no ability to help clean up on uninstall (or update, reset or repair scenarios). ApplicationData.Local[Cache]Folder can be a viable option in some cases (copy files to LocalCacheFolder and register there), but only some. Hooks like the uninstall/reset/repair tasks proposed here provide a means to handle those more offbeat scenarios the deployment stack can't.
Manifested features like windows.sharedFonts are another matter entirely. They're designed to be savvy to this issue and shouldn't be a problem. If they are it's a bug and one we'd be very interested to hear about. Please let us know if you find such a thing.

we need to make a directory read protected by applying special permissions using ACL or similar. I have tried and the uninstall leaves behind the whole package folder i.e. appname+hash inside packages.
will this get auto deleted on reboot m sure not cause the permissions are still there.
any guidance on how we can achieve this would be great.
also no matter what, lets say if we need to unregister the device for tracking purpose or unregister custom assets like fonts this simply cant be done without a custom hook
its a necessity especially since MAUI based apps need msix to be used

https://task.ms/34863092

cant access

It's an internal bug tracker.

https://task.ms/34863092

cant access

It's an internal bug tracker.

Can we at least get an update

I'm very concerned this is being requested for a partner to pop open a web browser for some tracking, analytics, exit survey, and/or other generally unwanted behavior.

i'm not sure why an exit survey would be considered unwanted? i think it would be useful to know why people are uninstalling the app

@stevenbrix It could be a webpage that has privacy implications--could fingerprint the machine, browser usage, identify the user, IP address, etc. It's also disruptive to the user experience in general--what if the user is updating their browser? what if the browser is blocked and generates a weird policy error? what if the user doesn't have internet access?

@stevenbrix Privacy: The survey could fingerprint the machine, browser usage, identify the user, IP address, etc. General UX: What if the user is updating their browser? What if the browser is blocked and generates a weird policy error? What if the user doesn't have internet access?

MediumIL apps can already do much of this. This specific feature is support for a backgroundtask to be run on uninstall, just like on (pre)install and update. I'm not seeing how an uninstalllTask creates new threats. Aren't your privacy concerns aren't a factor for (pre)install and update?

@DrusTheAxe Agreed. I was just addressing Steven's general question about how exit surveys could be considered unwanted.
In this case, updateTask appears to be unrestricted so the cat is already out of the bag. Completing the toolbox with uninstall, reset, repair, seems to make sense.

Some uses cases where an Uninstall Task would be beneficial for me:

An app needs to register entries in the Windows Task Schedular in order to allow the user to configure a given task to execute at some point in time without the app being open.
An Uninstall task is then needed to remove possible entries in the Task Schedular.
An app needs a long living Worker Service (e.g. running as a Windows Service) to do some processing in the background without user interaction. It should start upon system boot and provides services that are not possible with InProc/OOP Background Tasks.
An Uninstall Task is needed to remove the service.

Note 1: The kind of work I am doing with the WinAppSDK is in the domain of file and folder backup/sync tools. Hence the above use cases.
Note 2: I have currently an app in the Microsoft Store that implements some form of Worker Service by means of a 2nd WPF process that is part of the MSIX package. It is registered to run upon boot (without a window) and then basically waits for events to occur and/or a Task.Delay to return. It does the job but it feels like not being the right way to accomplish what I want to do.

IMO the install and uninstall tasks should be available to any MSIX app, but then run with the trust level specified for the package. So, either lowIL/AppContainer, mediumIL ("full trust"), or even highIL. No restrictions about OEM, provisioning etc. please.

It sounds like you're asking for 2 things:

windows.uninstallTask support, as the moral equivalent to 'uninstall' as windows.updateTask is to 'update'
windows.*Task able to run with any supported TrustLevel (AppContainer, MediumIL, etc) just as any other activatable extension point

The 'Note' under Remarks imply the latter is true today. Is there a desired case not currently supported?

(un)installation of drivers

This has been a recurring topic of discussion but there's complications. For example, drivers typically require admin privilege which most MSIX features don't require (installing a packaged containing a Service is one exception). There's also a wide variety of behavior across driver install/update/uninstall and some of these are at odds with core MSIX value prop (there's good ways to write driver installs that are well behaved citizens supporting clean install and uninstall, and many ways to be...less good citizens, with a lot of gray in between).
I'm not saying MSIX can't support drivers. Just that it's a harder problem to solve than most, and one of many things on the wishlist/backlog. Given infinite time and resources all is possible. Given not-so-unlimited real world constraints...
It's the constant juggle of priorities vs capacity. So please continue sharing what MSIX enhancements you'd like to see. Community feedback plays an important role in our planning. The more feedback we get the easier it is for us to prioritize the tasks you all would like to see.

@DrusTheAxe

Why TaskScheduler? Why not a BackgroundTask?

That would work also but has the limitation that the minimum timeout is 15 minutes. If one also needs scheduled task execution at a given time of the day, week, .. one basically has to develop an own schedular service inside the task. Windows Task Schedular does all of this already.

Sounds like a job for a service (not merely a process that performs service-y functionality), or what Unix calls a daemon or demon process. Does MSIX's support for services fit your need? If not then please share.

I have checked the use of a Packaged Service earlier and decided not to use it because of the following statement in App capability declarations.

We don't recommend that you declare this capability in applications that you submit to the Microsoft Store. In most cases, the use of this capability won't be approved.

Isn't that a no-go then?
That is why I have chosen (or have been forced to choose?) to have a WPF process that runs at startup without an active window. I admit it provides a lot of things that are not so common, like:

Periodic and scheduled task execution (file/folder  backup/sync).
Task execution upon receiving USB storage device insert triggers.
Task execution when detecting file changes.
Handling file upload requests from trusted mobile devices using multicast SSDP and an encrypted upload service.

Probably not the most exiting features in 2024 for Microsoft (with OneDrive being promoted so heavily), but it seems there is still quite some interest in such services.

The 'Note' under Remarks implies the latter is true today. Is there a desired case not currently supported?

The updateTask is working as expected, so no problems here. The windows.preinstallConfigTask is currently limited to provisioned/OEM apps, which is a bummer. And the uninstallTask does not exist yet. So my point was simply to make sure all will behave similarly and there are no artificial limitations except the trust level.

I'm not saying MSIX can't support drivers. Just that it's a harder problem to solve than most, and one of many things on the wishlist/backlog. Given infinite time and resources all is possible. Given not-so-unlimited real world constraints...

I totally see that. But as there are still many use cases where a driver is required, and people will fall back to MSI. Just have a look what hardware manufacturers do to install drivers, it's really ugly. A clean MSIX solution would be much nicer. And packaged services seems to have been solved already. Maybe the solution is also to allow apps to move more code into userspace, but that's an even bigger topic :)


Add Grounded-Segment-Anything Sub-Project to README.md

Description: "This pull request updates the README.md to include a mention of the Grounded-Segment-Anything sub-project, explaining its purpose and how it extends the main Segment-Anything project. The update contains a brief introduction, a link to the Grounded-Segment-Anything repository, and a description of its integration with zero-shot detectors for generating bounding box and mask annotations. This addition aims to highlight the versatility of the Segment-Anything project and encourage further exploration and collaboration."

Sorry, but we don't intend to provide support for subprojects in the main codebase at this time.


Do not pass std::string arguments to format string calls

This comes up as a warning in VS2017, and all instances of this should
be unsafe given that std::string in MSVC only starts with a pointer when
the string contents is longer than the internal buffer, and of course
the size is larger than that of a pointer so all following arguments
wouldn't work either.

Good catch. When I enabled the format string warnings in previous VS versions, it got confused and gave false positive warnings for some of the custom format strings I have. Is that still the case in 2017?

In VS2017 the only format string warnings that work are ones for passing non-POD types through varargs (which is what triggered on std::string) and format string mismatches for printf/scanf and a few other builtin functions - as far as I know the compiler, unless it works in /analyze mode, still does not support full format string validation for user functions.


Add handling of 100 Continue

Previously, it was assumed that each request have one response, but I forgot about handling 100 Continue. In this case, multiple responses can be tied to a single request for as long as 100 Continue is returned.
RTSP does not have an Expect header like HTTP does, so some assumptions have to be made here. The specification states that a requester SHOULD continue waiting if a 100 Continue is received, but I may add some configuration here to avoid long outstanding requests. Specifically, it is my thinking that each request should have two different timeouts. The first timeout is how long the requester should wait if it has not heard a response before assuming no response will be returned. This timeout would be refreshed on every returned 100 Continue until the final response. The second timeout would, by default, not exist but could be added through configuration. This would be a maximum timeout that the requester should wait before dropping it regardless of any 100 Continues received.

Added handling of 100 Continues into the protocol. Once sending requests is supported again, need to handle it there, as well as adding another timer as described above.

This is done.


[TVMScript] Use new variable frame in If/Then/Else

Previously, while TVMScript introduces a new scope for other contexts (e.g. for, while, with, etc), the if and else blocks did not introduce a new scope.  This caused erroneous parsing errors if the if and else blocks each contained a variable with the same name.  Added a self.var_table.with_frame() context resolves this issue.

cc @junrushao @wrongtest-intellif @lightzhan-intellif

I do believe this is good to merge. @wrongtest-intellif what do you think?

Thanks @Lunderberg!!


Are features broken?

I try to use the trick from this comment in order to avoid duplicating readme:
https://github.com/rust-lang/rust/issues/44732#issuecomment-488766871
I thought it worked before, but today I published a crate and there is no readme, now checking some other crates they also don't have their readme, so I'm not quite sure when this started
https://docs.rs/ws_stream_tungstenite/0.1.0-alpha.2/ws_stream_tungstenite/
The crate has the following:
Cargo.toml:
[package.metadata."docs.rs"]
features = ["external_doc"]

[features]
external_doc = []

lib.rs:
// See: https://github.com/rust-lang/rust/issues/44732#issuecomment-488766871
//
#![ cfg_attr( feature = "external_doc", feature(external_doc)         ) ]
#![ cfg_attr( feature = "external_doc", doc(include = "../README.md") ) ]
//!

When compiling at home with rustc 1.39.0-nightly (f0b58fcf0 2019-09-11) it works as intended, both with --all-features and with --features external_doc.
On docs.rs there is no readme

Ok, the problem was having the quotes in  [package.metadata."docs.rs"].


[Idea] NavGraphBuilder.bottomSheet() should support actions to take after onSheetDismissed

Is your feature request related to a problem? Please describe.
I need to be able to support navigating or performing other actions after the user taps away from the bottom sheet, not only when they tap on a close or action button inside the bottom sheet.
Describe the solution you'd like
I would like to have an optional callback parameter I could pass to NavGraphBuilder.bottomSheet() to be able to perform custom actions after the bottom sheet has been dismissed.
Describe alternatives you've considered
I considered writing a custom BottomSheetNavigator class and rememberBottomSheetNavigator() function which accepts a parameter that controls what actions to perform at the end of onSheetDismissed() for a given route.
Additional context

Ideally, the callback should also pass in the backstackEntry's arguments.

You already get a callback within the bottom sheet when it is disposed (via DisposableEffect) or outside of the bottom sheet (via changes in the state of the NavController). Can you explain your use case?

I may be wrong, but I'm guessing DisposableEffect may work for my case. I had heard about it in another context, but hadn't thought of it for this purpose. I'll give it a try. Thanks!


Update the Readme

Is your feature request related to a problem? Please describe.
Add project setup process to the readme.
Describe the solution you'd like
Guide the users for setting up the project locally, like starting the frontend and the backend without docker and kubernetes.

Hey @haseebzaki-07 ! 👋
First off, I want to extend a huge thank you to all of you for your amazing contributions to this project! Your support and hard work mean a lot, and I truly appreciate everything you do. 🙏
I have a small favor to ask: if you think I’ve been helpful and supportive throughout your contributions, I would be honored if you could nominate me by filling out this form: Nominate me.
Your nomination would mean the world to me, and it’s a great way to help me continue supporting our awesome community. Thanks again for all the amazing work, and let's keep making great things happen! 🚀
Best,
Vishesh


Refined documents.

Added requirement field to all classes and free functions. Moved setup_log.hpp to util/ (appropriate location).

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.31%. Comparing base (42ea007) to head (d00a86e).

Additional details and impacted files

@@            Coverage Diff             @@
##             main     #349      +/-   ##
==========================================
+ Coverage   97.27%   97.31%   +0.03%
==========================================
  Files         153      153
  Lines        9435     9448      +13
==========================================
+ Hits         9178     9194      +16
+ Misses        257      254       -3

Files with missing lines
Coverage Δ

include/async_mqtt/packet/control_packet_type.hpp
96.00% <ø> (ø)

include/async_mqtt/packet/packet_iterator.hpp
100.00% <ø> (ø)

include/async_mqtt/packet/property.hpp
100.00% <ø> (ø)

include/async_mqtt/packet/property_id.hpp
97.05% <ø> (ø)

include/async_mqtt/packet/property_variant.hpp
100.00% <ø> (ø)

include/async_mqtt/packet/pubopts.hpp
97.87% <ø> (ø)

include/async_mqtt/packet/qos.hpp
100.00% <ø> (ø)

include/async_mqtt/packet/qos_util.hpp
100.00% <ø> (ø)

include/async_mqtt/packet/store_packet_variant.hpp
92.85% <ø> (ø)

include/async_mqtt/packet/subopts.hpp
100.00% <ø> (ø)

... and 39 more

... and 21 files with indirect coverage changes


chore: updates

Description
chore: upgrade packages
Additional context

What is the purpose of this pull request?

[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[ ] Other

Before submitting the PR, please make sure you do the following

[ ] Read the Contributing Guidelines.
[ ] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[ ] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[ ] Ideally, include relevant tests that fail without this PR but pass with it.

Codecov Report

Merging #231 (b2bc759) into master (60e1357) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #231   +/-   ##
=======================================
  Coverage   77.49%   77.49%
=======================================
  Files         130      130
  Lines       12264    12264
  Branches     1305     1305
=======================================
  Hits         9504     9504
  Misses       2760     2760

Flag
Coverage Δ

unittests
77.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


fix regression with set_output in scikit-learn < 1.4

OnEachColumn, when its transformer is a scikit-learn transformer exposing set_output, calls set_output('pandas') or set_output('polars') to get the output in the correct dataframe.
in old scikit-learn versions, set_output('polars') is not supported, so OnEachColumn does set_output('pandas') and later does the conversion itself with polars.from_pandas.
or at least it's supposed to -- when doing a small change in #973 to handle possible exceptions raised by set_output I forgot to copy the "else" part of the "if scikit-learn < 1.4" block so now it is always using "polars" even in scikit-learn versions that don't support it.
this pr fixes the regression

thanks for the review :) I'll merge it to unblock #1115


How to add references containing multiple lines?

The following works, but creates three separate references:
claim_guid=$(wd add-claim Q63313825 P767 '{"snaktype":"somevalue"}' | jd claim.id)
wd add-qualifier $claim_guid P1932 'UBL, E.'
wd add-reference $claim_guid P248 'Q53556514'
wd add-reference $claim_guid P5199 '000011361'
wd add-reference $claim_guid P813 '2019-03-06'
Is it possible to get wd ar to add just one reference, with the three parts of it grouped together?

For this kind of elaborated edit, I would recommend using wd edit-item and a JSON file:
Q4115189_edit.json:
{
  "id": "Q4115189",
  "claims": {
    "P767": [
      {
        "snaktype": "somevalue",
        "references": [
          {
            "P1932": "UBL, E.",
            "P248": "Q53556514",
            "P5199": "000011361",
            "P813": "2019-03-06"
          }
        ]
      }
    ]
  }
}

NB: the references value is an array of objects, with each objects counting as one reference entry that can have several properties
wd edit-item ./Q4115189_edit.json`

I feel that this functionality is basic enough that it should be more accessible. Most claims are best referenced with multiple reference fields, especially retrieved (P813) in combination with imported from (P143) or reference URL (P854).
The edit-entity method doesn't seem usable to me, as it carries too great a risk of removing existing qualifiers. The only way I see to avoid that is to first query for an existing claim, and then perform some complex logic to combine the existing claim with your new reference. I'm not thrilled about doing that myself; isn't that what libraries are for?
I was hoping to wrap wd's interface to make it easy to add a claim with a reference URL like this:
# wikidata add claim with reference
wdacwr(){
  claim_guid=$(wd add-claim "$1" "$2" "$3" | jq -r .claim.id)
  wd add-reference "$claim_guid" P854 "$4"
  wd add-reference "$claim_guid" P813 `date --rfc-3339=date`
}

Of course, that creates two references, not one reference with two fields.
The lack of this feature makes wikibase-cli almost unusable for me.

@daniel-barrows your PR is welcome ;)

actually, given the latest developments in wikibase-edit, that wasn't that hard to implementation: 5635ba6, published in v15.1.0: add a reference with multiple snaks


Systematic in-browser comparison between rendered markdown & expected literal html

Just wrote some JS that can be put into a notebook that can compare the rendered markdown with the target HTML.
%%javascript
var items = $("div.text_cell_render.rendered_html").map(function() {
    return this.innerHTML;
});
var n = items.length;
var i;
for (i=0; i<n; i=i+2) {
    if (!(items[i]===items[i+1])) {
        console.log("Doesn't match: ", i, items[i])
    }
}

This will compare even with odd numbered cells. For the notebooks that have the headers, will need to play with the loop variables.

@mpacer this issue seems sprint friendly?

I would suggest that #11 should also be completed before pursuing this issue.


AutoHotPie does not work on PureRef

A couple of days ago it worked as intended, howver, it stopped working on PureRef recently. Are there any workaround? It is an important software for 3d modeling.

Sorry I'm just seeing this, can you verify if menus still work but the visual just doesn't show up?  Or do the menus not open at all?

in my case it works fine, I can open everything on my pies with PureRef as active window & "Always on top" enabled.

This issue seems to be machine specific.  I've worked with others on a similar issue, uninstalling, reinstalling, trying various windows ink settings (sometimes window ink messes with things).
The next version I'm working on should address this issue.  I think it may be a hotkey registration issue and the current version does not do a great job at handling that.

im getting the same cant use AutohotPie in Pure Ref Works Fine Eveyrwhere else ...  tried everything..

Does it have anything to do with PureRef being a "keep on top"-kind of app so nothing can't be shown above it? I think there's a setting in PureRef that can disable "stay on top". Try that.

I am unable to reproduce this.
Normal: works fine
always on top: works fine
not active: works fine

Seems like pureref's event loop for processing input is too slow for default ahk config.
Toggle "Delay key release" under functions.


[Debug]Fix Errors inside the codes

Fix two small errors inside the "s1_development_environment/exercise_files/final_exercise/data_solution.py".

[Fix]A missing import in the answer.

Hi! Thanks for merging my pull request, I also wanna mention that in the later dockefile building phase, if we use pre-built Docker image provided by NVIDIA that includes PyTorch with GPU support, the dvc version has to be pinned to some specific versions. For example, if FROM nvcr.io/nvidia/pytorch:22.01-py3 is used, pip install dvc will only install dvc==3.42.0, if we use FROM nvcr.io/nvidia/pytorch:24.01-py3 instead, then pip install dvc will install a different version of dvc for us. I think this deserved to also be mentioned in the courseFROM nvcr.io/nvidia/pytorch:24.01-py3:)
Consider the tuple and Tuple difference in different python versions, thank you for pointing out that tuple would be the default choice since 3.9, I guess the reason why i made that Pull Request was because I found that the exercises in M7 are still using python<=3.8 typing converntion. But thanks for mentioning the change in different python versions anyway!


Support passing a UIImageView as the displacedView

Passing a UIImageView as the displacement view may add borders to the animatedImageView found in the GalleryPresentTransition. This results in a broken animation.
This solution reuses the existing UIImage from the passed in UIImageView and matches the contentMode of the animatedImageView with the passed in displacedImageView.

Hi @iainsmith,
Right now all our effort is on 3.0 (not a PR yet..) which already includes this, together with many other improvements like support for alpha images, transition between different content modes in-flight...etc..
At the moment I am full time on 3.0.. @zfoltin might have time to test these 2.x PRs..though it needs proper testing that means not only code review but higher level check for visual behaviour as anything might break already established transitions and behaviours.
@zfoltin  please approach me with a running build if you want to merge this.

@Krisiacik that's fair enough. If I have time later, I will try and post some gifs of the visual bug with a before and after.
Whether you merge this or not for a 2.x build, we could leave the PR open in case anyone else runs into this issue before 3.0 is ready.
Looking forward to seeing the code for 3.0 when it's ready.

@iainsmith thanks for your work. We are happy to have this in the next 2.x release 👍