nixos/ups: add envvars for interactive use

Description of changes
Set environment variables that fix running upsdrvctl interactively.

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] 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/)
24.11 Release Notes (or backporting 23.11 and 24.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.

Add a :+1: reaction to pull requests you find important.

Sure.

My thought exactly. 😄
Out of curiosity, what does "running upsdrvctl interactively" look like?

I'd paste the output, but I'm actually upgrading hardware tonight, so I don't have it readily available.
For example, see "Testing shutdown" from https://networkupstools.org/docs/user-manual.chunked/ar01s06.html. You'd run upsdrvctl -t shutdown and it logs what it'll do. Before this PR it would fail, after it succeeds.

It seems like this should be in the derivation for nut itself, but sure.

Yes, that might be a good idea.

Out of curiosity, what does "running upsdrvctl interactively" look like?

For example:
Before:
$ upsdrvctl -t shutdown
Network UPS Tools - UPS driver controller 2.8.2
*** Testing mode: not calling exec/kill/signal
   0.000000     [D2]
If you're not a NUT core developer, chances are that you're told to enable debugging
to see why a driver isn't working for you. We're sorry for the confusion, but this is
the 'upsdrvctl' wrapper, not the driver you're interested in.

Below you'll find one or more lines starting with 'exec:' followed by an absolute
path to the driver binary and some command line option. This is what the driver
starts and you need to copy and paste that line and append the debug flags to that
line (less the 'exec:' prefix).

Alternately, provide an additional '-d' (lower-case) parameter to 'upsdrvctl' to
pass its current debug level to the launched driver, and '-B' keeps it backgrounded.

   0.000030     Can't open /nix/store/qbb38bmhb74qad66xarnh26wms6rfawr-nut-2.8.2/etc/ups.conf: Can't open /nix/store/qbb38bmhb74qad66xarnh26wms6rfawr-nut-2.8.2/etc/ups.conf: No such file or directory
   0.000034     [D1] Completed the job of upsdrvctl tool, cleaning up and exiting now
   0.000036     [D1] Completed the job of upsdrvctl tool, clean-up finished, exiting now
[...error exit code 1...]

After:
$ upsdrvctl -t shutdown
Network UPS Tools - UPS driver controller 2.8.2
*** Testing mode: not calling exec/kill/signal
   0.000000     [D2]
If you're not a NUT core developer, chances are that you're told to enable debugging
to see why a driver isn't working for you. We're sorry for the confusion, but this is
the 'upsdrvctl' wrapper, not the driver you're interested in.

Below you'll find one or more lines starting with 'exec:' followed by an absolute
path to the driver binary and some command line option. This is what the driver
starts and you need to copy and paste that line and append the debug flags to that
line (less the 'exec:' prefix).

Alternately, provide an additional '-d' (lower-case) parameter to 'upsdrvctl' to
pass its current debug level to the launched driver, and '-B' keeps it backgrounded.

   0.000046     [D1] upsdrvctl commanding all drivers (1 found): (null)
   0.000049     [D1] Shutdown UPS: eaton3s
   0.000051     [D2] exec:  /nix/store/qbb38bmhb74qad66xarnh26wms6rfawr-nut-2.8.2/bin/usbhid-ups -a eaton3s -k
   0.000054     [D1] upsdrvctl: successfully finished
   0.000056     [D1] Completed the job of upsdrvctl tool, cleaning up and exiting now
   0.000059     [D1] Completed the job of upsdrvctl tool, clean-up finished, exiting now
[...successful exit code...]


Modify the type of seconds since midnight

[ ] closes #xxx
[ ] tests passed
[ ] new tests added
[ ] science test figures
[ ] ran uncrustify prior to final commit
[ ] ReleaseNotes entry

This PR changes the type of seconds_since_midnight and the explicit cast of curr_date_time. the previous implementation casted curr_date_time, which is a time_t value (64bit value), to unsigned int and took the mod. However, casting 64bit value to 32bit value (uint) will result in loosing upper 32 bits, and thus will result in the value wrapping around (btw, the exact year time_t value will wrap around in unsigned int is year 2106).
To prevent this, curr_date_time should be casted to u64 type.
Thanks in advance for your consideration.

Thank you for your contribution. This all looks fine to me. @tbohn / @yixinmao / @bartnijssen - care to take a peak?


Auto-assign recommended infra type

After drawing a route, calculate the recommended infra type for each segment. Automatically split based on this. Maybe it'd be most clear to have this done as a user-initiated action first, instead of automatically. Have to think through how editing then works.
Also need to figure out what inputs are needed to calculate this; I think the speed (limit or observed?) of the road is the main thing

This'll require a per-road segment estimate of speed and PCU. Happy to start with tagged OSM speed limits for the first. For the second, @juanfonsecaLS1, where can I find the latest output from your model? Thanks!

Hi Dustin, the latest results are in release v6 of the scottraffic repo.

@Robinlovelace, could I ask for a code review / sanity check, please?
get_level_of_service implements the logic in this CbD table directly. I was originally following osmactive, but it doesn't seem to cover all of the cases in the table. I do have some particular questions:

How should we treat the "unknown" infra type? I'm currently assuming worst case and acting like it's mixed traffic. Now that we have automatic segmenting of routes and auto-assigning an infra type, maybe we ought to get rid of "unknown" as an option entirely. Are there cases where a user wants to indicate they'll put something there, but have not decided what?
I'm trying to find the discussion/email about how the chosen infra types for this project map over to the categories in CbD. Is our "segregated wide" the same as "detached or remote cycle track"?
Are "segregated narrow" and "shared footway" both "stepped or footway level cycle track"?
When deciding the best infra type for a particular road segment, it now just depends on the inherent speed and traffic there. We try mixed traffic, cycle lane, segregated narrow, and segregated wide in order, picking the first one that makes the LoS be high, according to the table. Does this seem correct to you?

In practice you can check out these auto-recommendations by blanking out an area, then auto-importing the whole core network. There are quite a mix of optimal infra types, and they seem generally intuitive to me, but this is something to get feedback on.
Dundee:

Edinburgh:

Glasgow:


Refactor keycertbundle tests and metrics

Fixed some incorrect documentation and refactored keycertbundle logging code to be a bit more efficient.
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

[ ] Ambient
[ ] Configuration Infrastructure
[x] Docs
[ ] Dual Stack
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[x] Extensions and Telemetry
[x] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
[ ] Upgrade
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Control Plane Revisions

Please check any characteristics that apply to this pull request.

[ ] Does not have any user-facing changes.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

wrong branch


get tag into javascript code

Hi there,
I'm using Mustache.JS for my project but i need to get a value into my JS code ! How can i get this value into my js (Is an external JS import not in the mustache) ?
Thanks

Hi!
An actual example of what you are trying to do would be very helpful for us, to help you ;)

You right sorry ! :x
when i call the template
this.render(req, res, "m2choice/index", options);
My template :
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title>title</title>
    <script>
//This solution work but it's not the good thing to do i think!
    const mobileId= "{{pocData.mobile.id}}"
    </script>

//I need to have my variable into these files !
    <script src="../../scripts/state.js"></script>
    <script src="../../scripts/logic.js"></script>
    <script src="../../scripts/listener.js"></script>

</head>

<body>
data
</body>
</html>

Thx!

Is an external JS import not in the mustache

No, it does not have functionality for importing other JS files or data, other than what is passed as  the second argument (options in your example).
mustache treats the template being rendered as a plain string. In other words it doesn't try to evaluate the contents of the .html file you pasted above, other than searching for the know mustache syntax to insert/replace text into the desired position in the final string.
Personally don't see any cleaner way of getting hold of pocData.mobile.id than what you've already done.

Closing this for now, don't hesitate to re-open if you have more questions.


The question about MACD

Hello!
Thank you for your exceptional work. I hope I am mistaken, but I observed that in your code (specifically in both streamlit-lightweight-charts and streamlit-lightweight-charts-ntf), the macd-fast is identified as MACDh_6_12_5, which, unless I am incorrect, actually corresponds to the MACD line. Conversely, macd_hist is labeled as MACD_6_12_5, which should represent the histogram.

The issue arose when I was analyzing my stock data and noticed that it did not align with my expectations. Upon reviewing the pandas_ta documentation, I realized that MACDh_6_12_5 should denote the histogram, and MACD_6_12_5 should be the MACD line.

To address this, I made a modification to the code by swapping the positions of these two variables, and it appears to be functioning correctly now.

I am uncertain if this constitutes a bug, but thank you in advance for your response.

Hello @peterxcx
Spot on - Yes, you are right - Thank You!! Not a bug on the modules, but a bug on the data-examples - next update I will fix it
Thanks - appreciated
Best,
Joe Rosa

Hello Joe Rosa,
You’re very welcome, and there’s no need for thanks – I’m grateful for the work you do. I’m looking forward to the update and appreciate your attention to the issue.
Best regards,
Peter


Make interval always smaller than transistion and sleep_transition

Possibly prioritize user interval setting over sleep_transition?
       interval_seconds = self._interval.total_seconds()
       # see https://github.com/basnijholt/adaptive-lighting/issues/377#issuecomment-1378012481
       # Prevent inconsistencies between adaptive-lighting versions while also supporting handling for interval > transition problems.
       if (
           interval_seconds > self._sleep_transition
           and self._sleep_transition < 10
       ): # or check if sleep_transition == 1 # default - you're the boss.
           #self._sleep_transition = 0 # just disable it maybe?
           self._sleep_transition = self._interval - 0.2
       if (
           interval_seconds > self._transition
           or interval_seconds > self._sleep_transition
       ):
           _LOGGER.info(
               "%s: The interval (%s) is larger than the transition (%s) or sleep transition (%s),"
               " this can cause issues. Please consider making the interval smaller than"
               " the transitions. We will now set the interval to the minimum of the"
               " transitions, minus 1 second.",
               self._name,
               self._interval,
               self._transition,
               self._sleep_transition,
           )
           interval_seconds = min(self._transition, self._sleep_transition)
           # The minimal inverval that can be set should be ≥1 second, so at most we
           # decrease it below to be slightly less than 1 second.
           interval_seconds = max(interval_seconds - 1, 0.9)
           self._interval = timedelta(seconds=interval_seconds)

Prevents inconsistencies between adaptive-lighting versions while also supporting handling for interval > transition problems.
Changing interval can be quite the unexpected change when they're merely pressing the update button.

This PR is a simple hotfix however it hides the core problem caused by the significant_change function and the logging of state_change data. see #447 for more info.
This PR also makes issues such as #400 impossible to fix.
#448 should replace this PR.

Not needed


feat: add STALE pre-defined reason

Adds STALE pre-defined reason, re-orders reasons in source to match spec.

@toddbaert loosely related to https://github.com/open-feature/js-sdk/issues/893


Ability to drop ports from the instance dynamic label.

I'd like it if it was possible to configure Prometheus to drop the port from the instance label.
My use-case:
My web-apps are exposed using a random docker port, however the tooling I have in place generates a web-app/host unique CNAME entry in our internal DNS, and since DOcker is assigning the external port "randomly" it's a bit bothersome to have it in there, as not only is it redundent, but it's going to be different beween launches of my web-apps.
I'm AmandaC in #prometheus, feel free to highlight me for further info / questions.
--
I'd be happy to come up with a simple PR for this, if there's interest. I just don't want to end up with the burden of maintaining a fork.

This will be possible in the near future through relabelling. It will be part of the groundwork for more advanced service discovery than we have now. The is a design doc - all comments and suggestions are welcome.


Add a README.md

Fixes: https://github.com/fedora-python/fedoralovespython.org/issues/18
LICENSE is removed, as the text is in the README.

I'll add more stuff later (how to contribute), but this is good for start. Thank you.


Design Data Model

Overview
Study the Figma designs: https://www.figma.com/file/tJPZ0lkT5C3SAyS2g2R1aA/IoW---Boundary-Sync-Tool
Identify entities that encapsulates the submissions, maps, user interactions, and other pieces of information needed for the front-end.
Create Django Models for these entities. Export a visualization of the Django Models for documentation in the repo.

Rough draft of data model in this spreadsheet: https://docs.google.com/spreadsheets/d/16bFz43IHiaGHTdSiNILw0ObMx1vtpc29LlHphR1DNec/edit#gid=0

Below is a first pass at creating an ERD of the data model in the above spreadsheet:
erDiagram
    Role {
        string description
    }
    User ||--o{ User_Utility : "has"
    User }o--|{ State : "within"
    User }|--|| Role : is
    User {
        Role role FK
        email	email
        boolean is_staff
        boolean is_active
        date date_joined
        password password
        boolean is_locked_out
        phone phone
        State state FK
        Utility utilities
    }
    Utility ||--o{ User_Utility : "belongs to"
    Utility }o--|| State : "within"
    Utility {
        string pwsid
        string name
        address	address
        point location
        State state FK
    }
    User_Utility {
        User	User FK
        Utility	Utility FK
        string job_title
    }
    State {
        string id "max_length=2"
        string name
        polygon boundary
        json options
    }
    Boundary }o--|{ Utility : "for"
    Boundary }o--|{ User : "by"
    Boundary {
        polygon shape
        string name
        Utility utility FK
        User submitted_by FK
        date submitted_at
        boolean archived
        choice stage
    }
    ActivityLog }o--|| Boundary : "describes"
    ActivityLog }o--|| User : "by"
    ActivityLog {
        date date
        User actor FK
        Boundary boundary FK
        choice action
        text notes
    }
    Annotation }o--|| User : "created by"
    Annotation }o--|| Boundary : "on"
    Annotation {
        Boundary boundary FK
        point location
        text note
        User created_by FK
        datetime created_at
        boolean resolved
    }

Here's a draft of the states for a submission:
stateDiagram-v2
    [*] --> Draft
    Draft --> Submitted: Submit
    Submitted --> Approved: Approve
    NR: Needs Review
    Submitted --> NR: Review
    Submitted --> Draft: Unsubmit (Optional)
    Approved --> Public: Publicized
    Approved --> Submitted: Unapprove (Optional)
    NR --> Submitted: Submit
    Public --> Approved: Unpublicize (Optional)
    Public --> [*]

Here's a starting point for having tables for each event type in the boundary submission process:
erDiagram
    Boundary }o--|| Utility : "for"
    Boundary }o--|| Contributor : "by"
    Boundary {
        string name
        Utility utility FK
        User user FK
        boolean archived
    }

    Draft ||--|| Boundary: "for"
    Draft {
        Boundary boundary FK
        polygon shape
        date created_at
    }

    Submission }o--|| Boundary: "for"
    Submission {
        Boundary boundary FK
        polygon shape
        date submitted_at
        text notes
    }

    Review }o--|| Boundary : "of"
    Review }o--|| Validator : "by"
    Review {
        Boundary boundary FK
        polygon shape
        date reviewed_at
        text notes
    }

    Annotation }o--|| Review : "of"
    Annotation {
        Review review FK
        point location
        text comment
    }

    Approval ||--|| Boundary : "of"
    Approval }o--|| Validator : "by"
    Approval {
        Boundary boundary FK
        date approved_at
    }

The event log could be created as a view like so:
CREATE VIEW event_log AS
SELECT 'draft' as stage, created_at, boundary_id as event_time FROM drafts
UNION
SELECT 'submission' as stage, submitted_at as event_time, boundary_id FROM submissions
UNION
SELECT 'review' as stage, reviewed_at as event_time, boundary_id FROM reviews
UNION
SELECT 'approval' as stage, approved_at as event_time, boundary_id FROM approvals

Then the current stage becomes:
SELECT stage FROM event_log WHERE boundary_id = ? ORDER BY event_time DESC LIMIT 1

Feedback from clients: We should add a way to track if the shape was drawn by hand or uploaded via a file.
Also, the reference images they upload may also be tracked somewhere.

Here's the latest iteration of our ERD after discussing the above feedback:
erDiagram
    Role {
        string description
    }
    User ||--o{ User_Utility : "has"
    User }o--|{ State : "within"
    User }o--|| Role : is
    User {
        Role role FK
        email email
        boolean is_staff
        boolean is_active
        date date_joined
        password password
        boolean is_locked_out
        phone phone
        State state FK
        Utility utilities
    }
    Utility ||--o{ User_Utility : "belongs to"
    Utility }o--|| State : "within"
    Utility {
        string pwsid
        string name
        address address
        point location
        State state FK
    }
    User_Utility {
        User	User FK
        Utility Utility FK
    }
    State {
        string id "max_length=2"
        string name
        polygon boundary
        json options
    }
    Boundary }o--|| Utility : "for"
    Boundary {
        Utility utility FK
        date archived_at
    }

    Submission }o--|| Contributor : "by"
    Submission }|--|| Boundary: "for"
    Submission {
        User user FK
        Boundary boundary FK
        polygon shape
        date created_at
        date submitted_at
        string filename
        boolean edited_after_upload
        text notes
    }

    Review }o--|| Validator : "by"
    Review |o--|| Submission : "for"
    Review {
        Validator reviewed_by FK
        date created_at
        date reviewed_at
        text notes
    }

    Annotation }o--|| Review : "of"
    Annotation {
        Review review FK
        point location
        text comment
        date created_at
        date resolved_at
    }

    Approval }o--|| Validator : "by"
    Approval |o--|| Submission : "for"
    Approval {
        Validator approved_by FK
        date approved_at
    }
    Reference_Image }o--|| Boundary : "for"
    Reference_Image {
        string filename
        User uploaded_by FK
        date uploaded_at
        boolean is_visible
        json distortion
    }

Here is also an updated diagram of the states for a submission. The reason behind these changes is once a Submission needs a revision, a User might upload a new file or reference images which better describes a new draft state of submission vs re-submitting:
stateDiagram-v2
    [*] --> Draft
    Draft --> Submitted: Submit
    Submitted --> Approved: Approve
    NR: Needs Revisions
    Submitted --> NR: Review
    Approved --> Submitted: Unapprove
    Approved --> Archived: Archive
    Archived --> Approved: Unarchive
    NR --> Draft: Respond

The idea is to store the actual file they upload on S3 as well (not captured in the notes above), and store a reference to it in the database.
Since it is a one-to-one relationship (a Submission my have at most one Shape uploaded to it), it made sense to inline it. If it's in a separate table, we'll have to look it up every time we're reading Submission data, which would be expensive.
Similarly, shape comparisons are expensive, and to do so every time would be wasteful. It is better to store it once and have that persist.
Given the above, I would recommend we keep this data within Submission.
As we have done previously with other boolean fields, the edited_after_upload could be replaced with a timestamp field instead. Perhaps something like upload_edited_at?
It may also be a good idea to prefix all the Shape Upload columns similarly so they are semantically grouped, something like:
erDiagram
    Submission {
        Boundary boundary FK
        polygon shape
        date created_at
        User created_by
        date submitted_at
        User submitted_by
        string upload_filename
        date upload_edited_at
        text notes
    }


host social media images

See https://trello.com/c/zz6XsOqQ/119-twitter-profile-images-arent-shown-in-firefoxs-private-window

https://snoopycrimecop.github.io/www.openmicroscopy.org/on-the-web/ updated

Tested in a private Firefox window and can confirm, without this PR the live site doesn't show the icons (as per Simon's screenshot) but with this PR the snoopy site now displays the icons as expected. Merging, thanks.


Updating fleet causes pack CRUD errors in the UI

What version of fleet are you using (fleet version --full)?
fleet - version 2.0.0-rc1
branch: 	master
revision: 	a172540b7bc6a11ca261749040c9585eba370cdd
build date: 	2018-05-23T19:27:13Z
build user: 	marpaia
go version: 	go1.10.2
What operating system are you using?
CentOS Linux release 7.5.1804 (Core)
What did you do?
Upgraded from fleet version 1.0.7-1-g2ded63e and ran fleet db prepare. Once completed i went into the Fleet UI and tried to manage my Packs. I can view them but cannot do CRUD on any of the packs (create, enable, edit, delete).
What did you expect to see?
I expect the ability to manage packs.
What did you see instead?
error messages saying something went wrong.
{“component":"service","err":"packs 3 was not found in the datastore","method":"DeletePack","took":"627.342µs","ts":"2018-06-21T22:48:46.751689647Z”}

Hey @find-mikeli, this should be fixed in the latest release candidate. Can you upgrade to 2.0.0-rc3 and try?


use Cache-Control immutable

This is a thing now:
https://tools.ietf.org/html/rfc8246
(Cache-Control: immutable)
We should add it to blob responses and other versioned URLs.
/cc @mpl

Something like this?  This mimics what IPFS does for immutable responses.  Also pointers on other http response handlers that might benefit would be helpful...
--- a/pkg/blobserver/gethandler/get.go
+++ b/pkg/blobserver/gethandler/get.go
@@ -76,6 +76,7 @@ func ServeBlobRef(rw http.ResponseWriter, req *http.Request, blobRef blob.Ref, f
}
defer rc.Close()
rw.Header().Set("Content-Type", "application/octet-stream")

  rw.Header().Set("Cache-Control", "max-age=29030400, immutable")

  var content io.ReadSeeker = readerutil.NewFakeSeeker(rc, int64(size))
  rangeHeader := req.Header.Get("Range") != ""


⚡ Remove rejection sampling from LibPRNG shuffle

Description
Saves 40% gas.
Note that there will be a very tiny modulo bias if the length of the array is not a power of 2.
For all practical purposes, it is negligible and will not be a fairness or security concern.
Thanks @transmissions11 for the meme.

Checklist
Ensure you completed all of the steps below before submitting your pull request:

[x] Ran forge snapshot?
[x] Ran npm run lint?
[x] Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

imho I'd say have two versions, one more gas optimized, one more randomness optimized
I think it's fair for ppl to want a well optimized randomness-centric implementation, esp off of mainnet, but then also for ppl to want to be able to save that gas on main

@wschwab After much consideration, I think it is ok to have a little bias.
The maximum size of an array we can shuffle is around 100000.
The limit is due to quadratic memory expansion costs, and the max block gas limit.
The amount of bias is thus approximately 100000 / (2**128-1) = 2.9387358770557188e-34.
Which is hopefully small enough for even the most mission critical applications.


GEODE-6033: Support dynamic VMs in SharedCountersRule

Make SharedCountersRule support create and bounce VM.

@moleske @demery-pivotal please review latest changes! All test methods have been renamed to make more sense.


keyboard magnification

Vanessa notes that students have trouble seeing accents and other chars on the Greek input keyboard. Would be nice to have a magnification option of some sort.

It depends on the requirements of users.
We can just do it by adding the font styles (like front-size or font-weight) to the keyboard hover event in .css file (see the latest commit). On the other hand,  if more fancy features like zoom or magnifications are needed for each key, we should spend more time and use available libraries. As I have checked, most of them are designed for images and adding zoom feature to DOM elements needs special libraries. What do you think?

Fixed in f96452c


[python-package] fix mypy errors about scikit-learn properties

Contributes to #3867 .
Follow-up to #5771.
Fixes the following errors from mypy.
python-package/lightgbm/sklearn.py:884: error: Item "None" of "Optional[Booster]" has no attribute "predict"  [union-attr]
python-package/lightgbm/sklearn.py:959: error: Incompatible return value type (got "Optional[Booster]", expected "Booster")  [return-value]
python-package/lightgbm/sklearn.py:979: error: Item "None" of "Optional[Booster]" has no attribute "feature_importance"  [union-attr]
python-package/lightgbm/sklearn.py:986: error: Item "None" of "Optional[Booster]" has no attribute "feature_name"  [union-attr]
python-package/lightgbm/sklearn.py:1065: error: Argument 1 to "len" has incompatible type "Optional[ndarray[Any, Any]]"; expected "Sized"  [arg-type]
python-package/lightgbm/sklearn.py:1183: error: Unsupported operand types for < ("int" and "None")  [operator]
python-package/lightgbm/sklearn.py:1183: note: Left operand is of type "Optional[int]"
python-package/lightgbm/sklearn.py:1202: error: Incompatible return value type (got "Optional[ndarray[Any, Any]]", expected "ndarray[Any, Any]")  [return-value]
python-package/lightgbm/sklearn.py:1209: error: Incompatible return value type (got "Optional[int]", expected "int")  [return-value]

These all come from the fact that some internal state in the scikit-learn estimators is initialized to None, like this:
https://github.com/microsoft/LightGBM/blob/881106311557187a1fea2ec90c234f71771a32d8/python-package/lightgbm/sklearn.py#L537
and then later returned as public properties:
https://github.com/microsoft/LightGBM/blob/881106311557187a1fea2ec90c234f71771a32d8/python-package/lightgbm/sklearn.py#L1197-L1202
After a model has been fit, such properties are expected to be non-None. And the if not self.__sklearn_is_fitted__() is intended to prevent returning that internal state from an unfitted model.
If we're going to stick with the decision from https://github.com/microsoft/LightGBM/pull/4837#discussion_r759757551 to not help mypy understand this relationship by adding assert statements or additional checks, then I think the only remaining option is to ignore these mypy errors with #type: ignore comments.
This PR proposes doing that for most of the properties.
The only exception... this PR proposes initializing LGBMClassifier._n_classes = -1 instead of None. That ensures that self._n_classes is always an integer.

Thanks for the review @guolinke !
Since this particular topic (how to handle mypy errors about the sklearn estimator properties) has generated a lot of discussion in the past, I'm going to wait to merge this one until @jmoralez also has a chance to review.


[Problem] Selection sort implementation

Selection sort
For given array A[25, 12, 3, 8, 12, 19, 5] implement the selection sort algorithm.
Take an array as input from the user implement the selection sort algorithm.

Heyy, let me implement it!

Heyy, let me implement it!

You don't have to ask for it. Just solve and send me a pull request.

Wasn't asking, just saying.


github oauth: too much of requested permissions

This issue has been migrated from :
https://github.com/mike-goodwin/owasp-threat-dragon/issues/72
and was opened by @fadeevab :
To use the online version of application the GitHub's authentication is requested.
However a requested scope of permissions is quietly wide:

This application will be able to read and write all public repository data. This includes the following:
Code
Issues
Pull requests
Wikis
Settings
Webhooks and services
Deploy keys

I'm pretty sure it's enough to get an empty scope (see https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/): to read public account information. It's not clear about all other permissions.
Thank you!

Nothing can be done about this, it is provide by the GitHub OAuth Application and there is not an (obvious) way of changing it


A great project, that's what I need, thanks a lot :)

A great project, that's what I need, thanks a lot :)

Thank you! Glad it helped 😄 🎉


Update scalatest to 3.2.17

About this PR
📦 Updates org.scalatest:scalatest from 3.2.13 to 3.2.17
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalatest", artifactId = "scalatest" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scalatest", artifactId = "scalatest" }
}]

labels: test-library-update, early-semver-patch, semver-spec-patch, commit-count:1

Codecov Report
Patch coverage has no change and project coverage change: +0.06% :tada:

Comparison is base (862ac3a) 60.51% compared to head (1770204) 60.57%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #390      +/-   ##
==========================================
+ Coverage   60.51%   60.57%   +0.06%
==========================================
  Files         152      152
  Lines        3277     3277
  Branches      101      105       +4
==========================================
+ Hits         1983     1985       +2
+ Misses       1294     1292       -2

see 2 files with indirect coverage changes

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

Superseded by #421.


[AutoDiff upstream] @derivative attribute type-checking fixes.

Upstream @derivative attribute type-checking fixes regarding derivative
generic signatures with all concrete generic parameters.
Cherry-picked from:

https://github.com/apple/swift/pull/28762
https://github.com/apple/swift/pull/28772

Could you also include the tests from https://github.com/apple/swift/pull/28785, which I just remembered to merge?

Could you also include the tests from #28785, which I just remembered to merge?

Thanks for the reminder! I included both of the derivative_attr_type_checking.swift tests newly added in #28785.

@swift-ci Please test and merge

@swift-ci Please test and merge


[FEATURE]: Follow git history for moved/renamed files

Is your feature request related to a problem? Please describe.
I recently re-arranged my mkdocs blog files to a new folder (which was not really voluntary). I am using the plugin's git-version feature to sort by the date that the file was committed. Unfortunately this information is not preserved by Git, and it must be accessed using the '--follow' flag on the log command.
Describe the solution you'd like
Add the '--follow' command option to the git.log command that is used to get the commit times.
Describe alternatives you've considered
I would have to work out how to reconstruct the history for a file, or create a custom script to do some kind of text replacement during build time. But since it appears to be a simple code change, and other people may have the same issue, then I think it is worth asking for this feature.

More info: The git command is git log --follow -- <filename>.
I experimented with the log function:

git.log(<filename>, diff_filter="A") returns the log entry for when the file was moved
git.log(<filename>, diff_filter="A", follow=True) returns the log entry for when it was first created

However I can't seem to find these parameters in the GitPython documentation..

Great idea!
Could you open a PR for this, if possible?

Please check this release: https://github.com/liang2kl/mkdocs-blogging-plugin/releases/tag/v2.2.2

Sorry for the delay - forgot to check back here. I'm happy with these changes. They are live and working for me.
The build process is very slow when fetching dates from github. I'm keen to look into this further.


mobie.add_image fails

Running mobie-utils from #21
Running this code snippet:
import mobie

root = '/data/tmp/mobie_no_table_test/data/'
dataset_name = 'test_ds'

mobie.add_image(
    input_path='/data/datasets/platy_data.n5',
    input_key='/setup0/timepoint0/s1',
    root=root,
    dataset_name=dataset_name,
    image_name='em-raw',
    resolution=[0.02, 0.02, 0.02],
    chunks=[64, 64, 64],
    scale_factors=2*[[2, 2, 2]],
    is_default_dataset=True,
    target='local',
    max_jobs=12,
    unit='micrometer'
)

errors out with
Traceback (most recent call last):
  File "/home/hennies/.config/JetBrains/PyCharmCE2021.1/scratches/scratch_9.py", line 21, in <module>
    unit='micrometer'
  File "/home/hennies/src/github/mobie/mobie-utils-python/mobie/image_data.py", line 61, in add_image
    metadata.add_source_metadata(dataset_folder, 'image', image_name, image_metadata_path, view=view)
  File "/home/hennies/src/github/mobie/mobie-utils-python/mobie/metadata/source_metadata.py", line 93, in add_source_metadata
    validate_source_metadata(source_name, source_metadata, dataset_folder)
  File "/home/hennies/src/github/mobie/mobie-utils-python/mobie/validation/metadata.py", line 73, in validate_source_metadata
    assert_equal(name, bdv_name)
  File "/home/hennies/src/github/mobie/mobie-utils-python/mobie/validation/utils.py", line 59, in _assert_equal
    raise ValueError(msg)
ValueError

As far as I understand, the name field is created incorrectly in the em-raw.xml (see below) - the failing assertion requires it to be 'em-raw':
<SpimData version="0.2">
  <BasePath type="relative">.</BasePath>
  <SequenceDescription>
    ...
    <ViewSetups>
      ...
      <ViewSetup>
        <id>0</id>
        <name>Setup0</name>
        ...
      </ViewSetup>
    </ViewSetups>
    ...
  </SequenceDescription>
  ...
</SpimData>

This works for me, I assume the issue is in some outdated upstream packages. Could you please make sure to use the current master of

elf
cluster_tools
pybdv

These are all pure python, so installation should be easy.
(I will draft new releases soon.)


How to read and set headers in the initial http proxy tunnel connect method with guzzle?

I need to read and set headers in the initial connect method to the proxy server. I can see the response header from the proxy server when I turn on debug mode:

Rebuilt URL to: https://api.ipify.org/?format=json
...
Connected to ...
Establish HTTP proxy tunnel to api.ipify.org:443
Proxy auth ...
CONNECT api.ipify.org:443 HTTP/1.1
Proxy-Authorization: ..
Proxy-Connection: Keep-Alive
User-Agent: GuzzleHttp/6.2.1 curl/7.35.0 PHP/5.6.28-1+deb.sury.org~trusty+1
Host: api.ipify.org
HTTP/1.1 200 Connection established
X-Foo: bar

How can I read the "X-Foo: bar" response header from the connect phase?
How can I set a "X-Bar: foo" request header in the connect phase?
Edit: This is a question, not an issue.

A bit late lol but did you find any solutions? @ghost


small updates

This PR proposes a few changes to the docs:

the pyns section of the ecosystem page now has a link to pyns
the FAQ page now has the “click to show” feature for each question so that folks can see all questions at once and only check those they’re interested in
the bibliography page now has respective screenshot as well
the code parts of the colab tutorial were slightly adapted to make it more readable/clearer
the usage link of the pyns part was adapted to now link to the respective parts of the pyns docs

Thanks!


Respect stackframe deemphasize in getTopStackFrame

Fixes #211854
This PR adds consideration of the value 'deemphasize' on a StackFrame to the logic for selecting the top stack frame of a given thread. This brings the selection logic in line with the display logic used by the CallStackView, where a frame with the presentation hint deemphasize is treated the same as a frame whose source has such a presentation hint.

Does js-debug set this? Haven't tried it but it looks right. cc @connor4312

@roblourens, @connor4312, do you think this has a chance of getting in, or would you like changes to it? This is the missing piece of the workaround you described here, @connor4312 as a solution to this problem so that an adapter working with VSCode can simulate control over thread selection by indicating that the top frames of a given stack should be deemphasized. It needs to be available at the level of stack frame rather than source to account for cases in which the stack contains several frames of calls to functions defined in the same file, only one of which should be focused.


battery draining🐛

What were you trying to do?
i added the active option based on the route focused and app state, but the app still using the camera and it shows the warning message to the user
Reproduceable Code
const isFocused = useIsFocused();
  const isForeground = useIsForeground();
  const isActive = isFocused && isForeground;

 <PinchGestureHandler
              onGestureEvent={onPinchGesture}
              enabled={isActive}>
              <Reanimated.View style={StyleSheet.absoluteFill}>
                <TapGestureHandler onEnded={onDoubleTap} numberOfTaps={2}>
                  <ReanimatedCamera
                    ref={cameraRef}
                    // isActive={isFocused}
                    style={StyleSheet.absoluteFill}
                    device={device}
                    photo={true}
                    isActive={isActive}
                    onInitialized={onInitialized}
                    animatedProps={cameraAnimatedProps}
                    enableZoomGesture={true}
                    onError={onError}
                    orientation="portrait"
                  />
                </TapGestureHandler>
              </Reanimated.View>
            </PinchGestureHandler>

What happened instead?
isActive is working but it draining battery in background
Relevant log output
No response
Device
android 11 (oneplus 8 pro)
VisionCamera Version
2.13.2
Additional information

[ ] I am using Expo
[X] I have read the Troubleshooting Guide
[X] I agree to follow this project's Code of Conduct
[X] I searched for similar issues in this repository and found none.

Can you try logging to the console to see if you are actually rendering the camera with isActive={false}? Are you using React Freeze

Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.


update android libs to 1.0.1

fixing issue AGCORDOVA-76
@danielpassos want to have a look?

:+1:

@edewit was this merged to 1.0.x? JIRA says needs to go to 1.0.3 (fix version)


Add Async Delete to Product Type, Product, Engagment, and Test

Supersedes #5744
This PR adds settings flags to enable/disable the delete object preview. This removes the large amount of time rendering the objects that are to be deleted onto the page

With this comes an async feature to delete objects starting from the bottom up rather than relying on Django's cascade feature loading all objects into memory. The main motivation for this is in the event of a very large dataset (the one I encountered had 38k endpoints) that crashes the uwsgi container due to a lack of memory.

Even with removing the preview the cascades objects are still loaded into memory. It causes massive memory spikes which can crash a server even with autoscale. Chunking like this should allow cascade deletes to be more efficient as it can be scaled across celery workers in smaller chunks rather than hogging a single uwsgi process thread.

It's the other way around. Without preview, de existing delete does NOT load all the objects into memory, if we would make slight change to use the delete() method from a QuerySet (and not a model instance). Or if we would switch to _raw_delete().
Or even if we left it as is, but moved the delete into an async task it would already be more efficient. So basically if you leave out the chunking, this PR is more or less OK.
This PR currently in fact does load all objects into memory, multiple times. Firstly because it uses len()  on the queryset. Using count() could solve that. But even then each chunk is fully load into memory, then persisted to the broker, then loaded into memory again in the worker, and then deleted one by one. I don't think that's very efficient.
And even if that would be OK, deleting chunks in parallel is asking for race/timing conditions at some point. Which is what we see sometimes with the ASYNC_IMPORT for example, or even with automatic deletion of duplicates recently.

Or even if we left it as is, but moved the delete into an async task it would already be more efficient. So basically if you leave out the chunking, this PR is more or less OK.

The primary motivation for this PR is not a speed boost. It is for stability. Deleting an object with so many relationships causes the process to crash. Simply moving the entire delete behavior into a single celery worker does not solve this problem at all as the location of the crash is just moved away from uwsgi into a celery worker.
I am unsure how to combat that issue without splitting the delete of a single object into chunks. Do you have any other suggestions?

OK, so this is the first time I hear that it is the delete causing a crash. Until now everyone only mentioned that it was the preview. If I understand the docs at https://docs.djangoproject.com/en/3.2/topics/db/queries/#deleting-objects correctly, the delete could be made more efficient by doing something like Product.filter(id==1234).delete(). If we put that in a celery task it might not crash? It will skip our custom .delete() methods, which sometimes do something useful.
With the current PR, the instances are loaded into memory multiple times, so it would be weird if it doesn't crash with the code from this PR as it is now?
I didn't say the PR should be removed completely abandoned. It's just that I am not convinced the chunking is needed/stable. By iterating over de relationships from the bottom up, and deleting them level by level, it should already be a lot more efficient. But only if the model instances are not all loaded at once and maybe do something with only('id').

OK, so this is the first time I hear that it is the delete causing a crash. Until now everyone only mentioned that it was the preview.

Yeah it was stated in the description of the PR.

If I understand the docs at https://docs.djangoproject.com/en/3.2/topics/db/queries/#deleting-objects correctly, the delete could be made more efficient by doing something like Product.filter(id==1234).delete(). If we put that in a celery task it might not crash? It will skip our custom .delete() methods, which sometimes do something useful.

Relying on the queryset.delete() for deleting findings would skip calling the helper delete function. It is what is responsible for deleting duplicate clusters

With the current PR, the instances are loaded into memory multiple times, so it would be weird if it doesn't crash with the code from this PR as it is now?

The chunks are loaded yes. Once the instances in the chunk are loaded into memory in a variable, it is quickly overwritten by. another chunk and released. This is still a significant reduction than loading the parent object and all of its relationships.

Since this is configurable, I don't see the harm in the being available for those with large deletions and/or faced the issue it addresses.  For those that don't want to try out the new experiment, the normal way is still available to them.

And then if both don't work, people are stuck again. Why not try to make one that is clean and has the biggest chance of being succesful?

Valentijn, you know I have a ton of respect for your feedback, but I think we have unfortunately drifted from potentially constructive input to speculation. I don't see any remaining concrete question for Cody to answer or address in your last comment. I don't see reason not to merge this.

Even with removing the preview the cascades objects are still loaded into
memory. It causes massive memory spikes which can crash a server even with
autoscale. Chunking like this should allow cascade deletes to be more
efficient as it can be scaled across celery workers in smaller chunks
rather than hogging a single uwsgi process thread.
On Fri, Apr 29, 2022 at 3:54 AM valentijnscholten @.***>
wrote:

I like the idea of simplifying / removing the preview feature of the
deletion page. But this PR seems to add more complexity as we have to
maintain part of the relationships also in the new async delete functions.
Was it considered to just use the existing delete feature (with removing or
making optional of the preview of objects to delete)? Maybe wrapping that
in an async task?
Or are there problems with that django built in delete? Without gathering
all the objects it is just 1 call to delete that should work fine, as well
as respect all relationship properties, transactions, etc.
—
Reply to this email directly, view it on GitHub
https://github.com/DefectDojo/django-DefectDojo/pull/6183#issuecomment-1113070349,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABEFRQDLMIALJU5HN67NV6TVHOPTZANCNFSM5UKPMQMA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Greg Anderson
DefectDojo Project Leader
@.***


Landing page cause grid and nonprofit carousel

This pull request closes the following issue: #237
The issue was blocked for a while because of waiting on other blocking tasks and resources needed.
The issue also kept growing exponentially large as we dive into it, since there are many things connected to it that were not previously considered, such as incomplete backend schema.
The carousel of non-profit cards on the landing page is implemented together with the cause grid above it.
The api to request non-profit data, backend action to getNonprofitByDate was also included in this pull request.
There was also a data migration included in this pull request, and a schema change to non-profit for a new date attribute for requesting recently joined non-profits.
I encountered some issue with centering the carousel using the CoreCardPaginationList. The margin it has and the way it calculates rowSize does not work very well with centering alignment. I copied the component and modified the styling of the copy to center the carousel and maintain responsiveness (didn't modify the original because it might break other lists in the project). I changed the carousel width calculation and referencing the width w from window.innerWidth instead of using div ref because of a size change after center alignment.
Since the database currently does not have an address attribute, the cause list is empty for each non-profit, those data are not implemented to be shown on the non-profit card yet.
The current descriptions of the non-profits also do not describe the non-profits very well. Using the about attribute of nonprofit schema from the database, it should be the same one as shown on the donation pages.
All components are done according to the Figma design and are ready to be merged.

There are some conflicts with nonprofitcarddata since the card was implemented twice differently. Will fix it later tonight.


Bad Request: 400 Syntax Error : Missing whitespace between literal and alias at [1:36] in 04 - Vertex AI Custom Model - scikit-learn - in Notebook

hey Mike!
Firstly , A Big Thank you for teaching people like me about Vertex AI and sharing your code.Really appreciate it and will be forever grateful for the awesome stuff.
Regarding the error in code block [15] for which I got the above error :Bad Request: 400 Syntax Error : Missing whitespace between literal and alias at [1:36]
query = f"SELECT * FROM {BQ_PROJECT}.{BQ_DATASET}.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '{BQ_TABLE}'"
schema = bq.query(query).to_dataframe()
schema

I think it only needs :
query = f"SELECT * FROM `{BQ_PROJECT}.{BQ_DATASET}.INFORMATION_SCHEMA.COLUMNS` WHERE TABLE_NAME = '{BQ_TABLE}'"
schema = bq.query(query).to_dataframe()
schema

this worked!

Hello @rsher60, Thank you for pointing this out!  In our examples we use names for projects/dataset/tables that work without quoting: start with letter or _ and don't have blanks.  To be careful and make the code work even when names start with numbers or have spaces we should always use the backtick quoting.  We will mark this to be updated in the next update.  https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical

I was running these notebooks for a project and realized that we forgot to make the change.  I just updated the full 04 series of notebooks to have the backticks around BigQuery table references.  Thank you @rsher60 for bringing this to our attention!
Commit: https://github.com/statmike/vertex-ai-mlops/commit/1386ff22feab52e2db9b99ce9c474998f2879f4e


Fix bug where the foreground property did not affect the appearance correctly

I was trying to use your nuget package and ran into an issue when trying to style the control. The foreground property would not pretain it's set brush. I found out that it was statically set to Brush.Black and changed it so that it now is changed by a trigger. Now the foreground can be changed via styles.

thank you for this patch.
i will update code ! ;)
Best regards

Thank you.
It would be very cool if you could update your nuget package.
Kind Regards

Hi
I will update package this week :)
Best regards
Envoyé de mon appareil Samsung de Bell via le réseau le plus vaste au pays.
-------- Message d'origine --------De : themole<EMAIL_ADDRESS>Date : 17-05-02  03:26  (GMT-05:00) À : abbaye/wpf-currency-textbox<EMAIL_ADDRESS>Cc : Derek Tremblay<EMAIL_ADDRESS>State change<EMAIL_ADDRESS>Objet : Re: [abbaye/wpf-currency-textbox] Fix bug where the foreground property did not affect the appearance correctly (#1)
Thank you.
It would be very cool if you could update your nuget package.
Kind Regards
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/abbaye/wpf-currency-textbox","title":"abbaye/wpf-currency-textbox","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/abbaye/wpf-currency-textbox"}},"updates":{"snippets":[{"icon":"PERSON","message":"@themole in #1: Thank you.\r\nIt would be very cool if you could update your nuget package.\r\nKind Regards"}],"action":{"name":"View Pull Request","url":"https://github.com/abbaye/wpf-currency-textbox/pull/1#issuecomment-298524727"}}}


nixos/installer: enable sshd by default

Right now the UX for installing NixOS on a headless system is very bad.
To enable sshd without physical steps users have to have either physical
access or need to be very knowledge-able to figure out how to modify the
installation image by hand to put an sshd.service symlink in the
right directory in /nix/store. This is in particular a problem on ARM
SBCs (single board computer) but also other hardware where network is
the only meaningful way to access the hardware.
This commit enables sshd by default. This does not give anyone access to
the NixOS installer since by default. There is no user with a non-empty
password or key. It makes it easy however to add ssh keys to the
installation image (usb stick, sd-card on arm boards) by simply mounting
it and adding a keys to /root/.ssh/authorized_keys.
Importantly this should not require nix/nixos on the machine that
prepare the installation device and even feasible on non-linux systems
by using ext4 third party drivers.
Potential new threats: Since this enables sshd by default a
potential bug in openssh could lead to remote code execution. Openssh
has a very good track-record over the last 20 years, which makes it
far more likely that Linux itself would have a remote code execution
vulnerability. It is trusted by millions of servers on many operating
systems to be exposed to the internet by default.

Motivation for this change
Todo

[x] update installation manual docs

[x] add changelog entry

Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

@Mic92 This does seem easier. I believe there's also documentation in the nixos manual, could you also update that?

Yes. I want to gather some feedback and than put it in both the installation manual as well as the change-log.

Yes. I want to gather some feedback and than put it in both the installation manual as well as the change-log.

Gotcha, added todo's in the OP

Can we also have it spit out it's current IP to TTY after auto-login? Just so we don't have to nmap our own network or boot up our router mgmt software just to check leases?

Can we also have it spit out it's current IP to TTY after auto-login? Just so we don't have to nmap our own network or boot up our router mgmt software just to check leases?

dynamic motd? I would leave this for a different pr.

@mic92 I don't think it needs to be as complicated as that, since autologin happens it can be placed in environment.interactiveShellInit.

@jonringer is this something we should backport to 20.09? The change itself is simple but makes installing on headless hardware a lot easier.

@lheckemann please review.

I'm fine with having it on by default, but I would like to make sure that the default configuration.nix reflects it, so that people who don't want it on by default aren't surprised

I'm fine with having it on by default, but I would like to make sure that the default configuration.nix reflects it, so that people who don't want it on by default aren't surprised

@jonringer, just checking, but this only affects the installation-device profile. This means that there is no functional change in defaults elsewhere than on installer isos and installer SD images.

I'm fine with having it on by default, but I would like to make sure that the default configuration.nix reflects it, so that people who don't want it on by default aren't surprised

The installer does not have a configuration.nix.

Backported in ed443268ce688b9dc8d8c7f757180246f7f606f9

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/hello-folks-what-is-the-default-username-and-password-for-nixos-for-raspberry-pi/36897/5

It makes it easy however to add ssh keys to the
installation image (usb stick, sd-card on arm boards) by simply mounting
it and adding a keys to /root/.ssh/authorized_keys.

To clarify - is this only works for SD images, so it won't work for Minimal .ISO image written on SD card?
What are the steps then to use that for x86_64 where only .ISO installation images are available?


Update ROS 2 logo for Community Representatives.

address https://github.com/ros2/ros2_documentation/issues/2300
logo file comes from https://github.com/ros2.
Signed-off-by: Tomoya Fujita<EMAIL_ADDRESS>

before

after


Add Tversky loss for segmentation

Status
WORK IN PROGRESS
Description
Tversky loss is useful for segmenting imbalanced data. It uses two
hyperparameters alpha and beta as a trade-off between precision and
recall.
If alpha + beta = 1, it's an F-score.
If alpha = beta = 0.5, it's an F1-score (Dice).
See Sadegh et al. (2017): Tversky loss function for image segmentation using 3D fully convolutional deep networks.
This resolves #200
Types of changes

[x] New feature (non-breaking change which adds functionality)
[x] My code follows the code style of this project.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

Todos

[x] Tests
[ ] Documentation

Impacted Areas in Application
List general components of the application that this PR will affect:

Segmentation training

I need to fix this error:
TypeError: unsupported operand type(s) for -: 'int' and 'SparseTensor'

I'm training my network using this loss and everything looks fine.


Remove deprecated functions ahead of 1.0.

Remove deprecated functions.

Build failed https://gradle.com/s/ymx5h7vrsvnrk

Build failed


plugin: fix build

src/afl-llvm-pass.so.cc:82:49: error: format '%u' expects argument of type 'unsigned int*', but argument 3 has type 'int*' [-Werror=format=]
Signed-off-by: Marc-Antoine Perennou<EMAIL_ADDRESS>

Out of curiosity, was this preventing you from building AFL?

As it's used everywhere with %u, yes, it failed because of Werror (see
commit message)
On Sun, 31 Jan 2016 at 19:52, Corey Farwell<EMAIL_ADDRESS>wrote:

Out of curiosity, was this preventing you from building AFL?
—
Reply to this email directly or view it on GitHub
https://github.com/frewsxcv/afl.rs/pull/37#issuecomment-177582692.

Sorry for the delay. Thanks!


accomodate s3 path

Counterintuitively, the output path of aws runs is effectively empty. So additional parameter are needed to account for the differences.

@hsun3163 thanks ! this was counter intuitive to me in the beginning but if you think of github files vs folders it's the same thing: there is no such a concept as folders on github or AWS. Its always about files. With that in mind perhaps you see it starts to make sense (hopefully you get what i mean)


v1.7.5 has removed renderers folder

In the latest bower release the lib/renderers folder was removed.
Is there docs for this change so it can be updated in modules which used to use the renderers? And, why was it removed. Just curious?

It wasn't removed. Just moved to sub-directory (lib).
It's because we needed to embed node_modules into bower to lock dependencies. If we included it in root directory, earlier versions of npm just removed them. The result is this issue: https://github.com/bower/bower/issues/2152
We decided to wrap all files in extra directory and put node_modules there, so npm leaves them alone.
lib/renderers are not part of public Bower API, please don't use them. The only way to use bower programmatically is require('bower').

@sheerun okay great. Thanks for the update. For some reason I didn't seem them in that folder, but now they're there. Thanks for the update. That all makes sense. Thanks for the great module!

I've released bower 1.7.7 that should have all lib files back at their places


Tweak interface/type embedding in databaseCommon

In service of streaming set and map mutators, it'd be helpful for
ValueStore to implement some methods that are exposed only to other
code within the types package, even when a ValueStore is embedded
in a Database. That said, we don't want those methods to become a
part of the public Database API.
To enable this, this patch changes databaseCommon to embed a
*types.ValueStore, instead of composing one. This causes all the
ValueStore methods to be a part of the databaseCommon API, but
since all the Database construction methods return a Database by
interface, stuff like BatchStore() all gets masked. Thus, callers
still can't access ValueStore methods. Databases are passed into
the types package as ValueReadWriters, though, so code in there
can call any method on that interface -- including unexported stuff.

PTAL

This is pretty cool and definitely a way of approaching the problem that I hadn't considered. Thanks for showing me how to do this.
Now that I've looked at it, I have a couple of observations/questions.

The instance variable "vs" becomes "ValueStore" and so becomes exported. I don't think that's a big deal but just wanted to point it out.
Does opCache() belong in the ValueReadWriter interface or should there be a separate interface with the unexported opCache() method?
Does it make sense to implement opCache() on ValueStore or should some other object be added to databaseCommon to manage it?

Yeah, I agree it's a downside. My thought was that, because stuff outside this package only ever sees the interface Database (as opposed to the concrete types) and that doesn't expose ValueStore, it's pretty much a wash.
You could make it a different interface, but then you'd have to add an argument to NewMutator that is of that new interface type.
This kind of only works because the thing that implements the unexported method and the code that wants to use it are both in the same package, and because databaseCommon embeds the type that implements the method. You could split it out of ValueStore, but then you'd have to make databaseCommon embed whatever that new type was.

Now that I've implemented streaming sets without the singleton, I definitely think it's cleaner to have the database own the opCacheStore. The complexity of the relationship between datas and types is a little unnerving but this doesn't seem to make it much (if any) more complicated than it already is.
LGTM.


document how to force a downstream provider to be included

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

Coverage data is based on head (e03eecb) compared to base (78bf9c3).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #55   +/-   ##
=======================================
  Coverage   83.80%   83.80%
=======================================
  Files          21       21
  Lines        2989     2989
=======================================
  Hits         2505     2505
  Misses        316      316
  Partials      168      168

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

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


Update secure-single-tenant-workflow-virtual-network-private-endpoint.md

Updating the note that talks about uninterrupted access to the storage to include the outbound requirements for private endpoints, as I've seen at least a couple of customers hitting this issue and saying we don't have a list of ports required.
Might need to include a list of required outbound ports based on different scenarios, somewhere.

@wsilveiranz : Thanks for your contribution! The author(s) have been notified to review your proposed change.

IMPORTANT: When this content is ready to merge, the reviewer must add #sign-off in a comment or the approval may get overlooked.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#please-close

Just closed this PR as we have another in the private repo, thanks!


Cannot Open Existing Diagram in Chrome / Chromium version 85

Preflight Checklist

[x] I agree to follow the Code of Conduct that this project adheres to.
[x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug
Cannot select a folder in Chrome and Brave Browser
To Reproduce
Steps to reproduce the behavior:

visit draw.io & Authorization
Click on 'Open Existing Diagram'
Got  sign in screen again, if Click Sign-in twice, got Error
There was an error!
Details:
The feature you requested is currently unavailable. Please try again later.

Expected behavior
List folders in Google drive
Screenshots

draw.io version (In the Help->About menu of the draw.io editor):

draw.io version [e.g. 13.7.1]

Desktop (please complete the following information):

OS: macOS Catalina
Browser: Chrome
Version: 85
also
Browser: Brave Browser
Version: 1.13 ( Chromium 85 )

It works fine in firefox version 80
Additional context
Chrome dev tools - Console

Never tested Brave, can you try Chrome incognito?

Hi @davidjgraph
Yes, I did, It's not work in Chrome incognito.

Came here to post the same error with Brave. Works fine in Chrome


Ask for help: How to highlight words?

Question
I want add to my text redactor rust code syntax highlight, how i can do this?

I know this is a really old issue, but for those who find this issue in the future as I did, the way I solved this was somewhat similar to what @gyscos suggested, so I'm leaving it here in case it might inspire others.
This is pretty hacky, so any suggestions are appreciated:
    let mut new_message = message.clone();
    if templated_words.len() > 0 {
        for word in templated_words.iter() {
            let re_matcher = format!(r#"({})"#, word.clone());
            let re = Regex::new(re_matcher.as_str()).unwrap();
            for capture in re.captures_iter(new_message.clone().as_str()) {
                 // I'm implementing a simple templating for highlighting words but matching
                 // highlighted words separated by spaces was something I didn't know how to do
                 // so I replace the spaces with underscores first, so I'm only looking for "one" word
                let plain_word = capture.get(1).unwrap().as_str().replace(" ", "_");
                let start = capture.get(1).unwrap().start();
                let end = capture.get(1).unwrap().end();
                new_message = new_message.clone()[..start].to_string()
                    + &plain_word[..]
                    + &new_message.clone()[end..];
            }
        }
        let styled_room_text = new_message
            .lines()
            .map(|sentence| {
                let styled_sentence = sentence
                    .split(' ')
                    .map(|word| {
                        // now I can split that templated word above and join with a space again, so I'm working with
                        // one string that might have spaces in it
                        let trimmed_word = &word.split("_").collect::<Vec<&str>>().join(" ");
                        let sanitized_word: String;

                        // this part here is so that I could still highlight a word if it was next to a punctuation mark.
                        // this is a very brittle and naive implementation that works for my project but I can't recommend it.
                        let last_char = if trimmed_word.len() > 0 {
                            trimmed_word.clone().chars().last().unwrap()
                        } else {
                            ' '
                        };
                        if last_char == '.'
                            || last_char == '!'
                            || last_char == '?'
                            || last_char == ','
                        {
                            sanitized_word = trimmed_word[..trimmed_word.len() - 1].to_string();
                        } else {
                            sanitized_word = trimmed_word.to_string();
                        }
                        // templated_words is a Vec<String> that might contain strings with spaces in them so that's why the work
                        // above with splitting and replacing is needed
                        if templated_words.contains(&sanitized_word) {
                            let mut styled_word = SpannedString::styled(
                                sanitized_word,
                                Style::from(Color::Light(BaseColor::Blue)).combine(Effect::Bold),
                            );
                            // we highlight the word above, and then append the corresponding punctuation as a plain string
                            if last_char == '.' {
                                styled_word.append(".");
                            }
                            if last_char == '!' {
                                styled_word.append("!");
                            }
                            if last_char == '?' {
                                styled_word.append("?");
                            }
                            if last_char == ',' {
                                styled_word.append(",");
                            }
                            styled_word.append_plain(" ");
                            styled_word
                        } else {
                            let mut plain_word = SpannedString::styled(
                                word.to_string(),
                                Style::from(Color::Dark(BaseColor::Green)),
                            );
                            plain_word.append_plain(" ");
                            plain_word
                        }
                    })
                    .reduce(|mut acc, word| {
                        acc.append(word);
                        acc
                    })
                    .unwrap();
                styled_sentence
            })
            .fold(StyledString::new(), |mut s, l| {
                s.append(l);
                s.append_plain("\n");
                s
            });
        styled_room_text
    } else {
        SpannedString::styled(message, Style::from(Color::Dark(BaseColor::Green)))
    }

I hope this can help others too.

Note that since then, cursive-syntect was added to simplify using syntect to generate a StyledString.


Cancel tooltip when hiding the node it belongs to

Thanks!

Tagging as bug as the intention of the code which is edited was indeed to cancel the tooltip in this case, but the code was bogus. Let's give it some testing in master before cherrypicking though, just in case.

Cherry-picked for 3.1.2.


Update pre-commit hooks

Summary
Update versions of pre-commit hooks used.
Related issues or links
N/a
Checklist
Provide proof that this works (this makes reviews move faster). Please perform one or more of the following:

[x] Update/add unit or integration tests.

Thanks!


Adjust PFS /info endpoint

Description
In https://github.com/raiden-network/raiden-services/pull/689 the naming of some responses for PFS's /info endpoint have been changed
We should identify required changes on our side and, if there are any, implement them

Done in #739


Don't use language while querying

Fixes #4

Well, we lost a filter we win a no-filter. In general a good idea to remove language in query. Beside this merge, I moved shortcut to a lesser aggressive F1 to a more polite cmd+k, cmd+k (which remind shift-K in vim)
Thanks @dufferzafar


Calendar reference date ignored.

Hi I've been trying to set the output of the .calendar() method to 'DD/MM/YYYY' for dates that are more than a week ago,
So tried various ways to do this. See image attached from my console. It appears the referenceDate in the .calendar method is completely ignored...

Not sure what your environment is. It does work for me:
moment().calendar("2015-09-29T13:38:02.151Z", 'DD/MM/YYYY')
"10/06/2015"

That's not correct either. It should say: 29/09/2015. not 10/06/2015
I'm using requirejs.
 'moment': 'application/libs/bower/moment/min/moment.min',
not setting any locale. simply running the method:
moment().calendar("2015-09-29T13:38:02.151Z", 'DD/MM/YYYY')

Any ideas on what could be causing this? Areas of the code?
I might have a chance at fixing this.

It appears the tests on this area of the code doesn't cover this scenario. see: https://github.com/moment/moment/blob/develop/src/test/moment/format.js#L313

Highlighted the bug in qunit. https://github.com/mikeljames/moment
https://github.com/mikeljames/moment/blob/develop/src/test/moment/format.js#L318

I think you misunderstand the purpose of the referenceTime parameter.  It is there only to be used as a comparison when using outputs similar to "Today as 2:30 AM".  in that string, "Today" matches the reference date, which is why it defaults to the actual current date.
Your code moment().calendar("2015-09-29T13:38:02.151Z", 'DD/MM/YYYY') doesn't provide that date as an input - it just uses it as the reference to determine format.  Your input is the actual current date, since you use moment().
Also, the second parameter does not just take a single format string.  If you want that, use the format function instead.  On the calendar function, this takes an object with a list of overrides from the locale's default calendar formats.
If you just want to change the format when it's not near the reference time, then do this:
moment("2015-09-29T13:38:02.151Z").calendar(null, {sameElse : 'DD/MM/YYYY' })

BTW, this defaults to L (the localized short-date format), so you might just consider changing the locale, rather than customizing the format.

@mj1856 Thanks for your help this wasn't very clear to me.

Glad to help!


Observed "MALFORMED_FRAME_LENGTH [0/0]: COMMAND_UNKNOWN" error at MediaDriver

I was testing Aeron with different TERM lengths and observed "MALFORMED_FRAME_LENGTH [0/0]: COMMAND_UNKNOWN" error at subscriber side media driver.
1> Started  media driver at producer machine
java -cp aeron-samples/build/libs/samples.jar -Daeron.sample.channel=udp://<IP_ADDRESS>:5000 -Djava.net.preferIPv4Stack=true -Daeron.term.buffer.length=65536  uk.co.real_logic.aeron.driver.MediaDriver
2> Started Media Driver at different machine
java -cp aeron-samples/build/libs/samples.jar -Daeron.sample.channel=udp://<IP_ADDRESS>:5000 -Djava.net.preferIPv4Stack=true  uk.co.real_logic.aeron.driver.MediaDriver
WARNING: conductor directory already exists: /tmp/aeron/conductor
WARNING: data directory already exists: /tmp/aeron/data
( Error is printed after step 3)
[1241.685856] MALFORMED_FRAME_LENGTH [0/0]: COMMAND_UNKNOWN
[1241.688031] MALFORMED_FRAME_LENGTH [0/0]: COMMAND_UNKNOWN
)
3> Started a producer app (https://github.com/strangelydim/Aeron.git
java -cp aeron-samples/build/libs/samples.jar -Daeron.sample.channel=udp://<IP_ADDRESS>:5000 -Djava.net.preferIPv4Stack=true uk.co.real_logic.aeron.samples.BasicPublisherWithFragmentation
ava -cp aeron-samples/build/libs/samples.jar -Daeron.sample.channel=udp://<IP_ADDRESS>:5000 -Djava.net.preferIPv4Stack=true uk.co.real_logic.aeron.samples.BasicPublisherWithFragmentation
Publishing to udp://<IP_ADDRESS>:5000 on stream Id 10
Exception in thread "main" java.lang.IllegalArgumentException: encoded message exceeds maxMessageLength of 8192, length=8204
at uk.co.real_logic.aeron.common.concurrent.logbuffer.LogAppender.checkMessageLength(LogAppender.java:310)
at uk.co.real_logic.aeron.common.concurrent.logbuffer.LogAppender.append(LogAppender.java:133)
at uk.co.real_logic.aeron.Publication.offer(Publication.java:146)
at uk.co.real_logic.aeron.samples.BasicPublisherWithFragmentation.main(BasicPublisherWithFragmentation.java:73)
4> Repeated the same test with TERM Buffer length set to 131072 at a machine where producer is
java -cp aeron-samples/build/libs/samples.jar -Daeron.sample.channel=udp://<IP_ADDRESS>:5000 -Djava.net.preferIPv4Stack=true -Daeron.term.buffer.length=131072  uk.co.real_logic.aeron.driver.MediaDriver
No error were seen and messages were exchanged between Producer and Consumer.

I've been able to reproduce this, and can confirm it's a problem.

The exception is due to sending a message larger than the max message length. Which is expected. I'll add a method to grab the max message length from the Publication for ease of use.
However, why that is causing a frame to be sent that is malformed is undesirable. I'll take a deeper look.

I get a stream of these:
[1426808727.658380] MALFORMED_FRAME_LENGTH [0/0]: COMMAND_UNKNOWN

just running this incredibly simple test app:
package uk.co.real_logic.aeron.tools;

import uk.co.real_logic.aeron.Aeron;
import uk.co.real_logic.aeron.Publication;
import uk.co.real_logic.aeron.Subscription;
import uk.co.real_logic.aeron.common.concurrent.logbuffer.Header;
import uk.co.real_logic.aeron.driver.MediaDriver;
import uk.co.real_logic.agrona.DirectBuffer;

public class MalformedTest
{

	public static void onMessage(DirectBuffer buffer, int offset, int length, Header header)
	{

	}

	public static void main(String[] args)
	{
		final MediaDriver driver = MediaDriver.launch();

		final Aeron.Context ctx = new Aeron.Context();

		final Aeron aeron = Aeron.connect(ctx);

		final Publication pub = aeron.addPublication("udp://localhost:40001", 10000, 12345);
		final Subscription sub = aeron.addSubscription("udp://localhost:40001", 10000, MalformedTest::onMessage);

		while (true)
		{
			try
			{
				Thread.sleep(1000);
			}
			catch (final InterruptedException e)
			{
				e.printStackTrace();
			}
		}

	}

}

No actual sending or receiving of messages required - just a publication and a subscription on the same channel in the same app.
However, for some reason, the EmbeddedPingPong sample app works fine for me without the MALFORMED errors.
If I don't create either the Subscription or the Publication in the app, no errors.  They both have to be created.

Looks like this is isolated to publishers that are created and then never send anything. The heartbeat can't send any data since no data has been sent. So, it sends a 0 length UDP datagram. Which is dropped as malformed. This is benign. But noisy.
This behavior is different than it was in the past. So, some of the refactoring of the DriverPublication probably got rid of some checks.
Will be looking at this logic a little closer.

Note that the change committed means that your app will see inactive connections since on data has been sent. This will be a new connection immediately as the SETUP frame will come in again.
I think this is the right semantics. Until data is sent, it's really not a true stream.
Thoughts?

How about if no data has been sent on a connection, you don't get a newConnection notification for the connection at all?  So no newConnection/inactiveConnection notification flapping, just no notifications at all unless the publication actually sends something.

Downside to that might be more branching in the client subscription.

Is it possible to send a non-0-byte message, then, as the heartbeat even when no data has yet been sent?  Just a dummy message with a few bytes of padding that the client knows to ignore?

Not without changing the LogRebuilder, no. We decided at one point to remove 0 length data frames so that we can simplify the processing on the receiver.

It's not that bad to keep the receiver active with the SETUP frame. I'm just not convinced it is the right semantic...

We probably could change the rebuilder to handle 0 length messages and make the hearbeat work correctly now that we are position based. I could have a look at doing this if it would be useful?

Here is a couple questions I am interested in hearing opinions on.

Is the liveness of a stream only indicated by the publisher being alive?
Does the liveness of a stream depend on there being data?

What it comes down to: "is a stream with no data considered alive"?
Maybe this is too metaphysical...

@tmontgomery I like to think that everything has a life cycle, or a state machine if you want to think of it another way. There needs to be an event that takes something into the alive state. In this case it springs into life when the connection is made, not on first data packet.
Another way to think of this is if I send one message and then not send another for a long time but the publisher is still active would you kill the stream? We currently do not. I think as long as the publisher is alive then the connection is alive.
Stream with no data is the same as a stream with no data in a long while to me. It is an attentive stream waiting to receive data along as the source is alive.

Also if we send a heartbeat data frame with a frame length of 0 it should be processed on the receiver side correctly. A position of 0 plus a length of 0 takes the position to 0 which will imply a heartbeat at start of stream. Any data packet that if it was applied takes the stream to the current position is considered a heartbeat without actually processing it. Having moved to position based makes this quite easy.

The issue here was that it wasn't actually 0 length Aeron Data Frame. It was a 0 length UDP datagram. No UDP payload to hold an Aeron header. The receiver got the message, logged it got it and dropped it. It couldn't even know what the session Id or anything else was since it had no Aeron header. Clearly shouldn't be sent since it has no value Aeron can assume from it.
A 0 length Aeron Data frame is valid. And should be fine.
This was simply noise. And it wasn't operating correctly.
I've been warming to the idea of keeping the stream alive while the sender is alive as I thought about it over the weekend.

@tmontgomery do you know how we ended up sending a zero length datagram?

Yes. Length of last send in the DriverPublication is 0. We sent 0 UDP length datagram when we tried to send a heartbeat.

I'll be looking at the cleanest way to use a SETUP frame to keep a connection active. I've been looking at it more from the usability angle and it only makes sense. The metaphysical angle brings up other "uncomfortable truths" that should be left out anyway.

Just an update. We intend to change the heartbeat to be a 0 frame length data frame. I.e. all heartbeats will be a single data frame with a frame length of 0. This should elegantly solve the keepalive issue as well as provide a cleaner heartbeat all around. Timeframe is "soon".


Custom view lose OnClickListener after scaling

I use several custom views. Every view represents an object that could be present on map and has OnClickListener. But I noticed that after scaling views lose their listeners. So I see no reaction if I click on scaled and translated view.
By the way, if I click on the place where view was - it will fire OnClickListener.
This behavior is not constant and all work well if I will scale to original size.

that's correct, scaling only affects the visual representation of the View.  the android View framework does not directly relate the visual output of the view to its touch area - you'd have to manage that manually.  depending on your specific needs, the Marker or HotSpot APIs might be easy alternatives.

Ok, got it. Thank you.
пт, 12 февр. 2016, 17:44, Mike<EMAIL_ADDRESS>
that's correct, scaling only affects the visual representation of the
View. the android View framework does not directly relate the visual output
of the view to its touch area - you'd have to manage that manually.
depending on your specific needs, the Marker or HotSpot APIs might be easy
alternatives.
—
Reply to this email directly or view it on GitHub
https://github.com/moagrius/TileView/issues/262#issuecomment-183379116.


react-native 0.64 Range.h:44:10: fatal error: 'fmt/format.h' file not found #include <fmt/format.h> and Flipper-Folly/folly/concurrency/CacheLocality.cpp:25:10: fatal error: 'fmt/core.h' file not found

react-native-cli: 2.0.1  create project
Description
React Native version:
System:
OS: macOS 10.15.5
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 891.52 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 19, 22, 23, 26, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
System Images: android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.87<IP_ADDRESS>53283
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_201 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.

react-native init Test064
yarn start

Expected Results
                                   static_cast<void>( )

In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Flipper-Folly/folly/concurrency/CacheLocality.cpp:17:
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/concurrency/CacheLocality.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/mutex:190:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/system_error:145:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__errc:104:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cerrno:26:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/errno.h:31:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/errno.h:23:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/usr/include/sys/errno.h:81:15: note: expanded from macro 'errno'
#define errno (*__error())
^
/Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Flipper-Folly/folly/concurrency/CacheLocality.cpp:25:10: fatal error: 'fmt/core.h' file not found
#include <fmt/core.h>
^~~~~~~~~~~~
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Flipper-Folly/folly/synchronization/AsymmetricMemoryBarrier.cpp:21:
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/Exception.h:25:
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/Conv.h:116:
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/Demangle.h:19:
/Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/FBString.h:1693:72: warning: possible misuse of comma operator here [-Wcomma]
"basic_fbstring: null pointer initializer not valid"),
^
/Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/FBString.h:1692:15: note: cast expression to void to silence warning
: (throw_exceptionstd::logic_error(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast(
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Flipper-Folly/folly/synchronization/AsymmetricMemoryBarrier.cpp:21:
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/Exception.h:25:
In file included from /Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/Conv.h:120:
/Users/apple/Documents/work/git/reactNativeUiComponent/ios/Pods/Headers/Private/Flipper-Folly/folly/Range.h:44:10: fatal error: 'fmt/format.h' file not found
#include <fmt/format.h>
^~~~~~~~~~~~~~

Has there been a workaround for this?

Has there been a workaround for this?

Podfile  #use_flipper or  delete use_filpper

Seeing this error with React Native 0.65 + with use_frameworks! (and without flipper, which can’t be combined with use_frameworks!)
Any workaround?

Same happens with 0.65.1 when I use :hermes_enabled => true, but works fine with false.

@LewinJun did you find a solution for it?

try spec.pod_target_xcconfig append \"$(PODS_ROOT)/fmt/include/\".

Closing as this version of React Native is several years old. Please re-open a new issue against the latest stable if the issue persists

Happening for myself on 0.73.6

This is also happening for me on 0.74.0

try spec.pod_target_xcconfig append \"$(PODS_ROOT)/fmt/include/\".

@jahnagoldman  were you able to find a solution for this?

This is also happening for me on 0.74.0

@jahnagoldman were you able to find a solution for this?

Sorry, I'm not 100% sure on the cause for this, but later on I tried again to upgrade (this time to 0.74.5), updated a bunch of other dependencies, followed the react native upgrade helper,  and managed to get past this issue. So could be worth trying something like that.

This is also happening for me on 0.74.0

@jahnagoldman were you able to find a solution for this?

Sorry, I'm not 100% sure on the cause for this, but later on I tried again to upgrade (this time to 0.74.5), updated a bunch of other dependencies, followed the react native upgrade helper, and managed to get past this issue. So could be worth trying something like that.

Yeah, I, too, had to update the packages and XCode as well


Add golansci-lint configuration file

Codecov Report

Merging #324 (e7c4273) into master (bcd1831) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
- Coverage   69.04%   69.02%   -0.02%
==========================================
  Files          67       67
  Lines        5569     5569
==========================================
- Hits         3845     3844       -1
- Misses       1327     1328       +1
  Partials      397      397

Impacted Files
Coverage Δ

tcp/clientobserve.go
66.38% <0.00%> (-0.85%)
:arrow_down:

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 bcd1831...e7c4273. Read the comment docs.


Multiple Issues

Device information

Neko version: 2.6.1
Android phone & version: Galaxy Note20 - Android 11

Steps to reproduce

Reload 1-3 mangas
Search for anything
Try to open a chapter

Expected behavior

It will check for new chapters and update the chapter list if there are any new chapters.
It will load the results of the search
It will load the pages of the chapter

Actual behavior

The loading will freeze at the beginning of the loading anim, and not ahow any new chapters
It will load endlessly not showing any results
It will load endlessly without a single page

Other details
For a Tachiyomi fork specialized for MangaDex, surprisingly Tachiyomi works better.

I meant 2.6.1

https://github.com/CarlosEsco/Neko/issues/598
force close your app

https://github.com/CarlosEsco/Neko/issues/598
force close your app

I've already done that, and I don't wanna force close my app every 2 chapters.

Then force close, and download for now

Didn't see the issue you quoted at first, but it worked. Thanks.

It broken again and clearing the cache doesn't work anymore


v4: remapProps not working

Describe the bug
For components like ImageBackground prop remapping isn't being applied
To Reproduce
Add the following to an app
<ImageBackground className="flex-1" />

Inspect the element in the React Native inspector and the styles are missing.
Expected behavior
The flex styles should be applied.
Expo Snack
TBA
Additional context
I'm pretty confident that the problem lies at https://github.com/marklawlor/nativewind/blob/main/packages/react-native-css-interop/src/runtime/css-interop.native.ts#L104-L108
// Changing
rawStyles.push(opaqueStyle);
// to
rawStyles.push(style);

fixes the problem.
I was going to do a PR but I'm not sure what this code is actually trying to do

Fixed in latest alpha


Passing scroll behavior options to router

We wanted to pass scrollBehavior function to Vue router as documented here, there seems no way to do that currently.

Try this: https://github.com/frandiox/vite-ssr/pull/42

Thank you 🙏🏾


Create a "Colours" extension.


Make it easy to deploy to Heroku

deploy to Heroku is now super easy, I also added the Deploy button

Ok thanks for the contribution ;)


diffusion_pytorch_model.safetensors and text_encoder_2\model.safetensors not found

Launching Web UI with arguments: --theme dark --xformers --no-half-vae --api --autolaunch
Using SDXL 0.9
Loading model stabilityai/stable-diffusion-xl-base-0.9
vae\diffusion_pytorch_model.safetensors not found
Loading model stabilityai/stable-diffusion-xl-refiner-0.9
text_encoder_2\model.safetensors not found
Loading weights [ed989d673d] from D:\sd\sd-webui-aki-v4.1\models\Stable-diffusion\dreamshaper_7.safetensors
Running on local URL:  http://<IP_ADDRESS>:7860
above were lines when lauching the webui. the weights were all downloaded, but after restarting,  the console gives me safetensors not found error.
by typing in txt in the prompt section, the image can be generated, but console is still showing error as follows:
Model loaded in 6.5s (load weights from disk: 0.6s, create model: 0.9s, apply weights to model: 2.8s, apply half(): 0.5s, load VAE: 0.7s, move model to device: 0.9s, load textual inversion embeddings: 0.1s).
Error adding [prompt_spaces] to filename
Traceback (most recent call last):
File "D:\sd\sd-webui-aki-v4.1\modules\images.py", line 446, in apply
replacement = fun(self, *pattern_args)
File "D:\sd\sd-webui-aki-v4.1\modules\images.py", line 355, in
'prompt_spaces': lambda self: sanitize_filename_part(self.prompt, replace_spaces=False),
File "D:\sd\sd-webui-aki-v4.1\modules\images.py", line 332, in sanitize_filename_part
text = text.translate({ord(x): '_' for x in invalid_filename_chars})
AttributeError: 'list' object has no attribute 'translate'
not sure what is going on here. need some pointers.

some users use different Images filename pattern and have the same errors