scipy.interpolate.lagrange implemented through coefficients

Currently scipy.interpolate.lagrange is implemented through multiplying numpy.poly1d factors. Thus the interpolant is saved and evaluated through polynomial coefficients. This is not robust even for a small number of nodes. For example, in my collocation ODE solver, the coefficients can blow up or the interpolant loses accuracy even with 3 nodes (at Gauss points of order 6), when the interval for the interpolant is small.
The following is a proposal for a robust lagrange interpolant. The main difference is that the interpolant is saved and evaluated as linear factors not as polynomial coefficients. It offers robustness (avoid coefficient under- and over-flow) and superior interpolation accuracy with comparable speed. But, it is less accurate for far extrapolation (which is of questionable use) and loses the nice numpy.poly1d interface (like root, derivative, integrals, etc). Thus robust_lagrange might be nice to have as a separate function in addition to scipy.interpolate.lagrange.
import numpy
from scipy.interpolate import lagrange
from scipy.stats import describe

def robust_lagrange(x, y):
    x = numpy.array(x)
    @numpy.vectorize
    def interp(xn):
        dn = xn - x
        r = 0
        for i in range(len(x)):
            d = x[i] - x
            L =   numpy.product(dn[0:i] / d[0:i]) \
                * numpy.product(dn[i+1:] / d[i+1:])
            r = r + L * y[i]
        return r
    return interp

def accuracy_test(name, y1, y2):
    stats = describe(numpy.abs(y1 - y2))
    print('Error for {}'.format(name))
    print('   range:    {}'.format(stats.minmax))
    print('   mean:     {}'.format(stats.mean))
    print('   variance: {}'.format(stats.variance))

# a nasty interpolation problem on a tiny interval
# the correct result is just a line
small = 1e-10
x = [0, small, 2*small, 3*small, 4*small, 5*small, 6*small]
y = [0,     1,       2,       3,       4,       5,       6]

# create the interpolants
f = lagrange(x, y)
g = robust_lagrange(x, y)

print('--- Interpolation accuracy test ---')
z = numpy.linspace(0, 6*small, 10000)
exact = z / small
accuracy_test('scipy interpolant', exact, f(z))
accuracy_test('factored interpolant', exact, g(z))
print()

print('--- Extrapolation accuracy test ---')
z = numpy.linspace(1e-10, 1e-9, 10000)
exact = z / small
accuracy_test('scipy interpolant', exact, f(z))
accuracy_test('factored interpolant', exact, g(z))
print()

Is this different/better from/than BarycentricInterpolator?

@pv: It is different and easier from BarycentricInterpolator. In sum, compared to the base lagrange, BarycentricInterpolator is more accurate while robust_lagrange is more robust against under- and overflows.
BarycentricInterpolator still saves some computed weights. The problem is that the weight computation involves divisions like $wj/(x_j-x_i)$, which can still overflow when the interval itself is small. The robust_lagrange here just saves the nodes and the function values in the closure and never save quantities obtained through division, thus circumvent this problem.
But yours is a very good point. Maybe a scaled version of BarycentricInterpolator will take the best of the both (ie, scale x so that the inner BarycentricInterpolator always runs on the unit interval)?

OK, it is way too late to change the way lagrange works, even if the current implementation is not really up to scratch.  Adding one more way to represent a Lagrange interpolating polynomial is not really desirable. Updating the BarycentricInterpolator  or picking up gh-4674 would be nice. Are you interested in any of these @lzlarryli ?

Thank you for reminding me of this:-) I can try to implement the normalized version according to Sec 7 of https://people.maths.ox.ac.uk/trefethen/barycentric.pdf.
I am not familiar with the rational interpolant mentioned in gh-4674. But I can take a look as well. That would probably be a different step though.

Great, looking forward for a PR! Or two :-)

I think this could be closed as I am not sure there is anything actionable out of this issue.

Thank you for reminding me of this:-) I can try to implement the normalized version according to Sec 7 of https://people.maths.ox.ac.uk/trefethen/barycentric.pdf.

Section 7 of the Trefethen paper deals with numerical stability. There are two points of discussion:

Underflow and overflow when calculating weights
Dealing with when $x=x_k$

Point 1 was addressed in #14255 and point 2 is already handled in the existing code.
https://github.com/scipy/scipy/blob/2e5883ef7af4f5ed4a5b80a1759a45e43163bf3f/scipy/interpolate/_polyint.py#L659-L665
Therefor I'm not sure there is anything left to do here.

@j-bowhay Totally agree. Thank you so much for fixing this.
(My own feeble attempt to fix this has been delayed by my inability to compile scipy on my Mac M1.........)

@j-bowhay Totally agree. Thank you so much for fixing this.

Can't take any credit for the fix here, just going through issues!

(My own feeble attempt to fix this has been delayed by my inability to compile scipy on my Mac M1.........)

Other than the documentation, there is a slack group and a monthly new contributors meeting (announced on the mailing list) where I am sure there are plenty of people who would help if you have exhausted the documentation :smile:


[Application Insights] az monitor app-insights component update: Update consent message.

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:
docker run -it microsoft/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/jsntcy/azure-cli-extensions.git@update-consent-message#subdirectory=src/$EXT&egg=$EXT"


WIP - Patchelf

Small issue with patchelf,
to reproduce simply
stack --nix build && stack --nix exec -- jarify hello

You will get
stat: No such file or directory
jarify: readCreateProcess: patchelf "-set--rpath '$ORIGIN'" (exit 1): failed

That's unsurprising. You're passing a single argument to patchelf, called "-set--rpath '$ORIGIN' /path/to/hello", instead of 3 arguments, as I think you intended.


python311Packages.lazr-config: 2.2.3 -> 3.0; python311Packages.lazr-delegates: 2.0.4 -> 2.1.0; rename

Description of changes
part of #245383
Changelog: https://git.launchpad.net/lazr.config/tree/NEWS.rst?h=3.0
Changelog: https://git.launchpad.net/lazr.delegates/tree/NEWS.rst?h=2.1.0

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[x] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 265243 at 62ea8683 run on x86_64-linux 1

6 packages built successfully:

mailman
mailman-hyperkitty
python310Packages.lazr-config
python310Packages.lazr-delegates
python311Packages.lazr-config
python311Packages.lazr-delegates


Integrate Repology Class with Buildbot

Reference(s):

https://docs.buildbot.net/current/manual/configuration/changesources.html#choosing-a-change-source
https://docs.buildbot.net/current/manual/configuration/changesources.html#pbchangesource
https://docs.buildbot.net/current/manual/customization.html#writing-a-notification-based-change-source

I'm thinking I'll need to create the following custom objects:

[ ] Change Source
[ ] Scheduler

Source: https://github.com/oxr463/alpine-buildbot/blob/master/master.cfg

See: https://github.com/buildbot/buildbot/tree/master/master/buildbot/changes

Reference(s):

https://stackoverflow.com/a/39753902/8507637


feat: add SecRuleUpdateActionById directive

what

adds SecRuleUpdateActionById directive

why

we need it sometimes

references

#929

After finding why my tests didn't worked (https://github.com/corazawaf/coraza/pull/1183), now this is ready to go.


Fixed server CPU usage

Added delay for fixing 100 CPU core usage for server.
Also fixed return code.

Looks fine but spacing looks bad.
Seems like project uses to tabs so let's stick to them for now.


Issue of sympy__sympy-17630 has two PRs.

Describe the bug
https://github.com/sympy/sympy/issues/12938 has two issues.
For the first issue, the right PR is https://github.com/sympy/sympy/pull/12957, and not https://github.com/sympy/sympy/pull/13031/
Steps/Code to Reproduce

Expected Results

Actual Results

System Information
No response

Closing. See response in #264 for a discussion of why this kind of fix is out of scope.


New Settings Modal

Overview
As a user, I want there to be a way to view and alter my global settings while using app.shapeshift.com
Settings Button
As a user, I want a button to select that will open all of my possible settings and allow me to alter them

A “Settings” Button should be added at the bottom of the most lefthand panel. ([Mockup](https://www.sketch.com/s/27b0a43c-af7b-44c9-9736-19d18903d78a/a/PGeQxOP))

This settings button is above the “Submit Feedback” Button

The “Light Theme” Button should be removed

The “Terms of Service” and “Privacy Policy” links should be removed as well (to be added back in a later section)

When the button is clicked the settings modal will open with the following sections: ([Mockup](https://www.sketch.com/s/27b0a43c-af7b-44c9-9736-19d18903d78a/a/PGeQxOP))

“Light Mode”

This section will allow users to toggle between a light or dark mode theme.

ii. “Currency”

The chosen currency is displayed along the right with the ability to click into it to make any changes.
When selected the next modal screen populates with a list of all possible fiat currencies a user may select. ([Mockup](https://www.sketch.com/s/27b0a43c-af7b-44c9-9736-19d18903d78a/a/VrAQ48l))

Note that the selected currency remains at the top with a blue checkmark next to it
Once a currency is selected the user can return to the initial settings modal by clicking the back button on the top left of the modal

How to handle various currency formats?  “.” vs. “,”.  10,000 vs 10.000.

Use a free API for currency conversion to retrieve a fiat spot price. But have everything denoted in USD.  Please reach out to @asamere(github)/@adamfox(discord) with questions on this specific part

iii. “Language”

The chosen Language is displayed along the right with the ability to click into it to make any changes.
When selected the next modal screen populates with a list of all possible languages a user may select.([Mockup](https://www.sketch.com/s/27b0a43c-af7b-44c9-9736-19d18903d78a/a/g0nmA8a))

Note that the selected language remains at the top with a blue checkmark next to it
Once a language is selected the user can return to the initial settings modal by clicking the back button on the top left of the modal

iv. “Balance Threshold”

The chosen threshold is displayed along the right in a textbox that the user is able click into it to make any changes.

This should apply to all currencies that are supported.

Place a tooltip next to “Balance Threshold”

Copy: "Hide balances below this value”

v. “Privacy Policy”

Clicking this will link to [https://app.shapeshift.com/legal/privacy-policy](https://app.shapeshift.com/legal/privacy-policy)

vi. “Terms of Service”

Clicking this will like to https://app.shapeshift.com/legal/terms-of-service

Reference
This will be done in the web codebase. Additional information can be discussed in engineering standups M-F 10:00 MST. (https://discord.gg/shapeshift)
Acceptance Criteria
A/C: A new settings button is added that opens the settings modal described in detail in the Overview above.
Screenshots/Mockups
Settings Modal: https://www.sketch.com/s/27b0a43c-af7b-44c9-9736-19d18903d78a/a/PGeQxOP
Language Settings: https://www.sketch.com/s/27b0a43c-af7b-44c9-9736-19d18903d78a/a/g0nmA8a
Currency Settings: https://www.sketch.com/s/27b0a43c-af7b-44c9-9736-19d18903d78a/a/VrAQ48l
Ownership

[X] If my bounty needs engineering or needs product I have added the respective labels on the right
[X] As the sponsor of this bounty I will review the changes in a preview environment (ops/product) or review the PR (engineering)

Bounty Hunters

Join our discord
Include an expected timeline for you to complete work in the work plan when you apply for this bounty!
Please refer to this link for some basic info

@SS-FOX-McCloud this all looks really good and well specced out. @stackedq is going to take this one after his great work on the tx history page and other features.
few things that we can do to get this going right now

we can't do the currency selection yet until we engineer a way to get historical fiat to fiat pricing for market data, i.e. we can't easily get obscure fiat pricing for assets, especially the long tail, but we can get USD -> arbitrary currency, and map that way.
the language selection will be limited to the languages we currently support here https://github.com/shapeshift/web/tree/develop/src/assets/translations which i'm sure product will be fine with

i did a handoff with @stackedq and he's going to give us an estimate and get started on this

@stackedq - all ready for you!


[BUG] Run the report first

@marcinc hi, it's me again, not sure if this goes here or if I should ask it on the community chat.
Short issue description
So after having (i hope) correctly applied the deployments files, krane does start but it keeps crashing with the following error:

The message in itself is obvious... I did look into the scripts and I saw that the code does try to run a report first... I guess it's failing? But there are no additional logs to debug.  So, i am not entirely sure if this is a misconfiguration from my side or if it's a bug.

Krane version: latest
redisgraph version: 1.99.7
OS (Linux/Mac/Windows..): centos7
Docker version 18.06.2
Kubernetes version: 1.17.4

Hi @Joseph94m. Welcome back and thanks for the issue report. We’ll look into thiis. Could be some sort of race condition.


How does streaming from Kafka engine table work internally?

I'd like to understand what happens when I create

MergeTree Engine table as data storage (A)
Kafka Engine table as Kafka consumer (B)
Materialized view as stream from B to A

In materialized view I GROUP BY toDate(datetime_column)
What does it mean internally. How does it "window" data consumed from Kafka toDate? I guess the consumer tries to consume data ASAP, are they then held in some tmp file so they can be aggregated per day?
Consider first kafka message consumed at 1 am, second message at 11 pm. Those are two messages I want to be grouped into 1 (by toDate()) when inserted into table A. So how does it ClickHouse do for such window like 24h?

It works pretty much similar to how MV works on inserted data. The query is applied per each new block.
From MV docs:

A materialized view is arranged as follows: when inserting data to the table specified in SELECT, part of the inserted data is converted by this SELECT query, and the result is inserted in the view.
A SELECT query can contain DISTINCT, GROUP BY, ORDER BY, LIMIT... Note that the corresponding conversions are performed independently on each block of inserted data. For example, if GROUP BY is set, data is aggregated during insertion, but only within a single packet of inserted data. The data won't be further aggregated. The exception is when using an ENGINE that independently performs data aggregation, such as SummingMergeTree.
— SQL Reference → Create

From Kafka docs:

To improve performance, received messages are grouped into blocks the size of max_insert_block_size. If the block wasn't formed within stream_flush_interval_ms milliseconds, the data will be flushed to the table regardless of the completeness of the block.
— Table Engines → Integratiosn → Kafka

To answer your last question. You would create a SummingMergeTree or a AggregatingMergeTree table and insert data into that table. The table engine will take care of grouping messages properly.
Kafka Engine documentation has an actual example for your question.

Thank you for response, that makes it clear!


Project link fixes

Make sure styling of donation and PM links works when its an unknown website
Fix bug that prevented editing projects with blank PM or donation link

Fixes https://github.com/Hylozoic/hylo-evo/issues/1286


[Docs]: Priorities feature

Type
Improvement idea
What do you want to report?
Add job and pipeline (global) priority and job feature
Code of Conduct

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

Review link: https://storage.googleapis.com/sem-docs/main/index.html#/docs/using-semaphore/jobs%23priority

@AleksandarCole I clarified the explanation in #107


Add script_api file for Defold

Necessary only for native extensions. Here is the Lua interface with annotations, so I close the ticket.


[Testing Infrastructure] Kyber Reserve Customization

Pull Request Test Coverage Report for Build 6036

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

Totals

Change from base Build 6026:
-0.09%

Covered Lines:
802

Relevant Lines:
802

💛  - Coveralls


SAA-1536 deprecated heavy hitting endpoint with the plan to remove when given all clear.

This flags the GET activities/{ID} as deprecated with the plan to remove it in the near future once we are happy it is no longer used.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (757d449) 86.98% compared to head (976fb22) 86.98%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #773   +/-   ##
=========================================
  Coverage     86.98%   86.98%
  Complexity     3450     3450
=========================================
  Files           358      358
  Lines         11986    11986
  Branches       1001     1001
=========================================
  Hits          10426    10426
  Misses         1093     1093
  Partials        467      467

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Issue with dynamic columns

Hi, I'm having an issue with (i think) dynamic columns,
Getting this error:
angular.js:13920 TypeError: Cannot read property '0' of undefined
     at http://localhost/MyApp/Scripts/fixed-table-header.js:86:52
     at Array.forEach (native)
     at updateCells (http://localhost/MyApp/Scripts/fixed-table-header.js:77:21)
     at Scope.$digest (http://localhost/MyApp/Scripts/angular.js:17524:23) ....

Not sure where to look, or what to fix.  Any help?
var cell = cells.original[index];
var style = $window.getComputedStyle(cell[0]);  **// **This line fails.****

here is the header

      <input type="checkbox" ng-click="ToggleAllItems(!listtoggle)" style="vertical-align: middle" />

      Compare

        {{GetColumnHeader(x.ColumnName)}}

      <input ng-model="Search[x.ColumnName]" class="form-control input-xs" style="width: 100px">

Hi, I have the same problem.
I have debugged your script a little, and concluded that the problem is here:
function updateCells() {         var cells = {           clone: getCells(header.clone),           original: getCells(header.original)         };
For some reason, the method getCells populates the clone property of cells correctly, but not original. Original is undefined, and when you try to access it by index, it throws an error. Tried debugging getCells method, but unfortunately, I'm new to angular and couldn't figure it out.
Really love your plugin, it's exactly what I need, and it's trivial to use, but unfortunately, have to disable it for now. The original header is hidden, but the cloned header is not rendered in the ::before pseudoelement due to the script breaking.


LoginException: 400 Client Error: Bad Request for https://api.robinhood.com/oauth2/token/

As of 2019/5/3 15:25 (UTC +2), I have been getting the following robinhood_crypto_api.robinhood_crypto_api.LoginException:
400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 133, in session_request
    resp.raise_for_status()
  File "requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 157, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 50, in function_reauth
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 40, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 137, in session_request
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 133, in session_request
    resp.raise_for_status()
  File "requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 157, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 50, in function_reauth
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 40, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 137, in session_request
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 133, in session_request
    resp.raise_for_status()
  File "requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./robinhood.py", line 39, in <module>
    r = RobinhoodCrypto('**************', '****************')
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 103, in __init__
    _access_token = self.get_access_token(self.username, self.password)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 162, in get_access_token
    raise LoginException()
robinhood_crypto_api.robinhood_crypto_api.LoginException

Had been busy, unfortunately didn't check my script and notice till today.
Any ideas?

I did double-check my credentials.

I found a similar issue on Jamonek's repo. aamazie claims he has resolved this in his fork. I believe this is the relevant commit. I don't understand the code at first glance. Maybe this information will help you. If not, I will try to work on it when I find some more free time.

i will work on it during the weekend. Thanks for reporting this

hi, the current master now supports the mfa use case : https://github.com/wang-ye/robinhood-crypto/commit/bc6daecd6127625e7d0b3544d461219e0c54fcab

Hi wang-ye, I had been busy with school and just got a chance to test this.
It is possible that something else changed since you fixed this, or maybe I am overlooking something about how to use MFA authentication.
However, I'm still getting the same error as before with your latest code:
400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 129, in session_request
    resp.raise_for_status()
  File "requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 180, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 51, in function_reauth
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 41, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 133, in session_request
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 129, in session_request
    resp.raise_for_status()
  File "requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 180, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 51, in function_reauth
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 41, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 133, in session_request
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 129, in session_request
    resp.raise_for_status()
  File "requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./robinhood-csv.py", line 28, in <module>
    r = RobinhoodCrypto('**************', '**************')
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 99, in __init__
    _access_token = self.get_access_token(self.username, self.password)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 187, in get_access_token
    raise LoginException()
robinhood_crypto_api.robinhood_crypto_api.LoginException

I just checked and verified that self.GenerateDeviceToken() is indeed running and returning a device_token to self.device_token. It looks legit - it's a dash-separated hex value with digits {8}-{4}-{4}-{4}-{12}.
Nevertheless, I am still getting the LoginException.

Okay, I just noticed I got a bunch of SMS verification codes from Robinhood - so I think that's the issue. You need to handle the challenge somehow. See lines 166-180 in aamazie's fork of Jamonek's repo.

Did you type in the verification codes in the terminal? https://github.com/wang-ye/robinhood-crypto/commit/bc6daecd6127625e7d0b3544d461219e0c54fcab#diff-7f3fc7d4172fcd78eb5c5dc07ac78047R181

I am never prompted for a verification code.
Using the latest code, I get an error due to self.device_token not being initialized.
>>> from robinhood_crypto_api import RobinhoodCrypto
>>> r = RobinhoodCrypto('**************', '**************')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 98, in __init__
    _access_token = self.get_access_token(self.username, self.password)
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 163, in get_access_token
    if not self.device_token:
AttributeError: 'RobinhoodCrypto' object has no attribute 'device_token'

If I add self.device_token = None between lines 94 & 95, it gets a little further, but then I receive the LoginException before being prompted for any verification code:
>>> from robinhood_crypto_api import RobinhoodCrypto
>>> r = RobinhoodCrypto('**************', '**************')
400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 129, in session_request
    resp.raise_for_status()
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 180, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 51, in function_reauth
    raise e
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 41, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 133, in session_request
    raise e
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 129, in session_request
    resp.raise_for_status()
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 180, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 51, in function_reauth
    raise e
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 41, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 133, in session_request
    raise e
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 129, in session_request
    resp.raise_for_status()
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 99, in __init__
    _access_token = self.get_access_token(self.username, self.password)
  File "robinhood-crypto/robinhood_crypto_api/robinhood_crypto_api.py", line 187, in get_access_token
    raise LoginException()
robinhood_crypto_api.robinhood_crypto_api.LoginException

On my local run I got the MFA prompt.
Ideally, if given the correct parameters, the api call at line 180 should not throw an exception.
Could you print out the payload parameters and try to simulate a request in postman?

Hmm, interesting. I installed Postman, but I've never used it before. I used to use the Live HTTP Headers Firefox plugin, so I assume it's something similar to that. I'm pretty busy with schoolwork right now, but I'll try to dig deeper as soon as I can find and I'll let you know if I can find any clues about what could be causing this problem.

Sorry for the delay! I have been busy and was also procrastinating learning Postman.  Here is the full output with httplib and requests debugging. I did receive the SMS code right after making this request.
DEBUG:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.robinhood.com
send: b'CONNECT api.robinhood.com:443 HTTP/1.0\r\n'
send: b'\r\n'
send: b'POST /oauth2/token/ HTTP/1.1\r\nHost: api.robinhood.com\r\naccept-encoding: gzip, deflate\r\naccept-language: en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5\r\ncontent-type: application/json\r\nconnection: keep-alive\r\norigin: https://robinhood.com\r\nuser-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36\r\naccept: */*\r\nContent-Length: 268\r\n\r\n'
send: b'{"password": "**************", "username": "**************", "grant_type": "password", "scope": "internal", "client_id": "****************************************", "expires_in": 86400, "device_token": "********-****-****-****-************", "challenge_type": "sms"}'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Date: Wed, 31 Jul 2019 05:08:14 GMT
header: Content-Type: application/json
header: Content-Length: 300
header: Connection: keep-alive
header: Server: openresty
header: Allow: POST, OPTIONS
header: X-Robinhood-API-Version: 0.0.0
header: Content-Security-Policy: default-src 'none'
header: X-Frame-Options: SAMEORIGIN
header: x-content-type-options: nosniff
header: x-xss-protection: 1; mode=block
header: Access-Control-Allow-Origin: https://robinhood.com
header: Vary: Origin
DEBUG:requests.packages.urllib3.connectionpool:https://api.robinhood.com:443 "POST /oauth2/token/ HTTP/1.1" 400 300
DEBUG:robinhood_crypto_api.robinhood_crypto_api:Error in session request calls. Request body b'{"password": "**************", "username": "**************", "grant_type": "password", "scope": "internal", "client_id": "****************************************", "expires_in": 86400, "device_token": "********-****-****-****-************", "challenge_type": "sms"}', headers {'accept-encoding': 'gzip, deflate', 'accept-language': 'en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5', 'content-type': 'application/json', 'connection': 'keep-alive', 'origin': 'https://robinhood.com', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36', 'accept': '*/*', 'Content-Length': '268'}, content b'{"detail":"Request blocked, challenge issued.","challenge":{"id":"********-****-****-****-************","user":"********-****-****-****-************","type":"sms","alternate_type":"email","status":"issued","remaining_retries":3,"remaining_attempts":3,"expires_at":"2019-07-31T01:13:14.631101-04:00"}}'
ERROR:robinhood_crypto_api.robinhood_crypto_api:400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 141, in session_request
    resp.raise_for_status()
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
ERROR:robinhood_crypto_api.robinhood_crypto_api:400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 192, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 63, in function_reauth
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 53, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 145, in session_request
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 141, in session_request
    resp.raise_for_status()
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/
Traceback (most recent call last):
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 192, in get_access_token
    data = self.session_request(RobinhoodCrypto.ENDPOINTS['auth'], json_payload=payload, timeout=5, method='post', request_session=auth_session)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 63, in function_reauth
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 53, in function_reauth
    res = f(*args, **kwargs)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 145, in session_request
    raise e
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 141, in session_request
    resp.raise_for_status()
  File "/usr/lib/python3.7/site-packages/requests/models.py", line 909, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.robinhood.com/oauth2/token/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 111, in __init__
    _access_token = self.get_access_token(self.username, self.password)
  File "robinhood_crypto_api/robinhood_crypto_api.py", line 199, in get_access_token
    raise LoginException()
robinhood_crypto_api.robinhood_crypto_api.LoginException

Below is a comparison between the failed authentication request made by robinhood-crypto with the successful one made by aamazie's Robinhood fork. Both requests resulted in receiving an SMS authentication code.  I think I've figured it out. I just noticed that aamazie/Robinhood's request is also met with an HTTP/1.1 400 Bad Request response! He's using a:
try:
  res = self.session.post(endpoints.login(), data=payload, timeout=15)
  ...
  res2 = self.session.post(sms_challenge_endpoint, data=challenge_res, timeout=15)
  res2.raise_for_status()
  res3 = self.session.post(endpoints.login(), data=payload, timeout=15)
  res3.raise_for_status()
except requests.exceptions.HTTPError:
  raise RH_exception.LoginFailed()

You're doing```
:
try:
resp = session.request(method, url, json=json_payload, timeout=timeout)
resp.raise_for_status()
except Exception as e:
...
raise e

In other words, we _should_ expect a "bad request" response the first time, when the challenge is issued. Then we need to set the X-ROBINHOOD-CHALLENGE-RESPONSE-ID header, respond to the challenge, and finally attempt a second login. Because you are calling `resp.raise_for_status()` for _every_ request, it's causing the error to be raised and the program to terminate before the user can be prompted to provide the SMS code. You also need to add an endpoint for the challenge, send it a POST request after the initial failed login, and finally make the second login request.

Hey doctorcolossus/wang-ye, did you ever find a solution to the SMS issue?
I am having the same issue with the LoginException, where I am not prompted to input my MFA prompt. I still get the SMS message from robinhood, but I get the login error at line 187 before I can input the code.
Thanks

I described what needs to be changed in my last comment - handle or ignore the first one (or two? iiirc) HTTP "400 Bad Request" responses. I am not sure when I'll have time to work on a fix, as I'm traveling now and busy with another project, then starting a new semester at school in a couple of weeks. I'm hoping wang-ye will find time, but if he doesn't and I find some time during next semester, I will have a go at it and report back here.

I had the same problem with the login exception. I was getting the SMS from Robinhood and everything you guys are describing. But still, I wasn't prompt to input my MFA. What I figure was that the Robinhood Two-Factor Authentication was off in my setting, even though I was getting SMS. When I turned that setting on in Robinhood the login started working and asking for the MFA. It is counter-intuitive because I was getting the SMS from Robinhood. I hope that helps some of you guys.


Add cvui::mouseLocation() + update interaction-area example

You might prefer an API cvui::mouse instead of cvui::mouseLocation()
Tell me your thoughts

Thanks for the PR! I will review it as soon as I have some time.


GitHub repo with ssh:// url does not work

Running codecovcli on a repo checked out from GitHub using a<EMAIL_ADDRESS>is giving "405 Not Allowed" error when uploading the report.
Codecovcli was also logging:
codecov": warning - 2024-03-26 13:45:52,145 -- Service not found: None. Possible services are ['github', 'gitlab', 'bitbucket', 'github_enterprise', 'gitlab_enterprise', 'bitbucket_server']

The "parse_git_service()" function only supports URLs that starts with "https://" or "git@".
Our URL starts with "ssh://", so it's not recognized in the code.


[✨] add property named include for qwikVite using glob pattern file matching

Is your feature request related to a problem?
In Astro, you can use multiple JSX based frameworks, including Qwik.
https://github.com/QwikDev/astro/issues/13
Unfortunately, additional config is needed for multiple JSX frameworks to work together.
The Astro docs approach to doing this is an include option with a glob pattern of where the framework component files are.
import { defineConfig } from 'astro/config';
import preact from '@astrojs/preact';
import react from '@astrojs/react';
import svelte from '@astrojs/svelte';
import vue from '@astrojs/vue';
import solid from '@astrojs/solid-js';

export default defineConfig({
  // Enable many frameworks to support all different kinds of components.
  // No `include` is needed if you are only using a single framework!
  integrations: [
    preact({
      include: ['**/preact/*']
    }),
    react({
      include: ['**/react/*']
    }),
    solid({
      include: ['**/solid/*'],
    }),
    qwik({ /* haven't set this up yet */ })
  ]
});

This is needed to prevent conflicts and ensure correct processing when using multiple JSX frameworks in the same project, as each framework can handle its own specific files/folders.
What this also means is each integration must customize this option under the hood.
For example, in the Solid integration they do this:
plugins: [ solid({ include, exclude, dev: isDev, ssr: true }),    {
name:
  '@astrojs/solid:config-overrides', enforce : 'post', config() {
    return {
    esbuild : {  // To support using alongside other JSX frameworks, still let
   // // esbuild compile stuff. Solid goes first anyways. include:
   // /\.(m?ts|[jt]sx)$/,       },      };     },    },
],

And then in their vite plugin:
export interface Options {
  /**
   * A [picomatch](https://github.com/micromatch/picomatch) pattern, or array of patterns, which specifies the files
   * the plugin should operate on.
   */
  include?: FilterPattern;

Which uses this library:
https://github.com/micromatch/picomatch
Describe the solution you'd like
An include option that can be taken directly from the astro config and supplied to qwikVite
For example:
import { defineConfig } from 'astro/config';
import preact from '@astrojs/preact';
import react from '@astrojs/react';
import svelte from '@astrojs/svelte';
import vue from '@astrojs/vue';
import solid from '@astrojs/solid-js';
import qwik from '@qwikdev/astro';

export default defineConfig({
  // Enable many frameworks to support all different kinds of components.
  // No `include` is needed if you are only using a single framework!
  integrations: [
    preact({
      include: ['**/preact/*']
    }),
    react({
      include: ['**/react/*']
    }),
    solid({
      include: ['**/solid/*']
    }),
    qwik({ include: ['**/qwik/*'] })
  ]
});

// up top
export default function createIntegration(include): AstroIntegration

plugins: [
  qwikVite({
    include
  }),
],

Describe alternatives you've considered
Being fixed in Astro core. This does seem like a separation of concerns issue. Renderers should not be able to perform actions with files other renderers, especially when it knows their entrypoints.
That said, I am unsure of how this implementation would look on the Astro side.
Additional context
No response

Seems like this has been roslved with https://github.com/QwikDev/astro/pull/20 and should be closed?

Seems like this has been roslved with QwikDev/astro#20 and should be closed?

I believe the initial scaffolding was set up, but we still need the include option with the wildcard paths for qwikVite.

The include would definitely be required because JSX needs to be compiled correctly for each framework. That part has to be configured by the user because it happens during Vite’s compilation stage instead of during rendering.

OK, want to take a stab at a PR?


ion shell does not build

I know this is a bit of a long shot, but any ideas why this fails for me? I started up a ubuntu:latest docker container, wgetted the latest release of nix-portable, then ran ./nix-portable nix build github:gytis-ivaskevicius/ion-shell#ion-shellac -L -v. This builds until it hits the following error:
ion-shell-vendor.tar.gz> error: failed to sync
ion-shell-vendor.tar.gz> Caused by:
ion-shell-vendor.tar.gz>   failed to copy over vendored sources for: ab_glyph_rasterizer v0.1.4
ion-shell-vendor.tar.gz> Caused by:
ion-shell-vendor.tar.gz>   failed to create directory `ion-shell-vendor.tar.gz/ab_glyph_rasterizer`
ion-shell-vendor.tar.gz> Caused by:
ion-shell-vendor.tar.gz>   File exists (os error 17)
ion-shell-vendor.tar.gz> Traceback (most recent call last):
ion-shell-vendor.tar.gz>   File "/nix/store/l2c8c8jpnic6csbqsdlwi71yb4j7q4zi-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 42, in <module>
ion-shell-vendor.tar.gz>     main()
ion-shell-vendor.tar.gz>   File "/nix/store/l2c8c8jpnic6csbqsdlwi71yb4j7q4zi-cargo-vendor-normalise/bin/.cargo-vendor-normalise-wrapped", line 17, in main
ion-shell-vendor.tar.gz>     assert list(data.keys()) == ["source"]
ion-shell-vendor.tar.gz> AssertionError

Any idea what to make of this? This builds on x8664 linux. In any case this project is very cool! Thanks for putting in the time and effort to make this functional.

This could be the associated issue: https://discourse.nixos.org/t/does-cargo-tooling-pick-up-wrong-crate-name-or-is-it-just-me/2769
The functionality of cargo-vendor was upstreamed to cargo itself: https://github.com/alexcrichton/cargo-vendor
I dont find a file with an assert in line number 17 in the upstream cargo, so it looks at least like some of the dependencies of nix-portable need an update.
However I am quite new to nix, so I dont know how to investigate how cargo is invoked.

At least in a virtual machine with instantOS install (Arch derivate) on 5.10.32-1-lts x86_64 I get an infinite loop with
NP_DEBUG=1 ../nix-portable nix build &> debug.log.
With only using ../nix-portable nix build compilation works, but somehow only uses 1 CPU core, which is very slow.
It would be great, if this would "simply work" to let people test CIs. Unfortunately I dont have this experience.

For nixOS newcomers there is also missing 1. a super-simple nix intro with examples to copy (ideally as link to the official wiki for flakes), 2. a simple guide what stuff works and is tested and what doesnt (link to CI would also work here).

Any idea what to make of this? This builds on x8664 linux. In any case this project is very cool! Thanks for putting in the time and effort to make this functional.

I just tested and this error only happens when proot is used as runtime. Sadly inside a standard docker container only proot works, since no userns are available.

This could be the associated issue: https://discourse.nixos.org/t/does-cargo-tooling-pick-up-wrong-crate-name-or-is-it-just-me/2769

I don't think the linked issue is related. The error of the current issue looks quite different:
failed to create directory `ion-shell-vendor.tar.gz/ab_glyph_rasterizer`

At least in a virtual machine with instantOS install (Arch derivate) on 5.10.32-1-lts x86_64 I get an infinite loop with
NP_DEBUG=1 ../nix-portable nix build &> debug.log when bwrap tries to --bind a bunch of folders (I guess for read-write access or to duplicate the content?).

If you could provide some more information, like what exactly you are building etc, that would be helpful. Also we should track this problem in a separate issue.

For nixOS newcomers there is also missing 1. a super-simple nix intro with examples to copy (ideally as link to the official wiki for flakes)

Including a link to the official wiki is a good idea. We shouldn't duplicate any standard nix stuff here.

a simple guide what stuff works and is tested and what doesnt (link to CI would also work here).

There is already Drawbacks / Considerations and Missing Features in the readme. We could add a point Known Issues.

If you could provide some more information, like what exactly you are building etc, that would be helpful. Also we should track this problem in a separate issue.

I tried to reproduce this issue inside a virtual machine and wanted to get the logs. However the logs showed at last bubblewrap trying to --bind a bunch of folders, which looks like it never finished. I wanted to clarify first how things are tested and if something is known to (not) work inside virtual machines.
[I wanted a "clean" test environment, so that nix-portable doesnt default to my system installed nix]

Including a link to the official wiki is a good idea. We shouldn't duplicate any standard nix stuff here.

I like https://serokell.io/blog/practical-nix-flakes (was featured in NixOS weekly) and https://nixos.wiki/wiki/Flakes

There is already Drawbacks / Considerations and Missing Features in the readme. We could add a point Known Issues.

LGTM.

It should definitely work inside a VM. Nix-portable is continuously tested on VMs of multiple well known distros.
But this has nothing to do with the current issue. If you're still interested in getting support for your distro fixed, please open a new issue for it. Thanks.


Provide info when pivot is greater than the cover text during encoding/decoding

Reproduce the same behavior as in capacity subcommand.

https://github.com/baymax42/ptero-cli/commit/e3ad78007766db7a0f10c89b9afaaaacdf342aa6

https://github.com/baymax42/ptero-cli/commit/e3ad78007766db7a0f10c89b9afaaaacdf342aa6


The argument "region" is required, but was not set

Describe the bug
After "terraform plan":
Error: Missing required argument
The argument "region" is required, but was not set.

I tried to substitute the region value into the module as well as into each rules dictionary, the result is the same
Terraform version: 1.5.4
sbercloud v1.11.5
Settings:
provider "sbercloud" {
  auth_url = "https://iam.ru-moscow-1.hc.sbercloud.ru/v3"
  region = "ru-moscow-1"
}
module "secgroup" {
    source  = "tf-cloud-modules/networking-secgroup/sbercloud"

    name = "sg-test"
    ingress_rules = [
    {
        ports             = 80
        protocol         = "udp"
        description      = "User-service ports"
        remote_ip_prefix = "<IP_ADDRESS>/16"
    },
    {
        ports             = 443
        protocol        = "tcp"
        description     = "Traffic from certain sec group"
        remote_group_id = "xxxx-xxx-xxx"
    }
    ]
}

Trace:
[ERROR] vertex "provider["registry.terraform.io/sbercloud-terraform/sbercloud"]" error: Missing required argument
[TRACE] vertex "provider["registry.terraform.io/sbercloud-terraform/sbercloud"]": visit complete, with errors
[TRACE] dag/walk: upstream of "module.secgroup.sbercloud_networking_secgroup.this (expand)" errored, so skipping
[TRACE] dag/walk: upstream of "module.secgroup.output.id (expand)" errored, so skipping
[TRACE] dag/walk: upstream of "module.secgroup.local.this_sg_id (expand)" errored, so skipping
[TRACE] dag/walk: upstream of "module.secgroup.sbercloud_networking_secgroup_rule.egress_rules (expand)" errored, so skipping
[TRACE] dag/walk: upstream of "module.secgroup.sbercloud_networking_secgroup_rule.ingress_rules (expand)" errored, so skipping
[TRACE] dag/walk: upstream of "module.secgroup (close)" errored, so skipping
[TRACE] dag/walk: upstream of "provider["registry.terraform.io/sbercloud-terraform/sbercloud"] (close)" errored, so skipping

@isvolkoff thanks for reporting! Will try to push a fix first thing next morning.

@isvolkoff sorry for the delayed answer. I tried the following and the module works perfect:
`
provider "sbercloud" {
auth_url = "https://iam.ru-moscow-1.hc.sbercloud.ru/v3"
region   = "ru-moscow-1"
}
terraform {
required_version = ">= 0.13.1"
required_providers {
sbercloud = {
source  = "sbercloud-terraform/sbercloud"
version = ">= 1.9.0, < 2.0.0"
}
}
}
module "secgroup" {
source  = "tf-cloud-modules/networking-secgroup/sbercloud"
name = "sg-test"
ingress_rules = [
{
    ports             = 80
    protocol         = "udp"
    description      = "User-service ports"
    remote_ip_prefix = "<IP_ADDRESS>/16"
},
{
    ports             = 443
    protocol        = "tcp"
    description     = "Traffic from certain sec group"
    remote_group_id = "8d485ffa-3a2e-44d0-9b84-337b9a412c8b"
}
]

}
`
I'm sure you already checked it , but just in case - remote_group_id so should be provided with the value of the ID of security group that you are referring to. In this example I'm using one of mine.
Terraform v1.6.2
sbercloud v1.11.5

@andreilapkin Thank you for your response. Possible reason is that Terraform is blocked in Russia, and it is necessary to use mirrors for terraform provider sbercloud instead of directly specifying the source as "sbercloud-terraform/sbercloud". I was able to resolve the issue by cloning the source repository and changing the source "sbercloud-terraform/sbercloud" to the mirror "tf.repo.sbc.space/sbercloud-terraform/sbercloud" in the "version.tf" file. After that, I used the cloned repository as the module source for my configuration. The error was no longer observed, and everything is working fine now.  Thank you for your help.

@isvolkoff great! I'm closing the issue


feat: Algolia example

Added an Algolia usage example which contains a boilerplate indexing service (Nacelle -> Algolia) and a Stackblitz link.

@NWRichmond I removed the unnecessary readme and updated the serverless.yml.

@NWRichmond ready for your review again! Thanks for the good callouts.

Fantastic, thanks @NWRichmond


modeladmin's ChooseParentView and DeleteView don't call get_context_data

modeladmin's ChooseParentView and DeleteView view classes override the get() method but do not call get_context_data() which makes modifying them slightly tricker and inconsistent with the other view classes.
ChooseParentView: https://github.com/torchbox/wagtail/blob/master/wagtail/contrib/modeladmin/views.py#L728-L731
DeleteView: https://github.com/torchbox/wagtail/blob/28c8ae3ab99dd1b0b22bb334835c9e823b060cae/wagtail/contrib/modeladmin/views.py#L772-L774

Fixed in #3060


Add support for Date type in VectorHasher

@aditi-pandit Aditi, there are build failures. Would you take a look?

@aditi-pandit Aditi, there are build failures. Would you take a look?

Hi Masha,
I'm looking at the linux failures further.
Just curious to know your thoughts on this change though.. Do you feel the solution works ?

Hi Masha,
Sorry for the delay on this. I wanted to get the tpch queries out of the way first.
I have addressed the review comments and fixed the linux compilation failure.
Please can you take a look.

Fixing the failure.


Provide ability to set custom context properties by js

Reducing priority as there is a workaround (passing parameters as executeStep() options ) for this.

Thank you for your contribution!
We are closing this issue since it has not been prioritized for a long time. Chances are that it has already been solved in more recent versions. If not, we will be re-evaluating this when it becomes a priority.


Feit BR30 does not flash

Feit BR30 do not appear to be flashable. https://www.amazon.com/gp/product/B07GFV1Y9C
Put the bulb in fast pairing mode. As soon as the packets are sent, the bulb stops flashing. But the bulb never sends any requests.
This seems completely unrelated to the issue 483 PSK issue. No PSK involved because no traffic.

[log.txt](https://github.com/ct-Open-Source/tuya-convert/files/5506044/log.txt)

Looks like related to #784
So a new class of OTA upgrade failures not related to PSK.

I see three devices in your wifi log, can you identify them?

ac:d1:b8:c0:c2:91  laptop
a0:20:a6:16:f7:04  makerfocus d1 mini
18:69:d8:53:ab:36  appears to be the feit br30, shows up when i put the bulb into fast pairing

All ESP82xx have an OUI of Espressif Inc. Unfortunately your Feit BR30 is not using an ESP82xx and thus is not capable of running third party ESP firmware. Sorry to be the bearer of bad news!

disassembled the bulb, looks like feit is using the new arm-based tuya wb2l module. the FCC ID is the same as old feit br30 bulbs with esp8266, this seems to be an fcc violation.

I purchased the same bulb from Lowes. Same beginning MAC address: https://maclookup.app/macaddress/1869D8


Fix warnings introduced by rust 1.77

The title should be self-explanatory. This PR should also fix the CI pipeline failing in #3753.
Actually, let me rebase that one in a second.
My thinking behind removing the &Packed<EquationElem> attribute is that it is not used and can be re-added if it is ever necessary. I liked that better than an #[allow(unused)].

Maybe we should pin the CI Rust version.


trying to upgrade stackblitz bug repro starter to 7.3.3 causes error

changed the version number in the stackblitz starter (https://goo.gl/wwnhMV) to 7.3.3 (https://stackblitz.com/edit/angular-material2-issue-hetfrx?file=package.json), got error:
Error in /turbo_modules/<EMAIL_ADDRESS>(38:5)
Object prototype may only be an Object or null: undefined

You should update the cdk too.

I tried that before and it causes a different error. My higher level request here is: please update the stackblitz link so that it actually points to the most recent version of the library, since that's (hopefully) what people should be making repros against.

Closing this issue as it does not follow the issue template. Please file a new issue that follows the template, which gives the team the information needed to investigate.
(this is a canned response)


Support all valid cron strings

Per feedback from an early tester:

My weekly failed with the following error: Warning: Expected stale-weekly to contain the cron syntax 0 0 * * MON, got 0 0 * * 1. However, my syntax IS correct, I just chose to use the number not the name for the day of the week. It should not have failed.

We should support all valid answers, even if they're not what we expected. Perhaps there's a cron library we can use to validate the equivalency of two cron strings?
/cc @mattdavis0351

I think we can easily fix this without a library!  I'll take this one 😄

@hectorsector want to close this out now that the above pr has 🚢 ?

If we want to leave the instructions as-is:

On your repository, edit the on: key of the stale-weekly.yml workflow so that it contains a trigger to run every Monday.

Then we'll need to support variations that all run weekly on a Monday. We can scope it down to a specific time on Monday so that the PR works, but as it stands if someone wants to input, say, at 3pm on a Monday their workflow will fail although still meeting the criteria @mattdavis0351

@hectorsector I'm pretty certain we have addressed this.  Should we close this issue?

I think this use case still wouldn't be addressed right @mattdavis0351 ?

if someone wants to input, say, at 3pm on a Monday their workflow will fail although still meeting the criteria

I can try and take a stab at it.


Fixed #679

Fixed #679

I don't see a left icon there. Please provide a minimal example which shows the issue.

I don't see a left icon there. Please provide a minimal example which shows the issue.

from kivymd.app import MDApp
from kivy.lang import Builder

KV = """
AnchorLayout:
	MDTextFieldRound:
		icon_right: "android"
		icon_left: "key"
		hint_text: "hint text"
		size_hint_x: .7

"""

class Example(MDApp):
	def build(self):
		self.theme_cls.theme_style = "Dark"
		return Builder.load_string(KV)

Example().run()


make getProject take unescaped group id, like getGroup

Fixes #253.

I decided to do another check and fixed up the remaining method which take possibly-string group ids and project ids.


Stream waiting for 50,000 lines before producing output

Not sure if intended or not but for cases in scenarios where piping is used with a process that keeps stdout open for future use sending fewer than 50,000 names results in no output. Also, although -b1 should be ignored it isn't actually.
hernan@9900k:~/Projects/LocoDelAssembly/biodiversity/ext$ wc test-* -l
 25000 test-25000.txt
 50000 test-50000.txt
 75000 total
hernan@9900k:~/Projects/LocoDelAssembly/biodiversity/ext$ cat test-50000.txt | ./gnparser-linux --stream | wc -l
2021/02/09 18:20:39 Parsing 50000-th line
50001
hernan@9900k:~/Projects/LocoDelAssembly/biodiversity/ext$ cat test-25000.txt - | ./gnparser-linux --stream
Id,Verbatim,Cardinality,CanonicalStem,CanonicalSimple,CanonicalFull,Authorship,Year,Quality
Jivarus alienus
^C

(Last example I type "Jivarus alienus ", but since it would be the 25001th name nothing happens)
$ cat | ./gnparser-linux --stream -b1
Id,Verbatim,Cardinality,CanonicalStem,CanonicalSimple,CanonicalFull,Authorship,Year,Quality
Jivarus alienus
2021/02/09 18:23:02 Parsing 1-th line
011670bb-dcde-58d1-8a7a-d207db0982e2,Jivarus alienus,2,Jivarus alien,Jivarus alienus,Jivarus alienus,,,1

(-b1 honored, not sure if --stream ignored internally)

does the binary support --stream flag? Does it show it with 'gnparser-linux -h'?

I was able to reproduce it, so yes, something is wrong


PR#4 when reloading an html page that's served via the Ctx.HTML or Ctx.Template funcs it repeats it's content

When reloading an html page that's served via the Ctx.HTML or Ctx.Template funcs it repeats it's content. With a result like this:
https://user-images.githubusercontent.com/7901125/209412144-69c3f21c-8201-4696-b071-e7dab1e13b68.mp4
You can find the code related to this in the 4th PR inside of goster/context.go:28 (func Template) and goster/context.go:47 (func HTML)

You are sharing state all over the place and in most instances you really shouldn't. Some of the consequences of the careless sharing of state are:

repeated printing of the html file
data race
eventually your program will run out of memory and crash

Every time you receive a request to /hey you call TemplateDir which calls SetTemplateDir which appends to a shared slice in the config.
That means that 5 requests to /hey will cause the e.Config.FilePaths to contain 5 sets of the same files as they were found by os.ReadDir. Subsequently you grab all those files and write each one that matches.

I would suggest that you thoroughly familiarize yourself with Go pointers; that you learn how requests are handled by the underlying net/http.Server; and that you think of any state as potentially unsafe for concurrency unless explicitly stated otherwise.

there's one goster.Ctx instance in total instead there should be context in every single request


[KeyVault-Certificates] Alignment review results

create certificate

[x] should return GetCertificateWithPolicy

get certificate

[x] should return GetCertificateWithPolicy

update certificate

[x] should be updateCertificateProperties
[x] Note: keys and secrets, what is the update function named for keys/secrets
[ ] Note: for certificate properties what is write-able in the properties vs what is in the options bags. Confirm this.

update certificate policy

[x] param should be policy

delete certificate

[ ] can the return type be any cleaner?

backup certificate

[x] match what keys and secrets do for the result type

restore certificate

[x] certificateBackup should be backup. match keys and secrets
[x] should return GetCertificateWithPolicy

list certificate versions

[x] remove includePending from option bag

create certificate issuer

[ ] flatten credentials accountId and password into options bag. get rid of current type that holds these

delete certificate operation

[x] name->certificateName

set certificate contacts

[ ] should CertificateContacts be CertificateContact[]?

list certificate contacts

[ ] should CertificateContacts be CertificateContact[]?

delete certificate contacts

[ ] should CertificateContacts be CertificateContact[]?

import certificate

[ ] take in the bytes instead of a base 64 encoded string

KeyVaultCertificate

[ ] remove content type

CertificateOperation

[ ] missing certificate transparency

CertificateOperationError

[ ] JS/TS: what does it respond with instead of this?  Should be using this error

CertificatePolicy

[ ] certificateType: string, contentType: enum
[ ] needs exportable

CertificateContentType

[ ] investigate why content type is "application/pem"

CertificiatePolicyAction

[ ] it's missing

LifeTimeAction

[ ] splat Trigger
[ ] rename Action to CertificatePolicyAction

CertificateKeyCurveName

[x] rename JsonWebKeyCurveName to KeyCurveName only if it was already renamed elsewhere

CertificateKeyType

[x] rename JsonWebKeyType to KeyType only if it was already renamed elsewhere
[ ] remove "oct"

ImportCertificateOptions

[ ] double check the type it's extending from

WellKnownIssuerNames

[ ] WellKnownIssuer -> WellKnownIssuerNames

AdministratorContact

[ ] emailAddress -> email

CertificateIssuer

[x] split IssuerProperties into CertificateIssuer

I'll update this in a bit.

Some notes and questions:

Jonathan's branch wasn't up to date with master, but I took inspiration from the work he did!
create certificate should return GetCertificateWithPolicy Done.
get certificate should return GetCertificateWithPolicy, getCertificate already returns CertificateWithPolicy. I marked it as done.
updateCertificate should be updateCertificateProperties. Done.
updateCertificateProperties receives the certificate's name, the certificate's version and the options bag, which aligns with keys and secrets for us. I asked about this, but I think this is correct.
updateCertificatePolicy should receive a param named policy (of type CertificatePolicy). Done
beginDeleteCertificate, can the return type be any cleaner? --- https://github.com/Azure/azure-sdk-for-js/issues/6315.
backupCertificate, match what keys and secrets do for the result type. Made it Uint8Array | undefined, like how it is in keys and secrets.
restoreCertificateBackup certificateBackup should be backup. match keys and secrets Should return GetCertificateWithPolicy. Done.
listPropertiesOfCertificateVersions should not have includePending in its option bags. Done.
createIssuer, flatten credentials accountId and password into options bag. get rid of current type that holds these. Done.
deleteCertificateOperation name to certificateName. Done.
All CertificateContacts to CertificateContact[]. Done.
importCertificate take in the bytes instead of a base 64 encoded string. Done.
KeyVaultCertificate, remove content type. Done.
CertificateOperation is missing CertificateTransparency: We're using the generated CertificateOperation, which has certificateTransparency inside of issuerParameters. certificateTransparency is also at the root level of CertificatePolicy already. The generated version of CertificatePolicy also has issuerParameters, and we're flattening it for the public type. I wonder if we should do it. CertificateTransparency only exists as part of CertificatePolicy in .Net, as in, CertificateOperation doesn't have this property in .Net (at least I don't see it).
CertificateOperationError: create and operation pollers now set the state error to the operation error.
CertificatePolicy's certificateType must be string enum, and it must be exported. Done.
CertificateContentType, investigate why content type is "application/pem". Not doing this in this PR.
CertificiatePolicyAction is missing. It's not, in .Net, CertificiatePolicyAction belongs to LifetimeAction, which belongs to CertificatePolicy. The same happens in TS/JS: Action (which comes from the generated code) exists in LifetimeAction, which exists in CertificatePolicy.
LifeTimeAction, splat Trigger, rename Action to CertificatePolicyAction. Done.
rename JsonWebKeyType to KeyType only if it was already renamed elsewhere. This is as required already.
Remove "oct". Done.
ImportCertificateOptions,  double check the type it's extending from. It was extending from CertificateProperties…. Which was missing the CertificatePolicy! Oops. Fixed now.
WellKnownIssuer -> WellKnownIssuerNames. Done.
emailAddress -> email. Done in both AdministratorContact and CertificateIssuer.
CertificateIssuer: split IssuerProperties into CertificateIssuer. What is the action item here? Our CertificateIssuer has properties, of type CertificateIssuerProperties. This properties type has three properties: id, name, provider. We have a copy of these (id and name) in CertificateIssuer, but not provider. Same as .Net. I believe there's no action item here.

All samples and comments should be updated, but they should be revisited (probably after code complete).
The PR: https://github.com/Azure/azure-sdk-for-js/pull/6318
No tests needed to be re-recorded (but I'm still running the live tests).


Timestamp is rounded on MySQL after save

Environment
Knex version: 0.14.4
Database + version: Mysql 5.7.21
OS: Ubuntu 16.04 x86_64
Bug
When using the .timestamps() schema builder method on a table, the generated datetime columns will round dates on MySQL when inserting data.
For example, inserting 2018-03-04T19:24:53.063Z will result in 2018-03-04T19:24:53.000Z when retrieving the same row afterwards.
Obviously this presents some problems when one wants to compare dates.
This gist has all the code necessary to reproduce the issue. Just make sure the database config matches what you have in your system.
I can look into it and provide a PR.

Have you checked if dates are rounded when before inserting, by database or when results are read from DB? Does running with DEBUG=knex:* environment variable show any light to that?

Also have you tried inserting that date as string 2018-03-04T19:24:53.063Z to see if the problem is how mysql driver is interpreting Date objects.

I'll investigate all those questions and report back ASAP.

Seems to be a problem with the actual MySQL server in versions prior to 5.6.4:

...when MySQL stores a value into a column of any temporal data type, it discards any fractional part and does not store it.

from Fractional Seconds in Time Values.
So, it should be possible to change the .timestamps() function to output DATETIME(3) or TIMESTAMP(3) to achieve parity with the other database engines. However, I'm not sure how this will behave in older versions of MySQL. If it's ignored we're good.

Will you accept a PR for this?

Sorry for being late with this one.

So, it should be possible to change the .timestamps() function to output DATETIME(3) or TIMESTAMP(3) to achieve parity with the other database engines. However, I'm not sure how this will behave in older versions of MySQL. If it's ignored we're good.

Did you check if it was ignored in older mysql versions?
For postgresql we have currently some attribute in configuration that can be used to select which version of postgresql server we are connecting to (there was badly working autodetection too, but I prefer saying flavor directly in configuration).

I checked with MySQL 5.1.69 and it produces a SQL syntax error due to the (3) part. However, MySQL 5.6.4 was released on 2011-12-20, which makes it over 6 years old at this point. Not sure if it's really important to support older versions. If it is, then maybe this can be configurable when initializing knex:
var knex = require('knex')({
  client: 'mysql',
  connection: {
    preciseTimestamps: false,
    host : '<IP_ADDRESS>',
    user : 'your_database_user',
    password : 'your_database_password',
    database : 'myapp_test'
  }
});

I would still prefer to have precise timestamps by default though.
It looks like the mysql npm module still tests against 5.5, so I'm going to assume that's the oldest supported version. node-mysql2 on the other hand only tests against 5.7.

I think that we should always use use precise timestamps. Yes I think that it should be possible to add used dialect version like in postgres.
So was this supported in all mysql versions after 5.6.4? If I understood correctly mysql docs, 5.6.10 was the first mysql 5.6 series version that was released to general availability (first stable 5.6 release) so versions 5.6.0 - 5.6.9 not working shouldn't be a problem.
I suppose 5.5. is still used in some older server distributions, which has it installed by default. So I don't think that it is obsolete yet (but I don't know how much it is used either... 😐).
I think that safest path would be to keep current functionality by default and add support for telling dialect version when initializing knex and default that version to 5.5 with warning that in future default will be changed to 5.6 (to provide us some path to change default to more reasonable one in future).
This way change will be backwards compatible and people currently using knex with 5.5 will see warning that they need to give version: '5.5' parameter to their config or some future knex versions will not work anymore.

Well, according to the documentation the feature was introduced with 5.6.4, so I guess it is present in 5.6.10 as well. As a somewhat related note, MariaDB has had support for microsecond precision since version 5.3, so on that side there shouldn't be any problems.
I'll start working on a PR for this soon.


Update BASE_VERSION to master-2022-05-27T19-01-17

@istio-testing: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-cni_istio
7dde07526453176d2f40c4f4d151409784e785c2
link
true
/test integ-cni_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@istio-testing: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-cni_istio
7dde07526453176d2f40c4f4d151409784e785c2
link
true
/test integ-cni_istio

integ-security_istio
7dde07526453176d2f40c4f4d151409784e785c2
link
true
/test integ-security_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@istio-testing: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-cni_istio
7dde07526453176d2f40c4f4d151409784e785c2
link
true
/test integ-cni_istio

integ-security_istio
7dde07526453176d2f40c4f4d151409784e785c2
link
true
/test integ-security_istio

integ-security-multicluster_istio
7dde07526453176d2f40c4f4d151409784e785c2
link
true
/test integ-security-multicluster_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@istio-testing: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-security-multicluster_istio
7dde07526453176d2f40c4f4d151409784e785c2
link
true
/test integ-security-multicluster_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@istio-testing: PR needs rebase.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

This PR was superseded by https://github.com/istio/istio/pull/39382