python/iqm: allow authentication for telemetry

Changes:

Bug fix: closes #224

How to test:
Pre-requisites:

a python 3.11 environment; if you do not have one already, use a container:$ docker container run \
    --detach \
    --name iot3 \
    --rm \
    -ti \
    --network host \
    -e http_proxy \
   -e https_proxy \
   -e no_proxy \
    --user $(id -u):$(id -u) \
    --mount type=bind,source=$(pwd),destination=$(pwd) \
    --workdir $(pwd) \
    python:3.11.9-slim-bookworm \
    /bin/bash -il
$ docker container exec -u 0:0 iot3 apt update
$ docker container exec -u 0:0 iot3 apt install -y build-essential git
$ docker container attach iot3

an OpenTelemetry collector with authentication
a configuration file in /tmp/its-iqm.cfg; replace HOST, PORT, and PREFIX with values appropriate for your OpenTelemetry collector (PREFIX should not contain the trailing /v1/traces part; authentication must be none for now):[general]
instance-id = v2x_12345678
prefix = default
suffix = v2x

[telemetry]
endpoint = http://HOST:PORT[PREFIX]
authentication = none

[local]
socket-path = /run/mosquitto/mqtt.socket

Install the its-iqm package:$ python3.11 -m venv /tmp/its-iqm
$ . /tmp/its-iqm/bin/activate
🐍 $ pip install python/its-quadkeys python/iot3 python/its-interqueuemanager

Test its-interqueuemanager with no authentication:

start its-iqm:🐍 $ its-iqm -c /tmp/its-iqm.cfg

send an MQTT message:$ mosquitto_pub -h HOST -p PORT -u USERNAME -P PASSWORD -t 'defaulr/inQueue/v2x/cam/test_car_1234/0/1/2/3' -m '"test"' -D PUBLISH user-property traceparent 00-41494a55f9a4f29a1e88d5a1dc36b8ea-e3b20dd98d1992f4-00

wait a few seconds, and check the OpenTelemetry collector for traces.
stop its-iqm with Ctrl-C

Test its-iqm with BASIC authentication:

update the configuration file so that the telemetry section contains (replace USERNAME and PASSWORD appropriately):[telemetry]
endpoint = http://HOST:PORT[PREFIX]
authentication = basic
username = USERNAME
password = PASSWORD

start its-iqm:🐍 $ its-iqm -c /tmp/its-iqm.cfg

send an MQTT message:$ mosquitto_pub -h HOST -p PORT -u USERNAME -P PASSWORD -t 'defaulr/inQueue/v2x/cam/test_car_1234/0/1/2/3' -m '"test"' -D PUBLISH user-property traceparent 00-b537ac2c2d8bd2f581ea5a7babcde49d-943995a268b44d85-00

wait a few seconds, and check the OpenTelemetry collector for traces.
stop its-vehicle with Ctrl-C

Test its-iqm with incorrect credentials:

retry the test in step 3, but with invalid username or password (and change the traceparent property)

Expected results:

The packages are installed successfully.
The OpenTelemetry collector shows no trace for its-iqm
The OpenTelemetry collector shows traces for its-iqm
The OpenTelemetry collector shows no new trace for its-iqm

In the PR description in Install the its-iqm package:
Change
$ . /tmp/its-vehicle/bin/activate
by
$ . /tmp/its-iqm/bin/activate
Using the docker image for python 3.11 dev, the install:
pip install python/its-quadkeys python/iot3 python/its-interqueuemanager
fails: git is not installed (nor sudo when wanting to install it)

In the PR description in Install the its-iqm package: Change $ . /tmp/its-vehicle/bin/activate by $ . /tmp/its-iqm/bin/activate

Fixed.

Using the docker image for python 3.11 dev, the install: pip install python/its-quadkeys python/iot3 python/its-interqueuemanager fails: git is not installed (nor sudo when wanting to install it)

Well, you can install it like is done for build-essentials... I added that to the desription.

When Installing with new instructions, I have a conflict version problem:
[...]
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Yeah, sorry about that, that was a bad copy-pasta from another context...
I also substantially reworked the PR so that it actually does work now. Not sure how I messed up ~2 weeks ago... It should be fine now.


Add election workflow with sanity checks

introduce a factory for elections on a generic instrument, for usage with the Factory pattern
clearly define workflow used to create an Election
the workflow includes sanity checks (e.g. check against current time
once an Election is created, it is considered valid as long as it is signed by a trusted party

I think that the sanity checks are application specific, hence the workflow is not exposed via interfaces and is not part of the library API. We could even considering moving the code in the tests (or in the service layer of the Daml Finance App).
With this change, we separate the duties of

the lifecycler --> responsible to process elections with the correct observables and create new instrument versions
the validator --> responsible for performing sanity-checks on elections

Open points:

the current sanity checks do not prevent an investor from exercising e.g. an american option more than once (but settle only once)

A proper way to prevent this, would be to

define a new holding interface that allows a holding owner / custodian to put an election forward
once the election is validated, the holding is consumed and replaced with a standard fungible holding

We could add an additional sanity check min <= electionTime <= max where min and max are specified in the ElectionOffer

@georg-da feel free to review the current version of this PR. Merging it will unblock release + creation of a doc assembly. I can add further refinements to the sanity checks at a later stage, now that the election workflow is shipped as part of the tests.

Does this require a change to the quickstarter ?

Nope, the quickstarter does not use the generic instrument. The lifecycling example in the quickstarter uses an equity dividend


Potential ghost clients: Client side connection initiation

Describe the bug
If AutoCreate Player prefab is disabled, clients could simply not send the connect message and ghost a game, potentially receiving game state and using up resources making this a great layer 7 DoS vector and a potential security problem.
List some other similar projects where this enhancement exists
The MLAPI provides a separation between connected and pending clients as described in #720. In addition it has a timeout for clients to go from pending to connected, otherwise, they will be disconnected by the library.

looks like paul fixed it

looks like paul fixed it

What? It has not been fixed.

This has not been fixed,  but I am not sure if there is an attack vector.  I'll have to look into it.

PR #1057 Should deal with this.

PR #1057 Should deal with this.

Unless I misunderstood, it does not. Correct me if I'm wrong, but the actual player creation is still Client authoritative?

Clients can't change what the server has for Auto-create, so if the server has that enabled, the server will create the player object whether the client likes it or not.  Putting Authentication in front of the OnConnect on the server means devs can define a timeout for that, and client gets nothing from the server until it has completed that phase.

#1057 does not fix this.  But it would make it a lot easier to fix this.
A simple way would be to have a timer,  if the connection does not authenticate and create a player after some timeout,  we can disconnect them.

#1057 does not fix this. But it would make it a lot easier to fix this.
A simple way would be to have a timer, if the connection does not authenticate and create a player after some timeout, we can disconnect them.

Why should the client create the player?

Because the user might want to choose which character to use?  or maybe pass attributes such as skin color, hair color, clothes, etc?   Maybe the user want to give his character a name,  etc?
Maybe I am missing something,  but I don't see a problem with the client requesting to create a player,  so long the server can reject the request.
This also prevents allocating resources in the server until the client is ready to create the player.

Because the user might want to choose which character to use? or maybe pass attributes such as skin color, hair color, clothes, etc? Maybe the user want to give his character a name, etc?
Maybe I am missing something, but I don't see a problem with the client requesting to create a player, so long the server can reject the request.
This also prevents allocating resources in the server until the client is ready to create the player.

It's just generally safer and much better to be server authoritive. Client sends ConnectionRequest (with that data you spoke about), then server spawns the player object. It's more inline with everything else in the library. Client requests action, server executes and replicates.

isn't that exactly how mirror works?   the client sends a "AddPlayerMessage" which is equivalent to "ConnectionRequest" that you mentioned.  Then the server spawns the player if it accepts the requests and it can use any data provided with the AddPlayerMessage.

isn't that exactly how mirror works? the client sends a "AddPlayerMessage" which is equivalent to "ConnectionRequest" that you mentioned. Then the server spawns the player if it accepts the requests and it can use any data provided with the AddPlayerMessage.
I am not sure why you say this is client authoritative. It isn't. The client requests to create a player, and the server creates it.

Oh right, it's just because it's not actually enforced.

right,   so there are 2 changes I would like to make:

the AddPlayerMessage is rejected by the server if the connection is not authenticated.  This would address #720  and it is definitely the right thing to do.
If a client has not sent the AddPlayerMessage within some timeout,  the server should disconnect the client.

Both of these changes will be much easier after #1057
Is there something else I am overlooking?

right, so there are 2 changes I would like to make:
1. the AddPlayerMessage is rejected by the server if the connection is not authenticated.  This would address #720  and it is definitely the right thing to do.

2. If a client has not sent the AddPlayerMessage within some timeout,  the server should disconnect the client.

Both of these changes will be much easier after #1057
Is there something else I am overlooking?

Sounds about right, in addition to #720 which is closely related.

:tada: This issue has been resolved in version 4.3.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

Fixed with #1211


保存资源busy or locked，导致进程退出

这个问题不太多见，但是每次出现便会使进程退出。
code：
await file.toFile(`${dir_path}${file_path}${file_name}`, true).catch((e) => {
    logger.info(`保存文件失败，${dir_path}${file_path}${file_name}`)
    logger.error(e)
    file_path = "";
});

logs:

2018-12-17 12:39:41.438 { [Error: EBUSY: resource busy or locked, open 'C:\assets\image\2018-12-17\528548419131008142.jpg']
  errno: -4082,
  code: 'EBUSY',
  syscall: 'open',
  path:
   'C:\\assets\\image\\2018-12-17\\528548419131008142.jpg' }

2018-12-17 12:39:41.517 Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:406:19)
    at writeOrBuffer (_stream_writable.js:394:5)
    at WriteStream.Writable.write (_stream_writable.js:294:11)
    at IncomingMessage.ondata (_stream_readable.js:666:20)
    at IncomingMessage.emit (events.js:182:13)
    at IncomingMessage.EventEmitter.emit (domain.js:442:20)
    at IncomingMessage.Readable.read (_stream_readable.js:486:10)
    at flow (_stream_readable.js:922:34)
    at resume_ (_stream_readable.js:904:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
    at doWrite (_stream_writable.js:406:19)
    at writeOrBuffer (_stream_writable.js:394:5)
    at WriteStream.Writable.write (_stream_writable.js:294:11)
    at IncomingMessage.ondata (_stream_readable.js:666:20)
    at IncomingMessage.emit (events.js:182:13)
    at IncomingMessage.EventEmitter.emit (domain.js:442:20)
    at IncomingMessage.Readable.read (_stream_readable.js:486:10)
    at flow (_stream_readable.js:922:34)
    at resume_ (_stream_readable.js:904:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

2018-12-17 12:39:41.568 PID:33916 npm 1 exit!

This issue is related to wechaty, please file an issue at https://github.com/huan/file-box if you could provide any minimum reproducible code snip.


(OUI Docs) Toast

Tab: Examples
Section: Danger

[ ] Change " Error: expected _scroll_id in the folling Elasticsearch response: {"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"skipped":0,"failed":0},"hits":{"total":0,"max_score":0,"hits":[]}}" to
"Error: expected_scroll_id in the following response: {"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"skipped":0,"failed":0},"hits":{"total":0,"max_score":0,"hits":[]}}"

Tab: Guidelines
Section: Top of page

[ ] Change "Search failed. Check your Elasticsearch connection." to "Search failed. Check your connection to the cluster."

Should there be a space between expected and _scroll_id in the Danger section change? I.e. expected _scroll_id instead of expected_scroll_id?

@BSFishy  I am not 100% sure - as I copied this directly from the forked docs site - there were other errors in that blurb so perhaps? I will leave that up to you to make the call if its incorrect from a syntax perspective.
Here is where I pulled it from, where the space is present:

Based on that, it looks like it was just copy pasted weird or something. I think it should be Error: expected _scroll_id in the following response: {"took":0,"timed_out":false,"_shards":{"total":0,"successful":0,"skipped":0,"failed":0},"hits":{"total":0,"max_score":0,"hits":[]}}


Add options to export configuration to AS3/AS4

In GitLab by @bdepaula on Nov 16, 2022, 14:12
Hi!
I used the Autosubmit GUI for the first time today to copy something for a new workflow. I was looking for the platform configuration for Lumi, and with @mcastril 's help, I learned to search for "Lumi" and then open the experiment configuration in the UI.
I am writing an Autosubmit 4 workflow, so I am copying the values one by one, and pasting into YAML format. Then double-checking to make sure I didn't make any mistakes.
It would be a lot easier if the Autosubmit GUI had an option to export the configuration. It would probably have to give users the option to choose between AS3 and AS4 for now. Bonus point would be an "Copy to Clipboard" button in the UI too.
So my previous steps would consist int:

Open UI
Search LUMI
Open experiment Platform configuration
Locate LUMI, export as AS4 and copy to clipboard

And less chance of copy-and-pasta bugs :thumbsup:
Thanks!
Bruno

In GitLab by @cgutierr on Nov 17, 2022, 10:42
Once we have integrated the AS4 YAML Parser I think this could be done.


Attachments not working

This following code:
prompt = "Hello, Claude!"
conversation_id = claude_api.create_new_chat()['uuid']
response = claude_api.send_message(prompt, conversation_id, attachment="website_src.txt")
print(response)

Is not working. Comes up with this error:

I have a file website_src.txt in the same directory. I looked through your code, and it seems like if you print out data in line 122, there's some sort of error in the conversion.
Am I doing something wrong?

Found the error, I think.
Files that are exceedingly big don't work. The file I was trying was 5000+ lines, resulting in the value of data to be {"error":{"type":"api_error","message":"Streaming error"}}. Do you know of any way to solve this?

Actually, I tested it manually in Claude. Seems like it's over the length limit. Are you able to add a "Exceeding length limit" error so people can see if the attachment(s) are too big? Thanks.

Hey , @shzcuber thanks for the check , will update that error exception in next version of code!


Crash when adding the Decocraft mod

Using Craftstudio to run the Animania mod on a 1.12.2 Modpack, After adding the Decocraft2 mod the pack crashes. Is there an incompatibility with Decocraft?
crash-2018-09-03_05.01.31-client.txt

Duplicate of #38 I think
Check the answer given by Timmypote https://github.com/Leviathan-Studio/CraftStudioAPI/issues/38#issuecomment-396060826


policies.json file does not exist

On line 33 the sos-firefoxstig.sh files calls for a copy of policies.json to be put in /lib/firefox/distribution but that file is not included in this repo. Only mozilla.cfg and autoconfig.js are included.
https://github.com/simeononsecurity/FireFox-STIG-Script/blob/6936ee98565478a8c85c1ef4217ef29c86dae767/sos-firefoxstig.sh#L33

#hearts that line is clearly commented out...


Iterating over tf.Tensor is extremely slow in set_feature postprocess

Describe the bug
"Postprocess" function in set_feature.py is super slow because of one loop over tf.Tensorflow prediction results
To Reproduce
Steps to reproduce the behavior:

Create any big model with "set" output feature (my case was multilabel (tags) classification with ~10000 train dataset)
run "predict" on big dataset (~3000 rows to predict on and ~10000 tags in the idx2str dict after training)
"postprocess" function will be executed for quite a long time (20-30 times longer than the prediction process itself)

Expected behavior
Iteration in "postprocess" can be done way faster if numpy() will be used for PREDICTIONS (here, as well as it is already done for PROBABILITIES
Simple code snippet to reproduce:
import tensorflow as tf

import sys
import datetime

def print_now(msg):
    print(datetime.datetime.now(), ': ', msg)
    sys.stdout.flush()

pred_set_fake = tf.zeros([10000,], tf.int32)
print_now(pred_set_fake)

print_now('start 1')
for i, pred in enumerate(pred_set_fake):
    1 + 1
print_now('end 1')

print_now('start 2')
for i, pred in enumerate(pred_set_fake.numpy()):
    1 + 1
print_now('end 2')

output is:
/data# python test_iter.py
....
2020-10-20 06:11:03.063242 :  tf.Tensor([0 0 0 ... 0 0 0], shape=(10000,), dtype=int32)
2020-10-20 06:11:03.063733 :  start 1
2020-10-20 06:11:04.344766 :  end 1
2020-10-20 06:11:04.344881 :  start 2
2020-10-20 06:11:04.347144 :  end 2

1.3 sec vs 0.003 sec...
and since there are On^2 complexity (for in for), it is becoming a bottleneck in a whole "predict" method of the model...
Environment (please complete the following information):

OS: tensorflow:2.3.0 docker image
Python version 3.6.9 in tensorflow:2.3.0 docker image
Ludwig version v0.3

Additional context
It probably can be relevant for other types of features as well, but since I am currently working with set only, I can't be 100% sure

Thanks for the detailed issue @catr1ne55.  Can you take a look at #964 and let me know if it addresses the performance issues for your model?

Thanks for the quick fix @tgaddair! Now the performance issue is resolved.


Add support for diffing ServerTemplates, RightScripts, and MCIs

May be helpful for making #8 more effective.

https://github.com/rightscale/right_st/issues/8#issuecomment-336226311


Rendering issues

Hi,
It was reported by multiple people that there are some rendering issues. Especially with the line and chart example. All these were related to the Visual Studio project so I believe it's not generic LVGL issue but rather a Windows driver issue of some kind.
The last reported issue is here: https://forum.lvgl.io/t/two-questions-about-the-chart-control/18590/2

OK. I will try to reproduce for that.
Kenji Mouri

@kisvegabor

I solve the issue when I comment out all multi-thread rendering logic for LVGL software renderer. It looks the the string buffer from event_cb in lv_example_chart_3 will not transfer to the render thread properly.
Kenji Mouri

Thank you for looking into it. As temporal solution let's disable multi threading.

@kisvegabor But it seems no options for disabling multi-threading rendering support without setting LV_USE_OS to none. (Windows backend needs to set LV_USE_OS to Windows.)
Kenji Mouri

Windows backend needs to set LV_USE_OS to Windows

Why is this?

Windows backend needs to set LV_USE_OS to Windows

Why is this?

Because Windows backend need to use multi-thread support to split the windows thread and LVGL main thread. (For making LVGL main thread will not stuck when people moving the windows.)
Kenji Mouri

Can you use normal Windows mutex for it instead of lv_mutex? If so, LVGL's OS could be disabled.

Can you use normal Windows mutex for it instead of lv_mutex? If so, LVGL's OS could be disabled.

I can implement the Windows backend with the standalone mutex implementation. But in my opinion, it may not be a good idea. (some people may hope to use LVGL‘s OS Abstraction Layer without the multi-thread LVGL SW rendering)
Kenji Mouri

I agree, I just meant it as a hot fix. Do you have any idea what the problem could be? Can you run git bisect to find the offending commit?

I agree, I just meant it as a hot fix. Do you have any idea what the problem could be? Can you run git bisect to find the offending commit?

Because the buffer is invalid when LVGL's software render queue executing the task.
It will be fixed if I change the following line to static char buf[16];
https://github.com/lvgl/lvgl/blob/c27760fb103dbcee94bbc2751e741fb55ffa8f35/examples/widgets/chart/lv_example_chart_3.c#L30
But I don't think it's a good fix. May @kisvegabor should handle the buffer properly in lv_draw_rect or other functions.
Kenji Mouri

Ahh, it's a bug in the example. LVGL assumes the the image source is always static, but now it's a local variable and we save only its pointer. I can fix it in the example.
Could you take a look at the line related examples too? Some errors were reported for them too.

https://github.com/lvgl/lvgl/blob/c27760fb103dbcee94bbc2751e741fb55ffa8f35/src/draw/sw/lv_draw_sw_mask_private.h#L56
Change lv_draw_sw_mask_line_side_t to uint8_t because lv_draw_sw_mask_line_side_t will be seen as signed int. It actually causes LV_DRAW_SW_MASK_LINE_SIDE_TOP = -2 and LV_DRAW_SW_MASK_LINE_SIDE_BOTTOM = -3;
Kenji Mouri

Thank you, Kenji! 💯
I've just open a PR to fix both: https://github.com/lvgl/lvgl/pull/7171

As the PR is merged I'm closing this issue. Thank you again!


Not sure how to Implement a Custom Datatset

❓ Questions & Help

Hi @rusty1s , thanks so much for this powerful library. I apologize for this basic question, but I can't figure out how to implement the Dataset class.
You can find my code below. Once I instantiate my StructuresDataset class and try to access the first element of the class I get a FileNotFoundError.

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
 in
----> 1 train[0]
~/opt/anaconda3/envs/geo/lib/python3.7/site-packages/torch_geometric-1.3.2-py3.7.egg/torch_geometric/data/dataset.py in getitem(self, idx)
164         r"""Gets the data object at index :obj:idx and transforms it (in case
165         a :obj:self.transform is given)."""
--> 166         data = self.get(idx)
167         data = data if self.transform is None else self.transform(data)
168         return data
~/Desktop/Drawer/LPDI/masif-tools/dataset.py in get(self, idx)
290
291     def get(self, idx):
--> 292         data = torch.load(osp.join(self.processed_dir, 'data_{}.pt'.format(idx)))
293         return data
~/opt/anaconda3/envs/geo/lib/python3.7/site-packages/torch/serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
417             (sys.version_info[0] == 2 and isinstance(f, unicode)):
418         new_fd = True
--> 419         f = open(f, 'rb')
420     elif (sys.version_info[0] == 3 and isinstance(f, pathlib.Path)):
421         new_fd = True
FileNotFoundError: [Errno 2] No such file or directory: 'datasets/full_train_ds/processed/data_0.pt'

This confuses me a bit, because, as I understand it, the purpose of the processed_file_names function is to check whether the dataset has already been processed, so it would be normal that the data files are not there yet.
For clarity, my directory is structured like this:

project directory/

sandbox.py
datasets/

full_train_ds/

raw/

full_structure_1.pt
full_structure_2.pt
......

processed/

What am I misunderstanding?
Thank you.
Here is my non-functional implementation:
class StructuresDataset(Dataset):
    '''
    Structures class for datasets that do not fit into memory.
    '''
    def __init__(self, root='./datasets/{}/'.format(p.dataset), pre_transform=None, transform=None):
        super(StructuresDataset, self).__init__(root, transform, pre_transform)
        self.has_nan = []
        self.device = torch.device('cpu')

    @property
    def raw_file_names(self):
        n_files = len(glob('./datasets/{}/raw/full_structure_*'.format(p.dataset)))
        return ['full_structure_{}.pt'.format(idx) for idx in range(0, n_files)]

    @property
    def processed_file_names(self):
        return ['data_{}.pt'.format(idx) for idx in range(0, 9390)]

    def download(self):
        pass

    def process(self):
        from utils import has_nan

        i = 0
        for raw_path in self.raw_paths:
            data = torch.load(raw_path, map_location=self.device)

            if self.pre_filter is not None:
                if max(torch.isnan(data.shape_index)):
                    self.has_nan.append(i)
                    continue

            if self.pre_transform is not None:
                data = self.pre_transform(data)

            torch.save(data, osp.join(self.processed_dir, 'data_{}.pt'.format(i)))
            i += 1

    def len(self):
        return len(self.processed_file_names)

    def get(self, idx):
        data = torch.load(osp.join(self.processed_dir, 'data_{}.pt'.format(idx)))
        return data

And this is how I call it in a sandbox implementation:
(I'm just trying to preprocess the data for now, without actually using it)
from dataset import StructuresDataset
from torch_geometric.transforms import *
from transforms import *
from torch_geometric.data import DataLoader

train = StructuresDataset(root='./datasets/full_train_ds/',
                          pre_transform=Compose((Center(), FaceAttributes(),
                          NodeCurvature(), FaceToEdge(),
                          TwoHop(), AddShapeIndex())))
loader = DataLoader(train)

for l in loader:
    l.y = l.x

This seems weird. Do you can verify if the files are actually existing on the disk? Does the process method even gets called?

The files do seem to exist,

The process function is called, but the function does not seem to enter the loop for the self.raw_paths.

Yes, because raw_file_names is empty because the glob needs to be dependent on self.root.

This fixed it, thanks!


⚠ PrivateHD has degraded performance

In dc8744f, PrivateHD ($PHD) experienced degraded performance:

HTTP code: 200
Response time: 2217 ms

Resolved: PrivateHD performance has improved in 86c46e2.


perf(migrations) store workspace id after first retrieval

Summary
On issue #6403 we have tried to chase the reason for why selecting default workspace id sometimes fail. This commit tries to make it so that if we ever get workspace id, we will store it in module level variable for further migrations that might need it, and not trying to do select each time, which seems flaky according to #6403.
We labeled this as perf as that is one thing that it surely does, but we are not sure if it fixes the #6403, and even if it does, we still do not fully understand the root cause of it.

I believe there is a syntax error here:
are/lua/5.1/kong/db/migrations/operations/200_to_210.lua:36: 'then' expected near 'if'
https://github.com/Kong/kong/pull/6477/files#diff-a51f0b3a06da0032120a0fc0a75b901289ad68e648a56f33fdad160e2e562d59R36-R37
Testing it with line 36 removed.

@jeremyjpj0916 Yes, it was caused by GitHub not allowing suggesting edits on lines that are deleted. I have manually fixed the error.


modify indexing

Codecov Report

Merging #27 into master will not change coverage.
The diff coverage is 50%.

@@          Coverage Diff           @@
##           master     #27   +/-   ##
======================================
  Coverage    92.7%   92.7%
======================================
  Files          13      13
  Lines         370     370
======================================
  Hits          343     343
  Misses         27      27

Impacted Files
Coverage Δ

frame/main.py
98.01% <50%> (ø)
:white_check_mark:

Continue to review full report at Codecov.

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


move the Symfony validator to its package

Q
A

Bug Fix?
no

New Feature?
yes

BC Breaks?
yes

Deprecations?
no

Fixed Tickets
#35

License
MIT

A new inspection was created.

A new inspection was created.

The inspection completed: No new issues


Update webtools to use cherypy 3.2.0

Says valentine:
{{{
Steve, the problem occurred because I use cherrypy 3.2.0 which has different response.status structure. The problem with WMCore code is 2 fold: it assumes certain structure with response.status (it does not check its type and use split), and there is a caught exception elsewhere which does not propagated to and totally hides the real error. The remedy to first problem is simple, here is patch
diff --git a/src/python/WMCore/WebTools/Root.py b/src/python/WMCore/WebTools/Root.py
index fae75fc..c8e0169 100644
--- a/src/python/WMCore/WebTools/Root.py
+++ b/src/python/WMCore/WebTools/Root.py
@@ -85,7 +85,7 @@ class WTLogger(LogManager):
'H': self.host,
'h': remote.name or remote.ip,
'r': request.request_line,

        's': response.status.split(" ", 1)[0],

        's': str(response.status),
        'b': outheaders.get('Content-Length', '') or "-",
        'T': (time.time() - request.start_time)*1e6,
        'AS': inheaders.get("CMS-Auth-Status", "-"),

The caught exception is hard to find in a code. May be you know code better then I am. Anyway I can run my app now with change shown above.
}}}

Comp has moved to cherrypy 3.2.2, I guess we can close this one, @ticoann ?


Type inference that worked on 0.3.17 fails on versions ≥ 0.3.19

Hello!
It looks like the following code, which used to work fine on time 0.3.17, now fails on 0.3.18 and 0.3.19:
use std::time::SystemTime;
use time::ext::NumericalDuration;
use time::OffsetDateTime;

fn main() {
    let now = OffsetDateTime::now_utc();
    let one_hour = 1.hours();

    let _: SystemTime = (now+one_hour*2).into();
}

It gives this error:
   Compiling test-time v0.1.0 (/home/nickm/src/test-time)
error[E0282]: type annotations needed
 --> src/main.rs:9:25
  |
9 |     let _: SystemTime = (now+one_hour*2).into();
  |                         ^^^^^^^^^^^^^^^^ cannot infer type

The last line works fine if you remove the * 2, or if you replace one_hour * 2 with 2.hours(), or if you replace the whole expression with SystemTime::from(now+one_hour*2).

I don't immediately recall a reason this would have changed. I'll look into it.
It's worth noting that this is a minor breaking change per RFC 1105.

Bisect traces this to ce6c5af, which was not supposed to affect the public API in any way. Time for a more thorough investigation…

Oddly, adding a type to the integer being multiplied solves the inference problem.
Slightly modifying the example to better demonstrate the issue expression-by-expression.
use std::time::SystemTime;
use time::ext::NumericalDuration;
use time::OffsetDateTime;

fn main() {
    let one_hour = 1.hours(); // line A
    let two_hours = one_hour * 2; // line B
    let added = OffsetDateTime::UNIX_EPOCH + two_hours; // line C
    let _: SystemTime = added.into(); // line D
}

error[E0282]: type annotations needed
 --> src/main.rs:8:9
  |
8 |     let added = OffsetDateTime::UNIX_EPOCH + two_hours;
  |         ^^^^^
9 |     let _: SystemTime = added.into();
  |                         ----- type must be known at this point
  |
help: consider giving `added` an explicit type
  |
8 |     let added: /* Type */ = OffsetDateTime::UNIX_EPOCH + two_hours;
  |              ++++++++++++

Either of the following changes makes compilation succeed:
-   let two_hours = one_hour * 2;
+   let two_hours = one_hour * 2i32;

-   let _: SystemTime = added.into();
+   let _ = SystemTime::from(added);

With my understanding of the compiler, neither of these changes should make a difference. The trait implementations are the same before and after ce65af. At this point, this is beyond my level of compiler knowledge. I'm going to create a thread on Zulip to see if anyone with more knowledge can figure this out.

There is one difference in the trait implementations that looks like it could be relevant here:
-impl<T> Add<T> for OffsetDateTime
-where
-    PrimitiveDateTime: Add<T, Output = PrimitiveDateTime>,
-{
-    type Output = Self;
-
-    fn add(self, rhs: T) -> Self::Output {
-        (self.local_datetime + rhs).assume_offset(self.offset)
-    }
-}
+impl Add<Duration> for OffsetDateTime {
+    type Output = Self;
+
+    fn add(self, rhs: Duration) -> Self::Output {
+        Self(self.0.add(rhs))
+    }
+}
+
+impl Add<StdDuration> for OffsetDateTime {
+    type Output = Self;
+
+    fn add(self, rhs: StdDuration) -> Self::Output {
+        Self(self.0.add(rhs))
+    }
+}

I think this is what is tripping up the type inference. The variables have the types:
one_hour: Duration
two_hours: <Duration as Mul<{integer}>>::Output
added: <OffsetDateTime as Add<<Duration as Mul<{integer}>>::Output>>::Output

In the old version, with the single blanket impl, the compiler apparently feels safe working back and substituting {integer} with an implicit i32, then working forward and figuring out the rest of the types. But in the new version, with the two concrete impls, it apparently doesn't want to resolve the {integer} in the same way. Even though the old version ultimately redirects to two concrete impls, funneling it through one blanket impl makes it work.
For a smaller example:
use std::ops::{Add, Mul};

struct D;
struct D2;
struct ODT;
struct ST;

impl Mul<i32> for D {
    type Output = D;
    fn mul(self, _: i32) -> Self::Output {
        Self
    }
}

impl Mul<i64> for D {
    type Output = D;
    fn mul(self, _: i64) -> Self::Output {
        Self
    }
}

impl Add<D> for ODT {
    type Output = ODT;
    fn add(self, _: D) -> Self::Output {
        Self
    }
}

impl Add<D2> for ODT {
    type Output = ODT;
    fn add(self, _: D) -> Self::Output {
        Self
    }
}

impl From<ODT> for ST {
    fn from(_: ODT) -> Self {
        Self
    }
}

fn main() {
    let one_hour: D = D;
    let two_hours = one_hour * 2;
    let added = ODT + two_hours;
    let _: ST = added.into();
}

Commenting out the impl Add<D2> for ODT block allows the code to compile.

(Pretty much the same conclusions as above:)

I believe it was the change from
impl<T> Add<T> for OffsetDateTime
where
    PrimitiveDateTime: Add<T, Output = PrimitiveDateTime>,
{ /* ... */ }

to
impl Add<Duration> for OffsetDateTime { /* ...*/ }
impl Add<StdDuration> for OffsetDateTime { /* ...*/ }

Here's a playground reproduction to more easily swap between the two (not necessarily minimal).
If you can restore the indirect implementation, it may solve the regression.

I haven't nailed down the why.  Spitballing: The compiler defers knowing the type of two_hours (ambiguous integer, doesn't see all Mul implementations have the same Output) or added (ambiguous two_hours) until forced to, and there's something in the trait resolution that triggers a fallback to i32 with the generic implementation that doesn't get triggered with the new implementations.  (Once you've made the integer unambiguous, two_hours is unambiguous, so added is unambiguous.)
Here's another way to work around it:
-   let _: SystemTime = added.into();
+   let _: SystemTime = <_>::into(added);
+   // or
+   // let _: SystemTime = Into::into(added);

The latter will only find trait methods.

Reduction.
#23545 I suppose.  The <_>::-like workarounds work because they avoid method call resolution, based Niko's first comment in that issue.
After thinking about it a little more, I believe the difference is the number of implementations.  With the generic approach, there's only one applicable implementation.  This could lead the compiler consider added to have an unambiguous type, so the .into() is no longer problematic.  (For example this fails too.)  Then it can get to "the end of the cycle" and applies integer fallback.
In that case, the compiler noticing multiple implementations have the same resulting type would also fix this.

Thank you for the detailed explanations!
I'll look into whether it's reasonable to revert the implementation to a blanket impl. It is a breaking change, although nobody seems to have been relying on it. I'll have to weigh the future API design versus this being a tree falling without making a noise (directly).
This specific inference issue is definitely upstream in the compiler, and the inference failure is a minor breaking change as noted above. So the inference by itself is not sufficient reason to revert the change.

While it is theoretically possible to revert the change in question, I have decided not to do so. Doing so would result in worse code overall, both in time and in code generated (the assembly is ~50% larger for the method if I revert it). It would also somewhat restrict API development of time, as it would functionally not allow exposing the current DateTime struct that is presently internal.
As the inference is acceptable breakage per RFC 1105, that's a known issue upstream in the compiler. I'm sure eventually inference will be improved, though I am not aware of any concrete plans to implement the relevant logic.
In any situation, thank you for the report! It's best to be sure when something breaks unexpectedly.


Added The Galgos NFT project

Hello,
this PR has been open for almost 2 weeks and I would like to give you a little feedback about it here. It probably didn't get enough "traction" among reviewers. Please note that showcase projects need to provide a unique value from existing showcase items and need to have enough community reputation.
My personal suggestions:
Close this PR, try to improve it, try to get more traction in the community and come back later. Maybe you could also find other parts in the portal where you can contribute.
References:
The current guidelines: https://github.com/cardano-foundation/developer-portal/edit/staging/src/data/showcases.js
Discussions about guidelines: https://github.com/cardano-foundation/developer-portal/discussions

Hi @katomm, how you measure enough reputation from the community?

Hi @katomm, how you measure enough reputation from the community?

Community reputation obviously cannot be measured in numbers.

Here is Charles asking why this is not yet merged ;)
Anybody can help? The #CNFT community is asking for this. Thanks!

Our project is different from the rest as we are developing with smart-contracts to add functionality to our NFTs. Obviously we are waiting for the deployment on the main-net. But for example, these are galgos/dogs and they have a default given name. If you want, you could change its name to the one that you like, this way the NFT is updated based on holder preferences. We burn the token and we mint the same but with updated metadata. This will make them more unique. Another example, we are working a game so your galgo is something that will evolve based on your actions. You can think of a play-to-earn game. If you want more details please let me know, thanks!


Move some types to a .Internal namespace

now that we did the Http -> Http.Core swap we need to move some types into an internal namspace:

BufferingHelper

Dupe of https://github.com/aspnet/HttpAbstractions/issues/281, https://github.com/aspnet/HttpAbstractions/issues/271


Issue with k8s.io/docs/tasks/debug-application-cluster/debug-service/

This is an Enhancement Request

Problem:
Proposed Solution:
Page to Update:
https://kubernetes.io/...

I'd like to have a section on StatefulSet and services.
Thanks

@zrml are you looking after https://kubernetes.io/docs/tasks/debug-application-cluster/debug-stateful-set/ and https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/ ?

@DanyC97 No I'm not.

@zrml okay then would you mind providing more info as to  what you would like to have in addition to the above pages i've mentioned ?
/triage needs-information

gentle reminder @zrml

@DanyC97 thanks for the reminder... too many flights and lounges. I misunderstood your comments above. I'm OK with the links you provided for now. I'm hoping to progress my K8s work this week. I may get back to you. Close this for now. Thanks a million and apologies.

no need to apologies @zrml , thank you for feedback.
/close


Timesheet locks does not seem to working.

Hello,
This could be a newbie issue. I apologize if that is the case. However, after fresh (successful) installation of the plugin and configuring the user and other settings, I have the following user preferences:
+----+---------+--------------------------+---------------------+
| id | user_id | name                     | value               |
+----+---------+--------------------------+---------------------+
| 53 |       2 | __wizards__              | intro,profile       |
| 27 |       2 | calendar_initial_view    | month               |
| 30 |       2 | daily_stats              |                     |
| 31 |       2 | export_decimal           |                     |
| 29 |       2 | favorite_routes          |                     |
| 24 |       2 | first_weekday            | monday              |
| 21 |       2 | hourly_rate              | 0                   |
| 22 |       2 | internal_rate            | NULL                |
| 20 |       2 | language                 | en                  |
| 23 |       2 | locale                   | en                  |
| 35 |       2 | lockdown_grace_period    | 0000-01-01 00:00:01 |
| 33 |       2 | lockdown_period_end      | 0000-01-01 00:00:01 |
| 32 |       2 | lockdown_period_start    | 0000-01-01 00:00:01 |
| 34 |       2 | lockdown_period_timezone | NULL                |
| 28 |       2 | login_initial_view       | timesheet           |
| 25 |       2 | skin                     | default             |
| 19 |       2 | timezone                 | America/Los_Angeles |
| 26 |       2 | update_browser_title     | 1                   |
+----+---------+--------------------------+---------------------+

After creating the first timesheet and sending it for approval, additional preferences are created in user_preferences table; however, the lockdown_period* settings do not change. End result is that timesheets are not locking.
mysql> select * from kimai2_user_preferences where user_id=2;
+----+---------+------------------------------------------+---------------------+
| id | user_id | name                                     | value               |
+----+---------+------------------------------------------+---------------------+
| 53 |       2 | __wizards__                              | intro,profile       |
| 27 |       2 | calendar_initial_view                    | month               |
| 30 |       2 | daily_stats                              |                     |
| 31 |       2 | export_decimal                           |                     |
| 29 |       2 | favorite_routes                          |                     |
| 24 |       2 | first_weekday                            | monday              |
| 21 |       2 | hourly_rate                              | 0                   |
| 22 |       2 | internal_rate                            | NULL                |
| 20 |       2 | language                                 | en                  |
| 23 |       2 | locale                                   | en                  |
| 35 |       2 | lockdown_grace_period                    | 0000-01-01 00:00:01 |
| 33 |       2 | lockdown_period_end                      | 0000-01-01 00:00:01 |
| 32 |       2 | lockdown_period_start                    | 0000-01-01 00:00:01 |
| 34 |       2 | lockdown_period_timezone                 | NULL                |
| 28 |       2 | login_initial_view                       | timesheet           |
| 25 |       2 | skin                                     | default             |
| 57 |       2 | timesheet_rules_lockdown_grace_period    | 2024-02-24 14:19:11 |
| 55 |       2 | timesheet_rules_lockdown_period_end      | 2024-02-25 23:59:59 |
| 54 |       2 | timesheet_rules_lockdown_period_start    | 0000-01-01 00:00:01 |
| 56 |       2 | timesheet_rules_lockdown_period_timezone | America/Los_Angeles |
| 19 |       2 | timezone                                 | America/Los_Angeles |
| 26 |       2 | update_browser_title                     | 1                   |
+----+---------+------------------------------------------+---------------------+

I went through the troubleshooting guide and set the user/approver and lockdown values as recommended.
Thanks!
Jay

@sammaclennan , do you have time to look into this issue? It's on the Kimai version 2 support version (main), in the version 1 it's working.

@KatjaGlassConsulting does that work without the plugin for user specific lockdown periods?

No, it needs the lockdown bundle. But also with the bundle it's not working. I tested this.

@kevinpapst , did you have the opportunity to look at this?

No.
But I can have quick look if you help me: where in the code are these preferences written?

it's in the Approval controller "$this->lockdownRepository->updateLockWeek($approval, $this->approvalRepository);"

Hi, love your work on this. Do we know roughly when this will be sorted? I have the same issue on a fresh install.

Apologies all, I've been away for a while and haven't been able to take a look - but I'll try to find some time this week!

Hi, Any update on this issue? I would like to use the plugin if possible.

Working on it, haven't quite cracked it yet but should be good to go soon!

Pull request submitted, should resolve the issue.
Turned out I was way overcomplicating it - still new to Symfony/Doctrine!

I have installed the latest version, and the plugin seems to work as expected.
Thank you so very much!

closing since the bug seems to be fixed.


Use sublime.find_resources instead of os.listdir to find plugins.

In reload_plugin, os.listdir was used to find top-level plugins. This fails when the package in question is zipped (such as an installed package). Ordinarily, this wouldn't matter, because reloading is triggered when you edit a package file (which is by definition not zipped). However, there are two situations in which this could fail:

You're reloading a file in an override, and non-overridden files in the installed package refer to the overridden file.
You're reloading a dependency, and an installed package refers to that dependency.

In either case, os.listdir will raise FileNotFoundError.
This PR uses sublime.find_resources instead of os.listdir to find top-level plugin scripts. It should cover both these cases. Outside these cases, there should be no change in behavior.
Note: posixpath is used to manipulate the resource paths. This should be correct regardless of the underlying platform. As an alternative, I suggest that sublime_lib.ResourcePath might help to simplify this logic and a good deal of other path-related logic in this package. Adding a sublime_lib dependency is outside the scope of this PR.

Thanks for the work.

Adding a sublime_lib dependency is outside the scope of this PR.
I agree.

Thomas, I have added you as a collaborator because you have some better understanding of some part of the code than I do. It's okay if you don't want to be a collaborator though.


Finish & use new payconiq embedded app

So that we no longer have to build rogerthat-payment for every app, and so that we can update it without updating the app. It's mostly finished, but needs to be tested properly.
See https://github.com/rogerthat-platform/embedded-app-payconiq/pull/1

Need to contact payconiq about why we can't register in the test app


LC-14: agency self sign up

csrs service endpoints

Replaced by https://github.com/Civil-Service-Human-Resources/identity-service/pull/119


Can't create custom SortFunctions

The current setup of SortFunction.swift makes it impossible to create custom instances of SortFunctions because:

SortFunction is public, implying that the intention is that developers should be able to conform to it and create custom sorts.
SortFunction requires two functions, each of which are expected to return [TimedView].
However, TimedView has two properties, each of which have no access modifiers (and so default to internal), and which has no init method (and so one is autogenerated and defaults to internal).
Because TimedView's init and properties are all internal, they can't be viewed from outside of the compiled target and, thus, it is impossible to construct a new instance of a TimedView. This means it's impossible to make one to return from the required functions and so it is impossible to actually subclass SortFunction.

I recommend we create a public init method for this struct to fix this issue. I'll submit a PR shortly to do that.

Resolved by merging of #109 - thanks @eriklamanna


Plugin has seemingly bricked, quests do not advance, can't reload the plugin.

What is your Quests version / build number (do not say "latest")?
4.0.1-b230
Describe the problem and how to replicate it. Any console errors to post using a pastebin?
I logged on the server to edit a quest, I edited said quest, and when I attempted to reload I was met with "An unknown error occurred. See console output." I don't really know how to replicate this, all I did was edit a quest and use /qa reload. The quest had a blank stage in it before I edited it, if that's of any revelation.
Quest:
https://pastebin.com/rZg0EHPN
Here's the errors it gave on startup.
https://pastebin.com/6u3Ne2Yj

Your post is firstly invalid. Please use the template

@Minerboybp Something is wrong with the stages of one of your quests. Could be an administrator deleted a stage that a player was currently taking or had previously taken. This development build will not fix this issue, but will inform the console of which quest is the problem one next time it occurs: https://ci.codemc.io/job/PikaMug/job/Quests/235/


I created a repository and I am able to push the code to repository without credentials??

Gitea version (or commit ref):
Git version:
Operating system:
Database (use [x]):

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

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

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

Log gist:

Description
...
Screenshots

check your git credential cache, git has probably cached your credentials

but in every system I am able to push to master without any password?

and using any branch I am able to push without asking any passwords.

I'm not able to reproduce this at all on either try.gitea.io or my personal Gitea hostings. All tests yield the auth login prompt from both TortoiseGit as well as command line.

@srikanthdasari66 Please use our forums at https://discourse.gitea.io/ for this question. Information such as if you are using SSH or HTTP(S) would be helpful as well as the version of Gitea you are using.
If using SSH you may not be prompted for a password because your SSH key is already authenticated.
I am going to close this issue now.


fix(core): update LavamoatModuleRecord

add missing @babel/types dep

This adds an optional InitArgs type argument that different implementations can use to define the arguments to the module initializer function.  For Node.js, that might be the type of [module, require, exports, __dirname, __filename] and for browserify/webpack, that's something else.
@kumavis @naugtur I'm not sure if my descriptions are correct; please let me know.

I'm reading on the phone app, so apologies if I missed something. Seems like we're defaulting to empty array on init args. I'd rather default to the cjs module ones as they're common (pun!)

@naugtur You mean default the type argument to that, or default the value to that?  Because the latter would be a logic change.

Thought it would be a good idea, but let's not make breaking changes.


mdionis/CRO-646: Add tags to Crosshatch mixes

mdionis/CRO-646: Add tags to Crosshatch mixes
These changes leverage the existing categories array of type Category to support "tags". Category can now be one of "coding", "fast", "general", "open-source", "reasoning", or "translation". (note: we still need to agree on a final set of categories before merging). Relevant categories were applied to each mix and each mix README was updated to establish consistent formatting and to list categories.
These changes were tested locally to ensure they work well in the monorepo where they will be utilized. 👍🏻

Thanks so much, @Matt-Dionis!
I think for now, a good initial set could be:

Coding
Multilingual
Multimodal
Open-source
Mixture of Agents
Leaderboard
Tool Use
Chat

The implication being a mix can have more than one categories.


clarification

Thank you for sharing.

hello Ahmed,
First, Thank you for your interest for our work and your feedback. I will
share with you the preprocessing code that will allows you to create a
ready to train raw_data as soon as possible.
Best regard,
Elies Gherbi
Le ven. 2 oct. 2020 à 19:10, Ahmad Bashir<EMAIL_ADDRESS>a
écrit :

kindly could you explain more on how to set the configuration data for
creating the training and testing set and how to create the univariate and
multivariate archives in one simple excutable example.
Thank you in advance for sharing.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/anonymeEG/Deep-Learning-4-IDS/issues/1, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AJM4WYSFBRMY4QAVAIG46OLSIYCPXANCNFSM4SB565JQ
.

--
Email<EMAIL_ADDRESS>Tél: (+33)6 52 05 09 74

Dear Elies Gherbi,
looking forward to hear from you


Update version: dvcrn.markright version 0.1.11

Pull request has been created with WinGet Automation :rocket:
Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-pkgs/pull/113640&drop=dogfoodAlpha

@wingetbot waivers Add Validation-Executable-Error

@wingetbot run


List setuptools under install_requires

Hi,
pkg_resources is used, making setuptools a runtime dependency.

Thank you for your contribution!
This GitHub repository is just a mirror of https://opendev.org/openstack/cliff, where development really happens. Pull requests proposed on GitHub are automatically closed.
If you are interested in pushing this code upstream, please note that OpenStack development uses Gerrit for change proposal and code review.
If you have never contributed to OpenStack before, please see:
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
Feel free to reach out to the First Contact SIG by sending an email to the openstack-discuss list with the tag '[First Contact]' in the subject line. To email the mailing list, you must first subscribe which can be done here:
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss


django 3.1.5 - cannot import name 'python_2_unicode_compatible'

import error installing with django 3.1.5:
cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding
Issue:
Django 3 has removed the django.utils.encoding.python_2_unicode_compatible() api.
https://docs.djangoproject.com/en/3.0/releases/3.0/
Solution:
I only found one use, but there could be more? mama_cas/models.py
replace: from django.utils.encoding import python_2_unicode_compatible
with: from six import python_2_unicode_compatible

@necholasg the code is fixed in master, we will release soon. Thanks for reporting and sorry for the inconvenience.

Version 2.5.0 is now released and should fix this issue, please reopen if necessary.
https://pypi.org/project/django-mama-cas/


error moving backup

At the line of moving the backup from day to previous day I get the below errors. Result is that the old backup is moved to /previous_day but it also still shows up in /day. Apparently the delete part of the mv command fails.
Moving the backup from past day to another folder...
WARNING: Retrying failed request: /sql/previous_day/databases.03.26.2013.tar.gz (timed out)
WARNING: Waiting 3 sec...
WARNING: Retrying failed request: /sql/previous_day/databases.03.26.2013.tar.gz (timed out)
WARNING: Waiting 6 sec...
WARNING: Retrying failed request: /sql/previous_day/databases.03.26.2013.tar.gz (timed out)
WARNING: Waiting 9 sec...
WARNING: Retrying failed request: /sql/previous_day/databases.03.26.2013.tar.gz (timed out)
WARNING: Waiting 12 sec...
WARNING: Retrying failed request: /sql/previous_day/databases.03.26.2013.tar.gz (timed out)
WARNING: Waiting 15 sec...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please report the following lines to:
<EMAIL_ADDRESS>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Problem: S3RequestError: Request failed for: /sql/previous_day/databases.03.26.2013.tar.gz
S3cmd:   1.0.0
Traceback (most recent call last):
File "/usr/bin/s3cmd", line 2006, in
main()
File "/usr/bin/s3cmd", line 1950, in main
cmd_func(args)
File "/usr/bin/s3cmd", line 618, in cmd_mv
subcmd_cp_mv(args, s3.object_move, "move", "File %(src)s moved to %(dst)s")
File "/usr/bin/s3cmd", line 607, in subcmd_cp_mv
response = process_fce(src_uri, dst_uri, extra_headers)
File "/usr/share/s3cmd/S3/S3.py", line 315, in object_move
response_copy = self.object_copy(src_uri, dst_uri, extra_headers)
File "/usr/share/s3cmd/S3/S3.py", line 311, in object_copy
response = self.send_request(request)
File "/usr/share/s3cmd/S3/S3.py", line 487, in send_request
return self.send_request(request, body, retries - 1)
File "/usr/share/s3cmd/S3/S3.py", line 487, in send_request
return self.send_request(request, body, retries - 1)
File "/usr/share/s3cmd/S3/S3.py", line 487, in send_request
return self.send_request(request, body, retries - 1)
File "/usr/share/s3cmd/S3/S3.py", line 487, in send_request
return self.send_request(request, body, retries - 1)
File "/usr/share/s3cmd/S3/S3.py", line 487, in send_request
return self.send_request(request, body, retries - 1)
File "/usr/share/s3cmd/S3/S3.py", line 489, in send_request
raise S3RequestError("Request failed for: %s" % resource['uri'])
S3RequestError: Request failed for: /sql/previous_day/databases.03.26.2013.tar.gz
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please report the above lines to:
<EMAIL_ADDRESS>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Past backup moved.

@tihe what does your cronjob look like? Do you still have this issue?


utils/RunONNXModel.py does not support string-type model inputs

"bidaf" model in the model zoo uses string-type inputs, so that we need string-type inputs in order to execute the model.
If possible, I want to use utils/RunONNXModel.py to execute the model, but it does not support string-type inputs, even if the following ad-hoc patch is used to get input_names and output_names correctly without errors.
It seems that we need (1) "generator of random string array" and (2) "loader of protobuf file (e.g. input_0.pb) supporting string type".
$ git diff
diff --git a/utils/RunONNXModel.py b/utils/RunONNXModel.py
index f2b77ad4..d28386d8 100755
--- a/utils/RunONNXModel.py
+++ b/utils/RunONNXModel.py
@@ -552,8 +552,8 @@ def main():
         print("  took ", end - start, " seconds.\n")

         # Get the input and output signature.
-        input_signature = sess.input_signature()
-        output_signature = sess.output_signature()
+        input_signature = sess.input_signature().replace('!krnl.string', '\"string\"')
+        output_signature = sess.output_signature().replace('!krnl.string', '\"string\"')
         input_names = get_names_in_signature(input_signature)
         output_names = get_names_in_signature(output_signature)

The following errors occur with and without specifying the reference holder.
Use reference folder specified by "--load-ref"
$ ONNX_MLIR_HOME=/Dreamer/trl/negishi/src/dlc.git/onnx-mlir/build/Debug ./utils/RunONNXModel.py --compile-args='--O3 --EmitLib --mtriple=s390x-ibm-loz --mcpu=z16 --onnx-op-stats TXT' --verify ref --verify-every-value --load-ref bidaf/test_data_set_0 --model bidaf/bidaf.onnx --load-so bidaf/bidaf-noshape-cpu.so
Numpy type not supported: object.

Use random data without using "--load-ref"
$ ONNX_MLIR_HOME=/Dreamer/trl/negishi/src/dlc.git/onnx-mlir/build/Debug ./utils/RunONNXModel.py --compile-args='--O3 --EmitLib --mtriple=s390x-ibm-loz --mcpu=z16  --shapeInformation=0:1x1,1:1x1x1x16,2:1x1,3:1x1x1x16 --onnx-op-stats TXT' --shape-info=0:1x1,1:1x1x1x16,2:1x1,3:1x1x1x16 --model bidaf/bidaf.onnx --load-so bidaf/bidaf-noshape-cpu.so
Temporary directory has been created at /tmp/tmpys7ijhab
Loading the compiled model ...
  took  0.0008687269873917103  seconds.

Generating random inputs ...
Traceback (most recent call last):
  File "./utils/RunONNXModel.py", line 667, in <module>
    main()
  File "./utils/RunONNXModel.py", line 565, in main
    inputs = generate_random_input(input_signature, input_shapes)
  File "./utils/RunONNXModel.py", line 362, in generate_random_input
    np_elem_type = MLIR_TYPE_TO_NP_TYPE[elem_type]
KeyError: 'string'

Your comments and advises are very welcome to support string-type inputs.

@gongsu832 Would this be something you can take a look at? I just added support for Equal Operation that requires input type string and the backend tests are failing due to this type not being supported as of yet. If we are able to get this support in, we can enable the backend test for categorymapper and equal operation. Let me know your thoughts. Thanks!


I don't know where DataTx is activated during bootNotification() function analysis.

Dear Math-x
I have a question about the library.
Hi, I'm leaving a question because I have a question during matth-x function analysis.
bootNotification("test1", "test2");
If you use this function, you will not be able to find where it becomes Tx.
If you look at the definition in ArduinoOcpp.cpp, there's only json form of writing, and I don't know where to send the Tx.
void bootNotification(const char *chargePointModel, const char *chargePointVendor, OnReceiveConfListener onConf, OnAbortListener onAbort, OnTimeoutListener onTimeout, OnReceiveErrorListener onError, std::unique_ptr timeout) {
if (!ocppEngine) {
AO_DBG_ERR("OCPP uninitialized"); //please call OCPP_initialize before
return;
}
auto credentials = std::unique_ptr(new DynamicJsonDocument(
JSON_OBJECT_SIZE(2) + strlen(chargePointModel) + strlen(chargePointVendor) + 2));
(credentials)["chargePointModel"] = (char) chargePointModel;
(credentials)["chargePointVendor"] = (char) chargePointVendor;
bootNotification(std::move(credentials), onConf, onAbort, onTimeout, onError, std::move(timeout));
}
void bootNotification(std::unique_ptr payload, OnReceiveConfListener onConf, OnAbortListener onAbort, OnTimeoutListener onTimeout, OnReceiveErrorListener onError, std::unique_ptr timeout) {
if (!ocppEngine) {
AO_DBG_ERR("OCPP uninitialized"); //please call OCPP_initialize before
return;
}
auto bootNotification = makeOcppOperation(
new BootNotification(std::move(payload)));
if (onConf)
bootNotification->setOnReceiveConfListener(onConf);
if (onAbort)
bootNotification->setOnAbortListener(onAbort);
if (onTimeout)
bootNotification->setOnTimeoutListener(onTimeout);
if (onError)
bootNotification->setOnReceiveErrorListener(onError);
if (timeout)
bootNotification->setTimeout(std::move(timeout));
else
bootNotification->setTimeout(std::unique_ptr(new SuppressedTimeout()));
ocppEngine->initiateOperation(std::move(bootNotification));
}
I would appreciate it if you could tell me which part is the function that Tx operates.

Hi @jpily
Do you mean the route of the bootNotification through the library? It is:

In ArduinoOcpp.cpp, bootNotification calls ocppEngine->initiateOperation(std::move(bootNotification));
OcppEngine forwards it to OcppConnection via oConn.initiateOcppOperation(std::move(op));
OcppConnection queues initated operations and sends them out delayed in another loop call. Eventually it calls sendReq(ocppSock); of the operation
OcppOperation serializes the BootNotification message using createReq() and sends it using ocppSocket.sendTXT(out);

You must be busy until late, but thank you for taking the time for your sincere reply. Ask for additional help.

I want to create a separate function in main.cpp to create Tx and Rx OCPP-J (json format) messages and test them directly on Steve-server. You need to create a transmit/receive function and finally implement the connection with Steve-server without using wifi using TCP/IP using the sim7600 1lc LTE module.

Sending and receiving via AT command is needed, so I would appreciate any advice to create a function.

Closing this due to inactivity


Sensitive Data in appveyor.yml

There seems to be some API Tokens and keys in appveyor.yml
Should they really be within?

Those are secure variables (managed by AppVeyor) for deploying build artifacts


Is not possible to restore attachments

Hi!

Hi Susana, Due the attachments are being transcript onto the documents. The Script only works for DB of 1 GB to dump


Expected to be able to use explicit provider with Any TF

What happened?
I assumed an Any TF provider could be used explicitly but receive an error.
Example
pulumi new csharp
pulumi package add terraform-provider taliesins/hyperv
add an explicit provider of the any TF:
    var hypervProvider = new Pulumi.Hyperv.Provider("main", new ProviderArgs
    {
        Port = 5985,
        Insecure = true
    });

pulumi preview fails with:
Previewing update (dev)

     Type                        Name            Plan       Info
 +   pulumi:pulumi:Stack         HyperVPOC2-dev  create
     └─ pulumi:providers:hyperv  main                       1 error
Diagnostics:
  pulumi:providers:hyperv (main):
    error: Could not automatically download and install resource plugin 'pulumi-resource-hyperv' at version v1.2.1, install the plugin using `pulumi plugin install resource hyperv v1.2.1`: error downloading provider hyperv to file: failed to download plugin: hyperv-1.2.1: 403 HTTP error fetching plugin from https://get.pulumi.com/releases/plugins/pulumi-resource-hyperv-v1.2.1-windows-amd64.tar.gz

Output of pulumi about
CLI
Version      3.142.0
Go Version   go1.23.3
Go Compiler  gc

Plugins
KIND      NAME    VERSION
language  dotnet  unknown

Host
OS       Microsoft Windows 11 Pro
Version  10.0.22631 Build 22631
Arch     x86_64

This project is written in dotnet: executable='c:\program files\dotnet\dotnet.exe' version='9.0.101'

Found no resources associated with dev

Found no pending operations associated with dev

Dependencies:
NAME    VERSION
Pulumi  3.71.0

Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Is there some kind of workaround for this (changing the source code?) or do we have to wait for fix to be released? :)

If you can use default providers instead of explicit providers that should work, it was tested separately. Explicit provider support needs a fix in the core sdk and code generators.

I think in this case we have to provide the provider explicitly because it contains connection details (api key, url etc) :(

This issue got closed, does it mean tha the bug fix is out?

@marcindruzgala no, an issue closed means that a fix has been merged. Subsequently we're going to make a release including the fix, and @pulumi-bot bot will comment on the issue, notifying everyone about which release the fix is included.


Categories should be configuration

With one pipeline, the big ugly categories object worked, even if it's not nice. Now we're adding a second pipeline to test for UI acceptance criteria, it is much less good.
Tasks

[ ] Decide how best to pass it in (it can be a big ugly command line param, but there is probably a better plan
[ ] Do it
[ ] Update pipelines to pass in category configuration

Closing this, as it's not going to happen any time soon and #46 has also added a similar file for priorities.


::! and :r! support?

I know this isn't being actively developed, but if someone takes it on again vim-like shelling out support with :! <command> and :r! <command> would be a nice addition.

This could be implemented for instance by just passing the command to spawn a new process. @acrosby What is :r! exactly? Can you link to some vim docs? :)

:r! is just like :! but returns the command that follows it to the text buffer if there is stdin or stout.

@acrosby Thanks for this, I have taken notes.

+1 for this enhancement.

Before this feature is available, the alternative is ...
shell-it
https://atom.io/packages/shell-it


chore: remove pumpify dep

Steps toward https://github.com/googleapis/nodejs-storage/issues/1743

Closing in favor of:

https://github.com/googleapis/nodejs-storage/pull/1914
https://github.com/googleapis/nodejs-storage/issues/1915


Add Boot and Vim installation instructions to the site

Hi, thanks for Sayid! It's great.
I'm a Boot and Vim user, and after some experimentation, I was able to get everything working with my setup. I figured I would contribute this PR to add installation instructions to help other Boot and/or Vim users get started with Sayid.
(BTW, my editor got rid of a bunch of trailing whitespace in index.html. For reviewing comfort, I recommend adding ?w=1 to the end of the GitHub URL to hide the whitespace changes so you can easily see what actually changed.)
I've organized the Installation section into Leiningen, Boot, Emacs, and Vim sections, and written up some instructions for the Boot and Vim parts.
For the profile.boot snippet I added, I thought about reverse-engineering the syntax highlighting generated by htmlize, but figured I'd hold off on that. Perhaps you have a quick way to generate it in Emacs?

@daveyarwood Thanks so much! Yeah, I can take care of the highlighting in emacs. I have no spare seconds this week because of Conj, but I will get to this shortly after. I really appreciate that you took the time to experiment and share.

I haven't forgotten about this. Still on my todo list.

@bbatsov yes


feat: Template Naming Convention

Template names are global, even when used in sub-charts. As a result, it is very easy for collision to occur, with non-deterministic outcomes - which could (and has in my development work) result in effects ranging from failed services to potential security risks.
Due to this, I propose that template names, and macros, should always be scoped to the name of the chart they come from, this would require refactoring, but will I feel make the future development of charts much simpler, and more manageable.
As a result things like:
{{- define "env_ks_user_create_openrc_tpl" }}

should be written as:
{{- define "common.env_ks_user_create_openrc_tpl" }}

(from: https://github.com/att-comdev/openstack-helm/blob/master/common/templates/snippets/_ks_env_user_create_openrc.tpl#L1)

This has been resolved by merging: https://github.com/att-comdev/openstack-helm/pull/167


Update Aries at build time?

The CARTO maps pull it in at build time: https://github.com/CartoDB/CartoDB-basemaps/blob/d1c7c51de3728964667fc16c3f4ce3b2e22d59b7/data/syncdatasets.txt

Also change for Toner?


use roundtrip-efficiency from Sensor

In general, the roundtrip-efficiency  is not a fixed quantity but a value that changes and depends on many factors (e.g. operation point). For some applications like electric mobility, constant efficiency works well enough. However, for other use-cases such as hot water production and storage, the efficiency depends strongly on the outside temperature.
For that reason, it would be a great feature to let users define the field roundtrip-efficiency as a time series. Following the work in PR  https://github.com/FlexMeasures/flexmeasures/pull/897 , this feature could use the field QuantityOrSensor and the utility function get_continuous_series_sensor_or_quantity.

This comment in our docs is related. For use cases such as hot water production and storage, we need to extend the flex-model to allow conversion efficiencies higher than 100%. So for this issue, it might not be necessary to touch the roundtrip-efficiency field. I suggest we extend the flex-model with two new QuantityOrSensor fields, named charging-efficiency and discharging-efficiency, giving greater control over the applicable conversion efficiencies. These should then be able to exceed 100% (well, at least the charging efficiency in its use case as a COP, but I'm not sure if there is a realistic case for a discharging efficiency exceeding 100%; and I imagine they must both still be higher than 0%).

Good idea, It's nice to have more control of each way efficiency.
One use-case for discharge efficiency is for modelling a diesel generator:

The tank is a storage device where the SOC represents the cumulative energy used. The soc-max is a really high number.
The discharge efficiency is negative because we want the "battery" to provide energy as it charges.

On one hand, I think that allowing negative values could be interesting to allow for this exotic use-cases. On the other, this could cause issues.

Off-topic: it might be interesting to allow for system administrators to define their own validation using jsonschemas. This could be saved to the database next to the asset or sensor. This could be used to validate and (de)serialize attributes.


have a way to remove some elements before metrics computation

in order to store step size or ticks

-0 remove the first elt -1 remove the last, -2 remove odd


pull request for e2e test at 12/05/2016 21:56:03

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Added more notes about contribution

Trying to encourage participation.

@noffle How does this look, otherwise?

Got an RFM from @noffle on IRC


LFSM not available, how to proceed

LFSM dataset registration now returns a 404, so in short what type of inference can still be done with this library if LFSM as a dataset is unavailable?
Can new faces be trained, and how does LFSM factor into this process as per the README?
Can you provide the format of LFSM data used so that alternatives can be formatted to meet that need?

Same problem here


Fix download progress bug

Closes #715
As detailed in #715, the callbacks of the download requests were never being called because the DownloadRequest does not inherit from the DataRequest.
What was changed was that there is now an different cast for download requests. This is based on the [code that is found in the Alamofire example] (https://github.com/Alamofire/Alamofire/blob/master/Example/Source/DetailViewController.swift#L104-L112). The second casts fixes the completion block never getting called issue but the progress is still wrong.
I noticed when trying to write tests for this that the progress object will never have its completed property be true since it requires a response to be present. In all the code for progress tracking a response is never set so what I did is that on request completion update the progress object to have a response. Doing so has the desired effect of having the progress object returning completed.
This also contributes to increasing the code coverage from #668.

          1 Error

  :no_entry_sign:
  Any changes to library code need a summary in the Changelog.

          1 Warning

  :warning:
  Consider adding supporting documentation to this change. Documentation can be found in the docs directory.

SwiftLint found issues
Warnings

File
Line
Reason

Moya+Internal.swift
239
Lines should not have trailing whitespace.

Moya+Internal.swift
187
Function should have complexity 10 or less: currently complexity equals 11

  Generated by :no_entry_sign: danger

Great PR, thanks! The only feedback I have is in the comment above. If you like, we can address it now, or we can open an issue to address it later.

Current coverage is 85.93% (diff: 98.57%)

Merging #716 into master will increase coverage by 1.55%

@@             master       #716   diff @@
==========================================
  Files            29         29
  Lines          2496       2566    +70
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           2106       2205    +99
+ Misses          390        361    -29
  Partials          0          0

Powered by Codecov. Last update 0b2c725...710ff7f

still not call .completed in RxMoyaProvider.

@Ernest-su, what do you mean? Is this a possible bug? If you create an issue for that, please do!

That's possible. I don't think that scenario has been tested.


Sunset core library site content

Objective
Build trust and reduce barriers for visiting and online audiences
Initiatives

Responsibly shut down the library blog: Investigate web archiving solution with Internet Archive and/or other web archives

Plan for lift and shift of London's Pulse

Map library website URLs to new location on wellcomecollection.org

Measures

Web archiving and plan for redirections

Scoped plan for shifting MOH off-prem

Link to feature: https://wellcomecollection.productboard.com/feature-board/planning/features/6699322

Link to feature: https://wellcomecollection.productboard.com/feature-board/planning/features/6699322


css post processing

Mainly for CSS vendor prefixes.
Idea: Trio calls require for some vendor prefix library & its configuration from user project and calls it with found config if require succeeds.

Also looking at Autoprefixer https://github.com/postcss/autoprefixer


You never give an example of how to set payload in reducer

As someone who is knew to redux like state management, this is almost a complete deal breaker. You have the following defined as an action:
struct StandardAction: Action {
    // identifies the action
    let type: String
    // provides information that is relevant to processing this action
    // e.g. details about which post should be favorited
    let payload: [String : AnyObject]?
    // this flag is used for serialization when working with ReSwift Recorder
    let isTypedAction: Bool
}

Neat! So I want to take a string, send a payload that I will set as the new string. So I would set it in the action, and then in the payload I would....
func authenticationReducer(state: AuthenticationState?, action: Action) -> AuthenticationState {
    var state = state ?? initialAuthenticationState()

    switch action {
    case _ as ReSwiftInit:
        break
    case let action as SetOAuthURL:
        state.oAuthURL = action.oAuthUrl
    case let action as UpdateLoggedInState:
        state.loggedInState = action.loggedInState
    default:
        break
    }

    return state
}

wtf is this? Is action.oAuthUrl the payload? Is there even a payload even here? Who knows! Syntax is inconsistent throughout (every section is a different example from scratch hurray!) and variables are not the same. Complete dumpster fire.

I suggest you take a look at https://github.com/ReSwift/ReSwift/blob/8fb16bca793850f002fe1b43926e37370aad65e1/Docs/Getting Started Guide.md#minimal-working-example which is in that guide and provides a minimal working example of all the parts of ReSwift.
The example you've copied here shows a reducer that handles a few different action types such as SetOAuthURL, which would be defined as follows:
struct SetOAuthURL: Action {
    let oAuthUrl: URL
}

StandardAction is the action type to be used if you need to support recording / rewinding of actions via https://github.com/ReSwift/ReSwift-Recorder

Good point that every example is different, @patientplatypus. Never thought about that. Now that you do come from a Redux background, can you help me sort this out and explain what you expect?

Ok. Sorry, for the static. I'm under a lot of stress lately (still no excuse).
You should update the docs with this example rather than the "counter" one. That example is not a fully functional battlestation because 1) it doesn't pass payloads which is what most people starting out want and 2) it doesn't explain this for retarded giraffes.
Here is the example that is the most trivial for n00bs.
Step 1. Install using cocoa pods
Install using cocoa pods or one of the other installation methods already mentioned.
Step 2. Modify AppDelegate.swift file to reference what will go in the State.swift file (which you will make)
Add these lines at the top before @UIApplicationMain tag and after import UIKit
import ReSwift

let mainStore = Store<AppState>(
    reducer: mainReducer,
    state: nil
)

Step 3. You now need to make a new file State.swift that you just referenced
import Foundation
import ReSwift

struct AppState: StateType {
       var MyName: String = ""
}

Step 4. Inside your ViewController.swift file send the action to ReSwift dispatch.
Select a ViewController that references a storyboard in your ViewController.swift file where you will be using to make this example work. Make sure that the storyboard class in your main.storyboard matches the class of your ViewController class that you will be referencing in your ViewController.swift file. You can set this by clicking on the yellow circle at the top left of the storyboard gui in main.storyboard and in interface builder going to the identity inspector tab and naming the custom class.
Make a button by control dragging from your storyboard and selecting action. Name this button MyButtonThatSetsName. Set a payload that you want to send (here I have set "platypus"). You can later call a text variable from elsewhere in your component, but for now keep this trivial.
 @IBAction func MyButtonThatSetsName(_ sender: UITextField) {
        mainStore.dispatch(MyNameAction(payload: "platypus"));
    }

Step 5. Since we are dispatching this action we now need to make the actions.swift file where this will be dispatched to
Make a new file named Actions.swift.
Inside the file put the following.
import ReSwift

struct MyNameAction: Action {
    let payload: String
}

Step 6. Now that we have made the actions, we need to make a reducer file and set the new state.
Make a new file named Reducers.Swift
Put the following inside it.
import ReSwift

func mainReducer(action: Action, state: AppState?) -> AppState {
    var state = state ?? AppState()

    switch action {
    case let action as MyNameAction:
        state.MyName = action.payload
    default:
        break
    }

    return state
}

Step 7. Now, if everything was done correctly, you should be able to output the result in our ViewController.swift file
Control drag a uilabel onto your main.storyboard (from the object library in the lower right hand corner of the interface builder). Then click on the new uilabel and control drag onto your ViewController class. Name it returnedName. It should look like this:
@IBOutlet weak var returnedName: UILabel!
The default text for this label will be "label". You can go into interface builder and change this if you like, but you do not have to.
Also make another action button as we did in step one, so that when there is a button press we can set the label text from the action store. Call it setName. The default button will be "button", you can go into interface builder and change it if you like, but again, you don't have to.
It should look like this:
```

@IBAction func setName(_ sender: Any) {
}

Now we want it so that when we press this button the name that we have will populate the label. Paste the following code inside your new button action, so it looks like this.

@IBAction func setName(_ sender: Any) {
returnedName = "(mainStore.state.MyName)"
}

**Step 8.** _Yay we're done! Now what? Next Steps._

If everything was done correctly, you should see that your new label will populate with the hardcoded name you have entered at the beginning. Now, if you would like, you can as a next step take user input from a text field to populate the username. A step after that is to have information populate the name field in one storyboard/viewcontroller and have it retrieved in another. Remember one of the great things about uni-directional data flow is that you don't have to push state between view controllers, you can push and retrieve from state. Happy hunting.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So.....that's the kind of thing, that would have saved me a few hours of frustration. I don't know if everything in here is 100% correct, but it might be useful for the little people (i.e. me).

Amazing effort, @patientplatypus! Thanks!

@patientplatypus I was just reading the example again to plan a documentation change. What struck  me is the term "payload" for the text property. In your initial comment, it seemed you recognize this term put meaning into it -- yet you picked this instead of a more favorable, because less generic, property like name. I don't intend to point at you and tell you your code is bad or anything. Instead, I'd like to ask you to define or describe what "payload" means (or meant) to you. The Redux.js docs simply use it as part of the definition for Action. I'd like to help Redux-savvy people map known concepts to ReSwift, and this might be helpful and I'm aware that I could be missing something important.
Since #270, StandardAction is not a part of the core ReSwift anymore. So at least parts of the initial source of confusion is gone, by the way :)


Update version output and logic

resolves #4724

Description
Most notably, updated the logic for displaying plugin information as follows:

If the plugin has neither the same major nor the same minor as the installed core version, it is considered incompatible
Then, if the latest version of the plugin can not be found, a "no version available" message will be displayed
Then, the plugin is compared with its latest version to display an appropriate message based on if it is ahead, matches, is behind the latest version

The tests capture the intended code paths, please review them for more information about outputs.
Checklist

[X] I have signed the CLA
[X] I have run this code in development and it appears to resolve the stated issue
[X] This PR includes tests, or tests are not required/relevant for this PR
[X] I have added information about my change to be included in the CHANGELOG.

Looks like there's a mypy error, otherwise looks good!

@ChenyuLInx That error doesn't have to do with anything I added or changed.
The same line exists on main https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/config/project.py#L194

Yes, looks like this line is not even touched. I am not sure why mypy complains about it either. But when I run mypy on main it doesn't have any error. We will have to fix it or ignore this to get the workflow pass


Adding (add to favourite) features

🛠 Fixes Issue #299
https://user-images.githubusercontent.com/56798376/168460067-2cb56963-90ee-43c0-8c0c-c19d5ac39990.mp4

👨💻 Changes proposed

✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

📷 Screenshots

Please review @arpit456jain @raghavTinker @singhmansi25  @KKhushhalR2405

@muhammadgalhoum  i think u didn't read the issue properly
the issue is for
Adding a feature to add a template in favorite/wishlist of user

but its ok we can keep this too

Can u explain more? I can't understand what u need @arpit456jain

Can you please see my message on discord @arpit456jain

Thanks, @singhmansi25
Can you please write LGTM to @arpit456jain to merge this PR

Ready to merge @arpit456jain

Please can you see my message in your inbox?


Latest Version

Checklist

[ ] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin, please rerender

@conda-forge-admin, please rerender

Hi! This is the friendly automated conda-forge-linting service.
I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.
Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

import: 'quippy'
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/quippy_1638230464017/test_tmp/run_test.py", line 2, in <module>
    import quippy
  File "/home/conda/feedstock_root/build_artifacts/quippy_1638230464017/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.10/site-packages/quippy/__init__.py", line 2, in <module>
    import quippy._quippy
ImportError: /home/conda/feedstock_root/build_artifacts/quippy_1638230464017/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.10/site-packages/quippy/_quippy.cpython-310-x86_64-linux-gnu.so: undefined symbol: GOMP_parallel


Password should not be displayed in Clear Text in WEBUI

Although you could run this software behind a reverse proxy and use a firewall to limit access, it would be nice if the passwords were not exposed directly in Cleartext!. (even if the url contains the password).
Its a pretty big security concern, and enables anyone on the network to access that TVHeadEnd user.
Maybe just display IP Address, User and Port? Consider some additional security measures if possible?

Fair point, fair point. It should be tightened up.

Done! It no longer shows this in the frontend with the latest version. Thanks for bringing up the issue!

Done! It no longer shows this in the frontend with the latest version. Thanks for bringing up the issue!


fix: explicitly handle SIGINT by attempting to signal shutdown (fix: #74)

fixes: #74

adds ctrlc dependency to handle SIGINT
registers a SIGINT handler in Process initialization method spawn() which sends Signal::Shutdown to the admin thread of the process

In my experience locally the workers seem to get the shutdown Signal and stop processing requests. However, it's desirable to ensure that the child threads actually stop. I believe that is occurring because we call Process.wait() https://github.com/pelikan-io/pelikan/blob/42534bb90a8760cdcc728e8fd55bf4ac004a3f21/src/core/server/src/process.rs#L136 indirectly through the server initialization process here: https://github.com/pelikan-io/pelikan/blob/a4f63e2999d915392769d50f423eb167f912fbda/src/server/segcache/src/main.rs#L123
Indeed, when I add println! statements and mess around with thread::sleep(), it seems like we are in fact waiting for all the worker threads to finish when I send SIGINT to pelikan_segcache_rs
I could see there being an issue with adding/using ctrlc. It spawns a thread to listen to signals, which seems like a potentially worthwhile tradeoff to make handling SIGINT easier, as the other libraries I found like https://docs.rs/signal-hook/latest/signal_hook/ are considerably lower level. If we want to use one of those we could potentially avoid having a dedicated thread by having some currently existing thread check for signals, but I think it's likely to complicate the implementation.

I think we're going to need a way to disambiguate between different signals. As our behaviors might be different depending on what signal we receive. Is this possible with ctrlc or do we need to use a different crate?

I think we're going to need a way to disambiguate between different signals. As our behaviors might be different depending on what signal we receive. Is this possible with ctrlc or do we need to use a different crate?

ctrlc crate, by default, only handles SIGINT on *nix platforms:

set_handler() allows setting a handler closure which is executed on Ctrl+C. On Unix, this corresponds to a SIGINT signal. On windows, Ctrl+C corresponds to CTRL_C_EVENT or CTRL_BREAK_EVENT.

I think if we wanted to handle other signals in specific ways we'd probably want to use the signal-hook crate. There is a Tokio integration which would probably make it easier.

@brayniac Are there any signals we want to handle besides SIGINT and SIGTERM? We're just going to be gracefully shutting down for both. It's not like it's a huge issue to swap things out in the future if we want to handle, for example, SIGUSR1, and need to have different behaviour then.

@swlynch99 yeah I would vote in favor of getting SIGINT working properly (and potentially turning on termination feature of ctrlc crate which would make SIGTERM and SIGHUP handled the same way as SIGINT is being handled currently) so that people who want to run segcache in docker containers have predictable behavior and we can just remove it later in favor of signal-hook when we get the time


Water sloshing in cylinders eventually gets stuck on the client

After driving the steamers around a bit, eventually client will keep hearing the water sloshing sounds from the cylinders, even after water was fully ejected (and host does not hear it anymore). Maybe some sync issues with that state?

Hi @matejdro,
This one is a known issue, more work is required to improve sync of steam engines and multi unit engines. This issue is currently more of an annoyance/Quality of Life issue and will be tackled once we have higher priority issues resolved


Issue with Firestore Trigger on_document_created_with_auth_context

I am trying to use the Firestore trigger on_document_created_with_auth_context to get user info along with the document. However, the event data I receive is of type DocumentEventData instead of DocumentSnapshot. As a result, I cannot access the document fields using the get method. Instead, I receive the following error:
AttributeError: Unknown field for DocumentEventData: get

Steps to Reproduce

Set up a Firestore trigger using on_document_created_with_auth_context.
Attempt to access document fields using the get method on the event data.
Observe the error mentioned above.

from firebase_functions.firestore_fn import AuthEvent, DocumentSnapshot, on_document_created_with_auth_context

@on_document_created_with_auth_context(document="*")
def document_created(event: AuthEvent[DocumentSnapshot]):
    event.data.get("field")

Expected Behavior
The event data should be of type DocumentSnapshot, allowing access to document fields using the get method, similar to the behavior of the on_document_created trigger.
Actual Behavior
The event data is of type DocumentEventData, which does not support the get method, resulting in an AttributeError.
Additional Information
When using the on_document_created trigger, the event data is of type DocumentSnapshot, and I can access document fields without any issues. However, with on_document_created_with_auth_context, the event data type is DocumentEventData, leading to the error.
Is this the intended behavior, or should the event data be of type DocumentSnapshot similar to on_document_created? If not, how should this be resolved?

Thanks for bringing this to my attention. Investigating it now


How to train Cityscapes dataset

Hi！How to load and train cityscapes dataset? Cityscapes dataset has no bounding box, so how do you train it for detection? thanks.

@InstantWindy Could you describe how you trained the network on a cityscapes dataset? I already have a cityscapes dataset in the coco format


Add material-ui example

Coverage remained the same at 97.959% when pulling bb5da113c792754d5263df4f58599681e828fcd8 on renan/readme into 0b8da31140a1b96310b9f7d1da56628aac982754 on master.


[Enhancement] essentialcmds.safelogin

Similar to essentials on bukkit which will allow users who have signed out while flying, a safe login.
Instead of user's falling to their death, they will remain in the sky or where ever they logged out at.

Or Tp them down to the closest location (safe)


Update kickoff script

Let me know what you think.

@justinbarry @bthaile i added support for a new variable. By default, this uses pre-populated contracts, but if you set USE_POPULATED_CONTRACTS=false, you get the previous behavior (which is useful for iterating on new market data or testing overall deployment locally

(and the re-introduction of the old way means the variables are now worthwhile again)


Add integration tests

It would be great to have:

Automatic tests from WebGL conformance tests
Jasmine tests for specific functionality

I managed to run the conformance tests using nw.js, not sure if this is the best way to do it though

Most of the unit testing we have is indirectly through an upcoming backend to tensorflow.js:
https://github.com/tensorflow/tfjs-core/tree/master/tfjs-backend-nodegl
Run test:
https://github.com/tensorflow/tfjs-core/blob/master/tfjs-backend-nodegl/package.json#L10
Test file:
https://github.com/tensorflow/tfjs-core/blob/master/tfjs-backend-nodegl/src/run_tests.ts
That runs the whole stack against the existing browser WebGL unit tests for TensorFlow.js


mavlink-router on ROS2

Hello, I'm trying to send Pixhawk data to ground station(QGC) using mavlink-router.
The SBC os is Ubuntu22.04 and ROS2 installed.
Is it possible to use mavlink-router on ROS2?
I know that ROS2 is based on DDS standard but Mavlink is not based on DDS..

Hello,
That is two different thing. Mavlink router is just a router for mavlink message.
So to use it with ROS2, you need a node that send/received mavlink message.

Hello, am also encountering the same issue where mavros loses connection after qgroundcontrol connects to it.
Disconnection image.

Mavlink-router setup

[4] = To QGrounControl
[6] = To Mavros
[8] = Port to listen to by Mavlink
Steps to reproduce the disconnection

Setup Mavlink-router like the picture above
Open Mavros
Open QgroundControl

We have the same problem. We want to use rkt for outdoor positioning, so we want to use WiFi to connect the drone and the ground station. However, there is really little information on how to do it with ros2. If anyone has solved it, please let me know.