Sign in via HTTP-Auth doesn't do anything

Hi,
I'm running Redmine 1.3.1 with the latest http_auth (0.3.0-dev).  I am also running Apache 2.2.15 with mod_ssl and mod_proxy; you need to authenticate to Apache using BASIC AUTH, then your connection is proxied through to the
webrick server using /redmine as the URI.  The user's login is set in the environment variable REMOTE_USER_LHS.
http_auth is configured to use REMOTE_USER_LHS as the variable and the login name is used fro local user lookup.
When I configure http_auth in Redmine I get a link to a blank page with a URI of
/redmine/httpauth-login
Am I misunderstanding how this is supposed to work or missing any key information?
Thanks for any advice,
Chris

In your httpd.conf file you need to protect that location with whatever you are using to authenticate.
I am using a sso module but what ever you are using should work fine.
<Location ~ "/httpauth-*">
AuthType basic
Require valid-user

Other apache directives might have to be included with your particular Authn/z choice..

Hi Kevin,
I wonder if I'm SOL.  I'm using mod_auth_kerb which sets the AuthType to KerberosV5.
So although it's using HTTP BASIC AUTH as described in RFC 1945, is http_auth not recognizing it properly because of the AuthType?  Here's the Apache section:
 Redirect /redmine https://secure.example.com/redmine/
 ProxyPass /redmine/ http://localhost:3000/
 ProxyPassReverse /redmine/ http://localhost:3000/
 <Location /redmine/>
     RewriteEngine On
     RewriteCond %{LA-U:REMOTE_USER} ^([^<EMAIL_ADDRESS>     RewriteRule ^ - [E=REMOTE_USER_LHS:%1]
     AuthType KerberosV5
     AuthName "Secure (SSL) Kerberos Login"
     KrbAuthRealm EXAMPLE.COM
     require valid-user
</Location>

I was hoping that it would essentially see that $REMOTE_USER_LHS was set and would just login with that user, but I'm a Perl guy (not Ruby), so it's going to take me a while to figure out what's going on in the code. :)
My main goal is to make webrick unavailable to the outside world via iptables and force all access through Apache to minimize security risks.  Right now you can log in through Apache and then log in again to Redmine, but we'd like to remove locally-stored passwords entirely from the Web server to tighten up security further.  Using the Apache authentication only would allow us to do that.
Thanks for the reply!

Chris.. sorry my formatting example was messed up .. before
No you should be good.. substitute your auth mechanics for the AuthType line.. I was just giving an example ..
Mine is not Basic .. I use my local auth type which is a separate SSO product..
I could envision yours looking like
 AuthType KerberosV5
 Require valid-user
</Location>

Hi Kevin,
Mine has a path of /redmine/httpauth-login, so it's covered under that AuthType section above.
Unfortunately, it doesn't seem to make a difference. For giggles' sake I added your configuration file changes too, but I get the same results.  Does the path have to be /httpauth* (and not proxied?)

Do something like this ..honestly I don't know the kerb module though..
 <Location /redmine/>
     RewriteEngine On
     RewriteCond %{LA-U:REMOTE_USER} ^([^<EMAIL_ADDRESS>     RewriteRule ^ - [E=REMOTE_USER_LHS:%1]
     AuthType KerberosV5
     AuthName "Secure (SSL) Kerberos Login"
     KrbAuthRealm EXAMPLE.COM
     ## require valid-user
</Location>

<Location ~ "/redmine/httpauth-*">
 AuthType KerberosV5
 Require valid-user
</Location>

Hi Kevin,
Still no difference with those changes.
I'll try messing around with the code over the weekend to see if I can add some kind of logging to http_auth to track what's going on.
I appreciate the input (and any new ideas you come up with)!

Hi Adam,
Thanks for you reply!
Unfortunately, no, there are no errors in any of the logs for Apache or webrick.
I haven't had time to play with the source and try tracking this down yet, but I plan to.  Since I'm the only one using Redmine at this point having me log in twice isn't a big deal, so it's been low priority.  :)
I appreciate that you confirmed what the plugin does for me; it will help with my debugging.  Who knows; I could be losing all of the environment variables in my proxy or webrick could fail to pick them up for all I know.
Thanks,
Chris

Adding to my comment... It looks like the loss of environment variables is the problem.  REMOTE_USER isn't set when it gets to webrick.
I turned on debugging and added this to http_auth_patch.rb:
  remote_username = remote_user
  if logger && logger.info
    logger.info  "REMOTE_USER: [#{remote_username}]"
  end

It logs an empty value for REMOTE_USER, but if I set it to request.remote_ip it logs that value just fine.
I'll keep messing around.  Experienced perl programmer here, but I've only been using ruby for all of one hour.  :D

Success!  This appears to be a known issue; one has to explicitly set the header, such as:
Redirect /redmine https://secure.example.com/redmine/
ProxyPass /redmine/ http://localhost:3000/
ProxyPassReverse /redmine/ http://localhost:3000/
<Location /redmine/>
RewriteEngine On
RewriteCond %{LA-U:REMOTE_USER} ^([^<EMAIL_ADDRESS>RewriteRule ^ - [E=REMOTE_USER_LHS:%1]
RequestHeader add REMOTE_USER %{REMOTE_USER_LHS}e
AuthType KerberosV5
AuthName "Secure (SSL) Kerberos Login"
KrbAuthRealm EXAMPLE.COM
require valid-user

Note the RequestHeader add line; that creates an environment variable named HTTP_REMOTE_USER which you can then configure http_auth to use as the server environment variable for authentication.
Sorry to have taken everyone's time!  Hopefully this process will help someone else.


On large chat when context is above the limit of model Context size

When you chat a lot with an agent and context size goes above the set limit:

This should inform the user nicely of >above context size, and not crash.
workflow-1      | INFO:     <IP_ADDRESS>:51836 - "POST /chat_response HTTP/1.1" 200 OK
workflow-1      | 2024-12-12 09:01:54,483 - root - WARNING - Invalid API data format for 6754cae9c1dd2545e92a172c - {'base_url': 'http://backend:3000/lm_studio'}
workflow-1      | 2024-12-12 09:01:54,484 - root - WARNING - Invalid API data format for 6754cae9c1dd2545e92a1740 - {'base_url': 'http://backend:3000/lm_studio'}
workflow-1      | 2024-12-12 09:01:54,485 - root - WARNING - Invalid API data format for 6754cae9c1dd2545e92a1768 - {'base_url': 'http://backend:3000/lm_studio'}
workflow-1      | 2024-12-12 09:01:54,486 - root - INFO - Generating LLM response
workflow-1      | 2024-12-12 09:01:54,491 - root - WARNING - Estimated tokens (5247.0) exceed context size (4096) of model gemini-1.5-flash. Pruning.
workflow-1      | 2024-12-12 09:01:54,493 - root - ERROR - Error generating response with API engine: 'coroutine' object is not iterable
workflow-1      | 2024-12-12 09:01:54,495 - root - ERROR - Traceback (most recent call last):
workflow-1      |   File "/app/workflow/core/api/api_manager.py", line 142, in generate_response_with_api_engine
workflow-1      |     return await engine_instance.generate_api_response(api_data=api_data, **kwargs)
workflow-1      |   File "/app/workflow/core/api/engines/llm_engines/gemini_llm_engine.py", line 49, in generate_api_response
workflow-1      |     estimated_tokens = est_messages_token_count(messages, tools) + est_token_count(system)
workflow-1      |   File "/app/workflow/util/text_splitters/utils/token_utils.py", line 11, in est_messages_token_count
workflow-1      |     total_tokens = sum(calculate_message_size(msg) / CHAR_PER_TOKEN for msg in messages)
workflow-1      | TypeError: 'coroutine' object is not iterable
workflow-1      |
workflow-1      | 2024-12-12 09:01:54,497 - root - ERROR - Error in turn execution: Error generating response with API engine: 'coroutine' object is not iterable
workflow-1      | Traceback (most recent call last):
workflow-1      |   File "/app/workflow/core/api/api_manager.py", line 142, in generate_response_with_api_engine
workflow-1      |     return await engine_instance.generate_api_response(api_data=api_data, **kwargs)
workflow-1      |   File "/app/workflow/core/api/engines/llm_engines/gemini_llm_engine.py", line 49, in generate_api_response
workflow-1      |     estimated_tokens = est_messages_token_count(messages, tools) + est_token_count(system)
workflow-1      |   File "/app/workflow/util/text_splitters/utils/token_utils.py", line 11, in est_messages_token_count
workflow-1      |     total_tokens = sum(calculate_message_size(msg) / CHAR_PER_TOKEN for msg in messages)
workflow-1      | TypeError: 'coroutine' object is not iterable
workflow-1      |
workflow-1      | During handling of the above exception, another exception occurred:
workflow-1      |
workflow-1      | Traceback (most recent call last):
workflow-1      |   File "/app/workflow/core/chat/chat.py", line 330, in _execute_single_turn
workflow-1      |     llm_message = await self._generate_llm_response(
workflow-1      |   File "/app/workflow/core/chat/chat.py", line 479, in _generate_llm_response
workflow-1      |     return await self.alice_agent.generate_llm_response(
workflow-1      |   File "/app/workflow/core/agent/agent.py", line 215, in generate_llm_response
workflow-1      |     response_ref: References = await api_manager.generate_response_with_api_engine(
workflow-1      |   File "/app/workflow/core/api/api_manager.py", line 148, in generate_response_with_api_engine
workflow-1      |     raise ValueError(f"Error generating response with API engine: {str(e)}")
workflow-1      | ValueError: Error generating response with API engine: 'coroutine' object is not iterable
workflow-1      |
workflow-1      | 2024-12-12 09:01:54,498 - root - ERROR - Error in turn 0: Error generating response with API engine: 'coroutine' object is not iterable
workflow-1      | Traceback (most recent call last):
workflow-1      |   File "/app/workflow/core/api/api_manager.py", line 142, in generate_response_with_api_engine
workflow-1      |     return await engine_instance.generate_api_response(api_data=api_data, **kwargs)
workflow-1      |   File "/app/workflow/core/api/engines/llm_engines/gemini_llm_engine.py", line 49, in generate_api_response
workflow-1      |     estimated_tokens = est_messages_token_count(messages, tools) + est_token_count(system)
workflow-1      |   File "/app/workflow/util/text_splitters/utils/token_utils.py", line 11, in est_messages_token_count
workflow-1      |     total_tokens = sum(calculate_message_size(msg) / CHAR_PER_TOKEN for msg in messages)
workflow-1      | TypeError: 'coroutine' object is not iterable
workflow-1      |
workflow-1      | During handling of the above exception, another exception occurred:
workflow-1      |
workflow-1      | Traceback (most recent call last):
workflow-1      |   File "/app/workflow/core/chat/chat.py", line 301, in _execute_chat_turns
workflow-1      |     turn_message = await self._execute_single_turn(api_manager, all_generated_messages, user_data)
workflow-1      |   File "/app/workflow/core/chat/chat.py", line 330, in _execute_single_turn
workflow-1      |     llm_message = await self._generate_llm_response(
workflow-1      |   File "/app/workflow/core/chat/chat.py", line 479, in _generate_llm_response
workflow-1      |     return await self.alice_agent.generate_llm_response(
workflow-1      |   File "/app/workflow/core/agent/agent.py", line 215, in generate_llm_response
workflow-1      |     response_ref: References = await api_manager.generate_response_with_api_engine(
workflow-1      |   File "/app/workflow/core/api/api_manager.py", line 148, in generate_response_with_api_engine
workflow-1      |     raise ValueError(f"Error generating response with API engine: {str(e)}")
workflow-1      | ValueError: Error generating response with API engine: 'coroutine' object is not iterable
workflow-1      |
workflow-1      | /app/workflow/core/chat/chat.py:322: RuntimeWarning: coroutine 'MessagePruner.prune' was never awaited
workflow-1      |   break
workflow-1      | RuntimeWarning: Enable tracemalloc to get the object allocation traceback
workflow-1      | 2024-12-12 09:01:54,517 - root - ERROR - validation_response
workflow-1      | INFO:     ('<IP_ADDRESS>', 51860) - "WebSocket /ws/a52c7619-9afc-4fd8-9da2-da71e617ce6d?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NzU0Y2FlOGMxZGQyNTQ1ZTkyYTE0M2EiLCJyb2xlIjoidXNlciIsImlhdCI6MTczMzg2MTM3MywiZXhwIjoxNzM2NDUzMzczfQ.nLM8395_fGPq_BRc1HCy3jSgRgD1K8V-69W16mOmlTQ" [accepted]
workflow-1      | INFO:     connection open
workflow-1      | INFO:     connection closed
workflow-1      | INFO:     <IP_ADDRESS>:46136 - "GET /health HTTP/1.1" 200 OK

Oh wow, I literally found this issue this morning and fixed it.
The problem is not that the context is too long (although I agree it should be visible for the user, I am adding that now), but that I missed an await on a method used to manage context overflow, which caused this crash. Normally it would be trying to reduce the context to avoid overflow.
So on both accounts: this is fixed in the latest update.

Thanks again for the feedback!


npyforward instead of call

All call commands are now npyfoward. I'm not 100% sure but I believe will need this to wrap, as I'm writing the TorchSynthModule.forward.
The nice thing is this is easy to search and replace, particularly using pycharm, if we want to change this to something nicer later.

I think I understand what you're doing here. Is the idea that each module will have a vestigial  npyforward in numpy, and a __call__ in pythorch?

I think I understand what you're doing here. Is the idea that each module will have a vestigial  npyforward in numpy, and a __call__ in pythorch?


fix(Decorator): allow decorator to inherit parent theme

Closes #5346
Allows decorator to inherit the parent theme, as well as keeping the feature to enforce a light or dark theme.
What did you change?
/packages/ibm-products/src/components/Decorator/Decorator.js
/packages/ibm-products/src/components/Decorator/Decorator.mdx
/packages/ibm-products/src/components/Decorator/Decorator.stories.jsx
/packages/ibm-products/src/components/Decorator/DecoratorBase.js
/packages/ibm-products/src/components/Decorator/DecoratorBase.mdx
/packages/ibm-products/src/components/Decorator/DecoratorBase.stories.jsx
/packages/ibm-products/src/components/Decorator/DecoratorDualButton.js
/packages/ibm-products/src/components/Decorator/DecoratorDualButton.mdx
/packages/ibm-products/src/components/Decorator/DecoratorDualButton.stories.jsx
/packages/ibm-products/src/components/Decorator/DecoratorLink.js
/packages/ibm-products/src/components/Decorator/DecoratorLink.mdx
/packages/ibm-products/src/components/Decorator/DecoratorLink.stories.jsx
/packages/ibm-products/src/components/Decorator/DecoratorSingleButton.js
/packages/ibm-products/src/components/Decorator/DecoratorSingleButton.mdx
/packages/ibm-products/src/components/Decorator/DecoratorSingleButton.stories.jsx

How did you test and verify your work?

[x] Storybook

Hey @paul-balchin-ibm ,
i see a small difference in bg color between the base variant and the rest, like layer 2 being used in rest (maybe them being a button?),

idk if this is fine as i did not find any design specs for it.
rest all looks good to me.

...i see a small difference in bg color, the base variant using layer 1 and the other variants using layer 2 (maybe them being a button?)...

Hi @devadula-nandan, you are correct. The non-interactive version is basically black/white, where the interactive versions are dark-grey/light-grey. This makes it easier to distinguish interactive from non-interactive elements on the page.


feat(docs): Add tutorials for different use scenarios

Like this: https://docs.timescale.com/tutorials/latest/

Some scenarios:

Chatbots
Search
text-to-sql

I will work on chatbot first.

Few scenarios:

Chatbots
Simple RAG
Advanced RAG
Q&A over documents
Summarization
Custom Search
Web scraping
Document retrieval
Data extraction/Labeling for NER (tagging in Langchain)

Most users might use Langchain or LLama-Index for use cases. I have a multilingual RAG over documents in Llama-Index and PGvector that could be changed to Pgvecto.rs if needed... 🤗


Content in uneditable on scroll

Current behaviour - I have set a height of 500 px and overflowY to scroll. Still when I try to scroll down the content becomes uneditable. Only the initial 500px area is editable.

Expected behaviour - Ideally the entire text area should be editable. Also, I dont want to not freeze the height. If I set no height it automatically grows with content but thats not what I want. I would like to freeze the heght and view the remaining content on scrolling.

any update on this? It's a significant issue

FWIW for my use-case all I had to do was wrap the editor in a wrapper element of the desired height, and put overflow: auto on the wrapper element. Adding min-height into the editor styles property works too if needed. The result is that the editor grows as needed and you're able to scroll as expected.

Actually the solution by @tobek only partially works. While you can indeed scroll the content, you are only able to edit the initially visible display. Anything below the scrolled viewport cannot be edited:

Scrolling and editing seems to be possible, see e.g. here.
The respective code amounts to e.g.
const CodeEditor: React.FC = () => {
  const [code, setCode] = React.useState(`
    function helloWorld() {\n  console.log('hello', 'world');\n}
  `);
  return (
    <Root>
      <Editor
        value={code}
        onValueChange={(code) => setCode(code)}
        highlight={(code) => highlight(code, languages.javascript, 'javascript')}
        padding={10}
        style={{
          fontFamily: '"Fira code", "Fira Mono", monospace',
          fontSize: 12,
        }}
      />
    </Root>
  );

const Root = styled.div`
  flex: 1;
  overflow: auto;
  /** hard-coded height */
  height: 200px;
`;

const Editor = styled(ReactSimpleCodeEditor)`
  white-space: pre;
  caret-color: #fff;
  min-width: 100%;
  min-height: 100%;
  float: left;
  & > textarea,
  & > pre {
    outline: none;
    white-space: pre !important;
  }
`;

If anyone still has issues with this, I found that my issue was that I needed to have the parent container set as display: block.  I was using flex everywhere so this one threw me off for a while.


diffoscope: 154 -> 156

Motivation for this change
Update to latest diffoscope: https://diffoscope.org/news/diffoscope-156-released/
Built and tested both with and without enableBloat=true
Things done

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

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

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

Result of nixpkgs-review pr 95451 1

1 package built:
- diffoscope

Too slow :D Also built locally and it works fine :)


Fix: Trigger Accumulators Before Post Execution Hooks are called

Motivation
When creating an order, you can supply a conduitKey, this key represents which Conduit the Consideration can communicate with to transfer the offerer's assets.
When the conduitKey is bytes32(0) seaport is the acting Conduit.
When this is the case, the transactions to settle the order are executed as they are processed inside the execution array loop atomically, when a conduitKey is set an accumulator(an array of transactions to execute) is armed and later triggered.
As of Seaport 1.2, there is a new post execution hook for restricted orders that gets triggered inside the order validity array loop.
When Seaport is the conduit, the order is atomically settled at the time of the validateOrder call, and if a conduitKey is set, then the order is not settled at the point of execution but after all the validateOrder calls have been made and the accumulator has been triggered.

Solution
Trigger the accumulator first between the execution loop and order validity loop in addition to after

Codecov Report
Base: 58.58% // Head: 76.87% // Increases project coverage by +18.29% :tada:

Coverage data is based on head (0094e19) compared to base (b93e026).
Patch coverage: 100.00% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@                  Coverage Diff                  @@
##           1.2-alpha-deploy     #970       +/-   ##
=====================================================
+ Coverage             58.58%   76.87%   +18.29%
=====================================================
  Files                   105       51       -54
  Lines                  4044     2832     -1212
  Branches                540      406      -134
=====================================================
- Hits                   2369     2177      -192
+ Misses                 1607      606     -1001
+ Partials                 68       49       -19

Flag
Coverage Δ

foundry
62.88% <100.00%> (+14.38%)
:arrow_up:

reference
99.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

contracts/lib/OrderCombiner.sol
92.41% <100.00%> (ø)

test/foundry/utils/StructCopier.sol

contracts/test/ConduitMockRevertBytes.sol

...cts/test/TestInvalidContractOffererRatifyOrder.sol

contracts/test/InvalidERC721Recipient.sol

test/foundry/utils/OrderBuilder.sol

test/foundry/utils/ConsiderationErrorsWrapper.sol

test/foundry/utils/BaseOrderTest.sol

test/foundry/utils/PseudoRandom.sol

test/foundry/offerers/impl/BadOfferer.sol

... and 45 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

This was a great find! We ended up just performing an additional loop through each order at the end if any restricted or contract orders are present, as that way you can rely on every transfer having occurred: https://github.com/ProjectOpenSea/seaport/blob/85f395a3a49ea1b48d945ae975ef16127320ee76/contracts/lib/OrderCombiner.sol#L882


Why the teacher model is not with DDP when using vit, and the teacher weight is updated by teacher_without_ddp instead of  teacher.module?

Hi,
I have two questions about the DDP:

In the code, you move the teacher model to DDP only if there is batch normalization (i.e., resnet50 ?). Why don't you move teacher to DDP when there is no BN in the model (i.e., vit)?
I find that you use theteacher_without_ddp to update the teacher's parameters. Can I directly use teacher.module in the case of resnet50? If not, what's the difference? Does it relate to the  mechanism of DDP?

Best,

Hi @pansanity666

I noticed that when using DDP the model uses a bit more GPU memory (maybe that is not the case with newest pytorch I don't know) that is why I preferred not to use it when not needed.

Yes I think you can use directly teacher.module !

Hi,
If i run codes in single GPU, can i use teacher to replace all teacher_without_ddp?
Best,


Enhance "/actuator/gateway" endpoint

Same as: https://github.com/spring-cloud/spring-cloud-gateway/pull/3147

Duplicates https://github.com/spring-cloud/spring-cloud-gateway/pull/3163


comment out mysqld_exporter config

The mysqld_exporter returns an error when running the pipeline out of the box with no changes. This should remedy the error thrown by not having these values available.

Thanks. Hopefully the new pipeline I'm working on will just work for you. I'll get in touch as soon as it's ready for testing.


🕸 Dynamic Graph Feature

Possibly add feature for Seastar to work with dynamic graphs. Research and more learning to be done before deciding if it's feasible to go ahead with it.

Seastar now has support for dynamic graph support through the issues #18 #29


[Feature Request]: Implement a native Tensorflow model hander

What would you like to happen?
Currently we use the tensorflow model handler in tfx_bsl which has some constraints listed in https://github.com/apache/beam/issues/23584. Implement a new model handler with support for more types like numpy, tensors, etc.
Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
Issue Components

[X] Component: Python SDK
[ ] Component: Java SDK
[ ] Component: Go SDK
[ ] Component: Typescript SDK
[ ] Component: IO connector
[ ] Component: Beam examples
[ ] Component: Beam playground
[ ] Component: Beam katas
[ ] Component: Website
[ ] Component: Spark Runner
[ ] Component: Flink Runner
[ ] Component: Samza Runner
[ ] Component: Twister2 Runner
[ ] Component: Hazelcast Jet Runner
[ ] Component: Google Cloud Dataflow Runner

@riteshghorse since this isn't a release blocker I'm going to remove the 2.46 milestone. If we get to it in time we can always add it back (and it will get automatically added if this issue is closed)

SGTM


This compiles and run! (can't test it with cuda yet)

for OpenCV4 and Darknet by AlexeyAB (removed the dependencies from OpenCV < 3.4.X)
https://github.com/TamaGO89/darknet_ros
I made a mess on github creating the new repo (i know very little on how to use it) but i started from tomlankhorst version of darknet_ros, trying to make it compatible with alexeyab version, then i stumble into yours and noticed that we were headed in the same direction.
So i tried yours but i wasn't able to compile it, i made som extra tweaks and i finally been able to compile it without cuda (i can't test it with cuda for now) but it seems to run without problems!
Can you help me point my simple edit to your version and test it properly with cuda and opencv4?

Please make sure that build succeeds.
http://build.ros.org/job/Kpr__darknet_ros__ubuntu_xenial_amd64/25/

Thanks for your contribution. Darknet_ros is now OpenCV compatible. Shall we close this issue?


Fix #343

Summary
Fix #343.
Details and comments
There are two reasons: first, SparsePauliOp had been constructed by the way not officially supported (i.e. SparsePauliOp(boolean array) is not supported and SparsePauliOp(PauliTable(boolean array )) is correct). The second is that I modified the bug https://github.com/Qiskit/qiskit-terra/issues/6815, but originally nature use a specification where this phase was ignored.

@mrossinek Thanks. The Bravyi Kitaev mapper is multiplied (&) using Pauli, but the qubit_mapper is multiplied using SparsePauliOp, so the point seems to have already been taken care of.

Sorry, my bad. I had mistaken these lines (https://github.com/Qiskit/qiskit-nature/blob/main/qiskit_nature/mappers/second_quantization/qubit_mapper.py#L91) for constructions based on boolean arrays but these are actually based on Pauli instances. All good then :+1:


Visual artifacts can appear in the WKWebView

I suspect we will need to rotate in the WKWebViews like on iOS to prevent our JavaScript rendering code from causing problems.

I was doing the analysis on how to share the WKWebView recycling and rotating code from iOS to macOS and started having flashbacks.  All the problems we had with rendering bugs, blank views, text sizing bugs, etc...  I wondered if it was worth the hassle.
I don't think it is.  I think that the NNW 5.0.x series loads articles fast enough with loadHTMLString and that it is hard to spot the performance difference between it and the 5.1 JavaScript loading code.  I'm even doubting myself with regards to the iOS code and wonder if I wasn't doing something wrong that caused the loadHTMLString code to run so much slower than the JavaScript loading code.  Maybe we need to revisit decision on iOS if we keep seeing bugs.
I can go ahead and make the iOS code sharable between it and macOS, but my recommendation is to revert to NNW 5.0.x article rendering.

The downside to reverting to using loadHTMLString is that less article rendering code is shared between macOS and iOS.  This could be a bit of a hassle and not something I'm looking forward to.

Let’s stick with loadHTMLString on Mac. The performance has been just fine — I’ve had zero problems with it, and I’m a stickler for performance. (And I’m using NNW mostly on an old 2013 MacBook Air.)

Is there a way we could test loadHTMLString performance on iOS? If we could go back to that, that would be cool, just since it’s so simple, and we’d have the same code on Mac and iOS.

Let me think about a way we can test that.  I'm thinking the same thing.
We have a lot of complexity tied up in making the JavaScript rendering work.  I'd prefer to use loadHTMLString, but last time I tried it it was noticeably slower.  Maybe something else was factored in that I missed that was causing it to be so slow.

I got a version of loadHTMLString working for Mac 5.1 and performance is the same as Mac 5.0.x.  I was even able to keep the ArticleRenderer and other shared iOS code intact.
The first few tries weren't good.  loadHTMLString was noticeably slower.  I eventually figured out that I was incorrectly referencing our local JavaScript files and WKWebKit was trying to download them from the web.  Fixing that, fixed performance.
I'm now wondering if I didn't have the same problem when I was testing loadHTMLString on iOS.  I'd like to implement loadHTMLString on iOS and see how fast it is.  I'm not sure I'm comfortable doing it in the ios-release branch.  A longer testing cycle might be good because I'm going to have to unwind some stuff I put in to deal with the JavaScript code.  This might be something better left to the iOS 5.1 release.
@brentsimmons, do you think we should try it for iOS 5.0.1 or wait until iOS 5.1?

Let’s try it for iOS 5.0.2. I’d rather get 5.0.1 done soonest.

If we’re going to try to get it in the 5.0.x series, I’d rather we do it in 5.0.1.  I could have it done by tomorrow evening and ready to test.

Okay — agreed.

I did a bunch of speed comparisons for the JavaScript loading vs. loadHTMLString.  I dug in using Safari's timeline and think I have a handle on the differences.  It all comes down to how fast your network connection is.
loadHTMLString is slower the slower your network is.  That's why my testing in the past showed loadHTMLString to be so much slower than the JavaScript stuff on iOS.  My phone was on an WiFi connection.  It's also why I couldn't tell much difference between the two on my Mac.  It's on a gigabit ethernet connection.  If you completely disconnect your computer from the network, loadHTMLString seems to be every bit as fast as the JavaScript rendering.
Looking at Safari's timeline tool, it looks like loadHTMLString will attempt to download image assets before rendering sometimes.  Probably because image size info wasn't included in the HTML and it wants it to make rendering the page look less jumpy.
The JavaScript rendering seems to do the opposite with images.  It renders the DOM with the missing image data and then does layout again as the images come in.
Assuming I'm right, we have to decide what we want for article rendering.  Slower, less jumpy or snappy with some jumpiness as image assets come in.
I guess there are other things to take into consideration.  Our image resizing bug might not have existed if we had used loadHTMLString on iOS.  Complexity also goes up on macOS if we go with JavaScript because we have to start rotating web views to avoid rendering issues.  On iOS we will still do some rotating because we are constantly creating WebViewControllers and need to avoid the white flashing bug, so not much difference between the two there.

Consensus is that we go with loadHTMLString for both platforms.


Checking backtrader with sptrader

I get this error:
C:\Users\jj\AppData\Local\Continuum\Anaconda\envs\python35\lib\site-package
s\matplotlib_init_.py:1357: UserWarning:  This call to matplotlib.use() has n
o effect
because the backend has already been chosen;
matplotlib.use() must be called before pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
warnings.warn(_use_error_msg)

Running on http://<IP_ADDRESS>:5000/ (Press CTRL+C to quit)
Restarting with stat
C:\Users\jj\AppData\Local\Continuum\Anaconda\envs\python35\lib\site-package
s\matplotlib_init_.py:1357: UserWarning:  This call to matplotlib.use() has n
o effect
because the backend has already been chosen;
matplotlib.use() must be called before pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

warnings.warn(_use_error_msg)

Debugger is active!

The error is normal.
The problem is that the source package doesn't some of the generated nodejs files.  I added some very basic build instructions in INSTALL.md
If you have some coding experience, let me know, since we can improve the install process.

I have experience as programmer, and i have reviewed INSTALL file, i have reinstalled all components, but the problem continues. could you suggest any thing i could check?
Thanks a lot

Run the system under firefox-dev and look at the console log.  The system
puts a lot of output into the console.log so you should be able to see why
the system is not rendering.
Also check if static/bundle.js is there and it should be about 6 megabytes.
On Sun, Oct 2, 2016 at 2:58 PM, junajo10<EMAIL_ADDRESS>wrote:

I have experience as programmer, and i have reviewed INSTALL file, i have
reinstalled all components, but the problem continues. could you suggest
any thing i could check?
Thanks a lot
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joequant/sptrader/issues/7#issuecomment-250957273,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACxgGTQNJYyFoOU_Uq2FsXT21dbXhaOnks5qv1YFgaJpZM4KLLOU
.

I  don't have any file bundle.js in the static folder
I am running the code, calling python webui.py
GET
http://localhost:5000/static/bundle.js

Run the commands
npm install
npm run build-js
This should generate a file static/bundle.js
On Mon, Oct 3, 2016 at 4:17 AM, junajo10<EMAIL_ADDRESS>wrote:

I don't have any file bundle.js in the static folder
I am running the code, calling python webui.py
GET
http://localhost:5000/static/bundle.js
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joequant/sptrader/issues/7#issuecomment-250993052,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACxgGUEsVELdC0e67bunJlKd7O6WGWwbks5qwBFxgaJpZM4KLLOU
.

Also out of curiosity what platform are you running on.  This should work
with both windows and linux, although the issues are with install scripts.
On Mon, Oct 3, 2016 at 5:14 AM, Joseph Wang<EMAIL_ADDRESS>wrote:

Run the commands
npm install
npm run build-js
This should generate a file static/bundle.js
On Mon, Oct 3, 2016 at 4:17 AM, junajo10<EMAIL_ADDRESS>wrote:

I don't have any file bundle.js in the static folder
I am running the code, calling python webui.py
GET
http://localhost:5000/static/bundle.js
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joequant/sptrader/issues/7#issuecomment-250993052,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACxgGUEsVELdC0e67bunJlKd7O6WGWwbks5qwBFxgaJpZM4KLLOU
.

Hi,
Windows
i have just created the file bundle.js.
Now the login screen is showed, i don´t know if i could create a demo account (DEMO201608054) or i could use backtesting without login?
Thanks a lot

Hi.
You can get your own demo account from this link
http://www.sharppoint.com.hk/algo.php?lang=1&mod=api
They have preexisting demo accounts, or you can request your own account
from SP customer support.
Backtesting should not require a demo account, but the UI forces you to log
in to do backtesting.  Would be delighted if this restriction were
removed.  This would be purely an issue with changing the UI.
This system is being used by a client to do algo strategies so for the next
few weeks, I'll be focused on getting things into production for them, but
I'd be delighted to pull in any fixes or changes you may have.
On Mon, Oct 3, 2016 at 5:57 AM, junajo10<EMAIL_ADDRESS>wrote:

Hi,
Windows
i have just created the file bundle.js.
Now the login screen is showed, i don´t know if i could create a demo
account (DEMO201608054) or i could use backtesting without login?
Thanks a lot
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joequant/sptrader/issues/7#issuecomment-250998958,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACxgGS3WBFYmQ7luSC5IRZbD49oOC37xks5qwCitgaJpZM4KLLOU
.

Thanks again, ia am trying to connect but i am not able to get it. My parameters are:
Login
Host
localHhost
Port
5000
License
DLLAPITEST
App Id
DLLAPITEST
User Id
SPAPI14
Password
12345678

The server should be demo.spsystem.info and the port is 8080
It turns out that the demo accounts on the page are often used, and I've
found that I've had to request a demo account from sp customer service.
On Mon, Oct 3, 2016 at 3:09 PM, junajo10<EMAIL_ADDRESS>wrote:

Thanks again, ia am trying to connect but i am not able to get it. My
parameters are:
Login
Host
localHhost
Port
5000
License
DLLAPITEST
App Id
DLLAPITEST
User Id
SPAPI14
Password
12345678
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joequant/sptrader/issues/7#issuecomment-251040632,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACxgGYW0WuT5W6kheZD2FeveVL1l0Ujiks5qwKpAgaJpZM4KLLOU
.

thanks a lot, now it is working,

Closing issue.


Add a Git hook to print the create PR URL including body

Problem
Every PR linked to a ticket has to include the Closing tag in its body.
Solution
Automate the process by pre-filling the PR body using the body query parameter as body=Closes%20%23123 to pre-fill the body with Closes #123.
The whole link has to be
`https://github.com/${owner}/${repositoryName}/compare/${branchName}?expand=1&body=Closes%20%23${issueNumber}`

This can't be done because only the squash commit is required to use the Conventional Commits specification. Other commits in pull requests and the branch name are free to use anything.


Tenant field is not queried in resouce collections

When querying resource collections, the tenant field is not returned, making it impossible for the frontend to filter documents according to the tenant.
For example, here is the "pages" resource.

Even querying via GraphQL leads to the same result - tenant is always null.
And, since the tenant field doesn't exist, the frontend can't filter by tenant id, and users can see each other's documents.
Adding hidden: false to the CollectionConfig seems to help, but only when querying for a single page:

But when querying all the pages, it remains null:

However, it works just fine for the user collection:

Any clues what the issue might be?

Changing hidden: false in resourceTenant fixes the issue.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createResourceTenantField = void 0;
/** @returns Tenant field for generic resources. */
var createResourceTenantField = function (_a) {
    var tenantCollection = _a.options.tenantCollection;
    return ({
        type: "relationship",
        name: "tenant",
        relationTo: tenantCollection,
        hidden: false, // changed this
        hooks: {
            beforeChange: [
                function (_a) {
                    var _b;
                    var req = _a.req;
                    // Assign tenant to the document when it's created (or updated).
                    var _c = req, tenant = _c.tenant, user = _c.user;
                    return (tenant === null || tenant === void 0 ? void 0 : tenant.id) || ((_b = user === null || user === void 0 ? void 0 : user.tenant) === null || _b === void 0 ? void 0 : _b.id);
                },
            ],
        },
    });
};
exports.createResourceTenantField = createResourceTenantField;

The compiled code looks different from what's in the repo. Maybe https://github.com/joas8211/payload-tenancy/commit/fc7c4f7b451dfc391efb97a7a8be4be3c14a7874 is missing from npm?

Yup. Just confirmed it. npm is behind.
@joas8211 Do you mind creating a new release? :slightly_smiling_face:

I fixed this by uploading Payload, confusingly :sweat_smile:


test/e2e: fix intermittent resourceVersion error in modes_test.go

Description

The following error is sometimes breaking TestModes_CreateReplaceDelete:
modes_test.go:111: Operation cannot be fulfilled on gitopsconfigs.eunomia.kohls.io "gitops-modes": the object has been modified; please apply your changes to the latest version and try again

(see e.g.: https://travis-ci.com/KohlsTechnology/eunomia/builds/144162028#L2111)
This commit adds a retry on the block of the code trying to update the
resource, as suggested on StackOverflow:
https://stackoverflow.com/q/56919318
Type of change

Bug fix (non-breaking change which fixes an issue)

Checklist

[x] Unit tests and e2e tests updated (the fix is specifically to a test)
[ ] Documentation updated (n/a)

@akavel it looks like this did not fix the issue. :-(

:/ eh. Man can have hopes. Will try to tweak/debug it further and see what goes, expect some spam emails from github, sorry.

I initially applied the retry incorrectly. Seems to be better now...? 🤞 PTAL @Smiley73 @seanmalloy


Reduce the length of message

I encountered an error today:
Error: create completion: error, This model's maximum context length is 4097 tokens. However, your messages resulted in 5515 tokens. Please reduce the length of the messages.

I can think of 2 options to solve it:

truncate the message to maxium length
prune the object, like only send the status field and related events

There are some defaulting filed that can be omitted, such as terminationGracePeriodSeconds. We may need to check the yaml.

for pods,  ss I know the kubectl-apply annotation is very big.
for nodes, the status.image is large but useless.

@pacoxu Hi, I have filed #12 to remove node.status.image, metadata.{labels,annotations} from the object before submiting it to gpt api.


Syntax error on load

Hi,
I just installed this with:
pack_install(edcg).
using swipl 8.2.4 on linux to my local directory.
Doing:
?- use_module(library(edcg)).
gets me:
ERROR: /home/eddie/.local/share/swi-prolog/pack/edcg/prolog/edcg.pl:54:43: Syntax error: Operator expected
ERROR: /home/eddie/.local/share/swi-prolog/pack/edcg/prolog/edcg.pl:59:33: Syntax error: Operator expected
true.
There seems to be a "=>" that wasn't there before.
Cheers,
Eddie

Hmm, so I just noticed the comment on the front page about 8.3.something.  I hadn't realised my ubuntu installation was that
far behind.  I might have a bash at installing swipl manually.

The standard version of SWI-Prolog that comes with Ubuntu tends to be somewhat old.
However, the "=>" operator is quite new and I shouldn't have made it a requirement. (It's only in the latest "development" version of swipl)
I'll look at the code and figure out a way to remove "=>".

Many thanks.
On checking I find that 8.2.4 is actually the latest stable.
At this point I'm simply trying to understand the idea and whether it's what I need for the program I'm building so I imagine
everything will have fixed itself by the time I get my head round it!

A slightly older version of EDCG should be fine for you, but I'll have to figure out how to make the current EDCG backward-compatible.
The "development" version of SWI-Prolog is actually very stable. There are instructions for installing it here (no need to install manually): https://www.swi-prolog.org/build/PPA.html

As a quick fix, try this before :- use module(library(edcg)).:
:- op(1200, xfx, '=>').

For more details on what this does: https://www.swi-prolog.org/pldoc/man?section=operators

TBH, I did that in the source before reporting it - blindly pattern matching!!
It loaded and worked with the "len" example on the front page.  Obviously though I had no idea of whether it would bite me later.
I'll hopefully be exploring the whole thing further over the weekend.
Thanks,
Eddie
On 2021-04-08 19:02, Peter Ludemann wrote:

This email was sent to you by someone outside the University.
You should only click on links or attachments if you are certain that the email is genuine and the content is safe.
As a quick fix, try this before |:- use module(library(edcg)).|:
|:- op(1200, xfx, '=>'). |
For more details on what this does: https://www.swi-prolog.org/pldoc/man?section=operators
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/kamahen/edcg/issues/6#issuecomment-816026881, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACARYVXUAWVARTIAY7T7XDTHXVTVANCNFSM42THX2GA.

The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.

I've added another example:
https://github.com/kamahen/edcg/blob/master/t/puzzle.pl


Plan Total Assertion Count

Currently looking at adding the ability to plan the amount of assertions, which will be useful for async testing.
Currently I see there is access to result.failedExpectations.length + result.passedExpectations.length in the specResultCallback. So getting the total is easy.
However struggling to figure out the best way to set up the expectation count w/ expect call. Like expect().toHaveAssertionCount(5) (terrible name).
Any pointers on a direction to go on this would be great.
Like catching a known error in Spec.prototype.onException?

What about if the code could instead analyze how many expect calls are defined in the block and verify that they are all hit.  So if you had 5 expect's and only 4 got hit, it would error letting you know some async code never executed.

@bookman25 are you talking about statically analyzing the amount of calls to expect?

As costly as it may be, yes.  That's exactly what I was talking about.  Not saying it's the best idea, but we have a lot of cases where our expect's weren't getting hit.  And in some cases the tests should have failed but passed because the expects were never triggered.

That's not necessarily doable or reliable. Changing the count of assertions could theoretically be dynamic and not statically analyzable.

Yeah, I'm aware of that.  It's more of a pipe dream.  It could handle cases where the number of expects are static, but not all cases.  And as a result would probably lead to buggy tests for the dynamic cases.  :(

I think we shouldn't do this statically. It should be a runtime check after the test completes.

het @browniefed
per our discussion today:
here's the hook that i used to fail the test if there's a failing .toMatchSnapshot (they don't throw by default.
and you can use those to set this global matcher state from the inside of expect code: https://github.com/facebook/jest/blob/master/packages/jest-matchers/src/index.js#L144-L148

Well that was fun, things learned. Run npm run build before npm run jest or you'll be sad.
https://github.com/facebook/jest/pull/2133

Really interested in this, I wonder why so few test runners have implemented it.
Very often I tests like the one below when testing error conditions
describe('what is dead', () => {
    it('may never die', () => {
        return drown(euron)
        .catch(() => {
            expect(euron.isAlive()).toBe(true);
        });
    });
});

However if the drown() returns a fulfilled promise, the test will pass, which is wrong.
So I have to write something like
return promise.then(() => throw new Error('for the watch')).catch(...)

But being able to say how many assertion you're planning to run is much shorter
it('respects the plan', () => {
   plan(1);
   // ...
});

http://www.node-tap.org/api/#tplannumber

This will be in the next Jest release as expect.assertions(number).

@cpojer Any news on this? Thanks!

This is already released @aymericbeaumet

Oh great! Didn't find it in the docs


Embeddable @Column Property Precision & Scale ignored by View SQL Command

When using BigDecimal in Java entity the View SQL Command generates DECIMAL(100) SQL Code. But many SQL data Bases like Maria DB don't like this. So I have to use the precision Property to generate the allowed DECIMAL(65). But when doing this in a embedded Entity the @attribute overides section is used for generating the DECIMAL(XXX) values.  Using this instead of Embeddable @column section in DB-View - I was blocked in creating the DB View from the jpa view.

Please attach the modeler file :)

JpaDiagrammXT.zip
The EmbeddedPhase Entity is critical

Please install the hot fix : https://github.com/jGauravGupta/JPAModeler/releases/tag/3.1.1
This fix is only for new created attribute, if you have already existing file then :
Open the file in xml mode > delete all lenth attribute by replacing 'length="255"' => ''


Update Footer w/ updateyourfooter.com snippet

The Materialize site still says 2014, with this javascript snippet it will always display the current year :+1:

We don't really want to add a script for this since its just a yearly thing. Thanks though!


Add option to window the popgen plots over n trees

Gertjan Bisschop suggested that we add another option for windowing the Popgen tab plots, such that each window covers n trees for a given n. At the moment, we can either choose a fixed number of windows or have one window per tree (i.e. n =1).

Tsqc is just exposing the tskit options here, I don't think multiple trees is an option. Could be though if someone wanted to implement it.

Would be easy enough, something like
windows = ts.breakpoints(as_array=True)[::k]

would pull out every kth breakpoint (but would need some special handing of the trailing values) I think?

Popgen tab has been shelved so closing for now.


Bug when plotting data using both horizontal and vertical subplots with same values

Steps to reproduce
Create a dataframe with 4 columns: X / Y / C1 and C2 where C1 and C2 are random values from a common list, for instance
["A1", "A2", "A3" ]
When trying to plot X Vs Y using C1 as a horizontal subplot filter and C2 as vertical subplot filter it only displays 3 graphs on the 'diagonal' C1 == C2, each having 3 data sets, instead of 9 graphs total each having one set of data
doing a simple replace data['C2'] = data["C2"] + "_" fixed the issue so I guess this is a bad indexing issue
Thanks

Actual Result

Expected Result
Environment

atoti:
Python:
Operating System:

Logs (if relevant)

To reproduce :
import atoti as tt
import pandas as pd

session = tt.create_session()

table = session.read_pandas(
    pd.DataFrame({
        "X": [1,2,3,4,5,6,7,8,9],
        "Y": [4,5,6,7,8,9,10,11,12],
        "C1": ["A1", "A1", "A1", "A2", "A2", "A2", "A3", "A3", "A3"],
        "C2": ["A1", "A2", "A3", "A1", "A2", "A3", "A1", "A2", "A3"],
    }),
    table_name="Table"
)

cube = session.create_cube(table)
session.visualize()

internal ticket : https://support.activeviam.com/jira/browse/UI-6984


[Question]:ImportError: cannot import name dataclass_transform

error_info:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/gthread.py", line 104, in init_process
    super(ThreadWorker, self).init_process()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/dist-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/workspace/main.py", line 3, in <module>
    from paddlenlp import Taskflow
  File "/usr/local/lib/python3.7/dist-packages/paddlenlp/__init__.py", line 45, in <module>
    from .server import SimpleServer
  File "/usr/local/lib/python3.7/dist-packages/paddlenlp/server/__init__.py", line 15, in <module>
    from .server import SimpleServer
  File "/usr/local/lib/python3.7/dist-packages/paddlenlp/server/server.py", line 16, in <module>
    from fastapi import FastAPI
  File "/usr/local/lib/python3.7/dist-packages/fastapi/__init__.py", line 7, in <module>
    from .applications import FastAPI as FastAPI
  File "/usr/local/lib/python3.7/dist-packages/fastapi/applications.py", line 15, in <module>
    from fastapi import routing
  File "/usr/local/lib/python3.7/dist-packages/fastapi/routing.py", line 22, in <module>
    from fastapi import params
  File "/usr/local/lib/python3.7/dist-packages/fastapi/params.py", line 4, in <module>
    from pydantic.fields import FieldInfo, Undefined
  File "pydantic/__init__.py", line 2, in init pydantic.__init__
  File "pydantic/dataclasses.py", line 40, in init pydantic.dataclasses
ImportError: cannot import name dataclass_transform

version:
paddleocr==<IP_ADDRESS>
paddlenlp==2.4.9
paddlepaddle-gpu==2.3.2

你是运行什么代码出现的问题？

使用 Flask 开发的web接口项目

可以参考这个issue https://github.com/ray-project/ray/issues/31227

可以参考这个issue ray-project/ray#31227

目前这个问题解决了，现在我只使用了ocr的服务，然后出现这个日志
[2023-02-27 11:56:21 +0800] [296] [INFO] Booting worker with pid: 296
[2023-02-27 11:56:25,424] [ WARNING] - The schema has not been set yet, please set a schema via set_schema(). More details about the setting of schema please refer to https://github.com/PaddlePaddle/PaddleNLP/blob/develop/applications/information_extraction/taskflow_text.md
[2023-02-27 11:56:28,693] [    INFO] - We are using <class 'paddlenlp.transformers.ernie.tokenizer.ErnieTokenizer'> to load './checkpoint/model_best'.
[2023/02/27 11:56:28] root WARNING: version PP-OCRv2 not support cls models, auto switch to version PP-OCR
WARNING 2023-02-27 11:56:28,727 paddleocr.py:269] version PP-OCRv2 not support cls models, auto switch to version PP-OCR


don't show access tooltip when disabled for other reasons

Fixes

https://issues.redhat.com/browse/HAC-3617
Description
With the addition of access checks to disable actions, in some cases we now show the access check tooltip even though the action is disabled because the pipeline run is not running.
The permissions related tooltip should only be shown when the action is disabled due to permissions.

Type of change

[ ] Feature
[x] Bugfix
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation content changes
[ ] Other (please describe):

Screen shots / Gifs for design review

How to test or reproduce?

Create a pipeline run.
Go to the details page or list page and open the kebab menu.
If the pipeline run has completed, the actions should be disabled without showing a tooltip about permissions.
Browser conformance:

[x] Chrome
[ ] Firefox
[ ] Safari
[ ] Edge

/retest

/retest

/lgtm

/retest


Add –quantmode to STAR2p

"The CLEAR component can be used in part to quantify host transcripts, however I need the raw reads counts, including ERCC and viral, for my analysis." -Sarah

Added


Small Saltern Fixes

About the PR
Fixes a couple things that were reported in Discord, including but not limited to;
Double chem light.
Unpowered sci hall maint door.
Burn chamber overly reinforced tiles.
Buttons floating off walls.
The missing glass textures (I think? I don't actually know what the ordeal with that is.)
Gives security a paperbin and single jetpack in the armory.
Maybe something I missed? No idea, it's late.
Media

[X] This PR does not require an ingame showcase.

glass textures already reported idk who broke them


Morning Code Review

Hello Victor,
First of all, I want to congratulate you on your amazing work, I can see that you are very dedicated and organized 🥇
Second of all, I want to thank you for walking me through your code because that helped me to improve my knowledge on the JavaScript best practices and on the OOP methods in JS 👍
Finally, there's nothing else to say to you, your code is very clean and optimized, very good work applying all the best practices.

Thank you very much for your comments


Could you extend for typescript support please?

Try npm install @types/vue-extend-layout if it exists or add a new declaration (.d.ts) file containing declare module 'vue-extend-layout';

@boost2017
Sorry for my delay.
I don't have any TS skills, but I'll try.
If you want to send a Pull request, I would be very grateful to you.


[GPII-2805]: Update CouchDB restoration guide

Included all fixes post today's test.
Rendered README.

LGTM

lgtm

Currently following the guide & running tests will break CI because of encryption issues (more in pad & I'll add a ticket link once created).

@stepanstipl Locust issue has nothing to do with this guide and needs to be fixed separately:
https://issues.gpii.net/browse/GPII-4003

@stepanstipl Locust issue has nothing to do with this guide and needs to be fixed separately:
https://issues.gpii.net/browse/GPII-4003

@natarajaya while I agree this should be fixed elsewhere, I also don't think that having a guide that breaks your system is ok.
Adding an additional step to destroy the locust module & state to the restoration guide would prevent this issue happening until it's properly fixed.

@stepanstipl Locust issue is being addressed in #437, I am pretty sure it'll get merged before anybody needs to use this guide again.


Handling http error

Hello!
Is there any way to handle an HTTP error in case the link to the remote audio stream fails?
If I can hack it somehow please point me into :)
Currently, the player just kinda plays the silence in case the response is not valid. I want to show a relevant message on the UI.
Thanks in advance!

thanks! @tanhakabir that would be perfect


Smart contract calls with parameters other than string

Trying to run a smart contract function with a uint8 input value to no avail.
This is how the call is put together, but the contract reverts.
byte newValue = 10;
        byte[] newValueBytes = ByteBuffer.allocate(1).put(newValue).array();
        new ContractExecuteTransaction(client).setContractId(newContractId)
        .setGas(100_000_000)
        .setFunctionParameters(CallParams.function("set_value")
            .add(newValueBytes))
        .executeForReceipt();

Suggest implementing methods for setting a boolean, byte, int, long, bigInteger and address.
Also, the methods for recovering data from a call are limited to int and string, what about boolean, address, BigInteger, etc... for datatypes larger than int or long (e.g. int256).
Finally, how would an array of values be passed to a contract and returned from it ?

This is the solidity I used for reference
pragma solidity >=0.4.22 <0.6.0;

contract StatefulContract {
    // the contract's owner, set in the constructor
    address owner;

    // the message we're storing
    string message;
    uint8 value;

    constructor(string memory message_) public {
        // set the owner of the contract for `kill()`
        owner = msg.sender;
        message = message_;
        value = 5;
    }

    function set_message(string memory message_) public {
        // only allow the owner to update the message
        if (msg.sender != owner) return;
        message = message_;
    }

    function set_value(uint8 value_) public {
        // only allow the owner to update the value
        if (msg.sender != owner) return;
        value = value_;
    }

    // return a string
    function get_message() public view returns (string memory) {
        return message;
    }

    // return an integer
    function get_value() public view returns (uint8) {
        return value;
    }

    // recover the funds of the contract
    function kill() public { if (msg.sender == owner) selfdestruct(msg.sender); }
}

@gregscullard those were just the methods I decided to include on an MVP implementation of that class. I'll take some time to enumerate the types Solidity supports and their Java counterparts so I have a nice checklist to work with.

Looking at: https://solidity.readthedocs.io/en/v0.5.9/abi-spec.html#types
Java/Solidity

[ ] boolean/bool
[ ] Signed integer types: byte/int<8>, short/int<16>, int/int<32>, long/int<64>, BigInteger,N/int<N>
[ ] unsigned variants of the above
[ ] <new Java type>/address, <new Java type>/address_payable
[ ] <new Java type>/function
[ ] Array types of all of the above

Omitted:

Fixed point types are not currently implemented in the Solidity spec or EthereumJ


500 error: json: cannot unmarshal string into Go struct field ChatRequest.messages of type api.ToolCallFunctionArguments

I get the following error when I try to do a search (especially when in Expert mode):
500: {"error":"json: cannot unmarshal string into Go struct field ChatRequest.messages of type api.ToolCallFunctionArguments"}
I am using the Docker approach and ollama and phi3:14b on Windows 11.

Same error here. To me this looks like an issue on ollama side; refer to https://github.com/ollama/ollama/issues/5909 - will keep you updated if I can fix it.

Found a workaround to fix the issue... give it a try. Not pull-requesting it for now, as the project seems to be abandoned (and the workaround is ugly).
0001-fix-issues-89-unmarshallling-string-failed.patch


feat(fish_as_base): fish as base.

Hello and welcome to a great adventure into the beautiful world of image resampling!
Yaoyu, thank you for all your hard work on the PlanarAsBase class and subclasses, this code is heavily aided by your work.
This Pull Request comes to introduce the FishAsBase class, which aims to resample multiple pinhole images from given fisheye images. Accompanying code lives in
A few open questions:

I think that the pixel origin might be wrong here. It may need to be backshifted by half a pixel width, continuing our discussion :).
I have removed the cache arg from the constructor of this class since, upon construction, the class does not have access to a grid object or a mask object. The cache is kept as a member variable. If I am missing your reasoning for having that in the constructor of the PlanarAsBase class I'd love to hear about it!
I probably forgot to do many important things and to use base-class methods properly (i.e., mesh_grid_pixels). I am actually unsure about whether this class should use the PlanarAsBase base class given that their uses are different (sample one from many vs sample many from one). I would be happy to discuss this!

I think we need some in-person discussion about the design choice for the new sampler.
I agree that the name PlanarAsBase is not a good choice. It was for the old implementation (where I was trying to emphasize that the raw images are "full" in the sense of there are no black pixels as a fisheye image). Then later, these image samplers get more use cases and the naming becomes inappropriate rather quickly. The arguments of the constructor function also have the same issue where the R_raw_fisheye is an improper name. Maybe we can use SamplerBase as the class name and R_raw_sampled as the argument name.
The original design choice was made in anticipation that the raw image is not a conventional image. In the early phase of development, we have two types of raw images. The first one is a set of 6 pinole images with 90-degree horizontal and vertical FoVs. The second type is the panorama images generate from UE via a modified AirSim. Normally, we can use the equirectangular camera model to represent a panorama camera. But the panorama image produced by UE is not following the convention where the center column is the forward direction of the camera. In the early phase, I make some bad choices and determine that I will not change the raw panorama to the more usual format. Then this second type of raw image, like the first type with 6-image, is also considered as a special image type that cannot be represented by a conventional camera model.
With the above background story, now you may well understand why there are two samplers that are dictated to different raw image types. They are SixPlanarXXX for the 6-image type and FullViewRotation for the UE panorama.
So far so good. Then I realized that, wait, sometimes I need to sample a new image from a raw image that can be represented by conventional camera models. That's why there is a third sampler, CameraModelRotation, which accepts two camera models, one for the raw image, and the other for the sampled image.
As for the purpose of this newly created sampler. I believe we can revise the CameraModelRotation` and achieve the functionalities you need.
Specifically, you need to sample a bunch of pinhole images from a fisheye image, this can be done in the user code where every pinhole image has a dedicated sampler. If you feel that is not efficient, because sampling all the pinhole images in one go seems to be faster. I suggest we have a general implementation of a new wrapper class, which can take multiple samplers as input, and perform 1-to-many sampling in one go. If we modify all the samplers and require that the sampling grid is precomputed and stored as member variables, we can gather these grids in the wrapper class and merge them into a new grid. Then use the merged grid to do the sampling. This implementation will make all the available samplers become usable for 1-to-many sampling.

For the half-pixel shift. I think it is the correct way to specify pixel center locations, under our new pixel coordinate definition.


xrWaitFrame: pvrResult failure [-1]

ANY ISSUE FILED WITHOUT THE INFORMATION REQUIRED BELOW WILL BE CLOSED WITHOUT BEING LOOKED AT. NO EXCEPTIONS.
Describe the bug
A clear and concise description of what the bug is.
Always attach (upload, do not copy/paste) the log file that can be found at %LocalAppData%\pimax-openxr\logs or opened from the PimaxXR Control Center app.
Environment

Application/Game and version:
Version of Pitool or Pimax client:

To Reproduce
Steps to reproduce the behavior:

Run '....' game
Enable option '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.

This is already fixed in the next version that will be released at TBD date.
Thanks.

Hi, I am trying to get the best fps for DCS. I download Open Composite and PimaxXr.  - I have an issue when loading some modules and Multiplayer.  The Huey and the mig 29 work like a dream, but the more complicated ones crash when they hit the pre-loading world stage.  This also happens with all of multiplayer. The crash happens when you spool in and the world starts to draw.

Wow... I didn't even write the bug yet. 😮


Setup Dockerhub Credentials

Background
For the sake of development, I've set up our fork to build to my personal dockerhub. After #6 has been completed, we need to ensure that we configure the proper secrets and variables so that the GithubAction can be run on AMPL repo.

After working with Jessica, this has been resolved


[BUG] Frozen Caress turns off after a rest

Less of a bug maybe more of an FR? But Frozen Caress makes a lot of sense as an "always on" type ability. Maybe this should be a setting toggle, but I'd rather it stay on until I toggle it.

This seems consistent w/ other abilities that cost an action so I'll leave as is.


drop issue

: drop dup - + ;
implements (a b -- a) rather than (b -- )
it would fail on a stack containing only 1 element.

I don't see how it would cause a problem.  It would just harmlessly add zero to the memory location above the stack.

The memory location above the stack could be special memory that should not be read or written to.
It would be safer to zero the element to be dropped and add it to some byte read from a safe location and then written back there.

Sure, if this was some production C++ code then an out-of-bounds memory read would obviously be an issue.  I think everybody can understand that.
In the context of a code-golfed assembly program I think it's safe to assume that the stack is in its explicitly-placed location.
That said, I suspect...
: drop sp@ ! ;

...would work fine too.

Oh; that's nice! Just overwrite the item to be dropped with itself first.
I like it.


equivalent of openapi allowReserved?

In openapi spec you can mark a query parameter as allowReserved: true which lets it contain parentheses and such.
https://spec.openapis.org/oas/v3.1.0#fixed-fields-9
is there a way to specify that in fern?  I tried the obvious but got
Unexpected key
Encountered unexpected key allowReserved

and
Unexpected key
Encountered unexpected key allow-reserved

Hey @joelgrus, we don't support this in the spec because we enable this by default. The clients will url encode the query parameters before sending them off to the backend

@joelgrus per Zach's reply, good to close this issue?


[React Version] Design Page UI Fix

In response to issue: #1219
Preview
https://user-images.githubusercontent.com/72697074/156103992-13c791ef-83dd-465e-a60c-00b04b232320.mp4

I have changed it to template for the images. Please check


[Definition] Fail when installing in frozen mode & gemspec deps have changed

Closes #5264

[x] Specs

I got interested in this test failure.
Can this be it?
Bundler::ParallelInstaller::SpecInstallation now needs to forward #full_name to its @spec's #full_name:
def full_name
  @spec.full_name
end

Here's a Specification with #full_name: https://github.com/bundler/bundler/blob/master/lib/bundler/remote_specification.rb

Rebased and added a spec, but this is still breaking something existing in the deploy spec

Wahoo, this should finally work! Please carefully review the changes to Path -- they're the only thing I'm scared of here, @indirect .

These changes look pretty reasonable to me. With passing tests, I'm r+ on this.

@bundlerbot r=indirect


Fix/prevent losing selected view

Problem:
When the user edits the source code in the code editor, we'd lose the selections.
This started happening when we introduced hash-based (not printed to the code) UIDs. When the source code of a JSX Element changes, their hash changes, which means the uid will also change, which means their TemplatePath changes.
This would lead to selections (still pointing to the old TemplatePath) become invalid and deleted.
Fix:
We already had a mechanism to filter out nonexistent TemplatePaths from selections and highlights. I've changed that mechanism so that instead of filtering out the lists, I try to update the old TemplatePath to the new TemplatePath. This only works for changes where the parent element doesn't lose its TemplatePath. If the parent path can still be found in the source code, I try to find a template path at the same child index as the previous selection. So if you are editing the 2nd child of a View, the code will try to select the second child using the newly parsed uids instead of the old ones.
Commit Details:

Added findMatchingTemplatePath that uses the childIndex of the old parent to try to find the edited element in the new parent
it only works if the parentPath remains the same
using TemplatePathArrayKeepDeepEquality to not change the selected views array if I don't have to (the performance regression tests caught me blowing the template paths, yay for tests)
Instead of stripNulls, I use flatMap and a helper function that returns an optional result wrapped in an Array. I am also utilizing the new Typescript tuple types, so instead of Array<TemplatePath> (which can have any number of elements), I could type  it as [] | [TemplatePath] (so empty array or an array with a single element) which to me reads much better as an optional, and doesn't allow code which would return an array with multiple elements. I actually quite like this!

Note:
I started out by looking at using the cursor position and highlight the edited code range, but unfortunately the highlight ranges use uids and not template paths. For the full template paths we need the spy run at the end of the dispatch function. I didn't want to add temporary state to the dispatch function (something along the lines of "select this uid once the spy finishes") and I looked for an alternative solution instead.

This looks good to me but potentially expensive - have you checked that this doesn't cause a performance regression when typing?

FYI removeNonExistingViewReferencesFromState (which I modified) runs at the end of the dispatch block – for every single action!
However, I don't think performance is a concern, I essentially replaced a single array walkthrough (filter) with ~6 walkthroughs (a flatmap, two filters, two findIndexes and the keep equality call). But these arrays are usually very short (selectedViews is usually 0 or 1 long, allPaths is almost never longer than 100) so I'm not worried. The actual comparisons are always TP.pathsEquals which is pretty fast as well.

However, I don't think performance is a concern, I essentially replaced a single array walkthrough (filter) with ~6 walkthroughs (a flatmap, two filters, two findIndexes and the keep equality call). But these arrays are usually very short (selectedViews is usually 0 or 1 long, allPaths is almost never longer than 100) so I'm not worried. The actual comparisons are always TP.pathsEquals which is pretty fast as well.

That's quite a lot of intermediate arrays, we could probably avoid some of that by using mapDropNulls instead of Array.flatmap because it's designed for the case of filtering and transforming in one step.

This looks good to me but potentially expensive - have you checked that this doesn't cause a performance regression when typing?

Could we put a performance test in place so we can establish a baseline and also reason about it with (at least some) data?

I've done some performance measurements with our standard large stress test project, and based on the measurements I've pushed a new version of the function that removes all array filtering. This new version +-5% takes the same amount of time than the original function on master (whereas my previous array filtering method was about 2x slower)

I've done some performance measurements with our standard large stress test project, and based on the measurements I've pushed a new version of the function that removes all array filtering. This new version +-5% takes the same amount of time than the original function on master (whereas my previous array filtering method was about 2x slower)

Thanks for doing this!


chore: Back to SVM default config (do not merge)

The purpose of this PR is to be able to see the diff between the default svm config and the escape config
⚠ DO NOT MERGE

I close this because we won't merge


Allow users to overlay multiple layers in 1 panel

I want to see Dee and Dey together in a single panel, like this.

The builder interface at https://gramener.com/comicgen/ should support multiple layers

Feedback on https://code.gramener.com/tejesh.p/comicogram/commit/de073cf0b59719b19ff49c1f77d01cdb517d03d7
Characters:

Change existing characters
Move characters only as a whole, by default
Preserve aspect ratio when resizing
Split characters into their parts
Add new characters -- and multiple instances of the same character in a panel
Delete characters from a UI, not just keyboard
Add mirror as an option
Undo feature

Speech bubbles:

Speech bubble text should be in the center
Allow selecting text inside the speech bubble and move it
Increase / decrease font size
Choose font for speech bubble
Allow bold letters
Allow centering of text
Allow Ctrl-Right and Ctrl-Shift-Right to select next word
When typing, pressing Del should delete the letter to the right, not the text object itself


Hi~ May I ask if there is any code related to the paper “geometric images” ？

Hi~ May I ask if there is any code related to the paper “geometric images” ？

Thanks for your interest.  Unfortunately the "geometry images" code is unavailable.

https://users.csc.calpoly.edu/~zwood/teaching/csc570/final07/dalum_gzipkin/

https://users.csc.calpoly.edu/~zwood/teaching/csc570/final07/dalum_gzipkin/

It helps me a lot， thank you very much！


fix: gruvbox theme with solaire-mode

I believe that doom-gruvbox supports solaire, which means that the background colors are swapped. This PR adds the doom-gruvbox theme to the list of supported solaire themes.

Good catch. Thanks for the help!


Use 2 UDP ports for sending and receiving data

Hello,
I am wondering if it is possible to setup mavsdk with a UDP connection where messages are received on one localhost::udp tuple and sent to another localhost::udp tuple.
Quick explainer: the method we used to go with in OpenHD has always been:
On the ground unit,

listen for messages from the Ground controll application on one udp localhost port
send messages to the ground controll application on another udp localhost port.

So for example, the ground controll application listens on localhost::16550 and sends data to localhost::16551
However, I cannot see a way to configure mavsdk to listen and send to different udp ports.
Since the send udp port is automatically added by using the address and port of a received packet.
Best regards,
Constantin

Sounds like you have a proxy that sends to localhost:16550 and receives on 16551, right? And I'm guessing your proxy then sends to/receives from the drone with wifi-broadcast? I really don't know the setup, I just read about wifi-broadcast a while ago :innocent:.
But if it is like this, whenever MAVSDK receives mavlink packets from your proxy (which in turn receives them from the drone), it will discover it as a drone, and it will start answering to it. I don't think you need to change anything in MAVSDK :thinking:.
What am I missing there?

Yes, that is correct.
The problem is that mavsdk receives packets from localhost::16551 and then discovers the drone (nice ;) ) but since the communication port back is automated (it is set to the address::port tuple it gets from the received udp packets) it then sends data back via localhost::16551 instead of localhost::16550
Maybe we also have a worm somewhere how we did the mavlink forwarding all the time - but if the proxy (so to say) and the ground controll with mavsk are both running on the same system, rn the communication can only be in one direction.
If the proxy had its own ip then it would of course be no problem - as an example, how I think it is intended from mavsdk:
Proxy: has IP <IP_ADDRESS> and listens on 14550
And sends to <IP_ADDRESS>:14550
And mavsdk in turn then:
Listens on <IP_ADDRESS>:14550 - and as soon as it gets a udp packet it knows it can send to <IP_ADDRESS>::14550 for communication back.

For a more detailed explanation: The routing setup is simple:
(Flight Controll,own mavlink sys id) <-> (OpenHD Air, own sys id) <-> (OpenHD Ground, own sys id)
So via the OpenHD ground unit, one can send and receive mavlink messages to FC, Air and Ground by mavlink sys id.
And the stream QOpenHD / QGroundControll gets from the ground unit (in our sense, it only makes sense to connect the ground controll application to the ground unit, either running directly on it or with an external device, like phone) therefore contains multiplexed mavlink messages from FC, OpenHD Air and OpenHD Ground.
Discovery of the systems with mavsdk works flawlessly (mavlink in). How to communicate back I am still unsure.

any advice ?

But in a nutshell:
rn I'd need a function like this in mavsdk:
// expects incoming messages at listenIp::listenPort
// and sends messages out to sendIp::sendPort
ConnectionResult add_udp_connection(
        std::string listenIp,
        int listenPort,
        std::string sendIp,
        int sendPort)

but mavsdk as a "feature" wants to free me from the hustle of manually specifying the sendIp::sendPort :
https://github.com/mavlink/MAVSDK/blob/main/src/mavsdk/core/udp_connection.cpp#L235
Which r.n. I cannot use.

Yeah it does not support it at the moment, so you'd have to implement that feature.
The thing is that it seems very weird to me, so I was trying to understand to see if there is not a way to make it work like it's intended :sweat_smile:.
Out of curiosity, how do you connect QGC? Did you modify QGC such that it uses two different UDP sockets to receive and send?

Yeah it does not support it at the moment, so you'd have to implement that feature.
The thing is that it seems very weird to me, so I was trying to understand to see if there is not a way to make it work like it's intended sweat_smile.

jup, I understand that. R.n i am trying to figure out how to change OpenHD in this regard, not mavsdk ;)
Especially since the following would kinda be the same, and works:

Run the PX4 FC emulator on machine 1
start mavsdk on machine 1 (the same machine).
And then the FC emulator and mavsdk communicate on the same UDP port, but with different send/receive IP addresses, right  ?

Out of curiosity, how do you connect QGC? Did you modify QGC such that it uses two different UDP sockets to receive and send?

It is a while,  i think i never checked if sending messages from QGroundControll works, only if messages show up in QGroundControll console.

start mavsdk on machine 1 (the same machine).
And then the FC emulator and mavsdk communicate on the same UDP port, but with different send/receive IP addresses, right ?

Well if they run on the same machine, they should rather have the same IP (localhost), but use different ports 😅

Well, that is exactly the thing - how do the examples work then (the mavsdk examples that use px4 emulator) ;)

Say you run SITL on your computer. SITL sends UDP to localhost:14540 from some ephemeral port. MAVSDK listens on 14540, and therefore receives the messages coming from SITL. When it does, then it takes the ephemeral port it sees in those messages, and uses it to send messages back to SITL.

So I managed to change OpenHD in this regard.
No idea why I had such a hard time wrapping my head around, but now it works the following:
OpenHD binds port <IP_ADDRESS>:14551 and listens on <IP_ADDRESS>:14550
AND
instead of using sendto() with a unbound port (which then in turn means the sender port can be anything) messages are sent with sendto() from the bound port (the same that is used for listening).
So messages from OpenHD to mavsdk go the following:
OpenHD (out) via 127:0:0:1:14551 sent to 127:0:0:0:1:14550
So when mavsdk receives the first message, the sender address::port is 127:0:0:1:14551 and mavsdk can send the messages back to 127:0:0:1:14551.

Yeah that seems better. So it works now?

Yes, this issue can be closed.
Here is some examle code:
https://github.com/Consti10/wifibroadcast/blob/f1769607769e4b3febc4d0966123da5706494adf/src/HelperSources/SocketHelper.hpp#L258

A feature where one can add a customized connection (aka a class that just provides the apropriate callbacks) would be nice though.
Dummy code:
class CustomConnection : public mavsdk::Connection{
// has a custom send and receive imlementation
}

mavsdk::add_custom_connection(Connection customConnection)

In general, I am a bit divided r.n how much benifit mavsdk provides to us in its "public api" form.
Since it is really easy to run into things where the public api hides away things that we'd need.
As an example, mavsdk does ping messages but does not expose the result of these ping messages via the public api. Of course, one could add the proper public api code, but that is not the only thing I already ran into.

A feature where one can add a customized connection

I maintain that using one socket to receive and one socket to send seems a bit weird to me, I have never seen UDP used like that :sweat_smile:. Now you're right that MAVSDK could have some kind of add_connection(Connection connection) interface, so that you could use whatever you want. Happy to review a PR, if you feel like doing that :blush:.

In general, I am a bit divided r.n how much benifit mavsdk provides to us in its "public api" form.

To be fair, in C++, you have the MavlinkPassthrough module that allows you to do raw mavlink. It cannot really get lower level than that :sweat_smile:.


Error deleting a VM

Created two VMs from a fedora-rawhide image, and got the following trying to delete the second one:
% krunvm delete fedora-f37
error unmounting container fedora-working-container-1: container not known
buildah returned an error:

There is nothing below, i.e. if there was an actual error from buildah, it is not shown.
It is possible the error message was different the first time, but unfortunately, I closed the corresponding terminal window.

The problem might be related to having multiple "fedora" VMs at the same time.
Setup of a Fedora 35 VMs, while I have a Rawhide microvm defined.
% krunvm create --name f35 fedora:35
Resolving "fedora" using unqualified-search registries (/opt/homebrew/etc/containers/registries.conf)
Trying to pull quay.io/fedora:35...
Trying to pull docker.io/library/fedora:35...
Getting image source signatures
Copying blob 623fc6c8f399 done
Copying config 775b4cdd6b done
Writing manifest to image destination
Storing signatures
microVM created with name: f35

% krunvm  changevm f35 -v /Users/ddd:/ddd --mem 4096 --cpus 4
f35
 CPUs: 4
 RAM (MiB): 4096
 DNS server: <IP_ADDRESS>
 Buildah container: fedora-working-container-1
 Workdir: /root
 Mapped volumes: {"/Users/ddd": "/ddd"}
 Mapped ports: {}

The first run sort of works, but with a weird error about /var not existing:
% krunvm start f35 /bin/bash
[root@f35 ~]# dnf install -y dmesg
Fedora 35 - aarch64                             957 kB/s |  75 MB     01:19
Fedora 35 openh264 (From Cisco) - aarch64       1.0 kB/s | 2.5 kB     00:02
Fedora Modular 35 - aarch64                     815 kB/s | 3.2 MB     00:04
Fedora 35 - aarch64 - Updates                   906 kB/s |  30 MB     00:33
[Errno 2] No such file or directory: '/var/cache/dnf/metadata_lock.pid'
Failed to store expired repos cache: [Errno 2] No such file or directory: '/var'
[root@f35 ~]# exit
exit

The second run does shows an error similar to what I had with delete:
% krunvm -v start f35
error unmounting container fedora-working-container-1: container not known
buildah returned an error:

The container indeed does not show up for buildah:
% buildah --root /Volumes/krunvm/root --runroot  /Volumes/krunvm/runroot containers
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
35038b6e9a92     *     f8a1a9e13d62 registry.fedoraproject.org/fe... fedora-working-container
c3e1d8d70c8c     *     585393df054a docker.io/library/debian:latest  debian-working-container
e90f078efb2d     *     bad148f8963f docker.io/library/ubuntu:latest  ubuntu-working-container

Right after the first create, the container is there:
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
35038b6e9a92     *     f8a1a9e13d62 registry.fedoraproject.org/fe... fedora-working-container
c3e1d8d70c8c     *     585393df054a docker.io/library/debian:latest  debian-working-container
e90f078efb2d     *     bad148f8963f docker.io/library/ubuntu:latest  ubuntu-working-container
d1f672d2d174     *     775b4cdd6b58 docker.io/library/fedora:35      fedora-working-container-1

This is not systematic. I tried again, this time having another window with a watch for the list of containers, trying to see when it was destroyed.  I could start the VM multiple times, and I could delete it successfully.


chore: fix broken storybook

Also updated to the latest version. Apparently, adding the forked history package broke it.

PR Storybook available here


Add a security policy

Hello 👋
I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@andy53) has found a potential issue, which I would be eager to share with you.
Could you add a SECURITY.md file with an e-mail address for me to send further details to? GitHub recommends a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.
Looking forward to hearing from you 👍
(cc @huntr-helper)

https://github.com/zenml-io/zenml/blob/main/CONTRIBUTING.md#-reporting-a-vulnerability explains our vulnerability reporting process and lists an email. Thanks for the pointer to the Github recommendation, too. We'll look into that.

Closing this following the PR listed above. I trust @Andy53 will be in touch.


Re-add nth-check Yarn Resolution for CVE-2021-3803

Description 📝

Re-adds a resolution for nth-check for CVE-2021-3803
I removed this in #8587 unintentionally, my fault!

How to test 🧪

Rerun yarn dev and check Cloud Manager in general

@mjac0bs Not sure what brought it to Banks's attention, but it looks like Dependabot did notice the change and created an alert (though I'm not sure if we get any kind of notification beyond that)


Unused variable detection?

Why is this considered fine?
<?php

class Test {

    function example() {
        $unusedVar = time();
    }

} # class

I would expect any case where a non-reference variable takes a value, and the scope ends with out the variable appearing again in any statement to result in either a "unused variable" or "unused assignment". The unused assignment may be a case of the variable intending to be a reference (but not being one), typo, or consequence of another undetectable error.

Phan currently checks for NoOp Variables, but only of the following form.
function f() {
    $v;
}

and doesn't track variables to make sure they're used eventually. That'd be a nice feature to add.

Misc thoughts

To start off with the simplest possible code, check if a variable is defined but never used. (As well as checking that it was never a reference or assigned by reference (left or right hand side (var/expr) of visitAssignRef)

This avoids edge cases in analyzing for loops, etc.

Superglobals ($_POST, etc.) are an exception

Can be moved to a plugin or in the parse phase

Will need to know the types of Variables, in order to figure out if an instance method call is creating references or not

Try this at the statement level

This might be solveable by keeping a use count associated with Phan\Language\Element\Variable, starting from the first time it was used (Internal, or external via [string $varName => bool $wasReferenced]

Foreach (array as $key => $value) can also create variables

list($x, $y, 'key' => $z) = expr can also create variables

I have a plugin that checks for unused variables if someone is interested. Support for references are very limited.

Sounds interesting

https://github.com/mattriverm/PhanUnusedVariable
I uploaded it sort of "as is". I've been running it against a big sloppy codebase and it has grown organically into what it is now. It's in need of a cleanup but I'm limited on time.
I have fixed all the false positives in the codebase I've been running it against (and that does not contain a lot of reference use). It is very hard to find false negatives though...


K3OS AWS AMI Fails to boot

Version (k3OS / kernel)
Followed steps from v0.11.0-rc1, k3os/package/packer/aws/README.md
But gives me v0.10.2 I believe.
Architecture
arm64 - a1.large
Describe the bug
When I boot the created ami, it fails to initialize, I'm unable to SSH in.  When I am able to get the System Log via AWS Console, I see the following:
++ TARGET=/run/k3os/target
++ source /usr/lib/os-release
+++ NAME=k3OS
+++ VERSION='k3OS v0.10.2'
+++ ID=k3os
+++ ID_LIKE=alpine
+++ PRETTY_NAME='k3OS v0.10.2'
+++ VERSION_ID=v0.10.2
+++ HOME_URL=https://k3os.io/
+++ SUPPORT_URL=https://k3os.io/
+++ BUG_REPORT_URL=https://github.com/rancher/k3os/issues
+++ ISO_URL=https://github.com/rancher/k3os/releases/download/v0.10.2/k3os-arm64.iso
++ setup_mounts
++ mkdir -p /run/k3os/target
++ mount -L K3OS_STATE /run/k3os/target
[    4.099329] EXT4-fs (nvme0n1p1): recovery complete
[    4.103783] EXT4-fs (nvme0n1p1): mounted filesystem with ordered data mode. Opts: (null)
++ '[' -e /run/k3os/target/k3os/system/growpart ']'
++ setup_k3os
++ '[' -e /run/k3os/target/k3os/system/k3os/current/k3os ']'
++ return 0
++ setup_kernel_squashfs
+++ uname -r
++ KER_SRC=/.base/k3os/system/kernel/5.0.0-43-generic/kernel.squashfs
+++ uname -r
++ KER_DEST=/run/k3os/target/k3os/system/kernel/5.0.0-43-generic/kernel.squashfs
++ '[' -e /.base/k3os/system/kernel/5.0.0-43-generic/kernel.squashfs ']'
++ setup_init
++ '[' -e /run/k3os/target/sbin/init ']'
++ mkdir -p /run/k3os/target/sbin
mkdir: cannot create directory ‘/run/k3os/target/sbin’: File exists
+ rescue
+ echo ERROR 'Something went wrong, run with cmdline k3os.debug for more logging'
ERROR Something went wrong, run with cmdline k3os.debug for more logging
+ echo Dropping to shell
Dropping to shell
+ exec bash
bash: cannot set terminal process group (-1): Not a tty
bash: no job control in this shell

To Reproduce
Follow steps from v0.11.0-rc1, k3os/package/packer/aws/README.md
Launch created AMI.
Check System Logs when it fails to initialize.
Expected behavior
Should boot at least to a point where I can debug the config.yaml
Actual behavior
AMI fails to boot, AWS Console reports "1/2 checks passed" in status, and all ports are closed.
Additional context
Attempted to change the mkdir statement via packer, but it seems that had no effect.

Possible fixed by #551, validating.

Hmm, unrelated to #551 but you do need to edit the packer template to ensure it has the correct ISO URL:
diff --git a/package/packer/aws/template-arm64.json b/package/packer/aws/template-arm64.json
index 476c6fb..affcc5a 100644
--- a/package/packer/aws/template-arm64.json
+++ b/package/packer/aws/template-arm64.json
@@ -55,9 +55,9 @@
   "variables": {
     "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
     "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
-    "iso_url": "https://github.com/rancher/k3os/releases/download/v0.10.2/k3os-arm64.iso",
-    "k3os_version": "v0.10.2",
-    "region": "us-east-1"
+    "iso_url": "https://github.com/rancher/k3os/releases/download/v0.11.0-rc2/k3os-arm64.iso",
+    "k3os_version": "v0.11.0-rc2",
+    "region": "us-west-2"
   }
 }

diff --git a/package/packer/aws/template.json b/package/packer/aws/template.json
index 1c7c704..f1895b6 100644
--- a/package/packer/aws/template.json
+++ b/package/packer/aws/template.json
@@ -55,9 +55,9 @@
   "variables": {
     "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}",
     "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
-    "iso_url": "https://github.com/rancher/k3os/releases/download/v0.10.2/k3os-amd64.iso",
-    "k3os_version": "v0.10.2",
-    "region": "us-east-1"
+    "iso_url": "https://github.com/rancher/k3os/releases/download/v0.11.0-rc2/k3os-amd64.iso",
+    "k3os_version": "v0.11.0-rc2",
+    "region": "us-west-2"
   }
 }

Linux ip-172-31-35-34.us-west-2.compute.internal 5.4.0-37-generic #41 SMP Fri Jun 19 23:12:44 UTC 2020 aarch64 GNU/Linux
ip-172-31-35-34 [~]$ cat /etc/os-release
NAME="k3OS"
VERSION="k3OS v0.11.0-rc2"
ID=k3os
ID_LIKE=alpine
PRETTY_NAME="k3OS v0.11.0-rc2"
VERSION_ID="v0.11.0-rc2"
HOME_URL="https://k3os.io/"
SUPPORT_URL="https://k3os.io/"
BUG_REPORT_URL="https://github.com/rancher/k3os/issues"
ISO_URL="https://github.com/rancher/k3os/releases/download/v0.11.0-rc2/k3os-arm64.iso"
ip-172-31-35-34 [~]$


[Go] Compute package closed to adding custom functions.

Describe the usage question you have. Please include as many useful details as  possible.
Hey!
I've tried to use the Go arrow module, specifically the compute package. It contains some handy "infrastructure" for defining functions, kernels for them, matching the right kernels to the type, etc.
However, it seems like adding custom functions to a FunctionRegistry as a consumer of the module is impossible?
Implementing the Function interface requires returning an exec.Kernel - which is a struct from the internal arrow/compute/internal/kernels package, so that's impossible. Same goes for reusing existing utility structures, like the ScalarFunction.
Could you please explain the reason for the API disallowing custom functions (or, probably, showing me what I'm missing to define custom functions)? Thanks a lot in advance!
Component(s)
Go

@zeroshade I hope you don't mind the direct tag, but I've seen your name in most of the compute packages commits, would you be able to help me here?

Hey @cube2222 no worries about the tag!
So, part of disallowing the external custom functions like that was just overlooking it as the interface grew and expanded while trying to keep people from shooting themselves in the foot. Another part of it was to try to encourage people to contribute functions back to the repo, lol.
But you're right, I should make the top level interfaces like exec.Kernel externally accessible to allow registering more custom functions like that. I'll add that to my list of things to do, but if you wanna take a stab at it feel free to file PRs and it'll auto-tag me to review them!

I think that's a fine solution, ideally I shouldn't have to make many changes to the current structure of those interfaces and If I do they are interfaces which should be easy to use without breaking. Hopefully I don't regret this statement in the future :laughing:


improvement Optimize the materialized view hint info when explain

Proposed changes
Optimize the explain materialized view info, add double horizontal dividing line between MATERIALIZATIONS and
STATISTICS. Maybe think rewrite fail becauseplaned with unknown column statistics, actually is rewrite successfully.