Transparent gzip not working

okhttp doesn't transparently ungzip reponse, and I didn't manually add "Accept-Encoding" with value "gzip", as suggested here: https://github.com/square/okhttp/issues/2132#issuecomment-169500736
My response/request looks like this
REQUEST:
Request URL:XXXXX
Request Method:GET
Status Code:200 OK
Provisional headers are shown
Accept-Encoding:gzip
Authorization:Token token=XXXXX
Connection:Keep-Alive
Host:XXXXX
User-Agent:okhttp/4.2.2
RESPONSE:
Cache-Control:max-age=0, private, must-revalidate
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/plain; charset=utf-8
Date:Sat, 21 Dec 2019 14:02:51 GMT
ETag:W/"eb678bc2878357cc263335b7b5204006"
Server:nginx
Transfer-Encoding:chunked
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-Powered-By:cloud66
X-Request-Id:f340d09a-4fab-4905-b6c7-eeffc93fe30c
X-Runtime:7.171759
X-XSS-Protection:1; mode=block
Note that Accept-Encoding:gzip was added automatically, not by me. The only header I have specified is Authorization.
I have implemented manual ungzipping in the interceptor, and it works, but I'm wondering, why doesn't okhttp does ungzipping it on it's own?

Put a breakpoint on line 91 here? Also if you can provide an executable test case to reproduce the problem that would be rad.
https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/internal/http/BridgeInterceptor.kt#L91

@Hajzenberg please reopen with a test case if possible.


fixed sentence case issue (2)

Docs Build status updates of commit 5c10b28:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

mixed-reality-docs/comfort.md
:white_check_mark:Succeeded
View

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


Resolve Multi-Restore Deadlock

Resolves #6238
This PR gates initialization of a git repo behind a tiny task queue. We do this because if we don't, we run into the following situation:

The Java team runs tests truly in parallel. This means that multiple tests are attempting to load up the recordings for playback.
As multiple tests are attempting to load, there is no assets repo present, so we have to do a restore operation for each.
Our git invocations are already work-queued, so the actual restore action won't throw. This is because once the repo is git init-ed, git checkout can be fired multiple times without error, as attempting to check out the same tag is an errorless action.

Given all the above context, we are wrapping the whole Init function that checks/initializes each assets repo slice (per assets.json that is being restored) in an additional work queue. This will mean that two parallel requests that are triggering restore will WAIT for whichever one starts first to finish. After we are past the init speedbump, the restore can run at their leisure.
FYI @samvaity thank you for the report. When I ship a new version of the proxy, I'll ensure that I remove the restore calls that I inserted into your pipeline.

/azp run tools - test-proxy - tests


Edit token allocation V2 Project Page

What does this PR do and why?
Add support the Edit token allocation on project view.
closes https://github.com/jbx-protocol/juice-interface/issues/786
Screenshots or screen recordings
If applicable, provide screenshots or screen recordings to demonstrate the
changes.
Acceptance checklist

[ ] I have evaluated the
Approval Guidelines
for this PR.
[ ] I have tested this PR in
all supported browsers.
[ ] I have tested this PR in dark mode and light mode (if applicable).

COuld I get a review on this one when you have a chance @aeolianeth - I promise its not as bad as it seems 🙏

@wraeth-eth rebasing real quick!

@wraeth-eth , thanks for making the changes! Merging


Fixed issue with encoding being required parameter

encoding is an optional parameter and the initiator did not reflect that.

@NathanFlurry can you fix the merge conflicts here? we definitely need this!

@tannernelson I'll take a look at it.

I think this changed was eventually merged in some other PR, I'm going to close this one. Thanks for this @NathanFlurry


Failed to send payload with guzzlehttp/guzzle >6.0.0

After running compose update guzzlehttp/guzzle package got updated to 6.0.1 and effectively broke sending messages. I fixed it by fixing it at version 5.3.0 in my composer.json.
I don't know what has changed in guzzle package but you have to restrict it to version below 6.0.0 or make it compatible with new version.

it looks like more than just that broke. Even downgrading to 5.3.0 doesn't send attachments anymore.

so I was able to get GuzzleHttp 6 working as well as attachments with a simple hack, although it will probably need further refinement for production.
in CL/Slack/Transport/ApiClient.php make the following changes
    private function createRequest($method, array $payload)
    {
    	$payload['attachments'] = json_encode($payload['attachments']);

    	$request = $this->client->createRequest('POST', self::API_BASE_URL.$method, [], $payload);

        return $request;
    }

I tried this one but it failed.
Any news on this issue?

@Zxurian @yaK2manD I'm sorry about the late reply, I have merged a PR that should fix this moments ago: https://github.com/cleentfaar/slack/pull/14
I haven't released a new version yet (still catching up on all the issues) but you can use the master version to try it out.

I don't think that fixes the guzzle issue by the way, I'm working on a fix asap

Guzzle has been upgraded to v6 in the latest release (0.17.1) so I think this issue can be closed. Let me know if it didn't fix your problem and I will reopen this issue.


Operator 0.0.1 release!

Here's a first release with Apicurio studio operator implemented using the Quarkus Java Operator SDK flavour 😉
The operator is managing a signe ApicurioStudio resource. The minimalistic version of this CR is very simple:
apiVersion: studio.apicur.io/v1alpha1
kind: ApicurioStudio
metadata:
  name: apicurio-sample
spec:
  name: apicurio-sample

It will deploy everything needed for running the studio.
External dependencies like Keycloak and Database can be configured or excluded from the install if you want to reuse existing instances. Fox example:
apiVersion: studio.apicur.io/v1alpha1
kind: ApicurioStudio
metadata:
  name: apicurio-sample
spec:
  name: apicurio-sample
  keycloak:
    install: false
    realm: apicurio
    url: <my-kyecloak-url>
  database:
    database: apicuriodb
    install: false
    driver: postgresql
    type: postgresql9
    url: <my-database-host-and-port>
  features:
    asyncAPI: true
    graphQL: true
    microcks:
      apiUrl: https://microcks-microcks.apps.cluster-0f5f.0f5f.sandbox1056.opentlc.com/api
      clientId: microcks-serviceaccount
      clientSecret: ab54d329-e435-41ae-a900-ec6b3fe15c54

Awesome thank you!!


deny unreachable pub

Description of change
This PR enables the deny tag for unreachable_pub, and fixes the visibility.
Links to any relevant issues
Closes #65
Type of change
Choose a type of change, and delete any options that are not relevant.

Enhancement (a non-breaking change which adds functionality)

No point going too much into details but maybe put something generic about visibility in the changelog

Since all the types were already unreachable, it's not actually a breaking change. Still want it?


Replaces ParcelableCrdtException with a proto

This PR is paired with cl/309127410

I got a build error:
ERROR: /usr/local/google/home/ianchang/workspace/arcs/java/arcs/android/storage/service/BUILD:8:1: Android IDL generation failed (Exit 1) aidl_binary failed: error executing command bazel-out/host/bin/external/androidsdk/aidl_binary -b -Ijava/arcs/android/storage/service -pexternal/androidsdk/platforms/android-29/framework.aidl ... (remaining 2 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
ERROR: arcs.android.storage.service.IResultCallback: couldn't find import for class arcs.android.storage.service.IResultCallback
Seems we removed arcs.android.storage.service.IResultCallback causing it.

I saw that too, I thought I fixed it by removing some unnecessary imports. Maybe try bazel clean --expunge and see if that fixes it?

Neither clean --expunge nor delete .cache/bazel can help.
https://github.com/PolymerLabs/arcs/pull/5241 does the trick for me.
I still don't get it why this PR started to cause the error at my local. :(


helloworld-servlet version for Java 1.7

Cloud Shell is currently using Java 1.7 by default. This PR modifies the pom.xml file with compatible versions of compiler.* and jetty plugin.

Thanks, but we want to recommend App Engine standard for Java 7 and App Engine flexible for Java 8. I'll update the tutorial to change the Java version before compiling. (Unless @shun-fan already has?)


Epic 1705: Make attendees counterparts a regular search

Right now the attendees widget of a report also has a counterparts list, which is the list of counterparts for the current user. This doesn't use a specific search query, but just uses
this.props.currentUser.position.associatedPositions
                .filter(ap => ap.person)
                .map(ap => ap.person)

It would be nicer if we could use a search query for it, as that way the widget would get simplified and the pagination would also work directly (right now it is not working for this list).
This is part of epic #1705

If pagination is an issue (not sure how many counterparts any single position has), then it would not be too difficult to add pagination support to a static list in the advanced select (just call a method that slices the list based on pageNum and pageSize).
Also, right now the counterparts are readily available (no query needed, they are loaded when the app starts); building a search to get them is a lot of work.

Not only the pagination, it should also be able to filter them (for now at least by what is filled in the input field).


Added fail statements to notify user that dm_ options are ignored unl…

…ess storage_driver is set to 'devicemapper'

Had to add all the dm_ variables to service.pp for correct scoping in puppet v.4.x

Thanks, I've merged this manually as it clashed with something else in master. Thanks again.


Updated link for Windows OpenOCD download

Hello, I just got started with the book on my Windows machine. The old OpenOCD link leads to something broken and deprecated. I found the following link much more useful in getting OpenOCD installed:
https://gnutoolchains.com/arm-eabi/openocd/

I also stumbled on that deprecated link.
I used the openocd-xpack : https://github.com/xpack-dev-tools/openocd-xpack
It seems to work well, although it's installed pretty deep in AppData<EMAIL_ADDRESS>


Rainbird RC2 controller with build in wifi module

Hi. i am trying to run the example script and i get errors, not sure if this is connected to authentication or the RC2 is not supported.

pi@HOME:~/pyrainbird/examples $ ./rainbird_tool.py --log-level debug get_wifi_params
Traceback (most recent call last):
  File "/home/pi/pyrainbird/examples/./rainbird_tool.py", line 109, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/pi/pyrainbird/examples/./rainbird_tool.py", line 93, in main
    host = os.environ["RAINBIRD_SERVER"]
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'RAINBIRD_SERVER'

eh sorry, forgot to export te variables


How send request get with params ?

I have a request get with format http://<IP_ADDRESS>:1337/api/classes/Place?where={"category":{"$inQuery":{"where":{"objectId":"GPZPzdsk0I"},"className":"Category"}},"coordinate":{"$nearSphere":{"__type":"GeoPoint","latitude":20.286312208425457,"longitude":106.30682822629947}, "$maxDistanceInKilometers": 15.0 }}&include=category,user
and test api on post man is ok as I convert to params in swift is can not get.I think url encoding not right. You can help me ?

Hey @ngocdtph03070,
Could you provide the part of the code where you build the request so I can check it out ?
Cheers,

@s4cha  Yes , Thank for reply
This code
var parameters = String:Any
let nearSphere = ["$nearSphere":
["__type":"GeoPoint","latitude":location.latitude,"longitude": location.longitude], "$maxDistanceInKilometers": 1.0 ] as [String : Any]
parameters = ["where":["coordinate":nearSphere]]
        return API.get("classes/Place",params:parameters)

the param string generated by ws is
?include=category%2Cuser&where%5Bcoordinate%5D%5B%24maxDistanceInKilometers%5D=1&where%5Bcoordinate%5D%5B%24nearSphere%5D%5B__type%5D=GeoPoint&where%5Bcoordinate%5D%5B%24nearSphere%5D%5Blatitude%5D=20.28631220842546&where%5Bcoordinate%5D%5B%24nearSphere%5D%5Blongitude%5D=106.3068282262995
which is
?include=category,user&where[coordinate][$maxDistanceInKilometers]=1&where[coordinate][$nearSphere][__type]=GeoPoint&where[coordinate][$nearSphere][latitude]=20.28631220842546&where[coordinate][$nearSphere][longitude]=106.3068282262995
whereas the one you pasted above generates
?where={%22category%22:{%22$inQuery%22:{%22where%22:{%22objectId%22:%22GPZPzdsk0I%22},%22className%22:%22Category%22}},%22coordinate%22:{%22$nearSphere%22:{%22__type%22:%22GeoPoint%22,%22latitude%22:20.286312208425457,%22longitude%22:106.30682822629947},%20%22$maxDistanceInKilometers%22:%2015.0%20}}&include=category,user
which should be
?where={"category":{"$inQuery":{"where":{"objectId":"GPZPzdsk0I"},"className":"Category"}},"coordinate":{"$nearSphere":{"__type":"GeoPoint","latitude":20.286312208425457,"longitude":106.30682822629947}, "$maxDistanceInKilometers": 15.0 }}&include=category,user
This is indeed an encoding issue.
The dictionary is not automatically translated into JSON, which is normal, I guess.
Something like this would produce the desired output

func test() -> Promise<JSON> {
    let categoryJson = "{\"category\":{\"$inQuery\":{\"where\":{\"objectId\":\"GPZPzdsk0I\"},\"className\":\"Category\"}},\"coordinate\":{\"$nearSphere\":{\"__type\":\"GeoPoint\",\"latitude\":20.286312208425457,\"longitude\":106.30682822629947}, \"$maxDistanceInKilometers\": 15.0 }}"
    return ws.get("/classes/Place", params:[
        "where": categoryJson,
        "include":"category,user"])
}

There is no helper method on our side at the moment to transform a  [String:Any] into a JSON string, because we never had the case. This surely looks like something we'd like to add to our roadmap though :)
Cheers,

Maybe this can help as well since we're using alamofire under the hood
https://github.com/Alamofire/Alamofire/issues/374

@s4cha  Thank you I try code for format and talk for you :)

@ngocdtph03070 What technology are you using on the backend side ? I am curious :)

@s4cha  i used parse server platform but i want rest api not use sdk

Ahh cool! thanks for the info :)

@s4cha  thank you for framework it is good .

@ngocdtph03070 I guess you already have a helper but here is a way to avoid having to hardcode and escape the JSON string ourselves.
func dictionaryToJSONString(_ d:[String : Any]) -> String {
    if let data = try? JSONSerialization.data(withJSONObject: d), let s = String(data: data, encoding: String.Encoding.utf8) {
        return  s
    } else {
        return ""
    }
}

For a given JSON structure
{
    "category": {
        "$inQuery": {
            "where": {
                "objectId": "GPZPzdsk0I"
            },
            "className": "Category"
        }
    },
    "coordinate": {
        "$nearSphere": {
            "__type": "GeoPoint",
            "latitude": 20.286312208425457,
            "longitude":<PHONE_NUMBER>2629947
        },
        "$maxDistanceInKilometers": 15.0
    }
}

Write it as a native dictionary and use helper method to get back the JSON string
func test() -> Promise<Void> {
    let dic:[String : Any] = [
        "category": [
            "$inQuery": [
                "where": [
                    "objectId" : "GPZPzdsk0I"
                ],
                "className" : "Category"
            ]
        ],
        "coordinate" : [
            "$nearSphere": [
                "__type": "GeoPoint",
                "latitude": 20.286312208425457,
                "longitude":<PHONE_NUMBER>2629947
            ],
            "$maxDistanceInKilometers": 15.0
        ]
    ]
    let jsonString = dictionaryToJSONString(dic)
    return ws.get("/api/classes/Place",
                  params:["where" : jsonString,
                          "include": "category,user"])
}

Let me know what you think,
Have an awesome day !

Yes it good instead of fix string json func convert dictionnary to string json Thank you

I think ws framework should support http request param body

We are very open to suggestions, could you elaborate on how the api would look like ?

As Parse server when i rest api in case post data success with httpBody raw format json . else if rest api as send params receive status code success but data param not insert to database @s4cha


Art-Peace : Indexer & Backend

Description

[ ] Test Art-peace backend in /backend/indexer indexer with Webhook
[ ] Update the readme to deploy easily the indexer in Railway like others indexer script
[ ] Check if the webhook correctly update the backend endpoint: /consume-indexer-msg
[]  Test the frontend in /apps/pwa
[] Check all endpoint are working: /place-pixel for example never receive the jsonBody

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Kindly assigned as discussed @MSghais
ETA: <24hrs


diva_agg model not found

but in early stop
9  24  0  15  0  0  0  0  1  134  0
early stop counter:  54
epoch: 53  now:  2023-03-03 22:21:35.808139 epoch time:  0:00:01.150943 used:  0:01:00.892810 model:  mnistcolor
10_te_rgb_31_119_180_rgb_255_127_14_rgb_44_160_44_diva_ba561c7b_2023md_03md_03_22_20_33_seed_0
^CTraceback (most recent call last):
  File "/home/sunxd/DomainLab/main_out.py", line 9, in <module>

```by running

`python main_out.py --te_d 0 1 2 --tr_d 3 7 --task=mnistcolor10 --aname=diva --nname=conv_bn_pool_2 --nname_dom=conv_bn_pool_2 --gamma_y=7e5 --gamma_d=1e5 --epos=100 --lr=1e-5
`

early stop trigger
Experiment finished at epoch: 10 with time: 0:00:11.630952 at 2023-03-03 23:18:37.218711
Traceback (most recent call last):
File "/home/sunxd/DomainLab/main_out.py", line 9, in
exp.execute()
File "/home/sunxd/DomainLab/domainlab/compos/exp/exp_main.py", line 66, in execute
self.trainer.post_tr()
File "/home/sunxd/DomainLab/domainlab/algos/trainers/a_trainer.py", line 58, in post_tr
self.observer.after_all()
File "/home/sunxd/DomainLab/domainlab/algos/observers/c_obvisitor_cleanup.py", line 12, in after_all
self.observer.after_all()
File "/home/sunxd/DomainLab/domainlab/algos/observers/b_obvisitor.py", line 60, in after_all
model_ld = self.exp.visitor.load()
File "/home/sunxd/DomainLab/domainlab/compos/exp/exp_utils.py", line 98, in load
model.load_state_dict(torch.load(path, map_location="cpu"))
File "/home/sunxd/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/sunxd/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/home/sunxd/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'zoutput/saved_models/mnistcolor10_te_rgb_31_119_180_rgb_255_127_14_rgb_44_160_44_diva_b9e1cbef_2023md_03md_03_23_18_24_seed_0.model'

Codecov Report

Merging #161 (27a0917) into master (ed190df) will decrease coverage by 0.14%.
The diff coverage is 77.77%.

@@            Coverage Diff             @@
##           master     #161      +/-   ##
==========================================
- Coverage   94.88%   94.74%   -0.14%
==========================================
  Files         113      113
  Lines        3770     3788      +18
==========================================
+ Hits         3577     3589      +12
- Misses        193      199       +6

Flag
Coverage Δ

unittests
94.74% <77.77%> (-0.14%)
:arrow_down:

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

Impacted Files
Coverage Δ

domainlab/compos/vae/compos/decoder_losses.py
100.00% <ø> (ø)

domainlab/algos/observers/b_obvisitor.py
89.74% <50.00%> (-7.40%)
:arrow_down:

domainlab/algos/msels/c_msel.py
100.00% <100.00%> (ø)

domainlab/algos/trainers/train_basic.py
100.00% <100.00%> (ø)

domainlab/compos/exp/exp_utils.py
99.11% <100.00%> (ø)

domainlab/models/model_diva.py
97.72% <100.00%> (+0.22%)
:arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


the namenode 1 pod is in pending state

Am I the only one who has problems with ports? If so, could you please help me figure out what's wrong with my setup? I am trying to install the chart by running the following command: helm install k8s-hdfs charts/hdfs-k8s --set global.hostNetworkEnabled=false --set global.defaultAffinityEnabled=false.
All the pods are successfully launched except for the namenode 1:
PS C:\Users\epifanov998\Documents\kubernetes-HDFS-master\kubernetes-HDFS-master> kubectl get pod -l release=k8s-hdfs
NAME                               READY   STATUS    RESTARTS   AGE
k8s-hdfs-client-7ff4d6bdc5-knz6m   1/1     Running   0          51m
k8s-hdfs-datanode-52drd            1/1     Running   1          51m
k8s-hdfs-journalnode-0             1/1     Running   0          51m
k8s-hdfs-journalnode-1             1/1     Running   0          51m
k8s-hdfs-journalnode-2             1/1     Running   0          51m
k8s-hdfs-namenode-0                1/1     Running   5          51m
k8s-hdfs-namenode-1                0/1     Pending   0          51m
k8s-hdfs-zookeeper-0               1/1     Running   1          51m
k8s-hdfs-zookeeper-1               1/1     Running   1          51m
k8s-hdfs-zookeeper-2               1/1     Running   0          49m

Here's what I get when I try to describe this pod:
PS C:\Users\epifanov998\Documents\kubernetes-HDFS-master\kubernetes-HDFS-master> kubectl describe pod k8s-hdfs-namenode-1
Name:           k8s-hdfs-namenode-1
Namespace:      default
Priority:       0
Node:           <none>
Labels:         app=hdfs-namenode
                controller-revision-hash=k8s-hdfs-namenode-59458bff4f
                release=k8s-hdfs
                statefulset.kubernetes.io/pod-name=k8s-hdfs-namenode-1
Annotations:    <none>
Status:         Pending
IP:
IPs:            <none>
Controlled By:  StatefulSet/k8s-hdfs-namenode
Containers:
  hdfs-namenode:
    Image:       uhopper/hadoop-namenode:2.7.2
    Ports:       8020/TCP, 50070/TCP
    Host Ports:  8020/TCP, 50070/TCP
    Command:
      /bin/sh
      -c
    Args:
      /entrypoint.sh "/nn-scripts/format-and-run.sh"
    Environment:
      HADOOP_CUSTOM_CONF_DIR:  /etc/hadoop-custom-conf
      MULTIHOMED_NETWORK:      0
      MY_POD:                  k8s-hdfs-namenode-1 (v1:metadata.name)
      NAMENODE_POD_0:          k8s-hdfs-namenode-0
      NAMENODE_POD_1:          k8s-hdfs-namenode-1
    Mounts:
      /etc/hadoop-custom-conf from hdfs-config (ro)
      /hadoop/dfs/name from metadatadir (rw,path="name")
      /nn-scripts from nn-scripts (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-qfmsh (ro)
Conditions:
  Type           Status
  PodScheduled   False
Volumes:
  metadatadir:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  metadatadir-k8s-hdfs-namenode-1
    ReadOnly:   false
  nn-scripts:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      k8s-hdfs-namenode-scripts
    Optional:  false
  hdfs-config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      k8s-hdfs-config
    Optional:  false
  default-token-qfmsh:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-qfmsh
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason            Age        From               Message
  ----     ------            ----       ----               -------
  Warning  FailedScheduling  <unknown>  default-scheduler  0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports.
  Warning  FailedScheduling  <unknown>  default-scheduler  0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports.

You probably have a local port clashing with HDFS since the charts use host networking.

The problem was with a forked repository, I close the issue, thanks


tensorflow/core/public/session.h Reset is not work?

This template is for miscellaneous issues not covered by the other issue categories.
For questions on how to work with TensorFlow, or support for problems that are not verified bugs in TensorFlow, please go to StackOverflow.
If you are reporting a vulnerability, please use the dedicated reporting process.
For high-level discussions about TensorFlow, please post to<EMAIL_ADDRESS>for questions about the development or internal workings of TensorFlow, or if you would like to know how to contribute to TensorFlow, please post to<EMAIL_ADDRESS>

@lyfpeter
Request you to fill issue template..
Please, share colab ink or simple standalone code to reproduce the issue in our environment.It helps us in localizing the issue faster.Thanks!

Nothing useful provided in the template.


Loss of control and logout issue

Prerequisites

[ X ] Put an X between the brackets on this line if you have done all of the following:

Checked that your issue isn't already filed: https://github.com/GetStream/Winds/issues

Description
Closing window whilst episode playing, podcast continues to play. When relaunching player, podcast continues to play, but I am logged out and can't stop the podcast from playing and autoplaying all other episodes.
Steps to Reproduce

[First Step] Play a podcast
[Second Step] Close window
[and so on...] relaunch player

Expected behavior: [What you expect to happen] I would expect to be back into winds with control over what plays
Actual behavior: [What actually happens] I am logged out and can't control what is playing through speakers
Reproduces how often: [What percentage of the time does it reproduce?] every time in my experience
Versions
You can get this information from the manu. Winds > About Winds.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.

@Edeard95 What version are you using and in which OS?

Hi,
Version 3.1.10
On Ubuntu 18.04
On Fri, 8 Mar 2019, 4:09 pm Amin Mahboubi<EMAIL_ADDRESS>wrote:

@Edeard95 https://github.com/Edeard95 What version are you using and in
which OS?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GetStream/Winds/issues/577#issuecomment-470982362,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ApH3h7e7I3t5J5cat2o30rQJy0-hIlzoks5vUotUgaJpZM4blP3G
.

I am facing the same issue.
Steps to Reproduce
[x] Play a podcast
[x] Close window
[x] relaunch player
Expected behavior: [>>] I would expect to be back into winds with control over what plays
Actual behavior: [>>] I am logged out and can't control what is playing through speakers
Reproduces how often: [All the time] every time in my experience
I'm on Ubuntu 18.10
Winds v 3.1.10 via snap

Update: v 3.1.11 has fixed my issue. What about yours? @Edeard95

I am having this same problem under Windows 10 using v 3.1.11


feat(fabric): change or add ImagePullPolicy to be IfNotPresent

Refer #1881 for description and acceptance criteria

I'll take this issue


chore: bump LLVM version / Win CI fix

No compile errors but a segfault. :( Guess a quick LLVM bump to fix Windows CI is not in the cards.


wwApi missing

Hi Rick:
In the Processes.prg example, wwApi is missing and throw a "wwApi.prg file not found" error
wconnect.h is also missing
Thanks.-

Added to samples.


Submit PR?
I couldn't find the source for this codelab to fix the error. Is this tutorial obsolete or has it been updated for TensorFlow 2.0?
The issue has also been reported here.

@cseas : Can you please help us to know the origin of this link. Is it directed somewhere from TensorFlow official website ? Thanks!

I'm not sure about the TenforFlow website, but the CodeLab link is referenced here:
https://www.youtube.com/watch?v=cSKfRcEDGUs
The video mentions the link to the CodeLab:
https://goo.gl/QTwZ3v
I can now see that this CodeLab has been deprecated and an alternate TF 2.0 Notebook has been provided for the same. However, I feel that the original link is more intuitive and explains the process in a more beginner-friendly way. The original article should be re-written to be TF 2.0 compatible instead of just providing a Colab Notebook with minimal text-based explanations.


Replace uses of pprint.pformat for _lazy_pformat in logging

Closes https://github.com/numba/numba/issues/9714.
Replaces uses of pprint.pformat to reduce logging overhead in compilation time. Issue has more details.

@srilman looks reasonable, some minor test failures related to testing and formatting need to be fixed.

PR is ready once suggestion in https://github.com/numba/numba/pull/9715#pullrequestreview-2277695510 is addressed.

@srilman I've updated this to "Waiting on Reviewer" -- waiting for final signoff by @sklam


Automatic import of custom components

Currently, using a custom component involves importing that component into each markdown page separately, like so:
<script>
   import MyComponent from '$lib/MyComponent.svelte'
</script>

It would be nice if any components in the components directory were automatically imported into any markdown page, so we can remove the step of importing each time.
I think this would make the process of creating and using custom components easier. Potential downside would be for large or slow components that people would prefer to only import on specific pages, but I have not seen this in practice before.

Additional criteria

incorporate into the component plugin system by default (src/components auto imported as necessary)
handle namespace conflicts with third party plugins (warn, and prioritize local components)


【Program hangs with no output.】

I am conducting the  instruction tuning of llama3_llava using the script on my own dataset
NPROC_PER_NODE=${GPU_NUM} xtuner train llava_llama3_8b_instruct_full_clip_vit_large_p14_336_lora_e1_gpu8_finetune --deepspeed deepspeed_zero3_offload --seed 1024. After the following output, the program stops outputting but is still running:
 - mmengine - INFO - Iter(train) [   10/23076]  lr: 1.3034e-07  eta: 3 days, 3:30:35  time: 11.7851  data_time: 0.0298  memory: 15547  loss: nan
 - mmengine - INFO - Iter(train) [   20/23076]  lr: 2.7506e-07  eta: 3 days, 5:46:56  time: 12.5050  data_time: 0.0199  memory: 9964  loss: nan

This state has been ongoing for 2 hours. What could be the possible cause for this?

@Luo-Z13
The total number of iterations is a bit strange. Did you modify the settings in config?

@Luo-Z13 The total number of iterations is a bit strange. Did you modify the settings in config?

I use zero3 offload and adjust the batch size, my script:
NPROC_PER_NODE=${GPU_NUM} xtuner train llava_llama3_8b_instruct_full_clip_vit_large_p14_336_lora_e1_gpu8_finetune \
                                       --deepspeed deepspeed_zero3_offload --seed 1024

The training schedule:
# Scheduler & Optimizer
batch_size = 4  # per_device
accumulative_counts = 4
dataloader_num_workers = 4
max_epochs = 1
optim_type = AdamW
lr = 1e-5
betas = (0.9, 0.999)
weight_decay = 0
max_norm = 1  # grad clip
warmup_ratio = 0.03

Then, I modify the save_steps, and change other parts about the paths to my own data or local paths. Besides that, there were no other changes.

@Luo-Z13
How many GPUs are you using for training?

@Luo-Z13 How many GPUs are you using for training?

I use 4*A100(40G)

@Luo-Z13 How many GPUs are you using for training?

And the pre-training of LLaVA-llama3 is OK.

@Luo-Z13
Under your configuration, the total dataset size is 4 * 4 * 23076 = 369216. However, the correct size of llava fine-tuning dataset is ~650000. Therefore, this mismatch size seems a bit unusual. Have you modified the training data?

@Luo-Z13
Under your configuration, the total dataset size is 4 * 4 * 23076 = 369216. However, the correct size of llava fine-tuning dataset is ~650000. This mismatch size seems a bit unusual. Have you modified the training data?

Hello, I'm using my own instruction-tuning data, so the total number of iterations is different. Do I need to check the format of my dataset?

@Luo-Z13
Yes, that's possible. I suggest comparing your data format and content with llava's to see if the issue lies within the data.
Additionally, here are some other suggestions:

Keep the global batch size at 128. In your case, consider setting the accumulative_counts to 8.
Adjust the learning rate to 2e-5. (Of course, 1e-5 should also work fine.)

@Luo-Z13
Yes, that's possible. I suggest comparing your data format and content with llava's to see if the issue lies within the data.
Additionally, here are some other suggestions:

Keep the global batch size at 128. In your case, consider setting the accumulative_counts to 8.
Adjust the learning rate to 2e-5. (Of course, 1e-5 should also work fine.)

Thank you very much, I will try them.

@Luo-Z13
Yes, that's possible. I suggest comparing your data format and content with llava's to see if the issue lies within the data.
Additionally, here are some other suggestions:

Keep the global batch size at 128. In your case, consider setting the accumulative_counts to 8.
Adjust the learning rate to 2e-5. (Of course, 1e-5 should also work fine.)

Thank you for your suggestions. The loss is now normal, but there is a new problem: after training a few batches, the iteration speed becomes very slow, as shown:
...
04/30 01:03:42 - mmengine - INFO - Iter(train) [  100/23072]  lr: 2.8656e-06  eta: 1 day, 13:54:11  time: 5.0159  data_time: 0.0117  memory: 9195  loss: 1.8088
04/30 01:04:31 - mmengine - INFO - Iter(train) [  110/23072]  lr: 3.1550e-06  eta: 1 day, 13:16:56  time: 4.8975  data_time: 0.0158  memory: 9167  loss: 1.3998
04/30 01:05:52 - mmengine - INFO - Iter(train) [  120/23072]  lr: 3.4444e-06  eta: 1 day, 14:26:13  time: 8.0493  data_time: 0.0101  memory: 9146  loss: 1.3203
04/30 01:06:42 - mmengine - INFO - Iter(train) [  130/23072]  lr: 3.7339e-06  eta: 1 day, 13:56:50  time: 5.0641  data_time: 0.0210  memory: 9125  loss: 1.2123
04/30 01:07:35 - mmengine - INFO - Iter(train) [  140/23072]  lr: 4.0233e-06  eta: 1 day, 13:37:29  time: 5.2818  data_time: 0.0184  memory: 9104  loss: 1.0494
04/30 03:07:10 - mmengine - INFO - Iter(train) [  150/23072]  lr: 4.3127e-06  eta: 14 days, 3:40:15  time: 717.5106  data_time: 0.0726  memory: 9090  loss: 0.8822
04/30 03:42:26 - mmengine - INFO - Iter(train) [  160/23072]  lr: 4.6022e-06  eta: 16 days, 18:28:43  time: 211.6158  data_time: 0.1037  memory: 9069  loss: 0.8258
04/30 06:08:50 - mmengine - INFO - Iter(train) [  170/23072]  lr: 4.8916e-06  eta: 29 days, 11:20:41  time: 878.3878  data_time: 0.1637  memory: 9055  loss: 0.7201
04/30 09:23:10 - mmengine - INFO - Iter(train) [  180/23072]  lr: 5.1810e-06  eta: 44 days, 23:40:10  time: 1165.9963  data_time: 0.1712  memory: 9041  loss: 0.7931

What could be the cause of this?

@Luo-Z13
It seems to the fluctuations in machine performance. Can this issue be reliably reproduced and which commands you used?


Remove inverted axis example from docs

The current docs here include example code for plotting an inverted axis with kmf.
As per changelog this functionality was removed.

nice catch! Thanks @ian-whitestone


[ON HOLD] Add switch

I will keep this PR open until I finish the work over the Form/Field/etc. as this is related.

Thanks for the PR. :+1:
Will continue the work on master to finish this extensions.


Best way to integrate 3rd party elements

I was curious about this and found http://mithril.js.org/integration.html. While trying to find where it was linked from, I noticed there were no navigation links on the left so thought maybe this was older code.  Will this documentation still work with 1.0?
Disclaimer: I have yet to write any mithril code

@beatscode config has been removed on version mithril v1.0
The changelog http://mithril.js.org/change-log.html#config-function

// Called before the node is removed, but after onbeforeremove calls done()
onremove : function(vnode) { /.../ }

@lhorie this looks outdated if done() was removed from onbeforeremove  in favor of Promise returns.

Thank you all. I'm less confused now. @orbitbot For what it's worth I stumbled upon the integration page from a google search.

This points to a bug in the Mithril documentation publication workflow. Currently the method for documentation compilation is a script in this repo which generates HTML pages from the markdown files and puts these in a mithril folder outside of this repo. That folder is then git linked to the github pages branch of the mithril (no .js) repo.
The immediate solution is to ensure the script deletes old content before pasting. Ultimately, it would be good if we leveraged the mono repo nature of v1 to preform this in a less exotic way.
But a new integration page is definitely a good idea!


noti: 3.2.0 -> 3.3.0

Motivation for this change
Changelog: https://github.com/variadico/noti/releases/tag/3.3.0
Things done

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

[X] NixOS
[X] macOS
[ ] other Linux distributions

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

Notify maintainers
cc @

@GrahamcOfBorg build noti


where to draw

face mesh android  where to draw pot and line onview , i want to delete the ui

Duplicate https://github.com/google/mediapipe/issues/2403#issuecomment-897326635

Hi @zhoujingheng, You can use Android facemesh api source code now https://github.com/google/mediapipe/tree/master/mediapipe/examples/android/solutions.  Please refer this https://github.com/google/mediapipe/blob/master/mediapipe/examples/android/solutions/facemesh/src/main/java/com/google/mediapipe/examples/facemesh/FaceMeshResultGlRenderer.java class to explore and make changes as you need.


README for new Inspection samples should be in sync with other documentation

The current README for both the C# and JavaScript Inspection samples detail very basic steps regarding setting up the emulator debugging inspection.
These steps should be clarified and brought into sync with what we are saying elsewhere. For example we have a very useful description here:
https://github.com/microsoft/BotFramework-Emulator/blob/master/content/CHANNELS.md
We are also developing other documentation around this feature than should be referenced from this README.

This PR https://github.com/microsoft/BotBuilder-Samples/pull/1641 adds a link to @cwhitten README.

The content on Inspection Middleware is here: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-debug-inspection-middleware?view=azure-bot-service-4.0&tabs=csharp


jackett: 0.18.95 -> 0.18.98

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/Jackett/Jackett/releases.
meta.description for jackett is: "API Support for your favorite torrent trackers"
meta.homepage for jackett is: "https://github.com/Jackett/Jackett/"
meta.changelog for jackett is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

Warning: no invocation of /nix/store/yljydyi8lfxkvw68pml8k93rjnz6ishi-jackett-0.18.98/bin/Jackett had a zero exit code or showed the expected version

0 of 1 passed binary check by having a zero exit code.

0 of 1 passed binary check by having the new version present in output.

found 0.18.98 with grep in /nix/store/yljydyi8lfxkvw68pml8k93rjnz6ishi-jackett-0.18.98

found 0.18.98 in filename of file in /nix/store/yljydyi8lfxkvw68pml8k93rjnz6ishi-jackett-0.18.98

directory tree listing: https://gist.github.com/5cef085c0083faa698aa28c607b51a8d

du listing: https://gist.github.com/d4f27d996897a1af521cc795664a2575

Rebuild report (if merged into master) (click to expand)

4 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
1 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
jackett

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/yljydyi8lfxkvw68pml8k93rjnz6ishi-jackett-0.18.98 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A jackett https://github.com/r-ryantm/nixpkgs/archive/4dd3f39d00f8845814389aa099101458a54cdaf0.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/yljydyi8lfxkvw68pml8k93rjnz6ishi-jackett-0.18.98
ls -la /nix/store/yljydyi8lfxkvw68pml8k93rjnz6ishi-jackett-0.18.98/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

jackett

Maintainer pings
cc @edwtjo @nyanloutre @purcell for testing.

Result of nixpkgs-review pr 123976 at 4dd3f39d run on aarch64-linux 1

1 package built successfully:

jackett

1 suggestion:

warning: missing-phase-hooks
installPhase should probably contain runHook preInstall and runHook postInstall.
Near pkgs/servers/jackett/default.nix:14:3:
   |
14 |   installPhase = ''
   |   ^


Reduce the RAM consumption of RIFE VFI by 4x

Problem I am trying to fix:
My computer has 32 GB RAM. For a video with 24 fps, 160 second long, 1024 * 768  at float32 resolution, it takes (431024576)(160*24)/1024/1024/1024 = 25.4GB memory. And the original code crashes at line 194 out = torch.cat(output_frames, dim=0) because it's trying to allocate the same amount of memory to convert the list of tensor to a single tensor.
Fix:

Changed the RIFE's dtype to store the output frames from float32 to float16 (this PR only changes that for VFI, but I am happy to change for all other models as well in this PR if you see fit). This reduces RAM consumption by 2x.
Avoided torch.cat() by pre-allocating this tensor, and then write directly to this tensor . In this way we can avoid the copying.

@gavinliukaiber I pushed an option to use fp16 a while back but most custom nodes assume that IMAGE is full float (https://github.com/Fannovel16/ComfyUI-Frame-Interpolation/issues/48)

I see, how should we proceed?  But #48 only mentions the upscale node. And  when I linked VFI to VHS_SaveVideo with fp16 it worked as usual.  Separately, the removal of  torch.cat() in this PR  can still save 2x  RAM consumption.

I think it would be best to just remove fp16 feature and keeps anything else. Any possible bug with fp16 image tensors would be hard to trace

Done, please review.

LGTM now.


Feature Request: Support for GitHub Codespaces Deployment and Development

Hello @tiangolo ,
First of all, I want to express my appreciation for the recent updates to the project; it's been running superbly on a local environment. To further enhance the development experience, I'm wondering if it would be possible to adjust the configurations to support deployment within GitHub Codespaces. This would allow for development directly within Codespaces, streamlining the process even more.
Thank you for considering this enhancement.
Best regards
Philipp

We appreciate you

-:)


Current editor does not handle disposing properly when binded value is set and another editor is initialized

Issue: This issue was originally reported in #15. However, the fix to that caused issue with editor toolbar not disposing properly in #43 and thus was removed.
Reproducible step (Repo here):

Navigate to Multi-instance Issue page
A component that contains an instance of editor with value set to "Some text" is rendered initially.
Select second component using the dropdown.
The second component with editor seem to be rendered correct. However, console log throws exception:
Uncaught (in promise) Error: System.ArgumentException: There is no tracked object with id '#'. Perhaps the DotNetObjectReference instance was already disposed. (Parameter 'dotNetObjectId')

The initial issue was fixed by removing all events when disposing of the instance which caused toolbar to not be removed when during disposing time.
I will be looking into this and hope to have a PR in soon.

I noticed this dispose pattern and feel like we can move the reference dispose after success calling the JS interop method. Not really sure how that will affect the object disposing from Blazor and the JS interop. Or I think a better solution would be to communicate back to Blazor once the JS module have completely destroy the editor and trigger the garbage collector.
https://github.com/tinymce/tinymce-blazor/blob/e712f406aa48c64fc568c1f94e5cff8f8483cca8/TinyMCE.Blazor/Editor.razor#L285-L299

I think the main problem was that some events were still bound by the framework, which is what editor.off() was trying to fix.
I made #47 to address this

I think the main problem was that some events were still bound by the framework, which is what editor.off() was trying to fix.
I made #47 to address this

I agreed that there could the problem with some events but I still think the reference object should only be disposed after the success of the javascript call. I looked at several articles about blazor interop and most if not all are doing the reference dispose after the js call.

Basically, the problem is that the events keep the dotnetref alive, so by getting rid of the bound events we deal with the obj reference. This should happen in the same thread so I don't think there should be a problem. I will try to find an edge case and see if there is any risk. Otherwise, yeah I can wait for the task to complete before disposing of the reference.

@jscasca Any update on the bug fix release?

@nguyenhthai yes, sorry. The previous code was released earlier today.
We ended up keeping the disposal order in which the dotnet reference is disposed followed by the destroy method call in JS.
This will likely be addressed in the future


Implement slow fallback

It does, but then also needs this in another instance.
On Thu, Dec 1, 2016 at 2:51 PM, Peter Mattis<EMAIL_ADDRESS>wrote:

@petermattis commented on this pull request.
In goid.go https://github.com/petermattis/goid/pull/5:

@@ -0,0 +1,20 @@
+package goid

+import (

"bytes"
"runtime"
"strconv"
+)

+func ExtractGID(s []byte) int64 {
It wouldn't just use goid.Get?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/petermattis/goid/pull/5, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABdsPPvixbPCsGXU_94-8BCZJdMNWJO3ks5rDyVbgaJpZM4LBzrF
.


the following may interest you (we're using art to run dex files, though I wonder how well your thing would compare)

https://gitlab.com/android_translation_layer/android_translation_layer

https://gitlab.com/android_translation_layer/android_translation_layer

In my project, I use dex2jar to convert dex files into jar files that can be executed by the Java Virtual Machine. The benefit of doing this is to eliminate compatibility issues with dex files, as jar files are platform-independent. Additionally, nowadays, the execution speed of Java programs may not necessarily be slower than native execution, and you can directly use various third-party Java libraries. By simply implementing JNI functions (regardless of the implementation method), the program can run on various operating systems. Therefore, as long as the results of dex2jar are correct, this implementation approach can be considered a good method.

I have experimented with running on standard JVM: https://gitlab.com/android_translation_layer/android_translation_layer/-/tree/unsupported-experiment-non-art-jvm
The issue with dex2jar is that it absolutely does not "just work", at least in my experience.
art is supposed to compile for Windows and MacOS, and with our patches it's basically equivalent to a jvm, except it can run dex files. Compatibility is certainly better than dex2jar, because art is what AOSP uses and presumably the app worked fine on AOSP.
Using third party java libraries is still an option, they just need to be run through dx. We have at one point used ARSCLib for example, though we have moved away from that since it was incredibly slow and we instead added a C ABI to libandroidfw, which is also intended to compile for Linux/MacOS/Windows because it's used by aapt.
I just don't bother supporting Windows/MacOS in my code because ultimately any app that uses native parts will only run on Linux, and it doesn't seem worth it to include codepaths for Windows and MacOS when only apps which are fully written in java with no native parts will work. At that point, using a VM makes more sense, either with AOSP or with linux + my project. (On Windows, WSA and WSL exist and are able to run GUI apps afaik, and I doubt any windows user would care for a "cleaner" solution)

If the art virtual machine could be compiled independently, using the independently compiled art virtual machine as the runtime for dex files would be a good solution. As far as I know, the art virtual machine may include special classes and methods not found in the standard JVM, which could also lead to compatibility issues. Additionally, Android uses the dx tool to ensure that third-party libraries can run in the Android environment in order to leverage the Java ecosystem.
I also believe that dex files and jar files, as executable files, are Turing equivalent, especially since they are both compiled from the Java language. If there are certain areas where dex2jar fails to convert correctly, efforts can be made to fix it, or to explore implementing features of the art virtual machine.
However, at present, it seems that compiling the art virtual machine independently as a runtime solution may be more cost-effective and easier to implement.


Implement Hashtags

I don't know programming Typescript etc, but will there be hashtags soon?

You're welcome to fork the repos and build them yourself

I told you i cant.


Down?

I use this for a day or two. What's wrong?
{"events":[],"metadata":{"venues":100,"venuesWithEvents":0,"events":0}}
https://bit.ly/2IQA4Sn

Probably related to FB cambridge analytica ... More info here : https://newsroom.fb.com/news/2018/04/restricting-data-access/

@tobilg , so what do we have at this moment? Is there some way to get events in our applications ?

@denysbohurskyi I don’t really know. FB‘s docs and communication are inconsistant about this unfortunately.

@tobilg in FB Developer group I saw that some people got their apps reviewed. Someone wrote that we need to submit for App Review and select we want to use the Event API. But App Review is currently paused, so we have to wait. But I even don't know how to do this :)

I don't think this is correct @filippodicostanzo. Please link the docs accordingly.

@tobilg until yesterday it work with user access token.
I try on graph explorer of facebook and it works.
But now for get the events is necessary an approved app?

Graph Explorer is always an exception. I don't want to repeat the whole discussion on this topic at https://github.com/tobilg/facebook-events-by-location-core/issues/29 here again. Please refer to the existing bug reports.

Hello, the issue is resolved. https://developers.facebook.com/status/issues/205942813488872/. What permission do I need in AppReview (they are dozen of it). They want screen cast. Upload screencast
We need to see your app using manage_pages so we can see that it doesn't violate our policies. Upload a video screencast walkthrough using any method, (even recording with your phone).
You must show:
How a person logs in with Facebook
How a person sees this permission used in your app.
How can they test if I have this uploded in heroku??

So far no developer has understood how to get the permission and nobody developer has managed to get the public events from pages on facebook. So i think that on this endpoint Facebook doesn't have a clear vision and i think yet that this endpoint will deprecated although I hope not.

What do you suggest guys?

Do you have news ?

A scrapping from the website of facebook, by city, using the html tags.
@_@
2018-05-08 21:37 GMT-03:00 Levallois Julien<EMAIL_ADDRESS>
Do you have news ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tobilg/facebook-events-by-location/issues/45#issuecomment-387584527,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKap0ZFTVSA4nnVgmHPqkwRsFvK44ypwks5twjpSgaJpZM4TVBHf
.

--
Atentamente
Cristopher Theodoropoulos Pavlov
CEO / Ingeniero en Computación e Informática
Mail<EMAIL_ADDRESS><EMAIL_ADDRESS>/<EMAIL_ADDRESS>Tel:         56 9) 512 976 99
www:       aureolab.cl

Any answer, guys?

Having the same problem... Let's pray they will open it again

any news guys?


Error in the PLI implementation

Describe the bug
I think the implementation of the PLI metric is wrong. The standard definition is:
PLI=|mean(sign(difference_in_instantaneous_phase))|

Note that for a signal of N time samples, this PLI value is obtained as the average of N values. The MNE implementation of this metric follows the implementation of Ortiz and instead of computing this metric in the time domain (e.g. using the Hilbert transform to estimate the instantaneous phase) computes it in the frequency domain using the cross-spectrum. An issue arise when this passage to the frequency domain is used to analyze the PLI results at the individual frequency bands. For example, the default behavior of spectral_connectivity() is faverage=False, which therefore report a value for each frequency. In this case, the PLI estimate that was the absolute-mean-value of N samples become the absolute-mean-value of 1 sample... so the PLI estimates reduce to 0 or 1 (where it was originally a value taken from the {0/N, 1/N, 2/N, ..., N/N}). Now, if we might think that we would recover the correct values using faverage=True, but we don't because this computes the mean-absolute-value, not the absolute-mean-value... Here is a part of the spectral_connectivity() code:
    for method, n_args in zip(con_methods, n_comp_args):
        # future estimators will need to be handled here
        if n_args == 3:
            # compute all scores at once
            method.compute_con(slice(0, n_cons), n_epochs)
        elif n_args == 5:
            # compute scores block-wise to save memory
            for i in range(0, n_cons, block_size):
                con_idx = slice(i, i + block_size)
                psd_xx = psd[idx_map[0][con_idx]]
                psd_yy = psd[idx_map[1][con_idx]]
                method.compute_con(con_idx, n_epochs, psd_xx, psd_yy)
        else:
            raise RuntimeError('This should never happen.')

        # get the connectivity scores
        this_con = method.con_scores

        if this_con.shape[0] != n_cons:
            raise ValueError('First dimension of connectivity scores must be '
                             'the same as the number of connections')
        if faverage:
            if this_con.shape[1] != n_freqs:
                raise ValueError('2nd dimension of connectivity scores must '
                                 'be the same as the number of frequencies')
            con_shape = (n_cons, n_bands) + this_con.shape[2:]
            this_con_bands = np.empty(con_shape, dtype=this_con.dtype)
            for band_idx in range(n_bands):
                this_con_bands[:, band_idx] =\
                    np.mean(this_con[:, freq_idx_bands[band_idx]], axis=1)
            this_con = this_con_bands

Note that the faverage part comes after the call to compute_con() which, in the case of _PLIEst already applied the absolute operator.
If I am not mistaken, the function "appears" to work when using epochs because then it does the mean(signs(X)) across the M epochs, before computing the absolute value. But remember that the stuff in X was initially N values saying whether the time-lag at every N time samples was positive or negative. Now X values are still saying whether the phase-difference is positive or negative, but you traded the ability to check it at every time point to have it localized in frequencies (uncertainty principle), so you have just one value per epochs and you average it across M epochs. I might have interesting properties on its own, but I don't think it is still fair to call this a PLI measure, i.e. average_across_epochs(abs(average_across_x)) != average_across_x(abs(average_across_epochs)) (where x can be either time or frequency, depending on whether you transform from temporal representation to frequency).

As an afterthought (why do we need to press "submit" to have these?), I guess that when resting-state continuous signals are "chunked" in epochs, the "epoch dimension" has a "temporal definition" to it so it still makes some sense in that case. But I don't think that it makes sense for epochs that have a meaning of "repetition" like in ERP studies... In any case, using the standard PLI definition separately on every epoch and then averaging these PLI values across epochs would give a different value.
Also, it is definitely problematic when someone wants to compute the standard PLI value between two-signals (no epoching).
Anyway, the crux of the problem is really the faverage that should be performed before the absolute value is taken.

would you have time to open a PR so we can see a clear diff and look at a
test?

Not in a near future but I can have a look at it when possible.

Hi all,
I also had the same problem when working with resting-state epoched data.
The "error" described in this issue is not really an error but what @christian-oreilly describes is connectivity over time.
The current PLI and PLV implementation in spectral_connectivity() is connectivity over trials, which are suited for ERP data.
Mike X Cohen explains the difference quite nicely in his video here:
Youtube Link
I tried implementing my own version to calculate PLV and wPLI over time and you can see a simple working example here:
# Libraries
import numpy as np
import mne
from scipy import special
from mne.connectivity import spectral_connectivity

# Generate data
np.random.seed(42)
n_epochs = 5
n_channels = 3
n_times = 1000
data = np.random.rand(n_epochs, n_channels, n_times)

# Set sampling freq
sfreq = 250 # A reasonable random choice

# Choose what kind of data should be used for evaluation
# 0 = same trial repeated in all epochs
# 1 = 10Hz sinus waves with random phase differences in each channel and epoch
data_option = 1

if data_option == 0:
    # Make all 5 epochs the same trial to show difference between connectivity
    # over time and over trials. Here we expect con over trials = 1
    for i in range(n_epochs):
        data[i] = data[0]
elif data_option == 1:
    # Generate 10Hz sinus waves to show difference between connectivity
    # over time and over trials. Here we expect con over time = 1
    for i in range(n_epochs):
        for c in range(n_channels):
            wave_freq = 10
            epoch_len = n_times/sfreq
            # Introduce random phase for each channel
            phase = np.random.rand(1)*10
            # Generate sinus wave
            x = np.linspace(-wave_freq*epoch_len*np.pi+phase,
                            wave_freq*epoch_len*np.pi+phase,n_times)
            data[i,c] = np.squeeze(np.sin(x))
else:
    print("Data_option value chosen is invalid")

# Define freq bands
Freq_Bands = {"delta": [1.25, 4.0],
              "theta": [4.0, 8.0],
              "alpha": [8.0, 13.0],
              "beta": [13.0, 30.0],
              "gamma": [30.0, 49.0]}
n_freq_bands = len(Freq_Bands)
# Convert to tuples for the mne function
fmin=tuple([list(Freq_Bands.values())[f][0] for f in range(len(Freq_Bands))])
fmax=tuple([list(Freq_Bands.values())[f][1] for f in range(len(Freq_Bands))])

# Connectivity methods
connectivity_methods = ["plv","wpli"]
n_con_methods=len(connectivity_methods)

# Number of pairwise ch connections
n_ch_connections = scipy.special.comb(n_channels,2, exact=True, repetition=False)

# Pre-allocatate memory
con_data = np.zeros((n_con_methods,n_channels,n_channels,n_freq_bands))
con_data[con_data==0] = np.nan # nan matrix as 0 is meaningful

# Calculate PLV and wPLI - the MNE python implementation is over trials
con, freqs, times, n_epochs, n_tapers = spectral_connectivity(
    data, method=connectivity_methods,
    mode="multitaper", sfreq=sfreq, fmin=fmin, fmax=fmax,
    faverage=True, verbose=0)
# Save the results in array
con_data[0,:,:,:] = con[0] # PLV
con_data[1,:,:,:] = con[1] # WPLI

print("Alpha PLV over trials")
print(con_data[0,:,:,2]) # all 1, since it is the same trial
# so PLV across trials should be 1

# PLV and wPLI across time
# Make linspace array for morlet waves
freq_centers = np.arange(fmin[0],fmax[-1]+0.25,0.25)
# Prepare Morlets
morlets = mne.time_frequency.tfr.morlet(sfreq,freq_centers,n_cycles=3)

# Make freqs array for indexing
freqs0 = [0]*n_freq_bands
for f in range(n_freq_bands):
    freqs0[f] = freq_centers[(freq_centers>=fmin[f]) & (freq_centers<=fmax[f])]

def calculate_PLV_WPLI_across_time(cwt_data):
    """

    Parameters
    ----------
    cwt_data : array, shape(n_channels, n_freq, n_times)
        The continuous wavelet transform of the data in one epoch

    Returns
    -------
    con_array : array, shape(2, n_channels, n_channels, n_freq_bands)
        The connectivity matrix. Only the lower diagonal is calculated.
        First axis indicates whether it is PLV (0) or wPLI(1)

    """
    n_ch, n_freq0, n_time0 = cwt_data.shape
    # The wavelet transform coefficients are complex numbers
    # The real part correspond to the amplitude and the imaginary part can be used to calculate the phase
    angles_data = np.apply_along_axis(np.angle,2,cwt_data)
    # Prepare array with phase differences between all combinations
    phase_diff_arr = np.zeros((n_ch_connections,n_freq0,n_time0))
    phase_diff_arr_ch_idx = [0]*n_ch_connections
    counter = 0
    for ch_c in range(n_ch):
        for ch_r in range(ch_c+1,n_ch): # only calculate lower diagonal
            phase_diff_arr[counter] = angles_data[ch_r]-angles_data[ch_c]
            phase_diff_arr_ch_idx[counter] = [ch_r,ch_c]
            counter += 1

    del angles_data # free up some memory
    # =========================================================================
    # PLV over time correspond to mean across time of the absolute value of
    # the circular length of the relative phases. So PLV will be 1 if
    # the phases of 2 signals maintain a constant lag
    # In equational form: PLV = 1/N * |sum(e^i(phase1-phase2))|
    # =========================================================================
    # Convert phase difference to complex part i(phase1-phase2)
    phase_diff_arr_im = 0*phase_diff_arr+1j*phase_diff_arr
    # Take the exponential
    expPhase_arr = np.apply_along_axis(np.exp,2,phase_diff_arr_im)
    # Take mean and then the absolute value
    meanexpPhase_arr = np.apply_along_axis(np.mean,2,expPhase_arr)
    PLV_arr = np.apply_along_axis(np.abs,1,meanexpPhase_arr)

    del phase_diff_arr_im, expPhase_arr # free up some memory
    # =========================================================================
    # PLI over time correspond to the sign of the sine of relative phase
    # differences. So PLI will be 1 if one signal is always leading or
    # lagging behind the other signal. But it is insensitive to changes in
    # relative phase, as long as it is the same signal that leads.
    # If 2 signals are almost in phase, they might shift between lead/lag
    # due to small fluctuations from noise. This would lead to unstable
    # estimation of "phase" synchronisation.
    # The wPLI tries to correct for this by weighting the PLI with the
    # magnitude of the lag, to attenuate noise sources giving rise to
    # near zero phase lag "synchronization"
    # In equational form: WPLI = |E{|phase_diff|*sign(phase_diff)}| / E{|phase_diff|}
    # =========================================================================
    # Calculate the magnitude of phase differences
    phase_diff_mag_arr = np.abs(np.sin(phase_diff_arr))
    # Calculate the signed phase difference (PLI)
    sign_phase_diff_arr = np.sign(np.sin(phase_diff_arr))
    # Calculate the nominator (abs and average across time)
    WPLI_nominator = np.abs(np.mean(phase_diff_mag_arr*sign_phase_diff_arr,axis=2))
    # Calculate denominator for normalization
    WPLI_denom = np.mean(phase_diff_mag_arr, axis=2)
    # Calculate WPLI
    WPLI_arr = WPLI_nominator/WPLI_denom

    del phase_diff_mag_arr, sign_phase_diff_arr, phase_diff_arr # free up some memory
    # Calculate mean for each freq band
    con_array0 = np.zeros((2,n_ch_connections,n_freq_bands))
    for f in range(n_freq_bands):
        freq_of_interest = freqs0[f] # find freqs in the freq band of interest
        freq_idx = [i in freq_of_interest for i in freq_centers] # get idx
        con_array0[0,:,f] = np.apply_along_axis(np.mean,1,PLV_arr[:,freq_idx])
        con_array0[1,:,f] = np.apply_along_axis(np.mean,1,WPLI_arr[:,freq_idx])

    # Save to final array with ch-ch connectivity in matrix form
    con_array = np.zeros((2,n_ch,n_ch,n_freq_bands))
    for com in range(n_ch_connections):
        ch_r = phase_diff_arr_ch_idx[com][0] # get row idx
        ch_c = phase_diff_arr_ch_idx[com][1] # get col idx
        con_array[0,ch_r,ch_c,:] = con_array0[0,com]
        con_array[1,ch_r,ch_c,:] = con_array0[1,com]

    return con_array

# Pre-allocate memory
con_data_time = np.zeros((n_con_methods,n_channels,n_channels,n_freq_bands))
con_data_time[con_data_time==0] = np.nan # nan matrix as 0 is meaningful

con_data1 = np.zeros((n_con_methods,n_epochs,n_channels,n_channels,n_freq_bands))

for epoch in range(n_epochs):
    # First the data in each epoch is retrieved
    temp_data = data[i]
    # Then continuous wavelet transform is used to decompose in time frequencies
    temp_data_cwt = mne.time_frequency.tfr.cwt(temp_data,morlets)
    # PLV and WPLI value is calculated across timepoints in each freq band and averaged into the 5 defined freq bands
    PLV_WPLI_con = calculate_PLV_WPLI_across_time(temp_data_cwt)
    # Save results
    con_data1[0,epoch,:,:,:] = PLV_WPLI_con[0] # phase locking value
    con_data1[1,epoch,:,:,:] = PLV_WPLI_con[1] # weighted phase lag index

# Take average across epochs for PLV and wPLI
con_data2 = np.mean(con_data1,axis=1)
# Save to final array
con_data_time[0,:,:,:] = con_data2[0] # phase locking value
con_data_time[1,:,:,:] = con_data2[1] # weighted phase lag index

print("Alpha PLV over time")
print(con_data_time[0,:,:,2])

Notice I added the option to choose what kind of data should be used. If data_option = 0 then the expected output is that PLV across trials are 1 since I just repeated the first epoch in all other epochs, while if data_option = 1 the PLV across time should be 1 as I use 10Hz sine waves with different phase differences.
It is still quite rough and not optimized but should give an idea of the procedure.
I am not completely certain about my implementation but the wPLI by following equation 1 in [1] and weighing by the absolute magnitude of the phase differences as described by [2]. PLV was calculated according to the equation in [3]. According to https://github.com/mne-tools/mne-python/issues/8305 this equation should be equivalent to what is being used in spectral_connectivity() already, but my implementation over time gives another PLV than spectral_connectivity().
It would be helpful if anyone could have a look.
[1] Hardmeier, Martin, Florian Hatz, Habib Bousleiman, Christian Schindler, Cornelis Jan Stam, and Peter Fuhr. 2014. “Reproducibility of Functional Connectivity and Graph Measures Based on the Phase Lag Index (PLI) and Weighted Phase Lag Index (WPLI) Derived from High Resolution EEG.” PLoS ONE 9 (10). https://doi.org/10.1371/journal.pone.0108648.
[2] Vinck, Martin, Robert Oostenveld, Marijn Van Wingerden, Franscesco Battaglia, and Cyriel M.A. Pennartz. 2011. “An Improved Index of Phase-Synchronization for Electrophysiological Data in the Presence of Volume-Conduction, Noise and Sample-Size Bias.” NeuroImage 55 (4): 1548–65. https://doi.org/10.1016/j.neuroimage.2011.01.055.
[3] Lachaux, Jean Philippe, Eugenio Rodriguez, Jacques Martinerie, and Francisco J. Varela. 1999. “Measuring Phase Synchrony in Brain Signals.” Human Brain Mapping 8 (4): 194–208. https://doi.org/10.1002/(SICI)1097-0193(1999)8:4<194::AID-HBM4>3.0.CO;2-C.

Hi all,
I also had the same problem when working with resting-state epoched data.
The "error" described in this issue is not really an error but what @christian-oreilly describes is connectivity over time.
The current PLI and PLV implementation in spectral_connectivity() is connectivity over trials, which are suited for ERP data.
Mike X Cohen explains the difference quite nicely in his video here:
Youtube Link
I tried implementing my own version to calculate PLV and wPLI over time and you can see a simple working example here:
# Libraries
import numpy as np
import mne
from scipy import special
from mne.connectivity import spectral_connectivity

# Generate data
np.random.seed(42)
n_epochs = 5
n_channels = 3
n_times = 1000
data = np.random.rand(n_epochs, n_channels, n_times)

# Set sampling freq
sfreq = 250 # A reasonable random choice

# Choose what kind of data should be used for evaluation
# 0 = same trial repeated in all epochs
# 1 = 10Hz sinus waves with random phase differences in each channel and epoch
data_option = 1

if data_option == 0:
    # Make all 5 epochs the same trial to show difference between connectivity
    # over time and over trials. Here we expect con over trials = 1
    for i in range(n_epochs):
        data[i] = data[0]
elif data_option == 1:
    # Generate 10Hz sinus waves to show difference between connectivity
    # over time and over trials. Here we expect con over time = 1
    for i in range(n_epochs):
        for c in range(n_channels):
            wave_freq = 10
            epoch_len = n_times/sfreq
            # Introduce random phase for each channel
            phase = np.random.rand(1)*10
            # Generate sinus wave
            x = np.linspace(-wave_freq*epoch_len*np.pi+phase,
                            wave_freq*epoch_len*np.pi+phase,n_times)
            data[i,c] = np.squeeze(np.sin(x))
else:
    print("Data_option value chosen is invalid")

# Define freq bands
Freq_Bands = {"delta": [1.25, 4.0],
              "theta": [4.0, 8.0],
              "alpha": [8.0, 13.0],
              "beta": [13.0, 30.0],
              "gamma": [30.0, 49.0]}
n_freq_bands = len(Freq_Bands)
# Convert to tuples for the mne function
fmin=tuple([list(Freq_Bands.values())[f][0] for f in range(len(Freq_Bands))])
fmax=tuple([list(Freq_Bands.values())[f][1] for f in range(len(Freq_Bands))])

# Connectivity methods
connectivity_methods = ["plv","wpli"]
n_con_methods=len(connectivity_methods)

# Number of pairwise ch connections
n_ch_connections = scipy.special.comb(n_channels,2, exact=True, repetition=False)

# Pre-allocatate memory
con_data = np.zeros((n_con_methods,n_channels,n_channels,n_freq_bands))
con_data[con_data==0] = np.nan # nan matrix as 0 is meaningful

# Calculate PLV and wPLI - the MNE python implementation is over trials
con, freqs, times, n_epochs, n_tapers = spectral_connectivity(
    data, method=connectivity_methods,
    mode="multitaper", sfreq=sfreq, fmin=fmin, fmax=fmax,
    faverage=True, verbose=0)
# Save the results in array
con_data[0,:,:,:] = con[0] # PLV
con_data[1,:,:,:] = con[1] # WPLI

print("Alpha PLV over trials")
print(con_data[0,:,:,2]) # all 1, since it is the same trial
# so PLV across trials should be 1

# PLV and wPLI across time
# Make linspace array for morlet waves
freq_centers = np.arange(fmin[0],fmax[-1]+0.25,0.25)
# Prepare Morlets
morlets = mne.time_frequency.tfr.morlet(sfreq,freq_centers,n_cycles=3)

# Make freqs array for indexing
freqs0 = [0]*n_freq_bands
for f in range(n_freq_bands):
    freqs0[f] = freq_centers[(freq_centers>=fmin[f]) & (freq_centers<=fmax[f])]

def calculate_PLV_WPLI_across_time(cwt_data):
    """

    Parameters
    ----------
    cwt_data : array, shape(n_channels, n_freq, n_times)
        The continuous wavelet transform of the data in one epoch

    Returns
    -------
    con_array : array, shape(2, n_channels, n_channels, n_freq_bands)
        The connectivity matrix. Only the lower diagonal is calculated.
        First axis indicates whether it is PLV (0) or wPLI(1)

    """
    n_ch, n_freq0, n_time0 = cwt_data.shape
    # The wavelet transform coefficients are complex numbers
    # The real part correspond to the amplitude and the imaginary part can be used to calculate the phase
    angles_data = np.apply_along_axis(np.angle,2,cwt_data)
    # Prepare array with phase differences between all combinations
    phase_diff_arr = np.zeros((n_ch_connections,n_freq0,n_time0))
    phase_diff_arr_ch_idx = [0]*n_ch_connections
    counter = 0
    for ch_c in range(n_ch):
        for ch_r in range(ch_c+1,n_ch): # only calculate lower diagonal
            phase_diff_arr[counter] = angles_data[ch_r]-angles_data[ch_c]
            phase_diff_arr_ch_idx[counter] = [ch_r,ch_c]
            counter += 1

    del angles_data # free up some memory
    # =========================================================================
    # PLV over time correspond to mean across time of the absolute value of
    # the circular length of the relative phases. So PLV will be 1 if
    # the phases of 2 signals maintain a constant lag
    # In equational form: PLV = 1/N * |sum(e^i(phase1-phase2))|
    # =========================================================================
    # Convert phase difference to complex part i(phase1-phase2)
    phase_diff_arr_im = 0*phase_diff_arr+1j*phase_diff_arr
    # Take the exponential
    expPhase_arr = np.apply_along_axis(np.exp,2,phase_diff_arr_im)
    # Take mean and then the absolute value
    meanexpPhase_arr = np.apply_along_axis(np.mean,2,expPhase_arr)
    PLV_arr = np.apply_along_axis(np.abs,1,meanexpPhase_arr)

    del phase_diff_arr_im, expPhase_arr # free up some memory
    # =========================================================================
    # PLI over time correspond to the sign of the sine of relative phase
    # differences. So PLI will be 1 if one signal is always leading or
    # lagging behind the other signal. But it is insensitive to changes in
    # relative phase, as long as it is the same signal that leads.
    # If 2 signals are almost in phase, they might shift between lead/lag
    # due to small fluctuations from noise. This would lead to unstable
    # estimation of "phase" synchronisation.
    # The wPLI tries to correct for this by weighting the PLI with the
    # magnitude of the lag, to attenuate noise sources giving rise to
    # near zero phase lag "synchronization"
    # In equational form: WPLI = |E{|phase_diff|*sign(phase_diff)}| / E{|phase_diff|}
    # =========================================================================
    # Calculate the magnitude of phase differences
    phase_diff_mag_arr = np.abs(np.sin(phase_diff_arr))
    # Calculate the signed phase difference (PLI)
    sign_phase_diff_arr = np.sign(np.sin(phase_diff_arr))
    # Calculate the nominator (abs and average across time)
    WPLI_nominator = np.abs(np.mean(phase_diff_mag_arr*sign_phase_diff_arr,axis=2))
    # Calculate denominator for normalization
    WPLI_denom = np.mean(phase_diff_mag_arr, axis=2)
    # Calculate WPLI
    WPLI_arr = WPLI_nominator/WPLI_denom

    del phase_diff_mag_arr, sign_phase_diff_arr, phase_diff_arr # free up some memory
    # Calculate mean for each freq band
    con_array0 = np.zeros((2,n_ch_connections,n_freq_bands))
    for f in range(n_freq_bands):
        freq_of_interest = freqs0[f] # find freqs in the freq band of interest
        freq_idx = [i in freq_of_interest for i in freq_centers] # get idx
        con_array0[0,:,f] = np.apply_along_axis(np.mean,1,PLV_arr[:,freq_idx])
        con_array0[1,:,f] = np.apply_along_axis(np.mean,1,WPLI_arr[:,freq_idx])

    # Save to final array with ch-ch connectivity in matrix form
    con_array = np.zeros((2,n_ch,n_ch,n_freq_bands))
    for com in range(n_ch_connections):
        ch_r = phase_diff_arr_ch_idx[com][0] # get row idx
        ch_c = phase_diff_arr_ch_idx[com][1] # get col idx
        con_array[0,ch_r,ch_c,:] = con_array0[0,com]
        con_array[1,ch_r,ch_c,:] = con_array0[1,com]

    return con_array

# Pre-allocate memory
con_data_time = np.zeros((n_con_methods,n_channels,n_channels,n_freq_bands))
con_data_time[con_data_time==0] = np.nan # nan matrix as 0 is meaningful

con_data1 = np.zeros((n_con_methods,n_epochs,n_channels,n_channels,n_freq_bands))

for epoch in range(n_epochs):
    # First the data in each epoch is retrieved
    temp_data = data[i]
    # Then continuous wavelet transform is used to decompose in time frequencies
    temp_data_cwt = mne.time_frequency.tfr.cwt(temp_data,morlets)
    # PLV and WPLI value is calculated across timepoints in each freq band and averaged into the 5 defined freq bands
    PLV_WPLI_con = calculate_PLV_WPLI_across_time(temp_data_cwt)
    # Save results
    con_data1[0,epoch,:,:,:] = PLV_WPLI_con[0] # phase locking value
    con_data1[1,epoch,:,:,:] = PLV_WPLI_con[1] # weighted phase lag index

# Take average across epochs for PLV and wPLI
con_data2 = np.mean(con_data1,axis=1)
# Save to final array
con_data_time[0,:,:,:] = con_data2[0] # phase locking value
con_data_time[1,:,:,:] = con_data2[1] # weighted phase lag index

print("Alpha PLV over time")
print(con_data_time[0,:,:,2])

Notice I added the option to choose what kind of data should be used. If data_option = 0 then the expected output is that PLV across trials are 1 since I just repeated the first epoch in all other epochs, while if data_option = 1 the PLV across time should be 1 as I use 10Hz sine waves with different phase differences.
It is still quite rough and not optimized but should give an idea of the procedure.
I am not completely certain about my implementation but the wPLI by following equation 1 in [1] and weighing by the absolute magnitude of the phase differences as described by [2]. PLV was calculated according to the equation in [3]. According to https://github.com/mne-tools/mne-python/issues/8305 this equation should be equivalent to what is being used in spectral_connectivity() already, but my implementation over time gives another PLV than spectral_connectivity().
It would be helpful if anyone could have a look.
[1] Hardmeier, Martin, Florian Hatz, Habib Bousleiman, Christian Schindler, Cornelis Jan Stam, and Peter Fuhr. 2014. “Reproducibility of Functional Connectivity and Graph Measures Based on the Phase Lag Index (PLI) and Weighted Phase Lag Index (WPLI) Derived from High Resolution EEG.” PLoS ONE 9 (10). https://doi.org/10.1371/journal.pone.0108648.
[2] Vinck, Martin, Robert Oostenveld, Marijn Van Wingerden, Franscesco Battaglia, and Cyriel M.A. Pennartz. 2011. “An Improved Index of Phase-Synchronization for Electrophysiological Data in the Presence of Volume-Conduction, Noise and Sample-Size Bias.” NeuroImage 55 (4): 1548–65. https://doi.org/10.1016/j.neuroimage.2011.01.055.
[3] Lachaux, Jean Philippe, Eugenio Rodriguez, Jacques Martinerie, and Francisco J. Varela. 1999. “Measuring Phase Synchrony in Brain Signals.” Human Brain Mapping 8 (4): 194–208. https://doi.org/10.1002/(SICI)1097-0193(1999)8:4<194::AID-HBM4>3.0.CO;2-C.

would you have time to open a PR so we can see a clear diff and look at a test?
…

@agramfort The code I wrote includes testing on some simple simulated data and an implementation, but as I wrote it needs to be optimized better and there is nothing wrong with the current spectral_connectivity(), but it is just an option that could be added to address connectivity over time.

would you have time to open a PR so we can see a clear diff and look at a test?
…

@agramfort The code I wrote includes testing on some simple simulated data and an implementation, but as I wrote it needs to be optimized better and there is nothing wrong with the current spectral_connectivity(), but it is just an option that could be added to address connectivity over time.

feel free to contribute this to mne when you find the time

feel free to contribute this to mne when you find the time


[Improvement][Resource Center] Compress before uploading to object storage

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
In current version, DS support use HDFS, OSS, S3 as storage layer of resource center. Nowadays, most of storage capacity is provided by cloud storage service which means OSS and S3 are in widely use. Nevertheless, charge depends on objects' size. I've noticed that in our implementation, we just import the package and use client SDK provided by cloud vendors to upload object, such as:
import com.amazonaws.services.s3.*;

public boolean mkdir(String tenantCode, ...) {
    ...
    s3Client.putObject(putObjectRequest);
    ...
}

public void vimFile(String tenantCode,...) {
    ...
    S3Object o = s3Client.getObject(BUCKET_NAME, srcFilePath);
    ...
}

I've explored the source code and find that the client SDK finally put raw objects into content and upload them by http request. Http protocol has its own standard to compress transmission data packets by gzip algorithm which can reduce network I/O. However, packets will be decompressed and the size of object remain unchanged.
Therefore, we can use better compression algorithm like Zstandard to compress file or directory before putObject, and decompress objects after getObject. Bring in this client-side compression step, DS can effectively reduce object size because of effectiveness of compression algorithm.
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

If someone make sure that client-side SDK support effective compression algorithm mentioned before (like Zstandard), feel free to correct me!

@SbloodyS Hi, you forgot to set milestone.

@SbloodyS Hi, you forgot to set milestone.

Since this is not urgent. Please take your time freely. Will set the milestone after you submit the PR. 👍

@SbloodyS Hi, you forgot to set milestone.

Since this is not urgent. Please take your time freely. Will set the milestone after you submit the PR. 👍

Okay, i'll finish it as soon as i can.


HfApi.upload_file consumes huge amount of memory when hashing

Describe the bug
When using HfApi.upload_file, it will use lots of memory calculating the SHA256 hash of the file.
Reproduced locally on Windows with Anaconda and on Google Colab. The Colab indicator shows that memory is consumed on the hashing phase.
Reproduction
import huggingface_hub
api = huggingface_hub.HfApi()
api.upload_file(path_or_fileobj="<some large file path>", path_in_repo="<some filename>", repo_id="<some repo id>", repo_type="model",)

Logs
No log is printed during the process.

System info
- huggingface_hub version: 0.11.1
- Platform: Windows-10-10.0.22621-SP0
- Python version: 3.10.6
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: C:\Users\cnwfj\.huggingface\token
- Has saved token ?: True
- Who am I ?: Dividend9853
- Configured git credential helpers: manager
- FastAI: N/A
- Tensorflow: 2.10.0
- Torch: 1.12.1
- Jinja2: 3.0.3
- Graphviz: N/A
- Pydot: N/A

{'huggingface_hub version': '0.11.1', 'Platform': 'Windows-10-10.0.22621-SP0', 'Python version': '3.10.6', 'Running in iPython ?': 'No', 'Running in notebook ?': 'No', 'Running in Google Colab ?': 'No', 'Token path ?': WindowsPath('C:/Users/cnwfj/.huggingface/token'), 'Has saved token ?': True, 'Who am I ?': 'Dividend9853', 'Configured git credential helpers': 'manager', 'FastAI': 'N/A', 'Tensorflow': '2.10.0', 'Torch': '1.12.1', 'Jinja2': '3.0.3', 'Graphviz': 'N/A', 'Pydot': 'N/A'}

Hi @wfjsw , thanks a lot for reporting this issue ! I have been able to reproduce it as well. Not sure sure from where it comes from as we are computing the sha of the file by chunks but we'll for sure figure out a solution :)


Create model for Plans

Was necessary specify the attr_accessible in Plan's model(here) to avoid the Brakeman's warning: Brakeman: Mass Assignment not restricted using attr_accessible

Coverage increased (+0.04%) to 81.585% when pulling eed3a8fa9027f320b77dc41a140635a3968b1780 on fetch-pagarme-plans into f4675f1cbb48ba0f97b38e23e79eeb33ad907dea on recurring-contributions-feature.


Exit event loop in libasync using a signal

I've taken a closer look and the issue is with the unit test in vibe.core.sync, line 303 ff.
t1 hangs in sleep(20.msecs); indefinitely, so that t1.join() never returns either.

Yes, the timer isn't being rescheduled because of a mistake I made in the driver. I'm testing it some more submitting a pull request.

Seems like it was a pretty serious issue

Looks nasty. Good to have this resolved!


Missing _service in checkJob

Hi John,
Not sure how collaborative the Esri stuff is in terms of pull requests.  I noticed that async checkJob fails rather spectacularly for me calling the original request over and over 1000 times.
https://github.com/pauldzy/esri-leaflet-gp/commit/5273b39d4e160aabff2cb4a780f69cdc751e9e65#diff-60de9bcd07cafff987c786382ec79430
Cheers,
Paul

closed by 5273b39d4e160aabff2cb4a780f69cdc751e9e65


Feature/v2 monorepo architecture

Just copy existing repository : sharing-smart-contract
move some repo into new folder packages (dapp + deployment-dapp)

TO DO :

Adapt drone CI (target,....)
Make tests on drone

We should discuss with the team where deployment-dapp folder should go


Fix VIP expose svc

Fix VIP expose svc
Support case-insensitive value for network modes

issue:
https://github.com/harvester/harvester/issues/1186
https://github.com/harvester/harvester/issues/1187
Related PR:
https://github.com/harvester/harvester/pull/1188

@yaocw2020 For the network mode case-sensitive part, this PR fixes the validation part.
But the original value in the config is still used to generate templates.
Suppose the user uses the value DHCP, it will pass the validation. But the generated helm chart config will be:
    service:
      vip:
        enabled: true
        mode: "DHCP"
        ip: "<IP_ADDRESS>"
        hwAddress: "52:54:00:ec:0e:0b"

Will this work with the change in https://github.com/harvester/harvester/pull/1188 ?

@yaocw2020 For the network mode case-sensitive part, this PR fixes the validation part.
But the original value in the config is still used to generate templates.
Suppose the user uses the value DHCP, it will pass the validation. But the generated helm chart config will be:
    service:
      vip:
        enabled: true
        mode: "DHCP"
        ip: "<IP_ADDRESS>"
        hwAddress: "52:54:00:ec:0e:0b"

Will this work with the change in harvester/harvester#1188 ?

https://github.com/harvester/harvester/pull/1188/files#diff-891b2975a5b9aa41d64348b35f9f1233f219e7145962ac572c0a51f61b58fe3aR107

I see, thanks.
It seems Static or STATIC will not work:
https://github.com/harvester/harvester/pull/1188/files#diff-b8916dccf848e9983fc1caeded29a01d766b8e0191877b6b857808f7e43ab54fR7


POl-352-Google-Schedule_instance_copy

Description
Modified the timezones_list.json file and remove foreach loop from the policy to reduce execution time.
Issues Resolved
[List any existing issues this PR resolves]
Contribution Check List

[ ] All tests pass.
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[ ] New functionality has been documented in CHANGELOG.MD

          1 Error

:no_entry_sign:
Please add a CHANGELOG.md file

          1 Warning

:warning:
Should this include readme changes

  Generated by :no_entry_sign: Danger


HWKAPM-580 : Instance Details table enhancements

Fixed some rows width to better use available horizontal space (broke timestamp in two lines, decreased duration and details width);
Collapse long property values (limit at 16 chars). Toggle between collapsed/expanded with click. Tooltip shows whole value;
Fixed inline styles to CSS classes;

@ammendonca Thanks! It works really well.


Add support for TZData to Dockerfile

In order to set the timezone easily, Alpine lets you pass a timezone string as an environment variable (e.g. -env TZ='America/Denver'). Would just need to include apk add tzdata to the docker file.

We welcome pull requests, but have put this issue in our backlog for us to get to as well.


az commands not able to find the resource unless --location is specified

Describe the bug
1.$ az image create --resource-group RT14 --name test --source Lego-Official Source Virtual Machine 'Lego-Official specified in the request does not exist in this Azure location.
Above works if I give the --location argument  where the source vm exists
2. az image copy extension fails while creating snapshot
To Reproduce
Steps to reproduce the behavior.
Execute the above commands without --location argument
Expected behavior
The --resource-group and other arguments  should be sufficient to identify the resource,should be able to work without --location argument.
Environment summary
Ubuntu 16.04 az-cli 2.0.42-1~xenial

#1 is by design, as CLI would default to resource group's location if --location is missing. So if the 2 locations are different, the create will not work as cross region is not supported yet. This issue will be resolved sometime this fall through share image gallery where you can deploy your image to more than one regions.

Closing as it is not a CLI issue

I got the error for az image create with the resource group and vm being in the same location, also image copy extension used to work fine until yesterday,now its breaking with az snapshot create failing (internally image-copy calls az snapshot create without --location)

> I got the error for az image create with the resource group and vm being in the same location

Can you please share the error?

I am wrong here. Sorry for the carelessness.
The resource group happens to be in a different location.


Error: 500 update pools failed: VM is already a pool member

This issue was adressed multple times already #785 #589 #462
In #462 it states that it is due to API privileges, however I can rule this out as I am using a root api token without privilege separation on a test system.
Adding a VM to a pool using terraform also does this, but the process terminates with an error, which makes it impossible to use in automations (pipelines, etc.).
If there is anything I can do to debug the cause, feel free to tell me @Telmate
provider version: 2.9.14
proxmox version: 8.0.3

For anyone using this provider in a gitlab pipeline, you can use this as a very dirty workaround:
  script:
    - set +e
    - gitlab-terraform apply 2> apply_output.txt
    - set -e
    - cat apply_output.txt
    - |
      if grep -q "is already a pool member" apply_output.txt; then
        echo "Special error detected: is already a pool member"
        exit 0  # Markiere den Job als erfolgreich
      fi


How to check if already logged In

Hello @nst
I am using your library in my iOS application.
I am able to integrate it easily, but I did not see any method or property which helps me to know "Is already logged In".
So that I could avoid the re-login?
Any suggestion how can I achieve this using your library?

You can use the following method:
-[STTwitterAPI getAccountVerifyCredentialsWithSuccessBlock:errorBlock:]

https://github.com/nst/STTwitter/blob/master/STTwitter/STTwitterAPI.h#L922-L923


Fixed vsomeip compile error.

Codecov Report
Base: 2.72% // Head: 2.72% // No change to project coverage :thumbsup:

Coverage data is based on head (1116c68) compared to base (f616a39).
Patch has no changes to coverable lines.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1003   +/-   ##
======================================
  Coverage    2.72%   2.72%
======================================
  Files          21      21
  Lines        6608    6608
======================================
  Hits          180     180
  Misses       6428    6428

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

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


custom go_package name, error

Describe the bug
When the go_package name is customized, the generated pb.fast.go is wrong
Steps to reproduce the behavior:
custom go_package:
option go_package = "github.com/cloudwego/fastpb/examples/fastpb_gen/user/player;playercustom";

although the official documentation does not recommend this, but it is legal.

感谢反馈，我后续会看下这个问题以及你的pr。


[Bug bash 2.4] Chart selection and tabs in the side panel should not scroll, they should anchor on fix position (on top)

Hey @btzeng , we have logged this bug already and started working on it. The number is #1123 . It'd be great if you can close this one. Thanks!

Closed as it was fixed.


Make the official Docker image multi-arch

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/2919
Originally created by @edgarrmondragon on 2021-09-03 14:44:05

Problem to solve
Have the official Meltano image support multiple architectures.
Target audience
Users interested in running the Docker image on different architectures, like ARM.
Further details

Docker images can support multiple architectures, which means that a single image may contain variants for different architectures, and sometimes for different operating systems, such as Windows.
When running an image with multi-architecture support, docker automatically selects the image variant that matches your OS and architecture.
Most of the Docker Official Images on Docker Hub provide a variety of architectures. For example, the busybox image supports amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, and s390x. When running this image on an x86_64 / amd64 machine, the x86_64 variant is pulled and run.

Proposal
Change our CI to leverage multi-arch build using docker builx ... experimental features.
What does success look like, and how can we measure that?
Meltano images on DockerHub contain variants for architectures we would want to support and the right variant is pulled for the user's host arch.
Regression test

[ ] Write adequate test cases and submit test results
[ ] Test results should be reviewed by a person from the team

Links / references

Buildx docs: https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images
Official guide for Docker Desktop: https://docs.docker.com/desktop/multi-arch/
Example GitLab CI workflow: https://github.com/oofnikj/nuttssh/blob/multiarch/.gitlab-ci.yml

View 2 previous comments from the original issue on GitLab

Had a user ask about this today.

@Lawiss this might be a better question for Slack! I see @WillDaSilva added this to his interest list though so maybe he has a though 😄