Refactor: change variables naming under context of Agent Framework

Description

Change variable names from sessionId to conversationId.
Change file names from session-related to conversation-related.

Issues Resolved
#96
Check List

[x] New functionality includes testing.

[x] All tests pass, including unit test, integration test.

[x] New functionality has user manual doc added.
[x] Commits are signed per the DCO using --signoff.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Did a regression test on:

[ ] Loading conversations and conversation
[ ] Showing how was it generated
[ ] Change conversation title
[ ] Delete conversation
[ ] Search conversation
[ ] Regenerate interaction


Prettier fix

Hey @andrewstech do you know a way such that it doesn't run the commands after prettier which commit & push the changes if there are no changes so that it doesn't fail.

Hey @andrewstech do you know a way such that it doesn't run the commands after prettier which commit & push the changes if there are no changes so that it doesn't fail.

nvm fixed it myself :)


how to manually add new metabolites-sensor pair

Hi, Thanks for developing this great tool.
I am wondering can I manually add new metabolites-sensor pair in mouse_met_sen_October-25-2022_14-52-47.tsv file?
I tried to add a new one myself, but the result do not contain the result I want.
(I already removed the expression filter before run mebocost, and the metabolite related enzyme is in metabolite_associated_gene_reaction_HMDB_summary_mouse.tsv)

Hi - Can you please first check your metabolite-sensor pair mebo_obj.original_result to make sure that new pair was filtered out due to low expression and other reasons? If the new pair was not even in the original result, that means the MEBCOOST didn’t recognize your editing in the table. In that case, we should discuss how to successfully add a new pair. Thanks!
Best,
Rongbin

On Oct 31, 2023, at 4:14 PM, KarryGoCarry @.***> wrote:
Hi, Thanks for developing this great tool.
I am wondering can I manually add new metabolites-sensor pair in mouse_met_sen_October-25-2022_14-52-47.tsv file?
I tried to add a new one myself, but the result do not contain the result I want.
(I already removed the expression filter before run mebocost, and the metabolite related enzyme is in metabolite_associated_gene_reaction_HMDB_summary_mouse.tsv)
—
Reply to this email directly, view it on GitHub https://github.com/zhengrongbin/MEBOCOST/issues/17, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD76SHPYKCU4EZ6HKPYM34LYCFL3VAVCNFSM6AAAAAA6YI5RB6VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TCMRSHE2DGOI.
You are receiving this because you are subscribed to this thread.

Thank you for the quick reply!!!
I think I already turned off all the filters by the below step you provided:
initiate the mebocost object
mebo_obj = mebocost.create_obj(
adata = adata,
group_col = ['celltype'], # change to the group you want to split
met_est = 'mebocost',
config_path = './mebocost.conf',
exp_mat=None,
cell_ann=None,
species='mouse', # or human
met_pred=None,
met_enzyme=None,
met_sensor=None,
met_ann=None,
scFEA_ann=None,
compass_met_ann=None,
compass_rxn_ann=None,
gene_network=None,
gmt_path=None,
cutoff_exp=0, ## automated cutoff to exclude lowly ranked 25% sensors across all cells
cutoff_met=0, ## automated cutoff to exclude lowly ranked 25% metabolites across all cells
cutoff_prop=0, ## at lease 25% of cells should be expressed the sensor or present the metabolite in the cell group (specified by group_col)
sensor_type=['Receptor', 'Transporter', 'Nuclear Receptor'],
thread=8
)
In order to add a new pair (Taurine -> Slc6a6), I manually input a new row in the "mouse_met_sen_October-25-2022_14-52-47.tsv", right after your last row.
445  HMDB0000251     Taurine   Taurine   Slc6a6     Sodium- and chloride-dependent taurine transporter    New       Transporter
I also checked the expression of the Taurine-related enzyme and Slc6a6 sensor expression in my data, and the looks just fine.

It is strange. That should work. Let me test and get back to you later. Thank you!
Best,
Rongbin

On Oct 31, 2023, at 4:31 PM, KarryGoCarry @.***> wrote:
Thank you for the quick reply!!!
I think I already turned off all the filters by the below step you provided:
initiate the mebocost object
mebo_obj = mebocost.create_obj(
adata = adata,
group_col = ['celltype'], # change to the group you want to split
met_est = 'mebocost',
config_path = './mebocost.conf',
exp_mat=None,
cell_ann=None,
species='mouse', # or human
met_pred=None,
met_enzyme=None,
met_sensor=None,
met_ann=None,
scFEA_ann=None,
compass_met_ann=None,
compass_rxn_ann=None,
gene_network=None,
gmt_path=None,
cutoff_exp=0, ## automated cutoff to exclude lowly ranked 25% sensors across all cells
cutoff_met=0, ## automated cutoff to exclude lowly ranked 25% metabolites across all cells
cutoff_prop=0, ## at lease 25% of cells should be expressed the sensor or present the metabolite in the cell group (specified by group_col)
sensor_type=['Receptor', 'Transporter', 'Nuclear Receptor'],
thread=8
)
In order to add a new pair (Taurine -> Slc6a6), I manually input a new row in the "mouse_met_sen_October-25-2022_14-52-47.tsv", right after your last row.
445  HMDB0000251     Taurine   Taurine   Slc6a6     Sodium- and chloride-dependent taurine transporter    New       Transporter
I also checked the expression of the Taurine-related enzyme and Slc6a6 sensor expression in my data, and the looks just fine.
—
Reply to this email directly, view it on GitHub https://github.com/zhengrongbin/MEBOCOST/issues/17#issuecomment-1787987237, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD76SHMSYUJ4BG5LHP6AK53YCFNZVAVCNFSM6AAAAAA6YI5RB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBXHE4DOMRTG4.
You are receiving this because you commented.

Hi - did you by any chance solve the problem? I tested and it works very well on my laptop. If you still have the problem, I would like to suggest checking the following things, to make sure that the edited metabolite-sensor table has been successfully updated in the MEBOCOST object.
(1). check the mebo_obj.met_sensor to see if the Taurine-Slc6a6 in the table,
(2). check the mebo_obj.met_mat_index to see if the HMDB0000251 in the index ('HMDB0000251' in mebo_obj.met_mat_index.tolist())
(3). check the log file to see if MEBOCOST calculated the communication score for Taurine-Slc6a6. If so, you can find an entry containing Slc6a6 ~ HMDB0000251.
Please email me if you still have the problem after checking everything, we can probably have a ZOOM meeting to figure out the problem on your side together. Thanks!

I send my file to your<EMAIL_ADDRESS>email!
please help me take a look!
Many Thanks


web_server - ERROR - Exception on /action/publish-data

Describe the bug
When running curl -i -H ’Content-Type:application/json’ -X POST -d ’{}’ http://localhost:5000/action/dayahead-optim I get an internal server error 500
In Docker I have edited config_emhass.yaml and secrets_emhass.yaml
In Home Assistant I put in configuration.yaml
shell_command:
dayahead_optim: "curl -i -H "Content-Type:application/json" -X POST -d '{}' http://localhost:5000/action/dayahead-optim"
publish_data: "curl -i -H "Content-Type:application/json" -X POST -d '{}' http://localhost:5000/action/publish-data"
and in automations.yaml

alias: EMHASS day-ahead optimization
trigger:
platform: time
at: '05:30:00'
action:

service: shell_command.dayahead_optim

alias: EMHASS publish data
trigger:

minutes: /5
platform: time_pattern
action:
service: shell_command.publish_data

To Reproduce
root@MiniPCServer:/home/brecht# docker exec -it DockerEMHASS bash
root@6185e47f85ef:/app# curl -i -H 'Content-Type:application/json' -X POST -d '{}' http://localhost:5000/action/dayahead-optim
HTTP/1.1 500 INTERNAL SERVER ERROR
Content-Length: 265
Content-Type: text/html; charset=utf-8
Date: Wed, 14 Feb 2024 20:58:38 GMT
Server: waitress
<!doctype html>

500 Internal Server Error
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Expected behavior
What do I need to do to run curl -i -H 'Content-Type:application/json' -X POST -d '{}' http://localhost:5000/action/dayahead-optim without error?
Home Assistant installation type

Home Assistant Supervised
Home Assistant Core

Your hardware

OS: Linux (Debian)
Architecture: x86_64

EMHASS installation type

Docker Standalone

Additional context
Docker info
lient: Docker Engine - Community
Version:    25.0.3
Context:    default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version:  v0.12.1
Path:     /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version:  v2.24.5
Path:     /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 14
Running: 12
Paused: 0
Stopped: 2
Images: 14
Server Version: 25.0.3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: journald
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc version: v1.1.12-0-g51d5e94
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 6.1.0-17-amd64
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.637GiB
Name: MiniPCServer
ID: f5877512-ed00-4d57-8a35-5f8145d7b5f0
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: true
Insecure Registries:
<IP_ADDRESS>/8
Live Restore Enabled: false
log file
2024-02-14 20:29:06,597 - web_server - INFO - Launching the emhass webserver at: http://<IP_ADDRESS>:5000
2024-02-14 20:29:06,597 - web_server - INFO - Home Assistant data fetch will be performed using url: http://localhost/
2024-02-14 20:29:06,597 - web_server - INFO - The data path is: /app/data
2024-02-14 20:29:06,598 - web_server - INFO - Using core emhass version: 0.7.7
waitress   INFO  Serving on http://<IP_ADDRESS>:5000
2024-02-14 20:30:00,073 - web_server - INFO - Setting up needed data
2024-02-14 20:30:00,094 - web_server - INFO -  >> Publishing data...
2024-02-14 20:30:00,094 - web_server - INFO - Publishing data to HASS instance
2024-02-14 20:30:00,104 - web_server - ERROR - Exception on /action/publish-data [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 496, in _make_request
conn.request(
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 400, in request
self.endheaders()
File "/usr/local/lib/python3.11/http/client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.11/http/client.py", line 1041, in _send_output
self.send(msg)
File "/usr/local/lib/python3.11/http/client.py", line 979, in send
self.connect()
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 238, in connect
self.sock = self._new_conn()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f16a22ff890>: Failed to establish a new connection: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /api/states/sensor.p_pv_forecast (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f16a22ff890>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/src/emhass/web_server.py", line 53, in action_call
_ = publish_data(input_data_dict, app.logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/emhass-0.7.7-py3.11.egg/emhass/command_line.py", line 474, in publish_data
input_data_dict['rh'].post_data(opt_res_latest['P_PV'], idx_closest,
File "/usr/local/lib/python3.11/site-packages/emhass-0.7.7-py3.11.egg/emhass/retrieve_hass.py", line 332, in post_data
response = post(url, headers=headers, data=json.dumps(data))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /api/states/sensor.p_pv_forecast (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f16a22ff890>: Failed to establish a new connection: [Errno 111] Connection refused'))

Just test that curl command without going inside the docker container. Give it a try from a simple new terminal. Your HA url looks weird though. Is it just localhost? No 8123 port?

Hey, thanks for the advice, changed in secrets_emhass.yaml hass_url: http://localhost to hass_url: http://<IP_ADDRESS>:8123/ and is now working fine


License Store

New form that shows the available licenses and allows the user to request them.

Closed by https://github.com/sonata-nfv/son-bss/pull/84


Memory alloc problem in example code / SevSegShift::begin

Hi there,
I think there is a bug in all examples of SevSegShift which use the following (or similar) setup function:
void setup() {
  byte numDigits = 4;
  byte digitPins[] = {8+2, 8+5, 8+6, 2}; // of ShiftRegister(s) | 8+x (2nd Register)
  byte segmentPins[] = {8+3, 8+7, 4, 6, 7, 8+4, 3,  5}; // of Shiftregister(s) | 8+x (2nd Register)
  bool resistorsOnSegments = false; // 'false' means resistors are on digit pins
  byte hardwareConfig = COMMON_ANODE; // See README.md for options
  bool updateWithDelays = false; // Default 'false' is Recommended
  bool leadingZeros = false; // Use 'true' if you'd like to keep the leading zeros
  bool disableDecPoint = false; // Use 'true' if your decimal point doesn't exist or isn't connected

  sevseg.begin(hardwareConfig, numDigits, digitPins, segmentPins, resistorsOnSegments,
  updateWithDelays, leadingZeros, disableDecPoint);
  sevseg.setBrightness(90);
}

The problem lies herein ( https://github.com/bridystone/SevSegShift/blob/ShiftRegister/SevSegShift.cpp#L51 ):
void SevSegShift::begin(
  byte hardwareConfig,
  byte numDigitsIn,
  byte shiftRegisterMapDigits[],
  byte shiftRegisterMapSegments[],
  bool resOnSegmentsIn,
  bool updateWithDelaysIn,
  bool leadingZerosIn,
  bool disableDecPoint
) {
  // here the digit"pins" of the Shift register is stored
  // pins are here the OUTPUT PINs of the Shift Register
  _shiftRegisterMapDigits = shiftRegisterMapDigits;
  // here the segment"pins" of the Shift register is stored
  // pins are here the OUTPUT PINs of the Shift Register
  _shiftRegisterMapSegments = shiftRegisterMapSegments;

SevSegShift::begin assigns the pointers to the array of pins passed as digitPins and segmentPins in the above examples to the corresponding internal variables. Since digitPins and segmentPins are declared locally in setup() however, they might get deallocated as soon as the program leaves the scope (i.e. the setup function ends) - in any case this probably is undefined behaviour according to the C standard.
At least this is what happens on the ESP32.
Compare this to how SevSeg copies the values explicitly:
https://github.com/DeanIsMe/SevSeg/blob/master/SevSeg.cpp#L170
  // Save the input pin numbers to library variables
  for (uint8_t segmentNum = 0 ; segmentNum < numSegments ; segmentNum++) {
    segmentPins[segmentNum] = segmentPinsIn[segmentNum];
  }

  for (uint8_t digitNum = 0 ; digitNum < numDigits ; digitNum++) {
    digitPins[digitNum] = digitPinsIn[digitNum];
  }

A quick fix would just be moving the declaration of digitPins and segmentPins in the examples to the global scope. However I would advise against doing so, since the difference in behaviour compared to SevSeg is certainly unexpected and makes switching between the libraries harder.
A better solution would be to just malloc the member variables (_shiftRegisterMap*) in SegSevShift::begin and memcpy the passed values to them. Or copy the values by hand as SevSeg does (which probably is a tad slower).
Cheers!

Hi @foxblock,
Sorry for not reacting... I was not looking into this for quite some time.
It is an interesting point. I'm not aware of this, since I'm not a "natural" C Developer.
Would you be so kind, to provide a Pull-Request?
I would merge it into the Main Branch, if this fixes the issue.

Pull-request is up.
Sorry it took a while. I had no access to hardware to test this until today.
Tested the code on an ESP32 (using local variables works fine now), but it should work on an esp8266 as well.


tf-operator should ensure that CRD exists

From what I experimented, tf-operator requires crd to be created via admin manually; however, i believe in most of crd-based system, they are responsible to make sure crd exists, e.g. rook,, volume snapshot, etc
Note apart from creating crd upon startup, a robust operator should also make sure it always exists, though how to implement this varies, e.g. recreate if crd is deleted, using authz
/cc @gaocegege @codeflitting

@ddysher We have some discussions about it. In the beginning, we follow what etcd-operator does, which create the CRD in the operator. We think the logic should not be in the operator since it is not the duty of the operator. Do you think we need to add it in the operator?

Make sense.
/assign @codeflitting

/cc @jlewi  I think Jeremy prefers installation via ksonnet (though the suggested issue is not mutually exclusive).

I prefer the CRD to not be created by the operator; but I think its a good idea for the operator to check if it exists.
I think there is potentially a 1 to many relationship of CRD definitions to operator deployments.
CRD's are not cluster scoped so you can only have a single CRD definition. I think (K8s 1.11 adds support for multiple versions of a CRD).
Nonetheless, you could potentially have multiple implementations of an operator running with the implementations handling different resources; e.g. each implementation could be claiming resources in different namespaces.
I think it makes sense for the operator to check if the CRD exists but I don't think it should be created by the operator. I think this creates a false expectation that the CRD is always in sync with the operator image but this is not the case because the CRD could already have existed.
The CRD (TFJob API) should be much more stable then the operator image. So we might update the operator to get some bug fixes but the TFJob API should not be changed. I think by not having the operator create the CRD we make this behavior much clearer.
If  the CRD is created separately, then its clear then updating the operator will not update the CRD definition.

I think its a good idea for the operator to check if it exists.

SGTM, tfjob informers will throw an error if the CRD doesn't exist, we can return the error if needed.

CRD is like table/collection in database, application is responsible to manage it.  Most crd based operators I've seen so far create crds, which provides better user experience.

I think it makes sense for the operator to check if the CRD exists but I don't think it should be created by the operator. I think this creates a false expectation that the CRD is always in sync with the operator image but this is not the case because the CRD could already have existed.

@codeflitting Do you want to add a check to TFJobOperator to see if the CRD exists?

@codeflitting @ddysher is someone from Caicloud willing to pick this up?

Sorry for the late reply, I or my colleague will deal with it next week @jlewi

@jlewi @ddysher  should I exit tf-operator when the CRD not exists ?
It now  have error information when tf-operator start  if the CRD not exists.
E0829 16:33:46.411940   35369 reflector.go:205] github.com/kubeflow/tf-operator/cmd/tf-operator.v2/app/server.go:114: Failed to list *unstructured.Unstructured: the server could not find the requested resource (get tfjobs.kubeflow.org)
E0829 16:33:47.424124   35369 reflector.go:205] github.com/kubeflow/tf-operator/cmd/tf-operator.v2/app/server.go:114: Failed to list *unstructured.Unstructured: the server could not find the requested resource (get tfjobs.kubeflow.org)

Yes I think exiting with non-zero exit code is a good idea; Crash looping should help make it clear that things are not working correctly.

I think the feature is implemented in #820


"There was a problem running the initialization hooks"

I'm getting this when I run pyenv virtualenvwrapper
/home/vinta/.pyenv/versions/2.7.10/bin/python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/home/myhome/.pyenv/versions/2.7.10/bin/python and that PATH is
set properly.

Running on Ubuntu 14

pip install virtualenvwrapper

17:16:14 shaunstanislaus@Master ~ pip install virtualenvwrapper
/Users/shaunstanislaus/.pyenv/shims/pip: line 21: /usr/local/Cellar/pyenv/1.0.8/libexec/pyenv: No such file or directory


Add partner software version to reporting.

Is your feature request related to a problem? Please describe.
Add partner software version to reporting for Validated Partners report.
Describe the solution you'd like
Add partner software version to reporting for Validated Partners report.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

@mikemcd3912 Adding this to your queue. Minor one but you can keep it lower prio.


[DatePickerAndroid] Getting previous Day value

Description
Hi, I'm using DatePickerAndroid on my app but I'm receiving wrong Day value. I'm not sure it's the DatePickerAndroid issue or the timezone issue.
Reproduction Steps and Sample Code
showPicker = async (stateKey, options) => {
    try {
      var newState = {};
      const { action, year, month, day } = await DatePickerAndroid.open(
        options
      );
      if (action === DatePickerAndroid.dismissedAction) {
        newState[stateKey + 'Text'] = 'Click to add Date';
      } else {
        var date = new Date(year, month, day);
        console.log(year, month, day);
        newState[stateKey + 'Text'] = date.toDateString();
        newState[stateKey + 'Date'] = date.toISOString();
      }
      this.setState(newState);
    } catch ({ code, message }) {
      console.warn(`Error in example '${stateKey}': `, message);
    }
  };

When I select the Date as: Mon, Apr 05 2017, I get the following output for
console.log(year, month, day); : 2017 04 04
console.log(newState); : {"maxText":"Wed Apr 05 2017","maxDate":"2017-04-04T18:15:00.000Z"}

The issue was related to timezone. new Date(year, month, day) is using my timezone but then toISOString has zero UTC offset.
Solved using this solution from Stackoverflow


renaming blockchain_length and highest_block_length_received

The »blockchain length« vs »block height« issue was discussed in discord and the forums.
The daemon already referred to the blockchain_length as block height in its description.

@CodaProtocol/core-eng Is this name changed authorized? I think so...

@o1pranay cc -- I think we agreed that blockchain_length was misleading. Do you not agree @cmr ?

This introduces a mismatch between the name of the Snarky compatible number module Length and the new block_height fields in Consensus_state.t. If we are going this direction, I think that we should also rename Length to Height. We may want to look at the transition frontier code as well and make sure there aren't dangling references to length there.

This PR is several years out of date. Closing.


Incorrect Parameter Type for Illuminate\Session\Store::pull

Laravel Version: 7.20.0
PHP Version: 7.4.8
Database Driver & Version:

Description:
The docblock for Illuminate\Session\Store::pull has an incorrect type for the optional $default argument.
This causes Psalm static analysis to fail with a PossiblyFalseArgument error when a value other than a ?string is supplied for the $default parameter.
Rather than a nullable string, the $default argument should be type hinted as mixed.
Steps To Reproduce:
Run Psalm static analysis with a minimum error level of 3 to produce an error.
php vendor/bin/psalm app/example.php
Example PHP file (app/example.php):
<?php

use Illuminate\Session\Store;

/** @var Store $store */
$store = app()->make(Store::class);
$store->pull('test', false);

Psalm configuration file (psalm.xml):
<?xml version="1.0"?>
<psalm
    errorLevel="3"
    resolveFromConfigFile="true"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
    <projectFiles>
        <directory name="app"/>
        <ignoreFiles>
            <directory name="vendor"/>
        </ignoreFiles>
    </projectFiles>
</psalm>

Feel free to attempt a PR if you think anything is wrong here.


New K8s Service Connection results in "Length of 'endpoint.Authorization.Parameters' is invalid"

Breaking completely from the template as this is related to service connection and not a pipeline task but creating the issue here as @kmkumaran has added the release tag to a similar post in the past.
Trying to create some new service connections and getting the error:
Length of 'endpoint.Authorization.Parameters' is invalid. It must be between 0 and 20480 characters. Parameter name: endpoint.Authorization.Parameters
Here's a screenshot of the dialog:

This method has worked for me in the past. Thanks in advance for any help.

i had the same issue, what i did to resolve this issue was that in KubeConfig file, the last line is token : , i reduced the length of token , and then this error is resolved.

I resolved the issue by getting rid of my local context (docker-desktop). Once I only pasted in the KubeConfig that applied to my AKS cluster, it worked.


map.mergeIn converts Record to Map

//record = some Record based object
//mp = Map with id-record key-value pairs

mp.forEach((record, id) => {
      state = state.mergeIn([path, id],record);
});

const expectedRecord = state.get(path).get(id); //should be Record, is Map

Sorry without executable code and expected/actual results I can't debug this issue.


Update README.md

The project name is ambiguous and the correct usage is the project-id.

Thank you joemathai :)


Fix tests to reflect newAPI changes

We fixed the peer API to be symmetric to the subject API via https://github.com/kubernetes-sigs/network-policy-api/pull/196
Let's change this to also reflect on the test cases.
So change:
- namespaces:
        namespaceSelector:
          matchLabels:

to
- namespaces:
          matchLabels:

in peers everywhere

ran this against: https://github.com/ovn-org/ovn-kubernetes/pull/4245 which consumes the new syntax for namespace peers and its working.
PASS
ok      sigs.k8s.io/network-policy-api/conformance      376.320s

looks fine; let's merge

/lgtm
/approve
Thanks @tssurya!!!


SPT-9306: Python Driver Should Search String in List Fields

Devex Change Request
Change Comments
I updated the library to validate the filter given to search a report.
Solution description
I validate the filter received in search function in report file, to let the user search just sending a number or string if the field is a list of one of those types.
Evidences:
Current:

Fixed:

Checklist

PR is ready for code review and approval when each box is checked.
All steps are required, when applicable. ~Strikeout~ formatting indicates a step is not applicable to this change set.

[x] Ticket referenced in PR title (ex. SPT-XXX: Short summary of change)

@jeanmurillo95 We have some failing functional tests, can you take a look?
FAILED driver_tests/test_records_bulk_adaptor.py::TestRecordAdaptorBulkModifyClear::test_record_bulk_modify_clear_text_list - TypeError: Field must be a text.
FAILED driver_tests/test_records_bulk_adaptor.py::TestRecordAdaptorBulkModifyClear::test_record_bulk_modify_clear_numeric_list - TypeError: Field must be a numeric.

@seandgrimes bug fixed!


Hi, cool module, thanks! But it doesn't work with the application I need. Can I order a modification of the module for my needs?

Hi, cool module, thanks! But it doesn't work with the application I need. Can I order a modification of the module for my needs?

I am also interested in a mod for a specific application.

Hi, write me down if you have any problems i will try to help you<EMAIL_ADDRESS>

Just sent you an email. Anyone who can make this work with my target app gets $1000, possibly more.

Hi, write me down if you have any problems i will try to help you<EMAIL_ADDRESS>


Fix dupe bug with factories

This is a simple fix for a dupe bug which involves sorting items which contain inventories where the inventories would copy to the other items when sorting is being done. This fixes that by simply disabling sorting for items which have NBT data.
I only tested this on 1.7.10 but it may be an issue on other versions as well

a) thats not how that should be fixed
b) we don't update 1.7


[9.4] ISPN-14437 XStream 1.4.20

https://issues.redhat.com/browse/ISPN-14437

merged! thanks @tristantarrant !


How to use array as the parameter?

post request, like  URLEncoding.ArrayEncoding of Alamofire,
["aaa","bbb"]

There is an example in the docs, you can see here


Remove Embedded LDAP from IS

Related to https://github.com/wso2/product-is/issues/13908
Removed LDAP userstore component and related configurations from product-is.

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2621168527

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2621168527
Status: cancelled

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2627361434

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2627361434
Status: failure

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2628082328

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/2628082328
Status: failure

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/2628980305


#Issue106

Sending the pull request to develop branch

Hi! I tried to send the pull request to the development branch of Tastyigniter, but I did the development on the master branch. I am not very comfortable with the git workflow, please let me know if this will work.

Not sure this will work since it already has conflicts. The PR also doesn't look clean. One way to do it is make sure your local copy of the repo is up to date with the remote, then switch to the develop branch, rebase/fetch changes from the master branch to the develop branch then send a PR to the remote.
You can read more here. https://github.com/tastyigniter/TastyIgniter/blob/master/CONTRIBUTING.md

Hey Sam!
I have been a little busy lately and did not get time tosemd another request. i see you have referenced the pull request, but I am not sure what this means.
Please let me know if I still meed to send another request, as I will be doing it on Sunday..
Regards,
Shivam

Its all good. I've pulled the changes to the develop branch. Next time just make sure your local develop branch is up-to-date with the remote before pushing.


Distinction between ESP_GATTC_OPEN_EVT and ESP_GATTC_CONNECT_EVT

Im wondering, why we have handled ESP_GATTC_OPEN_EVT event instead ESP_GATTC_CONNECT_EVT:
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/BLEClient.cpp#L181-L191

In the BLEClient code we have a method called "connect".  Its purpose is to connect to a remote BLE Server.  We achieve this by calling the underlying ESP-IDF function called esp_ble_gattc_open().  Since we are performing in an asynchronous environment, we block the call until we get a corresponding ESP_GATTC_OPEN_EVT which is the partner to esp_ble_gattc_open().  Your question asks ... as I understand it ... "Why are you watching for ESP_GATTC_OPEN_EVT and not ESP_GATTC_CONNECT_EVT?".  The glib and simple answer is that when we open a connection using esp_ble_gattc_open() we get an ESP_GATTC_OPEN_EVT as a response and not an ESP_GATTC_CONNECT_EVT.
However, this does open up a very salient question for which I have no answer.  Since we see the existence of an event call ESP_GATTC_OPEN_EVT and another event called ESP_GATTC_CONNECT_EVT ... what then are the semantic distinctions between each one?  Under what circumstances do I receive ESP_GATTC_OPEN_EVT and under what circumstances do I get an ESP_GATTC_CONNECT_EVT and what do each mean?   I have no idea and suggestions/study are welcome

Research in progress...

Close a virtual connection to a GATT server. gattc maybe have multiple virtual GATT server connections when multiple app_id registed, this API only close one virtual GATT server connection. if there exist other virtual GATT server connections, it does not disconnect the physical connection. if you want to disconnect the physical connection directly, you can use esp_ble_gap_disconnect(esp_bd_addr_t remote_device).
http://esp-idf.readthedocs.io/en/latest/api-reference/bluetooth/esp_gattc.html#_CPPv219esp_ble_gattc_close13esp_gatt_if_t8uint16_t


ion-content inside ion-segment

Short description of the problem:
The ion-content is hidden when used inside an ion-segment.
You can see in that Codepen that when you click "Two", you cannot see the list inside the ion-content: http://codepen.io/Carlos_Adrian/pen/ONYEMQ
What behavior are you expecting?
The ion-content shoud be visible as when it is used outside an ion-segment. It you remove the ion-segment from the Codepen, the list inside the ion-content does show.
Steps to reproduce:

Create a ion-segment with at least two divs inside (you can see it in http://codepen.io/Carlos_Adrian/pen/ONYEMQ)
In one of these divs, create a ion-content item.
Put a list inside the ion-content
You cannot see that ion-content (click "Two" in the Codepen, you should see the list inside the ion-content)

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
https://forum.ionicframework.com/t/ion-content-inside-segment-is-not-shown/52309
Which Ionic Version? 1.x or 2.x
Ionic version 2.0.0-beta.6

Why not have hidden divs that swap depending on the selected segment rather than changing the ion-content?

It is because of the floating action button (FAB). Take a look here: https://forum.ionicframework.com/t/floating-action-button/38599/11

Hello @CarlosAdrianM ! Thanks for opening an issue with us. Here is a codepen that i made that fixed the issues with your codepen. First, you needed to wrap your whole template with <ion-content> and secondly you needed to remove the <ion-content> from around the list. Once this was done everything seems to be working fine (: If you have any more issues please feel free to comment. Also, i am going to consider this issue fixed for now and close, but if you still have the issue i will happily reopen. Thanks for using Ionic!

Thanks @jgw96 , I am sure I am doing something wrong :) But in your codepen, the FAB does not fix at the bottom, but it goes up when you move through the list. That is why I put the FAB outside the ion-content. When I take the FAB outside the ion-content, and I also remove the segments, it does stay fixed at the bottom when I move down the list. That is why I think there is something that does not work properly...
Thank you

Ahh, @CarlosAdrianM one second and i will make another codepen that shows how to fix that. (:

@CarlosAdrianM alright, would you mind checking that codepen again? As you can see i added our fab-fixed attribute which fixes the issue you mentioned above.

So simple... and I was going crazy. Sorry :( Your codepen is perfect now.
Thank you very much

@CarlosAdrianM haha no problem! Im glad i could help you! Thanks for using Ionic!


[Bug] Creating the first user account on a new instance with a single-character first name fails with an unclear error message

General

[X] I have updated to the latest version of Nexterm.
[X] My bug has not been reported yet.

The Bug
When you're creating the first account on a new instance, if you use a single-character first name, the error will tell you that your username or password is invalid when you click to create the account. (Might also apply to last name, but I didn't test that as putting in my full first name immediately cleared the issue and created the account.)
This is a little confusing, as the actual fault doesn't lie in either the username or password, and should perhaps have a more clear error message.
What device are you using to access the page?
In the browser
Which operating system is your Nexterm instance running on?
Linux

Thanks for reporting this. The next update will contain a proper sign-up error message


Update dialing-out-from-a-teams-meeting-so-other-people-can-join-it.md

@tonysmit
Can you check with Oscar on this? 1:1 PSTN call escalation and Dial out should be same logic. Certainly from testing this is how it works. This article doesn't account for this behavior and is missing information about CsOnlineDialOutPolicy.
If a meeting organizer does not have an AudioConferencing License assigned, dial out from the meeting will follow the users normal PSTN voice route.
If a meeting organizer dos have an AudioConferncing License assigned, dial out from the meeting will be via the conferencing bridge.
In both cases, user needs a dial out policy that enables dial out from meetings.

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@tonysmit PR has been copyedited and is ready for final review, could you please check and merge? Thanks!


Use init with Blazor dependency injections

Most places used init. Replace remaining setters with init.
Microsoft Reviewers: Open in CodeFlow

/azp run

/azp run


[BUG] Some games have passwords on their files

Describe the bug
I am aware that this is not your problem but some games have a password in the files, I do not know how you can solve it but I thought it was pertinent to let you know
Steps to Reproduce

Install "Oxygen Not Included"
Try to unzip the files

Expected behavior
Be able to unzip the archive
Screenshots

Operating System
windows 11 (Winter os)
Hydra Version
v2.0.3
Additional Information
No response

Try using: online-fix.me


Compilation fails when using url with var in SCSS

I've tried using the following snippet:
h2::before {
    content: url(var(--my-content));
}

which fails with Can't resolve 'var(--my-content in...
I'm using
    "css-loader": "^6.7.1",
    "pug-plugin": "^4.2.0",
    "sass": "^1.54.6",
    "sass-loader": "^13.0.2",
    "webpack": "^5.74.0",
    "webpack-cli": "^4.10.0"

with the following webpack config:
const path = require('path');
const PugPlugin = require('pug-plugin');

module.exports = {
  entry: {
    index: './src/views/login.pug',
    albums: './src/views/albums.pug',
  },
  output: {
    path: path.resolve(__dirname, 'dist'),
    publicPath: 'auto',
    filename: 'assets/js/[name].js',
  },
  module: {
    rules: [
      {
        test: /\.pug$/,
        loader: PugPlugin.loader,
        options: {
          method: 'render',
        }
      },
      {
        test: /\.s[ac]ss$/,
        use: [
          'css-loader',
          'sass-loader',
        ],
      },
      {
        test: /\.(png|jpg|jpeg|svg|ico)$/,
        type: 'asset/resource',
        generator: {
          filename: 'assets/images/[name][ext]',
        },
      },
    ],
  },
  plugins: [
    // enable processing of Pug files defined in webpack entry
    new PugPlugin({
      extractCss: {
        // output filename of CSS files
        filename: 'assets/css/[name].css',
      },
    }),
  ],
  resolve: {
    alias: {
      Assets: path.join(__dirname, 'src/assets/'),
    },
  },
}

I think pug-plugin should just ignore any url containing var since it cannot be resolved at compile-time.

My bad you just can't do that in css... I think I'm too tired to code tonight
I've just set the url() part in my variable and it works

Hello Thomas,
thank you for the bug report.
This use case is very important too.
Of cause, CSS variables should contains any URL only, w/o url(...) part.
In next release the resolving of var in url will be ignored.
Thx,
Dimitri

I am unsure a fix is necessary. As stated before, I searched the issue a little bit further just after opening the issue and found that url(var(--my-var)) is invalid in CSS source.
Unless I missed something and the spec has changed, it seems that there is no need for a fix

Thanks for the link to stackoverflow.
I give here an example of correct usage:
:root {
  --logo-image: url(/static/images/logo.jpg);
}

.logo {
  background-image: var(--logo-image);
}


v20.0.1 update .gitignore

[Current coverage][cc-pull] is 100%

Merging [#496][cc-pull] into [master][cc-base-branch] will not change coverage

@@           master   #496   diff @@
====================================
  Files          27     27
  Lines         420    420
  Methods       105    105
  Messages        0      0
  Branches        0      0
====================================
  Hits          420    420
  Misses          0      0
  Partials        0      0

Powered by Codecov. Last updated by [8cd1b39...de2fb6d][cc-compare]
[cc-base-branch]: https://codecov.io/gh/eugene-matvejev/battleship-game-api/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/eugene-matvejev/battleship-game-api/compare/8cd1b394d61bfae6e0f8aa68e00439835a9e2f0f...de2fb6d7faccfbe5d5db2975775ae5bb6d6e8029
[cc-pull]: https://codecov.io/gh/eugene-matvejev/battleship-game-api/pull/496?src=pr


Add annotation for aliases

This issue was imported from Closure Compiler's previous home at http://closure-compiler.googlecode.com
The original discussion is archived at:
http://blickly.github.io/closure-compiler-issues/#448

This is partially addressed now that we allow aliases in externs: https://github.com/google/closure-compiler/blob/642ce8b22b911e0c62da6af5748707a7e937f2b5/contrib/externs/jquery-1.9.js#L157-L160.


eslintrc resolve.root doesn't work

Investigate. Fix.
(maybe the . is actual YAML syntax?)

Seems I was wrong. Testing in a pristine directory, it seems to work.

Considering this more: I think my first round of investigation was bad. I suspect that resolve.root is relative to the working directory of eslint at runtime, which, if run from an npm script is probable the package root, but otherwise is just wherever eslint is run from.
Should normalize this to either be rooted at a package.json or .eslintrc. The latter is probably less confusing (and may include the former in some cases).

Using a direct passthrough to resolve.sync's opts parameter, now.
May want to revisit this later to allow relative paths in opts.paths, but then all the same decisions still must be considered. i.e. relative to what? the package.json? the file being linted? both?


PCRE.exec error: match limit exceeded in gadfly

MacOSX, everything updated. I'm using Gadfly, and attempting to to enter colors into Scale.discrete_color_manual(). Every. Single. Keystroke. throws this error:
PCRE.exec error: match limit exceeded
 in error at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in exec at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in match at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in prefix at /Users/KBLaptop/.julia/v0.4/CodeTools/src/completions.jl:74
 in anonymous at /Users/KBLaptop/.julia/v0.4/Atom/src/completions.jl:8
 in withpath at /Users/KBLaptop/.julia/v0.4/Requires/src/require.jl:37
 in withpath at /Users/KBLaptop/.julia/v0.4/Atom/src/eval.jl:53
 in anonymous at /Users/KBLaptop/.julia/v0.4/Atom/src/completions.jl:7
 in handlemsg at /Users/KBLaptop/.julia/v0.4/Atom/src/comm.jl:67
 [inlined code] from /Users/KBLaptop/.julia/v0.4/Atom/src/comm.jl:18
 in anonymous at task.jl:63

It only happens when I type inside the parenthesis, and everything seems to do it. I've tried numbers, letters, ^, {, ;, [ etc. I can type what I want somewhere else in the editor and then copy-paste without throwing the error.

Try Pkg.checkout("CodeTools"), that error is fixed on master.

That worked, thanks!


[Heroku] Error page 500 after logging in

Everything works fine in local but not in Heroku. It will display error page 500 after log in for both admin and normal user. Some important notes:

The site does redirect normal user from admin routes and vice versa after log in, which means it starts having problem when trying to render the resources
Heroku uses different version of Leiningen

❤ 💚 💙 💛 💜

Apparently I accidentally added an extra '/' at the beginning of file path. Somehow the error did not show up in my system, only in Heroku.


Support dismissing the view

Thanks for writing this plugin! I'm using it as part of an auth flow so I need to dismiss the view once the user has signed in. I've hacked the plugin in my project but figured I'd share the changes here. Note that I'm far from a Cordova or Objective-C expert but this seems to work.
I've updated the example code and copy/pasted my changes to this repo, but I haven't tested it in a fresh project.

As an aside, perhaps the methods are better as preset() and dismiss() so they match the native interface?

Actually, this looks great on first glance! I'll merge it soon, just need to find a little time to verify it.

Perfect timing, I was just going to start working on a fork for this for the exact same use case since it was the main thing holding us back from implementing the plugin.

Excellent job, and thanks for updating the demo as well!
Version 1.1.0 is now available.

Mark, if you ever have the need to change anything else in this plugin feel free to submit a PR and merge it yourself since I've just granted you commit privileges.

@EddyVerbruggen thanks! @idpaterson happy to help! :)


Add authenticationScheme support for MSSQL adapter when using official driver

This will allow for using windows auth via kerberos on linux machines,
A work around is to simply specific the path instead of passing the parameters.
Some more information:
https://docs.microsoft.com/en-us/sql/connect/jdbc/using-kerberos-integrated-authentication-to-connect-to-sql-server

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

if you're using the correct driver, just specify the required properties:  under your configuration and it will work
e.g.
production:
  adapter: mssql
  properties:
    authenticationScheme: JavaKerberos
    ...


German translation

This needs a TrackHAR release.

TrackHAR has been released and I have updated the PR.


Fixed areaOfCircle

#221

[x] Running yarn lint does not trigger any linter errors
[x] The test of the method you have fixed is passing
[x] You have written a new skeleton method for someone else to work on!
[x] You have written tests to accompany your skeleton method

Added a new method to implement - matrixAdd.

@buoyantair Do you mind wrapping this one up so we can get it merged?

@ktilcu Yeah, so I just remove the truncate file and add more tests? right?

yeah that'll do @buoyantair

@ktilcu Okay, check it out.

Please add a new issue if you could! Thanks for the contribution and happy hacktobering!

@ktilcu Definitely!


module 'hub' has no attribute 'mockingjay_local'

Hello. I am trying to run the Mockingjay downstream task using this command python run_downstream.py -m train -u  mockingjay_local -k '<path to .ckpt>' -d phone_linear -n mockingjayDown. on an HPC. I am getting the following error:
  File "run_downstream.py", line 225, in <module>
    main()
  File "run_downstream.py", line 220, in main
    runner = Runner(args, config)
  File "<path>/s3prl/downstream/runner.py", line 103, in __init__
    self.upstream = self._get_upstream()
  File "<path>/s3prl/downstream/runner.py", line 143, in _get_upstream
    Upstream = getattr(hub, self.args.upstream)
AttributeError: module 'hub' has no attribute 'mockingjay_local'

Please let me know how to resolve the issue or if I need to provide more details. Thanks!

Hi @MiPlayer123
Hmmmm..... how about other upstream?
Can you try -u wav2vec2 ?

I tried -u wav2vec2 with no success still: AttributeError: module 'hub' has no attribute 'wav2vec2'

Hmmm..
This means the entire hub module is not installed correctly.
May I ask which command you used to install S3PRL?

I cloned the repo locally and uploaded the files to the HPC and installed all the dependencies. However, I did not run pip install fairseq@git+https://github.com//pytorch/fairseq.git@f2146bdc7abf293186de9449bfa2272775e39e1d#egg=fairseq as git was not available on the HPC. Could this be the issue?

Yes without installing fairseq you can not use wav2vec2.
However, it should not affect mockingjay.
Could you screenshot your python3 run_downstream.py -h?
Specifically I want to see what are the available options in -u UPSTREAM

I believe you follow the main README.md to install S3PRL by pip install -e ./ right?

I did follow the main README, but I am not able to use pip install -e ./ as it requires git.

I see now. There are no options in S3PRL: []

I figured out a way to get pip install -e ./ to run, but I ran into an error while running it.  ERROR: Could not install packages due to an OSError: Could not find a suitable TLS CA certificate bundle, invalid path: /etc/pki/ca-trust/source/anchors/cert_Palo_Forward_Trusted_CA.crt How would I be able to fix this issue.

I resolved that issue (it was network related). I am now getting this when running pip install -e ./: ERROR: No matching distribution found for sacrebleu>=2.0.0kaldi_io Do you know where the issue is comming from?

Oh did you pull the latest master?
I seems to me this error in setup.py was fixed by a recent PR, where a comma is missing between sacrebleu>=2.0.0 and kaldi_io

I cloned the latest at the time, which isn't the latest now. I was able to successfully run pip install -e ./. However, I still get the no module found error with nothing in S3PRL: []

What else could cause this issue ?

I decided to clone the later repo and start again, but I am running into issues again. I installed all the dependancies and when i try to run python3 run_downstream.py -h, I get this error:
[UpstreamExpert] - Using the default upstream expert config
Traceback (most recent call last):
  File "run_downstream.py", line 219, in <module>
    main()
  File "run_downstream.py", line 214, in main
    runner = Runner(args, config)
  File "<path>/s3prl/s3prl/downstream/runner.py", line 94, in __init__
    self.upstream = self._get_upstream()
  File "<path>/s3prl/s3prl/downstream/runner.py", line 153, in _get_upstream
    refresh = upstream_refresh,
  File "<path>/s3prl/s3prl/upstream/mockingjay/hubconf.py", line 29, in mockingjay_local
    return _UpstreamExpert(ckpt, model_config, *args, **kwargs)
  File "<path>/s3prl/s3prl/upstream/interfaces.py", line 30, in __call__
    instance = super().__call__(*args, **kwargs)
  File "<path>/s3prl/s3prl/upstream/mockingjay/expert.py", line 51, in __init__
    self.transformer = PretrainedTransformer(options, inp_dim=-1)
  File "<path>/s3prl/s3prl/upstream/mockingjay/builder.py", line 265, in __init__
    super(PretrainedTransformer, self).__init__(options, inp_dim, config, online_config, verbose)
  File "<path>/s3prl/s3prl/upstream/mockingjay/builder.py", line 81, in __init__
    self.extracter, self.inp_dim = get_extracter(self.config['audio'])
ValueError: too many values to unpack (expected 2)

Can you report the result of running
python3 run_downstream.py -m train -u mockingjay -d example -n test

and
python3 run_downstream.py -m train -u wav2vec2 -d example -n test

I decided to clone the later repo and start again, but I am running into issues again. I installed all the dependancies and when i try to run python3 run_downstream.py -h, I get this error:
[UpstreamExpert] - Using the default upstream expert config
Traceback (most recent call last):
  File "run_downstream.py", line 219, in <module>
    main()
  File "run_downstream.py", line 214, in main
    runner = Runner(args, config)
  File "<path>/s3prl/s3prl/downstream/runner.py", line 94, in __init__
    self.upstream = self._get_upstream()
  File "<path>/s3prl/s3prl/downstream/runner.py", line 153, in _get_upstream
    refresh = upstream_refresh,
  File "<path>/s3prl/s3prl/upstream/mockingjay/hubconf.py", line 29, in mockingjay_local
    return _UpstreamExpert(ckpt, model_config, *args, **kwargs)
  File "<path>/s3prl/s3prl/upstream/interfaces.py", line 30, in __call__
    instance = super().__call__(*args, **kwargs)
  File "<path>/s3prl/s3prl/upstream/mockingjay/expert.py", line 51, in __init__
    self.transformer = PretrainedTransformer(options, inp_dim=-1)
  File "<path>/s3prl/s3prl/upstream/mockingjay/builder.py", line 265, in __init__
    super(PretrainedTransformer, self).__init__(options, inp_dim, config, online_config, verbose)
  File "<path>/s3prl/s3prl/upstream/mockingjay/builder.py", line 81, in __init__
    self.extracter, self.inp_dim = get_extracter(self.config['audio'])
ValueError: too many values to unpack (expected 2)

I think you will not run into downstream/runner.py if you are simply python3 run_downstream.py -h
Could you double check the command you used which lead to the above error message?

Not sure what happened before but both python3 run_downstream.py -h and python3 run_downstream.py -h ran without errors. Thanks!
I get that error I sent previously when I run python3 run_downstream.py -m train -u mockingjay_local -k '<path>/s3prl/s3prl/result/pretrain/Mockingjay_trained/states-350000.ckpt' -d phone_linear -n mockingjayDown. Is there something wrong with my command?

I don't see an obvious error with the above command.
Could you please share with me your trained checkpoint? (like launching a python server or upload to Gdrive)
Perhaps with it I am easier to identified this issue.

Thanks for sharing, I will work on this next Monday

I noticed that Mockingjay was updated, so I tried rerunning the downstream tasks. Unfortunately, I am still running into the same issue mentioned previously. I also tried to retrain the Mockingjay, which resulted in the same issue.

Hi,
I locate the problem. It is due to an update for the get_extracter API. I am fixing it now.


Add log and data storage for L2 revenue

Add 10X data log
Add the data storage for L2 revenue, so it can correctly record the l2 fee after the oETH is withdrawn from the vault

Codecov Report

Merging #484 (4a20494) into develop (29ebe27) will increase coverage by 9.95%.
The diff coverage is n/a.

:exclamation: Current head 4a20494 differs from pull request most recent head 2ff55a9. Consider uploading reports for the commit 2ff55a9 to get more accurate results

@@             Coverage Diff             @@
##           develop     #484      +/-   ##
===========================================
+ Coverage    76.09%   86.05%   +9.95%
===========================================
  Files           81       49      -32
  Lines         3037     1936    -1101
  Branches       469      307     -162
===========================================
- Hits          2311     1666     -645
+ Misses         726      270     -456

Flag
Coverage Δ

batch-submitter
?

contracts
86.05% <ø> (ø)

core-utils
?

data-transport-layer
?

message-relayer
?

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

Impacted Files
Coverage Δ

.../batch-submitter/src/transaction-chain-contract.ts

...ubmitter/src/batch-submitter/tx-batch-submitter.ts

packages/batch-submitter/hardhat.config.ts

...ices/l1-ingestion/handlers/state-batch-appended.ts

packages/core-utils/src/common/hex-strings.ts

packages/core-utils/src/index.ts

packages/core-utils/src/common/index.ts

...layer/src/services/l1-ingestion/handlers/errors.ts

...ckages/data-transport-layer/src/utils/contracts.ts

packages/core-utils/src/l2context.ts

... and 22 more

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 29ebe27...2ff55a9. Read the comment docs.


🚧 feat(wip): NATS callbacks

NATS has integrated a lot more connection parameters and likely some in other classes besides the client.
Should implement all of them.

errors done. we can close.


still unable to load plans in test after refactor

Steps to reproduce (was done in Range (test) openshift project):

Login as range officer
Click on an existing RUP
Plan fails to load.  See below error:

@calebissharp message if you need a plan that looks like the one having an issue or if you need any assistance/access testing in the env it gets deployed to.

@micheal-w-wells Yeah, it would be helpful to have access to the env so I can try and see what the error is. The plan would be nice to have also. Is it just this one plan that throws an error? Or are they all failing to load?

Different plans.  The one i sent last time also throws this error for me, Lisa would be looking at other plans and has same result.  DM me your preferred email and I'll sort out your access.

this one is resolved, thanks @calebissharp !


Add styling to new pages

Follows on from #46 which is merged to develop. (Note the modal is now column and the menu breaks on mobile)
Add identical styling to Showcase, About and Terms pages to add a white background and center-align text (so it takes up about 1/3 page on desktop and about full width on mobile). No card needed.
See this for reference:
https://michaelcurrin.github.io/jekyll-blog-demo/about/
Desktop:

Mobile:

Lorem ipsum text will do

On it

Closing as the Wiki was a much lower lift https://github.com/MichaelCurrin/instant-website/wiki


Support XML documentation comments?

Hi, Mapster is a very nice Mapper.
Support XML documentation comments will be nicer, this will make happier and easier when coding with Mapster.

Hi @codelovercc,
Good suggestion. Pull requests are very welcome on this one :) I know there are large parts of the API that are not covered by appropriate comments.

You are right :),  XML comments in the destination model and also in the Mapster source code.

Can you give me an example with a source and destination model?

@codelovercc Can you explain exactly what it is you are missing in Mapster? I still don't understand.

Here is an example.
file: https://github.com/MapsterMapper/Mapster/blob/master/src/Mapster/Interfaces/IMapper.cs
Adding XML documentation comments for IMapper
using System;
using Mapster;

// ReSharper disable once CheckNamespace
namespace MapsterMapper
{
    /// <summary>
    /// Provide basic mapping methods
    /// </summary>
    public interface IMapper
    {
        /// <summary>
        /// GET TYPE ADAPTER CONFIG
        /// </summary>
        TypeAdapterConfig Config { get; }

        /// <summary>
        /// Create a <see cref="TypeAdapterBuilder"/> from TSource type
        /// </summary>
        /// <param name="source"></param>
        /// <typeparam name="TSource"></typeparam>
        /// <returns></returns>
        TypeAdapterBuilder<TSource> From<TSource>(TSource source);

        /// <summary>
        /// Map a object to <see cref="TDestination"/>
        /// </summary>
        /// <param name="source">the object</param>
        /// <typeparam name="TDestination">Destination type</typeparam>
        /// <returns></returns>
        TDestination Map<TDestination>(object source);

        /// <summary>
        /// Map from <see cref="TSource"/> to <see cref="TDestination"/>
        /// </summary>
        /// <param name="source">The source object</param>
        /// <typeparam name="TSource">The type of source</typeparam>
        /// <typeparam name="TDestination">The type of destination</typeparam>
        /// <returns>return a instance of <see cref="TDestination"/></returns>
        TDestination Map<TSource, TDestination>(TSource source);

        TDestination Map<TSource, TDestination>(TSource source, TDestination destination);
        object Map(object source, Type sourceType, Type destinationType);
        object Map(object source, object destination, Type sourceType, Type destinationType);
    }
}

I was trying to say that the sources should have XML documentation comments.
Sorry to bother you :)


Error running '/usr/local/Cellar/fzf/0.17.1/bin/fzf'

Category

[ ] fzf binary
[ ] fzf-tmux script
[ ] Key bindings
[ ] Completion
[X] Vim
[ ] Neovim
[ ] Etc.

OS

[ ] Linux
[X] Mac OS X
[ ] Windows
[ ] Windows Subsystem for Linux
[ ] Etc.

Shell

[X] bash
[ ] zsh
[ ] fish

I get the following problem using :FZF <search> on macOS:
Error running '/usr/local/Cellar/fzf/0.17.1/bin/fzf'  '--multi' '--prompt' '~/dotfiles/' 'README.md' --expect=ctrl-v,ctrl-x,ctrl-t --height=19 > /var/folders/zj/6xrn345n1ygf4_b5b4zc c0nh0000gn/T/vZbpzbI/1
fzf is brewed, vim version version 8.0.1300 (brewed).
I have tried re-installing, using set rtp+=/usr/local/opt/fzf and
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'

You can run the command in the message on your shell to see what went wrong. I see README.md in the command which is not expected. :FZF <search> only takes fzf options and an optional directory argument. e.g. :FZF, :FZF --reverse, :FZF --reverse /tmp, etc.


Update Page “index”

Automatically generated by Netlify CMS

👷 Deploy Preview for admiring-haibt-6e6728 processing.
🔨 Explore the source changes: c44fa8447fe05956bced10b9f10c1524862b0e84
🔍 Inspect the deploy log: https://app.netlify.com/sites/admiring-haibt-6e6728/deploys/6106fa8ce7d6370008d7301b


Solution 1991 Added

Fixes #1683

My code sample is in :

[x] CPP
[ ] Java

Screenshot of working code sample  :

Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My code sample is formatted and works correctly

LGTM , Thanks for Contribution : )

@hamdan-codes Bro, how did u format this way?

Using the link: http://format.krzaq.cc/
Select Google in format style.
On Sat, Oct 2, 2021, 19:46 shubhankit123 @.***> wrote:

@hamdan-codes https://github.com/hamdan-codes Bro, how did u format
this way?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/amanv8060/Leetcode-Questions/pull/1736#issuecomment-932759583,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANBVOC523UWJWASBZHT3NLTUE4H25ANCNFSM5FERBMTQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


Sorry, we’ve temporarily run out of recommendations for you. We’re out there looking for more right now. Please check back soon!

@0x69676f72 Sorry you encountered this... I haven't played around with it enough to see if there is any way to get around the limitations


pandas 有提示

~\Python\Python312\site-packages\akshare\stock_feature\stock_report_em.py:182: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
big_df = pd.concat([big_df, temp_df], ignore_index=True)

~\Python\Python312\site-packages\akshare\stock_feature\stock_report_em.py:182: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation. big_df = pd.concat([big_df, temp_df], ignore_index=True)

已修复，升级到 AKShare 1.13.17 使用


javaagent doesn't work

I tried to use likejava -jar app.jar -javaagent:/Users/mudboyzh/Downloads/spring-server-generated/target/agent.jar
There is no message about jolokia or any error message.
It cannot get http://<IP_ADDRESS>:8778/jolokia/.
But it works with attach by pid java -jar agent.jar {app pid}.
Once I execute java -jar agent.jar {app pid}, it will show some log  in the app.
Here is end of log after I attach jolokia  by pid.

2021-08-10 11:30:32.870  INFO 55912 --- [           main] io.swagger.Swagger2SpringBoot            : Started Swagger2SpringBoot in 3.449 seconds (JVM running for 3.936)
I> No access restrictor found, access to any MBean is allowed
I> Cannot join multicast group on NIF utun3: Can't assign requested address
I> Cannot join multicast group on NIF utun2: Can't assign requested address
I> Cannot join multicast group on NIF utun1: Can't assign requested address
I> Cannot join multicast group on NIF utun0: Can't assign requested address
I> Cannot join multicast group on NIF llw0: Can't assign requested address
I> Cannot join multicast group on NIF awdl0: Can't assign requested address
I> Cannot join multicast group on NIF en5: Can't assign requested address
I> Cannot join multicast group on NIF utun3: Can't assign requested address
I> Cannot join multicast group on NIF utun2: Can't assign requested address
I> Cannot join multicast group on NIF utun1: Can't assign requested address
I> Cannot join multicast group on NIF utun0: Can't assign requested address
I> Cannot join multicast group on NIF llw0: Can't assign requested address
I> Cannot join multicast group on NIF awdl0: Can't assign requested address
I> Cannot join multicast group on NIF en5: Can't assign requested address
Jolokia: Agent started with URL http://<IP_ADDRESS>:8778/jolokia/

After these logs show up, I can get jolokia info from  http://<IP_ADDRESS>:8778/jolokia/
Is there any way to find out where the error happened with javaagent?

I found java agent should set before -jar app.jar
Like this java -javaagent:/Users/mudboyzh/Downloads/spring-server-generated/target/agent.jar -jar app.jar


Fixed failure of networking tests.

The default MTU on the pod network interface varies, depending
on the environment on which the cluster runs, and it made some
of the tests to fail.
Now the test covers all the possible MTU values.

/assign @vladikr

@yossisegev please run the make command to make travis happy again :)

/release-note-none

/retest

ci please test

/retest


Read CSV with offset?

I have to parse a CSV file that contains X number of lines of information (eg, report by, report date, etc) at the beginning of the file before the actual tabular data occurs which I need to extract from the CSV.
Is it possible to extract data from a CSV starting at a specific line by nominating an offset for X line (for Y number of rows)?
Couldn't see this documented or that there was a support forum, apologies if this is the wrong place to ask a functionality question.

http://www.maatwebsite.nl/laravel-excel/docs/import#results
$reader->skip(10)->take(10);


Path separator problem on windows machines

Fixes a problem where path separators on windows machines ("\") where interpreted as regex escape characters. This prevented to choose a directory as a jasome parameter because all subdirectories used "\" as a separator.
This PR does that by handling paths internally as unix style paths with "/" separators and reverting them back to system style paths just before accessing files.
The failing locale tests mentioned in #6 are the only failing tests an my german windows machine.

Apparently this PR breaks something on unix systems. I will close this PR for now until I fix the issue.


User request: Office mix app in French

Is it possible to create localized versions of the Office Mix app?

This looks like it should be relatively straight forward. Kurt Berglund sent this resource: https://github.com/OfficeDev/office-js-docs/blob/master/docs/develop/localization.md.
I don't think we would need any extra translations, we can just use the website data.

@ariel-phet We had a user request for localized versions of the office-mix app. It sounds like it won't be horrible to add our part. Priority for this?

@oliver-phet @mattpen I am going to put this at medium but I would say after our Android app is published.

Moving priority to deferred

I just had another request into phethelp:

Is it possible to change the language to german in he Office-Add-In for
Powerpoint too?
It would be perfect for middle School.


Update generator readme for new API

Closes #61.

@samarsha I think we also need to update uninstalling-the-packages and troubleshooting

@samarsha I think we also need to update uninstalling-the-packages and troubleshooting

I updated the module names in the troubleshooting section. What did you want to update in "uninstalling the packages?" I thought the package names haven't changed.

@samarsha - good point, sorry, does this change still make sense then?
- `ModuleNotFoundError: No module named '(pyqir|pyqir.generator|pyqir.parser|pyqir.jit)'`:
  Install the library by running one of the `install.(sh|ps1|cmd)` scripts.

The ModuleNotFoundError does have a dot in it.
If you try import pyqir.generator without any PyQIR packages installed, you get "ModuleNotFoundError: No module named 'pyqir'". If you try import pyqir.generator with at least one PyQIR package installed (but not generator), you get "ModuleNotFoundError: No module named 'pyqir.generator'"


Unexplained behavior of not finding violations

PHPMD version: 2.15.0
PHP Version: 8.2.24
Installation type: composer
Operating System / Distribution & Version: macOS Sonoma 14.7

Current Behavior
I'm trying to use DuplicatedArrayKey rule, and it's not finding the violation.
Expected Behavior
Report the DuplicatedArrayKey violation
Steps To Reproduce:
# cat phpmd.xml
<?xml version="1.0"?>
<ruleset name="Custom Ruleset for DuplicatedArrayKey"
         xmlns="https://pmd.github.io/pmd-5.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="https://pmd.github.io/pmd-5.0.0 https://pmd.github.io/pmd-5.0.0.xsd"
         xsi:noNamespaceSchemaLocation="https://pmd.github.io/pmd-5.0.0.xsd">

    <description>
        This ruleset applies only the DuplicatedArrayKey rule.
    </description>

    <!-- Define the DuplicatedArrayKey rule -->
    <rule name="DuplicatedArrayKey"
          message="The array contains duplicated keys, which can lead to unexpected behavior."
          class="PHPMD\Rule\CleanCode\DuplicatedArrayKey">
        <description>
            This rule detects duplicated keys in arrays.
        </description>
    </rule>
</ruleset>

# cat config/bp.php
<?php

return [
    'b2b_bank_name' => 'AS Swedbank',
    "b2b_bank_name" => 'AS Swedbank',
];

$ phpmd config/bp.php ansi phpmd.xml

Found 0 violations and 0 errors in 136ms

No mess detected

So, I downloaded test from PR implemented the change:

https://github.com/phpmd/phpmd/pull/484

Pay attention that second run outcome is different even the files are not modified between the phpmd invocations
$ wget https://raw.githubusercontent.com/eeree/phpmd/a040a41c27c3841332f20e93ed2349192a6867d8/src/test/resources/files/Rule/CleanCode/DuplicatedArrayKey/testRuleAppliesCorrectlyToMultipleArrays.php

$ vendor/bin/phpmd testRuleAppliesCorrectlyToMultipleArrays.php ansi phpmd.xml -vvv
ResultCache is not enabled.

FILE: testRuleAppliesCorrectlyToMultipleArrays.php
-------------------------------------------------------------------------------------------------------
 20 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.
 29 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.
 29 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.
 37 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.

Found 4 violations and 0 errors in 125ms

$ cp config/bp.php testRuleAppliesCorrectlyToMultipleArrays.php
cp: overwrite 'testRuleAppliesCorrectlyToMultipleArrays.php'? y
$ vendor/bin/phpmd testRuleAppliesCorrectlyToMultipleArrays.php ansi phpmd.xml -vvv
ResultCache is not enabled.

FILE: testRuleAppliesCorrectlyToMultipleArrays.php
-------------------------------------------------------------------------------------------------------
 20 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.
 29 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.
 29 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.
 37 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.

Found 4 violations and 0 errors in 125ms
$ vendor/bin/phpmd testRuleAppliesCorrectlyToMultipleArrays.php ansi phpmd.xml -vvv
ResultCache is not enabled.

Found 0 violations and 0 errors in 91ms

No mess detected

$ cat .phpmd.result-cache.php
cat: .phpmd.result-cache.php: No such file or directory

what is happening?

why it doesn't detect violations from config/bp.php?
why overwriting the file with bp.php contents it first reports errors from previous file
why second run outcome is different

looks like something is cached? but where?
Checks before submitting

[x] Be sure that there isn't already an issue about this. See: Issues list
[x] Be sure that there isn't already a pull request about this. See: Pull requests
[x] I have added every step to reproduce the bug.
[x] If possible I added relevant code examples.
[x] This issue is about 1 bug and nothing more.
[x] The issue has a descriptive title. For example:  "JSON rendering failed on Windows for filenames with space".

while the cache-like issue can't be explained, I found if the code is wrapped in a function, then it will detect the error
# vendor/bin/phpmd testRuleAppliesCorrectlyToMultipleArrays.php ansi phpmd.xml -vvv
ResultCache is not enabled.

FILE: testRuleAppliesCorrectlyToMultipleArrays.php
-------------------------------------------------------------------------------------------------------
 5 | VIOLATION | The array contains duplicated keys, which can lead to unexpected behavior.

Found 1 violation and 0 errors in 98ms

# cat testRuleAppliesCorrectlyToMultipleArrays.php
<?php

function testRuleAppliesCorrectlyToMultipleArrays()
{
	return [
		'b2b_bank_name' => 'AS Swedbank',
		11=>1,
		"b2b_bank_name" => 'AS Swedbank',
	];
}


Please reconsider the new memory usage flags

The new API is extremely confusing. It should not pretend to know better what memory type I need.
E.g. people will start using VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT for staging buffers because hey, they are writing only sequentially to it right? And then get handed GPU local host visible memory which is slow to write to, potentially to small for what they want to stage and slow for the GPU to copy from e.g. on AMD where the transfer queue VRAM to VRAM copies are broken.
I don't think it is in the spirit of Vulkan to hide the machine from the user. It just makes it unclear of what's actually going to happen.

I think I got bit by this.
Investigated a slowdown related to vertex/index buffers that are updated every frame from the CPU. Bisecting lead me to commit that integrated VMA. VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT is used for these buffers.
When integrating VMA code creating these buffers was modified to pass VMA_MEMORY_USAGE_AUTO and VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT. This results in memory with VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT which in turn leads to writing to these buffers on the CPU taking a lot longer on both the Nvidia and AMD GPUs I have to test with. For Nvidia it takes ~1.8 times longer and for AMD ~1.3 times longer. (For integrated Intel GPU I have tested with it does not matter since VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT is set for the memory type both before and after VMA integration).
I have currently hacked around this by always passing VMA_MEMORY_USAGE_AUTO_PREFER_HOST if VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT is passed to the buffer creation function.
I have not measured how this affects staging buffers that use the same code path for creating CPU mapped buffers. The hack restores it so same memory property flags are passed before VMA integration since I assume there was a slowdown there as well.

I am sorry for delayed response.
@Novum: I understand your point. The purpose of introducing VMA_MEMORY_USAGE_AUTO* flags was to make the API of the library as simple to use as possible in basic use cases and for beginners. If you understand caveats like the performance of VRAM to VRAM copy on different hardware queues, you likely want to use VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE / _HOST or narrow down the choice of selected memory types using e.g. VmaAllocationCreateInfo::requiredFlags or VmaAllocationCreateInfo::memoryTypeBits.
Answering your specific concerns:

Access patterns unfriendly to uncached and write-combined memory (other than sequential writes) are very slow regardless of using system RAM of VRAM.
Sequential writes through a pointer to VRAM going through PCIe Gen 4 are almost as fast as writes to system RAM - same order of magniture.
If you use graphics or compute queue not copy queue for your copies, they will be fast regardless of copying from system RAM or VRAM.
If the CPU-visible VRAM is small, Vulkan will either fail the allocation (that will make VMA fall back to system RAM) or return success and migrate something to system RAM silently, which is usually what you want in this case.

See also this article, which is the result of performance experiments we did at AMD:
https://gpuopen.com/learn/get-the-most-out-of-smart-access-memory/
@kvark:

I agree with you that if you create a custom pool that ends up in a memory heap with small capacity, it can cause problems. Because we talk about choosing memory type index explicitly, I would recommend to inspect heap sizes first before making the decision or, even better, not using custom pools. Custom pools aren't needed as often as developers use them.
I agree with you this is a flaw of the current algorithm. It shouldn't choose DEVICE_LOCAL memory in this case. I will fix it.

@martin-ejdestig: I am sorry to hear you experienced decreased performance after integrating VMA. I think your workaround of using VMA_MEMORY_USAGE_AUTO_PREFER_HOST is a good solution. However, I also recommend to inspect your code that writes into the mapped pointer, whether it really is a sequential write and not random access or it doesn't involve any reads, even implicit like pData[i] += a. Maybe try to prepare the data in a local variable and use memcpy to copy them to the mapped pointer and see if it helps the performance.

@martin-ejdestig: I am sorry to hear you experienced decreased performance after integrating VMA. I think your workaround of using VMA_MEMORY_USAGE_AUTO_PREFER_HOST is a good solution. However, I also recommend to inspect your code that writes into the mapped pointer, whether it really is a sequential write and not random access or it doesn't involve any reads, even implicit like pData[i] += a. Maybe try to prepare the data in a local variable and use memcpy to copy them to the mapped pointer and see if it helps the performance.

It is sequential. Simple for loop that iterates over data and writes indices and vertices and no modification with += etc. ("Ping pongs" between vertex and index buffer though, if that matters. I tried writing to buffers that were then copied with memcpy() before integrating VMA. If I remember correctly it only got slower.)
Anyway, I was just surprised by this. But I also see the value of having VMA_MEMORY_USAGE_*.
So... I do not know. I feel that I am only adding noise here, will go back to lurking in the shadows. :)

VMA doesn't automatically prefer HOST_COHERENT memory. The only difference between HOST_COHERENT and non-HOST_COHERENT memory is that you need to call flush/invalidate after you write / before you read the memory through a mapped pointer. I don't think this is a big burden. On Windows PC, all GPU vendors provide all memory types that are HOST_VISIBLE also as HOST_COHERENT. If the platforms you use don't do it, you can just call vmaFlushAllocation / vmaInvalidateAllocation every time it is needed. There is no need to check if the memory is HOST_COHERENT. VMA checks that automatically and in case it is, the function does nothing.
Alternatively, you can request the memory to be HOST_COHERENT by adding:
allocInfo.requiredFlags = VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;

This can be freely mixed with other parameters of VmaAllocationCreateInfo, like the usage flags. However, I don't recommend this method. If your platform provides a non-HOST_COHERENT memory type that meets all your other requirements and is higher on the list of memory types, it my be more efficient.

Although not fully documented but rather platform-specific, I would expect HOST_CACHED flag to determine what you mentioned: With this flag, CPU accesses to the memory are cached, without it - they are uncached but write-combined. I think HOST_COHERENT is less related to that. Possibly, HOST_COHERENT is slower in some way because of the overhead of the cache coherency between host and device that must be ensured automatically.

This question of mine arose precisely because of this: the devices I was looking at had this DEVICE_LOCAL memory type at a lower position than the one that's HOST_COHERENT and not DEVICE_LOCAL. Yet using VMA_MEMORY_USAGE_AUTO, you would get the DEVICE_LOCAL one. Would you still recommend this memory type in this case?

From the memory heaps and types you showed, I would expect:

Type 0 is the video memory, not accessible to the host. Good to be used for GPU-only resources like color attachment images or sampled images that are uploaded once.
Type 1 is the system memory, good for staging buffers used as a source or destination of a transfer.
Type 2 is the CPU-visible video memory, good writing data directly from the CPU and reading them on the GPU, like uniform buffers changing every render frame.


how can I set values on Y axis

I want a graph like this but I am not able to set values on Y axis How can I set specific values on Y axis?

I'd like to know to

It would be nice we we have the option the manually set the Y axis values. Anyone happen to know if we can do it ? Or it not currently supported ?

Currently it's not supported,  but I would welcome a PR.

Can i manually set the Y axis values now?

Any solution?

Hi @luiza-avelino, I actually had to go a different direction in order to meet my requirements. I began to implement these changes, but it turned into almost a whole rewrite of the Line Graph. So I reevaluated and ended up writing a custom Line Graph on top of d3.
@Hermanya  I didn't want to offend or compete with RN Chart Kit, but I do have this code almost polished enough to open source. We can collaborate or I can simply release it as a healthy competition option (it's strictly a Line Graph, not a whole chart suite). But it would essentially be a complete replacement of what you have. Trying to shoehorn d3 into the existing code was too big of a change to introduce incrementally.  Let me know your thoughts.

Sounds awesome, share the link please, it might be helpful for other people in this thread.

@lightning331 not that I know of

2022 and would be still a good feature

Hi @luiza-avelino, I actually had to go a different direction in order to meet my requirements. I began to implement these changes, but it turned into almost a whole rewrite of the Line Graph. So I reevaluated and ended up writing a custom Line Graph on top of d3.
@Hermanya I didn't want to offend or compete with RN Chart Kit, but I do have this code almost polished enough to open source. We can collaborate or I can simply release it as a healthy competition option (it's strictly a Line Graph, not a whole chart suite). But it would essentially be a complete replacement of what you have. Trying to shoehorn d3 into the existing code was too big of a change to introduce incrementally. Let me know your thoughts.

Is there any chance you could make this publicly available?

August 2023 and would still be a great feature

January 2024 and would still be a great feature


Add the file Guessing_number_Game

Have you read the Contributing Guidelines on Pull Requests?
(Write your answer here.)
Description
(Write your answer here.)
Checklist

[x] I've read the contribution guidelines.
[ ] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Related Issues or Pull Requests
This is code related to #2620

"Games", "Calculators", "Scripts" don't come under the scope of NeoAlgo. Thanks for your contribution!


Resolve aliases while running svelte-kit package

Describe the problem
Aliases are currently not resolved when packaging since components are only preprocessed.
For example, importing $lib/css/shared.css from $lib/components/Component/SubComponent involves a lot of ../ without aliases. This is very brittle especially considering something like $lib/css/shared.css is something that might be shared across many components at different nested levels.
Describe the proposed solution
It would be helpful if svelte-kit resolved these aliases.
My proposal around Svelte files would be to create a built-in preprocessor that uses plugin-alias since this is already svelte-kit dependency.
It's not immediately clear what the approach to resolving aliases in js files should be because svelte-kit currently avoids any bundling and just copies them. I haven't used Typescript, so I don't know that tsc aliases are compatible with plugin-alias.
Alternatives considered
Not using aliases in any files that will be packaged (my current approach).
Importance
would make my life easier
Additional Information
No response

Since TS does not do the resolving itself, we have to implement/add it ourselves somehow.
Options:

use https://www.npmjs.com/package/tsconfig-paths somehow. This would read the paths from the tsconfig and resolve them. This would add another dependency required to install (~90kb). This would also be somewhat inconsistent because it would deal with aliases by reading the tsconfig, not by reading the Vite config.
access the resolve.alias config of Vite to get the aliases. When preprocessing TS, it might be possible to write a transformer which will resolve these. When not preprocessing Svelte, I'm not sure how to do this other than either also running it through TS or with a hacky regexp.

I wasn't super happy with the potential workaround of removing all the $lib/ imports so wrote a little script to rewrite these imports in the packaged code.  I thought I would share this in case anyone else finds it useful while waiting for svelte-kit package to become less experimental/new: https://github.com/6eDesign/svelte-calendar/blob/master/scripts/postpackage.js
I'm running this as a postpackage npm script (where a package script simply invokes svelte-kit package).  If you are using a non-default output directory (something other than package/) you can specify that folder when invoking the script, eg: PACKAGE_FOLDER=my-package-folder node scripts/postpackage
I will note that I ran into other issues beyond transforming the $lib imports.  My approach to exporting components is to create an index.js file which package.main points to that exports an object containing all components I want to expose (ex: https://github.com/6eDesign/svelte-calendar/blob/master/index.js)
The problem I ran into is that this file gets transformed into an index.d.ts file and updating package.main to point to this new ts file does not seem to work correctly (components won't load in REPL/elsewhere).  I didn't dig too much into this and instead opted to rename the index.d.ts file back to index.js which is working well for me right now.

This sounds unrelated. Anyway: the d.ts file is a type definition file which has no runtime equivalent. The index.js should live next to it (it should get copied across automatically) and main should point to that js file.

I understand that may have been the intention of the d.ts file but when I run svelte-kit package the d.ts file is a verbatim copy of the index.js file and the index.js file does not live alongside it in the package/ directory.   You can try this for yourself in the linked repository above.

The index.js issue is unrelated. I looked at the repository, and the index.js is defined at the root of the repo, but it should be at src/lib, the root of your library. If you put it there (and update the imports accordingly), the index.js and the generated index.d.ts should end up in the packaging build output folder.

The $lib alias (no others currently) is now resolved with the caveat that it's a regexp-based string-replacement, so there might be false positives.

Thanks @dummdidumm, that works very well!

When I try to import something from src/lib/index.ts using just $lib:
import { foo } from '$lib';

path does not resolve. I need to explicitly write:
import { foo } from '$lib/index';

So, such thing
    import { foo } from '$lib/index';
    import { bar } from '$lib';

results to that:
    import { foo } from '../../index'; // correct
    import { bar } from '$lib';        // incorrect

Is it working for no $lib aliases, for example with something like $clib? I'm currently trying with this, but when I run the package command, all $clib mentions are not being replaced

Not currently which is why this issue is still open

Not currently which is why this issue is still open

Thank you! Do you know if there is any hack to allow this for now?

Thanks to @BeeMargarida this now works with all aliases set through kit.alias . Since this is now its own package, the question is whether or not we regard this as completely solved, or if we should also try to read the vite config and resolve aliases from there, if a svelte.config.js is not present, or (because that's likely very cumbersome) we should make our lives easier by introducing a config option similar to kit.alias inside the package options.
Either way, this has low priority since in the vast majority of cases you probably use it together with SvelteKit.

we should make our lives easier by introducing a config option similar to kit.alias inside the package options. Either way, this has low priority since in the vast majority of cases you probably use it together with SvelteKit.

Hi! I could implement this as well. Regarding the kit.alias inside the package options, these ones always take priority over the ones in svelte.config, if both are present?

In general the package options take priority over the kit options.
I'd be awesome if you implement this, but I fear it either brings some complexity with it or people are confused that they have to configure aliases in multiple places. Right now @sveltejs/package is independent of Vite, so we

either need to connect it to Vite somehow, which brings complexity into the package
or keep it indepent, so package.alias would only be concerned with resolving the aliases while bundling, and not make them available as tsconfig paths and/or Vite aliases. This would be easy to implement but might fall short of expectations

I'm not sure what's the best forward, so I would like to gather feedback first how people really use @sveltejs/package and if it's even worth it to add such a feature, given that probably 90% of users will use it in conjunction with SvelteKit, where everything works as expected thanks to you already.

Closing this since it was implemented in https://github.com/sveltejs/kit/pull/6350. If folks want to specify aliases in the config elsewhere such as package.alias, vite.alias, or alias because they're using the package command without using SvelteKit then that's something we could consider as a separate feature request


Crashes if motion regressors are used

I just downloaded nidmfsl from pip and tried to export a 1st level result feat directory.  I got the following error, which, based on the last line, I assume is due to the use of 24 motion parameters (number of columns in the design matrix (34) is not equal to number of regressor names (10))
For what its worth, if you check design.fsf
set fmri(motionevs) 2

seems to flag 24 motion EV's (what I used), while a value of 1 is probably just 6 motion regressors.  More challenging, if
set fmri(scriptevsbeta) ""

is not empty, an arbitary script is called, and then a whole slew (an undetermined number) of motion regressors will be added.
Can maybe this state be gracefully accommodated... i.e. if we don't know the regressor name we simply give it a default name, like "Regressor_%03d" or something?
(py35) nidmfsl /Volumes/BlueData/ChemoBrain/RESULTS/FSL/LEVEL1/sub-CB01-NBack.feat
Exporting NIDM results from /Volumes/BlueData/ChemoBrain/RESULTS/FSL/LEVEL1/sub-CB01-NBack.feat
(186, 34)
['Inst', 'Inst*temporal_derivative', '0back', '0back*temporal_derivative', '1back', '1back*temporal_derivative', '2back', '2back*temporal_derivative', '3back', '3back*temporal_derivative']
Traceback (most recent call last):
  File "/Users/nichols/anaconda2/envs/py35/bin/nidmfsl", line 46, in <module>
    fslnidm.parse()
  File "/Users/nichols/anaconda2/envs/py35/lib/python3.5/site-packages/nidmfsl/fsl_exporter/fsl_exporter.py", line 143, in parse
    super(FSLtoNIDMExporter, self).parse()
  File "/Users/nichols/anaconda2/envs/py35/lib/python3.5/site-packages/nidmresults/exporter.py", line 97, in parse
    self.model_fittings = self._find_model_fitting()
  File "/Users/nichols/anaconda2/envs/py35/lib/python3.5/site-packages/nidmfsl/fsl_exporter/fsl_exporter.py", line 185, in _find_model_fitting
    design_matrix = self._get_design_matrix(analysis_dir)
  File "/Users/nichols/anaconda2/envs/py35/lib/python3.5/site-packages/nidmfsl/fsl_exporter/fsl_exporter.py", line 726, in _get_design_matrix
    str(len(real_ev)) + ')')
Exception: Inconsistency: number of columns in the design matrix (34) is not equal to number of regressor names (10)

@cmaumet BTW, if there is a quick hack / temporary solution for this, I'd be grateful... I actually just wanted to get a bunch of 1st level results into MNI space quick... and isn't that something that nidmfsl (or Tom's SPM viewer?) does?  If not, no worries.

@nicholst: thank you for catching this! This is indeed a bug. None of the designs in our current test data for FSL includes motion regressors which is why this has not been caught earlier (by the exporter or the viewer).
The error that is raised was added as a sanity check and I think it's good to keep it so that we can identify cases where we did not correctly generate the regressor names (rather than failing silently).
Would it be fine if I release a patched version later this week? We might also want to add test data corresponding to this use case.

Sure, later this week is fine.
Making a test is easy... it comes from this drop-down menu...

Would you add the corresponding test data in https://github.com/incf-nidash/nidmresults-examples? All our examples are run on buster.

Test data with motion regressors is now available in nidmresults-examples (cf. https://github.com/incf-nidash/nidmresults-examples/pull/100).

This issue is fixed by #110.


Try xunit retry

Check this out @Meir017
It doesn't support Theory so if we get hiccups in theories I would migrate them to facts.

looks really promising 👍