File decryption routine in Payload.c is incompatible with activated testkit/devkit

The piece of code below  (within payload.c) is not compatible with an activated testkit/devkit causing an error upon loading henkaku and h-encore on those devices.
The routine expects an error to occur before taihen modules are loaded and sets g_homebrew_decrypt to 1, if g_homebrew_decrypt is set to 1 it will then set the modules with root privileges by adding the 0x40 value to the module's flags, on the other end, this does not happen when g_homebrew_decrypt is set to 0.
Activated development units however natively allow fself to be loaded, which does not result in an error despite taihen modules not being loaded and patches not performed, and will therefore not use the 0x40 root flag value, this will result in the C2-12848-3 error later on in the henkaku chain (see pictures below).
// setup file decryption
unsigned hook_sbl_F3411881(unsigned a1, unsigned a2, unsigned a3, unsigned a4) {
	LOG("sbl_F3411881(0x%x, 0x%x, 0x%x, 0x%x)", a1, a2, a3, a4);

	unsigned res = hook_resume_sbl_F3411881(a1, a2, a3, a4);
	LOG("sbl_F3411881: %x", res);
	unsigned *somebuf = (unsigned*)a4;
	u64_t authid;

	if (res == 0x800f0624 || res == 0x800f0616 || res == 0x800f0024 || (res >= 0x800f0b30 && res <= 0x800f0b3f)) {
		DACR_OFF(
			g_homebrew_decrypt = 1;
		);
	// BEGIN 3.60
		somebuf[42] = 0x40;
	// END 3.60

		return 0;
	} else {
		DACR_OFF(
			g_homebrew_decrypt = 0;
		);
	}
	return res;
}

This is out of scope, we won't be supporting testkit/devkit.

After running HENkaku R12:
On unactivated DevKit in DevMode: error C1-9649-8 when launching any homebrew.
On activated DevKit in DevMode: error C2-12848-3 when launching any homebrew.
On DevKit in Release Mode: no error when launching any homebrew.


[Docs] fix item activation on cmd+click

As raised in https://github.com/mui-org/material-ui/issues/18756#issuecomment-563434855
Just relying on findActiveIndex seems to be enough. This code would activate items when cmd+clicked (or middle click) without scrolling.
Alternatively we could pass the click event and check for .metaKey and middle mouse button, but that seems overly complex to me.

[x] I have followed (at least) the PR section of the contributing guide.

The logic was added to work around edges: try https://deploy-preview-18765--material-ui.netlify.com/components/checkboxes/#api and click on the API anchor.
I would prefer that we ignore these cmd+click events instead:
https://github.com/mui-org/material-ui/blob/d30e5ae648d7b499161f4dd31da8c846d99a990e/docs/src/modules/components/MarkdownLinks.js#L6-L13
Also, I'm wondering if we shouldn't follow react-router link logic rather than next.js link logic

https://github.com/ReactTraining/react-router/blob/ea44618e68f6a112e48404b2ea0da3e207daf4f0/packages/react-router-dom/modules/Link.js#L45
https://github.com/zeit/next.js/blob/18a9c7e371efc4c487f9c3599c3211ce30009d6c/packages/next/client/link.tsx#L158

@Janpot Thanks for the attention to the details :)


Out of order language tabs

Describe the bug
When using the language tabs are configured in a different order than shown in customization, the tabs seem to no longer switch properly between languages anymore.
Expected behavior
The language to update when switching between language tabs.
Current behavior
Language gets stuck on a language and does not load the language of the currently selected tab.
Steps to reproduce
Adding the following languageTabs to the themeConfig will cause the language to render as intended.
            languageTabs: [                 {                     highlight: "bash",                     language: "curl",                     logoClass: "bash",                 },                 {                     highlight: "python",                     language: "python",                     logoClass: "python",                     variant: "requests",                 },                 {                     highlight: "go",                     language: "go",                     logoClass: "go",                 },                 {                     highlight: "javascript",                     language: "nodejs",                     logoClass: "nodejs",                     variant: "axios",                 },                 {                     highlight: "php",                     language: "php",                     logoClass: "php",                 }             ],
However, when changing the position of PHP language (or any other language), causes the tabs to no longer function properly.
            languageTabs: [                 {                     highlight: "bash",                     language: "curl",                     logoClass: "bash",                 },                 {                     highlight: "php",                     language: "php",                     logoClass: "php",                 },                 {                     highlight: "python",                     language: "python",                     logoClass: "python",                     variant: "requests",                 },                 {                     highlight: "go",                     language: "go",                     logoClass: "go",                 },                 {                     highlight: "javascript",                     language: "nodejs",                     logoClass: "nodejs",                     variant: "axios",                 }             ],
Screenshots

Context
PHP or shell has preference within the wanted documentation, so I prefer to have it as the first two options available. This is not a huge issue in general, but would be nice to be able to do this.
Your Environment
Version used:

docusaurus-plugin-openapi-docs: 1.7.0
mozilla firefox for ubuntu: 111.0.1

Hi @Gijsdeman, thanks for reporting.
The variant is currently a required property. We'll update the examples in the documentation.

Actually, it seems that it's only "required" once the default order is changed. This smells more like a bug. We'll investigate a bit more and will keep you updated.

Same here with Docusaurus 2.4.1 and plugin 2.0.0-beta.3.
languageTabs: [
  {
    highlight: "bash",
    language: "curl",
    logoClass: "bash",
    variant: "cURL",
  },
  {
    highlight: "go",
    language: "go",
    logoClass: "go",
    variant: "native",
  },
  {
    highlight: "javascript",
    language: "nodejs",
    logoClass: "nodejs",
    variant: "axios",
  },
],

With the languageTabs config above, click tab go or nodejs will crash:

I also just ran into this. Some potentially helpful information:
Potential source of the bug
The crash message includes the "Available values" of variants for the current languageTab. Those available variant values appear to align with the order of the default languageTabs, as defined in CodeSnippets/index. In other words, whichever languageTab you define 3rd will be looking for one of the variants defined as the 3rd default, i.e. Go's  native variant.
I see that there's some config merging going on in that component. I suspect that the merging is resulting in most properties taking on the customized sequence of languageTabs, but not updating the associated variants property. (Which would make sense, if we're not defining the variants property in our reordered configuration.)
A workaround
On a whim, I tried defining the variants property on each of the reordered languageTabs elements in my configuration. It works! The page no longer crashes, and all languages/variants display properly.
So I guess if the tabs are reordered, both the variant and variants properties become required, for any tab that is in a different position than its default.
As an example, this configuration for the previous comment functions correctly for me, with Docusaurus v2.4.1 and plugin v2.0.0-beta.4:
languageTabs: [
  {
    highlight: "bash",
    language: "curl",
    logoClass: "bash",
    variant: "cURL",
  },
  {
    highlight: "go",
    language: "go",
    logoClass: "go",
    variant: "native",
    variants: ["native"],
  },
  {
    highlight: "javascript",
    language: "nodejs",
    logoClass: "nodejs",
    variant: "axios",
    variants: ["native", "axios", "request", "unirest"],
  },
],

I also just ran into this. Some potentially helpful information:
Potential source of the bug
The crash message includes the "Available values" of variants for the current languageTab. Those available variant values appear to align with the order of the default languageTabs, as defined in CodeSnippets/index. In other words, whichever languageTab you define 3rd will be looking for one of the variants defined as the 3rd default, i.e. Go's  native variant.
I see that there's some config merging going on in that component. I suspect that the merging is resulting in most properties taking on the customized sequence of languageTabs, but not updating the associated variants property. (Which would make sense, if we're not defining the variants property in our reordered configuration.)
A workaround
On a whim, I tried defining the variants property on each of the reordered languageTabs elements in my configuration. It works! The page no longer crashes, and all languages/variants display properly.
So I guess if the tabs are reordered, both the variant and variants properties become required, for any tab that is in a different position than its default.
As an example, this configuration for the previous comment functions correctly for me, with Docusaurus v2.4.1 and plugin v2.0.0-beta.4:
languageTabs: [
  {
    highlight: "bash",
    language: "curl",
    logoClass: "bash",
    variant: "cURL",
  },
  {
    highlight: "go",
    language: "go",
    logoClass: "go",
    variant: "native",
    variants: ["native"],
  },
  {
    highlight: "javascript",
    language: "nodejs",
    logoClass: "nodejs",
    variant: "axios",
    variants: ["native", "axios", "request", "unirest"],
  },
],

also noticed that if I want to remove a variant / reorder a variant - it doesn't appear to work. for instance, I just wanted to show native and axios under nodejs but it always uses the default variants. I suspect this is due to how lodash.merge merges the variants array here: https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/blob/v3.0.0/packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/CodeSnippets/index.tsx#L179

adding to roadmap with the goal of expanding support for more languages and allow flexible ordering/inclusion

Addressed in #862


affected/package: https://github.com/qax-os/excelize, https://github.com/tealeg/xlsx

What version of Go are you using (go version)?

$ go version
go1.21

Does this issue reproduce with the latest release?
After writing strings to Excel, the file content is all empty.
What operating system and processor architecture are you using (go env)?
windows, amd64
go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\18627\AppData\Local\go-build
set GOENV=C:\Users\18627\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\18627\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\18627\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.0
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\18627\AppData\Local\Temp\go-build3040523275=/tmp/go-build -gno-record-gcc-switches

What did you do?
After downgrading the Go version to 1.20.7, it worked correctly.

What did you expect to see?
Hope this issue gets resolved in Go 1.21.
What did you see instead?

not a go project issue

Yeah, I saw that problem, too
m1 pro
go version go1.21.0 darwin/arm64


Add ReleaseDate to products

It's annoying to me that some products that get just released aren't first in the list of products. That's because products on home and products page are ordered by CreateDate atm.
I added ReleaseDate to Products table and models. It is set when the product status is changed to "Released", otherwise it's null.
I took care of the existing products by adding a Post deployment script that will update the ReleaseDate with CreateDate for already released products.
I tested the changes locally.
@Pustalorc @Gamingtoday093 Please have a look at those changes and let me know what do you think.

Looks Good!
But .OrderByDescending(x => x.ReleaseDate is null ? x.CreateDate : x.ReleaseDate)
Could be Simplified to .OrderByDescending(x => x.ReleaseDate ?? x.CreateDate)

Yeah could have done it that way, thanks @Gamingtoday093


Work with PI?

Hi,
wanted to use this software under PI ( PI4...) but get stuck during installation.
Did you test it on windows?

run 'python3 ./setup.py install'
I done
sudo python3 ./setup.py install
output was fine.

But when start to start ( example)
pi@pi4:~/git/pylontech-python $ examples/getStackedBatteriesInfos/main.py
Traceback (most recent call last):
File "/home/pi/git/pylontech-python/examples/getStackedBatteriesInfos/main.py", line 2, in
from pylontech import PylontechStack
ImportError: cannot import name 'PylontechStack' from 'pylontech' (/usr/local/lib/python3.9/dist-packages/python_pylontech-0.2.1-py3.9.egg/pylontech/init.py)
Any idears?
I'm just a python user... not programmer -:)
python --version
Python 3.9.2
Thanx for help
BR
Andreas

oh sorry - looks like i have to fix the description.
Windows... - not for me - sorry (but it may work ... (thinking about
replace /sev/ttyUSB0 to COMx in your case)
with a raspberry start here:
(i use a Raspi 4 and a cheap - 4€ -  RS485 converter)
@.***:~ $ pip install pylontec            # this installs the
python module from pypi.org
Looking in indexes: https://pypi.org/simple,
https://www.piwheels.org/simple
Collecting pylontech
Downloading
https://www.piwheels.org/simple/pylontech/pylontech-0.1.2-py3-none-any.whl
(10.0 kB)
Requirement already satisfied: pyserial in
/home/bernd/.local/lib/python3.9/site-packages (from pylontech) (3.5)
Installing collected packages: pylontech
Successfully installed pylontech-0.1.2
@.***:~ $ python3 ~/workbench/pylontech-
python/examples/getStackedBatteriesInfos/main.py
evaluating the stack of batteries (0..n batteries)
b'20024xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20034xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
('Timeout waiting for an answer.',)
number of batteries found: 2
received data:
{'SerialNumbers': ['xxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxx'],
'Calculated': {}}
b'20024600xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20024600xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20024600xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxx'
could you try it?
Best Regards
Bernd.
On Fri, 2022-12-30 at 02:42 -0800, reviscan wrote:

Hi,
wanted to use this software under PI ( PI4...) but get stuck during
installation.
Did you test it on windows?

run 'python3 ./setup.py install'
I done
sudo python3 ./setup.py install
output was fine.
But when start to start ( example)
@.:~/git/pylontech-python $
examples/getStackedBatteriesInfos/main.py
Traceback (most recent call last):
File "/home/pi/git/pylontech-
python/examples/getStackedBatteriesInfos/main.py", line 2, in
from pylontech import PylontechStack
ImportError: cannot import name 'PylontechStack' from 'pylontech'
(/usr/local/lib/python3.9/dist-packages/python_pylontech-0.2.1-
py3.9.egg/pylontech/init.py)
Any idears?
I'm just a python user... not programmer -:)
python --version
Python 3.9.2
Thanx for help
BR
Andreas
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this
thread.Message ID: @.>

Hi,
Thanx so far...
I'm testing only under linux -:)
PI4...1GB..new image.rashpian
pip install pylontec  -> TYPO!
must be:
sudo pip install pylontech
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pylontech in /usr/local/lib/python3.9/dist-packages/pylontech-0.1.2-py3.9.egg (0.1.2)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from pylontech) (3.5b0
But same result...
python3 examples/getStackedBatteriesInfos/main.py
Traceback (most recent call last):
File "/home/pi/git/pylontech-python/examples/getStackedBatteriesInfos/main.py", line 2, in
from pylontech import PylontechStack
ImportError: cannot import name 'PylontechStack' from 'pylontech' (/usr/local/lib/python3.9/dist-packages/python_pylontech-0.2.1-py3.9.egg/pylontech/init.py)
Python broken?
Version?
python --version
Python 3.9.2
or how can I remove the old one?
BR

Hi,
uninstall worked..
sudo pip uninstall pylontech
then
sudo pip install pylontech
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pylontech
Downloading https://www.piwheels.org/simple/pylontech/pylontech-0.1.2-py3-none-any.whl (10.0 kB)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from pylontech) (3.5b0)
I  nstalling collected packages: pylontech
Successfully installed pylontech-0.1.2
Now it works... but shows only 3 insted of 6 packs?!
python3 examples/getStackedBatteriesInfos/main.py
evaluating the stack of batteries (0..n batteries)
b'20024600C0220250505442483032323039363132353230F6D6'
b'20034600C0220350505442483032323039363132333734F6CD'
b'20044600C0220450505442483032323039363132333635F6CB'
number of batteries found: 3
received data:
{'SerialNumbers': ['PPTBH02209612520', 'PPTBH02209612374', 'PPTBH02209612365'], 'Calculated': {}}
b'20024600C06E00020F0CC60CC50CC80CC50CC80CC90CC60CC60CC80CC90CC90CC90CC30CC60CC3050BA50B870B870B910B910006BFA42CEC02C350017DE4CE'
b'20024600B01402D002B79800FAFF06C0F92D'
b'20024600C04000020F000000000000000000000000000000050000000000000000000E800000F161'
b'20034600C06E00030F0CC50CC20CC40CC60CC70CC40CC70CC50CC40CC50CC60CC90CC70CC90CC7050BAF0B910B910B9B0B9B0006BF972AF802C3500160E4D6'
b'20034600B01403D002B79800FAFF06C0F92B'
b'20034600C04000030F000000000000000000000000000000050000000000000000000E800000F15F'

search for "manualBattcountLimit=3) and replace it as you wish:
x = PylontechStack("/dev/ttyUSB0", baud=115200, manualBattcountLimit=3)
=>
x = PylontechStack("/dev/ttyUSB0", baud=115200, manualBattcountLimit=6)

Yes now it works with my 6 US2000B Parts.
Thanx.
Do you know if it also works with US2000C devices? Will check this week.
I wrote a example for emoncms to upload the batteries percntage there. -> shall we add to example?

On Sun, 2023-01-01 at 07:31 -0800, reviscan wrote:

Yes now it works with my 6 US2000B Parts.
Thanx.
Do you know if it also works with US2000C devices? Will check this
week.
I wrote a example for emoncms to upload the batteries percntage
there. -> shall we add to example?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID:
@.***>
Adding an example would be fine.

Describing the use and the setup would also help.
On an approach to an existing project i often i have trouble to
understand, which things are needed and what do they do.
To me would be helpful how your script feeds emoncms and how is it part
of an system: which are the communicating partners.
Just sketch it as introduction in your script (e.g. 2 sentences about
emoncms and the expected OS/HW), this would be fine.
I like also to add an MQTT example - next time...

On Sun, 2023-01-01 at 07:31 -0800, reviscan wrote: Yes now it works with my 6 US2000B Parts. Thanx. Do you know if it also works with US2000C devices? Will check this week. I wrote a example for emoncms to upload the batteries percntage there. -> shall we add to example?

Hi, nice job and thanks for sharing!
I'm trying to use this with 6xUS5000 Pylontech Batteries and a Raspberry Pi4B but I'm running into problems, hope you can help me out..
pi@xxxxxxxxxx:~/.local/lib/python3.7/site-packages/pylontech $ python3 pylontech_stack.py
b'20024xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20034xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20044xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20054xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20064xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20074xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20024xxxxxxxxxxxxx'
Traceback (most recent call last):
File "pylontech_stack.py", line 120, in
stackResult = pylon.update()
File "pylontech_stack.py", line 76, in update
raws = self.pylon.receive()
File "/home/pi/.local/lib/python3.7/site-packages/pylontech/pylontech_base.py", line 154, in receive
data = self.rs485.receive_frame(end_time=end_time, start=start_byte, end=end_byte)
File "/home/pi/.local/lib/python3.7/site-packages/pylontech/pylontech_base.py", line 108, in receive_frame
self.verbose_print("\r <- " + frame.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfe in position 15: invalid start byte
I tried it a few times... similar results, one on position 0xfe 6, another time 0xff position 13;
and once a very different error
pi@xxxxxxxxxx:~/.local/lib/python3.7/site-packages/pylontech $ python3 pylontech_stack.py
b'20024xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20034xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20044xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20054xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20064xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20074xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20024xxxxxxxxxxxxx'
Traceback (most recent call last):
File "pylontech_stack.py", line 120, in
stackResult = pylon.update()
File "pylontech_stack.py", line 78, in update
decoded = self.decode.decodeAnalogValue()
File "/home/pi/.local/lib/python3.7/site-packages/pylontech/pylontech_decode.py", line 158, in decodeAnalogValue
self.data['CommandValue'] = int(payload[i:i + 2], 16)
ValueError: invalid literal for int() with base 16: b''
Hope you can help! thanks....

Hi,
from my side I had also a couple of hardware problems.
First of all with the RS232 ( console) it does not worked for me at all. US2000B yes. US2000C not.
With RS485 and my laptop all worked fine... but with the PI sometime yes / sometimes not.
Mostly after a reboot I had to replug the adapter.
After change to a isolated adapter.
e.g. DSD TECH SH-U11F isolated USB-zu-RS485-RS422-Konverter works fine.
Plug in the Term-TX ( short) connect A and B ... and all works like a charm.
I'm only using the RS485 with 9600 or 115200 baud. Depends on the DIP of the Pylon.
RS485 the termination is allays a mess... but now an isolated mess.
BR
Andreas

I try running the program on my computer instead of the Pi....
I'm using the DSD TECH SH-U20A RS485 adapter with 9600baud, my inverter communicates with the batteries at 9600 so I have to stick with that..... unless it is possible to poll the info from one of the slave batteries, which I've not been able to do.. is that something you've tried? does it work?

the "SD TECH SH-U20A RS485" is not isolated.... I recommend isolated.
and you need a RS485 BUS termination and symmetry.
This should be done by one device... ( the BMS does not do this... because we can have multiple)
like: https://de.m.wikipedia.org/wiki/Datei:Rs485-bias-termination.svg
You are connected to the RS485 Port?
Only use 2 wires?
the other have other stuff on it ( do not short!)

I'm connected to the upper RS485 Port, 3 wires, ground + A&B.... other wires cut short
The Inverter (Phocos Any-Grid) is connected to the lower RS485 port
not sure how the RS485 BUS termination and symmetry works... there's only one device connected to the port
I'll order the DSD TECH SH-U11F isolated

On Tue, 2023-02-07 at 08:25 -0800, Gboyegs wrote:

I'm connected to the upper RS485 Port, 3 wires, ground + A&B....
other wires cut short
The Inverter (Phocos Any-Grid) is connected to the lower RS485 port
not sure how the RS485 BUS termination and symmetry works... there's
only one device connected to the port
Is sounds strange.
On My US2000c the upper Port is CAN, below of it is the RS-485.
on the right from them are the link ports, Master has the upper link
port empty.

Note: Be sure - always use the newest US2000 (newest firmware) as
master.
Do not use the RS-485 for the inverter and your computer with this
library. This library does not care about your inverter. Your inverter
and the library may send as they like and this would produce garbage on
the line.
just check - it should be ~120 Ohm if you disconnect, switch off and
measure between A and B. (e.g. look
at https://know.innon.com/bias-termination-rs485-network)
RS-485 should have only 2 ends (and them terminated) some adapters
include the termination resistors
If the RS-485 is occupied by the inverter, i recommend the CAN
connector instead. But i had no time to get into it.

Hi, I took your advice and temporarily disconnected the Inverter... more info came through this time..
pi@xxxxxxxxxx:~/.local/lib/python3.7/site-packages/pylontech $ python3 pylontech_stack.py
b'20024xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20034xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20044xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20054xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20064xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
b'20074xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
('Timeout waiting for an answer.',)
b'20024600F07A00020F0D170D140D150D150D180D170D140D150D150D180D170D140D150D150D18050C0B0BEF0BF00BED0C0B00C9C447FFFF04FFFF00120172B90186A0E2D1'
b'20024600B01402D002AFC800C8FE0CC0F915'
b'20024600A04200020F000000000000000000000000000000050000000000000000000E80000000F101'
b'20034600F07A00030F0D140D120D120D120D140D140D120D120D120D140D140D130D130D130D14050BFD0BEF0BF10BED0BFE00BFC41DFFFF04FFFF00110172B90186A0E2B4'
b'20034600B01403D002AFC800C8FE0CC0F913'
b'20034600A04200030F000000000000000000000000000000050000000000000000000E80000000F0FF'
b'20044600F07A00040F0D180D150D160D140D180D180D150D160D140D180D190D150D160D150D18050BFB0BEE0BED0BE90BF800BDC44FFFFF04FFFF00B2016CC90186A0E263'
b'20044600B01404D002AFC800C8FE0CC0F911'
b'20044600A04200040F000000000000000000000000000000050000000000000000000E80000000F0FD'
b'20054600F07A00050F0D140D120D120D120D150D140D120D120D120D140D150D120D130D120D14050BF90BE80BE90BE40BF600C1C41DFFFF04FFFF00B5016C6A0186A0E2D4'
b'20054600B01405D002AFC800C8FE0CC0F90F'
b'20054600A04200050F000000000000000000000000000000050000000000000000000E80000000F0FB'
b'20064600F07A00060F0D170D130D140D130D140D160D140D140D130D150D170D140D140D140D15050C010BF00BF10BEE0BFC00CBC433FFFF04FFFF00120172B90186A0E2E7'
b'20064600B01406D002AFC800C8FE0CC0F90D'
b'20064600A04200060F000000000000000000000000000000050000000000000000000E80000000F0F9'
{'ChargePower_kW': 4.90726,
'DischargePower_kW': 0,
'Power_kW': 4.90726,
'RemainCapacity_Ah': 471.39,
'Remain_Percent': 94.0,
'TotalCapacity_Ah': 500.0}
It seems to be missing one battery as I've got 6x100AH units (Pylontech UP5000)
So it seems the interference was the problem... shame, because I have to keep the inverter connected to communicate with the battery BMS...
The upper and lower ports of the newer Pylontechs are labels A/CAN -- B/RS485 respectively, but apparently both are identical...

ok.
Fine for the Inverter vs. your Computer fight ;-)

On Tue, 2023-02-07 at 15:23 -0800, Gboyegs wrote:

It seems to be missing one battery as I've got 6x100AH units
(Pylontech UP5000)
So it seems the interference was the problem... shame, because I have
to keep the inverter connected to communicate with the battery BMS...
Fine for the Inverter vs. your Computer fight - clarified... ;-)

The upper and lower ports of the newer Pylontechs are labels A/CAN --
B/RS485 respectively, but apparently both are identical...
the connector is identical, but the labeling and the manual state the
different interface type.

I like to close this thread, as we are off topic from "Work with Pi".
(Sorry, i should mention this earlier as some people like to use this
thread to find useful information about the topic - at best straight to
the solution.)
== Your topic my be previously "communication failure" and now like
"Request: support CAN communication" or "work parallel to inverter also
connected to RS-485 (some kind of sniffing mode)"

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID:
@.***>

closing this issue as issue from requestor (working with Pi) solved.
your welcome to open Issue on a different topic ;-)


Create codeql-analysis.yml

Pull Request Test Coverage Report for Build 290114671

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 76.068%

Totals

Change from base Build 283816521:
0.0%

Covered Lines:
712

Relevant Lines:
936

💛  - Coveralls


Create data agreement record only when the lawfullusage is not consent and not legitimate_interest

At the initial step, create the data agreement record only if the lawfullusage is not consent and not legitimate_interest
If the lawfullusage is consent or legitimate_interest then create the data agreement record only when we update the consent.
API- https://consent-bb-swagger.igrant.io/v2023.8.2/index.html#put-/service/individual/record/data-agreement-record/-dataAgreementRecordId-

Just checking: What happens in the following scenario?
A person:

Opt-out
Opt-in
Opt-out

Why isn't the initial record in this case marked "Opt-Out"? @georgepadayatti


grid api refactoring plan

unified mapping from chain types to db types

define a proper db schema (consider pk/fk/idx)
reduce the use of jsonb objects
db should return its own types (models)
https://github.com/threefoldtech/tfgrid-sdk-go/issues/843
consider bun/sqlc

api v2

define a proper api schema
api client/ routing pkgs
https://github.com/threefoldtech/tfgrid-sdk-go/issues/57
https://github.com/threefoldtech/tfgrid-sdk-go/issues/49
https://github.com/threefoldtech/tfgrid-sdk-go/issues/340
https://github.com/threefoldtech/tfgrid-sdk-go/issues/50

testing

https://github.com/threefoldtech/tfgrid-sdk-go/issues/610
https://github.com/threefoldtech/tfgrid-sdk-go/issues/338
https://github.com/threefoldtech/tfgrid-sdk-go/pull/695
revisit the integration tests
https://github.com/threefoldtech/tfgrid-sdk-go/issues/643

API server

a validation layer for all (filtering/paginating/sorting) key/value

app structure

separate bins for (api-server/node-indexer/chain-processor)
separate db client to (query-client/mutate-client)
query client used with the server, mutate-client used with processor/indexer
support running from config/flags

docs

https://github.com/threefoldtech/tfgrid-sdk-go/issues/217
write a developer guide explain each part of the project
explain the tricky filters (dedicated/rentable/...)

5/11/2024
Worked on listing all mapping happens in

graphql processor
gridproxy triggers
(Farms, addEvent, Service Contracts, Extra Fee For nodes, Price Stored, Average Price Stored)

5/11
Listed events happen and how are they handled with associated triggers:

Policies
Nodes
Twins


Danish langauge

Checklist

[x] I checked for similar existing requests (both open and closed) before posting.
[x] My request is generic, other users may benefit from it too.

Proposal
I would like to see danish added for langauges.
Additional info
Can do the translation

You could create this translation yourself.
Go to this folder: https://github.com/nielsfaber/alarmo/tree/main/custom_components/alarmo/frontend/localize/languages and download the en.json file.
Translate all the lines (right part of each line is translation) and save it into a da.json file.
I believe you could upload it (into the same folder of before), by clicking on the right side:

This should open a 'pull request' allowing me to review it and give you permission to make changes to Alarmo.
In the same way you can also make updates in the future.
If you wish to test your translation before uploading, please let me know and I can create a file for you which you can run locally.
Good luck 👍


Save current state for dragablz.

I would like to know how to save the current state of tabs and floating windows.

look at the doobry app from ButchersBoy, in the MainWindowViewModel there is an Method called RestoreLayout.

Please try with code at #210


make ToTensor() cope with all PIL image types

YCbCr breaks the code without warning. Changed the code to make ToTensor() cope with all PIL image types.

thanks!


v1.5.0 Release Checklist Due 2018-12-18

Remaining actions:

[ ] Review release (product owner)
[ ] Approve release (product owner and release manager)
[ ] Create binaries (any DRUD maintainer)
[ ] Draft release notes (release manager)
[ ] Coordinate announcements for blog, newsletter, etc with marketing (product owner)
[ ] Create release (release manager)
[ ] Update Roadmap (TPM/release manager)
[ ] Followup issues spun off if we need them.

For additional background information, please see our Product Release instructions here.

I note that php7.3 will be released on December 13, so 12/18 is the perfect date for a release that includes php7.3. Doing the PR now.

Proposed Test Plan for v1.5.0 - Feel free to add or comment.
The basic idea here is to give the release candidate lots of exercise, so these are just a starting place. We do want to hit all these, but the big idea is to do a large variety of things and look for regressions.

MariaDB 10.1 Support:

ddev rm -RO and ddev config --mariadb-version=10.1. Verify correct setting in .ddev/config.yaml. ddev start, import a db, export a db. Verify correct behavior.
Make a snapshot, ddev snapshot --name=10.1snapshot
ddev rm and set back to 10.2 with ddev config --mariadb-version=10.2.
ddev start. ddev logs -s db should show that an upgrade happened successfully.
ddev snapshot --name=10.2snapshot
Try to restore the 10.1 snapshot. It should complain.
Now ddev config --mariadb-version=10.1 again and start. It should fail and complain because it has 10.2 db.
BuT you should be able to ddev restore-snapshot 10.1snapshot and have it come up.
Then try ddev restore-snapshot 10.2snapshot. It should complain that it can't do that.
Remove the config before continuing.

PHP 7.3:

Configure php 7.3 with ddev config --php-version=7.3 and ddev start
ddev ssh and verify that php --version is as expected
On a Drupal 8 project visit admin/reports/status/php to verify. (or use phpinfo.php)

Webcaching:

On macOS only, edit config.yaml for webcache_enabled: true and ddev start.
Visit the site. Install a site. It's so fast. Verify that file contents are as expected both on host and in container after you create content using the web project and after you create a file on the host.
Use ddev list and ddev describe to verify syncing status, use `ddev logs -s bgsync -f to see it in a window while you work.
Use ddev composer create and other ddev composer commands, verify correct behavior. And super-important: Make sure that the contents (created in the container) appear properly on the host.
Verify that webcache_enabled: true is unacceptable option on windows/linux

Symlinks (Windows 10 Pro with Docker for Windows only)

Start with developer mode off on your Windows machine.
Start a project.
Create a few random symlinks inside the container. They should be valid symlinks. (but are actually XSym files)
Use ddev composer require to start something up, maybe ddev composer require sebastian/version. You should see it complain that it can't fix the symlinks.
Now enable developer mode.
Repeat the steps above to verify that you now get a prompt "Replaced these simulated symlinks" that corresponds to symlinks you create.
Use ddev composer create  to create a nontrivial TYPO3 project. OP's https://github.com/HofUniversityIndieOne2018/red-cross-project is a good one to use. (Or check it out and composer install it.) There are key symlinks in web/typo3conf/ext that should be replaced with real symlinks.

Sentry instrumentation:

Verify that actions you take are reported on sentry.io. If you need a login we'll get you in there.
Verify that request to opt-in happens at the correct time (new release, or first-ever)

Global configuration

Verify that you can use ddev config global to set various items
Verify that you can set global configuration for omit_containers on dba and/or ssh-agent and get the correct result.

Post-start hook only runs when container is actually recreated.

Create a post-start hook. It can just be exec bash -c "echo hi there"
Verify that it gets executed on ddev start
Do another ddev start without changing anything. The hook should not fire.
Change something like php version and ddev start. The hook should fire.
ddev rm && ddev start: The hook should fire.
ddev restart: The hook should not fire.

ddev-ui: Take a little spin with the released ddev-ui to make sure it works with this version of ddev.
uploadprogress: Use apache-fpm and visit the admin/reports/status page of any Drupal project. You should see that uploadprogress is enabled and functioning.
Multiple ssh-keys of various types: See the manual testing instructions in https://github.com/drud/ddev/pull/1295 to create keys and then authenticate with them. Do this with the keys both in the ~/.ssh directory and also in a random directory for use with ddev auth ssh -d <dir>
ddev-router not restarting all the time:

Start project1 and project2
ddev rm project1 and then ddev start it. The ddev-router should not stop or start or be recreated.
Change the http port for project1 and ddev stop and ddev start. The router should be recreated to accommodate the changed port.
ddev rm -a and the router should go down with the last project.

Wordpress in a subdirectory:

ddev composer create wordpress/skeleton and make it work. See packagist (https://packagist.org/packages/wordpress/skeleton) and github repo https://github.com/ttskch/WordPress.Skeleton
Install bedrock, see https://roots.io/bedrock/

_apt user back in web container:

Use a post-start hook to install a debian/ubuntu package.  See (example: https://ddev.readthedocs.io/en/latest/users/extending-commands/#adding-additional-php-modules-example) - Make sure it results in no errors when you start.

Verify ddev config and friends in subdirectory (https://github.com/drud/ddev/issues/1158)

Use ddev config in a subdirectory of an existing project, like in sites/default on a Drupal project. Verify that it updates the main config.yaml rather than creating a new one.
Use ddev ssh in a subdirectory on Windows, make sure it behaves correctly.

Path accessed by another name problem https://github.com/drud/ddev/pull/1324

On a mac, create a project named "junk" in a directory named "junk". Start it.
cd into the same directory, but using cd ../JUNK. ddev start or whatever. You should not get an error.
Use a symlink to the junk directory and cd into that symlink. ddev start there should also work.
Create a project somewhere else named junk and start it. You should get an error.

ddev list --continuous

Run ddev list --continuous in a window while doing lots of things (maybe things above). It should survive anything. No panics please.
ddev auth ssh from Powershell on Windows: See if it works. It should.

MariaDB 10.1 support

ddev config —mariadb-version 10.1 successfully sets the config value
ddev exec mariah —version => 10.1.37

php7.3 support

ddev config --php-version 7.3

ddev exec php --version shows 7.3

TYPO3 System Information window shows PHP v7.3.0-1

webcache

TYPO3 installation works well, had to wait a moment for cache to sync before ddev config would succeed, and used ddev exec touch public/FIRST_INSTALL to initiate the installation process
 due to an intermittent webcache issue recorded in #1339

Drupal8 Umami installation is super-fast, a small delay for cache to catch up.

ddev logs -s bgsync -f outputs continuous log information
.

Windows Symlinks

Sentry Instrumentation

No ~/.ddev/global_config.yaml: asked for permission

Set last_used_version to 1.0.0: asked for permission

Deleted global config and used other commands, including implicit starts: did not ask (assumed opt-out)

After opting in, failing command is sent to Sentry: ddev start does-not-exist

Global configuration

--omit-containers and --nistrumentation-opt-in both correctly set config values through ddev config global

Both dba and ddev-ssh-agent containers can be omitted

post-start hook

Hook fires on a first ddev start

Hook does not fire on second ddev start

Hook fires on ddev rm && ddev start

Hook does not fire on ddev restart

ddev-ui

With apache-fpm and Drupal 8, Upload Progress is enabled.

Created the following keys, which were added on ddev auth ssh:

Identity added: /home/.ssh/delete_dsa (/home/.ssh/delete_dsa)

Identity added: /home/.ssh/delete_ed25519 (andrew@narwhal)

Identity added: /home/.ssh/delete_rsa (/home/.ssh/delete_rsa)

Identity added: /home/.ssh/id_rsa (/home/.ssh/id_rsa)

ddev router restarts

ddev router is up to date (not restarted) when a projects is rm-ed and started

ddev route is restarted when project HTTP port is changed then started

WordPress-in-the-subdirectory

ddev config —project-type php

ddev start

ddev composer create wordpress/skeleton

ddev config —project-type wordpress —docroot wp

ddev start

Apt

hooks:
  post-start:
    - exec: sudo apt-get update && sudo apt-get install ruby

(successful
)

Config in a subdirectory

cd project/

ddev config --show-config-location

mkdir -p some/dir/here

cd some/dir/here

ddev config --show-config-location

ddev config --project-name my-new-project-name

Path accessed by another name

cd Project

ddev config --project-type php

ddev start

cd ../pROJECT

ddev start => no error

ln -s ./Project ./PRJ

cd ./PRJ
ddev start

mkdir ~/anotherdir/Project

cd ~/anotherdir/Project

ddev start => error

ddev list --continuous

Ran for ~an hour over multiple operations, no panics

Worked through the test plan today testing 1e687a79b5104409fda861d08689c4ec608b8757 (bump containers), mostly on Windows 10 Pro/Docker-for-Windows.

(Mariadb 10.1): Used composer to create a TYPO3 v8. ddev config --php-verison=7.1 --mariadb-version=10.1, then ddev composer create typo3/cms-base-distribution  ^8 --no-interaction --no-dev --prefer- dist - Everything seemed to have worked ok.

php 7.3: Worked fine; did it in a php-type project with php-version=7.3

Webcaching (tried on Windows, OK, but needed to chmod sites/default/files, etc. Same old thing. Might be adequate. TODO

Symlinks: Worked with dev mode on, complained with it off. (Couldn't figure out how to install red-cross-project). Manual creation of links worked.

Sentry (I let Monica do this one)

ddev config global - works fine.

Post-start hook: Works fine, actually works right when you create a new hook and ddev start

ddev-ui: Most functionality seemed like it worked the same as the other day.

Uploadprogress: Working perfectly. On d8 it also works with nginx-fpm.

multiple key ssh auth: Everything worked fine.

Router restart: Passed fine.

Wordpress in subdir: I think Andrew and Monica got this better than I did.

apt success: Working fine

ddev config in subdirectory, ddev ssh in subdir: All worked perfectly.

Path accessed by another name: Worked fine.

ddev list --continuous running a lot on several windows mac and windows.

ddev auth ssh from PS works fine.

IMO unless Monica comes up with a late fail we're good to release tomorrow. Andrew will probably do it in the morning, or else we'll do it in the afternoon.
We did discover some not-unexpected issues with the webcache feature - Andrew created #1339 about webcache stopping caching, and we were able to recreate it. Apparently a huge deletion on the host side (at least that's where we know how to do it)  can end up with unison not working. We don't actually have a clue why this is.

Hey folks!
Here's my testing notes for the latest local release as well as UI regression testing:
local notes: https://cl.ly/3f0f4fe87020
UI notes: https://cl.ly/727c47d9bfbb
There were a few hiccups on my end, but nothing that I think should hold up a release. Good work everyone! 🍰 🍾 🎈


Python versions?

Having used this successfully and now setting up on another device, having some issues
I'm running:
/home/user/Downloads/rtsp-timelapse-scripts-main/grab-timelapse-frame.py --city Manchester --output-directory /media/timelapse --output-filenames opsbuilding --url 'rtsp://admin:password@<IP_ADDRESS>:554/Streaming/Channels/101'
But getting:
Traceback (most recent call last):
  File "/home/user/Downloads/rtsp-timelapse-scripts-main/grab-timelapse-frame.py", line 116, in <module>
    main()
  File "/home/user/Downloads/rtsp-timelapse-scripts-main/grab-timelapse-frame.py", line 69, in main
    action=argparse.BooleanOptionalAction,
AttributeError: module 'argparse' has no attribute 'BooleanOptionalAction'

Google suggests python 3.9 is required, but trying to get that running on Ubuntu 2.04 has been a nightmare so far.
Just looking for some clarification on versions, before I pursue - many thanks

OK, got there in the end.  Seems python 3.9 is required, I installed as follows:

apt install software-properties-common
add-apt-repository ppa:deadsnakes/ppa -y
apt install python3.9
apt install python3.9-distutils
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.9 get-pip.py
pip3.9 install astral

I have some other queries:

Can we just capture one image each time the script runs?
Is my script above correct for using astral?  Appears not to be working for me.  Sunset was 30 minutes ago, images still being captures however!

Much appreciated, will test and report back


Provide HEX files as release

Could you please provide the compiled HEX files for the Nordic dongle (and later possible the MDK dongle) so that not everyone needs to install the toolchain needed to compile them.

Hi, are you still around? Or is this repo abandoned?

Hi, the repo is not abandoned :) I have just been very busy these past few weeks, i'm really sorry for the delay.
I just pushed MakerDiary support and pre-compiled hex files, let me know if you find any bugs !


Tagged Release 0.3.8

[x] Update the version in package.json
[x] npm i to regenerate package-lock.json
[x] Create a feature branch in git for the version and create a PR
[x] npm publish to publish the version to npm registry.
[x] Git annotated tag and push to Github

[x] git tag -a v{version} -m "{your message}" to create an annotated tag
[x] git push origin v{version} to push up to the project's
releases

[ ] Docker build and publish tagged Image, see See documentation for more information

[ ] Build a tagged Docker image i.e. docker build -t ld4p/sinopia_editor:{version} .
[ ] Push the tagged version to Dockerhub with docker push ld4p/sinopia_editor:{version}

[x] Create Release notes for the tagged version on Github
[ ] Once tagged release is live on https://development.sinopia.io, this ticket will be assigned to the product owner who will approve the tagged release for deployment on

[ ] Staging at https://stage.sinopia.io/
[ ] Production at https://sinopia.io

Instead of building and tagging a Docker image for the version, I followed these steps to make a 0.3.8 stage and production images:

After successful build and publish to docker hub of commit PR#1095
Pull prod and stage images from Docker hub

docker pull ld4p/sinopia_editor:stage
docker pull ld4p/sinopia_editor:prod


[bump_v18.09] Fix nil pointer dereference in node allocation

Backports #2764 to the newly-named bump_v18.09 branch.

Hmm..I see:
# TODO(stevvooe): Install these from the vendor directory
package github.com/golang/lint/golint: code in directory /home/circleci/.go_workspace/src/github.com/golang/lint/golint expects import "golang.org/x/lint/golint"
make: *** [setup] Error 1
Exited with code 2

@dperny looks like the linter is switched out with PR #2750. may want to cherry-pick from that PR to get these tests passing.


Append to existing file

Is there a way to append to an existing CSV file instead of overwriting it? Adding "true" to the FileWriter() as a second parameter would only do the trick if you wouldn't output a CSV header line.
Please consider this a feature request when it's not possible at the moment.

Hi, @Forage
As your issue says, you can append to an existing CSV file by setting FileWriter()  second parameter true.
beanWriter = new CsvBeanWriter(new FileWriter("target/writeWithCsvBeanWriter.csv", true),
				CsvPreference.STANDARD_PREFERENCE);

As for the header line of CSV, you can control it through writeHeader().  And the overwritting file or appending file is controlled by the writer, the writer is the parameter of the CsvWriter
. Therefore it is unnecessary and unreasonable to Implement this feature which control overwritting or appending file in super-csv CsvWriter.

Hi, @kbilsted
What do you think about this problem?

I think it sounds reasonable to be able to append to an existing file :-)

Hi, @kbilsted
I think the current API can meet the needs of appending file writing, as I replied above , If you need to add the feature of appending file writing to super-csv, do you have any suggestion?
My idea is to add an API which parameter is a file name rather than a writer. In this API, you can implement the appending file writing feature, such as the following:
public AbstractCsvWriter(final String fileName, final CsvPreference preference, boolean append){}

But I don't think it is a good idea.

@dota17  Perhaps the best solution is a simple unit test that show how to append to an existing file. Then we can refer to this test in the documentation. From a concrete example we can better judge.
Also it is a somewhat frequent asked question - so a documentation page may be nice?


Update CHANGELOG.md

Fixing formatting for this page rendering at  https://docs.microsoft.com/azure/cosmos-db/sql-api-sdk-java-v4
Removing conflict indicators.
Formating headings to avoid build issues in docs.

@SnehaGunda can you help get this merged.


subclassed model load_model ValueError?

I am using tf==2.2.0
Tried the collaborative filtering model
https://keras.io/examples/structured_data/collaborative_filtering_movielens/
for saving and loading the model, these worked
tf.keras.models.save_model(model,'./saved_model')
loaded_model = tf.keras.models.load_model('./saved_model')

But after loading the model while prediction, I get value error
ratings = model.predict(user_movie_array).flatten()

    ValueError: Python inputs incompatible with input_signature:
      inputs: (
        Tensor("IteratorGetNext:0", shape=(None, 2), dtype=int32))
      input_signature: (
        TensorSpec(shape=(None, 2), dtype=tf.int64, name='input_1'))

May i know how to fix this?

I tried saving as
tf.keras.models.save_model(model,'./saved_model',
                           overwrite=True,
                           include_optimizer=True,
                           signatures=model.call.get_concrete_function(
                               tf.TensorSpec(shape=(None, 2), dtype=tf.int64, name='input_1')),
                           save_format='tf')

still not working

@ravikyram I am in request for this solution asap, could you please help, Thanks

I have tried
model.save("NameOfYourModel", save_format='tf')

and loaded back with
loaded_tfkmodel = tf.keras.models.load_model('./NameOfYourModel')

still i get
    ValueError: Python inputs incompatible with input_signature:
      inputs: (
        Tensor("IteratorGetNext:0", shape=(None, 2), dtype=int32))
      input_signature: (
        TensorSpec(shape=(None, 2), dtype=tf.int64, name='input_1'))

Found it, Thanks
Actually recreating the model with
keras.models.load_model('path_to_my_model')

didn't work for me
First we have to save_weights from the built model
model.save_weights('model_weights', save_format='tf')

Then
we have to initiate a new instance for the subclass Model then compile and train_on_batch with one record and load_weights of built model
loaded_model = ThreeLayerMLP(name='3_layer_mlp')
loaded_model.compile(optimizer="adam", loss="binary_crossentropy", metrics=["accuracy"])
loaded_model.train_on_batch(x_train[:1], y_train[:1])
loaded_model.load_weights('model_weights')

This work perfectly in TensorFlow==2.2.0

@hanzigs
Glad to know it worked.Here is the document for your reference.Please, close this thread if your issue was resolved.Thanks!

Thanks


encoding/json: no way to preserve the order of map keys

The encoding/json library apparently offers no way to decode data into a interface{} without scrambling the order of the keys in objects. Generally this isn't a correctness issue (per the spec the order isn't important), but it is super annoying to humans who may look at JSON data before and after it's been processed by a go program.
The most popular yaml library solves the problem like this: https://godoc.org/gopkg.in/yaml.v2#MapSlice

This was asked in the past.   If you're depending on the order that a specific implementation serializes your JSON objects in, you have a bug.

While it's unlikely that the current behaviour of the json package will change, a proposal to add some new mechanism that preserves order may be accepted. It would help, though, to have something more concrete to look at, i.e. a complete, full fledged proposal explaining what the new piece of API would look like.

My search failed to turn up either of those issues, thanks.
I tried to make it clear that this is not about correctness, it's about being nice to human readers. If that's not a relevant concern then we can close this. If there is some chance of a change being accepted then I can make a proposal.

If there is some chance of a change being accepted then I can make a proposal.

I don't know if there is but the package owners can probably tell you: cc @rsc @dsnet @bradfitz

There is a bit of precedent to making things nicer for human readers. For example, fmt sorts maps when printing them, to avoid random ordering in the output.
The fmt and json packages are different, and sorting keys isn't the same as keeping the original order, but I think the purpose is similar. Making the output easy to read or modify by humans.
I imagine there's no way to do this under the hood or by simply adding extra API like Encoder.SetIndent, as native maps simply don't keep the order.
Adding a type like MapSlice sounds fine to me - I'd say file a proposal unless someone else comes up with a better idea in the next few days. There's the question of whether the proposal will get past "publish this as a third-party package", but otherwise it seems like a sound idea.

Similar proposal in the past - keeping the order of the headers in net/http: https://github.com/golang/go/issues/24375
Just like in this case, the big question was where to store the actual order of the map keys.

Strictly speaking, you can do this today using the raw tokenizer, that json.Decoder provides. That said, I think there will be comprehensive review of all json proposals and issues in the Go1.12 cycle. I can imagine solutions for this issue that also address problems of being able to detect duplicate keys in objects.

I think the proposal would look like a flag (.SetPreserveOrder()) on the decoder that makes a MapSlice instead of a map[string]interface{}, plus making the encoder handle that type.
@dsnet Yeah, that solves the input half of the problem, but it's very inconvenient.

Alternatively, it could output as [][2]interface{}, in which case you won't need to declare a new type in the json package.

I actually like that a lot. It should probably still be declared in the json package just for documentation purposes.

For now it seems like the best answer is a custom type (maybe a slice of pairs) with an UnmarshalJSON method that in turn uses the tokenizer.

For the people who stumble upon this issue from Google, the following two libraries can help you if you need an ordered JSON map:
https://gitlab.com/c0b/go-ordered-json
https://github.com/iancoleman/orderedmap
Of course, it would be fantastic if this were eventually part of the standard library, so I'll eagerly await a proposal from someone more proficient than I.

As per JSON specification, order does not matter.
Reference: https://tools.ietf.org/html/rfc7159#section-1
Other technologies, which use JSON, where order matters.
Example: GraphQL
Reference: https://graphql.github.io/graphql-spec/June2018/#sec-Serialized-Map-Ordering
It's a much-needed enhancement.

Feature needed to simplify our implementation on ordered serialization/deserialization.

Strictly speaking, you can do this today using the raw tokenizer, that json.Decoder provides. That said, I think there will be comprehensive review of all json proposals and issues in the Go1.12 cycle. I can imagine solutions for this issue that also address problems of not being able to detect duplicate keys in objects.

We just ran into a case where the order of fields in a JSON file was important, and this code snippet was helpful. However, when order matters not only in the top-level JSON object but also in deeper nested objects, the need to preserve order complicates the code significantly - instead of "just" unmarshaling the object we have to do a series of piece-meal unmarshals to json.RawMessage so that we can use the unparsed byte stream at the right level.
@polinasok

Yaml provides the MapSlice work's nicely, I wrote a small package to handle map[string]interface{} for YAML/JSON might be useful for someone. It provides a map[string]Item so it's still a map rather then an abstraction.
https://github.com/mickep76/idxmap

Hi, I have a question about this issue. I have been looking at the source code a bit and I found that the function func (me mapEncoder) encode(e *encodeState, v reflect.Value, opts encOpts) in the encode.go actually sort the keys by doing:
sort.Slice(sv, func(i, j int) bool { return sv[i].s < sv[j].s })

Here's a bigger snippet:
// Extract and sort the keys.
keys := v.MapKeys()
sv := make([]reflectWithString, len(keys))
for i, v := range keys {
	sv[i].v = v
	if err := sv[i].resolve(); err != nil {
		e.error(fmt.Errorf("json: encoding error for type %q: %q", v.Type().String(), err.Error()))
	}
}
sort.Slice(sv, func(i, j int) bool { return sv[i].s < sv[j].s })

Why this sort is done in first place? Is there any reason or did I miss something?
I was just giving a go and removed line and the map[string]interface{} go serialized correctly.
cc @rsc @dsnet @bradfitz

@dfurtado json encoding should be deterministic. Ranging over a map has an unspecified order, so there isn't a stable order we can use by default. So the encoder falls back to the equivalent of sort.Strings.

I would like to pick up the discussion in the light of go2.
It seems to me one possible solution would be to enable maps to support ordered keys. This would help multiple use cases, for example with url.Values which is a map but unable to maintain the initialization order during Values() which in turn leads to invalid output for some APIs (if the API is well-designed is not point of the discussion here).
I've not found a go2 proposal for maintaining map key order- would this be the point to do so?

I've not found a go2 proposal for maintaining map key order- would this be the point to do so?

I would say you should use a separate issue - you could point to this issue as a potential use case, but a major language change is far more invasive than adding a feature to the json package.

I have just hit this problem too. After reading/editing/saving a json file the application would not read it due to the order being changed.

I didnt see this mentioned, so I wanted to add. If you have JSON like this:
{"March": 31, "April": 30, "May": 31, "June": 30, "July": 31}

The key order will not be maintained. So as a workaround, you can change your
input to one of these:
[["March", 31], ["April", 30], ["May", 31], ["June", 30], ["July", 31]]
[{"March": 31}, {"April": 30}, {"May": 31}, {"June": 30}, {"July": 31}]

then the order will be maintained. I understand this will not always be
possible, as maybe you dont have control over the input. But I wanted to mention
it.

We ran into this issue, where a third-party API we use requires us to extract an object from a JSON response and return it completely unchanged in a subsequent request body, including not changing the key ordering. Our workaround was to treat the object as an opaque byte slice like:
type rawJsonObject []byte

func (o rawJsonObject) MarshalJSON() ([]byte, error) {
	return []byte(o), nil
}

func (o *rawJsonObject) UnmarshalJSON(data []byte) error {
	*o = data
	return nil
}

Not sure if there is any better way to achieve the same thing. Is there any reason why the JSON marshaller cannot do this for []byte types automatically without the need for a custom type and marshal/unmarshal functions?

@ryanc414 see https://golang.org/pkg/encoding/json/#RawMessage.

The order of the map keys are important when I want to update a json file using a go program.
After update, I hope the json keys are keep the same order so I don't get unnecessary git changes for the json file.

I recently encountered this issue, after investigating the existing solution/project, unfortunately I found that none of them fully met my three needs: preserve order, allow duplicated key, lossless number.
So I wrote my own solution, It looks like:
data := `{"a": 1.1234543234343238726283746, "b": false, "c": null, "b": "I'm back"}`
result, _ := geko.JSONUnmarshal([]byte(data), geko.UseNumber(true))
output, _ := json.Marshal(result)
fmt.Printf("Output: %s\n", string(output))
// Output: {"a":1.1234543234343238726283746,"b":false,"c":null,"b":"I'm back"}

object := result.(geko.ObjectItems)
fmt.Printf("b: %#v\n", object.Get("b"))
// b: []interface {}{false, "I'm back"}

In the case of someone happens to have the same scenario: geko and it's document.

The JSON protocol does not depend on the order of the fields, however, it is convenient when the order is aligned during testing.
Therefore, it would be appreciated if you could align the order in the same way as the input, or alternatively, enhance the functionality for testing purposes.

Go team of Google: You should NOT rely on order of JSON Object, it's written in RFC.
Firebase team of Google: You SHOULD rely on order of JSON Object.
Reference: https://firebase.google.com/docs/reference/remote-config/rest/v1/RemoteConfig#RemoteConfigParameterValue

It seems this issue is present in many parts of the standard library, including the Header map of http ( as mentioned in #24375). Even though most specs, such as JSON and HTTP don't require order to be preserved, many applications do rely on the order. In my case, my go program cannot access an API (developed by a large tech company) because it expects HTTP headers to be listed in a specific order.
While it is a bug to expect a certain order in these types of programs, it still seems that order should be preserved in many parts of the networking-related portions of the golang standard library to improve compatibility with many APIs. It is annoying how subtle it can be to track down these types of problems.

@ahmouse15 You are correct that this is a wider stdlib issue, but a more fundamental problem is that there is no native Go type that can nicely preserve order. A Go map doesn't work because it doesn't preserve order. A Go slice is only half the solution since we don't have a consistent way to represent key-value tuples. A solution for this might depend on #63221 or related proposals, otherwise each package would re-invent different ways to represent the key-value tuple.
For the time being, I'm not convinced that this needs to be a first-class feature in the stdlib.
BTW, the v2 "json" package contains an example of how to implement this functionality on your own:
https://pkg.go.dev/github.com/go-json-experiment/json#example-package-OrderedObject
It might also make sense to declare a helper data structures in a third-party "jsonx" package that assists with odd (but unfortunately real) schemas such as:

depending on object ordering (this issue)
treating structs as a JSON array
distinguishing between presence, null, and some value
etc...

@ahmouse15 You are correct that this is a wider stdlib issue, but a more fundamental problem is that there is no native Go type that can nicely preserve order. A Go map doesn't work because it doesn't preserve order.

I would say that providing an ordered map type in the stdlib would be a good idea, similar to how Python provided the OrderedDict type before the builtin dict became insertion-ordered by default. Of course the interface would differ from the standard map since we can't override the [] operator but it could still be useful in certain cases.


Include postal code field

The GeoResult type is missing some fields such as postal code, which seems like something simple to add.
(@ondrap We'd be happy to work on this if you're open to pull requests.)

I hope it is simple to add, I just didn't quite knew what people would use it for, so I opted for a simple API.
Looking at the code... well, I think it would sure benefit from some rework - I didn't know lens at the time I was writing it and it seems to me it would simplify some things. Anyway, if you want to help and do a PR, you are very welcome.


Account feature

Sorry for the delay on this one!
It has some merge conflicts that unfortunately I don't have the time to fix, could you please take a look at them?
Also, I think this would be more suitable to another branch (such as account), instead of the master one, since it's a great amount of complexity added that may make sense to keep separate into 2 versions of this project.
What do you think about it?


Added type definition file

Resolves #696

Thanks!

Hi @shentao, for some reason I still get the same error as mentioned in #696, when I try to install it using webstorm i get this error:

Do you have any idea what might be the problem?
This is the command for installation: npm install vue-multiselect@next

@rajmondburgaj I can see that typing file is missing when we install the next version.
There is already open issue for the same #1475. We will prioritize this. Thanks.

Also getting this type error on @next.
Issue #1475 tells us to just use the other project that supports Vue 3. @akki-jat Do you intend to add that type description so your project is compatible with Vue3/Typescript or should we stop using this?

Type definitions now exist in 3.0.0-beta.1. This version can be installed with the next tag. I've tested it and it seems to be work well for me, but please let us know if this isn't working for you


Not working properly  with ChangeDetectionStrategy.OnPush

I have a lot of custom components with ChangeDetectionStrategy.OnPush. I tried to use this component but the loading spinner is always shown, even if the image is loaded, the spinner still spinns above the loaded image.
If I remove ChangeDetectionStrategy.OnPush it works fine.

What version are you using?
The current version doesn't use OnPush strategy.

I am using the latest version.
Is there a way I make this component work in my OnPush components?

Confirmed, same problem here, not even with onPush strategy ... disabling spinner with [spinner]="false"  for now

@Daskus1 no, the component needs to have change detection active in order for it to work. I experimented with OnPush strategy before without success (issues with spinner). If your root component uses OnPush strategy, it affects the whole node tree.
@pvdyck did you experience this issue on ionic serve or on a device?

@ihadeed  on device / I use regular  outside of cordova

If a component/page uses OnPush strategy, change detection mechanism will only update the DOM if there's new data flowing from the top. img-loader component updates itself based on the data coming from the provider.
The only way this might work is if you preload your images and only render the img-loader component when the images are ready in the filesystem.


Support clean up of empty folders

We eventually resolved this empty folder problem using code like the following:
# Clean up empty folders
all_folders = [{
    "repo": {"$eq": "repo-local"},
    "path": {"$match": "path/*"},
}]
folders = artifactory.filter(terms=all_folders, depth=None, item_type="folder")
empty_folders = []
for folder in folders:
    folder_path = folder.get('path') + '/' + folder.get('name') + '*'
    folder_terms = [{
        "repo": {"$eq": "repo-local"},
        "path": {"$match": folder_path},
    }]
    sub_items = artifactory.filter(terms=folder_terms, depth=None, item_type="any")
    if len(sub_items) == 0:
        empty_folders.append(folder)


Serde Encode Options

This introduces encode options in Serde.Encode and related functions. There are currently two encode options, ID and Index. I reused the existing Index option and adjusted it to function both as  SerdeOpt and EncodeOpt.
The caller can now explicitly specify an ID and index when encoding an object, which overrides the default behavior of choosing the encoding function based on the type of the value being encoded. The primary motivation behind this is to support the encoding of dynamic data stored in a map by explicitly choosing the schema for encoding it. Besides that, it could also be used to register multiple schemas/encode functions for the same type and explicitly choose which one to use based on the ID.
It also fixes some minor bugs:

When registering a schema without supplying DecodeFn, Decode now returns ErrNotRegistered
When using DecodeNew on a schema without an associated type it now returns ErrNotRegistered instead of a panic

Related to the discussion in https://github.com/twmb/franz-go/issues/453.

Mind changing this PR to what we've agreed on in https://github.com/twmb/franz-go/pull/467#discussion_r1231620122 ?

I created a separate PR that includes those changes (#TODO). It is mutually exclusive with this PR, both kinda do the same thing, but with different approaches. The new PR is based on your comment that we don't necessarily need to separate RegisterOpt and EncodeOpt. I'll try to articulate what benefits and drawbacks I see for each approach and leave it for you to decide which one you prefer.
Having separate RegisterOpt and EncodeOpt (i.e. this PR) allows us to prevent the user from sending ID into Register, as that function already expects the ID as a normal argument. In the new PR I had to decide what to do if that happens (see these lines). Options ID and Index also need special treatment in function Encode, as they are not applied on tserde, but rather they decide which tserde to use. In this PR this is solved by having a struct that is mutated using EncodeOpt. In the new PR options ID and Index are separated from all options and treated separately (see this function). The internals of the new approach seem a bit hacky, although for the caller it might be simpler and more flexible to have only one set of options that can be passed both to Register and Encode (possibly also to Decode, see this comment).
Let me know what you think and feel free to close one of these PRs, I'll then focus on the one that's left.

Hey @twmb, hope you're well! I was wondering if you had any updates on the PRs? I haven't received any response and I just wanted to make sure everything is okay. Let me know if there's anything I can do to help. Thanks!

I'm going to focus on 506 first (which I think includes some of this) and have some thoughts about the EncodingOpt additions to the Encode functions -- I've come to a thought a few days ago that I think we should essentially double the encode functions. I think variadic options for every individual encoding function is a bit odd and way more extensive than any encoder I've seen. I wonder if we can either have a new extendable struct their (a la slog's NewEncoder functions) or if we can have two APIs (Encode, EncodeWithOpt).

Finally left my comment on 506 -- also can 506 be rebased on the latest / resolve the TODOs about the header PR?

Closing in favor of continuing this in #506


tls trusted certificates

Where do i need to put the ca certificates for tls?
Or is there an option to ignore self signed certificates?

I think you're supposed to enable ENABLE_TLS. Can't say for sure because I find TLS for MQTT overkill for my internal network.

We don't manage certs for now.

Closing because the issue should be opened in the Theengs Gateway repo https://github.com/theengs/gateway.

Support added in https://github.com/mihsu81/addon-theengsgw/releases/tag/v1.11.2


Problem in ddpm -> sampled_images

Hey there,
very nice code and a good youtube tutorial!
I had a little trouble using the selfattentions with other image sizes, but this isnt the problem right now, i just commented them out and the first epoch works. But after this in: ddpm.py -> sampled_images = diffusion.sample(model, n=images.shape[0]) I get an dimension error depending of the batch size... I'm confused, may some one has an Idea, I think I have mist to change the size somewhere..
Error (Batch size 4):
Traceback (most recent call last):
File "/Sync_v01/ddpm.py", line 120, in
launch()
File "/Sync_v01/ddpm.py", line 117, in launch
train(args)
File "/Sync_v01/ddpm.py", line 99, in train
sampled_images = diffusion.sample(model, n=images.shape[0])
File "/Sync_v01/ddpm.py", line 53, in sample
predicted_noise = model(x, t)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/Sync_v01/modules.py", line 164, in forward
x1 = self.inc(x)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/Sync_v01/modules.py", line 75, in forward
return self.double_conv(x)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "***/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[1, 4, 3, 64] to have 3 channels, but got 4 channels instead
Error (Batch size 3):
Traceback (most recent call last):
File "/Sync_v01/ddpm.py", line 120, in
launch()
File "/Sync_v01/ddpm.py", line 117, in launch
train(args)
File "***/Sync_v01/ddpm.py", line 99, in train
sampled_images = diffusion.sample(model, n=images.shape[0])
Thanks everyone :)

File "/Sync_v01/ddpm.py", line 53, in sample
predicted_noise = model(x, t)
File "e/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/Sync_v01/modules.py", line 164, in forward
x1 = self.inc(x)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/Sync_v01/modules.py", line 75, in forward
return self.double_conv(x)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/normalization.py", line 273, in forward
return F.group_norm(
File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/functional.py", line 2530, in group_norm
return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled)
RuntimeError: Expected weight to be a vector of size equal to the number of channels in input, but got weight of shape [64] and input of shape [64, 3, 64]

Hey there, very nice code and a good youtube tutorial! I had a little trouble using the selfattentions with other image sizes, but this isnt the problem right now, i just commented them out and the first epoch works. But after this in: ddpm.py -> sampled_images = diffusion.sample(model, n=images.shape[0]) I get an dimension error depending of the batch size... I'm confused, may some one has an Idea, I think I have mist to change the size somewhere.. Error (Batch size 4):
Traceback (most recent call last): File "/Sync_v01/ddpm.py", line 120, in launch() File "/Sync_v01/ddpm.py", line 117, in launch train(args) File "/Sync_v01/ddpm.py", line 99, in train sampled_images = diffusion.sample(model, n=images.shape[0]) File "/Sync_v01/ddpm.py", line 53, in sample predicted_noise = model(x, t) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/Sync_v01/modules.py", line 164, in forward x1 = self.inc(x) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in call_impl return forward_call(args, kwargs) File "/Sync_v01/modules.py", line 75, in forward return self.double_conv(x) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/container.py", line 217, in forward input = module(input) File "_/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 463, in forward return self._conv_forward(input, self.weight, self.bias) File "***/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[1, 4, 3, 64] to have 3 channels, but got 4 channels instead
Error (Batch size 3):
Traceback (most recent call last): File "/Sync_v01/ddpm.py", line 120, in launch() File "/Sync_v01/ddpm.py", line 117, in launch train(args) File "***/Sync_v01/ddpm.py", line 99, in train sampled_images = diffusion.sample(model, n=images.shape[0])
Thanks everyone :)

File "**/Sync_v01/ddpm.py", line 53, in sample predicted_noise = model(x, t) File "e/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/Sync_v01/modules.py", line 164, in forward x1 = self.inc(x) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in call_impl return forward_call(args, kwargs) File "/Sync_v01/modules.py", line 75, in forward return self.double_conv(x) File "**/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in call_impl return forward_call(args, kwargs) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/container.py", line 217, in forward input = module(input) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/modules/normalization.py", line 273, in forward return F.group_norm( File "/anaconda3v2/lib/python3.9/site-packages/torch/nn/functional.py", line 2530, in group_norm return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled) RuntimeError: Expected weight to be a vector of size equal to the number of channels in input, but got weight of shape [64] and input of shape [64, 3, 64]

I found the error, was my fault, in one line there was an self.image_size missing. Thats why there were only a tensor of dim 3 and not 4. Thanks again for the code!

Thank you for posting that the solution was really simple! Appreciate it


Finetuning & Testing scripts for Voicecraft

Could you provide the training and testing scripts on voicecraft. Library used to adopt graphemes in the tts system.  I would like to increase the tokenizer for additional vocab data. Awaiting your response @AshwinSankar17 and Team

Thank you for the support.


feat: Add notebook for threat hunting across Azure Kubernetes Service

This notebook provides information, queries and hypotheses Azure Kubernetes Service (AKS) customers can use to conduct threat hunting and investigations across their AKS clusters. It also provides information on how to enable specific logging necessary to get visibility into cluster control plane activity and AKS worker node (VMSS)  and container kernel level activity. A unique aspect of this notebook for AKS is the guidance on analyzing and setting up auditd logging to get visibility into progam execution and command line activity within a cluster's containers and on the AKS VMSS worker nodes.
The notebook currently only uses kqlmagic and a simple connection to the customer's Log Analytics Workspace (LAW). However, the intention is to update this notebook to use MSTICPy for more advanced analysis in the future.
The notebook contains the following sections:
1. Prepare your notebook environment
This section installs pre-reqs and authenticates to the customer's LAW.
2. Hunting Hypotheses and Queries
This section contains hunting queries and hypotheses threat hunters and investigators can use to hunt for adversary activity on their AKS cluster. Here is a breakdown of the sections as well as the specific queries we have provided ( parented by a stage of the kill chain).

Tips for hunting
Initial Access

Command execution on your cluster's containers

Privilege Escalation

Deployment of privileged containers with the intention to container escape onto AKS worker nodes
Pivoting on high risk host volume path mounts

Execution

Container and worker node kernel activity (Syslog)

Stack counting all program execution on worker node and containers
Investigating potential anomalies in program and command line execution
Determine the distribution of program executions and arguments passed to it
Program execution associated with data exfiltration and program installations

Lateral Movement

Move laterally to cloud resources by requesting access token from IMDS server
Anomalous requests to the Kubernetes API Server

Persistence

Unusual Kubernetes objects being deployed
Container Image posioning
Baseline of container images and image registries

This is great @mang0kitty! Thanks so much for the contribution.

I think this should prob go into scenario_notebooks folder, rather than creating a lonely folder.
I'm open to suggestions about a better folder structure - e.g. maybe "hunting", "investigation" or maybe tech-specific "azure", "defender"....or something like that.

@ianhelle and @petebryan, thank you for the review!
I like the idea of having a folder for notebooks that support Azure service specific hunting as I think it will be easier for a customer to find than if it's nested within the scenario-notebooks folder.  This folder could be called azure as you suggested or azure-services if we want to be more focused about it. I also don't see a problem putting it in the  scenario_notebooks folder!

I like the idea of an azure scenerio specific folder. How about azure-hunting?

I think azure-hunting is great and I've updated the notebook to use it. Hope that works!


Numbers are displayed using incorrect font variant

Numbers are using old-style-nums rather than lining-nums as per design

The font variants are looking good for the new elements. I'm assuming you're waiting to update the fonts for elements like the dice pool builder once you've built it?


Fix reference to COARDS.

As can be seen with all the other bibliography references, the square brackets come for free now.

Rebased.

this one empties the 1.6 milestone
I suggest we consider a 1.6 tag

I suggest we consider a 1.6 tag

Nearly ... #48 is still open. #49 is a big step to addressing that but we need to give people (e.g. @JonathanGregory) time to look over the PDF output too.
The tag shouldn't be created until the HTML and PDF outputs are agreed to be ready for publishing via the main website.


Fix error check that never occurs

What this PR does / why we need it:
Because the result of commonutil.UpdateJobConditions() is always nil, we shouldn't return an error.
follow-up: https://github.com/kubeflow/training-operator/pull/1859
Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #
Checklist:

[ ] Docs included if any changes are user facing

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

33 of 62 (53.23%)  changed or added relevant lines in 10 files are covered.
12 unchanged lines in 4 files lost coverage.
Overall coverage increased (+0.4%) to 40.242%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/controller.v1/mpi/mpijob_controller.go
4
5
80.0%

pkg/controller.v1/common/pod.go
0
3
0.0%

pkg/controller.v1/mxnet/mxjob_controller.go
2
5
40.0%

pkg/controller.v1/pytorch/pytorchjob_controller.go
4
7
57.14%

pkg/controller.v1/common/job.go
0
4
0.0%

pkg/controller.v1/paddlepaddle/paddlepaddle_controller.go
3
7
42.86%

pkg/controller.v1/xgboost/xgboostjob_controller.go
2
7
28.57%

pkg/reconciler.v1/common/job.go
0
6
0.0%

Files with Coverage Reduction
New Missed Lines
%

pkg/controller.v1/common/job.go
1
6.15%

pkg/controller.v1/common/pod.go
1
2.83%

pkg/reconciler.v1/common/job.go
1
8.64%

pkg/controller.v1/paddlepaddle/paddlepaddle_controller.go
9
61.54%

Totals

Change from base Build<PHONE_NUMBER>:
0.4%

Covered Lines:
3852

Relevant Lines:
9572

💛  - Coveralls

/lgtm
/approve


Appease dependabot 🤖

Closes #113
Closes #114

Coverage remained the same at 99.401% when pulling 495a258c6b86ffb76f976277a883fac59031d221 on appease-dependabot into 4dfb86bfcd2fc5ec8996370f01b27de3f34202cd on master.


Feature/new rabbit bind params

Description
Please explain the changes you've made
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #572
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[x] Created/updated tests
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@ianrocha thanks for this PR, there are conflicts that must be resolved.

@ianrocha thanks for this PR, there are conflicts that must be resolved.

Make sure you started on a clean branch and that you fetched the latest from master.

Make sure you started on a clean branch and that you fetched the latest from master.

There's Go linter issues: https://github.com/dapr/components-contrib/pull/573/checks?check_run_id=1653080393

Hi @yaron2, sorry for the fails, but can you help my with this one?
https://github.com/dapr/components-contrib/pull/573/checks?check_run_id=1653544208
Do you have any clue about what a could do to solve this?

Hi @yaron2, sorry for the fails, but can you help my with this one?
https://github.com/dapr/components-contrib/pull/573/checks?check_run_id=1653544208
Do you have any clue about what a could do to solve this?

Hi @yaron2, sorry for the fails, but can you help my with this one?
https://github.com/dapr/components-contrib/pull/573/checks?check_run_id=1653544208
Do you have any clue about what a could do to solve this?

Yeah it's just a format issue. For utils/metadata.go, make sure you run go fmt -s utils/metadata.go

Hi @yaron2, sorry for the fails, but can you help my with this one?
https://github.com/dapr/components-contrib/pull/573/checks?check_run_id=1653544208
Do you have any clue about what a could do to solve this?

Yeah it's just a format issue. For utils/metadata.go, make sure you run go fmt -s utils/metadata.go

@yaron2 thanks! it worked great 👍

@yaron2 thanks! it worked great 👍

Just to make it clear, this PR adds dead lettering to both the binding AND pubsub?

Just to make it clear, this PR adds dead lettering to both the binding AND pubsub?

No, the dead lettering arguments are only for the binding.
The change I made for the pubsub is that now it will receive the parameter exchangeKind, before it could only create an exchange of kind "fanout".

No, the dead lettering arguments are only for the binding.
The change I made for the pubsub is that now it will receive the parameter exchangeKind, before it could only create an exchange of kind "fanout".

No, the dead lettering arguments are only for the binding.
The change I made for the pubsub is that now it will receive the parameter exchangeKind, before it could only create an exchange of kind "fanout".

Thanks for clarifying!
Did you perhaps get to test the RabbitMQ pub/sub and bindings after this change? to make sure there are no regressions.

No, the dead lettering arguments are only for the binding.
The change I made for the pubsub is that now it will receive the parameter exchangeKind, before it could only create an exchange of kind "fanout".

Thanks for clarifying!
Did you perhaps get to test the RabbitMQ pub/sub and bindings after this change? to make sure there are no regressions.

It was working good before I merged with master, now I need to test again xD... I think I'll be able to do this on the weekend.

It was working good before I merged with master, now I need to test again xD... I think I'll be able to do this on the weekend.

hey @ianrocha, please resolve the conflict and we can go ahead and merge this. did you get to test by any chance?

hey @ianrocha, please resolve the conflict and we can go ahead and merge this. did you get to test by any chance?

@ianrocha I resolved the conflict, left one comment.

@ianrocha I resolved the conflict, left one comment.

ping @ianrocha

ping @ianrocha

@ianrocha pinging again.

@ianrocha pinging again.

Closing as author is non-responsive

Closing as author is non-responsive


DatePicker is not using MM/dd/yyyy as defined in system and globalization culture

Hi, first, thank you so much for providing this framework.  It is truly beautiful.
I'm trying to figure out why the jQuery datepicker seems to be stuck on dd/MM/yyyy format.  I have the following entry in my web.config:
<globalization culture="en-US" uiCulture="auto:en-US" />
System culture is set to en-US.
Any ideas?  Thanks in advance!

Currently Serene doesnt pass server culture info to script side. So dates stays dd/MM/yyyy. I noticed this recently and fix on the way. Actually there was support in an older version. It's just a bit blurry if i should use server culture or ui culture at client side. Open to ideas.

Btw, you can set Q.Culture.DateOrder and Q.Culture.DateFormat method in a static constructor of MyProject.Script project as a workaround.

Thanks for the workaround, I will try that and let you know if I have any further issues.
In terms of how it "should" behave, I would think that the client side would detect and use the locale from the browser, and any scripts would use the browser-specific culture.  Case in point, If the server is in the UK but I am browsing from the US, I should not be expected to enter dates in UK format.
Of course this is just my humble opinion.  Great work on this framework!

1.8.19 provides this support now.
Simply update template, or NuGet packages.
Set culture to auto too in web.config, like:
<globalization culture="auto:en-US" uiCulture="auto:en-US" />

Add this line in LayoutHead before CommonIncludes:
<script type="application/json" id="ScriptCulture">
   @Html.Raw(Serenity.JSON.Stringify(new ScriptCulture()))
</script>

Beautiful!  Works great here!  Thanks so much!


[OP] Add oneDNN Slice test.

Here are the results for Slice test:

I can not pass the bazel test, could help to double check the code. the test command shows as follow and the error infos also attached.
$ default_opt="--cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0 \
--copt=-O3 --copt=-Wformat --copt=-Wformat-security \
--copt=-fstack-protector --copt=-fPIC \
--copt=-fpic --linkopt=-znoexecstack --linkopt=-zrelro \
--linkopt=-znow --linkopt=-fstack-protector \
--copt=-Wno-sign-compare \
--test_size_filters=small,medium,large,enormous \
--keep_going"

$ intel_opt="--config=mkl_threadpool \
--define build_with_mkl_dnn_v1_only=true \
--copt=-DENABLE_INTEL_MKL_BFLOAT16 \
--copt=-march=skylake-avx512"

$ UT_opt="--test_output=all --nocache_test_results"

# your UT target, such as
$ test_name="//tensorflow/core/kernels:mkl_slice_op_test"

$ bazel test $UT_opt $default_opt $intel_opt $test_name

I'll check and fix this issue.

It can't build successfully. Could you help to double check on that, please? Below is the issue.

It is strange, your error shows that the line 135 of the code you are compiling is:
static std::string getTestCaseName(::testing::TestParamInfo<SoftmaxTestParams> obj) {
While in my code and in the commit there is:
static std::string getTestCaseName(::testing::TestParamInfo<SliceTestParams> obj) {
And this works totally fine on the machine I work on.
Please check if the code you were trying to compile is the same as in this PR.


Could not find a declaration file for module 'react-native-video-processing'

Could not find a declaration file for module 'react-native-video-processing'.
'c:/Users/Joaqu/OneDrive/Escritorio/AwesomeProject/node_modules/react-native-video-processing/index.js' implicitly has an 'any' type.

software
version

react-native-video-processing
^1.7.2

react-native
0.71.3

node
16.16.0

same !

Check for @types folder in root of the project, if not exist create @types folder in the root of the project.
Inside that add react-native-video-processing.d.ts file.
within the d.ts file write, declare module 'react-native-video-processing';

https://www.youtube.com/watch?v=VqCdCLn9HQI


Does not provide an export named 'default' errors

I got error below on console:
index.mjs?v=f0c71643:1 Uncaught SyntaxError: The requested module '/node_modules/picomatch/index.js?v=f0c71643' does not provide an export named 'default' (at index.mjs?v=f0c71643:1:134)
The stack blits show just white screen.

It's a problem with picomatch, I look for an alternative to fix it

I found a temporary solution
...
optimizeDeps: {
  include: [
    'picomatch'
  ]
}
...

Thank you ! The error is gone now but I got this when clicking on the element. Probably because of the extra / in front of the C:?

The situation is not good. I only have a macbook. I don't know how to reproduce this problem at the moment. It may take a while to solve it.

No worries. Is there any options to customize the path?
I think if we take out the extra / in front of the C:, it should work.

There is no custom method. I installed an emulator that can reproduce this problem. I will take some time to fix it.

There is no custom method. I installed an emulator that can reproduce this problem. I will take some time to fix it.

Thank you. It would be a great help for me. 👍


Crash when using Melter with Seared Tank

Minecraft Version
1.18.2
Fabric/Quilt Version
0.14.9
Fabric/Quilt API Version
0.58.0+1.18.2
Tinkers' Construct Version
1.18.2-3.5.1.DEV.33b3fef
Describe your issue
Right-clicking on a Seared Melter with a Seared Tank placed underneath it (with or without fluid) crashes the game. The melter doesn't crash with a heater placed below it.
Crash Report
https://gist.github.com/SylviBlossom/cb744f718489b5288866201d22706082
Other mods
No other mods
Tried reproducing with just Tinkers?
Yes
Performance Enchancers
None of the above
Searched for known issues?
Checked pinned issues, Searched open issues, Searched closed issues, Checked the FAQ

The same thing happened to me.