beforeEach called in the middle of a test

Describe the bug
The before each statement and i think also general things like mocksClear are called in the middle of an async test...
This makes this framework unreliable...
Reproduction
I wasn't able to reproduce in StackBlitz but i have the attached video
https://user-images.githubusercontent.com/49188777/168087983-1cc26045-8978-49f7-aaf3-469eb12d17d3.mp4
System Info
I'm using pnpm version 6.32.4, don't know if that's related

 System:
    OS: macOS 12.3.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 75.94 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 101.0.4951.54
    Safari: 15.4
  npmPackages:
    vite: ^2.9.5 => 2.9.5
    vitest: ^0.12.4 => 0.12.4

Used Package Manager
pnpm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Recording doesn't really help, if I'm not able to reproduce and test it. Please, try to create a small reproduction.

Turns out the test has overridden the Promise.race implementation which caused this behaviour 🥲
Thanks for the time :)


!node-insert - Script not running on page load for Safari and sometimes Chrome

Tests:
If you make script run at execution time you will see that Safari ignores all markup on DOM at hard refresh.
If you make script run only on Window Load event Safari ignores all markup on DOM at execution time.
If you make script run only on Document readystatechange event Safari ignores all markup on DOM on hard refresh.
If you make script run only on Window DOMContentLoaded event all 3 browsers ignore markup on DOM at execution time.
Code:
Editor mode - https://codepen.io/petermonte/pen/Vwwqgjv?editors=0010
Debug mode - https://cdpn.io/petermonte/debug/Vwwqgjv/PNrvYXGWZBPM
Specs:

Safari - Version 14.0.2 (166<IP_ADDRESS>.9)
Google Chrome - Version 88.0.4324.96 (Official Build) (x86_64)
Firefox - Version 85.0 (64-bit)

Screen recordings:
https://user-images.githubusercontent.com/4997381/106580084-652e3380-6539-11eb-8137-9ffea143c4ec.mov
https://user-images.githubusercontent.com/4997381/106580430-d0780580-6539-11eb-8b80-d9ce14444d18.mov
This is a request by @amorey in https://github.com/muicss/sentineljs/issues/8#issuecomment-771403307

Have you tried bootstrapping your code using the sentinel-load event described here?

https://cdpn.io/petermonte/debug/Vwwqgjv/LDAmdnPpbExr
I've updated the script to make Sentinel only run once document triggers the sentinel-load event - it seems to break in all browser.
...

const _components = [];

function registerComponent(_name, _selector, _callback) {
    _components.push({
        name: _name,
        selector: _selector,
        callback: _callback
    });

    return true;
}

document.addEventListener('sentinel-load', function () {
    sentinel.on('!node-inserted', function (el) {
        var i = 0;
        const lth = _components.length;
        for (i; i < lth; i++) {
            const component = _components[i];
            if (el.matches(component.selector)) {
                component.callback(el);
            }
        }
    });
});

...

The sentinel-load event gets triggered when the sentinel.js script runs so the event listener in the CodePen example won't get executed.
There's a lot of extra code in the example. Can you isolate the bug with a simpler script? For example, does this work when you run it locally on Safari?
<!doctype html>

    <meta charset="utf-8">

What is it that you want to do differently?

Here is you're code in a simple way isolate from any other script.
https://cdpn.io/petermonte/debug/XWWKRNv/mWAoNzxpxxWr

I still see Safari not working with an hard refresh.
Tried sentinel-load didn't seem to work, unless I'm missing something.

What is it that you want to do differently?

Imagine a UI Kit that offers (per example):

a  tooltip functionality by using title="My tooltip information"
a tab item functionality by adding a classname tab
a dropdown trigger by using the attribute data-dropdown-trigger="target"

Let say that all 3 features exist isolated or combined like so:

How would you implement such UI Kit given that you need to trigger all existing elements on DOM at page load and any new added to the DOM via script?

When I click on the codepen link I see a "This debug view expired" message.
From the description of what you're trying to do it sounds like you might be running into a race condition between the page load event and the animationstart event of the elements that are already on the page. You should be able to avoid the race condition by executing sentinel.on() before the dom elements are defined (e.g. in the ):

    <custom-element></custom-element>

Alternatively, if you want to bootstrap your code after the DOMContentLoaded event then you should be able to so by processing all of the previously defined DOM elements first and then initializing sentinel afterwards. In that case the javascript can be executed before the closing  tag:

    <custom-element></custom-element>

let me put things in a simple way by using your example. Need to slightly change it because you only target one element base on the css animation name. I'm targeting multiple elements, based on multiple kinds of selectors.
Environment:
MacOS Big Sur 11.1
Safari - Version 14.0.2 (166<IP_ADDRESS>.9)
Google Chrome - Version 88.0.4324.96 (Official Build) (x86_64)
Firefox - Version 85.0 (64-bit)

This is the markup:

ON DOM

This is the CSS:
@keyframes change-color {
  0% {
    color: blue;
    transform: translateX(-10px);
  }

  100% {
    color: black;
    transform: translateX(0);
  }
}

div, /* I expect a call on Sentinel based on a tagname */
[title], /* I expect a call on Sentinel based on an attribute named title */
[data-attr], /* I expect a call on Sentinel based on an attribute called data-attr */
.example-cls /* I expect a call on Sentinel based on a classname example-css */
{
  animation-duration: 1s;
  animation-name: change-color, node-inserted;
  transform: translateX(0);
}

This is the JS:
function modifyElement(el) {
    // I increment the innerHTML so that I can count how many times an element is caught by Sentinel
    el.innerHTML += " Sentinel ";
}

window.addEventListener('DOMContentLoaded', function (ev) {
    document.querySelectorAll('[data-attr], .example-cls, [title]').forEach(modifyElement);
    sentinel.on('!node-inserted', modifyElement);
});

// Added a click to generate markup on the fly
document.addEventListener('click', function () {
    const div = document.createElement('div'); // I expect a call on Sentinel based on a tagname Div
    div.textContent = 'ADDED ';
    div.className = 'example-cls'; // I expect a call on Sentinel based on classname example-cls
    div.dataset.attr = 'abc';  // I expect a call on Sentinel based on attibute data-attr
    div.title = 'hello';  // I expect a call on Sentinel based on attibute title
    document.body.append(div);
});

This is what I get (Safari, Firefox, Chrome):

This is what I expected:

This is the code editor: https://codepen.io/petermonte/pen/XWWKRNv
This is the code in editor mode, so stripped out of any other script: https://cdpn.io/petermonte/debug/XWWKRNv/nqkwvzGpyEOA

First, with regards to "ON DOM Sentinel" I think the difference in behavior between the browsers is related to a race condition between DOMContentLoaded and animationstart in Safari. Firefox and Chrome seem to reliably call animationstart after DOMContentLoaded which results in modifyElement being executed twice. However, sometimes Safari seems to call animationstart before DOMContentLoaded which results in modifyElement only getting called once. If you want to prevent multiple calls you can use a flag:
function modifyElement(el) {
  (if (!el._upgraded) el.innerHTML != " Sentinel ";
  el._upgraded = true;
}

window.addEventListener("DOMContentLoaded", function(ev) {
  document.querySelectorAll('[data-attr], .example-cls, [title]').forEach(\
modifyElement);
   sentinel.on('!node-inserted', modifyElement);
});

This will result in consistent "ON DOM Sentinel" behavior across browsers.
Second, with regards to "ADDED Sentinel Sentinel Sentinel" it sounds like what you're expecting is for the browser to trigger animationstart 3 times, once each for the "[data-attr]", ".example-css", "[title]" css selectors. However, browsers only trigger the event once per element even if multiple CSS rules match. If you want to execute different code based on the CSS selector that matched you can do some post processing to see which css selectors match.

@amorey
Thanks man. I was almost going crazy trying to figure out what was happening. My purpose with this thread was to understand how sensible Sentinel is with how "each browser deals differently with events for script execution and page load".

Would be nice if Sentinel packed a listener to make sure that it ran on script execution.

On another topic but related to this thread I realised that Sentinel when used with the !node-inserted logic doesn't quite help to distinguish what to do on an element on callback. Like in my case a one single element can have randomly up to 3 functionalities and each independent form another.

Would be nice that we could simply register a listener with Sentinel and have it check if the animation name !node-inserted needs to be added or pushed to the existing styles of the element/selector.

sentinel.on('.my-target', function(){}, true);
// Last boolean parameter stands for using the generic animation name [node-inserted] to catch any element on DOM
// So if a specific selector has already an animation name declared an additional one will be added: my-animation, node-inserted

This means that we could use the following logic:
// Both these events can occur or not on a same element

sentinel.on('.my-target', function(){
    // My code specifically for any new element added with the classname .my-target
}, true);

sentinel.on('[title]', function(){
    // My code specifically for any new element added that has a title attribute to use has a tooltip
}, true);

In the meantime this is my workaround (Click anywhere to add new elements to DOM):
// Interface to record every single constructor that can be called on an element based on its selector
const components = [];

function registerComponent(_name, _selector, _callback) {
    // Register our component
    components.push({
        name: _name,
        selector: _selector,
        callback: _callback
    });
    return true;
}

function initElement(el) {
    // Run the element through our components and find matches
    components.forEach(component => el.matches(component.selector) ? component.callback(el) : null);
    return true;
}

// Interface to manage elements on DOM and when added to DOM
let sentinelRanAtDomContentLoaded = false;

sentinel.on('!node-inserted', el => {
    if (!sentinelRanAtDomContentLoaded){
        sentinelRanAtDomContentLoaded = true;
    }
    initElement(el);
});

document.addEventListener('DOMContentLoaded', e => {
    if (!sentinelRanAtDomContentLoaded){
        components.forEach(function(component){
            document.querySelectorAll(component.selector).forEach(function(el){
                component.callback(el);
            });
        });
        sentinelRanAtDomContentLoaded = true;
    }
}, true);

/**
 * Usage. Every single selector has its own context
 */
registerComponent(
    'tabs',
    '.tabs',
    function tabs(el) {
        // RUN EVERYTHING NEEDED FOR THE COMPONENT
        return el;
    }
);

registerComponent(
   'title-attr',
   '[title]',
   function attrTitle(el) {
       // RUN EVERYTHING NEEDED FOR THE COMPONENT
       return el;
   }
);

registerComponent(
   'data-attr',
   '[data-attr]',
   function dataAttr(el) {
       // RUN EVERYTHING NEEDED FOR THE COMPONENT
       return el;
   }
);

No problem. Happy to hear that helped.

Would be nice if Sentinel packed a listener to make sure that it ran on script execution.

Can you describe this in more detail? What do you mean by script execution time? The time when the browser parses and executes the "sentinel.js" script?

Would be nice that we could simply register a listener with Sentinel and have it check if the animation name !node-inserted needs to be added or pushed to the existing styles of the element/selector.

It sounds like what you want is SentinelJS to execute all three callbacks in this example:

Is that correct?

Can you describe this in more detail? What do you mean by script execution time? The time when the browser parses and executes the "sentinel.js" script?

The moment the browser as fully loaded HTML (DOM tree is built and available) yet any external resources like

The moment the browser as fully loaded HTML (DOM tree is built and available) yet any external resources like

The example snippet wasn't intended to work, I posed it as a theoretical example to see if that is what you are asking for.

Ah! sorry, my bad. Yes, that is the idea. To have as many calls I want on a same element.

Why can't you use the DOMContentLoaded event?

Yes, in fact my text practically describes the event DOMContentLoaded. Problem is that it doesn't work.
So to sum things up and for the sake of simplicity two issues are raised here on my comments:
1 - Bug: Safari - Version 14.0.2 (166<IP_ADDRESS>.9) on MacOS Big Sur 11.1 Sentinel seems to sometimes not parse elements that are at DOM on page load. Using DOMContentLoaded makes things worst.
2 - Feature: Run separate callbacks with different selectors on a same element.

Bug: Safari - Version 14.0.2 (166<IP_ADDRESS>.9) on MacOS Big Sur 11.1 Sentinel seems to sometimes not parse elements that are at DOM on page load. Using DOMContentLoaded makes things worst.

Sentinel isn't designed to detect elements at DOMContentLoaded, it's designed to detect elements when animationstart is triggered so I don't think this is a bug.

Feature: Run separate callbacks with different selectors on a same element.

This would require calling element.matches() on all elements and might cause a performance hit so I have to think about it. In the mean time you can use the "!node-inserted" custom animation name method and call element.matches() manually if you want to test it out.

Sentinel isn't designed to detect elements at DOMContentLoaded, it's designed to detect elements when animationstart is triggered so I don't think this is a bug.

You're right when it comes to the event DOMContentLoaded. Yet with the !node-inserted method, Sentinel (Safari!!) misses elements that already exist in DOM if the page is loading for the first time (hard refresh exemplifies this too). On the other hand if we try to use an event load on window to make sure Sentinel script is loaded first it will also not work with the !node-inserted method and all the existing elements on DOM will remain in silence. So this leaves us with the work around of doing a document.querySelectorAll which ends up being what I ran away from in favour of Sentinel :(
https://cdpn.io/petermonte/debug/LYPKKQQ/yokZEpWRVwyA

!node-inserted

class name

.node_inserted {
  animation-name: node-inserted;
  animation-duration: 0.001s;
}

sentinel.on('!node-inserted', function(el) {
  el.innerHTML += ' Sentinel node-inserted watch!';
});

sentinel.on('.class_name', function(el) {
  el.innerHTML += ' Sentinel class_name watch!';
});

https://user-images.githubusercontent.com/4997381/106914911-60b27800-66fd-11eb-8275-8ec38127d64e.mov

This would require calling element.matches() on all elements and might cause a performance hit so I have to think about it. In the mean time you can use the "!node-inserted" custom animation name method and call element.matches() manually if you want to test it out.

Thought so. Possible solution might be a simple wrapper for those who need such functionality. If no element is being targeted for more than a simple selector/callback then definitely there is no need to change anything on Sentinel.
Conclusion:
I don't think there is enough here to justify any change on Sentinel, so if you agree you can close this topic.
Can't thank you enough for your support!

I tried clicking on the codepen link but it says the "Debug view is expired".
In your previous code example, I think you were adding a Sentinel listener after you defined the DOM elements. However, if you want Sentinel to detect the animationstart event when an element gets added to the DOM then the listener has to be defined first. Here's a canonical example using the "!node-inserted" method:
<!doctype html>

I tested this code on Safari 14.0.3/Big Sur 11.2 repeatedly and didn't see Sentinel miss any animationstart events (see screen recording). Let me know if you see different behavior.
https://user-images.githubusercontent.com/75881/107188986-a327cd80-69f9-11eb-8cd4-d0e173c81cc1.mov
I have some other thoughts to share on the DOMContentLoaded event but first let's establish whether or not there's a bug that's causing Sentinel to miss pre-defined DOM elements in Safari.


Start using Merge Queues on KIE Tools

Merge queues are something that's been in the industry for a while, but mostly for huge teams and very complex git systems. Some companies even have their own forks of git, and depend on proprietary or closed-source 3rd party solutions to provide some services for them. Shopify, for example, has implemented their own "Merge queues" a while ago.
See:

https://www.youtube.com/watch?v=04TTRJArpVw; and
https://shopify.engineering/successfully-merging-work-1000-developers

This is coming to the general public now, with GitHub Merge Queues [1].
The main problem it solves is semantic conflicts and stale PR builds. Since kie-tools is a monorepo, and we currently have a growing community with reasonable-sized teams contributing to it, I see us gaining a huge benefit with Merge Queues.
Semantic conflicts are often hard to solve, and most of the time, hard to identify. When they happen, all PR merges must be halted until it's solved, which generates some stress and potentially delays to the development cycle.
[1] https://github.blog/changelog/2023-02-08-pull-request-merge-queue-public-beta/

Of course we would need to run some tests prior to enabling it on KIE Tools to see how it behaves with our current setup. Testing a fork or a mock repository would be ideal. Reproducing some cases and documenting trade-offs is expected.


Service to start create_bridges script

This PR is to fix issue #671

@naved001 I am happy with this PR. Note that in order to pass the travis CI test, you need to have @knikolla 's workaround.

@henn Can you take some time to take a look, is your concerns addressed?

Just tried again, outputs are:
(.venv) [shwsun@moc-haas-master: scripts (fix_671)]$ sudo systemctl status create_bridges.service
● create_bridges.service - Service to create bridges
   Loaded: loaded (/usr/lib/systemd/system/create_bridges.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: device br-vlan1019 already exists; can't create bridge with the same name
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: ERROR: trying to add VLAN #1019 to IF -:eth0:-  error: No such device
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: interface eth0.1019 does not exist!
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: eth0.1019: ERROR while getting interface flags: No such device
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: eth0.1019: ERROR while getting interface flags: No such device
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: device br-vlan1020 already exists; can't create bridge with the same name
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: ERROR: trying to add VLAN #1020 to IF -:eth0:-  error: No such device
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: interface eth0.1020 does not exist!
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: eth0.1020: ERROR while getting interface flags: No such device
Nov 09 11:37:58 moc-haas-master.prb.massopencloud.org create_bridges[9726]: eth0.1020: ERROR while getting interface flags: No such device

@henn 's concern is already addressed, I will go ahead and hit the button

@henn

@henn I am not sure about the race condition with libvirt. I think the case using oneshot is that user will have to do systemctl start create-bridge.service every time changes have been made to the hil.cfg, since the systemd service will run only once and exit.
If it is the case, then it makes no difference between using this systemctl script and use bash script at all.

As far as I know, if you make changes to haas.cfg you need to restart the service (or reboot the system, or launch the python script) to reflect changes. Type=simple or Type=oneshot does not affect that. I tested this right now and changing types does not affect it. Moreover, I don't think that the create_bridge.service is sensitive to changes in haas.cfg anyway. create_bridge.service starts the create_bridges python script which reads from haas.cfg. So if you make any changes to haas.cfg, you either need to run the create_bridges python script again or restart the create_bridges.service (which just starts the python script for you).
Does that answer your question? @shwsun

As far as I know, if you make changes to haas.cfg you need to restart the service (or reboot the system, or launch the python script) to reflect changes. Type=simple or Type=oneshot does not affect that. I tested this right now and changing types does not affect it. Moreover, I don't think that the create_bridge.service is sensitive to changes in haas.cfg anyway. create_bridge.service starts the create_bridges python script which reads from haas.cfg. So if you make any changes to haas.cfg, you either need to run the create_bridges python script again or restart the create_bridges.service (which just starts the python script for you).

That's a good point. In the future, if we want to reload the service, systemd has primitives like ExecReload= and ExecStop= that would allow us to do that.

@SahilTikale

@SahilTikale could you re-review this please?


rasa DIET and tensorflow

Rasa version:
Rasa 1.7.2
Rasa SDK version (if used & relevant):
Rasa X version (if used & relevant):
Python version:
Python 3.6.9
Operating system (windows, osx, ...):
ubuntu 18
Issue:
Bug with tensorflow when trying to use the DIETClassifier
Error (including full traceback):
 File "/home/tf/Documents/Leon/rasa/Rasa/venv/bin/rasa", line 10, in <module>
    sys.exit(main())
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/cli/train.py", line 140, in train_nlu
    persist_nlu_training_data=args.persist_nlu_data,
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/train.py", line 414, in train_nlu
    persist_nlu_training_data,
  File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/train.py", line 445, in _train_nlu_async
    persist_nlu_training_data=persist_nlu_training_data,
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/train.py", line 474, in _train_nlu_with_validated_data
    persist_nlu_training_data=persist_nlu_training_data,
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/nlu/train.py", line 74, in train
    trainer = Trainer(nlu_config, component_builder)
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/nlu/model.py", line 144, in __init__
    components.validate_requirements(cfg.component_names)
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/nlu/components.py", line 33, in validate_requirements
    from rasa.nlu import registry
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/nlu/registry.py", line 13, in <module>
    from rasa.nlu.classifiers.diet_classifier import DIETClassifier
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/nlu/classifiers/diet_classifier.py", line 20, in <module>
    from rasa.utils import train_utils
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/rasa/utils/train_utils.py", line 10, in <module>
    from tensor2tensor.models.transformer import (
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/tensor2tensor/models/__init__.py", line 25, in <module>
    from tensor2tensor.layers import modalities  # pylint: disable=g-import-not-at-top
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/tensor2tensor/layers/modalities.py", line 32, in <module>
    from tensor2tensor.layers import common_video
  File "/home/tf/Documents/Leon/rasa/Rasa/venv/lib/python3.6/site-packages/tensor2tensor/layers/common_video.py", line 38, in <module>
    tfcl = tf.contrib.layers

Command or request that led to error:
os.system(f'rasa train nlu --config ../config_supervised.yml -u {tts}{ficdir}/training_data.md --fixed-model-name ../models/{ficdir} --out ../models/')

Content of configuration file (config.yml) (if relevant):

Content of domain file (domain.yml) (if relevant):

Thanks for raising this issue, @Ghostvv will get back to you about it soon✨
Please also check out the docs and the forum in case your issue was raised there too 🤗

version 1.7.2 doesn't have DIETClassifier

Hello i noticed, Updated to 1.8 and settled. Thanks


Write new test cases to measure speed and efficiency

Current test cases measure accuracy with hard coded values. Write a new test case file with significantly larger Matrix objects. Consider writing a Matrix function to automatically fill it with random values.

Test cases are written for all major functions. jacobi() and determinant() functions are written but not called until they're rewritten to work with several processes.


[2/2]: ENG-2806 Ensure Integration Form Validation Works

Describe your changes and why you are making these changes
This PR ensures that integrations form validation works properly after changing form input empty state from null to empty string (this was needed to fix a console error message).
Depends on: https://github.com/aqueducthq/aqueduct/pull/1218
Related issue number (if any)
ENG-2806
Loom demo (if any)
https://www.loom.com/share/eb58d20deee64922b83841fcb6bf7362
Checklist before requesting a review

[x] I have created a descriptive PR title. The PR title should complete the sentence "This PR...".
[x] I have performed a self-review of my code.
[x] I have included a small demo of the changes. For the UI, this would be a screenshot or a Loom video.
[x] If this is a new feature, I have added unit tests and integration tests.
[x] I have run the integration tests locally and they are passing.
[x] I have run the linter script locally (See python3 scripts/run_linters.py -h for usage).
[x] All features on the UI continue to work correctly.
[x] Added one of the following CI labels:

run_integration_test: Runs integration tests
skip_integration_test: Skips integration tests (Should be used when changes are ONLY documentation/UI)

Great, will these be covered by react class and react hook form later?

@likawind Yes, validations here will go through react-hook form later. However, I do expect them to remain mostly the same. Maybe a small amount of syntactic sugar that react-hook-form provides, but not too many changes in terms of how we validate.


Creo que te equivocas en el archivo 10

First of all what does that even mean? Also please stick to English so we can have a look at it :)


Laravel 10.x Compatibility

This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 10.x.
Before merging, you need to:

Checkout the l10-compatibility branch
Review all comments for additional changes
Thoroughly test your package

If you do find an issue, please report it by commenting on this PR to help improve future automation.

:alembic: Using this package? If you would like to help test these changes or believe them to be compatible, you may update your project to reference this branch.
To do so, temporarily add Shift's fork to the repositories property of your composer.json:
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/laravel-shift/LaravelMetaTags.git"
        }
    ]
}

Then update your dependency constraint to reference this branch:
{
    "require": {
        "butschster/meta-tags": "dev-l10-compatibility",
    }
}

Finally, run: composer update


Fasterflect missing: Research notebook kernel crash with Resolution function parameter

Actual Behavior
Jupyter Notebooks kernel crashes when passing Resolution as function parameter
Reproducing the Problem
using latest quantconnect/research:latest image:
Digest: sha256:d331233160ce690fd000d7810c0cbb8c6a139088633071b13e4d7827d738cdaa
run cli:
lean research "test"

in a notebook create and execute a cell with python code:
def fetch(resolution):
    qb = QuantBook()
    qb.AddEquity("SPY")
    history = qb.History(qb.Securities.Keys, 360, resolution)
    return history

fetch(Resolution.Daily)

result:
The kernel for research.ipynb appears to have died. It will restart automatically.
log:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Fasterflect, Version=<IP_ADDRESS>,
Culture=neutral, PublicKeyToken=38d18473284c1ca7'. The system cannot find the file specified.

File name: 'Fasterflect, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=38d18473284c1ca7'
   at Python.Runtime.FieldObject.tp_descr_get(IntPtr ds, IntPtr ob, IntPtr tp)

System Information
Docker For Windows (latest)
Checklist

[x] I have completely filled out this template
[x] I have confirmed that this issue exists on the current master branch
[x] I have confirmed that this is not a duplicate issue by searching issues
[x] I have provided detailed steps to reproduce the issue

Hey @biiiipy!
Thanks for the report, we will fix it ASAP

Can confirm this issue is similar to https://github.com/QuantConnect/Lean/issues/5789, there is an initialization dependency with creating a qb = QuantBook() instance, placing qb = QuantBook()before calling fetch(Resolution.Daily) solves this issue, tested locally and in the cloud. Initialization should be moved outside of QB() and called automatically on start 💯


Change REPL to use tabs instead of dropdown

Here is a gif below to show it in action.

This is so great. Thank you! 🎉


 We also want to detect peer and background task errors during shutdown.
This is a partial fix for #1678 and #1351, before we modify the peer set in #2262.
Solution

when the peer set shuts down, stop background tasks, close channels, and drop peers
shut down the peer set when it is dropped

Review
This is a fix from @jvff's review https://github.com/ZcashFoundation/zebra/pull/3072#discussion_r752256664
But the changes were originally part of PR #3071.
Reviewer Checklist

[ ] Code implements Specs and Designs
[ ] Tests for Expected Behaviour
[ ] Tests for Errors

Follow Up Work
Keep implementing shut down for the rest of Zebra
Give the peer set an explicit shutdown handle?

@jvff asked:

Question: Why aren't these background tasks handled separately? Wouldn't it make more sense to have this service have a Request::Stop or a cancel_signal: oneshot::Receiver<()>?

https://github.com/ZcashFoundation/zebra/pull/3072#discussion_r752256664
I'm not sure what you mean by "handled separately". The listener, crawler, and address book updater background tasks are required for the PeerSet to operate correctly.
I'm also not sure if we need to do anything else to shutdown.
On startup, zebra_network::init returns:

a buffered peer set service
an Arc<Mutex<AddressBook>>

Once the last peer set clone is dropped, all the zebra-network tasks, channels, and peers shut down. Then, when the last address book clone is dropped, the address book gets dropped.
So I'm not sure if separate shutdown channel is needed?
(And I'd like to avoid using a Request::Stop, because channel ownership is more flexible than buffered service ownership.)
When we do full graceful shutdown in #1678, we can add channels as needed.

@jvff asked:

Question: Why aren't these background tasks handled separately? Wouldn't it make more sense to have this service have a Request::Stop or a cancel_signal: oneshot::Receiver<()>?

#3072 (comment)
How did you want to handle the background tasks separately? (I didn't want to make too many changes in this PR.)
The listener, crawler, and address book updater background tasks are required for the PeerSet to operate correctly.
I'm also not sure if we need to do anything else to shutdown.
On startup, zebra_network::init returns:
* a buffered peer set service

* an `Arc<Mutex<AddressBook>>`

Once the last peer set clone is dropped, all the zebra-network tasks, channels, and peers shut down. Then, when the last address book clone is dropped, the address book gets dropped.
So I'm not sure if separate shutdown channel is needed? (And I'd like to avoid using a Request::Stop, because channel ownership is more flexible than buffered service ownership.)
When we do full graceful shutdown in #1678, we can add channels as needed.

I'm not exactly sure, but I guess the core of what I'm worried about is that PeerSet seems to be doing a lot of things. I think currently it:

tracks ready and unready peers
routes requests to ready peers
handles load balancing (with power of two choices)
handles background tasks

I think the zebra_network::init API is good (we could ideally see if we could not need to return the address book, but I think that's probably a separate thing and lower priority IMHO). But I think that the internal organization of the service could be split up into different types to handle different things.
Regarding handling background/startup tasks, I think the goals are:

to stop the network specific tasks if the PeerSet service is stopped
to stop the PeerService if one of the background tasks stops
to stop the PeerService if one of the startup tasks errors

In order to achieve those goals, when focusing on the PeerService, I think it only needs to:

have some sort of signal to shutdown when 2 or 3 happens
report when it stops in order to achieve 1

I'm not sure how to handle this in this PR. It might make sense to not change the PR right now and think more about this in a broader "PeerSet refactor" issue. Or we could see if there are any changes that are simple and "obvious" (as in, likely not needed to change regardless of any refactor idea discussions) to do in this PR that strive toward such refactor.
One idea for the latter might be to create BackgroundTask and/or StartUpTask helper types, which contain:

a JoinHandle for the wrapped task
a &'static str with the name of the task
a broadcast::Sender or an Arc<watch::Sender> that sends something when the task finishes (or errors, in case of a StartUpTask)

And such types would have a Drop implementation to send the signal and call JoinHandle::abort.
Anyway, I'm not sure if I'm helping or just brain dumping a wild idea :sweat:

Just a reminder that the goal of this PR is:

We want to shut down the peer set properly. We also want to detect peer and background task errors during shutdown.

Anything else is out of scope for the NU5 mainnet activation sprints. Unless it's important for doing #2262.

I think the zebra_network::init API is good (we could ideally see if we could not need to return the address book, but I think that's probably a separate thing and lower priority IMHO).

The inbound service uses the address book, so we would either need to:

move the inbound service into zebra-network, or
access the address book via the peer set (which might depend on #1976).

Feel free to open a ticket for this change if you'd like, and we can schedule it in a future sprint.

But I think that the internal organization of the service could be split up into different types to handle different things.
Regarding handling background/startup tasks, I think the goals are:
1. to stop the network specific tasks if the PeerSet service is stopped
2. to stop the PeerService if one of the background tasks stops
3. to stop the PeerService if one of the startup tasks errors
In order to achieve those goals, when focusing on the PeerService, I think it only needs to:
* have some sort of signal to shutdown when 2 or 3 happens
* report when it stops in order to achieve 1

We do this already:

all tasks that use the network should stop if we return an error from PeerSet::poll_ready. This is how tower Services are meant to work.
the PeerSet polls the background tasks.
if a startup task errors, or any ongoing task exits, we return from StartCommand::run, which should make other task exit, and eventually drop the PeerSet.

There might be bugs or missing parts of this implementation, but they're covered by ticket #3071.

I'm not sure how to handle this in this PR. It might make sense to not change the PR right now and think more about this in a broader "PeerSet refactor" issue.

I'd like to leave this PR where it is, unless there is an obvious major bug that blocks #2262.

Or we could see if there are any changes that are simple and "obvious" (as in, likely not needed to change regardless of any refactor idea discussions) to do in this PR that strive toward such refactor.
One idea for the latter might be to create BackgroundTask and/or StartUpTask helper types ...

Can you open a ticket for this change, and we can schedule it in a future sprint?

Bumping this to medium priority, because it's blocking #2262.


Facebook login returning "unauthorized"

I've been trying to hook up Facebook login via an iPhone app. I have set the FACEBOOK_APP_ID on my Heroku deploy and even echoing it out to the log so I know that is being set.
My iPhone app has all there correct information in the plist file.
For some reason though, when I go through the connect process using, PFFacebookUtils.logInInBackgroundWithReadPermissions, the app always returns:

unauthorized (Code: 0, Version: 1.12.0)

I'm not sure where to begin tracking this error down. I don't see anything in the log files either.
Any help would be greatly appreciated. Thank you.

Did you set the facebookAppIds in the parse-server?
Related to #82

No, I haven't. Is that part of the
var api = new ParseServer({
   ...
});

Code?
I didn't see that in the docs. IS that now the official way to do it and if so do i still need to set the env var FACEBOOK_APP_ID?
Thank you.

It is in the readme, you can pass in an array of facebook app ids: https://github.com/ParsePlatform/parse-server/blob/master/README.md
You no longer need to set the environment variable.
Let me know if you have any other issues!

I'm actually still seeing the issue. This is what my code looks like
var api = new ParseServer({
  databaseURI: databaseUri ,
  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  appId: process.env.APP_ID || '...',
  masterKey: process.env.MASTER_KEY || '...',
  clientKey: '...',
  javascriptKey: '...',
  facebookAppIds: ['1677777875569507']
});

Is there something I'm missing with that?

I'm still experiencing the same issue with Facebook login.
var api = new ParseServer({
	databaseURI		: "...",
	cloud			: "...",
	appId 			: "...",
	masterKey 		: "...",
	facebookAppIds 	: ["742406752547323"],
	filesAdapter 	: new S3Adapter(
		"...",
		".../",
		{
			bucket 			: "...",
			bucketPrefix	: "files/",
			directAccess	: true
		}
	)
});

Figured out a why this was still not working. If I called Parse.setApplicationId and Parse.initializeWithConfiguration this error would still happen. Also note that if you use the local datastore, that needs to be set in the configuration block as well.

I'm not calling Parse.setApplicationId in my code it has been commented out since I migrated. I'm getting the following error.
Permission denied for this action. (Code: 101, Version: 1.12.0)

I believe there's a bug in 2.1.0 with the RestWrite.js -> facebook.js data path. The validateAppId function in facebook.js assumes a passing of the literal access_token (String) but what's actually passed is an authData structure within which lives a key called "access_token".. so facebook.js should actually be trying to append access_token.access_token to the graph request, and not just access_token. More appropriately, the access_token argument of facebook.js:validateAppId should be renamed to authData and subsequently authData.access_token for the string builder contained within. As it is for validateAuthData.

cc @flovilmart

@penultimate-labs you're definitely right! The validateAppId should match the mockFacebook() in the test suite.

@chuckurbis Can you share me how to fix this?

have this issue been resolved?

Did you update to the latest version?

Yes I did. The above error is when I use<EMAIL_ADDRESS>

Then Permission denied for this action is a Class Level Permission error. Did you set any CLP on _User? Can you provide the logs your get when running in VERBOSE=1

My CLP on _User

Btw, I'm doing test with VERBOSE=1, will update when ready.

This would be the addFiled permission that would block I believe

@flovilmart perfect! It works flawlessly. Do you still need the log when running in VERBOSE=1

I'd like to understand why it blocked you from linking the user, did you add extra fields to the _user object before linking?

I do nothing on client side but I have the hook afterSave on _User on cloud code. I add some fields to new User only. But the weird thing is that I couldn't log in as a new user as well as existed user.

Ok, so we have an issue with the addFields permission.

I just wanted to confirm that parse-server v2.2.14 denies to log in via Facebook (even for the existing accounts) if the "addFields" permission is not enabled on _User class.


Twitter new UI problem

Hi
The twitter new UI is causing this app to fail. when you click on download, it re-directs the page to analytics of that post

The extension hasn't been updated since 2021, you might want to look for an alternative.

There is no alternative... Any suggestion ?

There's one called Media Harvest Twitter Media Downloader

There's one called Media Harvest Twitter Media Downloader

Very useful information, thks for the recommendation!

would it fixed? I fixed it in firefox version my self but not chrome. some people fix by self and i merged them.


getters for public attributes

Pullrequest for #303
-added getters for public attributes

created test
ignore IDE files
added some PhpDoc

Testing started at 7:56 PM ...
PHPUnit 5.2.10 by Sebastian Bergmann and contributors.

Hostname was found in DNS cache
Trying <IP_ADDRESS>...
Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 8000 (#88)

GET / HTTP/1.1
User-Agent: PHP-Curl-Class/4.10.0 (+https://github.com/php-curl-class/php-curl-class) PHP/5.6.18-1+deb.sury.org~trusty+1 curl/7.35.0
Host: <IP_ADDRESS>:8000
Accept: /
X-DEBUG-TEST: response_header

< HTTP/1.1 200 OK
< Host: <IP_ADDRESS>:8000
< Connection: close
< X-Powered-By: PHP/5.6.18-1+deb.sury.org~trusty+1
< Content-Type: application/json
< ETag: 5d4a65c46a072a4542a816f2f28bd01a
<

Closing connection 88

Time: 2.71 minutes, Memory: 17.75Mb
OK (100 tests, 2673 assertions)
Process finished with exit code 0

Can you have a look into it, why the hhvm test failed? It seems to be this one Memory leak test, which was ok when i ran the tests locally. I just have no Idea what you want to assure there so a heads up would be nice if I should fix something ;)

Thanks for the pull request. At this time I don't think we will be adding getters for public attributes. An example, I'd rather use var_dump($curl->response); than var_dump($curl->getResponse());.


GPTQ: Vmfb Size is Double of the IR size

What happened?
Hi, while compiling the falcon-7b-instruct-GPTQ model, the size of the Linalg IR I get is 7.7GB, on the other hand after the iree-compile the vmfb which I'm getting is of 13.4GB. I'm not able to understand how's this possible. Also, is this expected or not? The issue exists for both the CPU and CUDA backend. You can find the elided Linalg IR here.
Steps to reproduce your issue
To reproduce the issue, run the following compilation command:
iree-compile --iree-input-type=none --iree-vm-bytecode-module-output-format=flatbuffer-binary     --iree-hal-target-backends=llvm-cpu --mlir-print-debuginfo     --mlir-print-op-on-diagnostic=false --iree-llvmcpu-target-cpu-features=host     --iree-stream-resource-index-bits=64 --iree-vm-target-index-bits=64     --iree-vm-bytecode-module-strip-source-map=false --iree-util-zero-fill-elided-attrs     --iree-vm-target-truncate-unsupported-floats --iree-codegen-check-ir-before-llvm-conversion=false --iree-hal-dump-executable-sources-to=hal_sources_falcon_7b_gptq_cpu    --iree-consteval-jit-debug=true   --iree-stream-resource-max-allocation-size=3221225472 --iree-llvmcpu-target-triple=x86_64-linux-gnu falcon_7b_gptq_linalg.mlir -o falcon_7b_gptq_cpu.vmfb

over the following Linalg IR.
What component(s) does this issue relate to?
MLIR, Compiler
Version information
No response
Additional context
No response

This isn't reproing on the stripped weights model. I'll need to dig in deeper and verify the problem. Pretty sure this is missing IPO aware CSE of const trees but would like to be certain before setting out to fix it. It's probably not more than a day of work to add the optimizations needed, and I will try to get to it tomorrow.

The first thing I was thinking of appears to not be the major problem. These two constants (I think) are being duplicated:
  func.func @jit_eval_4(%arg0: tensor<32000x4096xf16>) -> tensor<4096x32000xf16> {
    %0 = tensor.empty() : tensor<4096x32000xf16>
    %1 = linalg.generic {indexing_maps = [affine_map<(d0, d1) -> (d0, d1)>, affine_map<(d0, d1) -> (d1, d0)>], iterator_types = ["parallel", "parallel"]} ins(%arg0 : tensor<32000x4096xf16>) outs(%0 : tensor<4096x32000xf16>) {
    ^bb0(%in: f16, %out: f16):
      linalg.yield %in : f16
    } -> tensor<4096x32000xf16>
    return %1 : tensor<4096x32000xf16>
  }
  func.func @jit_eval_1(%arg0: tensor<32000x4096xf16>) -> tensor<4096x32000xf16> {
    %0 = tensor.empty() : tensor<4096x32000xf16>
    %1 = linalg.generic {indexing_maps = [affine_map<(d0, d1) -> (d0, d1)>, affine_map<(d0, d1) -> (d1, d0)>], iterator_types = ["parallel", "parallel"]} ins(%arg0 : tensor<32000x4096xf16>) outs(%0 : tensor<4096x32000xf16>) {
    ^bb0(%in: f16, %out: f16):
      linalg.yield %in : f16
    } -> tensor<4096x32000xf16>
    return %1 : tensor<4096x32000xf16>
  }

However, this only accounts for ~128MB of duplication. So needs to be looked at but not our main problem. Still searching.

FYI - this IR is from before the maxf rename. I fixed it up with: sed -i 's/arith.maxf/arith.maximumf/g' falcon_7b_gptq_linalg.mlir

Hey Vivek, when I set out on this, I think I misunderstood that this was going to be similar to our existing llama2 models, but this is quite different, which now that I read it, is expected since you are working on an entirely new quantization system.
This is a real torture test for ConstEval, doing 411 constant expression tree simplifications (with a lot of multi-rooted expressions and complicated conditionals) and taking 231s to do them all on my machine (most other models I've seen have ~a couple dozen at most). Considering that this is the most complicated such thing we've yet seen by a long shot, I guess as a starting point, I'm glad it works at all.
Can you give me some more context on what is going on here? I'm not familiar with the model and its signature doesn't make much sense to me.
Also, could you describe the quantization regime that is being done here? It looks like it is quantizing to i8 in some fashion?

Hey Vivek, when I set out on this, I think I misunderstood that this was going to be similar to our existing llama2 models, but this is quite different, which now that I read it, is expected since you are working on an entirely new quantization system.
This is a real torture test for ConstEval, doing 411 constant expression tree simplifications (with a lot of multi-rooted expressions and complicated conditionals) and taking 231s to do them all on my machine (most other models I've seen have ~a couple dozen at most). Considering that this is the most complicated such thing we've yet seen by a long shot, I guess as a starting point, I'm glad it works at all.
Can you give me some more context on what is going on here? I'm not familiar with the model and its signature doesn't make much sense to me.
Also, could you describe the quantization regime that is being done here? It looks like it is quantizing to i8 in some fashion?
Just to set expectations, this is going to take some more digging and I'll need to develop some better tools for analyzing what is going on. Also, would be good to pump it through Turbine at some point as it represents things better with symbolic names that are much easier to track through.

Hi @stellaraccident, thanks for taking a look at this issue. The quantization for the model is done as follows:
The weights are packed to si32 tensors using the pack method here https://github.com/PanQiWei/AutoGPTQ/blob/51c043c6bef1380e121474ad73ea2a22f2fb5737/auto_gptq/nn_modules/qlinear/qlinear_cuda.py#L96 during the quantization. Although we are not doing the quantization on the fly, we are just using the pre-quantized model.
During the execution, the unpacking/dequant and matmul happens here: https://github.com/PanQiWei/AutoGPTQ/blob/51c043c6bef1380e121474ad73ea2a22f2fb5737/auto_gptq/nn_modules/qlinear/qlinear_cuda.py#L214-L270


Update Deep_Learning_Project-Pytorch.ipynb

address two small error messages:

invalid index of a 0-dim tensor;
implicit dimension choice for softmax

warning errors relating to pytorch deprecate issues. they are very small but took me a while to figure out where to change them. hopefully will help others who follow the tutorial. thanks

sorry I think I submitted the same thing twice.

Hi, thanks for contributing! Were these deprecations leading to warnings only? or did the code break as well?

apologies for late response.
the loss.item() did break my code but the dim=1 is just a deprecation from
memory.
cheers:-)
On Fri, Nov 30, 2018 at 7:58 PM Spandan Madan<EMAIL_ADDRESS>wrote:

Hi, thanks for contributing! Were these deprecations leading to warnings
only? or did the code break as well?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/Spandan-Madan/DeepLearningProject/pull/54#issuecomment-443321855,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQ2uUqlGyiEqW1fe3B4gEegFsRcelMa0ks5u0Y33gaJpZM4Y71aT
.


Fix discord invitation link

Original link disallows joining to dRPC discord channel.

Check it now. There was issue on Discord side. Now it should works


URLs are being truncated and then failing in Markdown, TOML files

I can't understand how or why this might be happening, so I'll just describe what I'm seeing. I'm using urlstechie/urlchecker-action@master.
urlchecker-action is truncating some URLs, trying to reach those truncated URLs, and reporting them as broken. Examples:
[![linux](https://raw.githubusercontent.com/devicons/devicon/master/icons/linux/linux-original.svg)](https://www.linux.org/)

truncated to https://www.linux
  url = "https://codepen.io/rootwork/"

truncated to https://codepen.io/root
[lazy-render things](https://www.drupal.org/node/1982024)

truncated to https://www.drupal.org/node/19

urlchecker is looking at .md, .toml, .yml and .scss files. The ones that are being truncated are in the Markdown and TOML files but that might just be because there are many more of them.
These URLs are not split between lines; other than the first example above they are all actually pretty short URLs. The Markdown/TOML files validate. Many URLs, including other ones in those same files, are not truncated and pass urlchecker just fine.
Adjusting timeout and retry values on the linkchecker doesn't affect anything, because they're trying to check the wrong URLs.
All URLs were passing until July 12, at which point I introduced some broken URLs. After fixing them on July 13, I started getting the truncated URLs. (And to be clear the truncated ones aren't the ones that had been broken; they don't seem to have anything to do with each other.)
Any idea what might be happening?

@rootwork I think I have an idea - can you give me (here in the comment) a quick markdown snippet with the failing urls and I'll work on fixing this asap?

Sure. Here's the full paragraph containing the last example above, from a Markdown file. Linebreaks are in the original.
FF: What I love the most about Twig is the syntax, and how it cleverly makes it
possible to [lazy-render things](https://www.drupal.org/node/1982024). The
possibilities of having an interpreted language are endless.

Could you send an exact file from above? When I try to use that snippet it looks okay:
🤔 Uh oh... The following urls did not pass:
/home/vanessa/Desktop/Code/urlchecker-python/test.md:
     https://www.drupal.org/node/1982024

If I try the exact file and it doesn't reproduce it must be something about the GitHub environment, and I want to rule that out.

And do you have a link to that run?

Sure! Here's the file, and here's the run. But notice that it's inconsistent about which URLs get truncated; here's a more recent run where there's still truncation, but that URL is not one of them.

Ah! So I wonder if it's the colorizing of escape sequences? Check out the raw log here -  I don't think I see the full truncation if you scroll to the end? https://pipelines.actions.githubusercontent.com/serviceHosts/e1990149-fc7a-4131-8b50-bd5f555fd30c/_apis/pipelines/1/runs/618/signedlogcontent/2?urlExpires=2022-07-21T22%3A43%3A32.9120900Z&urlSigningMethod=HMACV1&urlSignature=24ReGiruxyomY876DUFpGBdCInSDm5AXvQXdGeVpkS4%3D

okay so I can't share the URL - you can click or here is a screenshot comparison:

I'm going to do a quick test to look if ANSI escape sequences work better.

okay I have a PR to urlchecker-python: https://github.com/urlstechie/urlchecker-python/pull/76
and you should be able to test the action via this branch fix/ansi-colors here https://github.com/urlstechie/urlchecker-action/pull/95

Hmm. It seemed to have truncated fewer of them, but some are still there. Here's the run.
(Note one item in that list is a legitimate broken link, though.)

Here is again the raw logs:

I can't say I've seen this before - I feel like it was working? I wonder if GitHub changed how they handle these sequences and our best shot is to remove all colors. The text is definitely there, it's just being hidden for some reason.

and you are also saying there are false negatives? I've seen that too and I wonder if it's either our user agents aren't good enough (@SuperKogito was going to take a look at this) or if sites know to block requests from GitHub IPs.

and you are also saying there are false negatives?

No -- not apart from the truncated URLs. There are false negatives in the sense that the full URLs are valid and only fail after being truncated -- but it's not displaying any full URLs and saying they don't pass when they do.

In my display of the run, I only see colored text on the files (/github/workspace... etc.) not on the links. Are the links supposed to be colored? If not, then maybe removing any color sequences around them?
Incidentally while I have it configured to do verbose reports (with the filenames) the same thing was happening even when it just listed the URLs.

okay - so to debug let's first remove all coloring - give me a few mins to update the action container and I'll let you know when to re-run.

okay updated container is pushed - try a new run! Should be digest:
sha256:cb4b2bff9af8b2beca9aea0ab54e5ecdd8c8b9556b6058fe6ff88ff34fd800c3 size: 1578

Let's see if just a print shows the entire url (and there is something wonky that needs further investigation around colors)

Sorry, I'm not clear how to get at that -- should I still use uses: urlstechie/urlchecker-action@fix/ansi-colors in the GH action? Or uses: urlstechie/urlchecker-action@cb4b2bff9af8b2beca9aea0ab54e5ecdd8c8b9556b6058fe6ff88ff34fd800c3? This isn't my area of expertise 🤷🏽

oh yes sorry - so you can use that same action branch, and the reason I provided the digest is just to check when it's pulling the action container that it grabs the right one! I think it should, but it's good to double check in case GitHub does something like cache the original one pulled.

TLDR you should be able to just click the re-run :)

Didn't seem to change anything, unfortunately.
One thing I noticed, not sure it's significant -- but the URLs that are listed are truncated, but if you hover over them they are actually linked to the correct (non-truncated) URLs. Not sure if that's just GH doing something outside of the action itself, though.

This is so strange! I see the full URLs in the raw log:

I'm starting to wonder if GitHub is doing something strange with the URL and indent - I'm going to try and reproduce with a dummy Python script, and if I can I'll open an issue with GitHub. I'll keep you updated!

OK, thanks! If there's anything else I can provide to help I'm happy to do so.

Yep, looks like just from a python script with some prints, it tries to parse (and shorten) the url:

UNLESS it looks like you break some regex so it doesn't detect that it's a url?

So - I'm going to try adding a little arrow or something, and I'll report this to GitHub too.

okay so I have a hypothesis - give that workflow another re-run and let's see if we get a different result!

Now it's reporting the full URLs, but still failing them. I'm guessing despite what it's reporting something is getting truncated in the background?
https://github.com/rootwork/rootwork.org/runs/7462969525?check_suite_focus=true

Good - we fixed one bug!
I believe there are two issues here - printing the full url (fixed) and the response being 403 because the user agent or IP isn’t good enough to mimic a human (this issue we already knew about). There isn’t any truncation beyond the printing bug that now is fixed. And the latter is what @SuperKogito is working on, and let us know if you have ideas! In the meantime (tomorrow after work) I’ll put in a release to fix the first bug, and we will have to keep working on the second.

OK, I think I understand what you're saying, but just to underscore that the URLs it is still wrongly failing are the same ones it was truncating before. I had thought it was failing them because it was truncating them, but it sounds like you're saying there are other issues with it failing legitimate URLs, and it was only in printing those wrongly-failed URLs that truncation was happening.
If that's accurate then thank you for guiding me through this bug, and I'll look forward to fixes on the second. (I'll see if I can contribute anything.)

Nope - it's not failing because of the truncation! It's failing because we need to update the headers, etc. that we use to make the request - servers are getting better at detecting our little test robot :) I have a bunch of ideas I will be testing likely over the weekend.

And I agree it was a bit confounded and I totally see that we could make the connection from a truncation to the failure. But that's not the case because the URLs themselves were never actually truncated - that was just a printing bug in GitHub actions. In all cases we saw the full URLs in the raw logs.

Did not mean to close this! So some of these URLs are fixed, the rest I'm going to try selenium soon! See https://github.com/urlstechie/urlchecker-python/issues/73

Thanks again y'all - all URLs appear to be working now! Please open another issue if a new one arises.


Thanks for your quick response!

Thanks for your quick response, awesome!
Being able to hide columns is good, but my intent with the earlier
request was that if a column is hidden, then it wouldn't write that tag
into the playlist either.
Example:
All columns used:
#EXTINF:-1 tvg-name="N/A" tvg-id="N/A" group-title="N/A" tvg-logo="https://i.imgur.com/KacMcVa.png",CNN
http://<IP_ADDRESS>/s27/04.m3u8

First three columns hidden:
#EXTINF:-1 tvg-logo="https://i.imgur.com/KacMcVa.png",CNN
http://<IP_ADDRESS>/s27/04.m3u8

This is how a typical playlist looks like in kodi, that only uses Logo, Name2 and link columns:

Here is a typical playlist found on pastebin where the first 2 columns aren't used:
(Name and Id)
https://pastebin.com/raw/jUG8ytNj
I understand that it would be difficult to program it in a way, that it actually deletes
existing content in a column that has been de-selected.
But it doesn't need to do that.
All it has to do is simply ignore writing tags on those de-selected columns.
That should be more easy to accomplish programmatically, i think.
If you manage to pull that off, a really clean kodi playlist could be created,
and the kodi community would love it!

Thanks, now I understand the problem.
I made a fix to write only visible columns and show only columns which have valid entries in it during file load.
Do you think this could be a solution? A variable column number is more difficult I think.

Hi again,
This starts to look really promising!
I really like the fact that if a column is hidden, with content written into it's tags,
That gets deleted also when saved, awesome!
There are a few bugs to iron out though.

in attached test.m3u it misses that there is content in the logo column when opened,
so that one gets hidden.
I guess the search routine have to look thru all the cells in the column.

Copy row works, but insert row from context menu don't work,(Maybe rename paste row also)

Move row up and down arrows don't work when there are hidden columns.

"Hidden columns avaliable, continue?" pop-up i would remove when saving.

rename all instances of "Strg" to "Ctrl", are you german? ha ha lol! :smile:
test.m3u.zip

https://steamcommunity.com/app/447020/discussions/0/312265782624887781/
If you can fix these issues, it will be amazing, and thanks for doing this!

Thanks for your troubleshooting!
More features more problems and side effects.

I found an error, so fixed
Thats more work. I used the normal clipboard copy functionality, so the hidden cells are not in it. Must fill the clipboard programmatically.
This error occurs only if the first column is hidden, found solution.
Haha, I'm working for a German company and mix this all the time....... I did not see this anymore.
Changed!

I'm not sure with the additional warning, saving with hidden columns means deleting data now, but I think this is annoying on the long run.
Thanks again!

2nd pre-release available, not fully tested.

Hi again,
It's getting better and better!
Rename "Insert row" to "Paste row above", because "Insert row" only works if a row
has been copied previously.
Even cooler would be if the renamed "Paste row above" is greyed out until "Copy row" is executed,
(memory contains a row)
but that is perhaps difficult to program?
If "Show all columns" has been activated, and you save with "Ctrl + S", the
"spinning blue circle" appears, and no message.
Perhaps a pop-up could remedy that, which simply says "Playlist Saved" with an Ok button only.
The "Hidden Columns avaliable, continue?" message is unnecessary, because either
the hidden columns contain no data, or the user has made a deliberate choice
not to keep them.
The same "Playlist Saved" with an Ok button only pop-up, as when all columns are visible
is better.
When trying the program out, i did a "#EXTM3U" search on pastebin, and it works
beatifully on most playlists.
There were a few with weird formatting, that it had difficulties to read,
but that is to be expected, as there is no formal specification for the M3U format.
I even found some nice new channels on pastebin while testing.
I noticed then how valuable it is that i can test play links directly from the program,
It's awesome.
Thanks for the great work so far!

hi,

I made a method to check the clipboard content, so I can probably join both paste items to one. Or, I just grayed the Insert part out. What du you think?

I added a notification box, good idea

This warning is deleted.

Yes, the check link function is very helpful, I think. Its prolly not 100% right, because I have to set a timeout, if the link is very slow, this can lead to false response, but on very slow connection, you cannot see IPTV anyway.
The corresponding function for the video playlist editor was much more difficult, because it has to check temporary available local network drives.
Thanks!

Hi again Isayso,

The greyout you created on "Insert row" is perfect!
However, i would rename it to "Paste row", as "Insert row" is indicative of "Add row"
that we already have a button for.
"Paste row" is indicative of that you have copied something that you want to paste.

Your notification box "Playlist saved" is also perfect.
I love the fact that no interaction is needed like on a pop-up box with an ok button.

I noticed the "reload" icon, nice feature, so one can discard all changes without
having to re-open the file, super!

Suggestion on the "Play with vlc" icon, I noticed that unless you have vlc installed
the icon doesn't show.
Wouldn't it be better if you keep the icon there anyway, and just throw another pop-up
to the user, encouraging them to install it if it's missing when pressed?
I think there's room for one "Play with kodi" button there as well.
Then you wouldn't need to have it in the context menu.
The "double-press" feature to start a player i would remove.
Reason being that you accidentally activate it when you want to edit a cell,
and that's kind of annoying.
Something like this perhaps, side by side, one for kodi & one for vlc:

What does "Left string shift on paste" mean in the search settings?
With a default value of 0?

I really have to congratulate you on the progress so far, you are amazing!

Many thanks!!!

the greyout feature was leading to a nice feature you will probably like. Direct import from clipboard, so copy a list from internet and import it. I'm sure there are still some errors in this function.
I changed "insert" to "paste".

I did similar for the vlc button, a red box with no vlc found, when not found ;)

I use reload quite often with the video playlist editor, when I want to move a hotkey grabbed link to an other list.

I did some changes, hope you like it.
I use the double click a lot, but see your complaint. I will make it switchable in the settings dialog, but that will take some time.

I used a list with very annoying trailing characters like "[USA] ABC News", with left shift you can mark all cells and copy it to itself to delete the first 5 char "[USA]".  I found a bug for the last row, will fix it.

Thank you for your ideas and testing!!!!!!!   I think they improved the prog a lot.

Hi again Isayso,

The "Import full list" from clipboard button is pure genius!
It streamlines the workflow to find new channels to 100%.
Import=>Linkcheck=>Remove duplicates=>Test play in vlc/Kodi = Brilliant!!

The addition of a kodi button, perfect.
Double click cell = vlc,Ctrl+P or Ctrl+double click cell = kodi, It's a keeper!
I don't think you need to re-program the double click feature to have the option
to turn it off.

Minor issue,
I would remove the "vlc not installed" at start-up, perhaps the user don't want it installed,
And then it's only nagging.
It's perfectly sufficient to have it when clicking the vlc icon if not present.

I haven't been able to test the "Left shift string on paste" feature because i can't
change 0 to anything else, it doesn't remember a change in the setting, it's always zero.
I have been thinking about an appropriate name change for that function also, so
that it becomes more intuitive.
"Remove characters left on paste,(+ shift)" perhaps?

Hi dobbelina,
so, more progress

I think this function will not be 100% bug free, because I cannot test for valid clipboard content, but will work most of the time.  But no need to save as a file before.

ok, I leave it as is

Found a bug, should work better now.

The value is set to 0 when you open the settings window. The value is not saved. I added a tooltip to explain. And renamed it.

found some strange resize behavior of the window, hopefully works now. Single column mode cannot be activated from fullscreen.

Your input is very helpful! Program is much more useful now.

Hi again Isayso,

Aha!, now i understand the left character thing.
It works fine.
It's a good thing you made that change, as any new user seeing it for the
first time,(like me) would otherwise never figure it out, very good.

There is a weird issue with copy and paste cells when more than one cell
is blue-marked in a column.
If you copy 2 cells, selecting from top to bottom, (Downwards), and paste in place, both
cells get the same content.
However, if you select from bottom to top,(Upwards) and paste in place it works?
Similar odd behaviour happens when selecting more than one cell in a row.

If possible, I would prefer the "Paste row" function to paste it's content
to the same row as is selected, and not to the row above.
One could then use "Add row", and copy paste another row in it's place, (Like Excel).

I feel kind of unfair to come with all these suggestions, when you do
all the hard work, but i can promise you i appreciate it, you are truly one of a kind!
On the bright side you can be confident that this m3u editor is the best out there,
I am 100% sure.
Thanks for all your hard work.

Hi dobbelina,
no, its not unfair, that step from a tool for yourself to every bodies tool is always hard work. So, please go on ;)

Yes, its weird, the start point of paste is always the row with the triangle on the left.  When you drag a copy region the triangle follows to the last cell. Therefore the paste will start its work on the following cells. I have no good solution for this now. Its getting worse when you try to copy a region with  columns or not neighbored cells.  I've seen that Excel forbids coping not neighbored cells.
Probably check if the triangle has moved between copy/paste and paste backwards.

The "paste row" is more an "add row" now, right. I can add a real "paste row".

Because I have not found a useful editor for my needs, I started this project. For the video playlist I have not found any (?)  I'm sure that not many people will use the playlist function in Kodi, to use that feature with the remote control on a TV is such a pain.
It's my pleasure to make it a useful program.

Hi again!
In only a few days you have transformed this application from a
dull knife into a razor blade.
I'm very grateful.
As soon as you release a non pre-release version, I will update
the kodi forum thread with your master piece, encouraging
people to download it.

Hi,
I found some problems with copy/paste behavior, still working on it.
What do you think to combine the copy cell (ctrl-c) and row (ctrl-r) to only one copy option? If you select the entire row on the left, rows will be copied, if you select cells only the cells will be copied.
Before your help, it was a tool for my needs only, now its more and more a useful program.
I'm very thankful for your input!

Hi,
Yes, good idea,
Something like this is the standard:

That was a lot of work, to do a combined copy I had to switch off the general copy/paste method and program my own.
Should probably rename "Paste+Add" to "Insert" ......
Please try it out, the gray out logic was no fun too.
Thanks again for your help!

Hi again!
Great work so far.
I would say it's working perfect, except when a single cell is copied.
The copy command doesn't respond if a single cell is only blue-marked.
It has to be clicked twice into edit-mode for the copy command to work.
Everything else, including the "Remove first character" function is flawless.

I've seen this some minutes ago, too. Will look into it. When I drag a region its working (?) Hope its not a side effect of the general copy build in switch off.
Cells are deleted now too, with "delete"
It was worth it!

Awesome!
Look forward to see next version.

Yes, near by. Playing around with it to find something, looks good so far.  In single-column mode I kill the vlc now with a "program switch", remote control like.
The "disable" logic in the context menu was hard to test. The c# code is literally switched off  and not accessible anymore with keyboard shortcuts when greyed out.

This program now officially gets my AWESOME stamp!
https://forum.kodi.tv/showthread.php?tid=220615&pid=2893655#pid2893655

Many thanks!
Without your input it wasn't possible. If you have more ideas let me know.
thanks again.

FYI: New version has a hotkey for import from clipboard, like the video Playlist editor. And a counter for the dead link check. Function can be canceled.

FYI: New version has a hotkey for import from clipboard, like the video Playlist editor. And a counter for the dead link check. Function can be canceled.

Awesome,
Thank you!

Nice addition with the startup file. awesome!

Thanks! If you have some ideas of missing functions, go ahead.
The mru list works in the video editor, but needs lots of testing effort. Not sure if I will spend my time on this or focus on other features first.

Hello,
very nice tool and interface and thank you to have written it.
I would like to ask/propose for some enhancements/correction:

when I select multiple rows in Column 'Title" and I do a "paste", the pattern in the buffer is applied only to the latest row and I would like to have it applied  to all the rows of the selected column
--> that will allow to create/manage easily groups for tools like "Smart IPTV" (application for TV)
it would be nice if we could do a 'save as' for a part of the loaded file, by ex:
I select some rows (the whole row) and if I do a "save as', at that time, it should do a 'save as' only of the selected rows and keep in the editor everything as it was before the 'save as' and not to change the name of the file (in the title bar) to the one we have terminated to 'save as'
enhance the Find feature
when doing a search  through 'ctrl-f', it would be nice to have the possibility specify the action when the pattern is found:
-> highlight the pattern simply (as currently)
-> select the whole row where the pattern was found (that will allow to do a 'save as' of all these rows)
-> select a specific column for all the rows having that pattern (that will allow to modify/paste a pattern in that column for all the rows selected:  typically, we search for the word france or hd that we know present in column "name2" and want to select the column title for all the rows having that pattern
able to restrict the Find to the column or columns having a cell selected when we have pressed 'ctrl-f' : that will allow to do a find only on the column Name2 or in columns Name2 and Title if both have a cell selected.
a last one : enhance existing "load file":
on top of the existing functionality (load a file and if later, we load another, the new replace the existing file);
allow to select/load multiple files (and merged them in the editor) or once a file was loaded, allow to load another file which will be appended to the one already loaded and not replacing it (could be achieved through the configure menu: by adding an option to change the behavioral of the load cmd : append or replace)

I do not know if you can or want and how it will be complex to implement all these enhancements but once, the tool will have them, it will become a real swiss knife to edit M3U files
Thanks

Thanks,
just a quick answer,
2: There is a workaround, select rows, Ctrl-c, Ctrl-n, ctrl-v. I think I can put this in the context menu.
5: I already did a merge feature in the Playlist Editor (my other program) with d&d another file into it. Is this ok? Just drag adds the file, Ctrl-drag merging it.
3: when you activate in options "Column search and select" "all cells" the whole row is selected and can be copied again with ctrl-c, ctrl-n. ctrl-v
The other points, I must take a deeper look inside first to give you an answer.
have a nice day

when I select multiple rows in Column 'Title" and I do a "paste", the pattern in the buffer is applied only to the latest row and I would like to have it applied  to all the rows of the selected column
--> that will allow to create/manage easily groups for tools like "Smart IPTV" (application for TV)

You want to have a fill option? Select a cell region and fill it with the same entry?

enhance the Find feature
when doing a search  through 'ctrl-f', it would be nice to have the possibility specify the action when the pattern is found:
-> highlight the pattern simply (as currently)
-> select the whole row where the pattern was found (that will allow to do a 'save as' of all these rows)

This is done with "all cell" option and copy the rows to new editor window opened with ctrl-n

-> select a specific column for all the rows having that pattern (that will allow to modify/paste a pattern in that column for all the rows selected:  typically, we search for the word france or hd that we know present in column "name2" and want to select the column title for all the rows having that pattern

Don't know exactly what you want to select. You want to find the column names which include  e.g. "HD" in their cells?

able to restrict the Find to the column or columns having a cell selected when we have pressed 'ctrl-f' : that will allow to do a find only on the column Name2 or in columns Name2 and Title if both have a cell selected.

Thats a logical find, right? So "HD" AND "tv", or so.

a last one : enhance existing "load file":
on top of the existing functionality (load a file and if later, we load another, the new replace the existing file);
allow to select/load multiple files (and merged them in the editor) or once a file was loaded, allow to load another file which will be appended to the one already loaded and not replacing it (could be achieved through the configure menu: by adding an option to change the behavioral of the load cmd : append or replace)

I already implemented it, drag an other file on the editor and it will be added at the end.
click "search duplicates" with shift and the double rows will be deleted.

hello,
item 5: feature exist already, as you have mentioned me, through the drag-and-drop feature.
As it was not "working" trough the load menu, I made the assumption that it will be not working  through the drag-and-drop mechanism, that I have to admit I almost never use.
Thanks

yes that will allow to create channels groups easily using the field group-title (column title)

the functionality is there but there is a bug because if I do search for a pattern which is present (row is highlighted), I change in options menu, the value of "Column search and select" (still keeping the same pattern in the fields search), I press simply return on the search field after to have pressed ok in options menu: nothing is selected. I have to delete the pattern and type it again to obtain a selection of the new row corresponding to the section option.

I think it will better to dissociate the column options for the search and for the result selection (more intuitive for the users) and will add more flexibility if we could have 2 separated options:

one to choose on which column we want to do the search
a 2nd who says select what: whole row or a specific column

yes

thanks

I made a prototype with better find function with split between row/cell
and a fill from clipboard context menu entry.
Please try it and tell me what you think.
You find the file TestVersion
test/PlaylistEditorIPTV.exe

I released 1.4.7 with changes you will hopefully like.
Thanks for your ideas!

Thanks for your ideas!


MacOS Fullscreen Problem

Issue description
When entering macOS fullscreen (clicking green button in the top left of the window or fn + F) only 1/ 4 of the screen is rendered. BeginTextureMode() and EndTextureMode() cause this problem. When you comment out the Begin/EndTextureMode() block in the code example the problem disappears.
I have tested it with raylib master, raylib cs, and raylib cslo and only raylib cs has this problem.
This only happens in "macOS Fullscreen mode" and not with ToggleFullscreen() or ToggleBorderlessWindowed().
Environment
MacBook Pro M2
macOS Sonoma 14.5
Issue screenshot
Green Button

Problem

How it looks with Begin/EndTextureMode() commented out.

Code example
using System.Numerics;
using Raylib_cs;

namespace RaylibCs;

public static class Program
{
    static void Main(string[] args)
    {
        const int width = 400;
        const int heigth = 400;

        Raylib.SetWindowState(ConfigFlags.Msaa4xHint);

        Raylib.InitWindow(width, heigth, "Raylib Cs");

        Raylib.SetWindowState(ConfigFlags.ResizableWindow);
        Raylib.ClearWindowState(ConfigFlags.VSyncHint);
        Raylib.SetTargetFPS(60);

        var renderTexture = Raylib.LoadRenderTexture(width, heigth);
        var sourceRect = new Rectangle(0, 0, width, -heigth);
        var origin = new Vector2(0, 0);
        var circleColor = Color.Red;

        while (!Raylib.WindowShouldClose())
        {
            float dt = Raylib.GetFrameTime();
            var mousePos = Raylib.GetMousePosition();

//Comment out -------
            Raylib.BeginTextureMode(renderTexture);
            Raylib.ClearBackground(new Color(0, 0, 0, 0));

            Raylib.DrawCircle(200, 200, 25, circleColor);

            Raylib.EndTextureMode();
//-------------------

            Raylib.BeginDrawing();
            Raylib.ClearBackground(Color.Black);
            var destRect = new Rectangle(0, 0, Raylib.GetScreenWidth(), Raylib.GetScreenHeight());

            Raylib.DrawRectangleLinesEx(destRect, 5f, circleColor);
            Raylib.DrawTexturePro(renderTexture.Texture, sourceRect, destRect, origin, 0f, Color.White);

            Raylib.DrawCircleV(mousePos, 5, circleColor);

            Raylib.EndDrawing();
        }

        Raylib.UnloadRenderTexture(renderTexture);
        Raylib.CloseWindow();
    }
}

Do you get the issue using raylib 5.0 instead of raylib master?

I have just tested the 5.0 release of raylib and it works fine as well, no issue with the fullscreen.

I have a clue: If you install the app 'display menu' it will change your screen to an exact resolution instead of a systemwide scaling and then when you go fullscreen it scales properly to fullscreen size.
Before:

After:

I have had this exact problem with games before and this was a workaround for that too.
Its like when any of these are selected in your display preferences then its doing some kind of scaling in macos that messes this code up

But when you use Display Menu it deselects these "convenience" options and forces the screen to an exact resolution

I recognize that isn't a solution to the problem just a clue/workaround-in-some-cases.  good luck

Thanks for the detailed information :)
I am curious why Begin/EndTextureMode cause this and why they only cause it in the raylib cs bindings? (and not raylib or raylib cslo)

Thanks for the detailed information :)
I am curious why Begin/EndTextureMode cause this and why they only cause it in the raylib cs bindings? (and not raylib or raylib cslo)

You are welcome.  I am also curious about this.  It doesn't add up.  Perhaps theres some setting somewhere that is slightly different.


inter.c, function inter_proc bogus condition

Hi,
In file inter.c line 497 the if and else if are bogus because the same condition.
Certainly the second else if should be  "_i_in2channels" (second)
BR,
Christian
if (!reschannels) {
if (_i_in1channels) {
width=_i_in1width-in1posx;
height=_i_in1height-in1posy;
}
else if (_i_in1channels) {
width=_i_in2width-in1posx;
height=_i_in2height-in1posy;
}
else {
addlib_stop_here("Warning : no image componenet given\n",0,0);
return;
}
resposx=0;
resposy=0;
}

I think, you are right. But I have not tested it.
I do not know if this part of the code is used in the MPEG-7 feature extraction.
This code seems to be more than 20 years old! :)
It is also rather messy, with lots of meaningless variable names, like the rest of the XM Software :(
However, I am still thankful, since they shared the code, even though it is messy and buggy; otherwise, it would have taken a long time to develop from scratch.


[Production & Staging] Error message does not persist when Unable to configure figshare in Project settings

Bug found on the 0.38 testing board:
Steps

Go to a project you have admin on
Go to the settings tab
Enable the figshare add-on
Click to import access token

Expected
I would expect to import the token and see the folder picker appear to complete the configuration.  However, I seem to have an expired token.
Actual
In this case, the error message to the user in the project settings page should remain.
The folder picker never appears.
There is an error that flashes briefly, but does not persist.
The console reports a 400 error.

Comments from @chrisseto : This only happens when you first authenticate figshare.
The message stays after you refresh.
I'm attempting to test on prod but figshare wont expire my tokens.

If driven by communication issue w/Figshare ... well ... @chrisseto let us know sense on possibility of resolving. TY


add ownerOnly test cases

Signed-off-by: Barun Acharya<EMAIL_ADDRESS>

Codecov Report

Merging #13 (7d8bc02) into master (3520195) will increase coverage by 0.08%.
The diff coverage is 6.50%.

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   36.92%   37.01%   +0.08%
==========================================
  Files          21       21
  Lines        8978     9057      +79
==========================================
+ Hits         3315     3352      +37
- Misses       5304     5341      +37
- Partials      359      364       +5

Impacted Files
Coverage Δ

KubeArmor/enforcer/SELinuxEnforcer.go
0.00% <0.00%> (ø)

KubeArmor/enforcer/appArmorHostProfile.go
0.00% <0.00%> (ø)

KubeArmor/enforcer/appArmorProfile.go
26.40% <4.76%> (+1.44%)
:arrow_up:

KubeArmor/enforcer/appArmorEnforcer.go
38.69% <11.11%> (-3.00%)
:arrow_down:

KubeArmor/enforcer/runtimeEnforcer.go
35.08% <14.28%> (-4.28%)
:arrow_down:

KubeArmor/core/kubeUpdate.go
44.37% <0.00%> (+0.17%)
:arrow_up:

KubeArmor/feeder/policyMatcher.go
37.02% <0.00%> (+1.04%)
:arrow_up:

Continue to review full report at Codecov.

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


narrow_history: Save narrow state after we have scrolled to the msg.

Saving narrow state before we have scrolled to the message results in view scroll position being different from where the message is displayed.
discussion: https://chat.zulip.org/#narrow/channel/9-issues/topic/back.2Fforward.20button.20scroll.20position.20broken

Merged, thanks @amanagr!


[BUG] SMP signal dispatch seems racy

Description / Steps to reproduce the issue
the signal sending logic (kill) basically does:

enter_critical_section
decide the target thread
check signal mask of the thread
make a cross call to the target cpu (nxsched_smp_call_single)

as nxsched_smp_call_single drops the critical section, there seems to be nothing to prevent the signal mask from changing in the meantime. it can end up with a signal delivered while being blocked.
similarly, the need_restore logic in sig_handler seems dangerous as it can revert unrelated changes to those fields.
On which OS does this issue occur?
[OS: Mac]
What is the version of your OS?
macOS 14.7
NuttX Version
master
Issue Architecture
[Arch: all]
Issue Area
[Area: Kernel]
Verification

[X] I have verified before submitting the report.

@hujun260 please look at this issue.

as nxsched_smp_call_single drops the critical section, there seems to be nothing to prevent the signal mask from changing in the meantime. it can end up with a signal delivered while being blocked.

I don't think this change caused https://github.com/apache/nuttx/issues/14749,
because the release of the critical section is going to happen regardless of whether I call nxsched_smp_call_single or not.

similarly, the need_restore logic in sig_handler seems dangerous as it can revert unrelated changes to those fields.

There are two fields: affinity and flag.
Due to the setting of TCB_FLAG_CPU_LOCKED, the affinity will not be changed during the process.
The tcb->flags may undergo changes, which I can further refine. During restoration, only the TCB_FLAG_CPU_LOCKED field of tcb->flags will be restored, without altering any other fields.

as nxsched_smp_call_single drops the critical section, there seems to be nothing to prevent the signal mask from changing in the meantime. it can end up with a signal delivered while being blocked.

I don't think this change caused #14749, because the release of the critical section is going to happen regardless of whether I call nxsched_smp_call_single or not.

i don't understand your logic.
in non cross call case, the critical section is released after up_schedule_sigaction.

in non cross call case, the critical section is released after up_schedule_sigaction.

Regardless of whether it crosses cores, up_schedule_sigaction will be invoked, and nxsched_smp_call_single will wait until up_schedule_sigaction has been called and returns.

in non cross call case, the critical section is released after up_schedule_sigaction.

Regardless of whether it crosses cores, up_schedule_sigaction will be invoked, and nxsched_smp_call_single will wait until up_schedule_sigaction has been called and returns.

a cross call releases the critical section before calling up_schedule_sigaction. thus racy.

a cross call releases the critical section before calling up_schedule_sigaction. thus racy.

The vulnerability appears to be persistent, even if up_schedule_sigaction is called immediately in critical section,
it still releases the critical section immediately and cannot prevent the signal mask from changing

a cross call releases the critical section before calling up_schedule_sigaction. thus racy.

The vulnerability appears to be persistent, even if up_schedule_sigaction is called immediately in critical section, it still releases the critical section immediately and cannot prevent the signal mask from changing

if you mean "it isn't trivial to fix", i agree.

a cross call releases the critical section before calling up_schedule_sigaction. thus racy.

The vulnerability appears to be persistent, even if up_schedule_sigaction is called immediately in critical section, it still releases the critical section immediately and cannot prevent the signal mask from changing

if you mean "it isn't trivial to fix", i agree.

yes


I hope I can change the language to Chinese. Thank you.

I hope I can change the language to Chinese. Thank you.
Docker Desktop 4.29.0 (145265) is currently the newest version available.

We do not have near term plans to begin to localize the Desktop interface.


QuantifiedCode_issues

Issue: #929

Fixed "non-Pythonic" method name
Converted to set comprehension
Used is None instead of == None
Fixed "non-Pythonic" variable names
Used an iterator instead of list comprehension inside of any
Removed None as redundant second argument to dict.get()
Merged consecutive if-statements (also used elif's instead of multiple if's)

Uh oh, tests failed?

I think the test failure is unrelated - it's because we haven't mocked the autograder. I'll look into it and try to rerun the test.

Ok, just let me know if I messed something up. If so, I will try and fix it ASAP.

Github PR tool: In the future if you include the phrase Resolves #929 in your first comment - the issue will automatically be closed when the PR is merged :)
https://help.github.com/articles/closing-issues-via-commit-messages/

Thanks for the tip!
I didn't know typing that would close the issue when the PR was merged. I'll make sure to use that message in the future.


Hey! Please provide Material Notification bar.

What is a notification bar?

Please close

What?

@tomscholz sorry, i was asking what a notification bar.

Toasts can be used as a notification system


Could not find a declaration file for module 'react-country-state-city'.

I am seeing this error after installing the package in my react-typescript project.
I ran the npm install --save react-country-state-city command to install the package,
Could not find a declaration file for module 'react-country-state-city'. '/node_modules/react-country-state-city/dist/cjs/index.js' implicitly has an 'any' type.   Try npm i --save-dev @types/react-country-state-cityif it exists or add a new declaration (.d.ts) file containingdeclare module 'react-country-state-city';``
anyone know the fix for this issue?

Update to the latest version and then check.


How to get the embedding of code snippets with CodeT5+ ?

Same question here. How to get code embedding and evaluate like task in paper Table 6?

Hi both, we plan to release our CodeT5+ embedding models in the near future. Pls stay tuned:)

Hi both, we have released the embedding model of CodeT5+ 110M here, which achieves very competitive performance on multiple text-to-code retrieval tasks. The CodeT5+ 110M embedding model can extract 256-dimensional embeddings for both code and text.

Impressive. Thank you for the update!
Kind regards,
Yaser.
From: WANG @.>
Sent: Tuesday, July 18, 2023 4:59 PM
To: @.>
Cc: @.>; @.>
Subject: Re: [salesforce/CodeT5] How to get the embedding of code snippets with CodeT5+ ? (Issue #120)
Hi both, we have released the embedding model of CodeT5+ 110M herehttps://github.com/salesforce/CodeT5/tree/main/CodeT5%2B#codet5-embedding-model-, which achieves very competitive performance on multiple text-to-code retrieval tasks. The CodeT5+ 110M embedding modelhttps://huggingface.co/Salesforce/codet5p-110m-embedding can extract 256-dimensional embeddings for both code and text.
—
Reply to this email directly, view it on GitHubhttps://github.com/salesforce/CodeT5/issues/120#issuecomment-1640174332, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGCBNA37VCTK7H6ZU4TODCDXQ2CDZANCNFSM6AAAAAAZFXEO5A.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

Hi both, we have released the embedding model of CodeT5+ 110M here, which achieves very competitive performance on multiple text-to-code retrieval tasks. The CodeT5+ 110M embedding model can extract 256-dimensional embeddings for both code and text.

Thanks for the update, is it possible to use it with SentenceTransformers package?

Hi both, we have released the embedding model of CodeT5+ 110M here, which achieves very competitive performance on multiple text-to-code retrieval tasks. The CodeT5+ 110M embedding model can extract 256-dimensional embeddings for both code and text.

HI, If I want to adapt the codet5p-110m-embedding pre-training model released by CodeT5+ to obtain the code embeddings of my dataset, would I need to fine-tune it?


#9: Add name constraints tests that include the denied DNS name and IP as other SAN types.

This adds test cases that cover a name-constraints restricted DNS name or IP added as a SAN under various other types (just throwing in all tag types from 0 to 15 for coverage, but in particular including URI and rfc822Name types). I believe this covers the suggested cases in #9.

You can run just the new tests against an implementation with:
go run ./cmd/bettertls run-tests --suite nameconstraints --implementation curl --testCase 8754-8850

You can get the certs and other data for each of the new cases with
go run ./cmd/bettertls get-test --suite nameconstraints --testId 8754

New tests cases applied to prior and current node 16 releases:
$ go run ./cmd/bettertls show-results --resultsFile ../docs/results/dec_2021/node_16.13.1.json
Implementation: node
Version: v16.13.1

Suite: nameconstraints
  Supported Features: NAME_CONSTRAINTS, VALIDATE_DNS, VALIDATE_IP,
  Unsupported Features:
  Passed: 9446
    Passed with warnings: 94
  Skipped: 0
  Failures: 45
    False positives: 30
    False negatives: 15

Suite: pathbuilding
  Supported Features: INVALID_REASON_EXPIRED, INVALID_REASON_NAME_CONSTRAINTS, INVALID_REASON_BAD_EKU, INVALID_REASON_MISSING_BASIC_CONSTRAINTS, INVALID_REASON_NOT_A_CA,
  Unsupported Features: BRANCHING, INVALID_REASON_DEPRECATED_CRYPTO,
  Passed: 17
  Skipped: 64
  Failures: 0

$ go run ./cmd/bettertls show-results --resultsFile ../docs/results/dec_2021/node_16.13.2.json
Implementation: node
Version: v16.13.2

Suite: nameconstraints
  Supported Features: NAME_CONSTRAINTS, VALIDATE_DNS, VALIDATE_IP,
  Unsupported Features:
  Passed: 9461
    Passed with warnings: 126
  Skipped: 0
  Failures: 30
    False positives: 30

Suite: pathbuilding
  Supported Features: INVALID_REASON_EXPIRED, INVALID_REASON_NAME_CONSTRAINTS, INVALID_REASON_BAD_EKU, INVALID_REASON_MISSING_BASIC_CONSTRAINTS, INVALID_REASON_NOT_A_CA,
  Unsupported Features: BRANCHING, INVALID_REASON_DEPRECATED_CRYPTO,
  Passed: 17
  Skipped: 64
  Failures: 0


[ci] formatting

Coverage: 87.227% (-0.002%) from 87.229% when pulling f859d903c9796190e8a347faa4a96d8890c1893c on hazendaz:formatting into 59afc18feac820b8a6dd8676002695ef4c18ffba on mybatis:master.