Risc-v Support is missing

Please add support for Riscv-v based systems

@apcameron We don't have any RISC-V systems at handto develop on, but we are open to contributions in that space
By the way, when you say support are you talking about 1) just having an rpm/deb package for RISC-v, 2) Support CPU performance counters for RISC V?

It does not compile on a Risc-v System.
Support CPU performance counters for RISC V? is missing.

I was able to force it to compile with the patch below but the counters etc are missing.
diff -Naur a/hbt/src/common/System.h b/hbt/src/common/System.h
--- a/hbt/src/common/System.h   2024-01-21 15:26:26.940486370 +0000
+++ b/hbt/src/common/System.h   2024-01-21 22:22:36.713134358 +0000
@@ -445,6 +445,14 @@
   asm volatile("mrs %0, cntvct_el0" : "=r"(tstamp));
   cpu = getCpu();
   return tstamp;
+#elif defined(__riscv)
+inline TimeStamp rdtscp(CpuId& cpu) {
+  TimeStamp tstamp;
+  // Use the RDCYCLE instruction for RISC-V.
+  asm volatile("rdcycle %0" : "=r"(tstamp));
+  cpu = getCpu();
+  return tstamp;
+
 }
 #endif

@apcameron We don't have any RISC-V systems at handto develop on, but we are open to contributions in that space By the way, when you say support are you talking about 1) just having an rpm/deb package for RISC-v, 2) Support CPU performance counters for RISC V?

Why don't you try using QEMU to emulate a Risc-V environment.
See the example here

Hi @apcameron, thanks for sharing the fix to the build, we had to add a
similar one for Arm architecture too at the same spot.
Would you be comfortable contributing that to dynolog? please see
Contributing.md for help and let me know any questions you may have.
Regarding hardware counters, the hbt library is where the counter support
should go. I believe commonly defined counters like instructions and cycles
should work out of box. These are defined in Linux perf event subsystem and
we use them directly. Let me know if this is not the case and we can fix
it.
Thanks,
Brian
On Sun, Feb 4, 2024 at 1:07 PM apcameron @.***> wrote:

@apcameron https://github.com/apcameron We don't have any RISC-V
systems at handto develop on, but we are open to contributions in that
space By the way, when you say support are you talking about 1) just having
an rpm/deb package for RISC-v, 2) Support CPU performance counters for RISC
V?
Why don't you try using QEMU to emulate a Risc-V environment.
See the example here
https://discourse.ubuntu.com/t/ubuntu-installation-on-a-risc-v-virtual-machine-using-a-server-install-image-and-qemu/27636
—
Reply to this email directly, view it on GitHub
https://github.com/facebookincubator/dynolog/issues/215#issuecomment-1925914391,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABUZ7ZDCHTZ3K4YZ72CHKEDYR72BVAVCNFSM6AAAAABCFEKLZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVHEYTIMZZGE
.
You are receiving this because you commented.Message ID:
@.***>

Hi @apcameron, thanks for sharing the fix to the build, we had to add a similar one for Arm architecture too at the same spot. Would you be comfortable contributing that to dynolog? please see Contributing.md for help and let me know any questions you may have. Regarding hardware counters, the hbt library is where the counter support should go. I believe commonly defined counters like instructions and cycles should work out of box. These are defined in Linux perf event subsystem and we use them directly. Let me know if this is not the case and we can fix it. Thanks, Brian
…
On Sun, Feb 4, 2024 at 1:07 PM apcameron @.> wrote: @apcameron https://github.com/apcameron We don't have any RISC-V systems at handto develop on, but we are open to contributions in that space By the way, when you say support are you talking about 1) just having an rpm/deb package for RISC-v, 2) Support CPU performance counters for RISC V? Why don't you try using QEMU to emulate a Risc-V environment. See the example here https://discourse.ubuntu.com/t/ubuntu-installation-on-a-risc-v-virtual-machine-using-a-server-install-image-and-qemu/27636 — Reply to this email directly, view it on GitHub <#215 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUZ7ZDCHTZ3K4YZ72CHKEDYR72BVAVCNFSM6AAAAABCFEKLZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVHEYTIMZZGE . You are receiving this because you commented.Message ID: @.>

I will leave it to your team to make the updates and validate that it works correctly.


Return expected non-json responses on OpenAPI 3.0

For OpenAPI 3.0 schemas, non-json responses are returned (without validation) if the content-type is of an expected type. Matches the behaviour of OpenAPI 2.0. Fixes #108.

To be merged.
Due to changes in fastapi (I guess) the unit testing currently fails for the main branch, I'll have to get things sorted before merging.


Correct the misleading links in the contribution guidelines

Most of the links in the contribution guideline are pointing to another  repository, which can be a misleading  tool for opensource newbies that rely on the guidelines, I  will  correct all these misleading  links.
kindly assign this to me

@Emilance GO Ahead

@Emilance Are you working on this?

can I work on this issue I will replace the misleading links and add some more details about the project.

@Purva2803 go ahead


Copied NPCs share actions until restart

When copying an NPC the copied NPC will then share actions with the original NPC, if you edit the actions for 1 NPC they will also edit for the other NPC too
I have only tested this with actions but I imagine equipment and other objects that are shared when copying will also replicate this behaviour

Fixed in 8939302cbedfe2432bb55bc29a30309c22948fe3


Entities not showing in Energy tab

System Health details
System Information

version
core-2024.9.2

installation_type
Home Assistant OS

dev
false

hassio
true

docker
true

user
root

virtualenv
false

python_version
3.12.4

os_name
Linux

os_version
6.6.46-haos

arch
aarch64

timezone
Australia/Sydney

config_dir
/config

Home Assistant Community Store

GitHub API
ok

GitHub Content
ok

GitHub Web
ok

HACS Data
ok

GitHub API Calls Remaining
5000

Installed Version
2.0.1

Stage
running

Available Repositories
1430

Downloaded Repositories
27

Home Assistant Cloud

logged_in
true

subscription_expiration
October 9, 2024 at 10:00

relayer_connected
true

relayer_region
ap-southeast-1

remote_enabled
true

remote_connected
true

alexa_enabled
true

google_enabled
true

remote_server
ap-southeast-1-0.ui.nabu.casa

certificate_status
ready

instance_id
2e9a21961ba34bf59fd72c897cb3fa01

can_reach_cert_server
ok

can_reach_cloud_auth
ok

can_reach_cloud
ok

Home Assistant Supervisor

host_os
Home Assistant OS 13.1

update_channel
stable

supervisor_version
supervisor-2024.10.0

agent_version
1.6.0

docker_version
26.1.4

disk_total
28.0 GB

disk_used
9.9 GB

healthy
true

supported
true

host_connectivity
true

supervisor_connectivity
true

ntp_synchronized
true

virtualization

board
green

supervisor_api
ok

version_api
ok

installed_addons
Matter Server (6.5.1), Advanced SSH & Web Terminal (19.0.0), Studio Code Server (5.17.1), AirCast (4.2.2), Duck DNS (1.18.0), AirSonos (4.2.2), Grafana (10.1.1), CEC Scanner (3.0), Terminal & SSH (9.15.0), Plex Media Server (3.6.0), Spotify Connect (0.13.0), Node-RED (18.1.1), File editor (5.8.0), Get HACS (1.3.1), Home Assistant Google Drive Backup (0.112.1)

Dashboards

dashboards
5

resources
8

views
24

mode
storage

Recorder

oldest_recorder_run
October 7, 2024 at 19:26

current_recorder_run
October 9, 2024 at 04:21

estimated_db_size
501.88 MiB

database_engine
sqlite

database_version
3.45.3

Checklist

[X] I have read the FAQ to see if there is a known solution to my problem.
[X] I have enabled debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..

Describe the issue
I have manually setup four power sensors.  The sensors are reading power, they can be displayed in the view with real time and accumulated values, but they will not show in the Energy tab.
The sensors have been setup with 0 standby power and nominal ON power only.  I have tried setting these up in YAML and in the GUI.  Initially, one of the sensors displayed for a few hours, but it was gone when i refreshed the following morning.
I've exhausted my options.
Reproduction steps

Install Powercalc

Add powercalc: to configuration.yaml

Manually create sensors using the GUI

Sensors fail to show in the Energy tab.

Initial focus is on Bathroom Heat sensor

What else can I do?
...

Debug logs
Full log was too big, abridged relevant lines below

2024-10-09 05:22:31.954 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=switch.bathroom_heat_1 entity_category=None, sensor_name=Bathroom Heat power strategy=fixed manufacturer= model= unique_id=pc_C9:96:48:47:7D:34_1_80)
2024-10-09 05:22:31.955 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.bathroom_heat_energy, source_entity=sensor.bathroom_heat_power, unit_prefix=k)
2024-10-09 05:22:31.956 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Bathroom Heat energy daily (entity_id=sensor.bathroom_heat_energy_daily)
2024-10-09 05:22:31.957 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Bathroom Heat energy weekly (entity_id=sensor.bathroom_heat_energy_weekly)
2024-10-09 05:22:31.958 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Bathroom Heat energy monthly (entity_id=sensor.bathroom_heat_energy_monthly)
2024-10-09 05:22:31.964 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_power to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:31.971 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_energy_daily to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:31.981 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_energy_weekly to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:31.989 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_energy_monthly to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:32.000 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.shelly1_34945470b818 entity_category=None, sensor_name=Back Deck lights power strategy=fixed manufacturer= model= unique_id=pc_509fd45a393bc566cb81a977b77d51a3)
2024-10-09 05:22:32.000 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.back_deck_lights_energy, source_entity=sensor.back_deck_lights_power, unit_prefix=k)
2024-10-09 05:22:32.001 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Back Deck lights energy daily (entity_id=sensor.back_deck_lights_energy_daily)
2024-10-09 05:22:32.002 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Back Deck lights energy weekly (entity_id=sensor.back_deck_lights_energy_weekly)
2024-10-09 05:22:32.002 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Back Deck lights energy monthly (entity_id=sensor.back_deck_lights_energy_monthly)
2024-10-09 05:22:32.007 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_power to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.013 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_energy_daily to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.022 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_energy_weekly to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.032 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_energy_monthly to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.042 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.shelly1_349454731004 entity_category=None, sensor_name=Courtyard Lights power strategy=fixed manufacturer= model= unique_id=pc_5140108ebcef7435d15a2aa1ccf5aa65)
2024-10-09 05:22:32.043 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.courtyard_lights_energy, source_entity=sensor.courtyard_lights_power, unit_prefix=k)
2024-10-09 05:22:32.044 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Courtyard Lights energy daily (entity_id=sensor.courtyard_lights_energy_daily)
2024-10-09 05:22:32.045 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Courtyard Lights energy weekly (entity_id=sensor.courtyard_lights_energy_weekly)
2024-10-09 05:22:32.046 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Courtyard Lights energy monthly (entity_id=sensor.courtyard_lights_energy_monthly)
2024-10-09 05:22:32.049 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_power to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.056 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_energy_daily to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.065 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_energy_weekly to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.072 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_energy_monthly to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.081 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=switch.brass_lamp_switch entity_category=None, sensor_name=Brass Lamp Switch Device Power strategy=fixed manufacturer=ikea model=TRADFRI control outlet unique_id=pc_bc:02:6e:ff:fe:fb:ca:02-1)
2024-10-09 05:22:32.081 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.brass_lamp_switch_device_energy, source_entity=sensor.brass_lamp_switch_device_power, unit_prefix=k)
2024-10-09 05:22:32.084 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.brass_lamp_switch_device_power to device e6775f7e6999fefa40524eb8b1e5e861
2024-10-09 05:22:36.358 DEBUG (MainThread) [custom_components.powercalc.sensors.power] light.shelly1_34945470b818: State changed to "off". Power:0.00
2024-10-09 05:22:36.359 DEBUG (MainThread) [custom_components.powercalc.sensors.power] light.shelly1_349454731004: State changed to "off". Power:0.00
2024-10-09 05:22:36.425 ERROR (MainThread) [homeassistant.components.binary_sensor] rpi_power: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 724, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1302, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/rpi_power/binary_sensor.py", line 53, in update
    value = self._under_voltage.get()
            ^^^^^^^^^^^^^^^^^^^^^^^

Diagnostics dump or YAML config
No response

Please make sure you understand the difference between power and energy, see https://docs.powercalc.nl/troubleshooting/faq/#what-is-the-difference-between-power-and-energy.
Powercalc always creates a power sensor, and optionally an energy sensor (depending on the toggle create energy sensor).
You can only add energy sensors to the energy dashboard, no power sensors.
You'll have to add them to the energy dashboard in Settings -> Dashboard  -> Energy under individual devices.
All energy sensors created by powercalc should be selectable there.
Might be good to verify if the energy sensor actually records values by looking under Developer tools.


Mangazure

Source name
Mangazure
Source link
https://www.mangazure.com
Source language
Turkish
Other details
No response
Acknowledgements

[X] I have checked that the extension does not already exist by searching the GitHub repository and verified it does not appear in the code base.
[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a meaningful title with the source name.
[X] I will fill out all of the requested information in this form.

This extension is still not added

Any progress?

Any progress on this?


get list of plans

Is possible to get a list of plans in file ifc?

Hi @alexucgit
We have officially released the new library components on September 20 2023. This library substitutes web-ifc-three and web-ifc-viewer. Both WIV and WIT will remain up, but they will be deprecated and won't be maintained any longer. You can find the new docs here.
All our efforts are going towards components now. The API is very similar, so I strongly suggest you make the leap and start using it. If you still face this issue with it, you can open an issue there and we'll take a look.


HTML repr with many data vars

What is your issue?
I've been working with Datasets with 1000+ data vars. The HTML repr is extremely slow.
My current solution is to change the config to use the text at the top of the notebook, and then kick myself & restart when I forget.
Would folks be OK with us falling back to the text repr automatically for, say, >100 data vars?

The html repr is actually quite heavy to load in the browser: it contains the text repr (as fallback for when the html/css is not fully supported) + the whole css + the whole html (including all the collapsed variable attrs and array reprs). I'm not surprised that it is very slow for that huge number of variables.

Would folks be OK with us falling back to the text repr automatically for, say, >100 data vars?

Yes or alternatively have an upper limit in the html repr itself, beyond which the number of included variables is truncated.
That is also a good use case for #8171: we could imagine some pagination or auto-expand solution with dynamic requests to the Python side.


Fixes spo listitem roleinheritance break docs option description formatting. Closes #3358

Fixes spo listitem roleinheritance break docs option description. Closes #3358
Contents

Fixes description on new line
Added new line at the end of the docs file (required to make --help option work properly)

Thanks @milanholemans!


feat: move credential handling responsibility to the proxy

Stacked PRs:

#403
#402
->#401
#400
#399
#398

feat: move credential handling responsibility to the proxy

closing in favor of https://github.com/GoogleCloudPlatform/java-docs-samples/pull/9690


Direction issue

hi.
i'm trying to use your script in a website i develop.
is there a way to tell the slide container to start on the right?
you can see what i did in this url: http://sodasites.co.il/bilderish/
its in Hebrew so look for the section that has some vertical stripes with numbers on it  :)
i want the slider to start with the stripe number one on the right.
right now it starts with stripe number 6 on the left
any help will be appreciated,
thanks

i'm using  scrollContainer: true
will it work?

In this case not. You may use then setWrapperTranslate method:
mySwiper.setWrapperTranslate($(window).width() - $('.swiper-slide').width());

But use appropriate selector instead of $('.swiper-slide') for this current slide

thanks!   i'll check it

it worked great
thank you!


Prototype pollution attack (merge.recursive)

A Prototype pollution attack caused by merge 1.2.0 with High rank has been disclosed recently at https://hackerone.com/reports/381194
Please see if it can be fixed

Thanks for the report, fixed it.

Thanks for the report, fixed it.

Thanks for the report, fixed it.


bannerwise, gandharva

This pull request was generated by the 'mq' tool
[test]
flake rate: 0.4
logical conflict every: 100
sleep for: 300s
[pullrequest]
requests per hour: 30
deps=[b,g]

/trunk merge


Topic redirect to inexistent topic crashes SS

Testing is simple:
  + test missing topic
  - ^topicRedirect(supercalifragilisticexpialidocious,hello) Test OK.

I got this issue a lot of times so far:
superscript/lib/topics/topic.js:280
            Common.walkReplyParent(reply._id, function (err, replyThreads) {

It's most likely a consequence of the conversation implementations. Will try to check if it happens in cases other than redirecting to a non-existent topic.

Fixed in 1c6ea3e


Out of band security error

The problem
Hey, I clicked the authorization link in the setup UI and I received this error even before selecting my account although I was logged in.
Access blocked: Nest’s request is invalid

You can’t sign in because Nest sent an invalid request. You can try again later, or contact the [developer](https://accounts.google.com/) about this issue. [Learn more about this error](https://support.google.com/accounts/answer/12379384)
If you are a developer of Nest, see [error details](https://accounts.google.com/).
Error 400: invalid_request

Then, when I clicked the error details I saw:
Error 400: invalid_request
The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method.
Request details: redirect_uri=urn:ietf:wg:oauth:2.0:oob flowName=GeneralOAuthFlow
[Related developer documentation](https://developers.google.com/identity/protocols/oauth2/resources/oob-migration)

What version of this integration (ha-nest-protect) has the issue?
Latest
What version of Home Assistant Core has the issue?
Latest
Device / Model
No response
Diagnostics information
No response
Home Assistant log
Logs
Copy/paste any log here, between the starting and ending backticks (`)

Additional information
No response

Looks like there's already an open issue
https://github.com/iMicknl/ha-nest-protect/issues/370

Duplicate of #105. TLDR: use the latest beta version of this integration.


Update emitter dependency to 0.4.0 and emit "version" dimension for all druid metrics

Emit "version" dimension for all druid metrics, not only query metrics. This is usable e. g. for split testing of two druid versions, when you want to compare them not only by query metrics like query/segment/time, but also by non-query metrics e. g. jvm/gc/count.

@pjain1 could you please review this, because the emitter library update involves your PR: https://github.com/metamx/emitter/pull/18. Just bumping version is enough or something else is needed?

just bumping the version should be enough 👍


GOG compatability

With the release of all three of the games on GOG, I was wondering if you would make a version compatible with the GOG versions of those games.

Classic Rebirth is needed for biorand to work, there are instructions available for that for RE 1. I don't think there are yet for RE 2, or 3. It is still recommended you use the versions available from https://biorand.net.


Using file:// in private area network

Hi
I've found on this documentation that the syntax 'file://' is disabled for safety reason.
But: We're trying to use the dashboard a bit more intense and want to refer to documents on our company network drives.
Our TFS is in a private network, you can't connect from the internet. So all the security things are checked with this reason.
Is there a possibility to re-enable the 'file://' link-protocol?
Thanks
TFS Version: 2018

Ok make no sense. All the browsers are blocking the protocol anyway....
Sorry for the question (can be deleted)


Integration tests timing out

Noobaa install times out and does not respond leading to timeout of Github action doing the integration test

the root cause of this was a problem with webhook configuration for Datashim as reported in #225. This has been fixed and the tests proceed normally


Landmark Attention support

Any thoughts on how difficult it would be to support inference on a model trained with landmark attention? Like Minotaur, Wizard or the base Llama landmark finetunes released recently, and I suppose more will come out, now that multiple repos support lora/qlora/gptq-lora training with landmark attention.
I haven’t compared results yet, but it sounds like landmark attention should be more effective with long contexts compared to the turboderp/alpaca_lora_4bit repo. Like the author, I found that that repo did “something”, and stopped generating gibberish beyond 2048 at least, but I’m not sure what the model learned. The landmark attention paper claims it can solve needle-haystack problems beyond the context length, which I couldn’t get the previous method to do.
Landmark apparently works with Oogabooga with remote code enabled.

The landmark attention paper claims it can solve needle-haystack problems beyond the context length, which I couldn’t get the previous method to do.

It does, but there are some issues with it:

I've yet to see a convincing application for it that sets it apart from vector databases or other more established techniques. You can find a needle in a haystack, but that's not the hard part, and it's not clear when it's useful outside of a test to see if you can find a needle in a haystack.
Landmark attention doesn't actually extend the useful context of a Llama model. The authors make this clear enough in the paper, even though in the abstract they call their method a "close approximation" of long-range attention. Rather, what the landmarks end up being is essentially a set of keys for a vector database built continually out of the longer context. During inference, a shorter context is constructed from the blocks whose landmarks received the most attention. So, it's still just retrieval, or at best a new take on retrieval. It's not really long-range attention.
The entire (short) context needs to be reevaluated for every new token because even with the landmark finetuning, Llama's positional encoding scheme is still limited to 2048 tokens. That means past keys and values can't be reused for subsequent inferences as they will be evaluated with different positional encodings for each new step, and the effects of that cascade through every layer of the model. At best you could cache the value projections in the first layer for a marginal speedup compared to no cache at all. So at least in the way the method extends pretrained models it's inherently slow. Maybe it could be re-imagined and re-engineered, but idk.
They frame the whole exercise as an attempt to get around the computational complexity of attention, but that's not what we actually need. Attention isn't that complex. In the single-token case it's linear, both in computation and memory requirements, not quadratic. If the model were capable of understanding the positional encodings for a long context you could easily go to 20k tokens for Llama-7B on a 24 GB GPU and still get useful speeds.

All in all I'm not keen on taking on the work of making this method fast (somehow, if it's even possible), until I've actually seen it being useful. And it would be a considerable rewrite. Enabling remote code isn't really an option because that remote code is meant to be injected into Transformers.

If it's just a fast way to stop models from outputting nonsense beyond 2048 by merging a LORA, maybe turboderp/alpaca_lora_4bit is just as good, and is fast with exllama's current approach (I think).
I haven't tried inference for the author's method outside the original repo (turboderp/alpaca_lora_4bit): were special inference changes required, and are they part of exllama? Would textgen need anything other than simply increasing the context length slider for inference using that method (though speed/VRAM would suck)?
I wish axiotl or the original alpaca_lora_4bit merged the modifications from turboderp/alpaca_lora_4bit. It'd make that method more popular, and with the right training data, maybe it actually works?
I eyeballed the loss from turboderp/alpaca_lora_4bit to see if I can get it to go lower with the bigger context while training. While the model can learn not to make it worse than 2048 context, it doesn't learn how to make it go lower. I tried feeding it obvious needle-haystack problems like the landmark attention paper does, but it didn't pick up on the correlation in my attempts. In theory though, I imagine it should, with enough data. Or maybe LORA isn't good enough for this.

Rather, what the landmarks end up being is essentially a set of keys for a vector database built continually out of the longer context. During inference, a shorter context is constructed from the blocks whose landmarks received the most attention. So, it's still just retrieval, or at best a new take on retrieval. It's not really long-range attention.

Wouldn't that still be better than looking up a vector database outside the LLM (egs.,  using sentence-based embeddings) and inserting the relevant text that into the LLM context? I think this is what current search methods like superbooga do. At least in the landmark approach they use attention to figure relevance out.

The entire (short) context needs to be reevaluated for every new token because even with the landmark finetuning, Llama's positional encoding scheme is still limited to 2048 tokens.

I haven't tried inference for the author's method outside the repo itself (turboderp/alpaca_lora_4bit): were special inference changes required, and are they already part of exllama?

The only change I made for inference in that repo was to use a preallocated cache, only I did it in a very hacky and breakable way to make it work with Transformers. ExLlama also uses the same kind of preallocated cache, but more elegantly. So it supports very long contexts as long as the model knows what to do with positional embeddings after position 2048.
As for that, though, I haven't gotten to LoRA support just yet. But if the output of that LoRA repo were merged into the FP16 base model, and then the combined model was quantized again, I don't see why it wouldn't work with ExLlama.
But I will be adding it soon, anyway. It's not really complicated. It's just that with QLoRA and GPTQ-LoRA coming out, I'm hesitating because I'm not sure what I should support first. It kind of depends what ends up being most popular. The downside of not building on Transformers is losing that plug-and-play compatibility with every new thing that comes out, so I have to prioritize with these things. And next on the list is multi-GPU matmuls that might give a big boost to 65B models on dual GPUs (fingers crossed). I'd like to get to 30 tokens/second at least.

While the model can learn not to make it worse than 2048 context, it doesn't learn how to make it go lower.

Yep. But I'm not sure if that changes eventually. It might simply come in phases, i.e. it might be easy to learn to ignore the distant past because the contribution from those past tokens is so disruptive, and then take longer for the much more subtle positive contribution to start showing.
It's really hard to say for certain, or maybe my understanding of ML just isn't deep enough, but it wouldn't surprise me if it would take more training than what originally went into the base model. After all, comparing 7B to 33B it's very clear that 33B is much better at long-range relationships even within the 2k context that both models work with. That could be because it has more layers and there's a convolutional aspect to how it "scans" the context. Or long-range relationships are inherently more complex and require more "circuitry" to comprehend.

Wouldn't that still be better than looking up a vector database outside the LLM (egs., using sentence-based embeddings) and inserting the relevant text that into the LLM context? I think this is what current search methods like superbooga do. At least in the landmark approach they use attention to figure relevance out.

Well, attention is still ultimately just a dot-product similarity search. I can see how using the same conditions for the search as is used for token-to-token attention could result in more relevant matches, but that still only makes it a more accurate vector database.
I do hope to see some promising results from it, though. There might be ways to speed it up, if it's actually a good method. I would like to see comparisons of perplexity vs context length, for instance. It should show predictions getting better the more context it has for any given example, without plateauing at 2048 tokens.

And next on the list is multi-GPU matmuls that might give a big boost to 65B models on dual GPUs (fingers crossed). I'd like to get to 30 tokens/second at least.

That's the main reason I use your repo right now BTW, so very much looking forward to it!

It might simply come in phases, i.e. it might be easy to learn to ignore the distant past because the contribution from those past tokens is so disruptive, and then take longer for the much more subtle positive contribution to start showing.
It should show predictions getting better the more context it has for any given example, without plateauing at 2048 tokens.

I want to keep trying to train it. I'll try landmark attention for reference too. From what you said, I should avoid the temptation to truncate and compare at less than 2048 context. The true test is crossing the limit of the normal positional encoder.

After all, comparing 7B to 33B it's very clear that 33B is much better at long-range relationships even within the 2k context that both models work with. That could be because it has more layers and there's a convolutional aspect to how it "scans" the context. Or long-range relationships are inherently more complex and require more "circuitry" to comprehend.

IIRC 33B and up was also trained on 40% more data than 13B and below. Maybe there is generally poor long-range context info in normal text data on the internet, so it needs both quantity and compute to make use of it. I would imagine cherry picking long conversations from shareGPT/Vicuna would guarantee some patterns beyond 2048 (but less than 4096 if using ChatGPT as a base), at least as a start. Maybe there is some good way to curate data with long-range context (other than deliberate needle-haystack).
Anyway, I think I have the answer for supporting landmark attention in this repo, at least for now. Thanks.

One thought I had would be to force it to do long-range attention by only giving it long-range information. You could just tweak the position IDs to spread the examples out. This would speed up training too, since you could pass 2048 tokens but they would look to the model as, say, the beginning and end of an 8192-token sequence, with nothing in the middle for it to get confused by. I'm thinking maybe you start by adding a little space randomly between sentences, and then gradually increase it.

That's a neat idea. I was thinking of randomly adding random text of varying lengths after the actual query (for instruct-tuning). But if we just offset the positional data somehow, that's way cooler. It's on-the-fly data augmentation for context training.

I have not tried to train a landmark attention with normal 4-bit lora (eg. alpaca_4bit). It would certainly go faster but it would train only 2 layers vs all of them Are all the layers needed to be trained with those landmark tokens? Would it be faster because less layers are modified? Or would it just not work.

I almost always train all layers of I can. For landmark, try and see? alpaca_4bit does a few odd things like defaulting to short context, default training only 2 layers, not using a rolling context (which further discourages long context learning imo), but you can revert all that without too much effort.

Merging adapters to all layers certainly makes inference slower.

Is that a landmark-related statement? I guess I normally always merge to fp16 and requantize and don't notice a performance difference (non-landmark).

alpaca_4bit does a few odd things like defaulting to short context, default training only 2 layers, not using a rolling context (which further discourages long context learning imo), but you can revert all that without too much effort.

It just follows the Stanford Alpaca paper. The authors chose those two layers after some experimentation, I believe, determining that they were by far the most important for the results they were trying to achieve. And the point was partially to show how few extra parameters they had to train (about 10 million for 7B as I recall) to turn Llama into a pretty capable instruction-following model.
The short context length I think was also suitable for the short examples in the original Alpaca question/answer set.  And especially if it's for a model that's meant to do a back-and-forth chat with a user it really needs to use the full context length.

Is that a landmark-related statement?

I guess that refers to which layers of each decoder you attach adapters to (i.e. merging the computation at runtime). If you merge them into the base model's weights there's no penalty for adapting more layers.

The short context length I think was also suitable for the short examples in the original Alpaca question/answer set.  And especially if it's for a model that's meant to do a back-and-forth chat with a user it really needs to use the full context length.

It has always bugged me that even in repos designed for ShatGPT/Vicuna they chunk conversations into 2048 chunks and train on each chunk (or train on the assistant responses for that chunk). That means the responses closer to the top of the chunk get less context, which is not ideal if there was indeed prior conversation to go on. That's what I meant by "rolling" window. It means I'm always trying to train/compute loss only over the last 500 tokens or so of a 2048 chunk (the latest response). Of course, this really increases training time. For all I know it is placebo. Haven't done A/B tests.

I don't know if that makes sense. It might. Rotary positional encodings are supposed to generalize better than the sinusoidal encodings from vanilla transformers, but they're still computed from the absolute position in the sequence. And they apparently don't generalize beyond the 2048 tokens of the base model, without tuning. So I'd be worried about the model forgetting what to do with positions 0-1500 if it only ever sees 1500-2000 in finetuning. Then again... idk.

Well I'd argue in a long conversation you are only generating the last bit of context most of the time anyway, so maybe it makes sense to have a specialized lora. You can throw in alpaca style lora/data for training the front-end. Of course, all speculation if it even matters.

Well if there is no penalty after merging, then landmark is very very slow no matter what. I have just been merging the lora that was released to other llama models and it has worked for the most part.
Haven't narrowed down what exactly has to be swapped over besides config.json and the scripts. For llama I used all the entire tokenizer/config files set.
The motivation hasn't been great because the replies were short despite the model handling the extra context and the speed was slow.

Trition was super hyped up, but every time I've tried it, results have been worse than normal cuda kernels. Plus they don't support pre-volta and that knocks one of my systems out from the start.
Makes perfect sense though. If they reprocess everything, every time. Not even dual 3090 can be fast with that. I think landmark attention is a good try, but it's not going to be more than a summarizer.

I'm also curious to see if Landmark can beat standard vector summarization like superbooga, etc., i.e., how good the joint attention-led retrieval is. Basically a perplexity vs context length plot comparing both methods like turboderp said, for various tasks.
Actually, now I want to make that same plot for the shareGPT dataset as a reference. Presumably those were made with chatGPT turbo 4K, so we could see what potential there is in that dataset in the first place. The cost has come down, and the new 16K turbo model is also pretty cheap: should be possible to automatically generate some story-writing evaluation datasets to test contexts up to 16K using chatGPT (at least, to the extent that chatGPT is itself trained to exploit it).


*: support GRANT PROXY

What problem does this PR solve?
support GRANT PROXY https://dev.mysql.com/doc/refman/5.7/en/grant.html, mainly to let tidb-tools use parser to check privileges obtained from SHOW GRANTS
What is changed and how it works?
Check List
Tests

Unit test

Code changes
Side effects
Related changes

PTAL @xiongjiwei @AilinKid


An error was reported during runtime.

C:\Users\Administrator>C:\Users\Administrator\AppData\Roaming\Python\Python39\Scripts\computerassistant.exe
Profile: None
D:\ProgramData\Anaconda3\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
pygame 2.5.2 (SDL 2.28.3, Python 3.9.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
Imported all libraries
QObject::moveToThread: Current thread (0x1a293354cc0) is not the object's thread (0x1a2a6ad95d0).
Cannot move to target thread (0x1a293354cc0)
qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, offscreen, webgl, windows.

I reinstalled PyQt5 and solved the problem.


Public repositories within private org are not visible to members

Gitea version (or commit ref): 1.10.3 / 1.12.0+dev-251-gd4096ab6a
Git version: Not relevant
Operating system: Not relevant
Database:

[ ] PostgreSQL
[x] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[x] Yes (provide example URL)
[ ] No
[ ] Not relevant

Log gist: Not relevant

Description
When repository, within an organization which has visibility set to Private, is set as public and user is part of a team that has no access specified to this repository, repository can be accessed via direct URI but can not be viewed on any list within UI.
I would expect that setting repository as public within Private organization would allow members of all teams to view it, regardless of team's permissions and team's repositories (for example I might want to make repository visible but read-only to all members of organization, while certain teams can write to different repositories).
This does not apply when organization is set as Limited. In such a case, repository is properly visible (to both members of organization as well as outside users).
Owners of org can of course see all repositories just fine.
Screenshots

@proton-ab does this still be the case on 1.11.4 or master?

@6543 yes, as a member of team that has access to certain private repositories within organization I still can not see the public repositories in that organization. I can access them directly but otherwise they are hidden.

The issue seems to be present in SearchRepositoryCondition, specifically in condition that handles if opts.OwnerID > 0. Repository will be visible here only if:

We are collaborators - but we are not in this case (either directly or by being in a team that has explicit access to such repository)
It's public and AllPublic is true - but the organization is not public
It's limited and AllLimited is true - but the organization is not limited

As you can see, all 3 cases are false, hence the repository is never shown.

Can you reproduce on try? I can't seem to reproduce this.

The screenshots included are from try, I can't really link you because org has to be private.

The reproduction steps however are as follow:

Create user A
Create user B
As user A create organization C
Mark organization C as private
In organization C create private repository D
In organization C create public repository E
In organization C create team F with write access
In team F in organization C, add repository D to access list
In organization C, add user B to team C
Confirm both repositories D and E are visible
Login as user B, confirm repository D is visible but E is not
Manually navigate to URL where repository E should be, confirm it opens

It's weird because I literally just did those steps on master and on try and did not have this problem...
The two users are<EMAIL_ADDRESS>and<EMAIL_ADDRESS>their passwords are their email addresses as they predate the (imho unnecessary) password rules. The private org is arprivateOrg.
Arandomer is the owner, tester_mailinator is the user.

You have added the ArPublic repository as accessible to a team 'writers' which<EMAIL_ADDRESS>is part of, hence they can write to it. The bug describes situation where user is member of a team that does not have write access to public repository. I have now corrected the mistake, please check now.

Maybe we should reopen it, the mentioned PR does not fix issue entirely; explore page is still missing public repo but shows private one.

yeah I don't think that I have solved this!

If an organization is private and public repositories are shown this also shows the (existence of the) organization, no? So what would the benefit be to have a private organization?
The reason I am asking this is: I created a private organization ("visible only to organization members") and somehow expected all repos to be invisible/private, however, I was able to clone it as an anonymous user.

@mschoettle that sounds like another bug - could you open another issue please

@mschoettle Public repositories within private organization are visible to all members of said organization. I can not reproduce your report (ability to clone public repositories of private organization by either anonymous user or user without access to organization)

@CirnoT I just tried it on https://try.gitea.io and could reproduce it.
I opened another issue: #11651


embedr: public post embed server

This is very scratch, just getting infra going; no post embed stuff is implemented here at all.
UPDATE: rebased, new active branch at: https://github.com/bluesky-social/social-app/pull/3511

Superseded by https://github.com/bluesky-social/social-app/pull/3511


Integration Test - Release - 2022/01/19 10:10:47

Auto create for integration test. IssueCommandFlow

#pri1

Just type '#pri3'

#pri2

#pri3

#assign PRMergerTest1

#assign NonAllowedUser

The following users don't have valid GitHub IDs, or are not collaborators on this repo: nonalloweduser

#reassign PRMergerTest2

#reassign NonAllowedUser

#please-close

#unassign PRMergerTest1

#unassign NonAllowedUser


Fix links

Links pointing to the incorrect repo

@dtzar,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Invalid Signature Validation

I do not understand what I am doing wrong:
// make the keys
var KeyGenerator = Portable.Licensing.Security.Cryptography.KeyGenerator.Create();
var KeyPair = KeyGenerator.GenerateKeyPair();
var PrivateKey	 = KeyPair.ToEncryptedPrivateKeyString(Common.ID_ENCRYPTION_KEY);
var PublicKey = KeyPair.ToPublicKeyString();

// make a license
var L = License.New()
	.WithUniqueIdentifier(Guid.NewGuid())
	.As(LicenseType.Standard)
	.ExpiresAt(DateTime.Now.AddDays(LICENSE_DAYS))
	.WithProductFeatures(new Dictionary<string, string>
	{
		{ "Generated on", DateTime.UtcNow.ToString(CultureInfo.InvariantCulture) },
		{ "ComputerId", ComputerId }
	})
	.CreateAndSignWithPrivateKey(PrivateKey, Common.ID_ENCRYPTION_KEY);

// save the license
using (var Writer = File.CreateText(LicenseFile))
{
    L.Save(Writer);
}

// reload the license
var LicenseText = File.ReadAllText(LicenseFile, Encoding.UTF8);
var L1 = License.Load(LicenseText);

// validate it
var ValidationFailures = L1.Validate().Signature(PublicKey).AssertValidLicense();
foreach (var Failure in ValidationFailures)
{
	Console.WriteLine(Failure.GetType().Name + ": " + Failure.Message + " - " + Failure.HowToResolve);
}

If I do this, it works.
Now, if I change the writing of the license to
Console.WriteLine(L.tostring())

and I paste the text as the license file (a.txt in my example), I get an invalid signature validation...

Hi Thomas. I am having the same issue, Can you say what was the issue?

In my test code I had the save / load of the license as two functions and I was re-creating the key in between. As the key has a salt, even with the same passphrase, each execution will create a different key.


Fix Beam Search for CPU and CUDA... Also include it in our API

Beam Search was not working properly and had to be fixed. Furthermore, the way we accessed the output did not match our API.
This PR addresses the immediate problems with Beam search as soon as possible... further work can be done for better efficiency and testing.

Beam Search was not working properly and had to be fixed. Furthermore, the way we accessed the output did not match our API.
This PR addresses the immediate problems with Beam search as soon as possible... further work can be done for better efficiency and testing.

Could you please add more details about the bug, e.g., what cause the BeamSearch not work properly.


Render math slightly smaller to match text

@DrDrij I thought we were going to go the other way --- text slightly large to match maths.
Isn't that what you recommended?

@DrDrij I thought we were going to do this the other way --- render text slightly larger to match maths.
Isn't that what you recommended?

@jstac I went the other way. As changing the default font size would require rewriting a significant part of the whole stylesheet. (All text, branding, nav, header, footer, are based from the default font size). ie. The header looked really chunky even with a 0.1 increase.

Doesn't that affect the quality of the maths?  Happy to pay for the extra hours if that's what's required to get it perfect :-)

@jstac Yes, sorry accidentally merged without review. I'll revert and look into it further.


add Project othello game

This is a digital version of popular Othello game.
Added a readme page with it.
Want to contribute by adding my project Othello game so than other contributor can suggest ideas and  modify this web game and make it even more awesome.

Please reply soon so that I can know where my pull request is appropriate or not 🤧


Bug: Mermaid version is too old.

Description
Mermid version is too old.
Steps to Reproduce

mermaid flowchart can't showing corect.

Expected behavior

showing corect.

Screenshots (If Necessary)
get this bug information for chrome console:
Expecting 'SEMI', 'NEWLINE', 'SPACE', 'EOF', '--', 'ARROW_POINT', 'ARROW_CIRCLE', 'ARROW_CROSS', 'ARROW_OPEN',

Environment (If Necessary)

fork and change name, deployed on github Page

I think MathJax has the same issue. Did you find any workaround?

Here is an example of updateing mermaid:
https://github.com/KingOfSpades/KingOfSpades/commit/7a65a13be91f0f26dc2d926321ad384d06c50a3a


Tweaks to developer guide

Standardize on FRAMEWORK_NAME instead of SERVICE_NAME as the environment variable to use (e.g., bootstrap script expects FRAMEWORK_NAME).
Fixed Markdown syntax for nested lists
Fixed some typos
Added section on how to avoid proxylite task failure

Thanks for the edits, @loren . I'll merge as soon as tests pass...

retest this please


⚠ Bofrost.fr has degraded performance

In d9c62c5, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1269 ms

Resolved: Bofrost.fr performance has improved in f4caf23 after 36 minutes.


Add perSeconds methods to RateLimiting

This PR will add perSeconds() method to Laravel RateLimiting. Sometimes it needs to set a rate limit within a seconds. I have found myself using rate-limiting with seconds quite often, in API subscriptions to be precise.

@taylorotwell

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


Move draggable REPL logic out of MobileSideContent into MobileWorkspace

Description
The MobileSideContent component already takes in an onChange function that is called within the changeTabsCallback. Rather than handling the logic for displaying & disabling the draggable REPL inside MobileSideContent, we can wrap props.mobileSideContentProps.onChange in a new function in MobileWorkspace that also handles the draggable REPL logic. This new function is then passed into MobileSideContent as onChange. This helps to decouple MobileSideContent from MobileWorkspace, making it more extensible for future additions.
Part of the refactoring for https://github.com/source-academy/frontend/issues/2176.
Type of change

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

How to test
Use developer tools to set the screen resolution to one that triggers the mobile view and check that the behaviour is unchanged when switching between tabs.

Can you check how the wiki documents this? Any need for an update there? Or maybe we add a page on this?

Can you check how the wiki documents this? Any need for an update there? Or maybe we add a page on this?

The most relevant page seems to be Mobile Development Guide which provides a high-level overview of the behaviour of the mobile workspace. There is no need to update that page because the behaviour has not changed at all.
As for whether we should add a page on this, I'm not very sure what that would achieve because my changes so far are to realign the responsibilities of the various components without any changes to behaviour. The MobileSideContent component should be very clear on its purpose, which is to handle the selection of side content tabs, and the rendering of side content panels. This is the case for SideContent (the desktop equivalent) but not MobileSideContent, whose responsibility had been wrongly expanded to also (prior to this PR and #2197):

Render the editor (which is not a side content and is also not treated as such in the desktop version!)

This resulted in the need to pass the editor ref into MobileSideContent so that the editor can be force updated which is a code smell.

Manipulate the draggable REPL (i.e., showing/hiding & enabling/disabling) whenever tabs are selected. By having the logic in MobileSideContent, it becomes tightly coupled to MobileWorkspace where the draggable REPL component resides in.

The design of the original desktop SideContent component was such that any such parent-component specific logic was passed in as a callback so as to abstract the details away from the SideContent component and allow it to be focused. For example, the onChangeTabs function in the Playground component.

Push the run tab to the back of any other dynamically rendered tabs (such as runes). If you look at the code for this:
https://github.com/source-academy/frontend/blob/505c1a5ac5573a5fcbc9693ea22e4c1f124f0c9a/src/commons/mobileWorkspace/mobileSideContent/MobileSideContent.tsx#L59-L67
You will see that this introduces an implicit precondition that the last tab that is passed into MobileSideContent is the run tab.

I intend on removing this implicit precondition in another PR.


Automatically delete files that were not downloaded successfully

If an exception was thrown during the download process or manually interrupted download, we should remove it.
Since corrupted files will just leave there and the program will skip those files if we are not using "--overwrite-files" directives.
And it's inconvenience to identity those files and handle it manually.

Since going through big download directories might be slow this is now implemented in the following way: files are downloaded as temporary files (*.dwnldtmp) first and then renamed with a proper name (or removed) after all checks have completed. On subsequent download attempts of the file the temporary file will be removed automatically if it was left there after a crash. If you need to do mass cleanup you can search for those *.dwnldtmp files manually and delete them safely.
Update to latest version to use this feature.


parameters in the app metadata should include "universal" configurable parameters

When we do a GET request to obtain app metadata, "universal" parameters (such as pretty) are not included in the returned JSON. I think they should be presented to the users as a reference.

closed via #105


BaseNDArray.distance1 returns wrong values!

Hi,
when playing around with http://deeplearning4j.org/ I saw that BaseNDArray.distance1 (nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseNDArray.java) has a severe bug and returns wrong values in most cases. In your coding you subtract the arrays and simply sum up the values.  Your distance1 for the vectors [1,0] and [0,1] is 0 instead of 2.
Can you please fix?

Thanks for reporting.
Fixed here: https://github.com/deeplearning4j/nd4j/pull/1337
Workaround until the next release: use Nd4j.getExecutioner().execAndReturn(new ManhattanDistance(first,second)).getFinalResult().doubleValue();


Knapsack::Adapters::RSpecAdapter does not track time spent in before or after :context

Hi. In our project, we found that Knapsack::Adapters::RSpecAdapter does not track time spent in before or after :context.
Because of this, the distribution of the parallel job duration becomes uneven as the jobs that have the tests with longer set up time will take longer than the average.
Is this intended?

I recall a similar thing was already fixed in knapsack_pro ruby gem.
Related PRs:

https://github.com/KnapsackPro/knapsack_pro-ruby/pull/62
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/52

You can learn how Knapsack Pro Queue Mode can help you save more time:
https://docs.knapsackpro.com/2020/how-to-speed-up-ruby-and-javascript-tests-with-ci-parallelisation
If you like to improve knapsack gem you can prepare PR with a fix. You can use this project for debugging purpose in development https://github.com/KnapsackPro/rails-app-with-knapsack
and this script to run RSpec tests  https://github.com/KnapsackPro/rails-app-with-knapsack/blob/master/bin/knapsack_rspec

Thanks for clarifying @ArturT. We have done a patch in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58980.
I'll port it over into a PR for you to review.

I realized I wasn't very clear in the title and earlier comment that this is referring to before(:context) and after(:context).


Fix classic mode hoisting and peer dependencies requirements

Hoisting algo does not take into account peer dependencies.

150cc1596011003c215f6d6f172f828892263cd6


Using HiTRes Fluxes and Footprints from Different Years

What are you trying to do?
Trying to do forward simulations of CO2 using the HiTRes datafiles. Specifically, using fluxes from 2014 combined with 2021 NAME footprints for Mace Head. The error is raised when using the footprints_data_merge() function from ModelScenario.
What do you expect to happen?
I expect the footprints to successfully merge with the flux files to produce the simulated mole fractions. This has previously worked for methane when using standard resolution footprints with flux files for different years
What is actually happening?
An indexing issue is raised tracing back to the _scenario.py file and the forward simulations are not produced
What have you tried so far to debug this issue?
Briefly chatted with RT about this problem. The problem seems to arise in _scenario.py where the HiTRes fluxes use timestamps from the footprints (when performing data slicing) and since fluxes and footprints are from different times the problem is raised.
Do you have a proposed solution to the issue?
Modify the HiTRes blocks in _scenario.py so that the flux data are not relying on the footprints timestamps and the code mirrors what is done for the standard resolution footprints.
Anything else?
I'm happy to try modify this code using the proposed solution

Would probably be worth a quick chat so we understand what we want this to do. Mainly want to make sure this is working as expected so we can get this in.


Tutor exam dashboard for the assessment of exams

Checklist

[x] I tested all changes and all related features with different users (student, tutor, instructor, admin) on the test server https://artemistest.ase.in.tum.de.
[x] Server: I added one integration test (Spring) related to the features
[x] Server: I added @PreAuthorize and check the course groups for all new REST Calls (security)
[x] Server: I implemented the changes with a good performance and prevented too many database calls
[x] Server: I documented the Java code using JavaDoc style.
[x] Client: I added authorities to all new routes and check the course groups for displaying navigation elements (links, buttons)
[x] Client: I documented the TypeScript code using JSDoc style.
[x] Client: I added multiple screenshots/screencasts of my UI changes
[x] Client: I translated all the newly inserted strings into German and English

Motivation and Context

This PR creates a Tutor-Assessment-Dashboard for Exams. It offers the basic functionality for assessing exercises. The Tutor-Stats are still on course level and not adjusted to the exam yet!
Description

Created new server call to load a course with all exam exercises
Reused Course-Tutor-Dashboard to work for exam
Adjust client checks to get the course of an exercise through the exam

Steps for Testing

General

Log in to Artemis
Navigate to Course Administration
Go to the exam management page
Create an exam with an end date
Create exercise groups & exercises
Go to the exam-tutor-dashboard (on the exam management page)
6.1 If the exam is not due, there should not be an exercise
6.2 If the exam is due, there should be all exercises of all exercise groups, that are not assessed automatically

Assessing an exercise
Please create an exam with an exercise of each exercise type, submit a result and see that assessing works!
Screenshots

Exam Overview

Dashboard

I fixed the buttons, everything should work now!

Works as intended. The issues mentioed by @niclasschuemann seem to be resolved as well, since I can access the submissions via 'Start Next Assessment' in the usual manner. Good job!

I tested this locally and there is just one problem I noticed. The dashboard as a tutor can be loaded if the URL is manually entered, however the button is on a component / route that only instructors or admins can access.

I tested this locally and there is just one problem I noticed. The dashboard as a tutor can be loaded if the URL is manually entered, however the button is on a component / route that only instructors or admins can access.

This is a known problem but not part of this PR, as it includes the refactoring of the exam dashboard!

I'm not able to see the tutor exam dashboard when deployed on test server 2

This did not really work for me on test server 1 either. I was able to go to the tutor dashboard for an exam text exercise, however I received a 500 message and was not able to submit an assessment.
Steps (test server 1):

(as an instructor) Create an exam, exercise groups, add students, and generate the individual exam, and prepare student exam
(as a student, test user 1, 2, 3
take the exam as a student
(as an instructor) go to exam tutor dashboard, try to assess a submission. Actual: not able to assess and receive a 500 message. Expected: should be able to assess.

Request URL: https://artemistest.ase.in.tum.de/api/exercises/3013/text-submission-without-assessment?head=true
Request Method: GET
Status Code: 500
Remote Address: <IP_ADDRESS>:443
Referrer Policy: same-origin
Tutor course dashboard in general looks ok:

)
I created another exam. This time, the generated exam did not show correctly to the student.
This is what view student exam looks like:

This is what the student sees when they access the exam:

I also received an ISE when trying to import a programming exercise (however I think that is out of scope)

as an instructor (test user 11) I'm not able to see the tutor exam dashboard when deployed on test server 2

update: it looks better already on test server 1, so I will test there

You need to set an end date to the text exercise.

Tested this again (test server 1), with setting exercise due date = exam due date.
Text exercise - worked successfully. I was able to assess.
Programming/quiz exercise - did not work, I was not able to view results or assess. I'm not sure what the expected behavior is here, because I understand some of the results are automatically graded.
Text exercise (worked successfully):

Programming and quiz still not working:

Exam due date: 16:05

Quiz due date: 16:05

Programming exercise due date: 16:05

2 students participated in the exam (test user 1, 2)

They don’t show in the tutor course dashboard at all

There is not a way to view or assess

Didn’t test file upload b/c I read it’s not applicable for the upcoming exam.
Assessment button doesn’t work

Evaluate quizzes – only 1 quiz exercise was successfully evaluated. However I can’t view the results.

Likely unrelated to this pr, but there are errors faced when changing exercise due date after the exam is completed by students.

Trying to set programming exercise due date to previous throws an error around build plans, even if build plans aren’t selected.

Trying to set quiz due date to earlier  after student has submitted an exam also throws an error.
Failed to load resource: the server responded with a status of 400 ()
main.beb998afbfa43d01b860.bundle.js:2 Saving Quiz Failed! Please try again later.
anonymous)	@	main.beb998a….bundle.js:2

Quizzes and programming exercises are graded automatically.
You should only see text, modeling, file upload and programming exercises where manual assessment is specified.
The view in Student Exam is not supposed to work yet

We couldn't find a solution for the failing test yet. It seems like Jackson is not able to deserialize the JSON returned by the GET request. The problem has something to do with bi-directional setup of the entities. Others have also reported this problem https://github.com/FasterXML/jackson-databind/issues/1755

I think I was able to fix the problem with the test.
I also added another test where a similar DB call is used.
If the tests pass, we can merge this PR


Crashing Jupyter kernel

Type: Bug
Running my Jupyter notebook, and no matter what kind of code is running, within 5 minutes, the kernel crashes and needs to be restarted.
Extension version: 2024.7.0
VS Code version: Code 1.92.2 (fee1edb8d6d72a0ddff41e5f71a671c23ed924b9, 2024-08-14T17:29:30.058Z)
OS version: Darwin arm64 24.0.0
Modes:

System Info

Item
Value

CPUs
Apple M2 Pro (10 x 2400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabledwebgpu: enabledwebnn: disabled_off

Load (avg)
8, 7, 7

Memory (System)
16.00GB (7.02GB free)

Process Argv
--crash-reporter-id 3920b3b0-6fce-4f3c-a37c-27e692fe28a5

Screen Reader
no

VM
0%

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
g316j359:31013175
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
refactort:31108082
pythonrstrctxt:31112756
flighttreat:31119336
wkspc-onlycs-c:31111717
fje88620:31121564

Please could you enable logging as follows:

Open settings & go into Jupyter->Logging
Change the value to trace
Reload VS Code,
Attempt to repro the issue & then copy the output from the Jupyter output panel (use the command Jupyter: Show Output to get to the logs).

Crashing kennels is always an issue with the python environment and not the Jupyter extension, basically Jupyter extension just sends code for execution to Jupyter kernels , and Jupyter extension doesn’t do anything beyond that
Please can you install Jupyter lab and try this outside vscode please share the terminal logs when running in terminal, when the kernel crashes there will be some information as to why it crashed
Or create a new python environment using conda (or the like)
From what we’ve seen crashes are a result of incorrectly installed packages
Try running just ‘print(1234)’ for over 5 minutes, if that crashes it’s not Jupiter extension, again try reinstalling installing python


Any plans to support LTI 1.3?

+1 It looks like another library supports 1.3 https://github.com/dmitry-viskov/pylti1.3 but many packages depend on the one (including most of our projects) and I'd like to avoid rewriting.

@jonespm Thank you. I reviewed it back then, and also we have same situation :)


Add functions and endpoints to remove old annotations.

If you are tracking history, annotations can build up excessively.  This provides an informational endpoint and a delete endpoint to show how many old annotations there are and to remove them and compact the database.

Closing this.  A new version will be opened against current master.


How come ToJSON and ParseFromJSON exist?

Hey, as I look through more of the codebase, I so far see that every implementation of ToJSON / ParseFromJSON just calls out to serde directly. I wonder why these traits exist, couldn't we just use Serialize and Deserialize?

In a similar sense, is serde the best candidate for json serialisation here? Are there maybe better performing/smaller/lighter crates to use for JSON?

Not using serde to parse and serialize json.

As a note to this, we use it when mirroring and transforming internal API responses.
The separation lets us use the same model but with different serialization/deserialization behaviours between them. (Mostly with renaming)


webpack  reactjs  Uncaught TypeError: webpack_require(...) is not a function

var path = require('path');
var os = require('os');
var webpack = require('webpack');
var HappyPack = require('happypack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var happyThreadPool = HappyPack.ThreadPool({size: os.cpus().length});
module.exports = {
entry: {
app: './src/index.js',
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'js/[name].js',
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.jsx', '.css'],
},
module: {
rules: [
{
test: /.jsx?$/,
use: {
loader: 'happypack/loader?id=jsx',
},
include: path.resolve(__dirname, 'src'),
},
{
test: /.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader']
}),
include: path.resolve(__dirname, 'src'),
},
{
test: /.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
loader: 'url-loader',
options: {
limit: 10000
},
include: path.resolve(__dirname, 'src'),
}
]
},
plugins: [
    new HtmlWebpackPlugin({
        filename: 'index.html',
        template: './dist/template.html',
        inject: 'body',
        chunks: ['common', 'app'],
    }),

    new HappyPack({
        id: 'jsx',
        loaders: [{
            loader: 'babel-loader',
            // here you configure babel:
            options: {
                cacheDirectory: true,
                presets: ['react', 'es2015'],
            },
        }],
        threadPool: happyThreadPool,
        // verbose: true,
    }),

    new ExtractTextPlugin({
        filename: 'css/[name].css'
    }),

    new webpack.optimize.CommonsChunkPlugin({
        name: 'common',
        filename: 'js/common.js',
    }),
    new webpack.DllReferencePlugin({
        context: __dirname,
        manifest: require('./lib_manifest.json'),
    }),
]

};
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
lib:[
'react',
'react-dom'
],
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'js/[name].js',
library:'[name]',
},
plugins: [
new webpack.DllPlugin({
path: path.join(__dirname, 'lib_manifest.json'),
name: '[name].js',
context: __dirname,
}),
new webpack.optimize.UglifyJsPlugin()
]
};
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-scripts": "1.0.14"
},
"devDependencies": {
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-runtime": "^6.26.0",
"bable-loader": "0.0.1-security",
"css-loader": "^0.28.7",
"dll-link-webpack-plugin": "^2.0.3",
"extract-text-webpack-plugin": "^3.0.1",
"happypack": "^4.0.0",
"html-webpack-plugin": "^2.30.1",
"style-loader": "^0.19.0",
"webpack": "^3.8.1"
}
Uncaught TypeError: webpack_require(...) is not a function
at Object.module.exports (app.js:5)
at webpack_require (common.js:55)
at Object. (app.js:20)
at webpack_require (common.js:55)
at webpackJsonpCallback (common.js:26)

It looks like you just deleted/ignored our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please open a new issue with filled issue template. Also make sure your issue is not a question. Questions should be posted on Stack Overflow.


Remove force rate shop while retrying shipping label for TO

Current behavior
Currently, we force a rate shop when retrying the shipping label for a Transfer Order (TO) from the shipment review page. Initially, it wasn't clear whether the carrierPartyId would be set to NA or to a specific carrier, and for shipping aggregators like EasyPost, a rate shop was required to generate the label.
Now, we can remove the forced rate shop, as we are setting the carrierPartyId to NA when TOs are imported from NetSuite to HC. The retry shipping label process checks if the shipment route segment has the carrierPartyId set to NA and performs the rate shop if necessary. Therefore, there is no need to pass the forced rate shop flag.
Expected behavior
Force rate shop flag should either be false or not passed while retrying shipping label.
Steps to reproduce the issue

Can you handle fixing this bug by yourself?

[ ] YES
[ ] NO

Environment details

Browser:
OS:
Code Version:

Additional information

try this
https://gofile.io/d/yMHabA
select the desired compiler in the installer


Refactor spend conflict checks in the mempool storage to increase performance

PR #2765 implemented a simple algorithm to check if a transaction has spend conflicts with another
transaction already in the mempool. That algorithm works well for a mempool with few transactions.
As the size of the mempool increases, performance will be impacted. The algorithm is O(n*m), where
n is the number of spent UTXOs and revelead nullifiers in the transaction and m is the number of
spent UTXOs and revelead nullifiers in all transactions already in the mempool.
The original idea was to to cache the spent UTXOs and revealed nullifiers from all transactions in
the mempool using HashSets. This would mean that the conflict check would only be O(n), but it
adds complexity to the code to add a transaction to the mempool and to remove a transaction from the
mempool, because the cache s must be updated.
If this idea is implemented, the has_spend_conflicts method could be updated to something like:
fn has_spend_conflicts<'slf, 'tx, Extractor, Outputs, Output>(
    &'slf self,
    tx: &'tx UnminedTx,
    extractor: Extractor,
    existing_outputs: &'slf HashSet<Output>,
) -> bool
where
    'slf: 'tx,
    Extractor: Fn(&'tx Transaction) -> Outputs,
    Outputs: IntoIterator<Item = Output>,
    Output: Eq + Hash + 'tx,
{
    let new_outputs = extractor(&tx.transaction).into_iter();

    new_outputs.any(|output| existing_outputs.contains(output))
}

Specifications

Designs

Related Work

If we need to look up the conflicting transaction, we might want a HashMap<Output, transaction::Hash>.
But I don't know if we'll need to do that - I guess we'll find out!

We moved the eviction tickets to the next sprint, so I'm going to move this one too.

Hey team! Please add your planning poker estimate with ZenHub @conradoplg @dconnolly @jvff @oxarbitrage @teor2345 @upbqdn

This definitely seems optional, so I'm going to un-schedule it for now, it will still be tracked in the mempool epic for when we think the mempool will be large enough that this is necessary


tools: add interrupt support to host exerciser memory

add new command line input parameter interrupt
register host exerciser memory interrupt and triggered by  afu after coemption of test.

Signed-off-by: anandaravuri<EMAIL_ADDRESS>

Coverage decreased (-0.1%) to 67.311% when pulling 5647be1eeb04358550123c0376bcbeb2e28b3caf on aravuri/he_interrupts into 8a02a290d0b78e196b53a835ded2b3f1939bd9db on master.


Add mps and cpu devcontainers.

At present Apple MPS acceleration not supported in Docker containers: see https://github.com/pytorch/pytorch/issues/81224


make decentralized op stateless

done in https://github.com/BaguaSys/bagua/commit/0c978e9ce1194ad122d4f15ea743c3ff354fc0a9


process.env.REACT_APP_LIBRARY_BACKEND

Publishing libraries from Excalidraw directly is a very useful new feature. I debugged excalidraw.com and found the value for process.env.REACT_APP_LIBRARY_BACKEND. I set the same in the Obsidian deployment, and the submission process worked.
https://github.com/excalidraw/excalidraw-libraries/pull/272
My current solution, however, is a bit of a hack. Would be nice if by default Excalidraw would publish to the public library (i.e. the default value for BACKEND would be included in constants.

I'm not quite sure what you're proposing, but until today we haven't been properly inlining ENV variables (https://github.com/excalidraw/excalidraw/pull/4311) which resulting in libraries not working in the npm package. So maybe that's what you meant?

#4311 resolves this. Thank you.


Integration changes connection information to raspberrymatic upon HA restart / can't connect after restart

I agree to the following

[X] I have read the documentation
[X] I am aware of the latest release notes
[X] The Backend (CCU/Homegear/...) is working as expected and connected devices are controllable by its own UI.
[X] I am running the latest version of the custom_component (and Home Assistant)

The problem
On the same machine:

Homeassistant running in a container (host networking)
Raspberrymatic Container with mapped ports (port 80 is remapped to 8234)

I've configured the integration with IP <IP_ADDRESS> and JSON port 8234. This works fine until I restart Home Assistant. After some time or after a reboot the integration is unable to connect to raspberrymatic. Opening the "configure" dialog shows a different IP address e.g. <IP_ADDRESS> which is the IP address from the docker network created for the raspberrymatic container.
To clarify this is not a newly discovered instance - I don't get any notifications about new instances found so I cannot just skip them. The integration just changes my existing setup to the other IP address and fails to connect to it because it doesn't listen on port 8234.
After reconfiguring with the original IP address <IP_ADDRESS> and setting the port (field is always empty) it is able to connect again.
What version of HomematicIP (local) has the issue?
1.33.1
What was the last working version of HomematicIP (local)?
No response
What type of installation are you running?
Home Assistant Container
What type of installation are you running for your homematic backend?
RaspberryMatic Standalone
Which version of your homematic backend are you running?
<IP_ADDRESS>30225
What hardware are you running for your system?
Small Server PC with Ubuntu Server. HA / RM running as docker container
Which config details do you use

[X] Username and password
[ ] TLS
[ ] callback data (see)

Which interfaces do you use?

[X] Homematic IP
[ ] Homematic (Bidcos-RF)
[ ] Groups (Heating-Group)
[ ] BidCos-Wired (HM-Wired)

Diagnostics information
No response
Anything in the logs that might be useful for us?
homeassistant    | 2023-03-15 17:17:18.127 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:19.151 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:19.152 WARNING (MainThread) [hahomematic.json_rpc_client] POST failed: Error while logging in via JSON-RPC
homeassistant    | 2023-03-15 17:17:20.175 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:21.199 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:21.200 WARNING (MainThread) [hahomematic.json_rpc_client] POST failed: Error while logging in via JSON-RPC
homeassistant    | 2023-03-15 17:17:21.201 WARNING (MainThread) [hahomematic.central_unit] CREATE_CLIENTS failed for bali
homeassistant    | 2023-03-15 17:17:23.603 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:24.623 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:24.624 WARNING (MainThread) [hahomematic.json_rpc_client] POST failed: Error while logging in via JSON-RPC
homeassistant    | 2023-03-15 17:17:25.651 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:26.671 ERROR (MainThread) [hahomematic.json_rpc_client] DO_POST failed: ClientConnectorError: Cannot connect to host <IP_ADDRESS>:8234 ssl:default [Connect call failed ('<IP_ADDRESS>', 8234)]
homeassistant    | 2023-03-15 17:17:26.673 WARNING (MainThread) [hahomematic.json_rpc_client] POST failed: Error while logging in via JSON-RPC
homeassistant    | 2023-03-15 17:17:26.673 WARNING (MainThread) [hahomematic.central_unit] CREATE_CLIENTS failed for bali
homeassistant    | 2023-03-15 17:17:26.677 WARNING (MainThread) [hahomematic.central_unit] CHECK_CONNECTION failed: No clients exist. Trying to create clients for server bali

Additional information
No response

This problem is related to your docker setup.
Don't use the loopback to access a docker container from the same host.
Instead use the name of the RM-Container on the docker network. In this scenario a port mapping is not needed and the default can be used.
Further information can be found here.

What i described is how HAOS works.
I'd recommend to switch to HAOS (maybe virtualized).
This is not a docker support forum!


rlp: rlp functions produce wrong result when there are too many elements to encode

Yes, I'm so sorry for your time. Seems like there's a problem with ABI functions. I'll try to fix it.

Yes, I'm so sorry for your time. Seems like there's a problem with ABI functions. I'll try to fix it.
For now, you can use online services like https://abi.hashex.org. It should give the right output.

No problem bro. U contributed this library to c community. We all thank u. There is no working library on the internet that do same thing like this. My time is not wasted. i will contribute what i can do to this project. :+1:

Hey @DerXanRam. I think I found the issue. Can you please fetch the changes and try again? Also, you should replace the second r and s encode to this:
ok(eth_rlp_bytes(&rlp1, &r, &siglen));
ok(eth_rlp_bytes(&rlp1, &s, &siglen));

Now, the transaction looks valid (https://toolkit.abdk.consulting/ethereum#transaction):

ok...let me test it...

Hey @DerXanRam. I think I found the issue. Can you please fetch the changes and try again? Also, you should replace the second r and s encode to this:
ok(eth_rlp_bytes(&rlp1, &r, &siglen));
ok(eth_rlp_bytes(&rlp1, &s, &siglen));

Now, the transaction looks valid (https://toolkit.abdk.consulting/ethereum#transaction):

Thanks very much for ur kindness :pray: ... Yeaa it is in correct format..... This is the code. Also i integrated the change from this issue in the code
char *ABIFunction()
{
	struct eth_abi abi;
	char *fn = "swapExactETHForTokens(uint,address[],address,uint)", *hex;
	char *weth = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
	char *usdt = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
	char *to_address = "0x3535353535353535353535353535353535353535";

	uint64_t path_len = 2;
	size_t hexlen;
	uint64_t amount_out_min = 0, deadline = 346744838;
	//////////////////
	eth_abi_init(&abi, ETH_ABI_ENCODE);
	eth_abi_call(&abi, &fn, NULL);
	eth_abi_uint64(&abi, &amount_out_min);
	eth_abi_array(&abi, &path_len); // open an array
	eth_abi_address(&abi, &weth);
	eth_abi_address(&abi, &usdt);
	eth_abi_array_end(&abi); // close the array
	eth_abi_address(&abi, &to_address);
	eth_abi_uint64(&abi, &deadline);
	eth_abi_call_end(&abi);

	ok(eth_abi_to_hex(&abi, &hex, &hexlen));
	ok(eth_abi_free(&abi));
	return hex;
}
char *SignTransaction()
{
	char *abi_result = ABIFunction();

	struct eth_rlp rlp0, rlp1;
	struct eth_ecdsa_signature sign;
	uint8_t privkey[] = {0xdf, 0x57, 0x08, 0x9f, 0xeb, 0xba, 0xcf, 0x7b,
						 0xa0, 0xbc, 0x22, 0x7d, 0xaf, 0xbf, 0xfa, 0x9f,
						 0xc0, 0x8a, 0x93, 0xfd, 0xc6, 0x8e, 0x1e, 0x42,
						 0x41, 0x1a, 0x14, 0xef, 0xcf, 0x23, 0x65, 0x6e};

	uint8_t nonce = 0x00, zero = 0x00, keccak[32], *rlp0bytes, *r, *s;
	char *gasprice = "0x04a817c800", *gaslimit = "0x5208", *value = "0x0de0b6b3a7640000";
	char *toaddr = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", *txn;
	uint16_t chainid = 0x1, v;
	size_t rlp0len, rlp1len, siglen = 32;

	ok(eth_rlp_init(&rlp0, ETH_RLP_ENCODE));
	ok(eth_rlp_array(&rlp0));
	ok(eth_rlp_uint8(&rlp0, &nonce));
	ok(eth_rlp_hex(&rlp0, &gasprice, NULL));
	ok(eth_rlp_hex(&rlp0, &gaslimit, NULL));
	ok(eth_rlp_address(&rlp0, &toaddr));
	ok(eth_rlp_hex(&rlp0, &value, NULL));
	ok(eth_rlp_hex(&rlp0, &abi_result, NULL));
	ok(eth_rlp_uint16(&rlp0, &chainid));
	ok(eth_rlp_uint8(&rlp0, &zero)); //   0x,
	ok(eth_rlp_uint8(&rlp0, &zero)); //   0x,
	ok(eth_rlp_array_end(&rlp0));	 // ]

	ok(eth_rlp_to_bytes(&rlp0bytes, &rlp0len, &rlp0));
	ok(eth_rlp_free(&rlp0));

	// compute the keccak hash of the encoded rlp elements
	ok(eth_keccak256(keccak, rlp0bytes, rlp0len));
	free(rlp0bytes);

	// sign the transaction
	ok(eth_ecdsa_sign(&sign, privkey, keccak));

	// calculate v
	v = sign.recid + chainid * 2 + 35;
	r = sign.r;
	s = sign.s;

	ok(eth_rlp_init(&rlp1, ETH_RLP_ENCODE));
	ok(eth_rlp_array(&rlp1));
	ok(eth_rlp_uint8(&rlp1, &nonce));
	ok(eth_rlp_hex(&rlp1, &gasprice, NULL));
	ok(eth_rlp_hex(&rlp1, &gaslimit, NULL));
	ok(eth_rlp_address(&rlp1, &toaddr));
	ok(eth_rlp_hex(&rlp1, &value, NULL));
	ok(eth_rlp_hex(&rlp1, &abi_result, NULL)); // replaced
	ok(eth_rlp_uint16(&rlp1, &v));
	ok(eth_rlp_bytes(&rlp1, &r, &siglen));
	ok(eth_rlp_bytes(&rlp1, &s, &siglen));
	ok(eth_rlp_array_end(&rlp1));

	// FIX3: this actually returns the output length
	ok(eth_rlp_to_hex(&txn, &rlp1) > 0);
	ok(eth_rlp_free(&rlp1));
	return txn;
}

Where did u convert your private key to hex? or did u convert it manually? The final step i left is filling the correct private key and sign real transaction thanks to u.

Does online converters trust worthy ?

Thanks very much for ur kindness 🙏 ... Yeaa it is in correct format..... This is the code. Also i integrated the change from this https://github.com/mhw0/libethc/issues/6 in the code

You're welcome. For contract calls, value should be zero, but, it's 0x0de0b6b3a7640000 in your code. So, first and second values are:
ok(eth_rlp_uint8(&rlp0, &zero));
// ...
ok(eth_rlp_uint8(&rlp1, &zero));

Where did u convert your private key to hex? or did u convert it manually? The final step i left is filling the correct private key and sign real transaction thanks to u.

I actually had private key in hex format, and converted it manually. If you're lazy, there's a function called eth_hex_to_bytes :)

Does online converters trust worthy ?

Hex to bytes, bytes to hex? I wouldn't trust.
Closing the issue.


Run NextCloud on personal k8s cluster

Issue
I'd like to host my own personal NextCloud server via my personal-k8s-cluster.
Implementation
TBD.
Definition of Done

[ ] I have a NextCloud instance running on my personal-k8s-cluster, which is accessible from the public internet.
[ ] I have defined an SLO/error budget and set up monitoring/alerting around it.
[ ] I have some form of backup strategy configured.
[ ] I use NextCloud for a limited section of my todo list, and have plans to transfer my calendar and full todo list.
[ ] Write a blog post.

Questions from Initial Exploration

Should I use sqlite with a persistent volume mounted?

Or should I use an RDS database?

Should I configure the RDS database via terraform or via
https://github.com/MYOB-Technology/ops-kube-db-operator
How should we be performing database migrations?

One off operation that is documented? (I think yes)

How do we want to manage database passwords?

How should we handle the creation of user accounts? I.e. I don't want to
operate fulltime as the admin user.

OC_PASS=password php occ user:add -g admin --display-name=mattjmcnaughton --password-from-env mattjmcnaughton

Run php occ app:install (tasks|deck|calendar|mail|notes)

Should they be as part of the init process of the pod, or one time
operations?

I believe one-time operations

Can configure as a run once Kubernetes job if we want.


[feature][datasource] Main add doris

Purpose of this pull request

Check list

[ ] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs

Please fix conflicts

Hi All, Is this this still going on ?


Generated code triggers clippy::redundant-static-lifetimes warning

When using const_declaration! on Vec<u8>, the generated is made of const XXX: &'static [u8] lines, which triggers the clippy::redundant-static-lifetimes clippy lint.
I worked around this by stuffing #[allow(clippy::redundant_static_lifetimes)] lines in the generated code, but it is probably better to fix this at the source.
Thank you

Fixed in 1.6.3

Reopened due to https://github.com/Eolu/const-gen/issues/13
1.6.4 reverts this change. This will require more work than anticipated.

Faced the same issue.
For future readers, here's what I came up with:
let const_declarations = [
    ...
]
.map(|s| "#[allow(clippy::redundant_static_lifetimes)]\n".to_string() + s.as_str())
.join("\n\n");


Contract verifiable mocks using shared examples (discussion)

Background
Apologies if this isn't the best place to have this discussion. What follows is a largely incomplete idea but one I think is potentially useful and I wanted to get this out of my head and see firstly, if other people think this could be a good idea and secondly, if its technically feasible.
If people think this idea is workable, then I'm very happy to help with implementation as it's been a while since I contributed to RSpec (or indeed any open source project).
Some of the ideas that follow are inspired by the work of Sandi Metz in her Ruby book and also JB Rainsberger and the idea of "contract tests". Sorry if this is a bit long-winded.
Expected behavior
I'm currently working on some code in a Rails app that defines an abstract role. The role is implemented as a Ruby mixin.
It will typically be implemented by an ActiveRecord object but it doesn't have to be as there's no tight coupling.
The core behaviour is defined in a module. This module expects the object it extends to conform to a particular interface in order for it's behaviour to work.
I've tested this behaviour by writing shared examples for the mixin - both in terms of behaviour and the interface contract they require of the object being extended.
Elsewhere I'm representing this role with a mock but I have no way to verify that my mock conforms to the interface defined by the module.
Mixins aren't the only way of defining a role. We can also have more implicit roles, or "duck types". As Ruby doesn't have interfaces, we can instead use our tests to define the behaviour and contract of a duck type:
RSpec.shared_examples_for "duck" do
  describe 'contract' do
    it { is_expected.to respond_to(:quack) }
  end
end

Now we have a concrete object:
class Mallard
  def quack
  end
end

And we verify it's behaviour:
describe Mallard do
  it_behaves_like 'duck'
end

Success!
Now, SomethingProcessable doesn't live in a isolated world. It's used as a collaborator with something else. Here's a contrived example:
class DuckAlarm
  def initialize(duck)
    @duck = duck
  end

  def trigger
    duck.quack if some_condition_is_met?
  end
end

Our tests for this object are only concerned with testing that the alarm is triggered under the right conditions.  We have a clearly defined role so we are happy to mock it (mock roles, not types):
let(:duck) { double('duck') }

subject { DuckAlarm.new(duck) }

it 'quacks the duck when some condition is met' do
  expect(duck).to receive(:quack)
  subject.trigger
end

So far, so good. Now we run into the familiar issue that is often used to criticise mocking, especially in the dynamic world of Ruby. What happens if our interface changes?
We decide that Duck.quack should actually be Duck.quack(volume).
We update our shared examples and Mallard. But we have a bug. DuckAlarm is still using the old interface but it's specs haven't failed because we haven't updated our mock.
Actual behavior
So what could we do about this? Clearly the fault doesn't lie with mocking as a concept - it is us who has forgotten to update our mock, which, being as much an implementation of our role as our concrete types should be updated, but we're missing the feedback to make this obvious.
RSpec already gives us a form of verifiable mock - we could use instance_double('Mallard'). But this feels like a code smell - we could have many ducks. Which one do we choose? Why do we care? Aren't we supposed to be mocking roles, not types?
We already have a definition of the Duck contract we could use. What if our mocks could be verified against this contract instead?
So, given our above contract shared examples, what if we could have:
# duck is auto-verified against duck.contract
let(:duck) { contract_verifiable_mock('duck') }

Or if the auto-matching of names to contracts feels too much like magic, we could be more explicit:
let(:duck) do
  contract_verifiable_mock('duck', it_behaves_like: 'duck contract')
end

Is this a feasible idea? Could this be made to work? Am I completely crazy? Discuss!

I feel like you could already achieve this using something like this:
RSpec.shared_examples_for("ducks") do
  let(:contract) do
    Class.new do
      def quack(text)
        # ...
      end
    end
  end
  let(:duck) { instance_double(contract) }
end

I think this is an interesting idea though, having the ability to define a definitive contract and use a double that matches that contract, I feel the verifying double stuff could do this already if we gave it a class like this to make it work?

@lukeredpath there are a couple existing projects that might do what you want (or something similar to what you want):

https://github.com/cvincent/rspec-fire-roles (targeted rspec-fire, which became rspec's verifying doubles when merged into rspec-mocks)
https://github.com/psyho/bogus (particularly the contract testing feature)

@lukeredpath I have been in your shoes since 2012, precisely because of JB Rainsberger (and later Sandi Metz). What I do is call it_behaves_like 'foo contract in every class that uses foo, so when the interface changes all dependent spec files will also fail.
Note: contracts with respond_to? won't cover argument changes.


Commiting documents for Be-Secure github page

@asa1997
Please check the document and share your feedback.

@jobyko @sumodgeorge @panickervinod LGTM
@panickervinod Do take a look at the site. https://jobyko.github.io/Be-Secure_web/#


fix: Don't keep incredibly huge ellipses in the visual tree

fixes https://github.com/unoplatform/Uno.Themes/pull/552
Bugfix
The ripple effect keeps huge ellipses in the visual tree which are clipped, causing ScrollViewer to allow scrolling while it should not.
Description
The Ellipse is now set to Scale<X|Y> = 0 by default, and restored at the end of the effect.
PR Checklist

[x] Commits must be following the Conventional Commits specification
[x] Tested UWP
[x] Tested iOS
[x] Tested Android
[x] Tested WASM
[x] Tested MacOS
[x] Contains No breaking changes

/azp run

/azp run

/azp run


Code Snippet & API Reference support for Ruby

Code Snippet & API Reference support for Ruby

Closing out in favor of https://github.com/stripe/vscode-stripe/issues/173