Work on lambda bug fix

This is a work in progress pull working to correct Issue #274.  The initial pull will replicate the bug and hopefully test the CI changes to get to 1.8.

Thanks! Just a question, wouldn't changing the source/target comapt hinder us to test with older java versions?
At the moment the situation is that we test a lot of python versions, but only one or two hard coded java versions. This is kind of suboptimal. I should change the build matrix at least on travis to include multiple java versions. Eg. set language to java and use miniconda to drag in multiple Python versions. However miniconda oldest Python release supported is 2.7. I don't think there are much people left stuck to 2.6, but we never know.

Yes.  I am a bit worried about that.  However, Java 1.7 is now no longer available from Oracle.  It went past service life and then was removed from releases with security patches.  It can still be obtained with a service contract.  However, I have a service contract and have found it challenging obtain because outdated releases are only given to the site service coordinator. The question is should we be testing against a platform which is no longer available?
More broadly it would be great if our test matrix supported different versions of java.  I suspect we would need a different build.xml for each platform.  However I am not a travis build expert.  Even if we switch to 1.8 for now,  we once 1.9 is released we are just going to be back into this boat again.
Now that I have this lambda bug replicated I thought I could find the spot that was giving the problem, but the diagnostics I am getting from the exception are minimal.  Hopefully I can find the source.

Okay so the problem is happening in the JPTypeManager.  For some reason it is attempting to find the return type class by name and lambdas don't have valid names.  I think there was a flaw in the C++ layer that was assuming the one can't directly get the java class object from a object type and thus it is forced to look it up by name.  If we bypass the name lookup from by using the fact that many of  the jtype are infact polymorphic I may be able to dodge the problem.  Unfortunately, it is a bit of a heavy lift as the C++ layer depends on some of these assumptions.

There is openjdk, which is pretty much independent from Oracle, isn't it?
Maybe there is a clever way to have only one build.xml. Multiple files are harder to handle.

We could give parameters to ant and push it in command line.  ant -DJAVA_VERSION=1.8   It is an okay solution, but will make it a bit harder to call directly as it will expect the variable to be passed  in.   The harder problem will be making ant and python skip those tests that aren't valid for the Java version.

On 21.02.2018 20:29, Karl Nelson wrote:

Okay so the problem is happening in the JPTypeManager.  For some reason it is attempting to find the return type class by name and lambdas don't have valid names.  I think there was a flaw in the C++ layer that was assuming the one can't directly get the java class object from a object type and thus it is forced to look it up by name.  If we bypass the name lookup from by using the fact that many of  the jtype are infact polymorphic I may be able to dodge the problem.  Unfortunately, it is a bit of a heavy lift as the C++ layer depends on some of these assumptions.

I think for the same reason inner classes are not supported. Probably
one should rewrite the whole cpp layer with pybind11 and design it
properly with future Java features in mind.

On 21.02.2018 20:33, Karl Nelson wrote:

We could give parameters to ant and push it in command line.  ant -DJAVA_VERSION=1.8   It is an okay solution, but will make it a bit harder to call directly as it will expect the variable to be passed  in.   The harder problem will be making ant and python skip those tests that aren't valid for the Java version.

I think setting JAVA_HOME correctly will fix the java version in ant

Okay I moved the test harness to be version dependent so that we can add tests that require a specific version.  The ant pattern now looks at the java version so that it builds the tests for the current version and any prior.  And the tests now can have skipping based on the version.  However, we have a problem in that the skip is being evaluated before the JVM so we are getting the wrong version string.  Once that is fixed the test harness code you were working on should be able to run the full test matrix.

The unit test skipping on java version now works.  Now if I could figure out how to get lambdas to work I would be all set.

I also think, that the hashing method seems to be the best choice here.

I am still trying to figure out why the JP types don't match the tree in JNI.
https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/types.html
A lot of stuff with the class is messed up because of this.

Can you be specific on which types are not matching?

In JNI jclasses are in fact object instances.  Thus you can operate on them as objects to access their methods.  JP has two separate trees and thus there are lots of times functions assume that you can only operate the class methods or the object methods.     Arrays instances as also objects and can be acted as specializations of objects.  But they are treated as a completely separate type, thus the paths for working with objects and arrays diverges which I often find has no difference other than the naming, or something which could have just been a specialization.
JPYPE C++ Class Tree

JNI Class Tree

Class is on the bottom of one tree and doesn't connect at all with object.  Arrays are on parallel levels rather than below the type they come from.  Base classes exist but most code is using the concrete types.  There is 1-1 correspondence between jclass, JPTypeName, and JPType but the relationship is spread all over the hierarchy.  Things needlessly covert from strings to names to jclass to JPClass and back and forth just to to handle the miss factorization.
Don't worry this is just my usual rant when I look down at this level of code.   There is just a lot of needless code that would have gone away if the tree were designed with more with JNI inheritance model in mind.  It is like the memory management section that made its own frame system when jni already provided one.  There was nothing particularly wrong with spinning a memory model if we need it, but it was clear that the original author wasn't experienced enough with jni to know about the built in tool so a lot of reinvention happened.  (Please no offense, I did the same thing when I wrote a JNI bridge class library back in 1995).  It just takes a while to remove reinventions and straighten out the tree especially when something is ingrained like we have here.    I have fixed this a lot at the python level where we can now work with Objects, Bridge Classes and Java Classes, but to do it I had to go back through the tables using forname.  This despite the fact that I have the jclass and the jclass is already a jobject.
Thus everytime I go to this level I try to fix at least part of the model, but usually find there were too many assumptions resting on some concept.  95% of it can be fixed quickly, but there was one special case required tear your hair out level rework that prevents moving forward.   The Lambda fix is the same, one special case where the tree is insisting on passing a JPTypeName were a jclass would be fine, but every object implements it as a virtual method, the number of changes to get that one case will take 100 times more than everything else.

Do I need also mention that there is hardly a line of comments in the headers to tell me what is the difference between something like getName() and getObjectType()?  😡

For example of why something easy is really hard to fix.
                if (simpleName == "java.lang.Object")
                {
                        if (JPEnv::getHost()->isInt(obj))
                        {
                                JPTypeName tname = JPTypeName::fromType(JPTypeName::_int);
                                JPType* t = JPTypeManager::getType(tname);
                                res.l = frame.keep(t->convertToJavaObject(obj));
                                return res;
                        }

Here we want to convert an int to a boxed type.  So we take an enum and put it through something to get the typename.
JPTypeName JPTypeName::fromType(JPTypeName::ETypes t)
{
        return fromSimple(nativeTypes[t].c_str());
}

Okay so it turned the enum to "int" then called fromSimple...
JPTypeName JPTypeName::fromSimple(const char* name)
{
        string simple = name;
        string componentName = simple;
        ... blah... blah ... blah  (huge long function)
}

Okay so now was have a JPTypeName which contains a string "int". So now we just need the type converter....
JPType* getType(const JPTypeName& t)
{
        TRACE_IN("JPTypeManager::getType");
        TRACE1(t.getSimpleName());
        map<JPTypeName::ETypes, JPType*>::iterator it = typeMap.find(t.getType());

        if (it != typeMap.end())
        {
                return it->second;
        }
        ...
        TRACE_OUT;
}

Okay so we went from type name "int" to fetch a predefined class JPIntType instance.
We went through 3 layers just to get a predefined class instance using 3 tables of string lookups just to get a predefined constant.  That is a lot of layers of an onion to trace, debug, and maintain.  Not to mention very inefficient.  But this is the level of tracing I have to do to unwrap a  single assumption because one special case is using a name only lookup rather than the jclass corresponding to the boxed type.

If you are willing to redesign it the c++ backend, while preserving the public api, I'd be totally happy with that. As you mentioned the type wrapping is very detailed and goes through layers which are not necessary. I bet one can write this with a couple of templated c++ classes very easily. I agree that removing extra layers would also be a benefit for performance (replacing virtual calls with generated template code, removing extraneous abstraction layers for types). I like your idea of just mimicking the JNI type hierarchy as it is clean and simple.
We can use at least cxx11 for now, as I'd be also tempted to use pybind11 for the python binding in the future.

I carpet bombed the C++ layer removing extra class layers and tried my best to remove JPTYPENAME as the matching criteria.  There is still a few places where it was needed for the logic.  It also had some hidden behavior for handling nulls that I need to maintain. It is still heavier than I like.
The new hierarchy has JPClass as the base type from which we have JPObjectClass,  JPArrayClass, and JPPrimitiveType.
JPStringClass is a specialization of JPObjectClass.  There is one table for all C++ class bridges.  Dynamic cast is used if we need a particular type.  3 global tables died.  3 sections of cut and paste code died. A peice of code that did some expensive parsing passed it down three layers and did nothing with it when it got there also died.  There will be a new module call the promotes JPObjectClass to an object instance so we don't need to call for Name to get the class.
Gutting the extra Jni layer and the host layer is still too heavy a lift.   Was the common layer intended for something other than python?   The only function currently is holding Jnisms from pythonisms.  Though perhaps that is a good thing.
If I succeed in getting that running again,  we can remove JPField with minor rewrite.  Everything can be done through the class members as we now have access to the class object.    We just need to make that code obsolete in the python layer.

I think @DevilWolf intended to use these type abstraction layers for binding other languages than Python (eg. Ruby). But for the Python binding use case we do not need it. Nowadays we really should stick to pybind to glue to the jni wrappers.

Okay making good progress.  But there are a lot of moving pieces.

Everything now compiles and lambdas appear to work.  Unfortunately, I still have a lot of breakage regarding JPTypename and its abuses.  Mostly problems with translating primitive array types to the proper class structure.  Once all those test pass it will be good to review.

Still working.  Thrameos/jpype#22

Trying to get back to finishing up the patch.  The key issue is I broken the initialization sequence for the Java hook class.  I can't find sources for those classes so I am scouring the internet to see if some ancient copy has the source for those class files.
Unfortunately, my father died after a 3 month battle with liver cancer last week.  So been feeling a bit too down to make much progress.

On 03/26/2018 05:48 PM, Karl Nelson wrote:

Trying to get back to finishing up the patch. The key issue is I broken
the initialization sequence for the Java hook class. I can't find
sources for those classes so I am scouring the internet to see if some
ancient copy has the source for those class files.
Unfortunately, my father died after a 3 month battle with liver cancer
last week. So been feeling a bit too down to make much progress.

My deepest sympathy for your big loss! Please take all the time you need
to finish things - there is no need to rush. Sometimes getting
distracted by work is good to overcome the pain.
The code for the hook classes should by in jpype/_jcollection.py
Best regards

Unfortunately, that is not the hooks I was looking for.   The ones I am looking for are the ones stored in native/common/jp_invocationhandler.cpp, native/common/jp_reference.cpp, native/common/jp_referencequeue.cpp. They were created by compiling some currently lost java files.
I see some old copies of these files floating around the internet.
https://github.com/remram44/jpype/tree/master/src/java/jpype
https://github.com/remram44/jpype/tree/master/src/java/jpype/ref
There is a also a corresponding python script that converts the java to source code.  I am guessing at some point all of the code generation steps got cut out of the project and thus the corresponding sources used to produce those sources was cut at the same time.   Unfortunately when I was manipulating the code I broke the loading order sufficient to need to look at the underlying class files.  I have restored the required files in my private branch and will push them it.
The java sources also give me a much better way to solve the name lookup problem.  The hashcode is incomplete because hashcodes are not unique (thank you java for not guaranteeing that class objects don't relocate due to garbage collection) thus I need to create a map of lists to store class wrappers by hashcode.  If I use the jclass directly to call a java class which I dynamically load, then I don't need to worry about collisions because the class wrappers can be stored as java.lang.Long in the Java layer.  The only downside it that like the reference queue code it will look a bit like magic because we will install our own java class and be using those hook points in C++.
A prior author pulled all of the java dynamically loaded class stuff into jp_proxy with a note that this code doesn't belong here but is similar to the stuff that is being done here.  Eventually I was able to trace that cryptic comment to figure out some of the class in jp_javaenv were in fact using the dynamically loaded class as entry points.  Thus leading me to realize that a portion of the source code was in fact missing.  Now that I know about what it going on there I can reorganize it so that all the stuff to support those classes are together and make use of dynamic classes to reduce some of the sticky global objects problems.

Completed rework of thunk code.  Unfortunately on a skii trip so can't update the pull request.  New code makes it through load and initialization but segfaults on a new object.  So still have dangling variables in the rework.

Having the thunk code helped a lot as I can finally see the workings of the reference queue.  That cleared up a lot if mysterys about the proxy memory management.
Once I get the last segfaults out I sold be able to start debugging the test bench.  Then I will need to back port any changes since this branch started.

Enough seg faults are cleared to run some of the test cases.  Sill some mysteries remain.
I can't figure out what is the point of JException and PYEXC.  There doesn't seem to be much purpose for Throwables and Python exceptions to be separated.  I tested in python 3 and found no issue merging them.  It may be an issue for pythom 2.
I have also experimented with removing  capsule usage.  It appears to be one of the areas where stradding between python 2 and 3 is requiring extra glue code.  Promoting all to formal classes elminates a bunch of differences between the two and allows a lot of stray entry points to be moved to the __init__ methods.
If I can isolate the remaining segfault that seems to be crashing inspect I should be able to run the full test suite.

I am closing this request.  All of this code was pulled by hand into the devel copy.   The diagrams etc are still relevant by the cod base is not stale.


Grid routing connections

DO NOT MERGE

DO NOT MERGE

@eugenevinitsky the current code is here!
Non-RL works for traffic_light_grid and queue_grid. I stopped altering tl_grid halfway, because I made the queue_grid, so my changes to tl_grid code should be ignored.


Read poetry.lock file

I would like safety to be able to read dependencies from a poetry.lock file. It is written in TOML format.
Here is an example of how a dependency is written:
[[package]]
category = "dev"
description = "A configurable sidebar-enabled Sphinx theme"
name = "alabaster"
optional = false
python-versions = "*"
version = "0.7.12"

Here is a complete file:
poetry.lock
Currently the only way to use safety when developing a project with poetry is to actually install the dependencies (which is costly in CI) and run something like:
poetry run pip freeze | poetry run safety check --stdin

I would like to be able to run directly safety check -r poetry.lock or something equivalent :slightly_smiling_face: .

+1 on the feature request, I would love to have this as well.
As a side note, from poetry==1.0.0a0 onward you can use poetry export -f requirements.txt to generate a requirements.txt file that can be consumed by safety check. But it is a bit inconvenient in CI chains.

If using pre-commit, here's a hook to using the stdin approach @pawamoy described:
- repo: local
    hooks:
      - id: python-safety-dependencies-check
        name: Run safety on project packages.
        entry: bash -c "poetry run pip freeze | poetry run safety check --stdin"
        pass_filenames: false
        language: system

Running the above command with the latest beta of poetry does not work.
; poetry run pip freeze | poetry run safety check
--stdin

[FileNotFoundError]
[Errno 2] No such file or directory
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe

and
; poetry debug

Poetry
Version: 1.0.0b2
Python:  3.7.4

Virtualenv
Python:         3.7.4
Implementation: CPython
Path:           /home/usr/.cache/pypoetry/virtualenvs/usignals-py3.7
Valid:          True

System
Platform: linux
OS:       posix
Python:   /home/usr/.pyenv/versions/3.7.4

Please ignore me. Not enough coffee before I start work… Safety was not installed.
I shall go sit in a corner wearing a dunce hat.
/sigh

It is clear there is work to be done here. One problem I see so far is that Safety was supposed to be using pyupio/dparse more than it is now, and such library should indeed have Poetry support.
The work around looks great anyway!

For reference:

issue in pyup: https://github.com/pyupio/pyup/issues/332#issuecomment-617404902
issue in dparse: https://github.com/pyupio/dparse/issues/36

I'm now using
poetry export -f requirements.txt | safety check --stdin

...instead.

pip freeze was also showing the current package as an editable install, that I had to filter out with an additionnal grep -v pipe (with ugly regex to match underscores/dashes and upper/lower case). poetry export -f requirements.txt don't show dev dependencies, which is good since I don't care if they have CVEs as they are not part of the published package, and it also doesn't show the current package, fixing the previous pain point.
safety is not installed as a dev dependency anymore, because doing so make it vulnerable to malicious packages installed in the same env, effectively canceling its usefulness (the malicious packages can override its check function to hide themselves). See https://nvd.nist.gov/vuln/detail/CVE-2020-5252. Instead, I install it with pipx so it's isolated. You could also always use pipx if you want: poetry export -f requirements.txt | pipx run safety check --stdin

safety is not installed as a dev dependency anymore, because doing so make it vulnerable to malicious packages installed in the same env

You can run safety in an isolated environment, and still track it as a development dependency in Poetry:
poetry export --dev --format=requirements.txt --output=requirements.txt
pip install --constraint=requirements.txt safety
safety check --file=requirements.txt

This works best when automated with Nox.
Here is an article that describes the technique in more detail (disclaimer: I'm the author):
https://medium.com/@cjolowicz/hypermodern-python-3-linting-e2f15708da80

Having just found out about CVE-2020-5252, I'm migrating from installing safety into my poetry-managed environment to having it installed into a separate environment.
In the process, I noticed that safety check (when run in the poetry-managed environment) misses out on a known vulnerability in cryptography package.
$ poetry run python -m safety check --full-report
[...]

  Safety v2.3.5 is scanning for Vulnerabilities...
  Scanning dependencies in your environment:

  -> /home/sam/.cache/pypoetry/virtualenvs/hitron-exporter-ugtVc_Mk-py3.11/lib64/python3.11/site-packages
  -> /home/sam/.cache/pypoetry/virtualenvs/hitron-exporter-ugtVc_Mk-py3.11/lib/python3.11/site-packages

  Using non-commercial database
  Found and scanned 34 packages
  Timestamp 2023-02-18 16:46:04
  0 vulnerabilities found
  0 vulnerabilities ignored
+======================================================================================================================================================================+

 No known security vulnerabilities found.

+======================================================================================================================================================================+
[...]

When I use poetry export and feed the output to safety, it correctly detects the following vulnerabilities:
$ poetry export | safety check -r -
[...]

  Safety v2.3.5 is scanning for Vulnerabilities...
  Scanning dependencies in your files:

  -> <stdin>

  Using non-commercial database
  Found and scanned 18 packages
  Timestamp 2023-02-18 16:57:12
  2 vulnerabilities found
  0 vulnerabilities ignored

+======================================================================================================================================================================+
 VULNERABILITIES FOUND
+======================================================================================================================================================================+

-> Vulnerability found in cryptography version 37.0.4
   Vulnerability ID: 52173
   Affected spec: >=37.0.0,<38.0.3
   ADVISORY: Cryptography versions from 37.0.0 and before 38.0.2 include a statically linked copy of OpenSSL that has known
   vulnerabilities.https://github.com/pyca/cryptography/security/advisories/GHSA-39hc-v87j-747x
   CVE-2022-3786
   For more information, please visit https://pyup.io/v/52173/f17

-> Vulnerability found in cryptography version 37.0.4
   Vulnerability ID: 52174
   Affected spec: >=37.0.0,<38.0.3
   ADVISORY: Cryptography versions from 37.0.0 and before 38.0.2 include a statically linked copy of OpenSSL that has known
   vulnerabilities.https://github.com/pyca/cryptography/security/advisories/GHSA-39hc-v87j-747x
   CVE-2022-3602
   For more information, please visit https://pyup.io/v/52174/f17

 Scan was completed. 2 vulnerabilities were found.
[...]

I've double-checked and the Poetry-managed environment does contain /home/sam/.cache/pypoetry/virtualenvs/hitron-exporter-ugtVc_Mk-py3.11/lib64/python3.11/site-packages/cryptography-37.0.4.dist-info and the corresponding cryptography directory containing the package's Python modules.
I was going to file a separate issue about this but I figured I should mention it in here, since proper support for Poetry would make a separate issue irrelevant.

@franco0700 pls check this out, especially the last comment rgd poetry-audit.

Hi @pawamoy and everyone involved,
Thank you for your feature request and for your patience as we reviewed it.
We're pleased to inform you that Safety now supports scanning poetry.lock files directly. This feature has been implemented to make it easier for users to check their dependencies without needing to install them first.
You can now use the command safety scan --target /path/to/project to scan your poetry.lock file for vulnerabilities.
If you wish to specify a target directory for the Safety Scan, you can do so using the --target option, e.g. safety scan --target /path/to/project. Safety Scan does not allow you to target single files, but the include-files section of the Policy File does allow you to include specific files in your scan if these are not detected in a normal scan.
If you have any further questions or encounter any issues, please let us know.
Best Regards,
The Safety Team

Hi @dylanpulver , thanks a lot for the feature! Is there a migration path for users that used to run poetry export -f requirements.txt | safety check --stdin? because poetry export will only show dependencies listed in the [tool.poetry.dependencies] table of the local pyproject.toml, which is what I want in my CICD.


refactor: replace use-clipboard with useClipboard

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
👇 __ Let's make a quick check before the contribution.
PR Type

[ ] Bugfix
[ ] Feature
[x] Refactoring

Context

[ ] Part of  https://github.com/kodadot/nft-gallery/issues/5314
[ ] Requires deployment <snek/rubick/worker>

Before submitting pull request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality

Optional

[ ] I've tested it at </ksm/collection>
[ ] I've tested PR on mobile
[ ] I've written unit tests 🧪
[ ] I've found edge cases

Did your issue had any of the "$" label on it?

[ ] Fill up your DOT address: Payout

Community participation

[ ] Are you at KodaDot Ecosystem Telegram?

Screenshot 📸

[ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at 088602c
Refactored the clipboard functionality across the app to use a custom useCopyClipboard composable based on @vueuse/core. Removed the vue-clipboard2 dependency and the vueClipboard plugin. Added toast messages and tooltips to improve user feedback when copying text. Improved code reuse and consistency for generating and copying shareable links.

🤖 Generated by Copilot at 088602c

To copy text with a click
We refactored our code quite a bit
We used useClipboard
And removed some old libs
And added some toast and tooltip

duplicate #7064? please could you open merge request on nuxt branch

duplicate #7064? please could you open merge request on nuxt branch

Yeah seems like a duplicate, Ill just close this


[Proposal] Add attribute selectors

One thing that would be great to have is attribute selectors, like input[type="text"] or a[href].
At first, could be just these two variations, because the others ($=, ^=,...) can be a little tricky and/or time-consuming.

Just noticed that there is already an Attribute module. Does it have any usage right now? I couldn't find references besides the tests.

Hey @LooserName404 👋
Thanks for the suggestion. Yes I agree this would be nice to have.
I have already spent some time working on this.
Just like you suggested, I have started with the simpler variations, as well as allowing them after pseudo-classes.
Once I have it more locked down I will post the syntax suggestion here for some input 😄

Hey again and sorry for the late reply. I have been quite busy the last couple of weeks.
As for attributes nothing is really ready to merge, but I did get some help from a friend and we found a syntax we both like.
Attr.Has (Html.A, Attribute.Href, [ Color.purple ]) // a[href] { color: purple }
MatchAttr.Exactly (Html.P, Attribute.Title, "Header", [
    FontSize.value(24px)
    BackgroundColor.red ]) // p[attribute="Header"] { font-size... }

Where the Exactly keyword can be swapped out to get other ways of matching like ($=, ^=,...)
You would use these in normal fss blocks.
Any thoughts?
So far nothing has been implemented apart from a small POC. What I have been working on lately is the next version of the library, and I think attributes will be a part of that.
And I think attributes will be a feature of that.

Hello,
This is looking amazing! Good job!
These two samples would be something I'll surely use.
My only suggestion is to put the Rule list apart from the other parameters, like this:
Attr.Has (Html.A, Attribute.Href) [ Color.purple ]

I think that it reads a little better, and also makes it harder to "lose" bracket or parentheses, but its only a suggestion.
Thank you for the update. :)

Closed with merge of #19 and release of Fss 2.0.0.
Thanks for the help 👍


Use correctly find() with object

Hi!
I have originaly this part of code:
public function speed(): ?float
{
    /** @var AdditionalInformation $additionalEventInfo */
    foreach ($this->additionalEventInfo as $additionalEventInfo) {
        if ($additionalEventInfo->name() === 'Speed') {
            return (float) $additionalEventInfo->value();
        }
    }

    return null;
}

I've "translated" this code with Knapsack:
public function speed(): ?float
{
    $speed = Collection::from($this->additionalEventInfo)
        ->find(
            function (AdditionalInformation $additionalInformation) {
                return $additionalInformation->name() === 'Speed';
            }
        )
    ;

    if ($speed instanceof AdditionalInformation) {
        return (float) $speed->value();
    }

    return null;
}

Finally, I don't like this code.
It is not really more readable that original.
Is it a better solution?
Thanks

Well, you could write it like this, for example:
public function speed(): ?float
{
	$isSpeedInformation = function (AdditionalInformation $additionalInformation) {
		return $additionalInformation->name() === 'Speed';
	};

	$speedInformation = find($this->additionalEventInfo, $isSpeedInformation);

	return $speedInformation ? (float) $speedInformation->value() : null;
}

If you think that's more readable ;)

You're right :clap:


Request: code block limiting width with scroll bar

As of version 1.0.0, looking at the example site's MathJax post: https://1bl4z3r.github.io/hermit-V2/posts/mathjax-support/
The left/right scrolling is huge due to the first code block in the configuration section.
Any thoughts on having the scrolling limited to within the code block (and not the entire page)?
As an example, check out the code blocks here work (left/right scrolling is scoped to the code block): https://blowfish.page/docs/shortcodes/#alert

Hi @jamesbraza,
Thank you again.
Let me check this. I will update as soon as possible.
Additionally, if you are able, could you give me a screenshot of the issue. It will help me a lot.

Yeah sure! I have pasted a screenshot below:

Basically the first code block goes way off the screen, and you can see a left-to-right scrollbar appears on the bottom.  It would be cool if the scroll bar is inside the code block, not for the entire screen.  Take a look at that Blowfish theme's link in the first post for a reference.
Let me know if the request still doesn't quite make sense

Got it.
Either it will be a horizontal scrollbar or the code will be auto word-wrapped.
No promises on what I could implement though.

Added scroll bar on code block, as this was easier.

Thank you @1bl4z3r ! Looks great, and can now scroll down that page nicely


Fix: upload dist only to npm

Summary
Added the "files" field to package.json to ensure only the necessary files are included when publishing the package to npm. This helps in removing unused stuff like docs, src, .github from the npm package.
Related Issues

Fixes #217
Screenshots (if applicable)
before:

after:

Thanks for your contribution 🎉


Move smartics plugin repository configuration to modules sub project

Because this plugin repo is configured in the root POM, it becomes the default for all plugins required by the build.
The speed and reliability of this repo is not good, so builds done on a clean environment are very slow. We should move the config down into the module that specifically requires it.

Closing this.
The next Smartics plugin release will be to Maven central. So when we upgrade the plugin for #780, we can remove the reference to the smartics plugin repo.


More screen and GameProps stuff

Btw ScreenCharacterSelect::unknown69 definitely isn't a TextureRenderingInfo, there's a bunch of run-type flags there and the next screen to load at 0x848. Some of these are written by 22c02260 init_seeded_run(state, seed) and 22c0d340 init_adventure()


The collection expressions article in the language reference does not mention a lot of information

Type of issue
Missing information
Description
Dear MS Doc Team,
Recently I had a discussion about Collection Expression C# language feature in the corresponding github item dedicated to the feature: https://github.com/dotnet/csharplang/issues/7913#issuecomment-1950302645
During my work with the feature I have discovered two scenarios when feature didn't work as expected. After discussion with the compiler team members it turned out that there are crucial pieces of information that the documentation for the Collection Expressions feature never mentioned, or did it in a very implicit way. I will list them here:

The article does not explicitly state that the collection expression operators materialize the collection. This is a crucial information because:

When collection expressions are used with IEnumerable<T> type it forces the collection materialization and breaks the lazy evaluation. This is important  to know for developers that may consider using new syntax instead of LINQ methods like Concat, Prepend, Append  for brevity.
Continuing the previous point. Collection expressions can't be used on infinite IEnumerable<T> sequences. The application will hang due to an attempt of the compiler generated code for collection expressions to materialize an infinite sequence.
The materialization affects the performance.

The compiler team explicitly stated that the Collection Expressions feature and LINQ have different use cases and scopes:
https://github.com/dotnet/csharplang/issues/7913#issuecomment-1950292510

This is not covered by the documentation, it does not actually mention LINQ at all. There is no description of the relationship between Collection Expressions and LINQ, and when developer should pick one over another. You may find more about the difference here: https://github.com/dotnet/csharplang/issues/7913#issuecomment-1950514713

The reported article does not specify that collection expression can be converted directly to an interface type like IEnumerable<T> directly. In this case compiler will generate a new read only wrapper type for an array or list that will implement several standard collection interfaces. You can read about it in the feature specification:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-12.0/collection-expressions#interface-translation

In the feature specification and documentation for C# 8 ranges and indexes feature (https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/ranges-indexes#type-support-for-indices-and-ranges) a new classification of .Net types is introduced - Countable types. These are types with integer Count or Length properties with an accessible property getter. They are used by the compiler with duck typing - these types do not have to implement collection interfaces with a Count property, the compiler would use their Count/Length property anyway.

The reported article does not mention that the Collection Expression feature uses Countable types and duck typing. This is an important thing to know for developers, especially in case of specific collection that is not correctly supported by the Collection Expressions feature. You can see an example of such collection here:
https://github.com/dotnet/csharplang/issues/7913#issuecomment-1950297412
In addition, in my opinion add the concept of a Countable type deserves its own dedicated articles because:

It is already used in several C# features
This concept relies on a dynamic typing, duck typing, and not on static typing. It is an implicit contract imposed on type by the compiler based purely on the property naming. No special keywords are used. Thus it is easy to introduce significant changes in the application with a simple renaming. Developers can be unaware of it, and a separate article may raise their awareness of this concept.
Maybe useful to describe which property has the precedence Length or Count if the type has both.

The feature specification (https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-12.0/collection-expressions#spec-clarifications) provides a notion of a well behaved collection type. Here is the description:

Collections are assumed to be well-behaved. For example:

It is assumed that the value of Count on a collection will produce that same value as the number of elements when enumerated.
The types used in this spec defined in the System.Collections.Generic namespace are presumed to be side-effect free. As such, the compiler can optimize scenarios where such types might be used as intermediary values, but otherwise not be exposed.
It is assumed that a call to some applicable .AddRange(x) member on a collection will result in the same final value as iterating over x and adding all of its enumerated values individually to the collection with .Add.
The behavior of collection literals with collections that are not well-behaved is undefined.

These restrictions are important to know for developers using the Collection Expressions feature. They are not mentioned in the reported article, and it is hard to find them in the text of a feature specification. Feature specifications also have explicit statements that the actual implementation may differ from them which undermines their value. Therefore, they should be mentioned in the official final documentation, for example, in the reported article.
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/collection-expressions
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/operators/collection-expressions.md
Document Version Independent Id
49349466-94fd-00b5-93da-e4200d9f9ec8
Article author
@BillWagner
Metadata

ID: 63733f9f-0896-c948-1a7e-58fb428c11c0
Service: dotnet-csharp
Sub-service: lang-reference

Thanks for providing all these details @SENya1990
This is great information for the next update to this article.
I've added this to our next sprint, and I'll make these updates.


Intaking cleanup

As described in https://github.com/FRC900/prog_gen_tasks/issues/720

Looks good, see if we can test it on a robot before merging


Is it right code in the transport function?

https://github.com/snu-mllab/PuzzleMix/blob/86e271b93a4285e53b7023ace12d7a9770d0550c/mixup.py#L304
According to the algorithm in the paper, I think it should be in the for loop?

Thank you for the comment. As shown in here (our ImageNet code)
https://github.com/snu-mllab/PuzzleMix/blob/86e271b93a4285e53b7023ace12d7a9770d0550c/imagenet/lib/utils.py#L300-L310
that should be in the inner loop. I think we made a mistake when we cleaned up our code. I'll fix it.
However, we made a multi-processing code for graph-cut and I'll upload it too. Thanks.


indexer: Lower periodic status frame rates

Docs: https://docs.revrobotics.com/sparkmax/operating-modes/control-interfaces#periodic-status-frames

I did deploy an earlier version of this to the robot which set the periods to 100ms, but the CAN bus did still regularly hit 100% utilisation.


Cryptomatte using Fusion Render Node

I have gotten Cryptomatte to work in Fusion Studio 9.0.2, and i can render the sequence locally.
I am using Thinkbox Deadline for network rendering and i have installed "Install Fusion Render Node v9.0.2.msi" on my rendernodes.
I first got this error:
INFO: LOG: ...\Roaming\Blackmagic Design\Fusion\Fuses\cryptomatte.fuse:13: module 'cryptomatte_utilities' not found:
INFO: LOG: no field package.preload['cryptomatte_utilities']
INFO: LOG: no file 'LuaModules:cryptomatte_utilities.lua'
INFO: LOG: no file 'LuaModules:cryptomatte_utilities\init.lua'
INFO: LOG: no file 'LuaModules:cryptomatte_utilities.dll'
So i copied the file "cryptomatte.fuse" to folder
C:\Users\Render\AppData\Roaming\Blackmagic Design\Fusion\Modules\Lua\
and now it renders without error, but my saved images doesn't look right. It looks like the rendernode has completely ignored (or failed) the cryptomatte node.
Has anyone else gotten Cryptomatte to work with Fusion Render Node?

My guess would be that you need a complete installation, not just the fuse.
Full installation instructions: https://github.com/Psyop/Cryptomatte/blob/master/docs/fusion.md
Can you try that and let us know if that fixes it?

Hi @AndrewFromSpaceDeluxe
First of all, thanks for using Cryptomatte!
Second, the fuse file needs to be in the \Fuses\ directory, the module (*.lua) needs to be in the \Modules\Lua\ directory, please consult the install documentation for a correct installation, as Jonah suggested. When installing everything for Fusion, don't forget to do the same for Fusion Render Node.
And to answer your question, yes somebody else got it to work.
We use and render Cryptomatte daily at Grid, as well through Deadline (10).
Keep us posted!
Cheers
Cedric


Added ability to turn logging on and off via links / Info.plist.

Since we now use certificate pinning to secure our network traffic, Charles Proxy no longer works to debug app network problems.
I've added a way to turn logging on and off via crafted app links.  Using an app link like myapp://?BranchLogLevel=BNCLogLevelAll (or a universal link with the same query string) turns on the logging for the app.  The log messages can be read using the Console app or Xcode on a Mac.
Also, per @jdee , I added a way to set the log level in the app's Info.plist file.  Set the BranchLogLevel key in the Info.plist to the desired log level string.  The strings are defined in the BNCLog.hfile.

Result of Integration 1
Duration: 9 minutes and 32 seconds
Result: Perfect build! All 199 tests passed. :+1:
Test Coverage: 60%


Server-side Chakra optimization

I've got a .NET service that runs small snippits of JavaScript. It needs to be super fast so I've pre-allocated a pool of chakra runtimes. I'm attempting to re-use the runtimes but after running a single threaded stress for a bit I encounter "Wrong thread" exception when attempting to set a newly created context on the runtime.  I can clearly see from debug messages that the previous use of the runtime had completed.
Is this the best way to approach this problem? When attempting to run several scripts at the same time and keep them completely isolated is my idea of a pool of re-usable runtimes and new context for each request correct? What is the lifetime of a context? When does it get cleaned up? I'm also seeing out of memory exceptions from Chakra.
Should I just be creating brand new runtimes for each request?
Update: Rather than queue my runtime and reuse I just dispose it. Running 10 thread stress and see no issues. I don't see any perf impact by creating a new runtime for each request.

Wrong thread

Was the runtime on a previous thread? If so, you need to JsSetCurrentContext(JS_INVALID_REFERENCE) on that thread to give up the runtime.

When attempting to run several scripts at the same time and keep them completely isolated is my idea of a pool of re-usable runtimes and new context for each request correct?

This is the right idea. A new context is a new execution environment for a new incoming request.

What is the lifetime of a context? When does it get cleaned up? I'm also seeing out of memory exceptions from Chakra.

Contexts are susceptible to GC like regular objects.It's pinned when set as current context, otherwise GC can clean it up anytime unless JsAddRef is called.

Was the runtime previously on a different thread? If so, you need to JsSetCurrentContext(JS_INVALID_REFERENCE) on that thread to give up the runtime

Yes, probably a different thread. In order to terminate scripts that run too long I run the script using a Task so the script is running on some arbitrary thread from the thread pool. And I'm sure that at the end of execution that the context is set to JS_INVALID_REFERENCE because I'm using the Scope object in the C# wrapper that comes with the samples. In the Dispose of that object it sets context to previous value which would be JS_INVALID_REFERENCE.

I see. Can you send us a small repro? We can take a closer look at what happened.

I've attached a demo of the issue. It occurs in the timeout case where the script runs too long. Specifically when I attempt to re-enabled the runtime after I've terminated it at line 166 in Program.cs. Thanks for the help!
ChakraRuntimePoolStress.zip

In the process of creating an app that reproduced the problem I found my Wrong Thread issue. I had a race condition in my async thread where a thread signal was inside the using statement for the Scope. So sometimes I'd attempt to renabled a runtime before the previous thread was finished. However, I fixed that and now encounter the second problem I've occasionally seen. The application just exits or I get a JavaScriptFatalException. I'm probably doing something wrong but I don't see it. Thanks for the help.
Run to encounter the issue. Doesn't take very long. Thanks again.
ChakraRuntimePoolStress.zip

I attached a simpler app in the previous comment that demonstrates the issue. We won't be able to add Chakra to our production servers until we understand why it crashes in the timeout case.

I'm closing this and reopening as another issue because this is marked as a question that has been answered.


v0.13.x breaks hooks when registering more than one hook

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
Only the first hook is executed if you have a chain of hooks registered. This is not the case in v0.12.5.
Expected Behavior 🤔
All registered hooks should be called.
Steps to Reproduce 🕹

Steps:

Create an entity and register hooks:

package schema

import (
	"context"
	"entgo.io/ent"
	"fmt"
)

type Dummy struct {
	ent.Schema
}

func (Dummy) Fields() []ent.Field {
	return []ent.Field{}
}

func (Dummy) Hooks() []ent.Hook {
	return []ent.Hook{
		hookFoo,
		hookBar,
	}
}

func hookFoo(next ent.Mutator) ent.Mutator {
	return ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) {
		fmt.Println("hookFoo called")
		return next.Mutate(ctx, m)
	})
}

func hookBar(next ent.Mutator) ent.Mutator {
	return ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) {
		fmt.Println("hookBar called")
		return next.Mutate(ctx, m)
	})
}

Do something with entity:

package main

func main() {
    // ...
    entClient.Dummy.Create().SaveX(ctx)
}

Only hookFoo will be called as evidenced by only hookFoo being printed to console.

Your Environment 🌎

Tech
Version

Go
1.22.0

Ent
0.13.1

Database
PostgreSQL

Driver
https://github.com/lib/pq

We experience the same issue, looking into the cause of the issue now.


Migrate 'ambertools' Launching to 'subprocess'

Describe the bug
The AmberToolsToolkitWrapper currently launches the ambertools utilities using os.system which does not capture the output of the utility (such as stdout, stderr), and often returns just a generic exception.
This should likely be migrated to call using subprocess.Popen which is a higher level function which is more informative and has greater flexibility.
E.g.
antechamber_process = subprocess.Popen(
    [
        "antechamber",
        "-i",
        sdf_file_path,
        "-fi",
        "sdf",
        "-o",
        processed_sdf_path,
        "-fo",
        "sdf",
        "-at",
        amber_type,
        "-rn",
        "MOL",
        "-an",
        "no",
        "-pf",
        "yes",
    ],
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE,
)

antechamber_output, antechamber_error = antechamber_process.communicate()
antechamber_exit_code = antechamber_process.returncode

Related to #447

Thanks for the code snippet. I agree with the proposal, and the tagging as a good first issue.
This issue should be closed when a PR

modifies the AmberToolsToolkitWrapper to run the CLI tools using Popen
captures the output, printing the stdout using print, and the stderr in the Exception that is raised if sqm or antechamber fails

Oh yea, didn't even see this. I avoid recommend avoiding Popen so much boilerplate that isn't needed. We will be moving a lot of the QCEngine wrapper and harness tech to QCElemental. Would suggest migrating to this where possible.

I can't remember exactly but I thought @slochower mentioned at some point that amber tools sometimes returns a non-zero return code even if it ran successfully - @slochower have I made this up?

I'm cranking through a diverse molecule set with the changes to see if we get any unexpected AT errors.

I stopped the test after 200 diverse freesolv molecules went through conf gen + charge calc without an error. I think this is behaving correctly, but if there are pathological molecules that will trigger the behavior that @SimonBoothroyd mentioned, please post them here, @slochower :-)

I'm not sure off the top of my head about the behavior of antechamber, but as Simon said, sometimes (?) tleap will not return error code 0, even if it is successful.


Create multiple babelfish databases for each database from sql server

How to create multiple databases in babelfish

Sounds like your cluster was created in "single-db" mode?  If you want to create more than one database, the cluster must be created in "multi-db" mode. You cannot change the migration mode, so you'd have to create a new cluster.
See https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/babelfish-architecture.html and https://babelfishpg.org/docs/installation/single-multiple/

can you please share steps how to create new cluster and in multi-db enabled.

i am setting up in physical server not in aurora RDS

See the other link which I posted above for the standalone setup procedure


Auto generating API docs

See if we can generate the API section directly from the code, and merge it with vuepress.
It would be good if we could get this in a git hook within the library repo, that compiles and pushes to this repo .

I've managed to get the docs generated via a script on the main library; build:docs
You currently have to run it manually, and copy the files across. I haven't yet found a way of getting it to happen during CI and automatically pushed over to this repo.
I spent some time trying to see if Travis GitHub releases, but I couldn't get it to work.

Closing as I'm currently happy to manually copy the generated docs over.


Add paging tests for filtering on counter columns for CASSANDRA-11629

+1 after nit

Nit is fixed, #11629 is commited as (c08eea)[https://github.com/apache/cassandra/commit/c08eeafdcfe4b5d0fb1a8aa34ca5df27be7934ce]


Pages in different Sites

It seems to me that the mechanisms for getting a Page's URL don't interact with the sites framework as it should.
Suppose you have two Sites on different domains, first-domain.com and second-domain.com.
Now in one Page belonging to the Site first-domain.com, you insert a link to a Page on SIte second-domain.com.
In such a case, the URL that is generated can't be only the /path/to/page - it needs to be: second-domain.com/path/to/page.
If I understand this correctly, what is required is something that compares the site_id of the Page we are in with the site_id of the Page we want to get to - and if they are different, prepends the Site.domain to its URL.

This looks like it's fixed.


Uncaught TypeError: Cannot read property 'dispose' of undefined

[Enter steps to reproduce below:]

...
...

Atom Version: 0.177.0
System: Mac OS X 10.10.3
Thrown From: minimap-selection package, v3.1.1
Stack Trace
Uncaught TypeError: Cannot read property 'dispose' of undefined
At /Users/fundon/.atom/packages/minimap-selection/lib/minimap-selection.coffee:40

TypeError: Cannot read property 'dispose' of undefined
  at Object.module.exports.deactivatePlugin (/Users/fundon/.atom/packages/minimap-selection/lib/minimap-selection.coffee:40:18)
  at Main.module.exports.PluginManagement.deactivateAllPlugins (/Users/fundon/.atom/packages/minimap/lib/mixins/plugin-management.coffee:104:12)
  at Main.deactivate (/Users/fundon/.atom/packages/minimap/lib/main.coffee:108:6)
  at Main.toggle (/Users/fundon/.atom/packages/minimap/lib/main.coffee:132:8)
  at atom-workspace.Main.activate.subscriptions.add.atom.commands.add.minimap:toggle (/Users/fundon/.atom/packages/minimap/lib/main.coffee:101:29)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at CommandRegistry.__bind [as handleCommandEvent] (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:156:19)
  at EventEmitter.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:65:30)
  at EventEmitter.emit (events.js:116:17)

Commands
  2x -0:03.4 minimap:toggle (atom-text-editor.editor.is-focused.vim-mode.command-mode)

Config
{
  "core": {
    "themes": [
      "seti-ui",
      "atom-dark-syntax"
    ],
    "disabledPackages": [
      "minimap-git-diff",
      "minimap-find-and-replace",
      "minimap-color-highlight"
    ]
  }
}

Installed Packages
# User
minimap, v4.1.0
minimap-highlight-selected, v4.0.0
minimap-selection, v3.1.1
seti-ui, v0.6.3
vim-mode, v0.30.0

# Dev
No dev packages

/cc @atom/core

Thanks for the report I'll take a look at that later.

I got this when I tried to disable the selection. It wasn't working so I tried to disable and then enable it.


TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them.

Dear Support Team,
I am writing to you because I am experiencing an issue with the @nuxtjs/google-adsense library that I am using on my website. Specifically, I am seeing the following error message in my console:
TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them.
I believe this error is related to the adsbygoogle tags that I am using in my HTML code to display ads on my site. However, I am unsure how to resolve this issue.
i want to load multi tags in one page, and I believe there is a way to make it right.
Could you please provide any additional guidance on how to troubleshoot this issue? I would greatly appreciate any assistance you can provide.
Thank you for your time and attention to this matter.
Best regards,
Yazan Alhaffar

I have the same error.

hope we get fix for it
cuz what i see there is no response from theme

also same error

We are using this module and don't have this error. Must be a config issue?

Same error.

same error here too.

Same error

I had Adsbygoogle accidentally nested within a ClientOnly tag, when i moved it out the error was resolved.

Same error. Is there any solution?

Do you have an adblocker on by chance?

Do you have an adblocker on by chance?

No, I'm still in dev mode and don't have adblock enabled

can you share a reproduction without your adsense acct creds?

@kylegl I think it's coming from the querySelector looking only for class adsbygoogle. I've done a pull request #192
Adsense adds

which will call adsbygoogle.push() because it has the class adsbygoogle although it's not an ads placeholder

can you share a reproduction without your adsense acct creds?

I just install with yarn and add modules in nuxt.config.
yarn add @nuxtjs/google-adsense

export default defineNuxtConfig({
  ...,
  modules: [
    ...,
    '@nuxtjs/google-adsense'
  ],

  googleAdsense: {
    id: 'ca-pub-6186757245107698',
    test: true
  }

})

When I run yarn dev, it shows this error.
adsbygoogle.js?client=ca-google:221 Uncaught TagError: adsbygoogle.push() error: All 'ins' elements in the DOM with class=adsbygoogle already have ads in them.

can you share a reproduction without your adsense acct creds?

I just install with yarn and add modules in nuxt.config.
yarn add @nuxtjs/google-adsense
export default defineNuxtConfig({
  ...,
  modules: [
    ...,
    '@nuxtjs/google-adsense'
  ],

  googleAdsense: {
    id: 'ca-pub-XXXXXXX',
    test: true
  }
})

When I run yarn dev, it shows this error.
adsbygoogle.js?client=ca-google:221 Uncaught TagError: adsbygoogle.push() error: All 'ins' elements in the DOM with class=adsbygoogle already have ads in them.

I think @jbmolle found the issue. If i understand it correctly, if you have no ads on the page, the script still tries to push an ad.

The problem is solved
If you just configure it as shown below,
export default defineNuxtConfig({
  ...,
  modules: [
    ...,
    '@nuxtjs/google-adsense'
  ],

  googleAdsense: {
    id: 'ca-pub-XXXXXXX',
    test: true
  }
})

but do not insert the component <Adsbygoogle /> into the page, you will get the above error message.

I have tihs error. How can I fix that?

Same error here

Got the same problem

same error


Extend run_job with a finalize function

Refactor run_job to use Pipelines such that we can add a finalize step.

What was the reason we wanted to build this?

to not have to refactor update_friends.py into pipeline, because we need a cleanup step in #430

https://github.com/rogerthat-platform/rogerthat-backend/pull/505


Can ast be converted to Swift?

@ChengRuipeng Not sure what you mean by "converted to Swift," can you elaborate?

@ChengRuipeng Not sure what you mean by "converted to Swift," can you elaborate?

I can convert Swift to AST by 'swift-ast-explorer',  can I convert AST back to Swift?

@ChengRuipeng No you can't. 'swift-ast-explorer' converts AST to HTML for visualization. It is not reversible.
I recommend to use SwiftSyntax directly. SwiftSyntax is created for making it easier to rewrite Swift AST.


Add cli tests

I discovered that the CLI was no longer working because the path was not properly canonicalized in the read function.
In order to make sure that this doesn't happen again in the future I have added two small integration tests for the CLI.
I also disabled color output for the pol run command, since that leads to test failures.

Could you also add the new tests to the CI?

Could you also add the new tests to the CI?

I don't think I have to do anything for that? The tests are run with cargo test --all.

I have to say, the assert_cmd crate is really convenient :)


Remove cruft

I started out removing the NSLocationWhenInUseUsageDescription key and its related empty string from Info.plist. Then to make sure it didn't exist anywhere else, I discovered that it existed in some tvOS files we had, so I removed those (and references to them) too.

I think we still need project.pbxproj
Also, I'm not 100% sure that removing location description string from plist is enough 🤔
we may also need to check if we link CoreLocation library.

Double checked — permission library is only pulling in Notification-related stuff, no location APIs referenced. Should be good.

I think we still need project.pbxproj

I was really confused about how I removed that, but apparently it looks the same in the diff view because the diff is too large.


VscodeExtension Build Instructions

Can't seem to find the correct combination of libraries to get the extension to compile. Any advise is welcome.
Haxe: 4.0.0-rc.3+e3df7a448
Haxelib list
castle: [1.6.1]
continuation: 1.3.2 [git]
domkit: [git]
format: [3.4.2]
heaps: [1.6.1]
hldx: [1.9.0]
hlopenal: [1.5.0]
hlsdl: [1.9.0]
hscript: [2.3.0]
hx3compat: [1.0.3]
hxbit: [1.4.1]
hxcpp: 3.4.64 3.4.185 4.0.4 [4.0.19]
hxcs: [3.4.0]
hxnodejs: 6.9.1 [10.0.0] git
vscode: 1.37.0 [git]
vshaxe: 2.13.0 [git]

Still unable to make any progress with this, closing because I am tired of seeing the notification in m,y dashboard. Also, I am done with my evaluation of unreal.hx at this time.


NO-ISSUE Increase assisted-service start timeout

Default timeout of 90s is not long enough on my network and laptop
for assisted-service images to be pulled.
Increasing timeout to 300s.

/lgtm


[requires.io] dependency update on master branch

Codecov Report

Merging #12 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #12   +/-   ##
=======================================
  Coverage   98.08%   98.08%
=======================================
  Files           5        5
  Lines         469      469
  Branches       84       84
=======================================
  Hits          460      460
  Misses          8        8
  Partials        1        1

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 63ac2f7...9a55b94. Read the comment docs.


Support piping filenames to Import-PSTypeExtension

Import-PSTypeExtension should accept piped input of file names. You should be able to import a directory of extension files:
dir c:\scripts\mytypes | import-pstypeextension

fixed in v0.5.0


ci(release): v1.3.0

Automated changes by create-pull-request GitHub action

:tada: This PR is included in version 1.4.0 :tada:
The release is available on:

GitHub release
npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:


Submit a Cloud Definition

Do NOT copy/paste a definition from somewhere else. Read about the word you want to define and come up with your own definition. Copy/Paste submissions will be closed and not added.
Fill out the JSON with your submission:
    {
    "word": "MLops",
    "content": ""(Machine Learning Operations) is a set of practices and principles for applying DevOps to the field of machine learning.
     Enabling data scientists, developers and operations teams to work together in a scalable and reliable way.",
    "learn_more_URL":"https://ml-ops.org/",
    "tag":"ai/ml",
    "abbreviation": "MLops",
    "author_name":"nilofe",
    "author_link": "https://www.linkedin.com/in/nilofe/"
    }

Fill out the JSON below with the following.
Word (REQUIRED)
The word you are defining. Check this URL for all words we currently have.
Content (REQUIRED)
The definition. No more than 3 sentences.
learn more URL (REQUIRED)
Website where people can visit to learn more about the word.
tag (REQUIRED and select one)
Tech category the word fits in. Options:

compute
security
service
general
analytics
developer tool
web
networking
database
storage
devops
ai/ml
identity
iot
monitoring
cost management
disaster recovery

abbreviation (OPTIONAL)
If the word is commonly abbreviated, please provide it. For example, command line interface is often abbreviated as CLI.
author name (REQUIRED)
Your name.
author link (REQUIRED)
The URL you want your name to link to.

Good one! thank you for the submission, I've added it :D


Give warnings on missing manifest/config; more robust preprocessing

Pull Request Test Coverage Report for Build 197

15 of 96 (15.63%)  changed or added relevant lines in 4 files are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.2%) to 68.594%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

resource_container/ResourceContainer.py
5
7
71.43%

preprocessors/preprocessors.py
8
17
47.06%

webhook.py
1
71
1.41%

Files with Coverage Reduction
New Missed Lines
%

resource_container/ResourceContainer.py
2
80.79%

webhook.py
2
11.81%

Totals

Change from base Build 195:
-0.2%

Covered Lines:
3263

Relevant Lines:
4757

💛  - Coveralls

Pull Request Test Coverage Report for Build 197

15 of 96 (15.63%)  changed or added relevant lines in 4 files are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.2%) to 68.594%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

resource_container/ResourceContainer.py
5
7
71.43%

preprocessors/preprocessors.py
8
17
47.06%

webhook.py
1
71
1.41%

Files with Coverage Reduction
New Missed Lines
%

resource_container/ResourceContainer.py
2
80.79%

webhook.py
2
11.81%

Totals

Change from base Build 195:
-0.2%

Covered Lines:
3263

Relevant Lines:
4757

💛  - Coveralls


❗❗❗Check it out❗❗❗

I've created the best cli for github https://github.com/ashanaakh/gitius. Check it out! 😉

Normally, I don't try to feed trols but this is such unique and interesting case on many levels that the curious part got better of me.
It is clear that your trying to garner support of your library but at what cost? It shows little thought on your part as to what effect this will have on the maintainer of the library and what signals your are sending to future developers that may consider working on your open source.
You're basically interested in glory-seeking behaviour and wish to increase your 'fame' by trolling other similar projects. Have you thought about open source and what it truly means? Collaboration is one thing that springs to mind. You have missed one of the most valuable opportunities there is, which is to collaborate on more established project and not only help it grow but create new opportunity for yourself to learn and grow. Instead, you choose to try to 'score' off another project.
I really hope that the 'better' part of you will learn from this experience and you will spend your energies in more productive ways in the future. You have already wasted enough of my time!


SOLR ingressClassName see #84 OPSEXP-1862

Like the Repo we need a different classname than NGINX

had to raise a new PR because if you open a PR from your main branch I cannot push more commits there
https://github.com/Alfresco/alfresco-helm-charts/pull/209

@gionn sorry didn't think this through.


@blocking 0 cancellation causes object to become unselectable in GUI

Since the progress bars have started to be drawn on top of buffer processors calling the cancel method renders the object unselectable.

----------begin_max5_patcher----------
407.3ocqTFsaBBCEF9Z3onoWyL.BHtq78XwrTfhqNrkzVbZL5y9ZOEh5zoKN
ufRN+8.+86bNvNeObgXCUgQuhdC44sy2yCjrBd8wd3UjMkMDEjFdEUoHKn3.
2dZ5FMnWzUWSkHkrbXqVht7CFew6RZo1YQZ5nv.TT3D6szb6Zb7nPz79Gg2s
hwanZvp3ihhN8fZTuJqBrUTr7k7AGcoo21Rc1gwn41c166aWB9mHVR3kzlaf
2zH.uD.rjwOI7xdx3woeYdsWPWcSGqZjoMxWUe.MqtVqLlY.TgFGOIKGEEmi
lUzHJ+zHhBueadZFTAljb6BQzUKDIWVHh+8BQvIWOyhhap9fcrFsTvWzrcDg
UeWz6K.QoOB4wWRdzuRdcifnsXWP3KNGcvSbCi+yOvgisU+75gRzIKGdu8Cd
nim7JpxLMPzLA+jbhc4b0J9e0m7GxGGdj110TopOYvBSicoPZCyCfPF2ENFB
kz0rg7CAEhzzE0lVXmDNV3MYIX2iJpnRdGCZV9V3LVBCMbh4uDsDGGvrk+d+
u8rEBAF
-----------end_max5_patcher-----------

If you process the source buffer in this patch and click cancel before its done you will find you are no longer able to adjust the attributes in the box for example because it is unselectable.
You can grab the object by drawing a box over it but thats a nasty workaround.
I'm unaware if this is a problem with the Max API or the way that progress is implemented in the object. Either way, I raised it here to rule FluCoMa's end out first to follow up with a C74 report or to address a problem we have control over.

Should be fixed by 078bf8e77ab309358980bcaeeb682234c08fefaa

Seems to be fixed.


make the Spi API generic

:pushpin: Commit 04ecb49 has been approved by japaric

@homunkulus r+

:hourglass: Testing commit 04ecb49 with merge 04ecb49...

:sunny: Test successful - status-travis
Approved by: japaric
Pushing 04ecb49b8495319b87d18f11ca94626481a1f515 to master...


volumes: IDsFromName returns multiple results

This patch adds a function in the volumes utils, that can return
multiple volume IDs bearing the given name.
This patch leaves the behaviour of the existing IDFromName function,
untouched, while it reduces code duplication.

I deem this patch ready for review (and possible, merge). Thank you for your time!
CC @jtopjian

very handy!
:+1:

I'd sync the code with other services, compute, image, etc.

@pierreprinetti
I agree that this is handy - thank you! If it's not too much trouble, @kayrus makes a good point that we should add this for the other resources for consistency. If you don't have the time or desire to do that, just let me know. I'll merge this and then take care of the other resources.

I submit to the will of the people! :grin:

@jtopjian
If you agree, while I am at it, I am tempted by removing the "if name == name", since we already use ListOpts. WDYT?
https://github.com/gophercloud/utils/blob/94b19323398bb809a11f5f7175fe47ef289ba3b6/openstack/blockstorage/v3/volumes/utils.go#L28

That should be it. I have only updated the latest version per package.
Note that I have removed if s.Name == name from the loop when there was a ListOpts that filtered by name already.
Please spend a moment checking that everything is alright, because that's a lot of copy-pasta and I need some backup eyes

I've tested everything but the Manila stuff, since I don't have access to a Manila environment. Short of that, this all looks good to me - thanks so much.


Make bot responses ephemeral

When the bot responds to a command request, the output of the bot should only be shown to the person who issued the command. This is super easy to change as the ephemeral flag in the response object just needs to be set to true.

done in commit 1ea8e38c93f33bd2c08cc1dd92cc009c6f965668


General Settings are not scrollable in Desktop App (on Windows 10)

Search before asking

[X] I had searched in the issues and found no similar issues.

Operating System

[ ] macOS
[X] Windows
[ ] Linux

Operating System Version
Windows 10 Pro 21H2
It happens on the web browser too?
No, it just happens on the Desktop app
Rocket.Chat Desktop App Version
3.8.12
Rocket.Chat Server Version
5.1
Describe the bug
The General Settings tab does not show all options on small screens. It is not possible to scroll down or otherwise move more options into the viewport.
This does not apply to Rocket.Chat in web browsers, because the web version does not have these settings.
How to Reproduce

Open Settings (gear icon on the bottom left)
Can't scroll --> can't see all options of the "General" tab on small screens

Describe your Expected behavior
I would like to see all settings even on small screens. The probably easiest solution is to make the settings scrollable.
Anything else
No response
Are you willing to submit a code contribution?

[ ] Yes, I am willing to submit a Pull Request!

I would like to work on this issue as this seems a beginner friendly one.Can i ?

Hello @thepranays, you don't need to ask permission. Just make it and open a PR. I will review it as soon as possible.

@jeanfbrito Hey,Can you please review my PR on this issue.


Testing with transactions

Environment Details

Helidon Version: 4.0.7
Helidon MP
JDK version: 21
OS: Windows

When testing functionality that modifies data in the database, it's convenient to annotate these methods with @TestTransaction (or any other appropriate annotation). This annotation starts a transaction before the method begins and rolls it back after the method ends, preventing the database from being polluted with test data that could affect other tests.
In Spring, placing @Transactional on test methods accomplishes this task. It would make sense to add similar functionality to Helidon.

I am checking it and the idea is that will automatically rollback. However this is not entirely true when during the execution it finds for example a new transaction with REQUIRES_NEW. That opens a new transaction. Spring is not able to find this and it will be committed. Maybe we will have the same problem in Helidon.
More information here:
https://docs.spring.io/spring-framework/docs/5.2.4.RELEASE/javadoc-api/org/springframework/test/context/transaction/TransactionalTestExecutionListener.html


Use uv/version.h as version file for libuv-1.21.0

libuv-1.21.0 changed where the version file gets installed to.

@tcberner We need you to sign the CLA so that we can merge this. Thank.

Hi there
I already did with the email adress<EMAIL_ADDRESS>Mfg Tobias

Thanks for the contribution @tcberner; landed 0edf3d2.


[feature] merge mysql operator code to the radondb main branch

What type of PR is this?

/enhancement
Which issue(s) this PR fixes?

Fixes #117 #118 #119
What this PR does?
Summary:
Update the cluster api, add sidecar container, add status api, update the config files, add helm files, update the Dockerfile, Makefile...
Special notes for your reviewer?

Ping @aceking @hustjieke

ACK.

ACK


[WIP] fix string to float using hand-picked values failed in CastOpSuite

https://github.com/NVIDIA/spark-rapids/issues/10986
Rationales:
https://github.com/NVIDIA/spark-rapids-jni/pull/2063 this pr has treated '+nan' as nan but spark treats as null.
issue 10986 was caused by the reason above.
This pr is for fixing it.

build

build

build

all UT and IT have passed.

build


Auto-publish to NPM by Github Actions

Adding NPM_TOKEN into Github Actions's secrets resolved this issue


Add good & bad examples of result of class method behavior.

If class methods return something that isn't an instance of the class, it probably used the same way as static method in the previous example.

Add correct implementation of the create method.


Add DayOfWeek type

... similar to DayOfWeek from Java 8.

Issue moved to SpineEventEngine/time #7 via ZenHub


adding hypergraph/cell complex networks models/unit tests

challenge CC networks unit tests.
challenge HG networks unit tests

Could you also add the References section, in the docstrings, that cites the corresponding paper. You can copy paste the References section from the corresponding *_layer.py file.
Thanks @mhajij !

done


Do you plan add autoprefixer to rollup legacy build?

Do you plan add autoprefixer to rollup legacy build?
https://github.com/postcss/autoprefixer

We do not have a plan to do this. 2 particular reasons stand out for it

Vendor prefixes are sort of deprecated - quote "Browser vendors are working to stop using vendor prefixes for experimental features." from  https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix
it is probably not that easy to integrate given the dynamic nature of css template literals e.g. they can be composed via js.

Given this information, the net gain for using autoprefixer is probably small. Therefore we recommend writing the prefixes (and there is hopefully a very very low number) manually if needed.
I am going to close this - if you have any more question please feel free to reopen or create another issue 🤗


Caffe models support

@pranv I haven't really looked at it yet, just added your code and cleaned it up. Check out the changes I made, they should help you improve your coding style.
I'll do a full review in the next few days.

@fchollet
Great!
Learnt a few things..

Started code-reviewing. I find the code quite difficult to understand, and I believe it could be considerably simplified :(

As far as I know, the layers are treated in the standard way. The complexity is present in getting the graph. Again, as far as I know, this is pretty much standard. There aren't other libraries that do this, hence it was hard. And I'm pretty sure that all steps are required, and I couldn't figure out a way to simplify them.
Is there a specific area, or if the entire thing unnecessarily complex?

I haven't understood everything yet. But this part seems quite complicated and difficult to follow:
network = make_network(layers, phase)  # obtain the nodes that make up the graph
if len(network) == 0:
    raise Exception('failed to construct network from the prototext')
network = acyclic(network)  # Convert it to be truly acyclic
network = merge_layer_blob(network)  # eliminate 'blobs', just have layers
reverse_network = reverse(network)  # reverse, to obtain the network_input
network_inputs = get_inputs(reverse_network)  # inputs of the network - 'in-order' is zero
network_outputs = get_outputs(network)  # outputs of the network - 'out-order' is zero
network = remove_label_paths(network, network_inputs, network_outputs)  # path from input to loss layers removed
reverse_network = reverse(network)  # stores the 'input' for each layer

Would there be any way to convert the Caffe prototext to a structure such as this in one pass?
I'll look into it.
Otherwise, I'm worried a bit about redundancy. Technically we already have code to build a model from a 'config' (though the config format is a bit different, but could be unified): https://github.com/fchollet/keras/blob/master/keras/utils/layer_utils.py#L18

The caffe definition of models is a bit weird. Technically, and according to the documentation, caffe accepts all Directed Acyclic Graphs (DAG). But in reality, several functions like ReLU, Dropout etc, can start and end at the same blob. This is because the computation can happen at the same memory location, ie blob. This causes cycles and naively using the bottom parameter of each layer could lead to a disaster.
At the same time, there are no specified input and output layers. Since it is a DAG, the nodes with 0 in-degree are input nodes. Similarly, the nodes with 0 out-degree are output nodes. This has to be found out. Other methods that use "one pass" cannot handle things like Siamese Networks - they place a constraint that the model is sequential.
I create a graph as a dictionary. I'll find the node which maps to none, that is the output node. I'll reverse the network, find nodes which maps to none to get the start nodes.
Now one more important aspect of caffe is that the same data layer is usually used to get both the actual data and the labels. This is an inherent non-sequentiality and keras doesn't do things this way. So that path, between data and the final loss layers has to be removed.
The reverse_network  stores all the previous nodes of a given node. Hence it is a node -> [previous nodes] map.
Hope that clarifies some things.

Another addition: All names are blobs.

I noticed the 'data' input isn't present when loading the caffemodel. Is that by design? I'm not able to get my results to match with caffe for the VGG 16 layer network (prototxt and caffemodel). It seems to be an issue with the input layer being 'conv1_1' instead of 'data'.

@asampat3090 @pranv Any thoughts on how this could be addressed?

I think I had addressed this issue before. The input name isn't 'data' since your prototext is in deploy mode. In deploy mode, the first layer is directly a processing layer and not DATA. And that layer's name has to be given as the input.
I've added 'model.inputs' and 'model.outputs' to help in this regard.
model = convert.CaffeToKeras(
    prototext='cnn_params/VGG_ILSVRC_16_layers_deploy_features.prototxt',
    caffemodel='cnn_params/VGG_ILSVRC_16_layers.caffemodel') #phase irrelavent in deploy mode
graph = model('network')
graph.compile('rmsprop', {model.outputs[0]: 'mse'})
features = graph.predict({model.inputs[0]: batch_images}, batch_size=1, verbose=1)

And does pycaffe run the code in caffe or in keras? This PR is about converting caffe models to keras, and running the network in keras.
And although this is a couple of lines more, which code seems simpler to you?
Consider the fact that we can't expect all keras users to know caffe entirely

The big question is:

I'm not able to get my results to match with caffe for the VGG 16 layer network (prototxt and caffemodel).

So, does this implementation produce a Keras model that is capable of reproducing the Caffe results? Or Not? If not, what should be done to address it?

Yea @pranv I understand the syntax but the concern is that it doesn't return the same result. As far as I can tell I have used the correct Keras code. Have you tried running this against caffe for known models?  Doesn't seem to match up. @fchollet I'll have to delve deeper into the code to figure out next steps.

@asampat3090 what exactly is the difference in result?

They just don't match up at all. What would be the best way to show you the difference? Can I send you the pickle files? For context, I am taking the output features from the 'fc7' layer w/ a 1x4096 feature vector.

@asampat3090 okay. Do go through the code and let me know of my mistake.

The only error I can think of is that the weights had to be transposed. Anything else would lead to dimensionality errors.
Or, in VGGs case, there could be an issue with the group parameter. But again, of this wasn't right, this would lead to dimensionality errors as well. Again, a transpose might be in necessary.

@fchollet For a measure of complexity, I think the above two repos might give an estimate.

It seems like the weights for the fully connected layers were transposed incorrectly, but otherwise the weights and biases for the convolution and fully connected layers all matched up with caffe.
However there is still something wrong. It probably isn't the group parameter since I checked the weights against caffe's after the model was imported, but it could be an issue with pooling or relu layers (made changes here). Any other ideas? It does seem like it could be a relu issue given that the keras result has no zero values and the caffe one does...but not sure how to check it.
Caffe features sample (correct):
array([-0.        , -0.        ,  2.7828536 , ..., -0.        ,
       -0.        ,  1.70453358], dtype=float32)

Keras features sample:
array([[-24.98186874,  21.50024796,  -1.37967587, ..., -28.88113213,
         -3.03378105,   5.12496424]])

@asampat3090 Thank you for that.

It does seem like it could be a relu issue given that the keras result has no zero values and the caffe one does...but not sure how to check it.

network.get_config() could offer some insight.

@asampat3090 also, do post the code changes you made (if any)

@asampat3090 Maybe you could add a test to perform the check you did automatically?

Maybe you could add a test to perform the check you did automatically?

That would be great, if it's doable. Such a check should absolutely be part of testing that Caffe import does work.

@asampat3090 :

It does seem like it could be a relu issue given that the keras result has no zero values and the caffe one does...but not sure how to check it.

What model method are you using to check your results? Dropout will only be applied in 'training' mode, i.e. using model.train, etc.
Also, it would be great to have your code so we can reproduce these results and investigate.

Do you guys know if the Caffe format has a documentation? Layer objects have a lot of attributes (I count 132), and I can't seem to find any documentation for them.
By the way, with the current PR I am failing to load a number of prototexts from Model Zoo.

The best way to learn about caffe layer attributes is to use python's help()
The prototexts on model zoo are not updated to recent protocols. The fail is from parsing it.

Do you have more info about format changes (when did it occur, what did it break)? I'm talking about files taken from the master branch of the Caffe repo, I would expect them to be up to date.

https://github.com/BVLC/caffe/pull/1694
6 months ago this was merged. I think I said the other way around. Sorry!

I just tried the same experiment - removed the top fully connected layer and ran the network.
I got a all-positive 4096 vector, with L1 being 0.65.
@asampat3090, I think the error could rather be due to preprocessing not being applied.
But that doesn't explain the negative values you're getting. Do share your model definition file as soon as possible.

@fchollet, I found out the exact issue with BVLC models. They are in V2 of prototext. Other public models like VGG are in V1.
Partly because I wanted to use VGGnet more than anything, the code is for V1.
Now, there is way to support both V1 and V2.  I'll have to Write if..else checks everywhere and handle both versions. I'll get it ready soon.

@fchollet, I've committed the changes to my branch. The models in Caffe repo are supported. Not sure how to get it here though

@pranv you can submit a PR to the caffe branch in Keras. This will be helpful since I have also local changes to caffe that I will commit later.

I have removed ~230 lines of code. Any concerns? https://github.com/fchollet/keras/commit/8a31762d0703d704befbbfe4850079bc6223f027
I haven't tested for correctness yet, so although the conversion yields valid Keras models, it is not clear whether the weights do reproduce the original Caffe network...
By the way, I believe it would be simpler to just convert Caffe models to a Keras config dictionary, then instantiate the model from this config, instead of converting the Caffe model to an instantiated Keras model. I will look into it in the near future. Any concerns?
Also I will still be looking for a simpler way to do this step: https://github.com/fchollet/keras/blob/8a31762d0703d704befbbfe4850079bc6223f027/keras/caffe/converters.py#L29-L38

Based a on a quick skim:

I think you made an if...else decision with prototxt or caffemodel.  As you can see from the discussion above, people would want to change prototxts to obtain modified models
I assumed convert_weights would be helpful in embedding something like VGG net for feature extraction
What happened in line 37?

Overall, it was a good idea to reduce almost 2 similar functions to 1.

Also, I had a conversation with @szagoruyko, the author of the torch equivalent and a member of the torch team(FAIR). He thought the code was fine

@asampat3090

It seems like the weights for the fully connected layers were transposed incorrectly, but otherwise the
weights and biases for the convolution and fully connected layers all matched up with caffe.

 That doesn't seem right.

@fchollet sorry for the delayed response. I'm using the VGG 16 layer caffemodel and have a custom prototext file (https://gist.github.com/asampat3090/c63a6f5082bab64e8a74). As for the weights, I compared the weights in caffe to those in keras and transposed those weights because they didn't match. Unfortunately it still didn't result in the correct answer given my prototxt.

@asampat3090, please try with the latest code again

On the C++ side the image is represented as uint8 in 0-255 while on the Python side scikit-image represents the image data as float in 0-1. For this reason the Python wrapper scales first so that it can re-map the data to 0-255 to match the precomputed mean.

From caffe issue somewhere.

Sorry for posting on the older post. @fchollet referring to our previous convo (others please see #368). I used the caffemodel file for the VGG 16 layer as given in the Model Zoo (http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel).
I'm not sure why the caffe model would be in training mode - I did specify the phase to be test (or so I thought) via: net.set_phase_test()
@pranv oh interesting...I wonder how I can prevent that - or at the very least know what that scaling is. It seems like that may be out of my control if I am using the pycaffe wrapper then. Any ideas?

@asampat3090, can you divide the entire image by 255 and try?

Unfortunately that didn't work. I tried to divide the caffe input by 255, which made the caffe output change and have nearly as many non-zero values as the keras output, but the numbers were still off - also, I'm not confident that would be the correct result for caffe anyways. Alternatively I tried to multiply the keras input by 255, but that didn't change much.
It probably does have to do with how the image is interpreted though since I've verified the weights matched up with the caffe blobs for each layer. Or I suppose the layers could not be connected up correctly but that seems unlikely.
@pranv do you think you could try running my code and see what you get?

By the way, wouldn't it be easier (less prone to issues in the test code itself) to look at much simpler networks first (eg. single FC layer, or single Conv layer)? With a single-layer network any potential error (in the conversion or in the test code) should be immediately obvious.

Or I suppose the layers could not be connected up correctly but that seems unlikely.

You can look at the Keras network via graph.get_config(True).

@asampat3090,  I suggested that you divide keras input by 255

@pranv I actually tried that as well, but that made it worse. @fchollet yea that's actually a good point. I'm guessing you mean using the same caffemodel file and slowly building up the prototxt one layer at a time?

@asampat3090 it could be done this way... but, more cleanly: couldn't we build a few single-layer (or 2-layers) sequential Caffe models, save their weights to a .caffemodel file, and write unit tests for the Keras-Caffe importer based on these files?

Hi,
Could I ask what the current status of the Caffe branch is? The last activity here was almost 3 weeks ago.
Also, wow, this is really neat work!

@dasguptar Thanks :)
There is a small bug in convolution layers. And unit tests have to be added. I'm sure it'll be done within this week.

I noticed a small difference between Keras and Caffe's implementations of the Dropout layer.
I made a "Caffe mode" here https://github.com/mmmikael/keras/blob/caffe_m/keras/layers/core.py#L252-L276

What is the status on this?

What is the status on this?

@lireagan @phreeza you might want to see https://github.com/fchollet/keras/pull/921

@grisaitis Thank you


open modal when another modal already open

I have tried open modal with id "exampleModal2" from anchor.
this anchor inside other modal already open with id exampleModal1
by adding:
data-toggle="modal" data-target="exampleModal2" to anchor,
it's working fine , it's closing the current modal "exampleModal1" and open new modal "exampleModal2" ,
problem:
scroll work on body not on modal "exampleModal2".
note:
modal-open class not added when open model2 , when i added to body it's working fine.

Sorry, but modals on top of modals aren't supported. This is mentioned in our docs.


Bos Wars

The official code repository for Bos Wars is not on Github but on Codeberg.org (https://codeberg.org/boswars/boswars).
The project is active and made a new release (2.8) in 2023.

Thank you very much for the notification.  It seems to have been imported and reactivated. I updated the entry locally.


Update README.md

Added cute animated gifs to the README.md
Description
Added animated gifs to the readme file

Issue Ticket Number
Fixes #(issue_number)

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist:

[x] I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
[ x] I have checked to ensure there aren't other open Pull Requests for the same update/change?
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x ] I have made corresponding changes needed to the documentation

Congrats @kavyaLokuge 🎉, your PR got merged. To be eligible for the swags from ClueLess. Follow this steps.

Star this repository. ⭐
SignIn / SignUp in [ClueLess Website](https://www.clueless.tech/) .
Go to profile section from the top right hand corner.

Comment your profile URL under this comment tagging the person who merged your PR.

That’s it. Follow the leaderboard !
And don’t forget to share your achievement with your friends.

Profile URL : https://www.clueless.tech/profile/82757644
@Debajyoti14


sched/init: don't check remain stack for idle task

Summary
We shouldn't check the remain stack for idle task because tt may not have been colored.
Change-Id: I0bd5808efabd395157d2530f2423b18f0c1eeabd
Signed-off-by: Jiuzhu Dong<EMAIL_ADDRESS>Impact
no
Testing
daily test.

In what cases is it not colored? The only case I can think of is the sim since is dynamically grows. Seems like in the case the would be better driven by a config flag.

It isn't only for sim, but many soc doesn't setup idle thread stack color correctly: https://github.com/apache/incubator-nuttx/issues/1769

Ah I see, could we create a Kconfig that is set for arch that do colorize the idle stack correctly with the idea that eventually it can go away?

Ah I see, could we create a Kconfig that is set for arch that do colorize the idle stack correctly with the idea that eventually it can go away?

ok.

Close since all idle thread stack colorize now with #3888.


ssl client cert ?

Hello,
I was looking at this very intersting projet, but could not get sslclientcert, key and cacert working.
I patched the self.__repo_obj to add these values from the opts dict, and configured them in the yaml file, but it still does not work.
Any idea to help me? Maybe am I missing another option in YumBase?
I'll be happy to share a PR once I got it working :)
Regards

I'd be happy to check into this for you! Do you have an example repo that uses self-signed certs that you can provide me or are you testing this on an internal repo (e.g. company repo)? If you can provide that it will help me test easier. Otherwise, I'll need to stand up my own repo for testing.

Thank's  a lot.
Unfortunately, the repo that use certificates are redhat ones.
I'm proxying all the repo we are using as our servers do not have access to internet, and versionning is also definitely a must have for us. The only repo that requires certificates are the redhat ones, I'm not aware of any other repo like this.
Also I'm not sure whether the certs I give are really good, as I couldn't get curl with --key and --cert working. Maybe I missed something else that is not related to YumBase, I'll try to investigate in this direction at the same time.
They are both in PEM format, well I believe so.

The cert contains CERTIFICATE, ENTITLEMENT DATA and RSA SIGNATURE.
The key contains only RSA PRIVATE KEY.

The lines I've added in yumrepo.py are:
         self.stable = opts['stable']
         self.version = time.strftime(opts['version']) if opts['version'] else None
         self.srcpkgs = opts['srcpkgs']
+        self.__repo_obj.sslverify = opts['sslverify']
+        self.__repo_obj.sslclientcert = opts['sslclientcert']
+        self.__repo_obj.sslclientkey = opts['sslclientkey']
+        self.__repo_obj.sslcacert = opts['sslcacert']

         # root directory for repo and packages
         self.dir = os.path.join(base_dir, self._friendly(self.id))

I'll be waiting for your feedback.

I'm facing the same issue (unable to sync a RHEL repo). Is there any progress on this?

Hi, the good news is that... the problem was coming from my certificates, that were not valid anymore.
Now that I understand better how it works, openssl x509 -in cert.pem -text -noout displays that it expired in january ;-( Sorry...
Now that curl is working again, I'll be able to see if my changes are working or not. I'll keep you informed when done.

OK, I found my old working dir with the modified python project, and I confirm it now works.
All was my fault, I'm really really sorry.
Thanks.
if @lkeijser is ok, you can close this issue.


[STORM-1414] refactor multilang JsonSerializer

https://issues.apache.org/jira/browse/STORM-1414

+1 LGTM

One very minor comment and then I am +1.

comments addressed.

+1


start sagemath port

This will be something to do once (or if) numpy builds and works using zig.  I say "or if", since it's not guaranteed this will ever happen, e.g., my current status is llvm segfaulting.
In any case, "start the sagemath port" is really something that would happen in a new repo, and is about building important dependencies of sage, e.g., like I started in https://github.com/sagemathinc/jsage (pari, gmp, etc.).  The architecture will be:

python-wasm -- this repo -- really just a way to build CPython+dylink support for WASM in the browser and node using zig+node.js.  This is just the small core which is why this has a very boring name.  It's just yet another build of cpython and a tiny bit more.
unknown name, maybe scientific-python-wasm -- will be a new repo with non-core scientific packages (cython, sympy, numpy, etc.), and a similar scope to pyodide.  This will depend on 1.
unknown name, maybe sage-python-wasm -- we be yet another repo dedicated to building packages for wasm that are needed for sagemath. A relevant trac ticket is here: https://trac.sagemath.org/ticket/34539

We have numpy and much more at this point, including Cython.  So it's easy to move forward.
The way I'm going to do this is by creating a new folder "sagemath", next to the "core", "python", etc. folders.  It'll be clearly marked via the README as having code in it with GPL licenses, and also we'll make it clear nothing in core & python depend on sagemath.
The obvious first packages would be GMP, FLIINT and pari, since I already ported that last year as part of jsage.

And so it begins: afdf52b1e83b6b2b71d619354e8014587681e5b5