TypeError: get() takes 1 positional argument but 2 were given

Good morning !
I've just installed OSMnx on my laptop running on Linux SMP Debian 3.16.7-ckt25-2 (kernel release 3.16.0-4-amd64), for both versions of Python.
Now I just tested this commands :
import osmnx as ox     # worked, no problem here
ox.plot_graph(ox.graph_from_place('Modena, Italy'))

But then, got these error :
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph_from_place(query, network_type, simplify, retain_all, truncate_by_edge, name, which_result, buffer_dist, timeout, memory, max_query_area_size, clean_periphery)
   1799     if isinstance(query, str) or isinstance(query, dict):
   1800         # if it is a string (place name) or dict (structured place query), then it is a single place
-> 1801         gdf_place = gdf_from_place(query, which_result=which_result, buffer_dist=buffer_dist)
   1802         name = query
   1803     elif isinstance(query, list):

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in gdf_from_place(query, gdf_name, which_result, buffer_dist)
    522
    523     # get the data from OSM
--> 524     data = osm_polygon_download(query, limit=which_result)
    525     if len(data) >= which_result:
    526

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in osm_polygon_download(query, limit, polygon_geojson, pause_duration)
    495
    496     # request the URL, return the JSON
--> 497     response_json = nominatim_request(params=params, timeout=30)
    498     return response_json
    499

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in nominatim_request(params, pause_duration, timeout, error_pause_duration)
    373         start_time = time.time()
    374         log('Requesting {} with timeout={}'.format(prepared_url, timeout))
--> 375         response = requests.get(url, params, timeout=timeout)
    376
    377         # get the response size and the domain, log result

TypeError: get() takes 1 positional argument but 2 were given

Thanks in advance, and have a nice day !
EDIT : I'm working with an iPython notebook.

What version of requests do you have installed?

I've just checked : 2.4.3 for Python 3 (I just tested the previous code with this Python version) and requests 2.12.1 for Python 2 !

Make sure you have the most recent version of requests in both environments, with: pip install requests --upgrade

Yes, I've got the most recent version on Python 3.4 available with pip --upgrade ! It's always 2.4.3, no changes.
For Python 2.7 upgrade doesn't work, but I didn't use it for these particular case.

Ok. Try upgrading OSMnx to its latest beta version: 0.1b2:
pip install osmnx --upgrade --pre
I added a new piece of code that should let it work with old versions of requests, include v2.4.x.

That's nice, thank you very much !
I used also sudo pip3 install --ignore-installed requests command, because I found an "owed by OS" message very strange.
By curiosity, which requests version do you have ? I'm quite sure that 2.4.3 is the most recent on my system !
Now I've got OSMnx 0.1b2 version (just checked it), so I ran the same command but... new error :-/...
---------------------------------------------------------------------------
NetworkXPointlessConcept                  Traceback (most recent call last)
<ipython-input-2-0d3afc68e96a> in <module>()
----> 1 ox.plot_graph(ox.graph_from_place('Modena, Italy'))

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph_from_place(query, network_type, simplify, retain_all, truncate_by_edge, name, which_result, buffer_dist, timeout, memory, max_query_area_size, clean_periphery)
   1815     # create graph using this polygon(s) geometry
   1816     G = graph_from_polygon(polygon, network_type=network_type, simplify=simplify, retain_all=retain_all,
-> 1817                            truncate_by_edge=truncate_by_edge, name=name, timeout=timeout, memory=memory, max_query_area_size=max_query_area_size, clean_periphery=clean_periphery)
   1818
   1819     log('graph_from_place() returning graph with {:,} nodes and {:,} edges'.format(len(G.nodes()), len(G.edges())))

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in graph_from_polygon(polygon, network_type, simplify, retain_all, truncate_by_edge, name, timeout, memory, max_query_area_size, clean_periphery)
   1749         # truncate graph by polygon to return the graph within the polygon that caller wants
   1750         # don't simplify again - this allows us to retain intersections along the street that may now only connect 2 street segments in the network, but in reality also connect to an intersection just outside the polygon
-> 1751         G = truncate_graph_polygon(G_buffered, polygon, retain_all=retain_all, truncate_by_edge=truncate_by_edge)
   1752
   1753         # count how many street segments in buffered graph emanate from each intersection in un-buffered graph, to retain true counts for each intersection, even if some of its neighbors are outside the polygon

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in truncate_graph_polygon(G, polygon, retain_all, truncate_by_edge)
   1320     if not retain_all:
   1321         G = remove_isolated_nodes(G)
-> 1322         G = get_largest_component(G)
   1323
   1324     return G

/usr/local/lib/python3.4/dist-packages/osmnx/osmnx.py in get_largest_component(G, strongly)
   1098     else:
   1099         # if the graph is not connected and caller did not request retain_all, retain only the largest weakly connected component
-> 1100         if not nx.is_weakly_connected(G):
   1101             G = max(nx.weakly_connected_component_subgraphs(G), key=len)
   1102             log('Graph was not connected, retained only the largest weakly connected component ({:,} of {:,} total nodes) in {:.2f} seconds'.format(len(G.nodes()), original_len, time.time()-start_time))

/usr/local/lib/python3.4/dist-packages/networkx-1.11-py3.4.egg/networkx/algorithms/components/weakly_connected.py in is_weakly_connected(G)

/usr/local/lib/python3.4/dist-packages/networkx-1.11-py3.4.egg/networkx/utils/decorators.py in _not_implemented_for(f, *args, **kwargs)
     66                                             ' '.join(graph_types))
     67         else:
---> 68             return f(*args,**kwargs)
     69     return _not_implemented_for
     70

/usr/local/lib/python3.4/dist-packages/networkx-1.11-py3.4.egg/networkx/algorithms/components/weakly_connected.py in is_weakly_connected(G)
    176     if len(G) == 0:
    177         raise nx.NetworkXPointlessConcept(
--> 178             """Connectivity is undefined for the null graph.""")
    179
    180     return len(list(weakly_connected_components(G))[0]) == len(G)

NetworkXPointlessConcept: Connectivity is undefined for the null graph.

Do you prefer that I open a new issue with that and close this one ?
Thank you again for your time and advices !

I'm using requests 2.12.1 in both my Python (3.5 and 2.7) environments.
Regarding the NetworkXPointlessConcept, there's an open issue for that right now: #8. Would you comment on that issue with your details as I'm working on it there?

[Already Solved] TypeError: method() takes 1 positional argument but 2 were given


docs(commands): add documentation for nuxi module add

🔗 Linked issue

❓ Type of change

[x] 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Adds documentation for the missing nuxi module add command
📝 Checklist

[ ] I have linked an issue or discussion.
[x] I have updated the documentation accordingly.

Looks like nuxt-studio is a bit stuck with the latest commit. Kind of hard to preview.

You should be able to have it locally by following the instructions on https://github.com/nuxt/nuxt.com
The title should be nuxi module
It has actually two sub commands:

add
search

I think each sub command should be a H2 (## nuxti module add for instance).
See more on https://github.com/nuxt/cli/tree/main/src/commands/module

@Atinux thank you for your review! I'll add it


Fix #1834 CFE_TBL_Modified: Test CRC, updated flag

Describe the contribution
Fixes #1834
Add verification that CFE_TBL_Modified successfully calculates and sets the table CRC and sets the Updated flag if the table has been modified.
Testing performed
Steps taken to test the contribution:
$ make SIMULATION=native ENABLE_UNIT_TESTS=true OMIT_DEPRECATED=true prep
$ make -C build/native/default_cpu1/tbl
$ make -C build/native/default_cpu1/tbl test
$ make
$ make test

Verify GitHub workflows pass

Expected behavior changes
None.
System(s) tested on

Ubuntu 18.04 VM

Contributor Info - All information REQUIRED for consideration of pull request
Jose F. Martinez Pedraza / NASA GSFC

CCB:2021-08-25 APPROVED


Add responsive and animated footer

Please can I work on this issue?

Hello, I'm looking to do my first issue and I haven't had the opportunity yet, I would like you to assign this to me so I can have the experience!!! Thanks a lot

Please assign me for this issue.

I want work on this issue. Can you assign to me . @shruti49

I want to work on this issue. Can you assign it to me?

hello @shruti49, pls assign this work to me.
pls attach hacktoberfest tag on this issue also.


Promise.reject() doesn't cause OperationalError wrapping since 3.0

Update OperationalError docs, which documented pre-3.0 behavior.

I use OperationalError and subclasses thereof in my own APIs all the time having to do nothing with promisification.

@benjamingr I think you're missing the point.  Of course you can continue to explicitly use OperationalError.
In Bluebird 2.x, returning Q.reject(foo) from a handler would cause the new promise to be rejected with an OperationalError having its "cause" property set to the foo object that was rejected with.  In 3.0 this is no longer the case; the new promise is rejected with the foo object as the reason directly.
That's the only thing my change tries to address; the docs were explaining the 2.x behavior, not the 3.0 behavior.

I'm not missing the point - while this change is technically correct it creates the misconception of where .error should be used.

+Represents an error is the result of a node-style errback from a promisified API call.

Is not a very useful indicator

Is not a very useful indicator

To my knowledge, that's the only (or at least the most common) event in which Bluebird itself will create an OperationalError.
The documentation will at least be more accurate than it was before this PR.  Don't let the perfect be the enemy of the good -- or at least give some feedback that I can use to help improve the PR.  Right now your comments amount to "the new text isn't 100% correct."  Okay, but it's closer to correct than it was before.  If you want it to be 100% correct then you're going to have to give me better criticism.

FWIW my deliberation is because of this article:
https://www.joyent.com/node-js/production/design/errors
Ideally we would link to it since OperationalErrors are based on that.
However, I have some doubt now that the entire premise of the article is not correct. There aren't two types of errors. Instead, there are two ways for users to consume an API: one is assuming an error cannot happen (e.g. due to external knowledge, for example, that the index cannot be out of range etc) and another is assuming that errors can happen. So even though the producer generates the error and determines its type, only the consumer knows whether the error is expected...
So I think this PR is actually an accurate description of the current state of things...

The original wording of the docs seemed to imply, if not outright state, that node-style errbacks are only wrapped in an OperationalError if the error value is not a proper Error object.  I've just verified that, at least in node, all errbacks from node-style calls (Promise.fromCallback) result in an OperationalError wrapping the errbacked error object.
That's rather unfortunate; we're going to have to wrap fromCallback in our code to catch OperationalErrors, extract the original error, and reject with it.  I'm not sure how much performance we will lose doing this, but at least it will be compatible with Q's behavior.
let fromCallback = Promise.fromCallback.bind(Promise);

Promise.fromCallback = () =>
    fromCallback.apply(void 0, arguments)
    .error(e => Promise.reject(e.cause || e));

Risking getting a bit off-topic, I can't fathom the thought process that went into the decision to wrap all errors like this.  Just because an error object comes out of a different asynchronous API, it's treated as second-class within Bluebird.  That's silly and complicates error handling (for us) in many cases.
Hopefully this will be rectified in 4.0, or maybe we can at least get a config option to disable it.  In the meantime, at least the docs can document what really happens in the 3.x line.

On October 20, 2016 6:25:31 PM EDT, Benjamin Gruenbaum<EMAIL_ADDRESS>wrote:

I use OperationalError and subclasses thereof in my own APIs all the
time having to do nothing with promisification.

I think you're missing the point.  Of course you can continue to explicitly use OperationalError.
In Bluebird 2.x, returning Q.reject(foo) from a handler would cause the new promise to be rejected with an OperationalError having its "cause" property set to the foo object that was rejected with.  In 3.0 this is no longer the case; the new promise is rejected with the foo object as the reason directly.
That's the only thing my change tries to address; the docs were explaining the 2.x behavior, not the 3.0 behavior.
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Optionally allow insecure HTTPS requests

There are cases where an insecure HTTPS request might be desired, e.g.
creating a reverse proxy to a device that has a self-signed certificate.
This commit adds a check for an environment variable in the reqwest
client initialization to optionally enable insecure certificates.

@jtroo Thanks for the PR! It looks helpful but I'm not sure if it is the best way. Seeing now that maybe some client configuration could be required I have something in mind to do it better.
I think it is a good solution but too ad-hoc  for what a library should be. I will open an issue for this (or feel free to open it) and I will work on it in the next days. Or, if you are down to help I will be glad and open to discussion.

Agreed, it makes sense to have general reqwest client configuration rather than a one-off for just this functionality.
No need to rush the change for client configuration :) . I added this modification for my use case, and it's sufficient for me.

Opened issue #44 for this


Add 'post_class_attr' hook

Is your feature request related to a problem?
Before v5.5.1 we used post_class filter to add a data attribute to the post wrapper in a hacky way. But with a 5.5 update you added an esc_attr in the post_class function. We can use an additional esc_attr filter, but I think it's a much more expensive solution.
Describe the solution you'd like
Add post_class_attr filter to post_class function:
function post_class( $class = '', $post_id = null ) {
	// Separates classes with a single space, collates classes for post DIV.
	echo apply_filters('post_class_attr', 'class="' . esc_attr( join( ' ', get_post_class( $class, $post_id ) ) ) . '"');
}

Hi @ArroWsGM.
I think you need the core track for these kinds of suggestions. This repository is dealing with WordPress Coding Standards 🙂


Test python 3.6 compatability

(A basic test of this crashed during a conda execute run, so there may indeed be issues here.)

Tested via conda execute and it seems to be working fine, so closing this up for now.


Add Banuba Video Editor SDK

Pull Request Template
Video Editor SDK (Android & iOS) is a fully-functional video editor that can be integrated into an app in minutes, designed to create exciting social media content with a wide range of effects and filters for professional-quality videos on phones.
https://github.com/Banuba/ve-sdk-android-integration-sample,
https://github.com/Banuba/ve-sdk-ios-integration-sample
Please ensure all items below are checked before creating a pull request:

[x] My changes were made in the resources folder, not in the auto-generated README.md file or db folder
[x] My submission is formatted according to the guidelines in the contributing guide
[x] My submission is ordered alphabetically based on the resource name
[x] My submission has a useful description
[x] I have searched the repository for any relevant issues or pull requests

Thank you!


feature: cluster health init-container similar to how prepare is leveraged for k3s-upgrade

Is your feature request related to a problem? Please describe.
Some upgrade use-cases require that the cluster "be healthy" before incurring the disruption of a node upgrade. It would be nice to configure a Plan such that some settling has occurred before it continues with the next node. This could be achieved by some sort of health measurement, possibly ensuring that all replicasets and daemonsets have a minimum number of pods running, etc.
Describe the solution you'd like
A parameter or two on the Plan spec indicating that some health measurement should pass before commencing with node upgrade(s) and what pre-canned strategy to use for making such a determination. Maybe the presence of a strategy choice other than "none" would be enough (so, one parameter).
Describe alternatives you've considered
Relying on the eviction algorithm that respects pod disruption budgets (aka NOT specifying .spec.disableEviction) will likely not be adequate for all upgrade needs because such can hang indefinitely in resource-constrained clusters. Because of this we must assume that some disruptions can and will happen from upgrade plan applies. Is this enough to warrant new logic in the controller? :shrug:
Additional context

https://github.com/rancher/system-upgrade-controller/issues/163

We could use a lightweight version of this where we can at least specify a delay between node upgrades so that we avoid having multiple nodes rebooting before a StatefulSet with 3 pods is ready again. Is there a delay option already that we missed, e.g. 30 minutes between node upgrades?
The issue we have is that this workload is tightly coupled to specific nodes, so if SUC just goes ahead and reboots one after the other, even if the pods could be rescheduled to meat their PDB, they won't be because they need to be scheduled on the exact same node again. As it takes 15-20 minutes for a pod to become ready and reconnect to its cluster, SUC has cheerfully rebooted all three nodes by that time, destroying the application's clustering mode. It can't deal with more than one cluster member being unavailable at any one time.

We could use a lightweight version of this where we can at least specify a delay between node upgrades so that we avoid having multiple nodes rebooting before a StatefulSet with 3 pods is ready again. Is there a delay option already that we missed, e.g. 30 minutes between node upgrades?
The issue we have is that this workload is tightly coupled to specific nodes, so if SUC just goes ahead and reboots one after the other, even if the pods could be rescheduled to another node to meet their PDB, they won't be because they need to be scheduled on the exact same node again.
As it takes 15-20 minutes for a pod to become ready and reconnect to its cluster friends, SUC has cheerfully rebooted all three nodes by that time, destroying the application's clustering mode. It can't deal with more than one cluster member being unavailable at any one time.

IIRC, SUC will honor existing PDB if such exists.


HIgher resolution on timestamps?

I would like to integrate some data in Excel, but the CVS export timestamps only resolve to minute values, so I get a lot of deltas of 0. Not so good.
I took a couple stabs at formatting the timestamp and all failed.  Either HA doesn't support it, or I am clueless (most likely).

The card doesn't touch the data, it's the raw data from the database. It just formats it and the default formatting includes a seconds field, like for example 2022-10-24 00:00:00. Does your export include that seconds field ? If not, then something is wrong with your formatting string. In that case I suggest removing your custom time format and use the default one.
If the seconds appear but are always zero, then that is what is stored in your database.

I looked at my entries again and again and finally got the format to work and got seconds out.  All dyslexic typos. Thanks for the reply.  The card is very  nice.   Larry From: AlexSent: Sunday, October 23, 2022 6:29 PMTo: alexarch21/history-explorer-cardCc: larry Barello; AuthorSubject: Re: [alexarch21/history-explorer-card] HIgher resolution on timestamps? (Issue #79) The card doesn't touch the data, it's the raw data from the database. It just formats it and the default formatting includes a seconds field, like for example 2022-10-24 00:00:00. Does your export include that seconds field ? If not, then something is wrong with your formatting string. In that case I suggest removing your custom time format and use the default one.If the seconds appear but are always zero, then that is what is stored in your database.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID<EMAIL_ADDRESS>


Need to add migrations to go with Django 1.10 changes

So this is going to vary on the Django version, not sure there is a clean way to do it.

@jschneier have a look at linked PR. Not sure is exactly clean, but still


x/tools/gopls: autocomplete returns packages within excluded directories (per build.directoryFilters)

Related to https://github.com/golang/go/issues/48939 and reproduced in a repository.

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

$ go version

Does this issue reproduce with the latest release?

Check out https://github.com/gonzojive/gopls-bug-workspace-filters
Open internal/activework/activework.go
Try to tab complete myl within a function. The autocomplete list will include a library in the generated_stuff dir, which is included in the build.directoryFilters exclusion list:

{
    "gopls": {
        "build.directoryFilters": [
            "-generated_stuff",
        ],
        "formatting.local": "github.com/api-definitions/keyval",
    },
}

What did you expect to see?
Packages in generated_stuff shouldn't be included in autocomplete list?
I can't tell if this is working as intended. It came up before in https://github.com/golang/go/issues/37697, but I interpret the build.directoryFilters to mean that the generated_stuff folder should be ignored in this context as well: https://github.com/golang/vscode-go/blob/master/docs/settings.md#builddirectoryfilters.
What did you see instead?
mylib is included in the autocomplete list.

I came across a related issue: https://github.com/golang/go/issues/42965
From browsing the source, I wonder if the call to imports.GetAllCandidates from completions.go could be altered to pass in a filter derived from the directoryFilters that gets used in the dirFound callback that imports.GetAllCandidates uses to limit what packages it scans.

This bug may also be a duplicate of https://github.com/golang/go/issues/51265, not totally sure.

I just implemented something similar to this in https://go.dev/cl/531417.
Notes on how to implement this:

Thread through directory filters to where we do 'metadata'-based unimported completion

here, for package names
here, for package members

Apply directory filters for each compiled go file in the package; if all are excluded, ignore the package. (or just pick the first file to consider).
For any excluded package path, also filter from module cache completion implemented via completer.completionCallbacks

May not get to this for v0.14, which we want to cut ASAP to include a completion performance fix.

Would this completely stop gopls from scanning excluded sub directories?
I was getting https://github.com/golang/go/issues/42255 because a sub-sub directory has a NFS mounted to it, and gopls apparently tried to scan the entire NFS file tree..


Refactor ForceLocalNode so that it uses environment variables instead of a .env file

Context
Currently, this function writes to a .env file the values of IPFSSPEC_GATEWAYS
Current Behavior/Workaround
I am venturing to guess ipfsspec is just accessing this variable using os.environ.get() so we can just put it into the user's environment variables without having to write to a file.
Ideal behavior
We don't need to write to any local files.

Refactored and merged into main


[iLQR] Add line search

Add the line search to iLQR such that during the backward pass, we try a few multiples of the input feedback. Another suggestion by Kyle

Line search: Basically, after computing K(t) and k(t), you do a forward rollout with pi(x, t) = uhat(t) + k(t) + K(t)(x(t) - xhat(t)). Then, if it doesn't reduce costs (this line), you should try doing another forward pass with the same feedback gains, but multiplying the FF gains by some constant. If you do multiple forward passes without improving performance, then you can redo a new backwards pass with more regularization.
You can probably change the factor by which you increase/decrease regularization in this case to 0.5 (rather than 0.9). Waiting for many many failed backwards passes to accumulate before regularization gets large enough is pretty slow. Usually you'd multiply by something like 0.9 on success, and multiply by 2 on failure. Also, FWIW, I've seen people use various schemes for updating this parameter - the most common is to increase it whenever the eigenvalues of Quu become negative somewhere in the backwards pass (the condition you've got is more like the standard line search condition).

Closing as we are doing a different direction


Switch flutter_keyboard_visibility with flutter native check

Description
Deleting the flutter_keyboard_visibility package and replacing it with native flutter logic.
Related Issues
(https://github.com/woltapp/wolt_modal_sheet/issues/210)
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process.
Failing tests - Dont have time to figure out whats going on. Maybe someone will help me.
Breaking Change
No

Thanks @moshe5745 It looks like your solution works and it is super exciting!
However I see a delay with the top bar visibility adjustment as I recorded in this video. Do you have time to check this? I will also check when I have time.
https://github.com/user-attachments/assets/71b7672c-dcab-4cd5-81bf-996164b7496d

I will check it
Maybe the debounce is not the right approach here, and throttle is the right one.

I will check it Maybe the debounce is not the right approach here, and throttle is the right one.

Great. you can test with the playground app

@moshe5745 Can you check my PR: https://github.com/woltapp/wolt_modal_sheet/pull/303
I came up with more modular solution inspired from this PR.


Search returns results from outdated dplyr 0.5.0

Should return results from the latest version, 0.7.1.

Fixed, using the 0.7.2 version


feat: fixed eip-1559 gas prices

Fixed EIP-1559 gas prices
Required for https://github.com/safe-global/safe-wallet-web/issues/2222

Adds new Fixed EIP-1559 gas price interface to chain config
Extends JSON schema
Extends test builders

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.02%) to 92.504%

Totals

Change from base Build<PHONE_NUMBER>:
-0.02%

Covered Lines:
4364

Relevant Lines:
4616

💛  - Coveralls


No statusbar padding-top on Android

Ionic version:  (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ X ] 3.x
[ ] 4.x
I'm submitting a ...  (check one with "x")
[ X ] bug report
[ ] feature request
Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
When Rotate Screen Navbar lost 20px to statusbar
Expected behavior:
Normal Navbar and Statusbar
Steps to reproduce:
Normal steps
NEW BLANK
1- ionic start test blank
2 - https://ionicframework.com/docs/native/status-bar/

3 - app.component.ts
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then(() => {
statusBar.overlaysWebView(true);
statusBar.backgroundColorByHexString('#007ac1'); <--- color
splashScreen.hide();
});
}
4 - Build
   NORMAL
 ROTATE (BUG)
 RETURN (BUG) Don't back to normal
INFO
cli packages: (C:\Users\cfc\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.16.0
    ionic (Ionic CLI) : 3.16.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.8.0

System:

    Android SDK Tools : 26.1.1
    Node              : v6.11.4
    npm               : 3.10.10
    OS                : Windows 7

Environment Variables:

    ANDROID_HOME : C:\Users\cfc\AppData\Local\Android\sdk

Misc:

    backend : pro

PACKAGE.JSON
{
  "name": "teste",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.4.4",
    "@angular/compiler": "4.4.4",
    "@angular/compiler-cli": "4.4.4",
    "@angular/core": "4.4.4",
    "@angular/forms": "4.4.4",
    "@angular/http": "4.4.4",
    "@angular/platform-browser": "4.4.4",
    "@angular/platform-browser-dynamic": "4.4.4",
    "@ionic-native/core": "4.3.2",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "^4.3.2",
    "@ionic/storage": "2.0.1",
    "cordova-android": "~6.3.0",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "^2.2.3",
    "cordova-plugin-whitelist": "^1.3.1",
    "ionic-angular": "3.8.0",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.0.1",
    "typescript": "2.3.4"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "ionic-plugin-keyboard": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-statusbar": {}
    },
    "platforms": [
      "android"
    ]
  }
}

NOTE: edited the OPs post just to have the proper back-tick markdown so the ionic info and package.json stuff was readable.

I have found that it works perfectly on Android if you remove status/bar.overlaysWebView(true)
If you need it set to true for some cases, perhaps just set it true for those cases?
  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
    platform.ready().then(() => {
      statusBar.backgroundColorByHexString('#007ac1'); <--- color
      splashScreen.hide();
    });
  }

Please let me know if this works for you as well.

Hi kensodemann !!
grateful for your help !!
I had done a test based on an answer for iphone, put the field as "false" and it worked, but all my apps in previous versions worked like the one described above, as I did not see any comment regarding this change I decided to describe the problem.
Thnaks again

Hello !
As @fcraveiro said, suddently my app had the same behavior. I didn't change anything in my app config and the header went under the status bar.
As @kensodemann pointed out, removing the status/bar.overlaysWebView(true) worked for I android.
I Hope this will help.
Thanks !


BatchNorm/GroupNorm/LayerNorm fusion into 1 kernel

Changes

[x] merge batchnorm and layernorm into a single function called norm

Changes made in tinygrad/:
------------------------------------------------------------
files                             insertions       deletions
------------------------------------------------------------
tinygrad/nn/__init__.py                    5               5
tinygrad/tensor.py                         4               5
------------------------------------------------------------
total                                      9              10
------------------------------------------------------------
lines added in the tinygrad folder: -1

That is not what the bounty means at all.


Fix averageAcceleration Method

There is currently a method called averageAcceleration that lives in /lib/averageAcceleration.js.
It is incomplete and needs to be fixed!
This method calculates the average acceleration given the difference of velocity over the difference of time.

Acceptance Criteria:

Running yarn test averageAcceleration results in tests passing.
You have written a skeleton method for someone else to work on.
You have written tests surrounding your skeleton method.
Running yarn lint does not print any errors to the console!
Optional: write one or two more tests surrounding the method you are solving to account for potential edge cases.

Please include the skeleton of a new method + an accompanying test for someone else to work on at the time of creating a pull request! A pull request will most likely be denied if it does not contain a skeleton method for someone else to work on! For more information, please read the Contributing Guide.
Thank you so much for your contribution!

I'll give it a go!

Thanks @adamjq !


1374 fix

PR resolves #1374

Codecov Report

Merging #1454 into master will decrease coverage by 0.11%.
The diff coverage is 40%.

@@            Coverage Diff             @@
##           master    #1454      +/-   ##
==========================================
- Coverage   98.37%   98.26%   -0.12%
==========================================
  Files          56       56
  Lines        2592     2597       +5
==========================================
+ Hits         2550     2552       +2
- Misses         42       45       +3

the normal start checks the server and then initializes replicaset if its not already.
the fix checks if database is found and throws exception if its not.
then it prints if it contains collections and indexes further, if not prints the same.( exception for collections and indexes yet to be written in common )
this flow-check happens only with bigchaindb start command and not otherwise.

Currently don't have capacity to handle this PR. Sorry.
I'll close for now and reopen once this comes up again.


Badges!

Thanks for the submission, but unfortunately, I won't be merging it at this time. I don't like the idea of hot linking images hosted by 3rd parties.

How about a text link to just the build status somewhere?


Error caused by side-by-side installation not properly configured for your running version of Alibre Design. - DEMO

https://www.alibre.com/version-25-important-information/


Check code style using pre-commit and flake8

I've added a small set of pre-commit hooks, including the flake8 linter, to the project.  Developers can use these hooks by running pre-commit install.  They can bypass the hooks if necessary with git commit -n; see also githooks(5).
I also added a continuous integration (CI) workflow using GitHub Actions.  This workflow gets invoked when pushing changes to a branch on GitHub, when filing a pull request, or manually running the workflow (requires write access to the repository on GitHub).  Right now, the CI workflow only runs the linter via pre-commit, but I plan to add test, build, and deployment jobs that replicate the old Travis CI workflow.  Note that developers can run GitHub Actions locally using act, albeit with some limitations.
Except in one case, I have not actually made any changes to SATOSA's code style.  I've also avoided making changes to how SATOSA gets built and packaged.  Unfortunately, that means the CI workflow currently fails due to a number of flake8 errors.  I'd like to coordinate future changes to address this in a future PR with the core development team and with other contributors (essentially, everyone with an open pull request).
All Submissions:

[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] Have you added an explanation of what problem you are trying to solve with this PR?
[x] Have you added information on what your changes do and why you chose this as your solution?
[x] Have you written new tests for your changes?
[x] Does your submission pass tests?
[x] This project follows PEP8 style guide.

I think I will move forward with this.


Move the detection logic as a configurable scene to be recyclable across multiple usage

Current detection logic is at multiple places such as AI and screen indicator, this is quite inefficient and hard to maintain
Also for weapons such as homing missiles or dragon/funnel system, even the player need to locate enemy targets for weapon to auto aim
So it is necessary to refactor the code logic to move agent detection logic to its own individual module and attach to top agent so all these other modules can pull from share logic

The separation logic is completed, and all downstream module is ported to use that share logic now. Close the issue as it is completed


Don't try to resolve public docker index when blocked

Consider public docker index secure. There's no need for its resolution.
Resolves: rhbz#1224387

Newer pull request replaced this.


refactor hospital admission to use delphi_utils create_export_csv

Changelog
kept the existing method for testing/review purposes

update_indicator function returns dataframe
new function filter output to preprocess before feeding into create_export_csv
run.py now uses create_export_csv

Associated Issue(s)

Partially addresses #1268

I wish there werent so many formatting changes here, it makes it hard to see the real meat of the functionality changes. :(
I believe good chunk of it is auto generated with darker, so that's out of my hand

Honestly my bad for not documenting the darker workflow better -- make your code changes, commit them, then do make format in the indicator you're changing, let it make its formatting changes, and then commit those separately. I didn't think this would be necessary, since its whole premise is that it only formats the lines you touch, but it turned out to be more aggressive about resorting our imports than I thought it would be.

 I didn't think this would be necessary, since its whole premise is that it only formats the lines you touch, but it turned out to be more aggressive about resorting our imports than I thought it would be.

I've been doing running the linter more frequently so some of the commit also have formatting changes, since the ci run checks for lints before the tests and I like to check that all the checks pass within my comments, but I can work on isolating the comments for functional changes and linting for future reference.
But in terms of  the file changed page the default shows all the changes that was made and unless you manually filter out the lint commits. At least that's how I understand how the file changed page works... Is there a workaround that doesn't involve manually filtering?

Is there a workaround that doesn't involve manually filtering?

Not that I know of, but often times looking through the individual commits is good enough for me.

optimziation not really panning out; closing


Dont notify the leave if the serf is not inited

Overlay driver allows local containers to communicate in overly network
even when the serf is not fully inited. But when the container leaves an
overlay network, it gets stuck waiting on a nil notifyCh, when the serf
is not fully initialized.
Signed-off-by: Madhu Venugopal<EMAIL_ADDRESS>

ping @mrjana

LGTM

LGTM


fix bug when scheduled check fails

If a reschedule is scheduled, this crashes due to treating an Exception as an array. This fixes that.

Thanks @dschwartz783 !


Log JSON when redirecting trial output

#168 talks about logging JSON when redirecting trial output. It proposes a fuller, better solution, which is having a "pure" eliot log. This patch is an interim step: it does what the current logging does, except it formats it with json.dumps rather than pformat.

Add news entry, then merge.


build err

Hi,I tried pip install pytorch-fft it succeed,but when i tried build.py it end with err:
No such file or directory:'/tmp/tmpdq7_hm2i/pytorch_fft._ext.th_fft._th_fft.so'
My  os is ubuntu 16.04 and python 3.6 version

Hi, when installing from source, we need the build.py file to have package=False in the call to create_extension (for creating a pip package, it needs to be True).
I've updated this in the repository so that the repo is by default installable from source.


Links published on MQ cause a crash

While working on https://github.com/atlanticwave-sdx/pce/pull/115, when a breakdown is published by sdx-controller, I see a crash on sdx-lc (see below for the backtrace).  I suspect that this is a decoding issue.  Notice that the data read from MQ is bytes (MQ received message:b'{"ingress_port":...), and so this line:
https://github.com/atlanticwave-sdx/sdx-lc/blob/bdbb4038095321b903dfd333fe63bb12095239e9/swagger_server/messaging/topic_queue_consumer.py#L87
... probably should be:
        self.db_instance.add_key_value_pair_to_db(self.message_id, msg_json)

Backtrace:
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:MQ received message:b'{"ingress_port": {"id": "urn:ogf:network:sdx:port:zaoxi:A1:2", "name": "Novi100:2", "short_name": null, "node": "urn:ogf:network:sdx:node:zaoxi:A1", "label_range": null, "status": null, "state": null, "private_attributes": null}, "egress_port": {"id": "urn:ogf:network:sdx:port:zaoxi:B1:1", "name": "Novi01:1", "node": "urn:ogf:network:sdx:node:zaoxi:B1", "short_name": "B1:1", "label_range": ["100-200", "10001"], "status": "up"}}'
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:JSON message
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Got connection message.
sdx-lc      | Exception in thread Thread-4:
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
sdx-lc      |     self.run()
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 917, in run
sdx-lc      |     self.channel.start_consuming()                                                                                [0/1873]
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1883, in start_consuming
sdx-lc      |     self._process_data_events(time_limit=None)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 2044, in _process_data_events
sdx-lc      |     self.connection.process_data_events(time_limit=time_limit)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 851, in process_data_events
sdx-lc      |     self._dispatch_channel_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 567, in _dispatch_channel_events
sdx-lc      |     impl_channel._get_cookie()._dispatch_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1510, in _dispatch_events
sdx-lc      |     consumer_info.on_message_callback(self, evt.method,
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 72, in callback
sdx-lc      |     self.handle_mq_msg(body)
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 87, in handle_mq_msg
sdx-lc      |     self.db_instance.add_key_value_pair_to_db(self.message_id, msg_body)
sdx-lc      |   File "/usr/src/app/swagger_server/utils/db_utils.py", line 36, in add_key_value_pair_to_db
sdx-lc      |     obj = self.read_from_db(key)
sdx-lc      |   File "/usr/src/app/swagger_server/utils/db_utils.py", line 52, in read_from_db
sdx-lc      |     return self.sdxdb[self.db_name][self.config_table_name].find_one(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/collection.py", line 1459, in find_one
sdx-lc      |     for result in cursor.limit(-1):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/cursor.py", line 1248, in next
sdx-lc      |     if len(self.__data) or self._refresh():
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/cursor.py", line 1165, in _refresh
sdx-lc      |     self.__send_message(q)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/cursor.py", line 1052, in __send_message
sdx-lc      |     response = client._run_operation(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/_csot.py", line 105, in csot_wrapper
sdx-lc      |     return func(self, *args, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1330, in _run_operation
sdx-lc      |     return self._retryable_read(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/_csot.py", line 105, in csot_wrapper
sdx-lc      |     return func(self, *args, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1448, in _retryable_read
sdx-lc      |     return func(session, server, sock_info, read_pref)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1326, in _cmd
sdx-lc      |     return server.run_operation(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/server.py", line 100, in run_operation
sdx-lc      |     message = operation.get_message(read_preference, sock_info, use_cmd)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/message.py", line 388, in get_message
sdx-lc      |     request_id, msg, size, _ = _op_msg(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/message.py", line 692, in _op_msg
sdx-lc      |     return _op_msg_uncompressed(flags, command, identifier, docs, opts)
sdx-lc      | bson.errors.InvalidDocument: documents must have only string keys, key was 0

Probably the key is the problem?  Since add_key_value_pair_to_db(key, val) expects a string as key,
https://github.com/atlanticwave-sdx/sdx-lc/blob/bdbb4038095321b903dfd333fe63bb12095239e9/swagger_server/messaging/topic_queue_consumer.py#L87
should be:
 self.db_instance.add_key_value_pair_to_db(str(self.message_id), msg_body)

And then we get another error (from sdx-lc-1):
sdx-lc      | DEBUG:swagger_server.utils.db_utils:Adding key value pair to DB.
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Save to database complete.
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Message ID:0
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Sending connection info to Kytos.
sdx-lc      | Exception in thread Thread-4:
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 200, in _new_conn
sdx-lc      |     sock = connection.create_connection(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
sdx-lc      |     raise err
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
sdx-lc      |     sock.connect(sa)
sdx-lc      | ConnectionRefusedError: [Errno 111] Connection refused
sdx-lc      |
sdx-lc      | The above exception was the direct cause of the following exception:
sdx-lc      |
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 790, in urlopen
sdx-lc      |     response = self._make_request(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 496, in _make_request
sdx-lc      |     conn.request(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 388, in request
sdx-lc      |     self.endheaders()
sdx-lc      |   File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders
sdx-lc      |     self._send_output(message_body, encode_chunked=encode_chunked)
sdx-lc      |   File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output
sdx-lc      |     self.send(msg)
sdx-lc      |   File "/usr/local/lib/python3.9/http/client.py", line 980, in send
sdx-lc      |     self.connect()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 236, in connect
sdx-lc      |     self.sock = self._new_conn()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 215, in _new_conn
sdx-lc      |     raise NewConnectionError(
sdx-lc      | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fc4f42caa60>: Failed to establish a new connection: [Errno 111] Connection refused
sdx-lc      |
sdx-lc      | The above exception was the direct cause of the following exception:
sdx-lc      |
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 486, in send
sdx-lc      |     resp = conn.urlopen(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 844, in urlopen
sdx-lc      |     retries = retries.increment(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 515, in increment
sdx-lc      |     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
sdx-lc      | urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='<IP_ADDRESS>', port=8088): Max retries exceeded with url: /SDX-LC/1.0.0/connection (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc4f42caa60>: Failed to establish a new connection: [Errno 111] Connection refused'))
sdx-lc      |
sdx-lc      | During handling of the above exception, another exception occurred:
sdx-lc      |
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
sdx-lc      |     self.run()
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 917, in run
sdx-lc      |     self._target(*self._args, **self._kwargs)
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 131, in start_consumer
sdx-lc      |     self.channel.start_consuming()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1883, in start_consuming
sdx-lc      |     self._process_data_events(time_limit=None)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 2044, in _process_data_events
sdx-lc      |     self.connection.process_data_events(time_limit=time_limit)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 851, in process_data_events
sdx-lc      |     self._dispatch_channel_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 567, in _dispatch_channel_events
sdx-lc      |     impl_channel._get_cookie()._dispatch_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1510, in _dispatch_events
sdx-lc      |     consumer_info.on_message_callback(self, evt.method,
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 72, in callback
sdx-lc      |     self.handle_mq_msg(body)
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 93, in handle_mq_msg
sdx-lc      |     r = requests.post(str(KYTOS_URL), json=msg_json)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 115, in post
sdx-lc      |     return request("post", url, data=data, json=json, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 59, in request
sdx-lc      |     return session.request(method=method, url=url, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
sdx-lc      |     resp = self.send(prep, **send_kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
sdx-lc      |     r = adapter.send(request, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 519, in send
sdx-lc      |     raise ConnectionError(e, request=request)
sdx-lc      | requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=8088): Max retries exceeded with url: /SDX-LC/1.0.0/connection (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc4f42caa60>: Failed to establish a new connection: [Errno 111] Connection refused'))
sdx-lc      | INFO:werkzeug:<IP_ADDRESS> - - [25/May/2023 21:02:15] "GET / HTTP/1.1" 404 -
sdx-lc      | INFO:werkzeug:<IP_ADDRESS> - - [25/May/2023 21:02:16] "GET /favicon.ico HTTP/1.1" 404 -

While working on atlanticwave-sdx/pce#115, when a breakdown is published by sdx-controller, I see a crash on sdx-lc (see below for the backtrace). I suspect that this is a decoding issue. Notice that the data read from MQ is bytes (MQ received message:b'{"ingress_port":...), and so this line:
https://github.com/atlanticwave-sdx/sdx-lc/blob/bdbb4038095321b903dfd333fe63bb12095239e9/swagger_server/messaging/topic_queue_consumer.py#L87
... probably should be:
        self.db_instance.add_key_value_pair_to_db(self.message_id, msg_json)

Backtrace:
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:MQ received message:b'{"ingress_port": {"id": "urn:ogf:network:sdx:port:zaoxi:A1:2", "name": "Novi100:2", "short_name": null, "node": "urn:ogf:network:sdx:node:zaoxi:A1", "label_range": null, "status": null, "state": null, "private_attributes": null}, "egress_port": {"id": "urn:ogf:network:sdx:port:zaoxi:B1:1", "name": "Novi01:1", "node": "urn:ogf:network:sdx:node:zaoxi:B1", "short_name": "B1:1", "label_range": ["100-200", "10001"], "status": "up"}}'
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:JSON message
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Got connection message.
sdx-lc      | Exception in thread Thread-4:
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
sdx-lc      |     self.run()
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 917, in run
sdx-lc      |     self.channel.start_consuming()                                                                                [0/1873]
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1883, in start_consuming
sdx-lc      |     self._process_data_events(time_limit=None)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 2044, in _process_data_events
sdx-lc      |     self.connection.process_data_events(time_limit=time_limit)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 851, in process_data_events
sdx-lc      |     self._dispatch_channel_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 567, in _dispatch_channel_events
sdx-lc      |     impl_channel._get_cookie()._dispatch_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1510, in _dispatch_events
sdx-lc      |     consumer_info.on_message_callback(self, evt.method,
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 72, in callback
sdx-lc      |     self.handle_mq_msg(body)
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 87, in handle_mq_msg
sdx-lc      |     self.db_instance.add_key_value_pair_to_db(self.message_id, msg_body)
sdx-lc      |   File "/usr/src/app/swagger_server/utils/db_utils.py", line 36, in add_key_value_pair_to_db
sdx-lc      |     obj = self.read_from_db(key)
sdx-lc      |   File "/usr/src/app/swagger_server/utils/db_utils.py", line 52, in read_from_db
sdx-lc      |     return self.sdxdb[self.db_name][self.config_table_name].find_one(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/collection.py", line 1459, in find_one
sdx-lc      |     for result in cursor.limit(-1):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/cursor.py", line 1248, in next
sdx-lc      |     if len(self.__data) or self._refresh():
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/cursor.py", line 1165, in _refresh
sdx-lc      |     self.__send_message(q)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/cursor.py", line 1052, in __send_message
sdx-lc      |     response = client._run_operation(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/_csot.py", line 105, in csot_wrapper
sdx-lc      |     return func(self, *args, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1330, in _run_operation
sdx-lc      |     return self._retryable_read(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/_csot.py", line 105, in csot_wrapper
sdx-lc      |     return func(self, *args, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1448, in _retryable_read
sdx-lc      |     return func(session, server, sock_info, read_pref)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1326, in _cmd
sdx-lc      |     return server.run_operation(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/server.py", line 100, in run_operation
sdx-lc      |     message = operation.get_message(read_preference, sock_info, use_cmd)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/message.py", line 388, in get_message
sdx-lc      |     request_id, msg, size, _ = _op_msg(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pymongo/message.py", line 692, in _op_msg
sdx-lc      |     return _op_msg_uncompressed(flags, command, identifier, docs, opts)
sdx-lc      | bson.errors.InvalidDocument: documents must have only string keys, key was 0

This should be fixed in this PR

Probably the key is the problem? Since add_key_value_pair_to_db(key, val) expects a string as key,
https://github.com/atlanticwave-sdx/sdx-lc/blob/bdbb4038095321b903dfd333fe63bb12095239e9/swagger_server/messaging/topic_queue_consumer.py#L87
should be:
 self.db_instance.add_key_value_pair_to_db(str(self.message_id), msg_body)

And then we get another error (from sdx-lc-1):
sdx-lc      | DEBUG:swagger_server.utils.db_utils:Adding key value pair to DB.
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Save to database complete.
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Message ID:0
sdx-lc      | INFO:swagger_server.messaging.topic_queue_consumer:Sending connection info to Kytos.
sdx-lc      | Exception in thread Thread-4:
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 200, in _new_conn
sdx-lc      |     sock = connection.create_connection(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection
sdx-lc      |     raise err
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection
sdx-lc      |     sock.connect(sa)
sdx-lc      | ConnectionRefusedError: [Errno 111] Connection refused
sdx-lc      |
sdx-lc      | The above exception was the direct cause of the following exception:
sdx-lc      |
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 790, in urlopen
sdx-lc      |     response = self._make_request(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 496, in _make_request
sdx-lc      |     conn.request(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 388, in request
sdx-lc      |     self.endheaders()
sdx-lc      |   File "/usr/local/lib/python3.9/http/client.py", line 1280, in endheaders
sdx-lc      |     self._send_output(message_body, encode_chunked=encode_chunked)
sdx-lc      |   File "/usr/local/lib/python3.9/http/client.py", line 1040, in _send_output
sdx-lc      |     self.send(msg)
sdx-lc      |   File "/usr/local/lib/python3.9/http/client.py", line 980, in send
sdx-lc      |     self.connect()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 236, in connect
sdx-lc      |     self.sock = self._new_conn()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 215, in _new_conn
sdx-lc      |     raise NewConnectionError(
sdx-lc      | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fc4f42caa60>: Failed to establish a new connection: [Errno 111] Connection refused
sdx-lc      |
sdx-lc      | The above exception was the direct cause of the following exception:
sdx-lc      |
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 486, in send
sdx-lc      |     resp = conn.urlopen(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 844, in urlopen
sdx-lc      |     retries = retries.increment(
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 515, in increment
sdx-lc      |     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
sdx-lc      | urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='<IP_ADDRESS>', port=8088): Max retries exceeded with url: /SDX-LC/1.0.0/connection (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc4f42caa60>: Failed to establish a new connection: [Errno 111] Connection refused'))
sdx-lc      |
sdx-lc      | During handling of the above exception, another exception occurred:
sdx-lc      |
sdx-lc      | Traceback (most recent call last):
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
sdx-lc      |     self.run()
sdx-lc      |   File "/usr/local/lib/python3.9/threading.py", line 917, in run
sdx-lc      |     self._target(*self._args, **self._kwargs)
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 131, in start_consumer
sdx-lc      |     self.channel.start_consuming()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1883, in start_consuming
sdx-lc      |     self._process_data_events(time_limit=None)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 2044, in _process_data_events
sdx-lc      |     self.connection.process_data_events(time_limit=time_limit)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 851, in process_data_events
sdx-lc      |     self._dispatch_channel_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 567, in _dispatch_channel_events
sdx-lc      |     impl_channel._get_cookie()._dispatch_events()
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/pika/adapters/blocking_connection.py", line 1510, in _dispatch_events
sdx-lc      |     consumer_info.on_message_callback(self, evt.method,
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 72, in callback
sdx-lc      |     self.handle_mq_msg(body)
sdx-lc      |   File "/usr/src/app/swagger_server/messaging/topic_queue_consumer.py", line 93, in handle_mq_msg
sdx-lc      |     r = requests.post(str(KYTOS_URL), json=msg_json)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 115, in post
sdx-lc      |     return request("post", url, data=data, json=json, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 59, in request
sdx-lc      |     return session.request(method=method, url=url, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
sdx-lc      |     resp = self.send(prep, **send_kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
sdx-lc      |     r = adapter.send(request, **kwargs)
sdx-lc      |   File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 519, in send
sdx-lc      |     raise ConnectionError(e, request=request)
sdx-lc      | requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=8088): Max retries exceeded with url: /SDX-LC/1.0.0/connection (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc4f42caa60>: Failed to establish a new connection: [Errno 111] Connection refused'))
sdx-lc      | INFO:werkzeug:<IP_ADDRESS> - - [25/May/2023 21:02:15] "GET / HTTP/1.1" 404 -
sdx-lc      | INFO:werkzeug:<IP_ADDRESS> - - [25/May/2023 21:02:16] "GET /favicon.ico HTTP/1.1" 404 -

This is normal, because the sdx-lc is trying to connect to kytos, but no kytos server is running.

This is normal, because the sdx-lc is trying to connect to kytos, but no kytos server is running.

If communication failure with Kytos is expected (because of whatever reason), perhaps it is better to catch and log the exception?

I agree. LC should catch this and return gracefully. In general, we should avoid Exceptions as much as possible


Recommendation 6.4.2: Objects should be used for Stateless Interfaces

Kotlin’s object are extremely useful when we need to implement a some interface from an external library that doesn’t have any state.
No need to use class for such structures.
Good example:
interface I {
    fun foo()
}

object O: I {
    override fun foo() {}
}

Do we also need to check the opposite - that classes are preferred over objects when state is needed?


Problem with label encoding

Hi,
I have a python script which calls some warpscript to work on GTS (using py4j module as explained in the documentation). The first part of the python script returns GTS selectors that will be used later. The second part deals with each of them.
The problem I have is that some labels are specific, and there is one case that I can't make it to work.
Let's build a GTS:
NEWGTS
{ 'label' 'foo%3Dbar' } RELABEL
'class' RENAME
TOSELECTOR
'selector' STORE

$selector

> ["class{label=foo=bar}"]

If I call PARSESELECTOR in the same warpscript, everything work as expected:
$selector PARSESELECTOR

> [{"label":"=foo=bar"},"class"]

However, if the selector is saved in a python variable and sent as a character string to a warpscript, PARSESELECTOR is not working as expected (even with proper UTF-8 encoding as documented) :
'class{label=foo%3Dbar}' PARSESELECTOR

> [{"label":"=foo"},"class"]

Any idea of what is going on?
For information, the version I use is 2.2.0
Thank you

When the WarpScript execution environment encounters a STRING definition (characters enclosed in quotes), it will check if the characters include percent encoding, if so it will decode the %hh into the actual characters they represent.
A selector requires that some characters be percent when in class or label name or in label value, namely the equal sign ('=', %3D), the comma (',', %2C) and the closing curly brace ('}', %7D).
In your case your selector STRING only has one level of encoding which is removed by the WarpScript execution environment, the STRING that the call to PARSESELECTOR will be fed as input is 'class{label=foo=bar}', not 'class{label=foo%3Dbar}', you need to have a second level of percent encoding, 'class{label=foo%253Dbar}' if you intend to use the STRING in WarpScript code.
You can use the SNAPSHOT function to see how the STRING should be rendered in WarpScript code to generate the one you want in the end.
In your example, try $selector SNAPSHOT STOP.

Thank you!
If I may suggest to add your comment in the documentation of PARSESELECTOR, it would be really helpful.


Web base loader's fetch pages does not provide way to assign query parameters

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
from langchain_community.document_loaders import WebBaseLoader

web_loader = WebBaseLoader()
pages = await web_loader.fetch_all(urls) # urls being a list of webpages link

Error Message and Stack Trace (if applicable)
No response
Description
The source code assumes that fetching the pages requires no authentication and/or query parameters. This is highly unlikely in practical scenarios where page contents are often protected. The scrape function seems to be using requests_kwargs argument, but the same functionality is also needed for fetch. Currently the source code of fetch function is:
async def _fetch(
        self, url: str, retries: int = 3, cooldown: int = 2, backoff: float = 1.5
    ) -> str:
        async with aiohttp.ClientSession() as session:
            for i in range(retries):
                try:
                    kwargs: Dict = dict(
                        headers=self.session.headers,
                        cookies=self.session.cookies.get_dict(),
                    )
                    if not self.session.verify:
                        kwargs["ssl"] = False
                    async with session.get(url, **kwargs) as response:
                        if self.raise_for_status:
                            response.raise_for_status()
                        return await response.text()
                except aiohttp.ClientConnectionError as e:
                    if i == retries - 1:
                        raise
                    else:
                        logger.warning(
                            f"Error fetching {url} with attempt "
                            f"{i + 1}/{retries}: {e}. Retrying..."
                        )
                        await asyncio.sleep(cooldown * backoff**i)
        raise ValueError("retry count exceeded")

the additional kwargs only takes in headers and cookies, but not parameters or authentication variables. This should be a necessary basic requirement.
System Info
System Information

OS:  Darwin
OS Version:  Darwin Kernel Version 22.6.0: Mon Feb 19 19:43:41 PST 2024; root:xnu-87<IP_ADDRESS>4.6~1/RELEASE_ARM64_T8103
Python Version:  3.12.7 (main, Oct  1 2024, 02:05:46) [Clang 15.0.0 (clang-15<IP_ADDRESS>.5)]

Package Information

langchain_core: 0.3.7
langchain: 0.3.1
langchain_community: 0.3.1
langsmith: 0.1.129
langchain_huggingface: 0.1.0
langchain_ollama: 0.2.0
langchain_openai: 0.2.1
langchain_text_splitters: 0.3.0
langgraph: 0.2.32

Optional packages not installed

langserve

Other Dependencies

aiohttp: 3.10.8
async-timeout: Installed. No version info available.
dataclasses-json: 0.6.7
httpx: 0.27.2
huggingface-hub: 0.25.1
jsonpatch: 1.33
langgraph-checkpoint: 2.0.0
numpy: 1.26.4
ollama: 0.3.3
openai: 1.51.0
orjson: 3.10.7
packaging: 24.1
pydantic: 2.9.2
pydantic-settings: 2.5.2
PyYAML: 6.0.2
requests: 2.32.3
sentence-transformers: 3.1.0
SQLAlchemy: 2.0.35
tenacity: 8.5.0
tiktoken: 0.7.0
tokenizers: 0.20.0
transformers: 4.45.1
typing-extensions: 4.12.2

@bluearrow98 you can use requests_kwargs to pass in the query parameters. But it is not being used in _fetch which I have fixed in above PR.


Feature/psoc64 Merge Cypress PSoC64 code to master

Description

Merge Cypress PSoc64 board related code to master.
Checklist:

[ ] I have tested my changes. No regression in existing tests.
[ ] My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/bot run checks

/bot run checks


Fix artifact tarball sha

tree hash also needed TLC. fixes https://github.com/cjdoris/MicroMamba.jl/issues/9

Seems the MacOS tarballs have changed too
 Downloading artifact: micromamba-0.27.0
┌ Error: Hash Mismatch!
│   Expected sha256:   3c1a5ebb151668ce683fb74073bce5e01740663d5917769adb6d2703441b4531
│   Calculated sha256: 32eb83ad09f9c97c230793ef5572ee8cbcf425bcc3683b0035303867c11025aa
└ @ Pkg.PlatformEngines /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-x64-6.0/build/default-macmini-x64-6-0/julialang  Downloaded artifact: micromamba-0.27.0

for all the other 0.27.0 builds

FYI, you may assume that this is typically the case if the build number changes. In the Conda ecosystem the "full version" is the tuple of (version, build number). The rationale of this is that version should always mirror the upstream's version number and the build number is the version of the build "scripts". For example here we fixed something in the build scripts of micromamba 0.27.0, bumping the build number: https://github.com/conda-forge/micromamba-feedstock/pull/96/files#diff-f3725a55bf339595bf865fec73bda8ac99f283b0810c205442021f29c06eea9a

Switched to the conda-forge urls mentioned above.

Confirm this fixes MacOS

bump

Apologies for the delay. Thanks for the PR, but I am going to use micromamba_jll to supply the executable, for guaranteed availability.


How to properly set the weights for multi-channel image registration?

Hi! I've been recently exploring using Elastix for registering 3-channel 3D stacks and have had a hard time figuring out how to properly set "Weights for multi channel images". The default was given as "1.0, 1.0, 3.0". What does it mean? If i want to register solely based on channel 3, should i set it as (0, 0, 1)?
Thank you for your time!
Best,
Lynn

If i want to register solely based on channel 3, should i set it as (0, 0, 1)?

Yes, exactly: 0,0,1 would only consider channel 3. Does it work as expected?


add "week" translation for vi-vn locale

ValueError: Humanization of the 'weeks' granularity is not currently translated in the 'vi_vn' locale. Please consider making a contribution to this locale.

Codecov Report

Merging #694 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #694   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           9      9
  Lines        1563   1563
  Branches      255    255
=====================================
  Hits         1563   1563

Impacted Files
Coverage Δ

arrow/locales.py
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Update cheatsheet: add interacting with Deployments and Services

Deployments and services can be easier to interact with compared to pods. Generally pods aren't created directly but through other objects such as deployments, where the pod name is inherited from the replicaset.
I've personally found interacting with deployments or services to be easier because I can e.g. know the name of the deployment ahead of time, which isn't necessarily the case with pods. The syntax seemed to be different enough for deployments and services that it could warrant being added to the cheatsheet.

updated CLA

updated CLA

@sftim language here has been updated

@sftim language here has been updated

👋 @notchairmk . Thanks for contributing!
Page preview:
https://deploy-preview-26062--kubernetes-io-master-staging.netlify.app/docs/reference/kubectl/cheatsheet/

/approve


Notification of Discussion taking place in Order Details

Brief Description: There is no notification of dialog happening within the Order Details box on either the Notifications or Messages. The only time I know a buyer is discussing something within each Order Detail box is by opening each order detail, going to the discussion tab and seeing if they've responded.
With this being the only way to communicate with offline clients It'd be great to see notification counts in the Notification button when someone responds specific to an order.

I've already addressed this issue yesterday #1474
It was working the supposed way but it's buggy now for some reason.

Ok. Sorry, i did a search but didnt see anything.

This is being tracked in #372


edit ubiquiti instructions

add to ubiquiti instructions.  Need to type ''save'' to save to the boot
file.

Thank you


FocusScope throws error

🐛 Bug Report
Using FocusScope in a Popover-Component throws the following error:
FocusScope.tsx:466 Uncaught TypeError: Cannot set properties of undefined (setting 'nodeToRestore')     at FocusScope.tsx:466:1     at commitHookEffectListMount (react-dom.development.js:23158:1)     at invokeLayoutEffectMountInDEV (react-dom.development.js:25126:1)     at invokeEffectsInDev (react-dom.development.js:27357:1)     at commitDoubleInvokeEffectsInDEV (react-dom.development.js:27333:1)     at flushPassiveEffectsImpl (react-dom.development.js:27064:1)     at flushPassiveEffects (react-dom.development.js:26989:1)     at commitRootImpl (react-dom.development.js:26941:1)     at commitRoot (react-dom.development.js:26688:1)     at performSyncWorkOnRoot (react-dom.development.js:26122:1)
🤔 Expected Behavior
Throw no error
😯 Current Behavior
throws error, see bug report
🔦 Context

I tried to implement the example, documented for ComboBox with ChakraUI from here:
https://codesandbox.io/s/dreamy-burnell-3i2jy?file=/src/App.tsx

💻 Code Sample

🌍 Your Environment

Software
Version(s)

react-aria
3.19.0

Browser
chrome

Operating System
mac-os

Hey, sorry to hear that, we don't currently support StrictMode. It's on our list of things to do. You can find more info in the dupe of this https://github.com/adobe/react-spectrum/issues/3458. I'll be closing this one as a dupe.


How to specify the IP address to use

Is there an easy way to specifiy the IP address to use for requests?
My server has 8 IPs and it would be useful to be able to use all of them to avoid the 'Too many requests' problem.
If this functionality doesn't exist, perhaps it could be considered for inclusion in future versions (if it isn't already been!)

it's there already, and I use it myself all the time.

You might also want to use a separate cookies file and a different user-agent for each of those IPs so as to appear entirely unique to YouTube

Is there a way for me to set the IP address with the CURLOPT_INTERFACE option?
Thanks for your advice about user-agents and cookie files.

Is there a way for me to set the IP address with the CURLOPT_INTERFACE option?
Thanks for your advice about user-agents and cookie files.

For that, you could just modify Browser.php file:
https://github.com/Athlon1600/youtube-downloader/blob/master/src/Browser.php
and add something like:
    public function usingCustomIP($ip)
    {
        $this->options[CURLOPT_INTERFACE] = $ip;
        return $this;
    }

and then use it:
$youtube = new YouTubeDownloader();
$youtube->getBrowser()->usingCustomIP("YOUR_IP_GOES_HERE");


Database usage high?

Not sure this is an actual issue, but I thought it was interesting to report.
I'm trying to lower the Home Assistant database use to decrease its size and maybe reduce the wear on the SD card. One of the first steps in many tutorials is to check the reports of the DbStats add-on which indicate the largest 'users' of the DB.
On one of the reports, Dantherm comes up as the main user - in my setup it takes the 1st, 3rd and 4th places...
Is this expected and normal? Any way to reduce this?

Hi XilviuX,
I will take a look at it, maybe some of the entities don't need to be recorded at all. The select one could be one of them.
Another way to reduce the storage is to raise the polling frequency.
Tvalley71

I have released a pre-release version that should update the database only when there is a change in an entity's value. Feel free to try it out and see if it affects storage usage.
Tvalley71

Hi XilviuX
I think I have fixed operation_selection, the upper one in your chart, but I don't think I can do anything with all the other entities in regards to size, other than you can raise the poll frequency. You can delete your Dantherm instance and add it again, enter a higher poll frequency, say 30 seconds or even higher.
I will leave the update as a pre-release for the time being, if you will check it out when you get the time.
Best regards
Tvalley71

Thanks for the effort, I just re-setup my unit with the v4 pre-release. I set the refresh to 15 seconds, I'll see in a few days how it looks. Thanks again!


How to import Scala case objects?

I have the following snippet in a project I'm working on:
sealed abstract class CircuitForm(private val value: Int)
  extends Ordered[CircuitForm] {
  def compare(that: CircuitForm): Int = ...
}

final case object ChirrtlForm extends CircuitForm(3)
final case object HighForm extends CircuitForm(2)
final case object MidForm extends CircuitForm(1)
final case object LowForm extends CircuitForm(0)

final case object UnknownForm extends CircuitForm(-1) {
  override def compare(that: CircuitForm): Int = {
    ...
  }
}

How would I import in the LowForm symbol? I need to use it in a context like this:
-- Is this right?
data CircuitForm = CircuitForm @firrtl.CircuitForm
    deriving Class

-- How to import LowForm?

data AnalyzeCircuit = AnalyzeCircuit @tutorial.lesson3.AlterCircuit
   deriving Class

type instance Inherits AnalyzeCircuit = '[Transform]

-- Is this the right type?
inputForm :: Java AnalyzeCircuit CircuitForm
inputForm = LowForm

foreign export java inputForm :: Java AnalyzeCircuit CircuitForm

You have to ask how to do it from Java. Scala objects compile like so:
public final class LowForm$ extends CircuitForm implements scala.Product,scala.Serializable {
  public static LowForm$ MODULE$;
  public static {};
  // ...
}

You can use javap to read the bytecode.

I think we got to something like this:
data CircuitForm = CircuitForm @firrtl.CircuitForm deriving Class
data LowForm = LowForm @firrtl.LowForm$ deriving Class

type instance Inherits LowForm = '[CircuitForm]

foreign import java unsafe "@static firrtl.LowForm$.MODULE$"
  lowForm :: LowForm

lowForm' :: CircuitForm
lowForm' =
  superCast lowForm

Which seems to be working.

I'm getting:
Exception in thread "main" java.lang.NoSuchMethodError: firrtl.LowForm$.MODULE$()Lfirrtl/LowForm$;
	at transforms.transform.AlterCircuit$$fe_inputForm_eta.thunkEnter(AlterCircuit.hs)

Ok, it needed to be @static @field, but it works now!


Inconsistent behavior with absolute IRI prefix in context

I am a bit confused by the following behavior. This will expand the lei prefix as expected:
  proc := ld.NewJsonLdProcessor()
  options := ld.NewJsonLdOptions("")

  doc := map[string]interface{}{
    "@context": []interface{}{
      map[string]interface{}{
        "lei": "urn:lei:",
      },
    },
    "@id": "http://example.com/speakers#Alice",
      "http://www.w3.org/md-odrl-profile/lei": map[string]interface{}{
        "@id": "lei:12345",
      },
   }

  flattenedDoc, err := proc.Flatten(doc, nil, options)
  if err != nil {
    log.Println("Error when flattening JSON-LD document:", err)
    return
  }

  ld.PrintDocument("JSON-LD flattened doc", flattenedDoc)

Result:
JSON-LD flattened doc
[
  {
    "@id": "http://example.com/speakers#Alice",
    "http://www.w3.org/md-odrl-profile/lei": [
      {
        "@id": "urn:lei:12345"
      }
    ]
  }
]

But this will throw an error "Error when flattening JSON-LD document: IRI confused with prefix: Absolute IRI lei:12345 confused with prefix lei":
  proc := ld.NewJsonLdProcessor()
  options := ld.NewJsonLdOptions("")

  ctx := map[string]interface{}{
    "lei": "urn:lei:",
  }
  doc := map[string]interface{}{
    "@id": "http://example.com/speakers#Alice",
      "http://www.w3.org/md-odrl-profile/lei": map[string]interface{}{
        "@id": "lei:12345",
      },
    }

  flattenedDoc, err := proc.Flatten(doc, ctx, options)
  if err != nil {
    log.Println("Error when flattening JSON-LD document:", err)
      return
  }

  ld.PrintDocument("JSON-LD flattened doc", flattenedDoc)

See playground1 and playground2
I can see that there is code in the Context type to explicitly forbid this type of prefix, but should it not be allowed? Trying the same example on the json-ld.org playground also works fine.

@ewintr,
The two examples you provided have slightly different semantics.

The first example contains a document with a prefix defined in the context. Because you don't provide the target context for flattening, the output will not be compacted.
The second example passes the same document without a context. So, from the algorithm's perspective, lei: is not a prefix anymore, but a valid part of an absolute identifier. The subsequent compaction using the provided context gets confused and throws an error. By the way, I tried the same example on JSON-LD playground, and it produces the same error.

In order to get the flattening working, you should either 1) keep the context in the document, so that the prefix is visible to the algorithm, and then pass the context for compaction, as in your second example; or 2) pass the ID in the full form as urn:lei:12345 instead of lei:12345.

Oh, this is very helpful. I now understand better where I went wrong. Thank you for explaining!


Fixed #10929 -- Support a default value for Sum

Added default=None keyword argument to Sum
Added tests for each supported output_field type
Update docs/topics/db/aggregation.txt
https://code.djangoproject.com/ticket/10929

@felixxm I think Simon's idea is great, however I think the more likely search terms to reach/search for when trying to solve this problem would be something to do with "default value" or "base value".
I am definitely happy to include support for expressions in this patch, but I think the kwarg name should still be default.

Adding onto my previous comment, the pattern for a default value for fields is default so I think continuing this pattern would make it easier for those who are not familiar with the framework to find the documentation for this argument. Especially if you do not have too much SQL experience, you wouldn't know what coalesce does.

@felixxm The issues have been fixed.

Superseded by #14026.


Accessors and Mutators

I've changed all of the getter and setter terminology to accessor and mutator, I feel this benefits the article because it's reinforcing a more standard terminology.

[x ] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Hi,
Thanks for this pull request (PR).
Unfortunately, we are marking this PR invalid for hacktoberfest. We believe it does not follow the recommended guidelines:

Quality Standards
In line with Hacktoberfest value #2 (Quantity is fun, Quality is key), we have provided examples of the quality standards we encourage. This applies mainly to beginners.

PRs that are automated e.g. scripted opening PRs to remove whitespace / optimize images.
PRs that are disruptive e.g. taking someone else's branch/commits and making a PR.
PRs that are regarded by a project maintainer as a hindrance vs. helping.
Something that's clearly an attempt to simply +1 your PR count for October.

Learn more at https://hacktoberfest.digitalocean.com/details


[ZeroHeight] Bring into ZH all stories from StoryBook

We decided the opposite and to not include storybook in ZH. We removed all SB links


Change Issuer type from UUID -> String

Change Issuer in TD from UUID (pointing to a location) to a SCAC code

IM says it is the UUID of a Party and mentions a foreign key.
Assuming the change is correct, then could you please confirm that there is no (outcommented) Foreign Key description left as a TODO in the bottom of the SQL?

I think that all foreign keys in the bottom of the SQL should be taken with a grain of salt. That said the outcommented Issuer-constraints have been removed

IM says it is the UUID of a Party and mentions a foreign key.
Assuming the change is correct, then could you please confirm that there is no (outcommented) Foreign Key description left as a TODO in the bottom of the SQL?

I think that all foreign keys in the bottom of the SQL should be taken with a grain of salt. That said the outcommented Issuer-constraints have been removed

I think that all foreign keys in the bottom of the SQL should be taken with a grain of salt.

Indeed. My primary goal was to remove cruft as we become aware of it. :)

That said the outcommented Issuer-constraints have been removed

Thanks.
I am leaving the approval to @raisoman as I have not been involved in the discussions of this change and I cannot find a reference to it at the moment.

I think that all foreign keys in the bottom of the SQL should be taken with a grain of salt.

Indeed. My primary goal was to remove cruft as we become aware of it. :)

That said the outcommented Issuer-constraints have been removed

Thanks.
I am leaving the approval to @raisoman as I have not been involved in the discussions of this change and I cannot find a reference to it at the moment.


Stopwords filter

Description
Edge Case : Since keywords are mainly made by avoiding stopwords, for some cases the keywords extracted do not interpret the meaning of the text exactly.
For example : If text is - "I like sweet apples but I don't like sour apples ", the extracted keywords will say : 'I', 'like', 'sweet', 'sour'. 'apples', with 'apples' being shown as the highest priority keyword. But the meaning gets changed completely if we summarize the keywords.
This issue asks you to work a way around this problem, or brainstorm with me and other interested contributors.
Read : How to use rake_new2
NOTE : This may be a multi-assignee issue
Folder Structure, Function details
Create a folder algorithm_addons in the root directory and write a Python function to work around this problem. If I approve, I will create a function directly in the rake_new2.py main file, with the contributors' name on top of the function.
Example naming convention : algorithm_addons/stopwords_debug.py
Acceptance Criteria

[ ] The .py file must be properly formatted.
[ ] All instructions provided in the Description must be strictly followed.

Definition of Done

[ ] All of the required items are completed.
[ ] Approval by at least 1 mentor.

Time Estimation
Recurring

can you assign me this issue

This looks an interesting problem to work on. Can I try this out? I have few ideas and wanna see if working them out could solve this issue.

This looks like an interesting problem to work on. Can I work on this? I have few ideas and wanna see if working them out could solve this issue.

Sorry for the late reply.
Yes, you may work on this. Assigning you.

This looks like an interesting problem to work on. Can I work on this? I have few ideas and wanna see if working them out could solve this issue.

Sorry for the late reply.
Yes, you may work on this. Assigning you.


Return to user info after deleting device

Is your feature request related to a problem? Please describe.
When deleting multiple devices it's very inconvenient to be thrown to all devices page and having to go back to user page.
Describe the solution you'd like
When deleting device from user page you get back to user page not all devices page.
Describe alternatives you've considered
Open each device page separately.

Devices ("clients" in 1.0 parlance) will be ephemerally created when a user signs in from a new device using our custom Firezone client applications, so this issue will be largely irrelevant going forward.


Concurrency: Hop back to the previous executor after actor calls.

Tasks shouldn't normally hog the actor context indefinitely after making a call that's bound to
that actor, since that prevents the actor from potentially taking on other jobs it needs to
be able to address. Set up SILGen so that it saves the current executor (using a new runtime
entry point) and hops back to it after every actor call, not only ones where the caller context
is also actor-bound.
The added executor hopping here also exposed a bug in the runtime implementation while processing
DefaultActor jobs, where if an actor job returned to the processing loop having already yielded
the thread back to a generic executor, we would still attempt to make the actor give up the thread
again, corrupting its state. This is fixed as well.
rdar://71905765

@swift-ci Please test

Build failed
Swift Test OS X Platform
Git Sha - c4fd8ec9a0efe303cc742410c22da11d76f8ea94

I also had to add TSAN edges to all the places actors transition in and out of running state, so that we don't get spurious data race errors when an actor is accessed by a different thread after we've transitioned a task away from its executor.

@swift-ci Please test

Build failed
Swift Test Linux Platform
Git Sha - b9ee090605029e830ee9f82d18e57b854dcda17d

@swift-ci Please test Linux


Fork the "teacher" module and use HTTPS by default

As seen in http://samnewman.io/blog/2016/05/30/want-to-spell-check-read-the-fine-print/
The "After The Deadline" service does support HTTPS, and it should definitely be used here (as for whether it's sensible to use a web service for something as simple as spell checking is another matter entirely)
It looks like you'd only have to update the URIs in https://github.com/vesln/teacher/blob/master/lib/api.js#L23
It looks like teacher itself is abandoned, having last been updated 4 years ago.

I put up a PR for teacher, though it's unclear if it'll get merged. A quick solution would be to use my PR branch as a dependency:
	"dependencies": {
		"teacher": "paulirish/teacher#patch-1"
	},

But ideally, teacher is forked somewhere a bit more appropriate.
cc @snewman

teacher needs a new maintainer
https://twitter.com/vesln/status/737528819251216384
On 31 May 2016 2:40 PM, "Paul Irish"<EMAIL_ADDRESS>wrote:

I put up a PR for teacher https://github.com/vesln/teacher/pull/5,
though it's unclear if it'll get merged. A quick solution would be to use
my PR branch as a dependency:
"dependencies": {
    "teacher": "paulirish/teacher#patch-1"
},

But ideally, teacher is forked somewhere a bit more appropriate.
cc @snewman https://github.com/snewman
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode-spell-check/issues/33#issuecomment-222591085,
or mute the thread
https://github.com/notifications/unsubscribe/AAJvTw61nAJF7WkXVpkYJlcNDkb7hVENks5qG7vbgaJpZM4IqKMz
.

https://github.com/vesln/teacher/pull/5 is now merged - what's required for this plugin to use the updated version?

+1

if any of you folks want push & npm access to teacher do let me know

@seanmcbreen can you bump the teacher version to 0.1.0 for https requests? Can then update some of the info on the readmes about the web service,

@Tyriar i already did

@vesln I mean for this extension :)

Hi
I just published an updated version of the Spell Checker to use the 0.1.0 version of Teacher.  Thanks @vesln for updating the module and thanks @paulirish for the pull request adding in HTTPS support.  A significant improvement.
I'm closing this issue - re-open if that's the wrong call - I will review all of the other comments/the blog post etc.
Sean

@Tyriar 😀  sorry misread what u wrote


add --mode to create command output

This change :

Adds --mode to create command output
Reduces message from error to info on delete operator roles if no roles are found
Reduces message from error to info on delete oidc provider if no provider is found

Verification

/approve