Add custom text action

This is just a simple work in progress to add a custom text action. This should be refactored to remove code duplication with the custom code action.
We may also want to put the model's choice in the configuration?

Custom code actions have been removed because that feature overlaps with edit with instructions. Edit with instructions already provides the ability to change the model with one that is tuned for text.


Add string multiplication

Proposed Changes

Add string multiplication (closes #29)

:white_check_mark: Build concoct 0.1.67 completed (commit https://github.com/ConcoctLang/concoct/commit/fe7c4d0279 by @ldilley)


User without permission is able to read devices and templates

User only has the permissions all_users (CRUD of users) and ro_pap (read only of the registered profiles/permissions).

profile a

profile permissions

When logging in with this user, the lists of devices and templates are accessed and the devices are displayed.

via API are also accessible

The expected behavior is that devices and templates would not be accessible.
Note: In version 58.2-20190321, when trying to read devices and templates without permission, the backend response was 403 Forbidden
Expected Behavior: The home page should be one it is allowed to access.
Affected Version: 62.2-20190524

If the user does not have any permission, also has access to templates and devices.

Ticket analysis meeting (May, 22nd): It will be retested.

The user does not have access to templates and devices, but the cards are displayed (#1184).

 curl -X GET http://<IP_ADDRESS>:30001/template -H "Authorization: Bearer ${JWT}"  -H 'Content-Type:application/json'
<title>403 Forbidden</title>

403 Forbidden

openresty/<IP_ADDRESS>

 curl -X GET http://<IP_ADDRESS>:30001/device -H "Authorization: Bearer ${JWT}"  -H 'Content-Type:application/json'
<title>403 Forbidden</title>

403 Forbidden

openresty/<IP_ADDRESS>

Tested in v0.5.0-alpha.1


Cannot connect to cyclotron-svc (getTopDashboards)

cyclotron-site$ npm start`

><EMAIL_ADDRESS>start /home/nightshade/projects/heroku-apps/sars22/cyclotron-site
> npx gulp server

[04:19:31] Requiring external module coffeescript/register
[04:19:32] Using gulpfile ~/projects/heroku-apps/sars22/cyclotron-site/gulpfile.coffee
[04:19:32] Starting 'server'...
[04:19:32] Starting 'build'...
[04:19:32] Starting 'vendor'...
[04:19:32] Starting 'assets'...
[04:19:32] Starting 'pug'...
[04:19:32] Starting 'styles'...
[04:19:32] Starting 'scripts'...
[04:19:32] Starting 'bower-install'...
[04:19:32] Using cwd: /home/nightshade/projects/heroku-apps/sars22/cyclotron-site
[04:19:32] Using bower dir: ./bower_components
[04:19:34] Finished 'styles' after 2.2 s
[04:19:34] Finished 'assets' after 2.28 s
[04:19:35] Finished 'scripts' after 3.01 s
[04:19:36] Finished 'pug' after 3.58 s
[04:19:39] Finished 'bower-install' after 6.45 s
[04:19:39] Starting 'vendor-fonts'...
[04:19:39] Starting 'vendor-scripts'...
[04:19:39] Starting 'vendor-styles'...
[04:19:39] Starting 'vendor-img'...
[04:19:40] Finished 'vendor-img' after 996 ms
[04:19:40] Finished 'vendor-styles' after 1.02 s
[04:19:40] Finished 'vendor-fonts' after 1.02 s
[04:19:40] Finished 'vendor-scripts' after 1.02 s
[04:19:40] Finished 'vendor' after 7.47 s
[04:19:40] Finished 'build' after 7.47 s
[04:19:40] Starting 'watch'...
[04:19:40] Starting 'webserver'...
[04:19:40] Option open does not work in gulp-connect v 2.*. Please read "readme" https://github.com/AveVlad/gulp-connect
[04:19:40] Starting server...
[04:19:40] Server started http://<IP_ADDRESS>:8080
[04:19:40] Running server

I am unable to get connect the site to the svc. I am able to see the http://localhost:8077 api page. But somehow site is not getting connected.
Shows error Cannot connect to cyclotron-svc (getTopDashboards)

Hi @rahbal, did you configure the _public/js/conf/configService.js file after building the website?  It gets generated on first build from sample.configService.js, and contains this by default:
restServiceUrl: 'http://localhost:8077',

From what you said, that's probably correct, but if you changed it you might run into errors.
If that's not the issue, did you correctly start MongoDB and connect the service to it?  You can test this via http://localhost:8077/dashboards.  It should have deployed some example dashboards automatically on startup, so you should get some JSON response.  If there are any errors, it's likely that the website is connecting correctly, but is unable to get a valid response.
Lastly, you can open the browser console and look for any more detailed errors when you load the site.

Yes, all dashboards are visible on this url http://localhost:8077/dashboards
Only cyclotron-site is showing that it is not able to connect to the cyclotron-svc.

Any luck finding errors in the browser developer console?

I bumped into what looks like the same issue:

I started by running cyclontron-svc using the sample.config.js; settings analytics enabled = true in that file gets rid of the 405, but now I get a 500. The error on the console of cyclontron-svc says Error [MongoError]: The 'cursor' option is required, except for aggregate with the explain argument. I haven't investigated yet, pretty sure that's a configuration error on my behalf

upgrading mongoose to 6.2.10 seems to make the error go away; fyi I'm running mongo 4.4, that's probably relevant

I'll create a PR; I find any tests in cyclotron-svc, though I have to admit I didn't look very hard.

Since there is an open PR for bumping mongoose that's 3 years old [0] I don't think this project is being maintained very actively anymore.
[0] https://github.com/ExpediaGroup/cyclotron/pull/49


init.d script?

How are you guys running this script in the background? I have it working but would be nice if it was an init.d script that would start automatically and run in the background.
Do you have an example?

a systemd service file has been added to the contrib directory
https://github.com/bitly/oauth2_proxy/blob/master/contrib/oauth2_proxy.service.example

It would be great to add upstart and system V examples for the time being (those aren't going anywhere anytime soon).


#{select:} variable ?

So a nice variable to add would be one with which you can select some portion of the snippet after its printing.
That would allow you to overwrite that piece if needed, or just going ahead.
Examples:
In 'css' group
• cssd          => display: #{select:none};
• cssb          => outline: 1px solid #{select:red};
In 'html' group
• htmlinput => <input type="#{select:hidden}" name="" value=""/>
For 'php' group
• while'        => while ($row = mysqli_fetch_array(#{select:$result})) {  }
• die'           => die (#{select:"Failed to connect to MySQL."}););
For 'email' group
• gg'            => Good #{select:morning}, #{input:Customer Name}
Better if it handles multiple selection (useful on Sublime Text)
• phpfor => for (#{select:$i}=0;#{select:$i}<count(array);#{select:$i}++) {  }
And much better if it handles nested variables. Ex: => #{select:#{clipboard}}
(Which would/could be a general improvement.)
Hope you consider it useful as I do and congrats for all the job done. Works good!

Interesting idea. This might require quite some testing to check if it can behave properly in most applications.


feat: notify network message implemented

this does not address #522
it suppose to show to the user the current network she is logged in..,,and offer her to switch to other network from the networks supported to deploy on other networks.

the best way will be that alchemy will pass to daocreator the supported networks list (using the same mechanism we are using for the BASE url)

@orenyodfat can you please explain how did you test it? Right now it is detecting in which network the user is connected from the provider
Please if that's not the case explain with more details how you want this functionality and we can change it as desired

it still does not work as expected .
see
https://github.com/daostack/alchemy/pull/2308#issuecomment-739417416
it works ok for xdai though not for main.

see https://github.com/dOrgTech/DAOcreator/issues/526 @cbrzn

see #527 and #528 @cbrzn


Access Matrix

Access matrix on ComputeDAG for all tensors, following a Tiramisu-style construction and flattened, then applied to each TIR-buffer during prediction.
Results on a 1000-subset in e5:
Model: xgb
RMSE: 0.0793
R^2: 0.7567
pairwise comparision accuracy: 0.8504
mape:<PHONE_NUMBER>0.5327
average peak score@1: 0.8312
average peak score@5: 0.9035
Model: lgbm
RMSE: 0.0793
R^2: 0.7565
pairwise comparision accuracy: 0.8510
mape:<PHONE_NUMBER>1.5266
average peak score@1: 0.8373
average peak score@5: 0.9073
e2e Runs:
LGBM:
Estimated total latency: 17.081 ms      Trials: 102     Used time : 229 s       Next ID: -1
Mean inference time (std dev): 14.80 ms (0.00 ms)
Ablation studies wrt naive features:
Model: xgb
RMSE: 0.0790
R^2: 0.7572
pairwise comparision accuracy: 0.8511
mape:<PHONE_NUMBER>5.6599
average peak score@1: 0.8331
average peak score@5: 0.9058
Model: lgbm
RMSE: 0.0682
R^2: 0.8189
pairwise comparision accuracy: 0.8729
mape:<PHONE_NUMBER>5.9234
average peak score@1: 0.8736
average peak score@5: 0.9355

This PR is ready for review.


Converge fails with group_id set in v5.2.0

Cookbook version
5.2.0 (working in 5.1.0)
Chef-client version
13.5.3
Platform Details
ubuntu 16.04
Scenario:
calling users_manager files with group id set
Steps to Reproduce:
users_manage "itops" do
  group_id 2300
  action [ :remove, :create ]
end

Expected Result:
A converged run
Actual Result:
           ================================================================================
           Error executing action `create` on resource 'users_manage[itops]'
           ================================================================================

           NoMethodError
           -------------
           undefined method `each' for #<String:0x000000000504a010>

           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/users/resources/manage.rb:98:in `block (2 levels) in class_from_file'
           /tmp/kitchen/cache/cookbooks/users/resources/manage.rb:36:in `block in class_from_file'

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/spireon_users/recipes/group_itops.rb

             6: users_manage "itops" do
             7:   group_id 2300
             8:   action [ :remove, :create ]
             9: end
            10:

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/spireon_users/recipes/group_itops.rb:6:in `from_file'

           users_manage("itops") do
             action [:remove, :create]
             default_guard_interpreter :default
             declared_type :users_manage
             cookbook_name "spireon_users"
             recipe_name "group_itops"
             group_id 2300
             search_group "itops"
             group_name "itops"
           end

           System Info:
           ------------
           chef_version=13.5.3
           platform=ubuntu
           platform_version=16.04
           ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
           program_name=chef-client worker: ppid=173;start=18:54:22;
           executable=/opt/chef/bin/chef-client

I just got the same error but don't have the group_id set. Instead, I believe this is pointing towards the data bag contents for key "ssh-keys". Previously having only a single ssh-key, I just had a string there. And from the docs:

Note: The ssh_keys attribute below can be either a String or an Array. However, we are recommending the use of an Array.

I changed the ssh-keys in the data bag to an array and now chef runs are completing successfully.
From this:
"ssh-keys": "ssh blaha",
To:
"ssh-keys": [   "ssh blaha" ],
To team: Did you remove this functionality? Can you update your docs if so? Thanks!

So technically they were always meant to be arrays, but I've put some defensive code in to make sure if you pass a string we convert it to an array first. Let me know if you still have problems with the new 5.2.1 release which includes that.

5.2.1 is working, thank you!


Fixup typing of Namespace

I'd missed a couple of details in my implementation, the more accurate and usable the typing is the more that can be avoided

merging as this only affects typing


Deprecated: Container-scan Github Actions

Hi there
I really love this github Action that you suggested for this documentation page. I used this reference to scan container images in our current codebase at work. Unfortunately I have two issues with this page and would highly appreciate feedback/input/comments from your side regarding those points:

The suggested version is still a Pre-release version and not yet something that is already established
The Action that is currently in the Marketplace is a fork and not an official scanner from the Azure repository
When following the fork to the official Source Azure/container-scan the readme mentiones a Deprecation Notice... therefore this action will no longer be supported by Microsoft anyways

My question now:

Would it make sense to update this page to use another container scanner (Microsoft related or third party), so that the "best practice" example side does not directly shows you how to use a deprecated Action?
What other container scanner would microsoft recommend to use? What could be considered from your side to add to this page and/or substitute the deprecated version?

Cheers and Many thx in advance ❤

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 24b42c1c-ac64-e510-1804-a50791177d7c
Version Independent ID: ffb1223c-0d77-b9f8-e236-c172183e5c30
Content: Scan container images using GitHub Actions - Azure Container Registry
Content Source: articles/container-registry/github-action-scan.md
Service: azure-monitor
Sub-service: containers
GitHub Login: @tejaswikolli-web
Microsoft Alias: tejaswikolli

Thanks for bringing this to our attention. We will investigate it further and update you shortly.

@TAAGECH9  - Thanks for bringing this to our attention.
I'm going to assign this to the document author so they can review and update accordingly.

@TAAGECH9 I understand your concern about not using a forked version of a deprecated action. I tried to search for any alternative (MSFT or third party) but couldn't find one that provides all the features that the container scan action provides. If you would like to revive/recreate the action then I would be happy to be of any help. In short, I don't know what would be a better fit to update the docs.

@koushdey, Many thanks for your reply 🚀. Sad to hear, that there is currently not a better option, but I can for sure understand. I will have a look on how much work it would be to revive/recreate this action. If I would see a way how to do it, or if I would have another suggestion I will let you know 😄.
Cheers and wish you a great day man

#label-remove:"Azure-Monitor/svc"

#remove-label:"Azure-Monitor/svc"

#remove-label:"containers/subsvc"

#remove-label:"Azure-Monitor/svc"

#remove-label:"Azure-Monitor/svc"
#remove-label:"containers/subsvc"

@tejaswikolli-web  please remove the azure monitor tags. This does not belong to us

#remove-label:"Azure-Monitor/svc"

@MicrosoftDocs/azure-docs - We are trying to remove the azure-monitor tag to this issue. @tejaswikolli-web removed it yesterday, but it seems like it was automatically re-added. How can we remove this tag? This issue does not belong to Azure Monitor.

@AbbyMSFT. Its because the article has the wrong metadata
ms.service: azure-monitor
ms.subservice: containers

#remove-label:"Azure-Monitor/svc"

#remove-label:"containers/subsvc"

@EdB-MSFT, I don't see those tags in the article.

#remove-label:"Azure-Monitor/svc"

#remove-label:"containers/subsvc"

#please-close


Stripe gateway unfinished!

Hello guys!
I have a problem using Stripe on BoxBilling 4.17
Actually everything works perfect except last step of order processing.
For example: when customer trying to order service on my website, he is trying to pay with credit card (Stripe), next stipe open's modal popup, where customers has to fill credit card number and date of expiry, customer click buy, Stripe changes "buy" button from blue to green color (successful charge) and then payment form appears again!
The problem is that customer is going to be charged for unlimited times, till he spend all money from card, and order status in boxbilling dashboard is - unpaid!
Help me please!
Thank you.

The amount of charge was 19.99 twice! But in my dashboard i see this
$0.20	Stripe transaction ch_16AczmB4gHAV4uceGBagVd9T	2015-06-06 08:49
$0.20	Stripe transaction ch_16Acx4B4gHAV4uceitZGqZyi	2015-06-06 08:46
Is there any solution of this problem?

It will be included in new BoxBilling version.


[$1000] Settings - Performance and heat issues on the "Troubleshoot" option

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Issue was found when executing #35306
Version Number: <IP_ADDRESS>
Reproducible in staging?: y
Reproducible in production?: New feature
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:
Action Performed:

Navigate to Account settings - About - Troubleshoot
Background the app
Foreground the app
Swipe up and down

Expected Result:
Swiping should be smooth. The phone shouldn't heat up or crash.
Actual Result:
Low performance when I foreground the app. The phone heats up if I stay on the page. It even crashed once.
The issue disappears if I navigate back and to the "Troubleshoot" again.
Workaround:
unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/38435837/00fb81f1-f0b8-4114-890f-a6ca371e338d

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01dd3351f4b07d85c0
Upwork Job ID:<PHONE_NUMBER>540744192
Last Price Increase: 2024-02-27

Trying to repro now.

It seems like a possible memory leak or something. I do notice things get slightly more janky. But doesn't seem like a blocker if the only way to reproduce it is to go to this particular page and background the app.

Asking here to get another repro of this

@laurenreidexpensify , snaggin' from you since I have an iPhone and am able to reproduce, at least the part where the scroll isn't smooth.
https://github.com/Expensify/App/assets/22508304/62851b28-8abf-4f93-93fe-848af93c40ba

Also... reporting back that I didn't experience any heat issues or noticeable battery drain.

Waiting for proposals

Thanks for posting in #expensify-open-source @hoangzinh
Doubling price to get eyes and proposals.

Does only iOS have this problem？Does Android work smoothly?

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~01eec1faf4fd4ceb3c?viewMode=1

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~0107f7a8dc488440a0

Proposal
Please re-state the problem that we are trying to solve in this issue.
Performance degradation occurs when viewing the Troubleshoot screen on iOS.
What is the root cause of that problem?
The Troubleshoot screen is presented using transparentModal. This causes the About screen's animation to continue to play as the Troubleshoot screen overlays the About screen.
What changes do you think we should make in order to solve the problem?
Update the presentation type for the Troubleshoot screen to modal. This will prevent rendering the About screen while the Troubleshoot screen is displayed.
What alternative solutions did you explore? (Optional)

Tested playing/pausing animations based on useFocusEffect, but this introduces stutter when an animation is resumed.

It might be worth optimizing the Coin.lottie (569KB) and Desk.lottie (165KB) animations. Apart from ExpensifyLounge.lottie (313KB), all other animations are <100KB.

⚙ From digging into it, what I can say so far is that this issue is not caused by:

the Lottie animation
the ReconnectApp call upon getting the app back to the foreground
the triggerReconnectionCallbacks loop

📜 I can say this w/ certainty because I commented out all of the above logic and the issue is still there.
👁 Observations:

I tested locally on a real device (iPhone 12mini) and it does overheat when getting the app back to the foreground and leaving it there for ~ 5mins
weirdly, this seems to only be happening on the Troubleshoot page (to this extent) when it comes to both laggy UI and overheating -> doing the same thing on say About page, we still get some minor UI lagging but no overheating
when on the Troubleshoot page after getting the app back to the foreground, if navigating back to the About page, the issue is gone, it's like engaging w/ the navigation stack makes the issue go away instantly

I'm still digging and will come up with a proposal if I figure out the root cause and can come up w/ a decent solution.

Proposal
Please re-state the problem that we are trying to solve in this issue
Performance and heating issues on the Troubleshoot page if we put the app into background state then back to foreground.
What is the root cause of that problem?

[!NOTE]
The issue is only happening on native devices because the navigation is stacking the screens (in memory).
I wasn't able to reproduce on Android, only on iOS.

This happens because on Native when we navigate to a new screen, the previous screen remains in the navigation stack. Each new screen is added (pushed) onto the top of the stack, and when the user navigates back, the current screen is removed (popped), revealing the previous screen.
The problem in our case is that some of these pages contain Lottie animations and because the screens are kept in memory as we navigate (ex. from About to Troubleshoot), both pages animations never unmount when transitioning the app back from background to foreground - which increases the load on the UI thread significantly.
What changes do you think we should make in order to solve the problem?
We can handle this by creating a native platform specific hook called useAppState which we will use within the Lottie/index.tsx component.

useAppState hook code
// src/hooks/useAppState/index.native.ts

import React from 'react';
import type { AppStateStatus } from 'react-native';
import { AppState } from 'react-native';

type AppStateType = {
    isForeground: boolean;
    isInactive: boolean;
    isBackground: boolean;
}

function useAppState() {
    const [appState, setAppState] = React.useState<AppStateType>({
        isForeground: AppState.currentState === 'active',
        isInactive: AppState.currentState === 'inactive',
        isBackground: AppState.currentState === 'background',
    });

    React.useEffect(() => {
        function handleAppStateChange(nextAppState: AppStateStatus) {
            setAppState({
                isForeground: nextAppState === 'active',
                isInactive: nextAppState === 'inactive',
                isBackground: nextAppState === 'background',
            });
        }
        const subscription = AppState.addEventListener('change', handleAppStateChange);

        return () => subscription.remove()
    }, []);

    return appState;
}

export default useAppState;

Which we will add to the Lottie component like so:
// ...existing logic
const appState = useAppState();

// If the image fails to load or app is in background state, we'll just render an empty view
// using the fallback in case of a Lottie error or to prevent memory leaks.
if (isError || appState.isBackground) {
    return <View style={aspectRatioStyle} />;
}
// ...existing logic

By doing this we unmount the animations when the app goes into background, and mount them again when the app is foregrounded - this way we take the load off the UI thread and get rid of both performance and heating issues.
Videos

iOS: Native

Before
After

@hoangzinh With the solution I proposed that is the trade-off since we're re-mounting the animation.
This load delay also happens first time you open the app and navigate to one of the screens where an animation exists - so it makes sense it would also exist when bringing the app back from background - which means all processes restart / re-mount.
I can look into more but for now just assume this is as good as it gets considering the RCA.

@tamachai @ikevin127 Thanks for proposals everyone. Both proposals look great, especially @ikevin127 with details root cause. I have a few concerns about solutions:

@tamachai: Update the presentation type for the Troubleshoot screen to modal I'm worried about this approach potentially causing regression bugs. We must have reasons of using transparentModal. There is a PR change to use card presentation but has been reverted revert: native stack #37305.
About your alternative solutions, could you elaborate more about playing/pausing animations based on useFocusEffect? Thanks
@ikevin127 When I watch your recordings, when the app is foregrounded, the animation doesn't load in a short period. Is there any way we can avoid it? Thanks

card uses OS defined animations. Whereas modal and transparentModel use the same animations as each other but have distinct settings to control the visibility of the header and previous screen. It's best to avoid transparent modal unless the app needs to render the screen below the current, such as when overlaying modals on iPad or using effects like blur. For reference, here's the view hierarchy with transparentModal vs modal.
transparentModal:

modal:

When I experimented playing/pausing the animation via useFocusEffect, a stutter was introduced during view transition, as the animation begins to play.

Issue not reproducible during KI retests. (First week)

Reproducible for me on 1.4.47
https://github.com/Expensify/App/assets/22508304/77e8a3a8-163c-4cac-ae5b-e708562017d4

@tamachai if we use modal, will it keep the previous state if we navigate back? For example, previously we had an expectation here #36077

Yes, it should behave the same way. It doesn’t actually alter the view stack. An issue would occur if the modal wasn’t full screen, but this isn’t the case. Maybe we can look at only applying this to the settings and troubleshooting screens and then verify there are no regressions.

playing/pausing the animation via useFocusEffect

Could you elaborate on how would you playing/pausing?

LottieView exposes a ref prop that can be used to control the view via its imperative API. Using useFocusEffect we can call play/pause, depending on if the screen hosting the Lottie view is focused. The issue here is that starting playback introduces stutter. This stutter is especially noticeable when swiping back to the previous screen.

@hoangzinh I tried that but for my proposal it didn't work since (IMO) our issue has to be tackled based on the AppState change (background/foreground) and not whether the screen with animation is focused or not.
As explained by the other proposal's author, because the way our navigation works currently - there's no page focus change when the app goes into background and comes back to the foreground, hence we cannot use that to tackle the issue as you suggested.

@ikevin127 @tamachai could you guys try to use useFocusEffect to hide/show lotte view and share recordings results here? So we can know which approach gives better results. Thanks

Sure thing. I’ll try to put something together today.

Has anyone confirmed if there is battery drain or if performance is affected. Wonder if this purely aesthetic. Asking because I'm wanting to assign this too a VIP/Wave project.

I can confirm that when the UI thread gets really heavy upon resuming app from background to foreground -> if waiting for 3+ minutes the phone heat increases gradually w/ every minute which also drains battery faster than usual.

Thanks @ikevin127 , added to #vip-vsb

@hoangzinh It does fix the issue - both heating and heavy animation problems were gone when I tested my solution.
Again, as explained in my proposal's RCA - the lottie animations never stop when the app goes into the background, causing memory leak - the issue occurs because when the app reopens (from background state), we are presented with all that in-memory build-up - which causes our heavy UI / overheating issues.
What my solution does is un-mount the animation as soon as the app goes into the background and re-mounts it when the app is brought back to the foreground.
The only tradeoff of the solution being that there's a bit of delay until animation is rendered, depending on animation size - which we already have currently when first navigating to any screen with Lottie animation.

Thank you all for your help with this bug. I have a follow-up question regarding @ikevin127's analysis of the issue.

The Lottie animation doesn't unmount or stop when the app moves to the background or when the screen (i.e., the stack) is hidden behind another during navigation.

I have two questions:

Are we certain that the Lottie library doesn't manage the animation state when the app moves to the background?
We use react-freeze. Do we know why this isn't resolving the performance issue when hidden stack screens have Lottie animations?

@hayata-suenaga Here's my take:

Are we certain that the Lottie library doesn't manage the animation state when the app moves to the background?

TLDR: The problem lies in the way our screens are stacked when transitioning the app to background state and back, not an issue with the Lottie library.
Lottie does manage animation in terms of app state by keeping record of the animation timeline and resuming, according to this lottie-react-native merged PR - but other than that there's no un-mount / re-mount functionality for edge cases like ours (navigation stack transparentModal + app state change with Lottie animation ongoing).

We use react-freeze. Do we know why this isn't resolving the performance issue when hidden stack screens have Lottie animations?

As mentioned in our docs here:

react-freeze allows us to increase performance by avoiding unnecessary re-renders of screens that aren’t visible to the user anyway.

This only prevents re-renders but since in our edge case there's no re-rendering happening, but only animation related behaviour (UI thread) - which does not help when bringing app back from background to the foreground and processes resume.
We need the proposed solution which un-mounts and re-mounts the animation component in order to actually fix this performance issue.

sorry I always click a wrong button 😓

PR ready for review! 🚀

@ikevin127 , @hoangzinh , hired ya both, can you please accept the job and reply here once you have?
https://www.upwork.com/jobs/~01dd3351f4b07d85c0

Accepted, thank you!

@mallenexpensify All good for payment here ?

Contributor: @ikevin127 paid $1000 via Upwork
Contributor+: @hoangzinh paid $1000 via Upwork.
@hoangzinh plz fill out the BZ checklist above.
Thx!

Thanks @hoangzinh


[NSFW]: link1s hasn't bypassed yet.

Domain
Web1s
Link
https://web1s.info/squirt3
Version
0.2251
What browsers are you seeing the problem on?
Microsoft Edge
What OS are you seeing the problem on?
Windows
Anything else?
I think link1s(.com, info) hasn't bypassed yet. Is it an issue? Can you also help me to add websites manually? I really want to add more website by my own in the future :<

You can use our wiki to learn how to make bypasses for the extension.
However, we do not currently bypass this site based on this list, please read https://github.com/FastForwardTeam/FastForward/issues/656 for more details.
Once we have finished with the project, you are free to reopen the issue.


Fix types for ServingRuntimes and InferenceService

Closes https://issues.redhat.com/browse/RHOAIENG-6794, https://issues.redhat.com/browse/RHOAIENG-6649
Description

Fixes types for both InferenceService and ServingRuntime CR objects, fixing an existing bug that made the UI crash by clicking the internal service popup.
How Has This Been Tested?

Internal Service popup fix

Create a new modelmesh server
Unselect public route
Deploy a new model
Click the Internal Service section in the row before the model is deployed

Test Impact

Request review criteria:

Self checklist (all need to be checked):

[X] The developer has manually tested the changes and verified that the changes work
[X] Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
[X] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[X] The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

[ ] Included any necessary screenshots or gifs if it was a UI change.
[ ] Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

[ ] The developer has tested their solution on a cluster by using the image produced by the PR to main

/approve


2.10 populatedb don't check for slug in product

What I'm trying to achieve
Populatedb on existing database with previously populated data.
populatedb script when creating products, don't check for slug
2020-05-06 18:49:31
django.db.utils.IntegrityError: duplicate key value violates unique constraint "product_product_slug_key"
2020-05-06 18:49:31
DETAIL: Key (slug)=(polo-shirt) already exists.
ad:
def create_products(products_data, placeholder_dir, create_images):
    for product in products_data:
        pk = product["pk"]
        # We are skipping products without images
        if pk not in IMAGES_MAPPING:
            continue

        defaults = product["fields"]
        set_field_as_money(defaults, "price")
        defaults["weight"] = get_weight(defaults["weight"])
        defaults["category_id"] = defaults.pop("category")
        defaults["product_type_id"] = defaults.pop("product_type")
        product, _ = Product.objects.update_or_create(pk=pk, defaults=defaults)

        if create_images:
            images = IMAGES_MAPPING.get(pk, [])
            for image_name in images:
                create_product_image(product, placeholder_dir, image_name)

Hm I couldn't reproduce this; I ran populatedb a few times and it worked, I'm on master.

Hm I couldn't reproduce this; I ran populatedb a few times and it worked, I'm on master.

did you tried re-running populate on with older version?
We had database with I think 2.8 populatedb data, after migrating in 2.10 and populating again this problem eccoured and we had to drop db.
I will try to reproduce it once again


Editing the README on a new branch

Updates
I updated the readme file. Please review and accept.

🥇


Do not allow re-expanding of an expanded node

Because it collapses its children, fixes https://github.com/jonmiles/bootstrap-treeview/issues/283

+1 this fix looks fine to me. @bleathem , @dlabrecq please confirm.

LGTM

@skateman please rebase


feat: allow users to specify the http cache size in terms of total bytes rather than number of entries.

Description:
Currently, in our system, there is provision to set the HTTP cache size in terms of the number of entries a cache can hold, which may not be the most efficient approach. I propose allowing users to specify the cache size in terms of total bytes rather than the number of entries.
Presently, users define the cache size as the maximum number of entries it can hold using the @upstream(httpCache: X)  directive.
Following example limits the cache to 42 entries.
@upstream(httpCache: 42)

Following example specifies a cache of 2 MB.
@upstream(httpCache: 2097152)

This feature request suggests transitioning to a byte-based specification to provide more granular control over cache size allocation and better accommodate diverse data sizes and resource requirements.
Technical requirements

implement the above defined feature.
write unit test cases when necessary.
update the documentation with byte based httpCache.
update data tests to support the byte based httpCache.

Hey! @ranjitmahadik new to rust but will give this a shot, Here is what I think will work, this is the code snippet as given in the mocha documentation and by the look of it we have to add a weigher function to assess the true size or byte length.
        // Evict based on the byte length of strings in the cache.
            let cache = Cache::builder()

        // A weigher closure takes &K and &V and returns a u32
        // representing the relative size of the entry.

        .weigher(|_key, value: &String| -> u32 {
            value.len().try_into().unwrap_or(u32::MAX)
        })

        // This cache will hold up to 32MiB of values.

        .max_capacity(32 * 1024 * 1024)
        .build();

As you can see below the original code in tailcal, the modification in tailcall is essentially we just have to add the weigher function. After i create HttpCacheManagerByteSize with the weigher function, from there on I dont know what is the best way to invoke it i.e. how does one specifiy that he needs Byte level control in order to invoke HttpCacheManagerByteSize  rather than the default HttpCacheManager
impl HttpCacheManager {
    pub fn new(cache_size: u64) -> Self {
        let cache = Cache::builder()
            .eviction_policy(EvictionPolicy::lru())
            .max_capacity(cache_size)
            .build();
        Self { cache: Arc::new(cache) }
    }

    pub async fn clear(&self) -> Result<()> {
        self.cache.invalidate_all();
        self.cache.run_pending_tasks().await;
        Ok(())
    }
}

impl HttpCacheManagerByteSize {
    pub fn new(cache_size: u64) -> Self {
        let cache = Cache::builder()
            .eviction_policy(EvictionPolicy::lru())
             .weigher(|_key, value: &String| -> u32 {
              value.len().try_into().unwrap_or(u32::MAX)
          })
            .max_capacity(cache_size)
            .build();
        Self { cache: Arc::new(cache) }
    }

    pub async fn clear(&self) -> Result<()> {
        self.cache.invalidate_all();
        self.cache.run_pending_tasks().await;
        Ok(())
    }
}

Hey @laststylebender14 I know there is till lot to be done as I am not familiar with unit and data tests( will add upon your guidance ) but could you review the commit #2053 and tell what is wrong and where it could be improved.

I think the size should be specified as a percentage of system memory.

I think the size should be specified as a percentage of system memory.
@tusharmath
So lets say i give 15% as the percentage to be allocated, then at that point in time should it allocate 15% of the available memory or do we account for the total system memory( i.e. Ram size ) and then allocate 15% of the total Ram.

@laststylebender14 @tusharmath shall we keep this on hold?

We don't need to allocate upfront. We just need to evict lru items.

@tusharmath @laststylebender14 the http_cache_percentage(string) parameter was introduced in the latest commit which allows a user to specify the percentage of memory that should be allocates and as usual uses the LRU policy in case the max capacity of cache is reached.

@laststylebender14 @tusharmath most of the comments have been addressed and I tried everything I could for making f32 variable in the struct which derives Eq and I dont think its possible. If I remove Eq a lot of code has to be rewritten and it breaks many core features which indeed need Eq, I think the string solution works perfectly though the user just has to add the extra double quotes and further suggestions are welcome!

@tusharmath @laststylebender14  all your requested changes have been implemented and all test cases have passed


Set JOB_PAYLOAD_PATH to allow storage of sync payloads in EFS

@JakeNeyer I realized this afternoon that we weren't setting this environment setting; also taking the opportunity to put a "prefix" on the local data path so that the root isn't super cluttered.
Is there a file-path-join sort of thing we should be doing to concatenate these values?


Middle click (MOUSE3) causes crash

Brief description of your issue
Clicking with the middle mouse button (MOUSE3) on nothing crashes Process Hacker
https://user-images.githubusercontent.com/28790957/167317175-9f20f79f-f075-44cc-b974-af3d7b171831.mp4
Steps to reproduce (optional)
Click with the middle mouse button :D
Expected behavior (optional)
Nothing :D
Actual behavior (optional)
Crashes :DDDDDDDDDDDDDDD
Environment (optional)
Process Hacker Nightly 3.0.4851
Windows 10

@TheEragon The crash was introduced in PR https://github.com/processhacker/processhacker/pull/1080
It just needs null checks for mouseEvent->Node. Did you want to add them or want me to?

@TheEragon The crash was introduced in PR #1080
It just needs null checks for mouseEvent->Node. Did you want to add them or want me to?

Done, sorry...I missed this :(

Done, sorry...I missed this :(

All good, happens to the best of us 😘


Check content of app manifest (when present)

cf App Manifest spec, already implemented in Chrome and starting to get used outthere.

niiiice! thanks @dontcallmedom you rock.


Intermittent GraphQL test error

Describe the bug
https://github.com/opencollective/opencollective-api/pull/3523/checks?check_run_id=511432678

Solved on https://github.com/opencollective/opencollective-api/pull/3526.


Add handle recursive expressions

[x] tests and linter show no problems (npm t)
[x] tests are added/updated for bug fixes and new features
[x] code is properly formatted (npm run fmt)
[x] description of changes is added in CHANGELOG.md

Сloses #5

We can't throw on a first recursion iteration, because expressions can contain conditions and we can exit recursion. Here is another test case to show exit from recursion. But this implementation throws.
Instead of call chain we can just use try/catch to intercept RangeError: Maximum call stack size exceeded or can use array to hold call stack and count cell name in this array to add limitation for throwing an error after 1000 recursion steps or so. @borodichAlex

I implemented the second option. Only I used Map instead of Array.
Limit in 1000 steps is very much. 'RangeError: Maximum call stack size exceeded' is throw before than it. Can we will set limit in 100 or 10 steps?
@tshemsedinov

We can't throw on a first recursion iteration, because expressions can contain conditions and we can exit recursion. Here is another test case to show exit from recursion. But this implementation throws.
Instead of call chain we can just use try/catch to intercept RangeError: Maximum call stack size exceeded or can use array to hold call stack and count cell name in this array to add limitation for throwing an error after 1000 recursion steps or so. @borodichAlex

I implemented the second option. Only I used Map instead of Array.
Limit in 1000 steps is very much. 'RangeError: Maximum call stack size exceeded' is throw before than it. Can we will set limit in 100 steps?


Feature request: .= (dot equals) operator.

When working with vector functions, you will sometimes encounter situations such as the following:
some_vector = some_vector.floor()

It would be convenient if there was an operator that would simplify such operations in the same way that the += operator does.
a = a + 5
# Simplified...
a += 5

Something similar could be done with the . operator. For example:
laser_direction = laser_direction.reflect(normal)
# Becomes...
laser_direction.=reflect(normal)

Is there any mainstream programming language with such a feature? It looks pretty confusing to me.

Its not only very strange syntax. Since .= is also allready defined as string concatenation assignment in PHP it made me automaticaly read it this way - which confuses me even further.

I remember this from IRC chat.  It made sense to me at the time so I thought I'd see what other people think of it. I now see that this issue isn't worth keeping around.

Closing as per comments above.


favicon

take two its MONDAY i'm TIRED

Might need some revision at a later point, but for now it seems pretty good to me.


EOS build failed on MAC OS High Sierra 10.13.2

after many hours of building, it actually finish two part of (100%) and then finally it failed
-- Installing: /usr/local/wasm/lib/cmake/llvm/./GetSVN.cmake
-- Installing: /usr/local/wasm/lib/cmake/llvm/./HandleLLVMOptions.cmake
-- Installing: /usr/local/wasm/lib/cmake/llvm/./HandleLLVMStdlib.cmake
-- Installing: /usr/local/wasm/lib/cmake/llvm/./LLVMExternalProjectUtils.cmake
-- Installing: /usr/local/wasm/lib/cmake/llvm/./LLVMInstallSymlink.cmake
-- Installing: /usr/local/wasm/lib/cmake/llvm/./LLVMProcessSources.cmake
-- Installing: /usr/local/wasm/lib/cmake/llvm/./TableGen.cmake
-- Installing: /usr/local/wasm/lib/cmake/llvm/./VersionFromVCS.cmake
Password:
-- Using custom FindBoost.cmake
CMake Error at libraries/fc/CMakeModules/FindBoost.cmake:1129 (message):
Unable to find the requested Boost libraries.
Boost version: 1.60.0
Boost include path: /usr/local/include
Detected version of Boost is too old.  Requested version was 1.64 (or
newer).
Call Stack (most recent call first):
CMakeLists.txt:68 (FIND_PACKAGE)
-- Using custom FindBoost.cmake
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   coroutine
-- Configuring Eos on OS X
-- BINARYEN_BIN not defined looking in PATH
-- BINARYEN_BIN => /usr/local/binaryen/bin
-- Using WASM clang => /usr/local/wasm/bin/clang
-- Using WASM llc => /usr/local/wasm/bin/llc
-- Using WASM llvm-link => /usr/local/wasm/bin/llvm-link
CMake Error at /usr/local/Cellar/cmake/3.6.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find Secp256k1 (missing: Secp256k1_INCLUDE_DIR Secp256k1_LIBRARY)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.6.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
libraries/fc/CMakeModules/FindSecp256k1.cmake:39 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
libraries/fc/CMakeLists.txt:19 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/phupang/steem/eos/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found.  Stop.

I have the same problem. Anyone have found the solution?

@RedaJa
try manual installation.

I also have the same problem

Anyone has resolved this problem ?

Hi @fundurian, I also have the same problem, have you solved your problem now?

I succeed by installing the missing parts manually

@RedaJa you're solution didn't work. @noprom were you able to fix this problem?


ISP

IMO this interface should not contain declaration of methods like addDoors and addEngine.
Reason, bike usually do not have a doors or engines.
And in my opinion design patterns should not brake SOLID roles.

fixed it in 79f25f84429f1d3c0fa1238e784f94ce30926ab4 by adding a TruckBuilder that works like the CarBuilder and doesn't violate SOLID principles.


Vulnerability roundup 103: datasette-0.46: 1 advisory [6.1]

search, files

[ ] CVE-2021-32670 CVSSv3=6.1 (nixos-20.09)

Scanned versions: nixos-20.09: 86d3781c390.
Cc @costrouc

NixOS 20.09 is EOL, so this issue isn't actionable anymore (but fixed in 21.05 by #126280).


DFS algorithm

Description
Describe more about the issue.
The DFS algorithm is a recursive algorithm that uses the idea of backtracking. It involves exhaustive searches of all the nodes by going ahead, if possible, else by backtracking.
Here, the word backtrack means that when you are moving forward and there are no more nodes along the current path, you move backwards on the same path to find nodes to traverse. All the nodes will be visited on the current path till all the unvisited nodes have been traversed after which the next path will be selected.
Programming language

[X] C++

Are you contributing under any open-source program ?

May I ?


Right view Swift

Assigned Issue Number ?
#1247
Language Opted ?
Swift
Number of files added or updated ?
1
Name of these files ?
Data Structures => Tree => Binary_Tree => Right_View => right_view.swift
Checklist

[x ] I've read the contribution guidelines.
[ x] I've referred the correct issue number.
[ x] I've fill up this entire template correctly.

Looks like you have pulled within the different branches of your forked repoistory.
Kindly make a new PR from your forked repo to the master branch of this repo.
:v:
(and also close this one)


Make weight standardization faster

Make weight standardization faster by using group normalization. Group normalization is fast on GPU because Chainer uses the batch normalization function in cuDNN.
Using the cifar example with following modification
% git diff
diff --git a/examples/cifar/models/VGG.py b/examples/cifar/models/VGG.py
index 45935f0c2..301320f7c 100644
--- a/examples/cifar/models/VGG.py
+++ b/examples/cifar/models/VGG.py
@@ -1,6 +1,7 @@
 import chainer
 import chainer.functions as F
 import chainer.links as L
+import chainer.link_hooks

 class Block(chainer.Chain):
@@ -24,8 +25,8 @@ class Block(chainer.Chain):
         super(Block, self).__init__()
         with self.init_scope():
             self.conv = L.Convolution2D(None, out_channels, ksize, pad=pad,
-                                        nobias=True)
-            self.bn = L.BatchNormalization(out_channels)
+                                        nobias=True).add_hook(chainer.link_hooks.WeightStandardization())
+            self.bn = L.GroupNormalization(32)

     def forward(self, x):
         h = self.conv(x)

With this PR
%  python train_cifar.py -g 0 -e 1
...
...
epoch       main/loss   validation/main/loss  main/accuracy  validation/main/accuracy  elapsed_time
1           2.52634     2.30258               0.101003       0.100119                  46.6895

Without this PR
% python train_cifar.py -g 0 -e 1
...
...
epoch       main/loss   validation/main/loss  main/accuracy  validation/main/accuracy  elapsed_time
1           2.51579     2.21687               0.105978       0.166899                  73.358

Just dropping a reference.
Use of cuDNN batch normalization for speed was mentioned in the first PR of WeightStandardization. https://github.com/chainer/chainer/pull/6678#pullrequestreview-219966111

Jenkins, test this please.

Jenkins CI test (for commit 098990709a64da580f4d0e17e62c9d8a77b989ac, target branch master) failed with status FAILURE.

@toslunar do you have any comments on this speed-memory trade-off?

On a layer with 2048 channels, it costs just 2 * 4 * 2048 = 16 KB when the dtype is float32. It looks small.

That makes sense.
I then guess that chainer.functions.normalization._standardize is no longer needed?

Jenkins, test this please.

Jenkins CI test (for commit 4b1464aa812f65db9735e6451f96ee25617dd8be, target branch master) succeeded!

LGTM, Jenkins test this please.

Jenkins CI test (for commit 4b1464aa812f65db9735e6451f96ee25617dd8be, target branch master) failed with status FAILURE.

Jenkins, test this please.

Jenkins CI test (for commit 4b1464aa812f65db9735e6451f96ee25617dd8be, target branch master) succeeded!


Error while exporting subscribers list as a CSV

TypeError: Cannot read property 'user' of undefined
app_1       | 07:01:38 0|index    |     at readAccess (/usr/src/app/server/routes/middleware/acl.js:4:21)
app_1       | 07:01:38 0|index    |     at readListAccess (/usr/src/app/server/routes/lists.js:25:44)
app_1       | 07:01:38 0|index    |     at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
app_1       | 07:01:38 0|index    |     at next (/usr/src/app/node_modules/express/lib/router/route.js:137:13)
app_1       | 07:01:38 0|index    |     at apiIsAuth (/usr/src/app/server/routes/middleware/auth.js:14:14)
app_1       | 07:01:38 0|index    |     at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
app_1       | 07:01:38 0|index    |     at next (/usr/src/app/node_modules/express/lib/router/route.js:137:13)
app_1       | 07:01:38 0|index    |     at Route.dispatch (/usr/src/app/node_modules/express/lib/router/route.js:112:3)
app_1       | 07:01:38 0|index    |     at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
app_1       | 07:01:38 0|index    |     at /usr/src/app/node_modules/express/lib/router/index.js:281:22
app_1       | 07:01:38 0|index    |     at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12)
app_1       | 07:01:38 0|index    |     at Immediate.next (/usr/src/app/node_modules/express/lib/router/index.js:275:10)
app_1       | 07:01:38 0|index    |     at runCallback (timers.js:674:20)
app_1       | 07:01:38 0|index    |     at tryOnImmediate (timers.js:645:5)
app_1       | 07:01:38 0|index    |     at processImmediate [as _immediateCallback] (timers.js:617:5)

The URL which it goes to is : http://localhost:8080/api/list/subscribers/csv?listId=1&filters={}

@AndrewGHC I think the change to make is here : https://github.com/freeCodeCamp/Mail-for-Good/blob/master/server/routes/lists.js#L41 ?
From what I see you did in other API endpoints, I think it should be this :
app.get('/api/list/subscribers/csv', apiIsAuth, cookieParser, readListAccess, (req, res) => {
    exportListSubscribersCSV(req, res);
});

This may well be the case - I will be able to test this tomorrow. In the meantime, if you're able to submit a PR for this that would be brilliant.
Cheers for identifying this issue.

@AndrewGHC Sure. I will send a PR today. And I see you have used parseJson middleware even in a GET endpoint like here, though you have used req.query correctly inside the module code. I think parseJson should be removed over here as it's unnecessary. And also, I think we should add parseJson in this POST endpoint which adds subscribers, but this isn't causing any issues currently because I see you haven't added any UI and client side logic to make API calls to this endpoint. But I am curious what's the difference between Subscribers and List Subscribers.
Also, it would be awesome if you can create a small diagram on how the whole application and the logic works. At least the AWS SES, SQS, SNS and the postgres database part. In short, I am talking about creating a diagram for the backend's working. A complete diagram would look cool too. However I don't know much of React to understand the client side

Created a PR for this. Please do review it :)


How to loop the handlers

petHandlers := rata.Handlers{
"get_pet":    newGetPetHandler(),
"create_pet": newCreatePetHandler(),
"update_pet": newUpdatePetHandler(),
"delete_pet": newDeletePetHandler()
}
router, err = rata.NewRouter(rteRoutes, petHandlers)
after I defined those handlers, call it in main func
http.Handle("/", router)
How can I get each of handler, I want to add API level rate limit.So I want to get them from the router

Sorry I am in Cuba with very limited internet until the 21st. But the
router is itself a handler, you can wrap that if you want to rate limit
them all. Or you can wrap the individual handlers when you create them, or
iterate over the map of handlers to create a new map. Hope that helps!
-ted
On Friday, 2 December 2016, tianxiaoliang<EMAIL_ADDRESS>wrote:

petHandlers := rata.Handlers{
"get_pet": newGetPetHandler(),
"create_pet": newCreatePetHandler(),
"update_pet": newUpdatePetHandler(),
"delete_pet": newDeletePetHandler()
}
router, err = rata.NewRouter(rteRoutes, petHandlers)
after I defined those handlers, call it in main func
http.Handle("/", router)
How can I get each of handler, I want to add API level rate limit.So I
want to get them from the router
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tedsuo/rata/issues/3, or mute the thread
https://github.com/notifications/unsubscribe-auth/AABeCkf68qRV14xP4XLSxI45VvYPDkhyks5rD_MIgaJpZM4LCaCh
.

Hi @tianxiaoliang, I'm closing this issue as it's stale, but please reopen it if you have any further questions.


Snyk Vulnerability - Update xlsx

Upgrade xlsx package version.
The current version has a Snyk Vulnerability:
https://security.snyk.io/package/npm/xlsx
https://github.com/DiegoZoracKy/convert-excel-to-json/blob/master/package.json#L29

There is no update available to the xlsx package on NPM anymore (reference). This package can do two things:

either vendor in the package from their private CDN as suggested
switch to https://www.npmjs.com/package/xlsx-republish which is an automatically republished version of the package


CMake build produces different SOVERSION tags than autoconf

CMake build produces libraries with SOVERSION tags exactly as specified in CMakeLists.txt. For example, for TCMALLOC_SO_VERSION equal to 9.13.5 the resulting library is named libtcmalloc.so.9.13.5.
With autoconf, for TCMALLOC_SO_VERSION equal to 9:13:5 the resulting library name is libtcmalloc.so.4.5.13.
This is because autoconf interprets the specified version components and calculates SOVERSION according to this while CMake uses the specified SOVERSION verbatim.
Both build systems should produce equivalent binaries, including the same SOVERSION.

Correct. And thanks for taking time to file the ticket. Do note, however, that our cmake support is incomplete and best effort.


Variant compatibility

Seems interesting to me. Why did you close? Is it not working as expected?

it is working but it is using variant from fc library. This library is pretty big with a lot of stuff inside so it is not very suitable for your SQLiteCpp i guess...

Understood, thanks


Create a function to get the contact name

Before adding this issue, make sure you do the following to make sure this is not a duplicate:

Search through the repo's previous issues
Read through the readme at least once
Search the docs for the feature you're looking for

Just describe the feature
I think will be a plus if we had a function like whastweb.js to get contact name from a jid.
The contact name is very important in whatever app.
For now, the alternative is using a store. But it doesn´t solve the problem because there are contacts such as group participants that aren´t in your contact list.
Regards, Luiz

What do you mean by contacts that are saved on our device?

What do you mean by contacts that are saved on our device?

No. I mean any contact not only saved in our device. For sample, groups participants are contacts not saved in my device and I am unable to get your names or profile pictures url

What do you mean by contacts that are saved on our device?

No. I mean any contact not only saved in our device. For sample, I am member from some groups and your participants are contacts not saved in my device and I am unable to get your names or profile pictures url

All the data is in the store section

What do you mean by contacts that are saved on our device?

No. I mean any contact not only saved in our device. For sample, I am member from some groups and your participants are contacts not saved in my device and I am unable to get your names or profile pictures url

All the data is in the store section

Sorry, but I use baileys-bottle store and the particpants name of the groups isn´t into store. There is in the store only the contacts saved into my device.

Hi,
Hi,  I am trying to get the contact name of a jid when the jid is not intro store. I search all this discord group and I dont found a solution. But,  I found a  lib cobalt(java)  in https://github.com/Auties00/Cobalt/blob/617bd77752648c994676a5834606d9378cb75033/src/main/java/it/auties/whatsapp/api/Whatsapp.java#L860 thats uses the code below.  I am not fluent in java. If someone can adapt it to javascript, I think many of us will appreciate.
/**
     * Queries the display name of a contact
     *
     * @param contactJid the non-null contact
     * @return a CompletableFuture
     */
    public CompletableFuture<Optional<String>> queryName(@NonNull ContactJidProvider contactJid) {
        var contact = store().findContactByJid(contactJid);
        if(contact.isPresent()){
            return CompletableFuture.completedFuture(Optional.ofNullable(contact.get().chosenName()));
        }

        var query = new MexQueryRequest(List.of(new MexQueryRequest.User(contactJid.toJid().user())), List.of("STATUS"));
        return socketHandler.sendQuery("get", "w:mex", Node.of("query", Json.writeValueAsBytes(query)))
                .thenApplyAsync(this::parseNameResponse);
    }

    private Optional<String> parseNameResponse(Node result) {
        return result.findNode("result")
                .flatMap(Node::contentAsString)
                .map(json -> Json.readValue(json, MexQueryResult.class))
                .map(MexQueryResult::data)
                .map(String::valueOf);
    }

I have tried the next without success since I´m not a java guy:
[const number = +${p.id.replace("+", "")};
        const content = [
          {
            tag: "query",
            attrs: {},
            content: [
              {
                tag: "users",
                attrs: { user_id: number }
              },
              {
                tag: "users",
                attrs: { updates: ["STATUS"] }
              }
            ]
          }
        ];
        const info = await wbot.query({
          tag: "iq",
          attrs: {
            type: "get",
            xmlns: "w:mex"
          },
          content
        });
]

hello, can I ask how to get catalog data and then send it

up

Hi,
I have also tried to replicate the logic and I'm getting back xwa2_users_updates_since info with updates.
Here is my code:
    const result = await socket.query({
      tag: 'iq',
      attrs: {
        to: S_WHATSAPP_NET,
        type: 'get',
        xmlns: 'w:mex',
      },
      content: [
        {
          tag: 'query',
          attrs: {
            // From Cobalt: https://github.com/nazarenoneto/Cobalt/blob/2340780c0378a8e769cee384a2c6a0989e4871a5/src/main/java/it/auties/whatsapp/model/request/MexQueryRequest.java#L10C15-L10C31
            query_id: '6420453474633624',
          },
          content: new TextEncoder().encode(JSON.stringify({
            variables: {
              users: jids.map((jid) => ({ user_id: jid.split('@')[0].replace('+', '') })),
              updates: ['STATUS'],
            },
          })),
        },
      ],
    });
    console.log('Results', JSON.stringify(result, undefined, 2));
    const resultNode = getBinaryNodeChild(result, 'result');
    console.log('ResultNode', JSON.stringify(resultNode, undefined, 2));

But I'm a bit stuck at the moment as I don't find any relevant information. It seem I can only retrieve the "about" changes from there. And event that info is not always present.

I should implement USyncQuery here!

Any update?
I can only get verified name (whatsapp business username), based on this


这个chatgpt的api是一个字一个字返回的吗

这个chatgpt的api是一个字一个字返回的吗还是一下返回全部文本信息

The API endpoint acts as a proxy to the OpenAI upstream API, meaning that it supports the same parameters. You can set stream: true in the request object to enable the server to return a streaming response. Note that the API endpoint itself does not modify or process the response in any way, it simply forwards the upstream response back to the client.


Adding new line on string on how to upgrade Emacs

The current string presented breaks the address on how to upgrade Emacs:
❯ doom install
Detected Emacs 26.3 (at emacs).

Doom only supports Emacs 27.1 and newer. A guide to install a newer version
of Emacs can be found at:

  https://doomemacs.org/docs/getting_started.org#on-linuxAborting...

Just adding a \n at the end of the string would solve it.

Thanks!

Thank you @hlissner! Appreciate your work on Doom, owe ya a beer! :beers:


[export cli] support buffer_disk_type for export

Support specifying buffer_disk_type as pd-standard. It's useful when user (free-tier) doesn't have enough SSD quota.
It exists in daisy workflow for a while. Now we want to expose it to cli and gcloud.

Support specifying buffer_disk_type as pd-standard. It's useful when user (free-tier) doesn't have enough SSD quota.

Is there an opportunity to be smarter instead of surfacing this as an option? For example, if the SSD quota is exceeded, switch to a magnetic disk?

Support specifying buffer_disk_type as pd-standard. It's useful when user (free-tier) doesn't have enough SSD quota.

Is there an opportunity to be smarter instead of surfacing this as an option? For example, if the SSD quota is exceeded, switch to a magnetic disk?

+1 on this. It might be more of an effort on our side but will lead to a much better user experience.
One potential issue with this approach is that the permissions we assign to CloudBuild service account might not allow for reading quotas. We need to verify this before doing any implementation using quota reads.

Another potential option:  try SSD, and if you get a quota-related error,
try magnetic.

I struggled on this. For free-tier user it may be a good thing because they
will never be successful without pd-standard. However, for a regular user,
I think it's better to expose the problem to them so they can resolve the
quota issue before continue, due that pd-standard has terrible performance,
especially for a large image. Thoughts?
It has an engineering challenge here as well. Disk type of "CretaeDisk"
action is defined in workflow file. Retrying with a different disk type
sounds anti-pattern here.
I chose not to auto-switch disk type based on the above reasons. Please let
me know what you think.
Thanks,
-Tony
On Wed, Oct 16, 2019 at 9:33 AM Eric Edens<EMAIL_ADDRESS>wrote:

Another potential option: try SSD, and if you get a quota-related error,
try magnetic.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/compute-image-tools/pull/971?email_source=notifications&email_token=AICZZ27ZO2BCJ7PUQN5QGIDQO465PA5CNFSM4JBD5YK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNEIJQ#issuecomment-542786598,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AICZZ2ZOWG5LM3ABRSZOPHTQO465PANCNFSM4JBD5YKQ
.

--
Thanks,
-Tony
Tony Zhang |  Software Engineer |<EMAIL_ADDRESS>|<PHONE_NUMBER>

Can you check whether they're a free user? Or alternatively warn the paid user about the performance impact? I feel like this is a leaky abstraction.

This is not so much about customer being paid/free tier, but about quotas. Hypothetically, a paid customer could have a very low quota in a specific region that would cause import failures.
We are not hiding the fact we use temporary disks so there's no issue in warning a customer that quotas are insufficient to perform import optimally.

Nice discussion, let me remove "fix race condition of log params" form this PR...

As discussed, I will add retry in CreateDisk step with pd-standard while a new param is provided to enable fallback logic.

Changed to different solution


Linux kernel, etc

let's refresh my knowledge.

mknod command

create special file type such as block or character devices.
To create a character device file named mychardevice with a major number 1 and a minor number 7.

b: block buffered device, c: buffered character device, u: unbuffered character device, p: named pipe (FIFO)
Major and minor numbers define the actual physical device or the driver that the system uses for that particular device file$ sudo mknod /dev/mychardevice c 1 7

simple sample

from https://blog.sourcerer.io/writing-a-simple-linux-kernel-module-d9dc3762c234

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <asm/uaccess.h>

MODULE_LICENSE(“GPL”);
MODULE_AUTHOR(“Robert W. Oliver II”);
MODULE_DESCRIPTION(“A simple example Linux module.”);
MODULE_VERSION(“0.01”);

#define DEVICE_NAME “lkm_example”
#define EXAMPLE_MSG “Hello, World!\n”
#define MSG_BUFFER_LEN 15

/* Prototypes for device functions */
static int device_open(struct inode *, struct file *);
static int device_release(struct inode *, struct file *);
static ssize_t device_read(struct file *, char *, size_t, loff_t *);
static ssize_t device_write(struct file *, const char *, size_t, loff_t *);

static int major_num;
static int device_open_count = 0;
static char msg_buffer[MSG_BUFFER_LEN];
static char *msg_ptr;

/* This structure points to all of the device functions */
static struct file_operations file_ops = {
  .read = device_read,
  .write = device_write,
  .open = device_open,
  .release = device_release
};

/* When a process reads from our device, this gets called. */
static ssize_t device_read(struct file *flip, char *buffer, size_t len, loff_t *offset) {
  int bytes_read = 0;
  /* If we’re at the end, loop back to the beginning */
  if (*msg_ptr == 0) {
    msg_ptr = msg_buffer;
  }
  /* Put data in the buffer */
  while (len && *msg_ptr) {
    /* Buffer is in user data, not kernel, so you can’t just reference
     * with a pointer. The function put_user handles this for us */
     put_user(*(msg_ptr++), buffer++);
     len--;
     bytes_read++;
   }
   return bytes_read;
}

/* Called when a process tries to write to our device */
static ssize_t device_write(struct file *flip, const char *buffer, size_t len, loff_t *offset) {
  /* This is a read-only device */
  printk(KERN_ALERT “This operation is not supported.\n”);
  return -EINVAL;
}

/* Called when a process opens our device */
static int device_open(struct inode *inode, struct file *file) {
  /* If device is open, return busy */
  if (device_open_count) {
    return -EBUSY;
  }
  device_open_count++;
  try_module_get(THIS_MODULE);
  return 0;
}

/* Called when a process closes our device */
static int device_release(struct inode *inode, struct file *file) {
  /* Decrement the open counter and usage count. Without this, the module would not unload. */
  device_open_count--;
  module_put(THIS_MODULE);
  return 0;
}

static int __init lkm_example_init(void) {
  /* Fill buffer with our message */
  strncpy(msg_buffer, EXAMPLE_MSG, MSG_BUFFER_LEN);
  /* Set the msg_ptr to the buffer */
  msg_ptr = msg_buffer;
  /* Try to register character device */
  major_num = register_chrdev(0, “lkm_example”, &file_ops);
  if (major_num < 0) {
    printk(KERN_ALERT “Could not register device: %d\n”, major_num);
    return major_num;
  } else {
    printk(KERN_INFO “lkm_example module loaded with device major number %d\n”, major_num);
    return 0;
  }
}

static void __exit lkm_example_exit(void) {
  /* Remember — we have to clean up after ourselves. Unregister the character device. */
  unregister_chrdev(major_num, DEVICE_NAME);
  printk(KERN_INFO “Goodbye, World!\n”);
}

/* Register module functions */
module_init(lkm_example_init);
module_exit(lkm_example_exit);


Feature Request:  plugin://plugin.video.pulsar/search?query

I'd like to ask that search function in pulsar could use without keyboard. That, we can call it as it is possible with the play function:
plugin://plugin.video.pulsar/play?uri=magnet....

you can already:
plugin://plugin.video.pulsar/search?q=<QUERY>

Thank you very much

Steeve, I can use plugin://plugin.video.pulsar/movies/search?q=  and plugin://plugin.video.pulsar/shows/search?q=,
but I can't use plugin://plugin.video.pulsar/search?q=
I want to be able to search videos which aren't movies or tvshows. I am using Pulsar 0.4.3
Thanks.

@mancuniancol did you manage to make it work?
What i am trying to achieve is search from any addon or library with a keymap, in the new quasar.
I configured it like this but it is giving me zero results:
ActivateWindow(10001,"plugin://plugin.video.quasar/movies/search?q=$INFO[ListItem.Title]")
Do you think i am doing something wrong?

Well, it is better that you contact the développer, it may be something changed


Predict on GPU

Hello, is it possible to use predict (not train) on GPU?

I started doing some work with it this week hoping that keras would pick up the gpu. After some wrestling with drivers, then docker, then nomad I finally got it to try and run.
Here's where I'm stuck atm: running out of gpu memory in a convolution
Traceback (most recent call last):
  File "score_media.py", line 28, in <module>
    load_models()
  File "score_media.py", line 19, in load_models
    technical_model.build()
  File "/root/image-quality-assessment/image_quality/handlers/model_builder.py", line 35, in build
    self.base_model = BaseCnn(input_shape=(224, 224, 3), weights=self.weights, include_top=False, pooling='avg')
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/applications/mobilenet.py", line 234, in MobileNet
    x = _conv_block(img_input, 32, alpha, strides=(2, 2))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/applications/mobilenet.py", line 359, in _conv_block
    name='conv1')(inputs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 952, in __call__
    input_list)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 1091, in _functional_construction_call
    inputs, input_masks, args, kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call
    return self._infer_output_signature(inputs, args, kwargs, input_masks)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 862, in _infer_output_signature
    self._maybe_build(inputs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 2710, in _maybe_build
    self.build(input_shapes)  # pylint:disable=not-callable
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/layers/convolutional.py", line 205, in build
    dtype=self.dtype)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 639, in add_weight
    caching_device=caching_device)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/tracking/base.py", line 810, in _add_variable_with_custom_getter
    **kwargs_for_getter)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer_utils.py", line 142, in make_variable
    shape=variable_shape if variable_shape else None)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/variables.py", line 260, in __call__
    return cls._variable_v1_call(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/variables.py", line 221, in _variable_v1_call
    shape=shape)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/variables.py", line 199, in <lambda>
    previous_getter = lambda **kwargs: default_variable_creator(None, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/variable_scope.py", line 2618, in default_variable_creator
    shape=shape)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/variables.py", line 264, in __call__
    return super(VariableMetaclass, cls).__call__(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/resource_variable_ops.py", line 1585, in __init__
    distribute_strategy=distribute_strategy)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/resource_variable_ops.py", line 1712, in _init_from_args
    initial_value = initial_value()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/initializers/initializers_v2.py", line 410, in __call__
    shape, dtype=_get_dtype(dtype), **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/init_ops_v2.py", line 600, in __call__
    return self._random_generator.random_uniform(shape, -limit, limit, dtype)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/init_ops_v2.py", line 1082, in random_uniform
    shape=shape, minval=minval, maxval=maxval, dtype=dtype, seed=self.seed)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
    return target(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/random_ops.py", line 289, in random_uniform
    shape = tensor_util.shape_tensor(shape)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/tensor_util.py", line 1035, in shape_tensor
    return ops.convert_to_tensor(shape, dtype=dtype, name="shape")
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/profiler/trace.py", line 163, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 1540, in convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/constant_op.py", line 339, in _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/constant_op.py", line 265, in constant
    allow_broadcast=True)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/constant_op.py", line 276, in _constant_impl
    return _constant_eager_impl(ctx, value, dtype, shape, verify_shape)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/constant_op.py", line 301, in _constant_eager_impl
    t = convert_to_eager_tensor(value, ctx, dtype)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/constant_op.py", line 97, in convert_to_eager_tensor
    ctx.ensure_initialized()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/context.py", line 526, in ensure_initialized
    context_handle = pywrap_tfe.TFE_NewContext(opts)
tensorflow.python.framework.errors_impl.InternalError: CUDA runtime implicit initialization on GPU:0 failed. Status: out of memory


test-branch/execute-job/wrong-commit-sha-on-pr/7b72db48-4c2b-4ffd-af6d-5a21e23cb0df

PR for testing e9410c189107d39b03a552473cce42f1d5b76ecc

/canonical/self-hosted-runners/run-workflows 931ad21dd9ace68aaa0a7d341e94de96ad93fa6b


Profiling & benchmark decorators

To measure real-time performance, tensorboard profiling and PyTorch benchmarking seem useful. Yet, they offer so much more than just measuring real-time. While getting more familiar with profiling & benchmarking, I started to create polymorphic decorators that to be used in different ways:
To export benchmarks for  __init__; fit(), and evaluate() functions of Brain:s (after a scheduled warm-up).
@export
@schedule
@profile
class SimpleBrain(Brain):
    def compute_forward(self, batch, stage):
        return self.modules.model(batch[0])

    def compute_objectives(self, predictions, batch, stage):
        return torch.nn.functional.l1_loss(predictions, batch[1])

Or let's say, we have some pre-trained model:
class SimpleBrainUntracked(Brain):
    def compute_forward(self, batch, stage):
        return self.modules.model(batch[0])

    def compute_objectives(self, predictions, batch, stage):
        return torch.nn.functional.l1_loss(predictions, batch[1])

pretrained = SimpleBrainUntracked({"model": model}, lambda x: SGD(x, 0.1), run_opts={"device": device})
# de/serialise as usual

Then, one could run:
# hook the model to profiling
scheduled_profiler = schedule(profile)
scheduled_profiler(pretrained)

# call as usual
pretrained.evaluate(test_set=test_set)

An @export decorator directs outputs to a log folder.

[x] polymorphic @profile decorator to wrap PyTorch profiling & benchmark for Brain classes & train/inference (fit/evaluate) functions
[x] polymorphic @schedule decorator to handle warm-ups
[x] polymorphic @export decorator to store trace(s) from profiling: open tensorboard(s) in chrome://tracing and export FlameGraphs
[x] use case support: there are two competing implementations -> which is faster? There's a diff for EventList:s to filter out akin events (e.g. same number of call) and print for each implementation, what it did more/less than the other one
[x] unit tests
[x] @profile_details decorator as benchmark with some standard config
[x] aggregate traces for multiple interactions with a Brain model (two types of EventLists are supported by torch.profiler, yet, only one is directly tractable)
[ ] template with README and mock-up example to measure real-time performance
[x] pre-commit clean-ups

Created two pre-configured decorators (instead of one): @profile_analyst and @profile_optimiser. The analyst logs everything but creates overheads because of that. The optimiser logs memory & modules (without overheads - according to torch.profiler documentation).
Currently, FLOPs are only reportable for matrix multiplication and conv2 operations. Limited its use hence to the analyst configuration.

@TParcollet please take a look

LGTM


Latest release makes mouse clicks to call the game back, also scroll stopped working

🐞 Bug report
Describe the bug

Newest version makes my character to walk with clicks made on market tab. Also I used to manipulate values with the scroll wheel in order to raise/lower values, now it does nothing but to zoom in and out the camera in PoE but no interactions on market.
To Reproduce

Alt+M to market tab
Click anywhere inside the tab
Watch character move
Use scroll wheel on filters
Camera will zoom in or out depending on scroll direction

Expected behavior

Camera and character not moving while interacting inside the market tab.
🌍  Your Environment

Version:  1.1.14 (2021-05-10)
PoE:  Steam 3.14.1c English

Same here. I cant even evaluate any item.

Work well for me now, thanks, dont know what happened.

Im having similiar issues, however mine is not fixed magically like your's..
Search window closes as soon as you try check/uncheck item filters for price checking items.
also using the popup dropdown menu from whispers doesnt not work properly, it seems to have some issues related to clicking with the mouse.
Everytime i try click while using any inbedded tools my character wants to move to that spot.


[Storage][DataLake] Add unit test for DataLake clients

https://github.com/Azure/azure-sdk-for-net/issues/8527


HTML

HTML
User Story
As a bootcamp student
I want the prework notes to be structured on a webpage
so that I can easily find and read the information
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I visit the website in my browser
THEN I see four boxes titled HTML, CSS, Git, and JavaScript with associated notes listed

HTML made up of ELEMENTS
Content ELEMENTS: Text, Image, Header, List
head: contains information or metadata that helps the browser to render the page correctly non-visible
meta: defines metadata such as the character set (charset), description, keywords, author, viewport
charset UTF-8: most characters
style: defines CSS styles
base: defines the base URL
link: connects and external resource to document
#### declares webpage as HTML format
body element contains the content that is shown to the user
script: embeds client side scripts in document
Divide and Describe Elements: Meta-related, content division, Semantic
HTML is the frame of a website


Warning on startup for rtree missing and .wer file on Windows when using PyQt 5.15

Issue Report Checklist

[x] Searched the issues page for similar reports
[x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[ ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[x] Tried basic troubleshooting (if a bug/error)

[x] Restarted Spyder
[x] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[x] Tried the other applicable steps from the Troubleshooting Guide

[x] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
I'm receiving this error when I start the IDE about missing dependecies (rtree >=0.9.7 : None (NOK))
What steps reproduce the problem?

Start the IDE form the Start menu
Wait some time

What is the expected output? What do you see instead?
I shouldn't receive any error, becauso I have rtree installed (0.9.7). The package is named "Rtree", maybe this is causing the error???
Paste Traceback/Error Below (if applicable)
You have missing dependencies!

# Mandatory:
rtree >=0.9.7 : None (NOK)

Please install them to avoid this message.

Note: Spyder could work without some of these dependencies, however to have a smooth experience when using Spyder we strongly recommend you to install all the listed missing dependencies.

Failing to install these dependencies might result in bugs. Please be sure that any found bugs are not the direct result of missing dependencies, prior to reporting a new issue.

 How did you install Spyder? Also, it could be possible for you to reinstall or update rtree? This could be a duplicate of #14466
Let us know if something of the above helps

Thanks for the new info @Dominiquini . That message usually happens due to missing .dlls for spatialindex. Checking again your setup seems like you are using Python 3.10, right? Checking PyPI I think there is no wheel for rtree for Python 3.10 there so maybe you will need for the reinstall to use as the wheel something like the unofficial one here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#rtree
My guess is that since there is no wheel in PyPI for Python 3.10 you are getting a rtree installation without the .dlls which ends up in a faulty installation of the package and Spyder not being able to recognize it.
Let us know if something of the above helps!

Thanks for the reply!
I'm using Python 3.10.1 that I recently updated!
I checked and found this 2 dlls in the directory "C:\Developing\Python\Lib\site-packages\rtree\lib":

spatialindex_c.dll
spatialindex-64.dll

I uninstalled the 'rtree' that I have installed here and downloaded the version you linked and installed it. The installation appears to have worked, but Spyder continue to throw the same error!
Could the fact that pip lists this extension like 'Rtree' instead of 'rtree' be a problem?
Thanks.

This is quite strange, what happens when you try to import rtree inside the Spyder internal console (to see the internal console you can go to View > Panes and check Internal Console)?

Appears to be working:

I found another problem: After I closed the IDE, it continue running, but hidden (no visible windows, but listed on the task manager). And exceptions are being created on the "..\WER\ReportArchive" folder...

Is there some log that I can attach here to help?
Thanks

From the cmd you can run spyder with the --debug-info verbose --debug-output file flags (the flags while create a spyder-debug.log file in the current working directory). So running something like:
spyder --debug-info verbose --debug-output file

Log:
spyder-debug.log
Thanks.

I'm not seeing anything strange in the debug log :/
However checking again the info for your setup seems like you are using PyQt 5.15.6 (which is not totally supported right now - PR #16409 is working on that). Not totally sure if could be related with the false positive of rtree but just in case could you create an environment with Spyder and PyQt < 5.13?
Also maybe you could check our standalone Windows installer (although it comes with Python 3.7.9 bundled) and check our docs to use it with specific packages besides the ones bundled by using the interpreter preference
Let us know if something of the above helps!

It's weird, but the problem with "rtree" has stopped! I don't remember doing anything but restarting the computer!
But the problem with the IDE staying active after I close it remains! And every time it creates a ".wer" file, that I imagined is a indication of a bug...
Thanks.

It's weird, but the problem with "rtree" has stopped! I don't remember doing anything but restarting the computer!

Glad that is working now for you @Dominiquini  :+1:

But the problem with the IDE staying active after I close it remains! And every time it creates a ".wer" file, that I imagined is a indication of a bug..

I think this is related with the usage of PyQt > 5.13 in your setup. Hopefully for the next release we will add support for PyQt 5.15 and prevent that :+1:
Just in case, could you share with us the .wer to check why when closing Spyder using PyQt 5.15 the OS is somehow taking the app as crashing?
Thanks !
Pinging @ccordoba12 just in case

Also, just in case, the issue tracking the PyQt 5.15 support is https://github.com/spyder-ide/spyder/issues/12829

I will try later downgrade my PyQT version!
Report.wer.txt
I renamed the file so I can upload it here!
Thanks.

As far as we know, this is a problem with Rtree wheels and it should be solved once their maintainers release a new version. Until then, there's nothing we can do about it, sorry.


Schema property not supported by MySQL

Instead of throwing exception when schema name is populated in db.properties file, assign NULL to "schema" variable.

Done.

This task is completed.


Deleting messages in a thread

Say there's a thread:
Message 1
Message 2
Message 3
Message 4
For example if Message 3 is deleted / moved to trash, Message 4 is also deleted.
Same for message 2, it would be understandable if this occurred in the parent message which is Message 1, but it's also the case for any message in the thread.
Here's what I tried doing:
public function deleteEmail($folder, $uid, $nextUid)
    {
        $message = $this->findMessageByUid($folder, $uid);
        $nextMessage = $this->findMessageByUid($folder, $nextUid);
        if($nextMessage){
        $nextMessage->in_reply_to = $message->in_reply_to;
         }

        $message->move('INBOX.Trash');
    }

Although this solution would cause a lot of problems when trying to restore the deleted email, but I didn't find any other way.
If anyone has an insight on this, please enlighten me.
Edit: I also tried using $message->delete($expunge = true) but it produced the same output.

hey are these methods your custom or inbuilt fnctions to getMessage
$message = $this->findMessageByUid($folder, $uid);         $nextMessage = $this->findMessageByUid($folder, $nextUid);
im new to this Weblex and i cant get message
`
public function moveToTrash($emailId)
{
$email = Email::find($emailId);
    if ($email) {
        $client = Client::account('default');
        $client->connect();

        $folder = $client->getFolder('INBOX');
        $message = $folder->getMessage($email->message_id);
        $message->move('Trash');

        $client->disconnect();

        $email->delete(); // Soft delete
    }
}

`
error: Undefined method 'getMessage'.
so is there any way to get message


Sidebar can only be shrinked by using sidebar toggle when on home/channel pages

From user:
"For the past couple weeks or so, when I'm on the following or home page and expand the sidebar I have to click the button again to narrow it. I used to be able to click anywhere on the page to narrow the sidebar. It will narrow by clicking elsewhere when I'm on a video or post page. This happens on multiple OSes and browsers. Just a minor annoyance, but if you can make it so that it narrows by clicking other places, besides the button, that would be much appreciated. "

Fixed. 5eb88960785f148dc6da010ce4ad8ed224334cb7


Temperature Converter Website

Project title
(Temperature Converter Website)
Project Description
(This is the Temperature Converter Website. In this Website, User will have to input a temperature that should be either in Fahrenheit or in Celsius and then press a "CONVERT" button. After that The converted temperature will then be displayed with the correct unit. )
Stack:

[x] Html
[x] CSS
[x] JavaScript

@khushi-purwar Kindly assign this issue to me

/assign

@khushi-purwar Kindly review this PR - https://github.com/khushi-purwar/WebDev-ProjectKart/pull/676


Remove dependency on InferenceObjectsNetCDF

NetCDF loading of InferenceData is now implemented via a NCDatasets extension in InferenceObjects, so InferenceObjectsNetCDF is deprecated. This PR adds NCDatasets as a dependency to trigger compilation of the extension and removes InferenceObjectsNetCDF as a dependency.
While an alternative approach would be to drop NCDatasets as a dependency and require the user load it themselves, the only functionality in this package that currently works without NCDatasets is listing and describing the example data. In nearly every case, the user will then want to load a dataset, and the extra step of loading NCDatasets themselves is annoying. We can revisit this decision if this package ever provides access to datasets stored in other formats, such as JSON or Zarr.

Codecov Report

Merging #11 (ba98d7d) into main (bd6e190) will decrease coverage by 0.45%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   88.67%   88.23%   -0.45%
==========================================
  Files           5        5
  Lines          53       51       -2
==========================================
- Hits           47       45       -2
  Misses          6        6

Impacted Files
Coverage Δ

src/ArviZExampleData.jl
100.00% <ø> (ø)

src/load.jl
100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes


bug: Missing exports setting in package.json

It's related to this issue.
I'm not sure if this is the only package that uses the grammy/types export, but for future compatibility, it might be worth referring to the solution I provided in my question, or explicitly restricting other packages from exporting with grammy/types and using @grammyjs/types instead, thanks.

It is never a good idea to rely on @grammyjs/types because it might not be in sync with the corresponding type definitions that grammy uses. This has repeatedly be a problem in the past, and it is why we introduced grammy/types in the first place.
The grammY runner package (https://github.com/grammyjs/runner) uses /types without issues, which is why I was surprised that the hydrate plugin caused problems here.
Either way, we just need to fix all of the tedious package.json configuration so that /types can be used. #517 seems to be a solution here.

A fix was released in 1.20.2.


Verify LIS modules load and version after LIS installation

This PR is to add a check whether all the LIS modules are loaded or not after LIS installation along with build version check

@iamshital @johnsongeorge-w are the current LIS deploy tests not checking already the LIS version?

@sireeshapotnuru please post sample test results with both successful and failed cases, but maybe after the question/talk on this is done.

@sireeshapotnuru make sure you reclone the repo (it has a new history) and cherry pick your commits to the new tree, push the changes and recreate the PR.


Live Preview - Async preview URLs with current form data

Link to reproduction
https://github.com/payloadcms/payload/tree/main/examples/multi-tenant
Describe the Bug
Hi Payload team, congratulations on the v2.0, and thank you for this amazing project! 🎉
The live preview works great if you know in advance the host of the URL (e.g. 1 site to manage in the CMS).
In a multi-tenant context, the live preview URL of a page needs to be returned dynamically based on the referenced tenant. Unfortunately, the default depth seems to be 1 since the data object returns the tenant ID instead of an object.
I tried to use the local API to find the tenant by ID, but I haven't been able to make it work since the url function is synchronous.
Increasing the default depth or being able to use the local API would fix this issue.
To Reproduce
Simply add a live preview url function to the pages collection that dynamically returns the URL based on the tenant reference.
Payload Version
2.2.0
Adapters and Plugins

Database: MongoDB

Hey @franknoel I do see your point here, thanks for bringing this up. I think what we need to do is two things:

As you said, the url() function needs to be able to be run async, so that you can perform additional API requests as needed. Depth will not be an option here, though, as all form data is shallow in the admin panel. You'll need to take the ID of the tenant and look up the slug or whatever other data you need to format your tenant's URL.
The data currently being sent to the url() function is the initial page data, and not the current form data. This makes supporting your use case a little trickier, since you want to change the tenant's URL on-the-fly. To do this, we'd need reformat the URL every time form state changes, and then refresh the preview window entirely. Not impossible, but requires some rework.

For these reasons I've labeled this as a new feature. This is definitely something we can support, although its a bit more involved than it appears. What do you think about this?

Thank you for your answer, that makes total sense. Being able to execute asynchronous logic would be ideal in my case and quite useful for more advanced use cases.
Is there anything I could do to help you with this enhancement?

That's amazing, thank you! Having to wait for the client-side request makes sense since it's now async.

@franknoel can you share a gist of your multi-tenant implementation of live-preview. I've been trying for days to get it working

@franknoel would love if you could share the gist of your multi-tenant implementation of live-preview.
thanks.

Hey @jacobsfletch thanks for your work done on the POC at #4339. This has served my own multitenancy implementation really well.
Just wanted to share a thought after scratching my brain a bit while dealing with different environments (local, staging & prod).
In test/live-preview/utilities/formatLivePreviewURL.ts instead of calling the Tenants API like this:
const fullTenant = await fetch(
        `http://localhost:3000/api/tenants?where[id][equals]=${data.tenant}&limit=1&depth=0`,
      )
        .then((res) => res.json())
        .then((res) => res?.docs?.[0])

        // ...

I've ended up replacing the host to this:
const baseUrl = window.origin;
const fullTenant = await fetch(
        `${baseUrl}/api/tenants?where[id][equals]=${data.tenant}&limit=1&depth=0`,
      )
        .then((res) => res.json())
        .then((res) => res?.docs?.[0])

        // ...

This way my clients can fetch their own Tenant data based on the subdomain from which they are accessing the Payload instance (one instance serves many clients at once) and then the live preview is shown to them independent of the environment the request is triggered, because the payload API host varies.
Just my 2c. Again, thank you so much for your work! It sure saved me hours of mental gymnastics :D