how to create a class containing a list of custom numba objects

I would like class B to contain a list of A objects as so:
from numba import int8, jitclass, types, typed

@jitclass([("field", int8)])
class A:
    def __init__(self):
        self.field = 1

@jitclass([("container", types.ListType(A))])
class B:
    def __init__(self):
        self.container = typed.List(A())

if __name__ == "__main__":

    b = B()

Error:
Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<class 'numba.types.containers.ListType'>) with argument(s) of type(s): (instance.jitclass.A#7f994ec4a860<field:int8>)
 * parameterized
In definition 0:
    TypeError: typer() takes 0 positional arguments but 1 was given
    raised from /home/xxx/miniconda3/envs/yyy/lib/python3.7/site-packages/numba/typing/templates.py:283
In definition 1:
    TypeError: typer() takes 0 positional arguments but 1 was given
    raised from /home/xxx/miniconda3/envs/yyy/lib/python3.7/site-packages/numba/typing/templates.py:283
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: typeref[<class 'numba.types.containers.ListType'>]

Where have I gone wrong...? Or is this functionality not supported? Numba 0.48, Python 3.7

I received an answer on S.O, but it is a little hacky. Is there a better way to do it - see answer below:
from numba import int8, jitclass, types, typed, typeof

@jitclass([("field", int8)])
class A:
    def __init__(self):
        self.field = 1

list_instance = typed.List()
list_instance.append(A())

@jitclass([("container", typeof(list_instance))])
class B:
    def __init__(self, container):
        self.container = container

list_a = typed.List()
list_a.append(A())
list_a.append(A())
b = B(list_a)
print(b)
print(b.container)
print(b.container[0].field)

Output:
<numba.jitclass.boxing.B object at 0x0000020BF396C0B0>
[<numba.jitclass.boxing.A object at 0x0000020BF385AEB0>, <numba.jitclass.boxing.A object at 0x0000020BF385A810>]
1

@6Hhcy thanks for asking about this on the Numba issue tracker, the error you were seeing initially, was from the typed-list lacking argument support in the constructor:
You can try the following to see what I mean:
from numba import njit, typed

@njit
def foo():
    return typed.List((1, 2, 3))

foo()

@6Hhcy not sure if this is less hacky, but how about:
from numba import int8, types, typed, typeof
from numba.experimental import jitclass

@jitclass([("field", int8)])
class A:
    def __init__(self):
        self.field = 1

@jitclass([("container", types.ListType(typeof(A())))])
class B:
    def __init__(self, l):
        self.container = l

if __name__ == "__main__":
    l = typed.List()
    l.append(A())
    b = B(l)
    print(b)
    print(b.container)
    print(b.container[0].field)

Lastly, not also that there is some documentation about this at: http://numba.pydata.org/numba-doc/latest/user/jitclass.html?highlight=jitclass in case you haven't seen it yet.

Thank you, that suggestion is a little better.

@6Hhcy thanks for following up.

I have a lightly different question now: What if I want Class B to contain a list of tuples which each look like:
(float, string, ClassA)
I'm really struggling with this typing system. Many thanks

@6Hhcy perhaps try using numba.typeof to tell you the Numba types of instances of Python types etc.
$ ipython

In [1]: %paste
from numba import int8, types, typed, typeof
from numba.experimental import jitclass

@jitclass([("field", int8)])
class A:
    def __init__(self):
        self.field = 1

@jitclass([("container", types.ListType(typeof(A())))])
class B:
    def __init__(self, l):
        self.container = l

if __name__ == "__main__":
    l = typed.List()
    l.append(A())
    b = B(l)
    print(b)
    print(b.container)
    print(b.container[0].field)
## -- End pasted text --
<numba.experimental.jitclass.boxing.B object at 0x7f185a8eff10>
[<numba.experimental.jitclass.boxing.A object at 0x7f185a919250>]
1

In [2]: from numba import typeof

In [3]: example_data = (12.34, 'somestring', A())

In [4]: typeof(example_data)
Out[4]: Tuple(float64, unicode_type, instance.jitclass.A#7f185d4b35e0<field:int8>)

Great trick! Thank you very much :)

No problem, will close this again, in future, if you have quick questions, the Numba core developers are also available on gitter.im real time chat.


Missing MetricMetaData in Golang Package

What did you do?
I'm trying to convert Prometheus RemoteWrite requests to OpenTelemetry format. In the protoformat from the WriteRequest: https://github.com/prometheus/prometheus/blob/main/prompb/remote.proto
i see there is a MetricMetaData field. however if i check the golang package: https://pkg.go.dev/github.com/prometheus/prometheus/prompb#WriteRequest
i don't see the MetricMetaData in there.
I'm wondering where the metadata is in the golang package

The pkg.go.dev documentation is unfortunately far out of date because we last tagged a Go module release in 2018.
Here's a version generated today: https://gowalker.org/github.com/prometheus/prometheus/prompb#WriteRequest

If you go get<EMAIL_ADDRESS>(see https://github.com/thanos-io/thanos/blob/1205a222cb1e1be4862ef39b4c3a9c538056cf83/go.mod#L63) it should be up to date.

You can use go get<EMAIL_ADDRESS>to get a specific release.


Remove duplicate the

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Codecov Report

Merging #279 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #279   +/-   ##
========================================
  Coverage    71.65%   71.65%
========================================
  Files           50       50
  Lines         1397     1397
  Branches        50       50
========================================
  Hits          1001     1001
  Misses         396      396

Impacted Files
Coverage Δ

...witter/bijection/twitter_util/UtilBijections.scala
85% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Thanks!


Issue with Web Customizer Export variable.js

Export in Web version of Customizer not exporting values. Here: https://nativebase.io/customizer/#
Expected behaviour
Export should export color values selected in the user interface
Actual behaviour
Selecting "Download Variable File" downloads Variable.js, but the file does not contain the colors selected in the UI.
Steps to reproduce
Go here: https://nativebase.io/customizer/
Customize a color variable using the color picker (ideally a unique value) (i.e. BD10E0). Take note of the value selected.
Click download icon, then "Download Variable File"
Open Variable.js and search for the color variable.
The value will not be found.

@b33son
There won't be any variable named 'color' in variable.js, instead there will be variable names as 'segmentActiveTextColor' , 'segmentBorderColor', 'checkboxBgColor' ....etc...corresponding to the component you are looking to customize...

@b33son
The hexadecimal value for the color may not appear in the downloaded file, but the corresponding RGBA notation does come, which is just the same thing, just another representation of the Hex code...
For e.g- If you change a color to '878AA4' hex value, then the downloaded file comes with value 'rgba(135,138,164,1)'....You can also see the RGB values by the side of the hex value you are supplying, during customization...

Ah you are right. Sorry for the confusion


[Mobile] Edits for "Move to" mobile modal window

Bottom padding for title is 16 px
New folder button height is 34px with 4 px of paddings
Folder height is 34 px with 12 px of side paddings

Figma
https://www.figma.com/file/lwL5jneveZczAj5RLcLFH2/DIAL-Chat?type=design&node-id=6418%3A10414&mode=design&t=BdqR07Mf0Mjtk9NE-1

@DaryaKarniyenka Should we also make Move to header bold? like for Export?

case 1: move to folder screen does not open for chats
Steps:

tap on any chat in left side panel
tap on Move to option
Tap on the chat in side panel

Actual result: 2. Modal with list of folders does not appear
3. modal with list of folders appeared
NOTE: not reproducible for context menu from chat's header or for prompt

case 2: DIAL header is moving independently when scroll with opened side panel
https://github.com/user-attachments/assets/908f2c50-a72a-4471-86e5-91023bcc1a81


improvementSupport mysql COM_RESET_CONNECTION command.

What problem does this PR solve?
Support mysql COM_RESET_CONNECTION command.
Doris server side reset default catalog and return ctx.getState().setOk()
Python test code:
import mysql.connector

connection = mysql.connector.connect(
    host="<IP_ADDRESS>",
    port=29030,
    user="root",
    password="",
    database=""
)
print(connection.cmd_reset_connection())

Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)

Test

[ ] Regression test
[ ] Unit Test
[x] Manual test (add detailed scripts or steps below)
[ ] No need to test or manual test. Explain why:

[ ] This is a refactor/code format and no logic has been changed.
[ ] Previous test can cover this change.
[ ] No code files have been changed.
[ ] Other reason

Behavior changed:

[x] No.
[ ] Yes.

Does this need documentation?

[x] No.
[ ] Yes.

Check List (For Reviewer who merge this PR)

[ ] Confirm the release note
[ ] Confirm test cases
[ ] Confirm document
[ ] Add branch pick label

run buildall


add the history size to the pageserver API

report the history size from the pageserver in the pageserver APi to make it available for the console

WAL size
the amount of days it's configured for

this should be reported per tenant & timeline

It might make sense to integrate this to some existing query. Problem will be, what to do if the values haven't yet been calculated, unsure what to do in that case, but perhaps that will clarify itself when querying console team.

Initially implemented in #2714 as a separate route. The history_size: u64 could eventually be added into GET /v1/tenant/{tenant_id} using a similar filtering as with GET /v1/tenant/{tenant_id}/timeline?include-non-incremental-logical-size=true&include-non-incremental-physical-size=true but it was not considered now.


How i can list unspent transaction for any private key of address.

How i can list unspent transaction for any private key of address.
is there any idea.

You need to get that data for yourself. Either use bitcoind with watchonlyaddress, or keep the key in bitcoind (bad idea if you put this on a webserver), or use an API to look it up.
It's beyond the scope of this library, since consumers needs are going to vary a lot.
Bitcoin is tricky to get right, but I'd search https://bitcointalk.org (Technical Development) or https://bitcoin.stackexchange.com, the odds are someone has answered the question already!

shameless plug for my own product
@coingeek you could use an API like ours to get the unspents for the address corresponding to the private key: https://www.blocktrail.com/api/docs#api_address_unspent

If you want to get unspent outputs for any address, you can use the addrindex patched version of bitcoind at https://github.com/btcdrak/bitcoin/releases

@btcdrak he's trying to get his altcoin (litecoin fork) to work ... :(

he can merge the addrindex patch then ;)

@btcdrak
how I can merge it, or how i can add it to my altcoin?


Prior segmentation doesn't work for not 16-bit tiffs

Hi authors,
I am trying to run Baysor with a segmentation tif file where the background is 0, and all the indivudual cells are marked with 1,2,3,4...I noticed that Baysor gave error in this case, while it is ok with a binary image. Can authors confirm this issue? Thanks!
(base) bash-4.2$ cd data/
(base) bash-4.2$ ~/tool/Baysor/bin/baysor run -i 500 -p -c ~/project/sparcle/data/iss.toml -o ./output_dapi -p spot.csv segmentation.tif
[17:08:12] Info: (2021-07-16) Run Baysor v0.5.0
[17:08:12] Info: Loading data...
[17:08:37] Info: Loaded 71907 transcripts
[17:08:38] Info: Loading segmentation mask...
[17:08:39] Warning: some versions of ImageMagick give spurious low-order bits for 32-bit TIFFs
└ ImageMagick /home/vpetukhov/.julia/packages/ImageMagick/b8swT/src/ImageMagick.jl:100
[17:08:44] Warning: Minimum transcript coordinates are < 1: (10, -1). Filling it with 0.
└ Baysor /home/vpetukhov/.julia/dev/Baysor/src/data_processing/initialization.jl:279
[17:08:45] Error: ArgumentError("reducing over an empty collection is not allowed")
|
|                 _empty_reduce_error() at reduce.jl:299
|                 reduce_empty(op::Function, #unused#::Type{UInt32}) at reduce.jl:309
|                 mapreduce_empty(#unused#::typeof(identity), op::Function, T::Type) at reduce.jl:343
|                 reduce_empty(op::Base.MappingRF{typeof(identity), typeof(max)}, #unused#::Type{UInt32}) at reduce.jl:329
|                 reduce_empty_iter at reduce.jl:355 [inlined]
|                 mapreduce_empty_iter(f::Function, op::Function, itr::Vector{UInt32}, ItrEltype::Base.HasEltype) at reduce.jl:351
|                 _mapreduce at reduce.jl:400 [inlined]
|                 _mapreduce_dim at reducedim.jl:318 [inlined]
|                 #mapreduce#672 at reducedim.jl:310 [inlined]
|                 mapreduce at reducedim.jl:310 [inlined]
|                 #_maximum#690 at reducedim.jl:878 [inlined]
|                 _maximum at reducedim.jl:878 [inlined]
|                 #_maximum#689 at reducedim.jl:877 [inlined]
|                 _maximum at reducedim.jl:877 [inlined]
|                 #maximum#687 at reducedim.jl:873 [inlined]
|                 maximum at reducedim.jl:873 [inlined]
|                 filter_segmentation_labels!(segmentation_labels::Vector{UInt32}, segment_per_transcript::Vector{Int64}; min_molecules_per_segment::Int64) at prior_segmentation.jl:74
|                 filter_segmentation_labels! at prior_segmentation.jl:74 [inlined]
|                 #filter_segmentation_labels!#91 at prior_segmentation.jl:68 [inlined]
|                 (::Baysor.var"#filter_segmentation_labels!##kw")(::NamedTuple{(:min_molecules_per_segment,), Tuple{Int64}}, ::typeof(Baysor.filter_segmentation_labels!), segmentation_labels::SparseArrays.SparseMatrixCSC{UInt32, Int64}, segment_per_transcript::Vector{Int64}) at prior_segmentation.jl:68
|                 load_prior_segmentation(df_spatial::DataFrames.DataFrame, args::Dict{String, Any}) at main.jl:280
|                 load_and_preprocess_data!(args::Dict{String, Any}) at main.jl:330
|                 run_cli_main(args::Vector{String}) at main.jl:433
|                 run_cli(args::Vector{String}) at common.jl:118
|                 run_cli at common.jl:103 [inlined]
|                 julia_main at common.jl:139 [inlined]
|                 julia_main() at none:36
└ Baysor /home/vpetukhov/.julia/dev/Baysor/src/cli/common.jl:132

Hi Yubin,
Could you please try it with 16-bit TIFF instead of 32-bit?

You are right. 16 bit works! Thanks Viktor.

Let's see if I can fix it for 32-bit, as well

I changed image loading backend in the v0.6.0. So this hopefully should be fixed, though I didn't test properly. If anyone encounters this error, please, reopen the issue.


Benchmarking & performance optimisation

We currently cache the result of parsed messages. Is this sufficient or should we do more caching or memoizing? We already have fast-memoize bundled, so we could look into using that more.
But first see if this is really necessary or if the current performance characteristics are sufficient.

Currently there are no reported performance issues. We can reopen this if some arise.


Spike: discuss pedersen generator memory with Kev

Need to wait until Noir upgrades to latest bb.js on Charlie's branch. Need this eventually in circuits.


[FEATURE] Add Xinference implementation #1179

Issue
Contributes to https://github.com/langchain4j/langchain4j/issues/1179
Change
Support for Xorbits Inference.

Added a XinferenceChatModel
Added a XinferenceEmbeddingModel
Added a XinferenceImageModel
Added a XinferenceLanguageModel
Added a XinferenceScoringModel
Added a XinferenceStreamingChatModel
Added a XinferenceStreamingLanguageModel

General checklist

[x] There are no breaking changes
[x] I have added unit and integration tests for my change
[x] I have manually run all the unit tests in all modules, and they are all green
[x] I have manually run all integration tests in the module I have added/changed, and they are all green

Checklist for adding new maven module

[x] I have added my new module in the root pom.xml and langchain4j-community-bom/pom.xml

@alvinlee518 Hi! Thank you for your contribution. Will review it asap.
BTW, it looks like XInference support docker container. Would it possible to use testcontainers in IT?

BTW, could you make all static method call by using import static? (e.g. InternalXinferenceHelper.toTools -> toTools). Just for consistency with other modules.
And, could you please add tests about ChatModelListener likt OllamaChatModelListenerIT

BTW, could you make all static method call by using import static? (e.g. InternalXinferenceHelper.toTools -> toTools). Just for consistency with other modules.
And, could you please add tests about ChatModelListener like OllamaChatModelListenerIT?

Okay, got it.

@alvinlee518 Hi! Thank you for your contribution. Will review it asap.
BTW, it looks like XInference support docker container. Would it possible to use testcontainers in IT?

It's a bit tricky for me to test the docker container locally, but I can try adding it.

@Martin7-1 The Xinferenrece testcontainers require GPU support. How can I configure it in GitHub Actions to ensure the unit tests pass?

Since we're using the free tier, Github Actions do not support GPU... Are there any ways that Xinference can run on CPU (such as latest-cpu version). BTW, could we use smaller models (I don't know how much time you test with GPU locally, but if we change it to CPU, it may cost much time, so we need to make the model as small as possible) to reduce IT cost?
If the test takes too long to run with CPU, maybe I'll consider disabling Xinference's IT in Github Actions and just running it locally.
Xinference's ITs are like Ollama's ITs in that they both take a long time to execute tests, and I'm also thinking about and trying to figure out how to optimise them and get them working perfectly in Github Actions. You can try the ideas I suggested above, but if it doesn't work that's fine, I'd run those test cases locally. I think I will review it next week :)

@Martin7-1 I have modified the image to the CPU version. When executed in GitHub Actions, the entire process takes approximately 10 minutes.
ImageModel, VisionModel, and tool call streaming functions rely on GPUs and can be validated locally.

@Martin7-1 I have modified the image to the CPU version. When executed in GitHub Actions, the entire process takes approximately 10 minutes. ImageModel, VisionModel, and tool call streaming functions rely on GPUs and can be validated locally.

Thank you! Will try to review it this week.

@alvinlee518 Thank you! About IT: maybe we should give up comitting new image, because so much images will exceed Github Actions disk space limit. WDYT?
@Martin7-1
The new image is intended to avoid re-downloading the model. If you're concerned about the disk space limit, I can remove it.

@alvinlee518 Thank you! LGTM. Could you please add docs in langchain4j main repo?

Okay, I'll add it later.


Rename summery to summary

Fixes #2645
Add description here.

Codecov Report

Merging #2651 (d00aa50) into main (0575b87) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #2651   +/-   ##
=======================================
  Coverage   80.98%   80.98%
=======================================
  Files         647      647
  Lines       23001    23001
=======================================
  Hits        18628    18628
  Misses       4373     4373

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 0575b87...d00aa50. Read the comment docs.


Bumped ansible devel version

Bumped ansible devel version

Clearly we need to change the way we test because few minutes ago I made this discovery https://github.com/ansible/ansible/issues/63618 -- I guess that 2.9 release may be delayed even more.


Built in Documentation is Depreciated in recent PR

consider copying the main rusty crate's documentation from here Algonaut Documentation

Would be fixing this in my next Pull Request. The Documentation for app calls needs to be updated considering the recent implementation of App Calls in Algodot Core.

fixed


Set latency_timer in udev rules to reduce communication latency

This may prevent DroppedPacketError in roslaunch softhand_ros softhand_v2_right.launch.
See https://github.com/ros-drivers/rosserial/issues/383 for latency problem & its solution.
See https://projectgus.com/2011/10/notes-on-ftdi-latency-with-arduino/ for detailed info about latency_timer.

Testing with the real softhand is required.
Especially, ENV{ID_USB_INTERFACE_NUM}=="00" in udev rules may make trouble.

I remembered that default latency_timer just saturated real update_rate (example of update_rate is here) in my case.
Setting high update_rate occurred no error like DroppedPacketError, but it was just not realized.
So DroppedPacketError might be caused by another reason, though this PR is worth trying.


⚠ SceneTime has degraded performance

In 00ba071, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 6124 ms

Resolved: SceneTime performance has improved in f7640a0 after 6 minutes.


DEPS.xwalk: Roll blink-crosswalk (20dcb32 -> 921e4ad).

921e4ad [Android] Fix WebCL fail to run on PowerVR GPU.

@kenchris , @darktears , The roll patch for fix in blink. Thanks.


lint: update bin and lib folders

Fix broken .jshintrc file
Remove trailing spaces
Add missing "use strict" statements
Fix mixed quotes and double quotes

I'll suggest other lint updates in other PR to keep them small for review :)

:+1:


Port to ostree API and drop CLI usage

TODO:

[ ] Restore checking if screenshot files are in the ref. Not sure if this is useful because it was just a warning since now.
[ ] Resolve these warnings:

** (process:116475): WARNING **: 19:59:01.778: expected enumeration type void, but got PyOSTreeRepoCheckoutMode instead

** (process:116475): WARNING **: 19:59:01.778: expected enumeration type void, but got PyOSTreeRepoCheckoutOverwriteMode instead

Resolve these warnings:

Hey @TingPing any idea about these warnings? You can see the warnings by running flatpak-builder-lint repo /path/to/repo against this branch. The closes thing I got was this pygobject bug report https://gitlab.gnome.org/GNOME/pygobject/-/issues/608

Your usage looks correct to me, and ostree's GIR looks correct to me.
I believe it really is a pygobject bug. The recommended workaround of using int() works fine and is safe to do.
I would guess this is caused by RepoCheckokutAtOptions being a raw struct, this is uncommon and annoying for bindings, like gjs simply doesn't support it at all.

Thanks!

slightly changed appstream-screenshots-files-not-found-in-ostree and bumped it to a warning. It either is an error or doesn't stay at all, having it as a warning doesn't seem very useful.
Now I intersect between two sets: one set is filenames calculated from screenshots/screenshot/image/text() tag from catalogue and another set is filenames from extracting the screenshot ref for each arch.
If the intersection is empty, the error is produced.


[Angularjs] - Textfield not considering ngModel

I am facing an issue regarding the textfield behavior.
On the below plnkr, follow the steps:
1-click on "groups working"
2-click on "copy" on one item
3-look at the very end new textfield appeared with the ngModel associated (angular.copy) but the behavior of the textfield is strange, even if there is a value, the label is not floating but if you click in the textfield, it floats as expected. If you modify the field the behavior remains, but if you quit it without any modification label comes back with overlay.
http://plnkr.co/edit/MUI2iBslIH9jd4fgEQPL?p=preview
Hope it is clear enough.
Thank you

Please use StackOverflow for support.


No way to optionally return a single record without logging error

Your Question
How can I find one record that may or may not be present and neither case is an error?
The document you expected this should be explained
https://gorm.io/docs/query.html
Expected answer
Documentation suggests using Limit(1).Find(&foo).
What I would like to do is something like this:
var record *MyStruct
err := db.Where("foo = 1").Limit(1).Find(record).Error // DOESN'T WORK: returns 'invalid value' error
if record == nil {
  doSomething()
} else {
  doSomethingElse()
}

This is clean and very clear. No error is raised if the record is missing and the record is simply nil as you would expect, because it hasn't been found.
Unfortunately it seems this is not possible because if I try this I get invalid value errors.
I have found two other ways to do it, both of which are suboptimal:
Method 1:
record := &MyStruct{}
err := db.Where("foo = 1").First(&record).Error // logs "not found" Error even though nothing is broken if it doesn't exist
if err == gorm.ErrRecordNotFound {
  doSomething()
} else {
  doSomethingElse()
}

This suboptimal because gorm logs a not found message at level Error every time we hit record not found, even though this is completely normal and does not indicate anything is broken. It fills our logs with useless errors.
Method 2
record := &MyStruct{ID: -1}
err := db.Where("foo = 1").Limit(1).Find(&record).Error
if record.ID == -1 { // relies on hacky "magic" flag value
  doSomething()
} else {
  doSomethingElse()
}

This doesn't log useless errors if the record is missing, but is still suboptimal because it relies on "magic" numbers. It's really messy to put the ID as -1 and it isn't even consistent because not all of our database tables have an ID primary key. In some cases there may not be any value at all that is safe to use as a magic flag value.
Perhaps I have missed something. What is the correct way to handle this (quite common) use case?

record := &MyStruct{}
result := db.Where("foo = 1").Limit(1).Find(&record)
result.RowsAffected == 1
result.Error == nil

So basically we're saying do:
func MyStructFind(id uint) (*MyStruct, error) {
  var record MyStruct
  result := db.Where("foo = 1").Limit(1).Find(&record)

  if RowsAffected == 0 { // nil
    return nil, result.Error
  } else {
    return &record, result.Error
  }
}

I also find this really tedious to do and it seems like it's something that's commonly sought after. It'd be much nicer to be able to do:
func MyStructFind(id uint) (*MyStruct, error) {
  var record *MyStruct
  result := db.Where("foo = 1").Limit(1).FindOrNil(record)

  return record, result.Error
}

FindOrNil would be really helpful.

To disable logging for one statement, use a transaction, e.g.
  tx := db.Begin(&sql.TxOptions{ReadOnly: true, Isolation: sql.LevelDefault})
  tx.Logger = logger.Discard

  record := &MyStruct{}
  err := tx.Where("foo = 1").First(&record).Error
  tx.Commit()
  if errors.Is(err, gorm.ErrRecordNotFound) {
    doSomething()
  } else {
    doSomethingElse()
  }


[sknpm] Add modules instead of replacing them

The dark magic of sknpm replaces the line /*--MODULES--*/ with several lines of import followed by modules = [...];, expecting a pre-existing var modules = [];.
Linters expect this line to be const modules = []; because the array doesn't seem to be changed.
Fine, let's push modules instead of replacing the contents of the array, which was brittle if we didn't start with an empty array.

LGTM


utf8 output

my output have accents when i log this output is showing unreconized char in devtools console can enable charset encoding on windows cli ?

run command below first
chcp 65001

Work!


Publish v1 on npm

Can this module be published as version 1 on npm so that it can be updated via npm up

Version v1 will be published at some point, but If I read correctly0.x versions also should work with npm up as expected (?)

It has issues: https://github.com/npm/node-semver/issues/79

@KoryNunn the issue you mention, probably refers only to 0.0.x versions, while es6-map is at 0.x.x currently, and that should work without issues. See https://github.com/npm/node-semver/pull/41#issuecomment-21354034

If that is how it works, it's still probably a good idea to put it to 1 as soon as possible, assuming reasonable stability and completion, otherwise people who are using your module will no longer get the latest version at an arbitrary point because you updated to 1.
This exact issue happened to me with your weak-map module, which I installed before v1 was released. I nearly submitted a duplicate of #2 because I didn't get v1 through npm up

It's very good that npm up won't switch from 0.x to  1.0, otherwise it'll be a critical bug in npm up.
At this point I don't see any issue, switch between 0.1 and 1.0 should be considered as breaking and no tool should do it automatically. That's expected behavior, and npm up works perfectly for current es6-map versions e.g. if I release non breaking 0.1.2 update, npm up will update it for you.

Is there a minified version I can just copy paste, I don't want to use a build system


Add configuration for running and debugging frontend and AI Shopping …

Add configuration for running and debugging frontend and AI Shopping Cart Service for Visual Studio Code.
Purpose

Add run and debugging tasks for Visual Studio Code

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type
What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

Get the code
Open Visual Studio Code
Update the properties of AI Shopping Cart Service

Debugging

Start debugging of Frontend
Start debugging of AI Shopping Cart Service
Check everything is running
Stop everything

Running

ctrl+shift+p
Tasks: Run Task
Run All
Check that both Frontend and AI Shopping Cart Service are running
Stop Frontend
ctrl+shift+p
Tasks: Run Task
Run Frontend
Check that both Frontend and AI Shopping Cart Service are running
Stop AI Shopping Cart Service
ctrl+shift+p
Tasks: Run Task
Run AI Shopping Cart Service
Check that both Frontend and AI Shopping Cart Service are running

What to Check
Verify that the following are valid

Local run is working
Local debugging is working

Other Information

Add a dependency to run the front-end and a pre-launch task for the debugging of the frontend to be sure that dependencies are restored before the launch. This is not required for AI shopping cart service.


Incorrect Rank at Hearthstats

I found the game data upload to Hearthstats is incorrect, for example, I am at rank 11 now, but it will show I am rank 18 in heathstats, I don't have this problem When I use the tracker in PC version, Any Advise

Looking through the logs, it appears that often two ranks are detected: one which is correct and one which is a red herring. I think the tracker is picking which of these ranks to record chronologically.
If we can't find a better way to determine the correct one, perhaps we should choose the rank closer to the rank from the previous game, assuming that the season has not since reset.

On May 25, 2016, at 22:38, simtsang<EMAIL_ADDRESS>wrote:
I found the game data upload to Hearthstats is incorrect, for example, I am at rank 11 now, but it will show I am rank 18 in heathstats, I don't have this problem When I use the tracker in PC version, Any Advise
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@mattwelborn you are right, the ranks are often detected multiple times. The problem with your solution is to detect the correct one when you detect rank. If you detect rank 20 and decide it's the right one, the detect rank 7, rank 20 will be kept, even if you are rank 7

I've noticed that the current solution is right more often than wrong. Maybe we can compare to the mean of the past 10 games?
For me, it's the same wrong rank (20 or 0) every time. That could also help pick the correct rank, if this observation hold true for other people.

On May 26, 2016, at 01:44, Benjamin Michotte<EMAIL_ADDRESS>wrote:
@mattwelborn you are right, the ranks are often detected multiple times. The problem with your solution is to detect the correct one when you detect rank. If you detect rank 20 and decide it's the right one, the detect rank 7, rank 20 will be kept, even if you are rank 7
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

Ok, I found the problem. When Hearthstone unload assets, it unloads both wild and standard, so it shows both ranks... now, I have to find a way to check which is wild and which is standard

@simtsang are you still seeing this problem? If so, I've noticed that Track-o-bot doesn't seem to have this bug (over ~15 games). We might be able to glean some insight from their code.

Closed by #524


Use better string type

Using JsWord everywhere was my mistake. We should use Arc<str> instead of JsWord for some types.
But I'll use a wrapper named Atom
Tasks

[x] Add Atom and AtomGenerator. (https://github.com/swc-project/swc/pull/4945)

[ ] Improve Atom (https://github.com/swc-project/swc/pull/5326)

Atoms should be (conceptually)
enum Atom {
  Inlined([u8; 7])
  Static(&'static str),
  Arc(Arc<String>)
}

but with pointer tagging.

[ ] Add thread-local interner

[ ] Use it in es ast

[ ] Use it in css ast

[x] Use it in html ast

@kdy1 While working on #2175, I've noticed that serializing strings (JsWords) is one of the slowest parts of the process. I've been working on an alternative serializer for JsWord to speed it up, but I've realized that may be wasted effort if plan is to replace JsWord with Atom anyway.
Can I ask a few questions:

Why was using JsWord a mistake?
You say above that using Arc<str> should be used for "some" types. What types should continue to use JsWord and not the new Atom struct?
Is the implementation of Atom complete or does it need more work before it can be used?
Is what's required to complete the transition simply replacing JsWord everywhere with Atom?

Please let me know if you have time. I may be able to make a PR.

It's useful in only some cases
I think we can use Atom for all cases.
Problem is Str... Not sure about it
It's complete
Parser should be patched to use atom generator

Thanks for swift reply. Sorry for more questions, but:

Can you expand on "It's useful in only some cases"? In which cases is it not useful?

Will Atom be faster than JsWord in all cases?

Presumably the usage of Atom::new_bad should be replaced with AtomGenerator::gen in these places?

https://github.com/swc-project/swc/blob/aef6de4647d2815819ba38c234c17694f83845d5/crates/swc_atoms/src/lib.rs#L151
https://github.com/swc-project/swc/blob/aef6de4647d2815819ba38c234c17694f83845d5/crates/swc_atoms/src/lib.rs#L159-L160

Is the idea to have a single static AtomGenerator same as string_cache does it? Or would each pass of lexer create its own AtomGenerator instance? (I assume the first, but just checking)

Does Atom need an rkyv::SerializeWith etc implementation, or can RKYV do its default thing for Arc<str>?

Is the optimization which JsWord uses for common words not useful to re-implement in Atom?

Sorry for all the questions. I'd like to make a PR for this, but I don't fully understand your intention.

Thanks for answers. OK, I think I get it - no sharing between threads.
What did you have in mind for passing the AtomGenerator around? In the lexer, it could be included in State, but there are other places that create JsWords e.g. transforms where, as far as I can see, there isn't a context object e.g.:
https://github.com/swc-project/swc/blob/main/crates/swc_ecma_transforms_base/src/hygiene/mod.rs#L59
https://github.com/swc-project/swc/blob/main/crates/swc_ecma_transforms_react/src/jsx/mod.rs#L1266
Would the AtomGenerator need to be passed into every such method? Or would you consider using something like std ::thread ::LocalKey?
LocalKey would also give access to AtomGenerator in serde deserialize method. This would have complications for code running in main thread (parse_sync etc) but I guess these methods could clear the contents of the AtomGenerator when they're done, so it's left empty for the next task. I also don't know if it's performant or not.

We don't need to share AtomGenerator.
It's used by parser just because it will be faster.
But ti's not true tor other places

Recap
To recap, my understanding is:
Old JsWord uses string_cache crate which combines 3 methods for storing strings:

"Static" store for commonly-used words, created at compile time.
"Dynamic" store for other strings.
Short strings (7 chars or less) stored inline with no hashing.

Both the "Static" and "Dynamic" stores are global and shared across all threads.
Advantages of JsWord:

Global store for commonly-used words saves memory because e.g. "React" will only be stored in memory once no matter how many times it's used across all threads.
Reduced memory use for other strings if used more than once - again, stored once globally for all uses across all threads.

Disadvantages of JsWord:

Global "dynamic" store requires a Mutex, which means threads can block other threads while they add/remove strings from the hash set.
Uses slow hashing function SipHash (in phf crate)

New Atom aims to fix JsWord's shortcomings by:

Separate AtomGenerator store per-thread to avoid blocking between threads.
Using faster hashing function FxHasher

Possible combined approach
I wonder if we can combine the advantages of both into a single entity, which can be used everywhere.

Global store for commonly-used words (as in string_cache). This is read-only so no Mutex required.

Global store is created with perfect hashing, so fast lookup.

Per-thread store for less common strings (as with new Atom) - no Mutex.

Both stores would use FxHasher, so only 1 hash calculation on each lookup.

In some places, the string is very unlikely to be repeated e.g. comments, so a second entity JsWordUncommon could be provided for these cases. But that would make it clearer when to use which than JsWord vs Atom, and JsWordUncommon could avoid using Arc at all.
Implementation
Probably simplest way would be to fork and amend string_cache and phf to:

Use FxHasher
Not create a global "dynamic store", but take store as a parameter (so can be separate per thread)

https://github.com/rust-phf/rust-phf/issues/88#issuecomment-511951537 suggests FxHasher could be used for perfect hashing (FxHash is a close cousin of FNV). In our case, the list of common words is quite short, so that  would make it easier for PHF generation to reach a solution, even if the hash function is lower quality.
It'd be ideal to get these changes implemented upstream, but maybe better get it working in SWC first and then see if can get those changes merged upstream after. https://github.com/rust-phf/rust-phf/pull/236 has been open for over a year.
Question
I'm confused about one thing:
PR #5271 switched over to Atom in a lot of places. Atom currently uses Arc internally, but I was under the impression that the idea was to avoid sharing across threads to avoid the blocking problem. But @kdy1 said this isn't the case in https://github.com/swc-project/swc/pull/5271#issuecomment-1193059843.
My understanding is that Arc uses atomic operations for ref count increment/decrement so that may re-introduce the blocking problem. Seems like atomic operations are also more expensive in general.
So I'm confused - in what circumstances are Atoms shared across threads? Wasn't the starting motivation to avoid that?
Sorry this is long. I'm coming into this cold, and I have probably missed a lot of previous conversations.

We don't use lock while creating it but we pass it to other threads.
So Arc is required. The timing is not same.

Thanks for fast reply. Why/where is Atom passed between threads? Can you point me to an example in code? If I can read it, it'll probably make sense and I can stop asking you questions!
Would be very interested in your thoughts on the rest of this idea when you have time.

I was actually planning something similar, phf + per-thread interned string without a mutex.
We process stuffs in parallel.
https://github.com/swc-project/swc/blob/a37fdca96908ce99c32aaffada519a6efcaf2773/crates/swc_ecma_minifier/src/compress/pure/mod.rs#L173-L193
For example minifier has lots of stateless logic

Ah. Interesting. Another question:
Outside of the parser, where are most new JsWords created, where the string is not static? I can think of 3 places which will create a lot of strings:

Hygiene renamer

https://github.com/swc-project/swc/blob/9eb04096b1c0ba0552be2ae4dd9da85dd12b4a5e/crates/swc_ecma_transforms_base/src/hygiene/mod.rs#L59-L67

Minifier where it mangles identifiers to a, b etc (can't find the place in the code)

Various transforms where an identifier is prepended with _ (foo -> _foo)

Is there anywhere else which creates a lot of new JsWords?
What I'm thinking is, if it's rare for new JsWords to be created after parsing:

JsWord could use the current scheme of static/dynamic/inline representations.
During parsing, dynamic set is filled with strings.
Once parsing is complete, the dynamic set is made read-only, and then it can be safely shared across threads without use of Mutex or atomic operations.
The whole dynamic set would remain in memory unchanged until the whole transform/minify process is complete, and then dropped in its entirety (similar to arena allocators).
Therefore no need for reference counting each entry in the dynamic set -> no atomic operations.

A small prototype here: https://github.com/overlookmotel/swc/blob/new-jsword/crates/swc_atoms/src/new_jsword.rs
And some explanation here: https://github.com/overlookmotel/swc/blob/new-jsword/crates/swc_atoms/src/string storage.md
Code is probably full of errors, and I have no idea if this will work anyway, but it was fun to write!

We need atomic operation even if it's read-only.
Actually Atom is already read only

Oh arena? Yeah it's possible but it's too much restriction for rust-side users.

It was the dynamic set I was saying I think could avoid Mutex and atomic operations, not individual Atoms / JsWords. But actually, I think maybe they can too, if they can avoid being reference-counted.
I need to read more about concurrency in Rust. I'll come back to you.
In the meantime, if you'd have time to answer my other question, that'd be really useful:

Outside of the parser, where are most new JsWords created, where the string is not static?

Strings are mostly not static, because we don't add atoms for injected helpers or variables

I think we should implement inline/static for Atom and use it for everywhere

I would like to know if there are some works that the community could contribute.

@iheyunfei It would be really nice if someone adds support for static atoms to swc_atoms::Atom

I wonder if https://github.com/servo/string-cache/pull/268 is merged. Should we still investigate a better string type for swc?

I don't think we need a new type, then. JsWord was problematic because of the mutex while other characteristics are very good

@hyf0 @kdy1 FYI that PR was merged, but there were some issues (prior breaking change got published together, and then it turned out the PR's change caused a debug assert).
I have #6980 open for a while wanting to get it in to swc.
I my fix for the debug assert was merged, we're just waiting on a new version of string-cache getting published now.

@phoenix-ru You can create Lazy<Atom> instead. I profiled it but static atoms did not improve performance

@kdy1 After updating to<EMAIL_ADDRESS>all micro-benchmarks show a regression of 2-5% compared to js_word! + JsWord usage.

@phoenix-ru Can you try newer version?

@kdy1 This is terribly bad.

I reverted to<EMAIL_ADDRESS>just to make sure, the results are consistent there:

I think you are doing something wrong, see https://github.com/vercel/turbo/pull/6343#issuecomment-1797152002
It improved performance

Can you share some code?
I have some guess, but can't be sure without any code.

Ah. You must use https://rustdoc.swc.rs/swc_atoms/struct.AtomStore.html
So I also made a regression for CSS/XML/HTML parser of SWC.
Well... My bad that I didn't documented this.

@kdy1 From here you can pick whatever part you want to see: parsing/transforming/codegen: https://github.com/phoenix-ru/fervid/blob/592025308719345388d6b3775276dc134e9458d9/crates/fervid/src/lib.rs#L57 (use fervid_parser one for SWC-based parsing).
What should I do to use AtomStore? I did an Atom polyfill like that for a moment: https://github.com/phoenix-ru/fervid/blob/592025308719345388d6b3775276dc134e9458d9/crates/fervid_core/src/structs.rs#L7

You should patch your parser to have a field typed AtomStore and use AtomStore::atom with your string.

You can call like self.atoms.atom()

Is this the final design? Can AtomStore be static (not Send+Sync)?
The price of adjusting a codebase to new SWC atoms is getting high...

Yes, it's final design. Actually the problem of string-cache is that it uses Mutex internally.

It should never be static

@phoenix-ru I managed to make it fast by default.  https://github.com/dudykr/ddbase/pull/14
cargo update -p hstr will do the trick.

@kdy1 Thanks! Even though you said

It should never be static.

With<EMAIL_ADDRESS>I got improvements of 3-15% across the board with an own static store:
pub static mut ATOM_STORE: Lazy<AtomStore> = Lazy::new(|| AtomStore::default());

#[macro_export]
macro_rules! fervid_atom {
    ($lit: literal) => {{
        let store = unsafe { &mut fervid_core::ATOM_STORE };
        let atom = store.atom($lit);
        atom
    }}
}

make it fast by default
You don't need to use AtomStore

Do you mean I can use Atom::from without a store?

Yeah. It will use per-thread AtomStore internally

Via an internal static variable

Yeah, I saw the sources and was confused before I noticed thread_local!.
FYI, benched the Atom::from implementation, results are depending on a stage. Parsing time improved (-2%) while transformation time increased (up to +5%) compared to a custom unsafe static store. Ignoring the bench.
I also compared<EMAIL_ADDRESS>vs 0.86.43 with<EMAIL_ADDRESS>and results show a general improvement of 6-16%. Good work @kdy1!


Mislabeled code boxes

[Enter feedback here]
In the section "C and C++ const differences", the first two code example boxes are labeled as C++, but should be labeled as C.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: d2101a0d-2ec0-5192-38bf-73a026387ec2
Version Independent ID: 1a4b1cce-492e-9083-0be9-6a62d6a24e6e
Content: const (C++)
Content Source: docs/cpp/const-cpp.md
Product: visual-cpp
Technology: cpp-language
GitHub Login: @corob-msft
Microsoft Alias: corob

@RHolton
Thanks for the report. I've updated the code box labels, so the result should be visible sometime tomorrow when the update is published.


Add a step to visit a supplier service page

The background for the view and edit G-Cloud services feature was
by necessity specific to which-ever G-Cloud service was live, which
caused flakiness.
This PR creates a specific step which visits the supplier service
page directly by creating the page url, which means it can be easily
parametrised.

@katstevens thanks for your commits. Your solution is definitely has the advantage of being more similar to the user flow.
If people are happy I can squash all of these commits so the history is cleaner?


relative symlinks

Hello,
is there a way to configure Rocketeer to create relative symlinks instead of absolute ones? 'current' could simply point to 'releases/[release_name]'. Now deployments for me work only if I let webserver to access all directories all way to the root of disk or fix that symlink to relative

Hi,
Has this issue ever been resolved? The web server I'm deploying to runs in a chroot, so relative symlinks are a must to be able to use rocketeer.
I've noticed that the pull request (#368) was closed but never merged into develop. Any plans to support this in the future?

It is supported, check the relative symlink option in remote.php

Ah! I was checking the wrong branch! Good work :)


ID int limit<PHONE_NUMBER>) in POST method

I'm new at this, but this is error makesnosense and I don't know whats happening.
I'm using a .csv to pass Tweet IDs, using GET (showids.php) just works fine, but when I use this library to use a POST method (delids.php) it cuts the Tweet ID at int limit.
https://gist.github.com/ap1f00tpr1nt/cd075d1a83b2ac62cb7a
I'm almost sure is a thing in my side, but i thought it's ok to post this here.

I already solved it.
It was because the sprintf. Line 10 must be: $url = 'https://api.twitter.com/1.1/statuses/destroy/'.$tid.'.json';
Sorry. CLOSED.


Automatic import pipeline does not place the assets in the right location for semantic tagging

Issue description
When using make import to import a set of maps generated in Roadrunner the script places all the assets in the same folder (e.g. ./Unreal/CarlaUE4/Content/PackageName/Maps/MapName), breaking the semantic tagging pipeline, as shown in the relevant document page: https://carla.readthedocs.io/en/latest/cameras_and_sensors/#sensorcamerasemantic_segmentation.
This does not happen with the editor "manual" pipeline.
Platform

CARLA Version: 0.9.7 git repo
OS: Ubuntu Linux 18.04 LTS

While trying to debug this issue I came across the commandlet code that handles Assets location.
In this commandlet the following tags are defined:
namespace SSTags {
  // Carla Semantic Segmentation Folder Tags
  static const FString ROAD       = TEXT("Roads");
  static const FString ROADLINES  = TEXT("RoadLines");
  static const FString TERRAIN    = TEXT("Terrain");

  // RoadRunner Tags
  static const FString R_ROAD     = TEXT("RoadNode");
  static const FString R_TERRAIN  = TEXT("Terrain");
  static const FString R_MARKING  = TEXT("MarkingNode");
}

However, when calling the import function, the parsed static meshes from Roadrunner's fbx are the following:
highway_Road_Road_Layer0Node
highway_Road_Gutter_Layer0Node
highway_Road_Curb_Layer0Node
highway_Road_Marking_Layer0Node

Meaning that no static meshes will be recognized when trying to find all of the R_* tags in their names.
I'll try to update the code to recognize the right binary name, however, I don't know if this could clash with the GUI importer as I don't have Roadrunner.


cic sync fails with too much dust

When the singleton has a bunch of dust sent to it, cic sync fails with the following:
cic sync -s
413, message='Request Entity Too Large', url=URL('https://localhost:8555/get_coin_records_by_names')

Fixes resolved this.


Auto-detection of interpreters fails occasionally

Also #2255

Broker correctly reports 'Failed to retrieve R installation data for interpreter'. The path passed from VS points to R 3.2.2 folder where R files are actually missing. So the issue is why this path was not filtered out.

We do, however, need to improve reporting from the broker for when a session is requested with non-existing interpreter ID (including blank ID when no interpreters are available). Right now we just throw, which gets reported to the client as HTTP 500 error with no body, so it's not possible to distinguish this particular error from any other failure on the broker side.
Probably the easiest way to do this is to add an extra HTTP X-header to the response, that would contain our own error code, if it's an anticipated error (and not a general failure). The client can then check that header if it receives an error response, and display the appropriate error messages.

Also, in many cases, we can just use more specific HTTP status codes instead of 500 (when an exception is unhandled, it's always reported as HTTP 500). This catalog will be helpful:
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
For the situation when an entity (e.g. an interpreter in this case) is requested, but is not found, it seems that HTTP 422 might be the appropriate status code.

Or we could use something from unassigned ranges like 512-599.
428	Precondition Required or 417	Expectation Failed sound reasonable.

The issue is that when R was found in the registry but files were missing on disk and code ended up with zero engines, it resorted to probing Program Files\R and actually found the folder - but code does not check for file existence. Since this is a very old fallback, I guess we've never encountered this case before.

Splitting broker error returns to #2264

https://github.com/Microsoft/RTVS/commit/2e62ba12bb572cfadfafa58536ed607d89cc51f5


Docker image version

I suggest to use a version when you build Docker Images instead of build only a latest tag. This is because if something is broken in the last build there's no way to return to the old working image as there's only a tag available.

Yeah, I should... I'll start adding that.

If you're referring to this error: doods.doods - ERROR - Could not create detector pytorch/pytorch: No module named 'IPython' it's because the pytorch people changed something. A rollback in version wouldn't have fixed it..

No it's just about good docker manners.


[MXNET-240] Fix CUDA compile error

Description
Fix remaining compile errors with only CUDA enabled.
This disable CuDNN in CentOS CI to test compilation with CUDA only.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[ ] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@marcoabreu This one is to address your PR https://github.com/apache/incubator-mxnet/pull/10281

It seems we can't run tests on cuda only.
======================================================================

ERROR: test_operator_gpu.test_lstm_cpu_inference

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/usr/lib/python3.6/site-packages/nose/case.py", line 198, in runTest

    self.test(*self.arg)

  File "/usr/lib/python3.6/site-packages/nose/util.py", line 620, in newfunc

    return func(*arg, **kw)

  File "/work/mxnet/tests/python/gpu/../unittest/test_gluon_rnn.py", line 79, in test_lstm_cpu_inference

    y = model(x).asnumpy()

  File "/work/mxnet/python/mxnet/gluon/block.py", line 361, in __call__

    return self.forward(*args)

  File "/work/mxnet/python/mxnet/gluon/rnn/rnn_layer.py", line 191, in forward

    out = self._forward_kernel(inputs, states)

  File "/work/mxnet/python/mxnet/gluon/rnn/rnn_layer.py", line 225, in _forward_kernel

    p=self._dropout, state_outputs=True, mode=self._mode)

  File "<string>", line 73, in RNN

  File "/work/mxnet/python/mxnet/_ctypes/ndarray.py", line 92, in _imperative_invoke

    ctypes.byref(out_stypes)))

  File "/work/mxnet/python/mxnet/base.py", line 149, in check_call

    raise MXNetError(py_str(_LIB.MXGetLastError()))

mxnet.base.MXNetError: [20:35:37] src/operator/rnn.cu:43: RNN is only available for cuDNN at the moment.

Stack trace returned 10 entries:

[bt] (0) /work/mxnet/python/mxnet/../../lib/libmxnet.so(dmlc::StackTrace()+0x42) [0x7f87cfb7db92]

[bt] (1) /work/mxnet/python/mxnet/../../lib/libmxnet.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x18) [0x7f87cfb7e1f8]

[bt] (2) /work/mxnet/python/mxnet/../../lib/libmxnet.so(mxnet::Operator* mxnet::op::CreateOp<mshadow::gpu>(mxnet::op::RNNParam, int)+0x3c) [0x7f87d404bfec]

[bt] (3) /work/mxnet/python/mxnet/../../lib/libmxnet.so(mxnet::op::RNNProp::CreateOperatorEx(mxnet::Context, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >*, std::vector<int, std::allocator<int> >*) const+0x55) [0x7f87d2515415]

[bt] (4) /work/mxnet/python/mxnet/../../lib/libmxnet.so(mxnet::op::OpPropCreateLayerOp(nnvm::NodeAttrs const&, mxnet::Context, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> > const&, std::vector<int, std::allocator<int> > const&)+0x268) [0x7f87d2282c48]

[bt] (5) /work/mxnet/python/mxnet/../../lib/libmxnet.so(std::_Function_handler<mxnet::OpStatePtr (nnvm::NodeAttrs const&, mxnet::Context, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> > const&, std::vector<int, std::allocator<int> > const&), mxnet::OpStatePtr (*)(nnvm::NodeAttrs const&, mxnet::Context, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> > const&, std::vector<int, std::allocator<int> > const&)>::_M_invoke(std::_Any_data const&, nnvm::NodeAttrs const&, mxnet::Context, std::vector<nnvm::TShape, std::allocator<nnvm::TShape> > const&, std::vector<int, std::allocator<int> > const&)+0x15) [0x7f87cfcf15e5]

[bt] (6) /work/mxnet/python/mxnet/../../lib/libmxnet.so(mxnet::Imperative::InvokeOp(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*> > const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*> > const&, std::vector<mxnet::OpReqType, std::allocator<mxnet::OpReqType> > const&, mxnet::DispatchMode, mxnet::OpStatePtr)+0xaa5) [0x7f87d22bfba5]

[bt] (7) /work/mxnet/python/mxnet/../../lib/libmxnet.so(mxnet::Imperative::Invoke(mxnet::Context const&, nnvm::NodeAttrs const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*> > const&, std::vector<mxnet::NDArray*, std::allocator<mxnet::NDArray*> > const&)+0x4ec) [0x7f87d22c026c]

[bt] (8) /work/mxnet/python/mxnet/../../lib/libmxnet.so(MXImperativeInvokeImpl(void*, int, void**, int*, void***, int, char const**, char const**)+0x4aa) [0x7f87d27c827a]

[bt] (9) /work/mxnet/python/mxnet/../../lib/libmxnet.so(MXImperativeInvokeEx+0x6f) [0x7f87d27c882f]

Thank you, Da! What do you think about making those tests conditional in terms of skipping them if CuDNN is not available?

I'm not sure. It seems difficult.
maybe let's fix the compilation error first and worry about running the test later.

Well there's no immediate hurry as long as this PR makes it into the release, so I think you can do as you prefer.
Is there no way to determine on the python side whether CuDNN is present or not?

i don't know if there is a way.

@szha @piiswrong could you assist?

Issue is tracked at https://github.com/apache/incubator-mxnet/issues/10353


"No candidates found" message doesn't give full package name with periods

Checks

[X] I have checked that this issue has not already been reported.

[X] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example
pixi init
echo "cool.package.bro = \"*\"" >> pixi.toml
pixi list

╰─▶ Cannot solve the request because of: No candidates were found for cool *.

Issue description
If you have a package in your pixi.toml that doesn't exist with periods in the package name, you'll get an error only for the first part of the name split at the period.
Expected behavior

╰─▶ Cannot solve the request because of: No candidates were found for cool.package.bro *.

Ah looks like this might actually be a TOML issue?
echo "\"cool.package.bro\" = \"*\"" >> pixi.toml

results in the right error


Update to latest FBI release

New theme, new functionality...

Cannot be injected into H&S due to an issue with RomFS in the new builds.


dtlaunch: remember page between dtlaunch instances

@bobrippling interested what you think about this!

hm, the linter doesn't seem to handle ?? well.

It feels like this adds just enough milliseconds to be noticable when switching back and forth to the clock.
Might do some timings to compare.

Measuring performance on non-pretokenized code:
Time to first draw: 438 ms -> 441 ms
Time to run whole app: 600 ms -> 615 ms

Here we go!


[data-broker] Remove subscription engine

The subscription service of Data Broker is no longer being used, and should be removed from the system.

Done.


Delegation CLI commands

There is a method on LockedGold Contract delegateGovernanceVotes which allows one to vote for governance proposals on behalf of another. CURRENTly the only user friendly way to use this is via Celo Mondo. But that requires become a public delegate.
Instead we should add a commend to the cli
i suggest account:delegate as a logical place for it
will need to also support revokeDelegatedGovernanceVotes and updateDelegatedAmount

Is this still relevant?

Unassigning @pahor167, doesn't seem like that is necessarily on his todo list.

its a pitty we let this slip thru as i believe it would be valuable to the celo ecosystem.
For instance if one has celo on. multiple addresses in cold wallet one could delegate voting to a hot wallet

closing as implemented in this PR


Mapped subjects have a "next" method.

RxJS version: 5.5.2
Code to reproduce:
const o =  (new rx.Subject()).map(v => v * 2)
o.subscribe(console.log)
o.next(2)

Expected behavior:
I should get an exception: TypeError: o.next is not a function
Calling .next should return an Observable (at least according to the typescript definitions), and Observable should not have a next operator.
Actual behavior:
.next(2) targets the subject and 4 is mapped to the console.
Additional information:
If this really is allowed (but it seems like a source of confusion) then the typescript definitions need to be updated to allow it also.

This was by design (for better or worse).  TypeScript can't support it because TypeScript doesn't support higher-kinded types. You can always cast.

Thanks for the info, I doubt I will use it as it will probably just confuse whoever adopts the code but it's good to know.


Rebase to Istio Master

Rebasing to master

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by:
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Fix/update adding and removing licenses

@six7 this should fix the issue with adding the license keys etc..


"TCP Read failed" Javascript Error when connection to LND is lost

Os : win 10 pro
Zap version : zap desktop 0.2.0 beta ( windows version - Zap.Setup.0.2.0-beta.exe)
Lnd version : 0.4.2
Steps to reproduce :
Run zap on windows , choose default as operation mode.
Attached is error description as image :

@mntetai was this a one time or random thing or does it happen every time you run the app?

It happens when there a connection problem between lnd and zap.
I guess that you have to catch this exception and write it to a log and
then restart the application.
It is quite frequent , it happened around 20%  of runs ( 5 out 20) .
On Thu, Jul 26, 2018 at 11:17 AM, Tom Kirkpatrick<EMAIL_ADDRESS>wrote:

@mntetai https://github.com/mntetai was this a one time or random thing
or does it happen every time you run the app?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/LN-Zap/zap-desktop/issues/611#issuecomment-408015886,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABzA6AbofgIcwaHuvYcPLke0Xk7EyUHFks5uKXr8gaJpZM4VhRQb
.

--
Etai Tavor
cell :<PHONE_NUMBER>
http://www.linkedin.com/in/etaitavor

This error comes from GRPC here: https://github.com/grpc/grpc/blob/6abc0aef5d07bb55477c2f59c4793f3452e51efc/src/core/lib/iomgr/tcp_uv.cc#L109
I'm working on a solution to gracefully handle GRPC failures like these.

If I am reading the code correctly , it suggest that you are trying to read from a closed socket.
You should always check if the connection is open ... or keep a flag that keeps connection state.

The reasoning and solution for this is described in https://github.com/grpc/grpc-node/issues/440

Closing as issue is over a year old with no further updates. Problem relates to a much older version of node-grpc.


Consider removing thumbnails from the talkback proxy

Due date: 2022-04-29

Assigned reviewers

[ ] @obulat
[ ] @sarayourfriend

Description
There are a lot of tapes for audio and image thumbnails. Saving them seems to add considerable time to the tape updating process. These responses are largely inconsequential—we don't read their headers or any specific data anywhere, for example, we only display the images. What if we used a single mocked response with a default image to replace all thumbnails, using route.fulfill, perhaps in a global setup script?

Eh, they don't actually take very long, but do add a lot of clutter and diffing nonetheless.

It may not be possible to use playwright's route mocking for the thumbnails because they're only mocked on the client, SSR requests wouldn't get the same mocking treatment.
I don't think we can use a single thumbnail for every one due to how talkback matches tapes, unless we found some way to automatically symlink all thumbnail tapes to a single response in a post-update-tapes script or something.

Eh, they don't actually take very long, but do add a lot of clutter and diffing nonetheless.

Tapes can safely be ignored in PR reviews/diffs, FWIW. They're auto generated and there's nothing to review in them (aside from PRs that modified how they're saved, named, etc).

Ah, I can't believe I didn't even consider SSR in this context. Thanks for that. I'll think about it a bit more, but probably best to keep things as-is.

Oh, we already manually re-write thumbnail URLs, we could just update the code that does that in test/proxy.js::tapeDecorator to replace them all with the same thumbnail. Then we could remove all but one thumbnail tape.
Problem with that though is that it would cause all thumbnails to have the same dimensions, which wouldn't exercise the image results page as expected.

I haven't thought about the thumbnail dimensions being important here :) I wonder if we could remove a lot of the thumbnail tape data (headers) and only leave the strictly necessary pieces. It might also help to move all the thumbnail tapes to a subdirectory that can be folded so that you don't see a long list of files there.

@zackkrida I think we can close this as "won't fix" right? Did you have any more ideas for how to address the original issue you were having while still preventing SSR from reaching out? Having differently sized thumbnails I think is important and using real thumbnail data for that seems to be the easiest.
Now that the new thumbnail proxy is live we could regenerate them and they might be smaller.
We could mark the tapes as binary in gitattributes or give them the generated attribute, whichever one forces them to not show up as needing review in PR diffs.

I'm comfortable closing this; my original concern was around size and I haven't seen these create large or significant diffs in quite some time.


Update pipeline examples

This PR splits the use_case_pipeline examples in training+validation and inference.

Thanks for the update!


Add table and reword the DoneJS README.md

Coverage remained the same at 96.396% when pulling e815bc9dbfdc8413a22f6f61762322863803b4e2 on donejs-readme-with-table into 0d339dd882a49fd35f9983d828c515c628389511 on master.

Please rebase with master and the tests should pass.

Coverage remained the same at 96.396% when pulling ad74f40f33b92effeb47cb644dd6ba06eb1786a4 on donejs-readme-with-table into ffbaa2b4396d4b4ef3269f832731fecada1513bb on master.


Blocking execution

Is it possible to set up blocking execution for hooks? For example, I have this config:
pre-commit:
  parallel: false
  commands:
    lint:
      glob: "*.{js,jsx}"
      run: yarn eslint {staged_files}
   format:
      glob: "*.{js,jsx}"
      run: yarn prettier --write {staged_files}
   add-files:
     run: git add {staged_files}

I want these commands to execute in the order I placed them. So if for example, lint command fails, the next two won't execute. Right now all commands will be executed even if some of them fail. Is that possible?
Workaround to this is to place all three scripts into 1 command
pre-commit:
  parallel: false
  commands:
    check-files:
      glob: "*.{js,jsx}"
      run: yarn eslint {staged_files} && yarn prettier --write {staged_files} && git add {staged_files}

But I don't like this approach, the first option is more declarative and there are clear steps of what happening, instead of reading a long script.
Sorry if I missed that information in your full guide.

Use piped: true instead of parallel: false.
See piped option in the docs.


Compiling swift packages that depend on Darwin or Glibc

I'm toying with this project to bear with me.
Trying to compile SwiftDate as a dependency
The following https://github.com/basvankuijck/SwiftDate/blob/master/Sources/SwiftDate/Formatters/RelativeFormatter/RelativeFormatter%2BStyle.swift fails as Darwin doesn't exist of course.
I guess my question is - is this going to be possible? I am guessing some Darwin / Glibc or equivalent might exist so I can use this library?

I think this question might belong with Tokamak instead...

I'd fork it and replace all #if os(Linux) with #if os(Linux) || os(WASI) as a first step.

This issue does belong to SwiftWasm in general, I'm not sure it is specific to either Tokamak or carton. As Carson mentioned, import Glibc will work, and you can check for it with os(WASI). Bear in mind that WASI libc is not 100% compatible with Glibc and in the near future we'll rename that module to WASI to indicate that, so you'll have to use import WASI instead with future SwiftWasm snapshots. But for now import Glibc should work.
Does that resolve your issue?

Where can I confirm that WASI is being defined?  Adding os(WASI) still seems to cause the compiler to try to compile for the Apple platforms

This depends on the build invocation you use. If you build with carton dev, it always builds for WASI/WebAssembly and #if os(WASI) conditions are evaluated then. Could you clarify please how exactly do you build your project for WebAssembly?

I'm using carton
tozer@Mathieus-iMac Barnes % carton --version
0.4.1
tozer@Mathieus-iMac Barnes % swiftenv version
wasm-5.3-SNAPSHOT-2020-08-15-a (set by /Users/tozer/.swiftenv/version)

tozer@Mathieus-iMac Barnes % carton dev
Polyfill integrity verified: /Users/tozer/.carton/static/dev.js
Inferring basic settings...
- swift executable: /Users/tozer/.carton/sdk/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a/usr/bin/swift
Swift version 5.3-dev (LLVM b54b6b832e, Swift 4bb1458ec4)
Target: x86_64-apple-darwin19.6.0

Parsing package manifest: /Users/tozer/.carton/sdk/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a/usr/bin/swift package dump-package
- development binary to serve: /Users/tozer/code/SwiftDate/Barnes/.build/wasm32-unknown-wasi/debug/Barnes

Building the project before spinning up a server...
/Users/tozer/.carton/sdk/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a/usr/bin/swift build -c debug --product Barnes --enable-test-discovery --destination /Users/tozer/.carton/sdk/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a.json
[4/4] Linking Barnes
Process completed successfully

Parsing package manifest: /Users/tozer/.carton/sdk/wasm-DEVELOPMENT-SNAPSHOT-2020-06-12-a/usr/bin/swift package dump-package

Watching these directories for changes:
/Users/tozer/code/SwiftDate/Barnes/Sources/Barnes

[ NOTICE ] Server starting on http://<IP_ADDRESS>:8080

Thanks for sharing that, the output seems valid to me, thus os(WASI) conditions should be evaluated correctly in this setting. You can check out the source code of the TokamakShim module which uses similar conditions as an example.

I've tried to compile SwiftDate on my side, but it doesn't look like the library will work as is. It depends on things that aren't available in WebAssembly such as multi-threading, as SwiftDate relies on Foundation APIs such as Thread.current. Similarly, it expects locale and time zone files to exist, but these aren't currently supplied by browsers, or there's no corresponding JavaScript API for it.
The only workaround I currently see is bridging to JavaScript and using something like moment.js, which does supply its own locale and time zone information. Otherwise a similar library has to be built for SwiftWasm.

If you see issues in compiling anything other than SwiftDate, please feel free to open an issue in the main SwiftWasm repository or to reopen this one. Thanks again for raising this!

Thanks for trying it out - I was really just seeing how far I could get, so that has saved me some time. Perhaps I'll try with some even leaner libraries like https://github.com/pointfreeco/swift-prelude

BTW, the time zones issue is tracked in https://github.com/swiftwasm/swift/issues/1148, and the wider Foundation status in https://github.com/swiftwasm/swift/issues/592#issuecomment-659480405. Libraries that don't rely on Dispatch and filesystem APIs should work or be easily adaptable for SwiftWasm. And we do want to enable both FS and Dispatch in the future, but these are complex tasks and we had a few other things on our roadmap to resolve before that.

I understand the considerable work to make this all happen!
While I've got you - is there a list somewhere of the status of 1st and 3rd party (from an application engineering standpoint) libraries?

The only list I know of is awesome-swiftwasm, and the only actively maintained seem to be JavaScriptKit and Tokamak. The latter also depends on my forks of Runtime and OpenCombine, and I plan to submit those changes to their upstream repositories at some point.
If you find anything else or maintain something yourself, please feel free to submit a PR to the awesome-swiftwasm list. The ecosystem is in its early stage, and all help we can get is much appreciated 🙏
Maybe the only thing missing here is XCTest, a subset of which is also supported (expectation and Bundle APIs are unavailable), and you can run carton test in your package to get simple test suites running. I'll update carton's README.md tomorrow to reflect that.

Turns out I don't know How To Swift Package Manger - I wasn't updating my locally patched packages with
swift package update


I wonder why there is no '==' or '!=' operand among tensor, but exists '>=', '<=', '>' etc, which is not so harmonious.

System information

Have I written custom code:  no
OS Platform and Distribution:  Linux Centos 7
TensorFlow backend:  yes
TensorFlow version:  1.13.1
Keras version:  2.2.4
Python version:  3.7.2
CUDA/cuDNN version:  no
GPU model and memory:  no

import numpy as np
from tensorflow.keras import backend as K

x = K.variable(np.arange(9).reshape(3, 3))
y = x - 1

z = x >=y     # yes, it returns tf.Tensor object
z = x == y    # it doesn't return tf.Tensor which is what I want, but returns False
z = x != y     # ditto

I know that, there exists K.equal and K.not_equal.
However, what I am concerned about is the disharmony ...

python language "x==y" means compare the value, "x is y" means compare the object.
java language "x==y" means compare the object and "x.equals(y)" means compare the value
However, as your test, in tensorflow, seems that "==" means compare the object which is more like a java way.
I dont know why this happen, maybe there are some hidden thoughts about the multi-platform support.
So, in case some misunderstanding, you'd better use tf.equal()/not_equal for better code readability.
Correct me if i was wrong.

Thanks for your reply, but that isn't what I want, maybe I didn't make it clear.
In NumPy, I can do these:
>>> import numpy as np
>>> x = np.array([1, 2, 3])
>>> x
array([1, 2, 3])
>>> y = np.array([2, 3, 5])
>>> x == y
array([False, False, False])

But in Keras I couldn't, maybe this is because the underlying limit. However, I think it is would be nice to add these features into Keras or TensorFlow, whithout specifically calling the equal or not_equal.
Moreover, I think override the __eq__ and __ne__ can fix this, isn't it right?


feat: missing results about StarAlgHom.codRestrict

This is a step towards making sure that all the codRestrict APIs are similar, but they're still not similar enough in wether they take bundled subobjects/morphisms or subobject/morphism classes.

Noticed while reviewing #6372

bors r+


Can't minimize alited on Windows 10

Can't minimize alited on Windows 10.
alited v1.4,4.3
Tcl/Tk  8.6.13 from bawt
No problem with Linux
alited v1.4,4.4
Tcl/Tk 8.6.13
I've had this problem for a long time. I thought it was due to my installation of alited.
But it happens with the alited installer with a new Windows Installation.

Hopefully, fixed in v<IP_ADDRESS> available in alited.zip of
http://chiselapp.com/user/aplsimple/repository/alited/download
Github repo & installers will be updated later.

Thanks,
it's works.


Post messages script - remove "sleep"

try to fix #2251
Also:

remove the 1 second sleep after creating a discussion (not needed anymore). Maybe it was the source of the never finishing job
add logs
refactoring
don't get all the discussions, only test if the bot has already created one (see https://github.com/huggingface/moon-landing/pull/8742 -> it's why we skip the tests for now)

Codecov Report
Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (4fadb51) 91.35% compared to head (c544396) 65.63%.

Files
Patch %
Lines

...e_maintenance/src/cache_maintenance/discussions.py
41.66%
14 Missing :warning:

jobs/cache_maintenance/tests/test_discussions.py
36.36%
7 Missing :warning:

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2318       +/-   ##
===========================================
- Coverage   91.35%   65.63%   -25.73%
===========================================
  Files         237       12      -225
  Lines       14431      451    -13980
===========================================
- Hits        13184      296    -12888
+ Misses       1247      155     -1092

Flag
Coverage Δ

jobs_cache_maintenance
65.63% <40.00%> (-28.72%)
:arrow_down:

jobs_mongodb_migration
?

libs_libcommon
?

services_admin
?

services_rows
?

services_search
?

services_sse-api
?

services_worker
?

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

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

does this mean we should use another user name for the CI ?

yes, once https://github.com/huggingface/moon-landing/pull/8742 is deployed, I'll do a PR to change the user/org names in the tests, and re-enable the tests here.

deployed


Updates to support latest pykitti

Pykitti updated to use data generator. Original way in your notebook cannot work, I made my local changes. Please review to see whether you want to take them. Thanks.

Thanks @jinchenglee — I've opened a separate PR for this: #2 (merging now). It updates pykitti interface and includes requested function parameters.
Closing this one, as it has a bunch of changes not related to updating to latest pykitti, as well as includes cells' output with errors, etc.


Added S3 options to bucketWithLocal.

I ran into an issue where I needed to add some more options to the PutObjectCommand, this pull request just allows those options to pass through to the PutObjectCommand call. If an option is a function, the function is called with the key name, otherwise it is passed straight through.
My issue in particular is that
aws s3 sync myFolder s3://my-bucket
Automatically assigns a mime type in the metadata and also makes you the owner, so the PutObjectCommand needs to have this added to it:
{
  // ...
  ACL: "bucket-owner-full-control",
  Metadata: {
    ContentType: mime.lookup(Key) || "text/html",
  },

In particular this is for a bucket I use as a website, so without this added my website won't function.
I can use the new feature like this:
sync.bucketWithLocal(
    dir,
    process.env.REACT_APP_AWS_WEBSITE_BUCKET,
    {},
    {
      ACL: "bucket-owner-full-control",
      ContentType: ({ Key }: Partial<PutObjectCommandInput>) =>
        mime.lookup(Key || "") || "text/html",
    }
  );

Not sure this is the nicest API for this, but it solves my problem.

Thank you for the PR!
I'm merging it to a feature branch and will rework it a bit to integrate acl and content type behavior to the sync options.
I'll comment on the changes here.

I was going to implement ACL and mime features as standalone options like in the CLI, but then I realized that there are much more options and edge cases that would not be covered anyway.
So I went with your suggestion, which I like a lot, to add support for any sdk command input option.
Thank you!

Oh awesome! Glad to hear this made it in! And thanks so much for the tool, it's super helpful to me.


[BUG]:Drizzle-zod:Boolean and Serial types from Schema are defined as enum when using CreateInsertSchema and CreateSelectSchema

What version of drizzle-orm are you using?
0.28.6
What version of drizzle-kit are you using?
0.19.13
Describe the Bug
I've create a thread on Drizzle Discord in Help with details on it : https://discord.com/channels/1043890932593987624/1155846666780426280
With screenshots and explanation.
In resume : There is a problem for drizzle-zod. When you load Schema Boolean and Serial are recognize as unknown and it force you to override them and redefine them
Expected behavior
Don't need to override it and when you load schema using CreateInsertSchema and CreateSelectSchema. Boolean and Serial types are Boolean and numbers
Environment & setup
Using drizzle-zod in a Frontend app using vscode.

I am also seeing this with decimal, integer, boolean and timestamp from drizzle-orm/pg-core. Even defining a $type does not seem to fix this.

Yeah this is killing me too on integer fields. the createInsertSchema seems to wreck the type defs for any SQLite/LibSQL schemas. Question: Above you mention "override" them in the create..., I do know how to do this and have tried this but can't get this to fix anything. Can someone post how to overide this so the type comes out correct?...
loginfails: integer("loginfails", { mode: "number" }).notNull().default(0),
Without any create... override, I get this type error in my repo code...

Why that type error on the loginfails integer field? Am I doing something stupid?

I am also seeing this with decimal, integer, boolean and timestamp from drizzle-orm/pg-core. Even defining a $type does not seem to fix this.

facing the same

I am getting a similar error with SQLite, although I don't know if it is related...
integer and numeric from drizzle-orm/sqlite-core are being interpreted as ZodEnum<undefined>
Here's a screenshot:

Additionally, name in this example is interpreted as ZodOptional, even though it's marked as notNull
OS: Windows 10
Drizzle-ORM Version 0.32.0
Drizzle-Zod Version 0.5.1

@Haffi921 thanks so much for replying here, I was at my wits end trying to figure out why it worked in one of my projects but not my other one. I wasted about 3 hours on this. The post you linked solved my problem as well.

This one was fixed in the latest<EMAIL_ADDRESS>


default contentBase option to '' (empty string)

in order to make it work like README says and work without configuration

Thanks, looks good!


fix: validate that configs/secrets used match those provided

Partially fixes https://github.com/TBD54566975/ftl/issues/1173
The 3 commands dev, build, and deploy (which call instantiate a new buildengine) should all log warnings (for unnecessary configs/secrets) and errors (for configs/secrets required but not provided).
$ ftl build buildengine/testdata/projects/configsecret --config=buildengine/testdata/projectconfigs/config-secret-validation-ftl-project.toml
info:module: Building module
warn:builtin: config "someServiceAccessToken" is provided for module "module" in ftl-project.toml, but is not required
warn:builtin: secret "companyApiKey" is provided for module "module" in ftl-project.toml, but is not required
warn:builtin: config "ftlEndpointAlternate" is provided globally in ftl-project.toml, but is not required by any modules
ftl: error: config "missingConfig" is not provided in ftl-project.toml, but is required by module "module"
            secret "missingSecret" is not provided in ftl-project.toml, but is required by module "module"

Future PR to close the issue: ftl config/secret unset should fail if the value being removed is still referenced in a module, unless --force or -f is present, in which case we should warn instead of erroring.

Intentionally leaving this branch alive for context, but closing the PR per https://github.com/TBD54566975/ftl/pull/1423#discussion_r1594424004


Allowing to ignore GPU

I get the error torch.cuda.OutOfMemoryError: CUDA out of memory. So I'd like to run on CPU. But there isn't a setting for that, even though the readme talks about being able to run on both CPU and GPU. It would be great if there was a setting to ignore the GPU to be able to avoid any errors relating to an insufficient GPU.
If technically applicable: If running on CPU wouldn't utilize all logical CPU cores by default, there should also be a setting for the number of threads as in llama.cpp, so one can get CPU utilization up to 100% to maximize speed.

from bark import preload_models

preload_models(use_gpu=False)


Add tests for wallet service

@veado

In some cases it make sense to check internal things (e.g. has fs.remove been called to remove a file or has fs.writeJSON been called to write something into a file. However, in general I would try to test more expected results (e.g. expected states)
i agree with you but in this case this side-effects are really important. in addition if we dont mock this nodejs-actions we will delete/create files locally which might be incorrect

@veado i agree with your proposal to test this as a black box and test only stream result but after fighting it almost 6 hours i've lost.
https://github.com/ReactiveX/rxjs/issues/5028
LSS: its almost impossible.

... after fighting it almost 6 hours i've lost.
ReactiveX/rxjs#5028
LSS: its almost impossible.

Yep, that's an know issue, see "You can't directly test RxJS code that consumes Promises..."
We don't need to use TestScheduler everywhere and if needed we can just go another way: "The solution is to test that code in isolation, with the traditional async testing methods of your testing framework." (see example in https://rxjs-dev.firebaseapp.com/guide/testing/marble-testing#known-issues)
We have already done it ^ in tests for ThemeContext before: No use of TestScheduler, just a subscription and tests of its values. BTW: In ThemeContext we could use TestScheduler of course, but we had not introduced marble testing it at this time.

i agree with you but in this case this side-effects are really important. in addition if we dont mock this nodejs-actions we will delete/create files locally which might be incorrect

Agree, see https://github.com/thorchain/asgardex-electron/pull/296#discussion_r459499224


Custom 404 page/logic when story does not exist in Storyblok

Describe the issue you're facing
I'm using the SDK only setting the version to published.
Inside my page.ts file i'm calling the storyblokAPi.get function to get a page that does not exist.
I would like to check if this page exists or not and be able to return my own 404 (that i want to call from Storyblok aswell).
Currently in my terminal i do see this:
{
  message: 'Not Found',
  status: 404,
  response: 'This record could not be found'
}

But my frontend itself shows:
500
Internal Error

I tried debugging and placing breakpoints after calling the storyblokApi.get function but it seems it does not even get passed that.
Reproduction
https://github.com/storyblok/storyblok-svelte/tree/main/playground-sveltekit
Steps to reproduce
Follow the tutorial that results in this: https://github.com/storyblok/storyblok-svelte/tree/main/playground-sveltekit
Call a not existing page in Storyblok
System Info
System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 361.98 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/Library/Caches/fnm_multishells/30950_1714475534857/bin/node
    npm: 10.1.0 - ~/Library/Caches/fnm_multishells/30950_1714475534857/bin/npm
    pnpm: 8.15.4 - /opt/homebrew/bin/pnpm
    bun: 1.0.30 - /opt/homebrew/bin/bun

Used Package Manager
npm
Error logs (Optional)
No response
Validations

[X] Follow our Code of Conduct

Hi @thebspin , the example you are following is very simple, and doesn't manage any kind of errors (like story not found etc).
The idea you can follow is essentially managing the errors. In the official svelte doc you see an example where there is a condition that checks the objects is empty and then the error helper is called: https://kit.svelte.dev/docs/errors#expected-errors
Here because the storyblokAPi.get raise an exception you can catch the exception and then manage the error.
In this example, I'm catching the error and filling an object with some information useful for my case in the .svelte template file
Example:
    return storyblokApi
        .get("cdn/stories/home", {
            version: "draft",
            resolve_relations: resolveRelations,
        })
        .then((dataStory) => {
            return {
                story: dataStory.data.story,
                siteConfig: siteConfig.data.story,
                error: false,
            };
        })
        .catch((error) => {
            return {
                story: {},
                siteConfig: siteConfig.data.story,
                error: error,
            };
        });


Update camouflage.js

Description
Make the help sample well formed.
Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Update of help text.
Checklist:

[X] My code follows the guidelines of this project
[X] I have performed a self-review of my own code
[X] This does not break any existing functionalities

I also guess you guys should sync this with the README.md and the example on the home page.

Makes sense. That section does look severely out of sync.
For reference the config.yml in the develop branch can be used. The same would need to be updated in the both config.yml and README.md


Update Lagom to 1.3.6

CC: @fsat. I don't think it will affect your work negatively, but just in case.

@TimMoore - I think #72 should not be affected since I'm changing the packageBin target which comes from SBT web instead of Lagom.
However, to be on the safe side I'm happy to do another round of manual test for #72 if we can merge #71 first - wdyt?

@fsat it's OK I think we can merge #72 first and then I can rebase this change and test again. I'd like to run through the tests you did, anyway, just so I know the procedure.

I rebased and ran through all of the tests listed in #72. Everything looks good.

Yay! 👍


Updating dependencies

:tada: This PR is included in version 1.11.2 :tada:
Your semantic-release bot :package::rocket:


Compilation of Retro UI failed

Issue summary
Compilation of Retro UI failed at 97%
[Put a detailed description of the issue here.]
When I tried to compile retro UI, it failed because of the following error:
/home/dl/anaconda3/lib/libpng16.so.16: undefined reference to<EMAIL_ADDRESS>Details as below:
dl@dmlab:~/Documents/gym-retro$ make -j$(grep -c ^processor /proc/cpuinfo)
[ 26%] Built target zip
[ 26%] Built target gba-submodule
[ 26%] Built target snes-submodule
[ 26%] Built target gb-submodule
[ 26%] Built target genesis-submodule
[ 26%] Built target nes-submodule
[ 72%] Built target man
[ 72%] Built target zipcmp
[ 73%] Built target zipmerge
[ 73%] Built target ziptool
[ 75%] Built target malloc
[ 75%] Built target nonrandomopentest
[ 76%] Built target fseek
[ 76%] Built target fread
[ 76%] Built target atari2600-submodule
[ 77%] Built target ziptool_regress
[ 77%] Built target hole
[ 77%] Built target fopen_unchanged
[ 77%] Built target add_from_filep
[ 79%] Built target can_clone_file
[ 79%] Built target nonrandomopen
[ 79%] Built target tryopen
[ 79%] Built target pce-submodule
[ 80%] Built target gmock
[ 80%] Built target in-memory
[ 82%] Built target gtest
[ 83%] Built target nes
[ 83%] Built target genesis
[ 83%] Built target gmock_main
[ 85%] Built target gba
[ 85%] Built target gb
[ 86%] Built target snes
[ 88%] Built target pce
[ 88%] Built target atari2600
[ 88%] Built target gtest_main
[ 92%] Built target retro-base
[ 92%] Built target retro-capnp
[ 92%] Built target test-emulator
[ 92%] Built target test-memory-overlay
[ 94%] Built target test-search
[ 94%] Built target retro
[ 95%] Built target test-memory
[ 97%] Automatic MOC and UIC for target gym-retro-integration
[ 97%] Built target test-data
[ 97%] Built target test-script
[ 97%] Built target gym-retro-integration_autogen
[ 97%] Linking CXX executable ../../gym-retro-integration
[ 97%] Built target testinput
/home/dl/anaconda3/lib/libpng16.so.16: undefined reference to<EMAIL_ADDRESS>collect2: error: ld returned 1 exit status
src/ui/CMakeFiles/gym-retro-integration.dir/build.make:290: recipe for target 'gym-retro-integration' failed
make[2]: *** [gym-retro-integration] Error 1
CMakeFiles/Makefile2:2562: recipe for target 'src/ui/CMakeFiles/gym-retro-integration.dir/all' failed
make[1]: *** [src/ui/CMakeFiles/gym-retro-integration.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
System information

[Operating system]
Ubuntu 16.04 LTS
[Python version]
Python 3.6.5 :: Anaconda, Inc.
[Gym Retro version]
Latest Version 12/13/2018

For anyone else with this issue I was able to resolve by:
conda remove libpng
Then run the integration steps:
cmake . -DBUILD_UI=ON -UPYLIB_DIRECTORY
make -j$(grep -c ^processor /proc/cpuinfo)
./gym-retro-integration


Compound expressions as conditions in catalyst.cond is not supported

Catalyst doesn't support compound expressions as conditions. Running the following example will raise a jax.errors.ConcretizationTypeError.
@qjit
@qml.qnode(qml.device(backend, wires=1))
def circuit(x):
    @cond(x > 4 or True)
    def cond_fn():
        qml.PauliX(wires=0)

    cond_fn()

    return measure(wires=0)

circuit(2)

E       jax.errors.ConcretizationTypeError: Abstract tracer value encountered where concrete value is expected: traced array with shape bool[].
E       The problem arose with the `bool` function.

Thanks @maliasadi! Actually @dime10 this could be a new class of test conditions

This is expected JAX behaviour. Built-in Boolean Python functions do not work on JAX tracers, and users have to use jax.numpy.logical_and instead.
It's on our roadmap for autograph though as a QOL improvement (see https://app.shortcut.com/xanaduai/story/41303/add-the-ability-to-capture-logical-and-and-or-statements).

Support for this was now added in #325.


[v3.3] Exclude completed pods from being workload endpoints.

https://github.com/projectcalico/libcalico-go/pull/1040


chore: removed some dead projects

removed archived repos and dead webpage [stitches]
BTW
since there's no god place for talk, I might as well ask here:
what is your philosophy on removing projects, since Tailwind is in version 3 and there's a few of repos that are, well, no longer so awesome, since tailwind already has those features built in. in fact, some of them are already archived by their developers. maybe this repo should follow, and remove those?

Thank you! We don't really have a specific philosophy. We have planned to do a general cleanup and be more strict on the projects we'll accept on the list though, but nothing has been set in stone yet.

@innocenzi I saw this yesterday but didn't have time to look over it but I had been thinking about what @diomed said, and I see we have a section for "plugins rolled into Tailwind" that is getting really long and I personally don't think it's necessary to list useless plugins anymore, should we remove that section?

Yes, that can definitely go away 👍


archive cells feature

Adding a feature to allow for cells to be archived.

New UI Element on the header of dashboard
Backend implementation, marking cells as archived

Closed as part of #308


"AI service error: The model: code-davinci-002 does not exist"

Description
I get "AI service error: The model: code-davinci-002 does not exist " when I do a custom request ("select title" where title is a column of the table selected for custom".  API is set up and working
I'm at Version <IP_ADDRESS>303211029
on M1 Mac w/ latest Ventura 13.2.1 (22D68)
Thx
DBeaver Version
Enterprise Edition Version <IP_ADDRESS>303211029
Operating System
Ventura 13.2.1 (22D68)
Database and driver
Mysql v8.032
Steps to reproduce

create tab for sql query
click on openAI icon
set to 'custom' and select mysql table
type in english query "select title"   (keeping it simple)
click translate

Additional context
Where would I download that component?  It seems to be important.

Please try choosing one of the text- models in preferences.

code- models were disabled by OpenAI we will add gpt3.5 turbo instead in the next release for now we recommend using text-davinci-03 instead.

Duplicate of https://github.com/dbeaver/pro/issues/1494