Nested prange regression in 0.49

Reporting a bug

[x] I am using the latest released version of Numba (most recent is visible in
the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
[x] I have included below a minimal working reproducer (if you are unsure how
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).

Here is the script to demonstrate the regression:
import numba as nb
import numpy as np

@nb.njit(parallel=True)
def make_row(a, b, row_data):
    for col in nb.prange(len(b)):
        row_data[col] = a * b[col]

@nb.njit(parallel=True)
def make_product(a, b):
    matrix = np.zeros((len(a), len(b)))
    for row in nb.prange(len(a)):
        make_row(a[row], b, matrix[row])
    return matrix

if __name__ == '__main__':
    a = np.random.random(1000000)
    b = np.random.random(100)
    m = make_product(a, b)

In command line I set environment variable NUMBA_NUM_THREADS=2 to limit the number of thread to 2. When I run the script it pegs all 6 cores for 276 seconds. It seems the multithreading doesn't honor the NUMBA_NUM_THREADS environment variable. I run the same code with numba 0.48 and it finishes in 2.26 seconds using 2 cores, which is expected.
I have several related observations too, hope they could help a bit:

If I "inline" the make_row by copy-paste the code into the call site, the code runs fast (no performance regression comparing to 0.48).
If I flip the a and b in the call to make_product, the code runs fast.
If I set NUMBA_NUM_THREADS=1, the code runs fast but it takes about 3x the time comparing to 0.48.

I run the code in a Ubuntu 18.04 VM. I use conda environments to run the code. One has numba 0.49 and the other has numba 0.48. I have tbb package in both environments. Python version is 3.7.7.

Thanks for the report. Numba 0.49.0 now supports directly executing nested parallel regions through the use of thread mask inheritance. This documentation is for the thread masking API: http://numba.pydata.org/numba-doc/latest/user/threading-layer.html#setting-the-number-of-threads and this part explains nested parallelism http://numba.pydata.org/numba-doc/latest/developer/threading_implementation.html#nested-parallelism
I think all the things you observe in the above are as a result of this.

It seems the multithreading doesn't honor the NUMBA_NUM_THREADS environment variable. I run the same code with numba 0.48 and it finishes in 2.26 seconds using 2 cores, which is expected.

It does honour it, it's setting the number of threads correctly for each parallel region, your code has one inside another (N threads for make_product, creating N threads in make_row).

If I "inline" the make_row by copy-paste the code into the call site, the code runs fast (no performance regression comparing to 0.48).

This is expected, there's now just one parallel region, instead of one inside another (also consider whether make_row benefits from explicit parallelism given it's already parallelized make_product functoin?)

If I flip the a and b in the call to make_product, the code runs fast.

This is expected because a is larger and b is smaller, so it's basically running a small number of parent regions with far more work in the child regions.

If I set NUMBA_NUM_THREADS=1, the code runs fast but it takes about 3x the time comparing to 0.48.

There is overhead in nesting parallel regions, even with 1 thread entering a new region still requires setup and tear down.
Hope this helps.

Thanks for the detail explanation. I have three follow up questions.

So if thread number is set for each parallel region and I have two parallel regions, I would expect the total number of threads to be 2*2=4, but I see it using 6 threads. Why is that?
The example code is contrived. What I actually have are library codes written with numba. Before 0.49, user code and library code can both be implemented in numba prange without worrying about "too much parallelism", because we can use NUMBA_NUM_THREADS to control the total number of threads (and I think numba multithreads only the outermost prange, I'm not very sure though). Overwhelming the CPU with too many threads is bad for shared workstation and having too many threads actually hurts the performance. In 0.49, is there way to control the total number of threads no matter how many nested prange loop in the code?
I think what I would also want is to configure that only the outer most prange is multithreaded to avoid having too many tiny tasks which actually hurts the performance. I'm not very sure, but am I using prange wrong and should've used range for trivial calculation loops?

Thanks.

@stuartarchibald Hi, I think this is still an issue for me. Now I have to downgrade to numba 0.48. Do you have a couple minutes to take a look at my questions? I know developers are busy with other issues and I very much appreciate your works and numba has been a fantastic library. I think I would like to hear about the way to upgrade because I don't want to be stuck in 0.48. Thanks.

Thanks for the detail explanation. I have three follow up questions.
1. So if thread number is set for each parallel region and I have two parallel regions, I would expect the total number of threads to be 2*2=4, but I see it using 6 threads. Why is that?

If you can provide a reproducing piece of code I'll take a look. If TBB is involved it schedules its own threads, are you sure 6 threads are running opposed to perhaps 4 running 2 suspended?

2. The example code is contrived. What I actually have are library codes written with numba. Before 0.49, user code and library code can both be implemented in numba prange without worrying about "too much parallelism", because we can use `NUMBA_NUM_THREADS` to control the total number of threads (and I think numba multithreads only the outermost prange, I'm not very sure though). Overwhelming the CPU with too many threads is bad for shared workstation and having too many threads actually hurts the performance. In 0.49, is there way to control the total number of threads no matter how many nested prange loop in the code?

Not with TBB. If you use OpenMP I think the OMP environment variables impacting thread pool size will have effect. Nesting was discussed at the core developer meeting here https://github.com/numba/numba/wiki/Minutes_2020_02_18:

If a prange is inside a prange and in the same function scope the inner pranges will be serialised.
If a prange body contains a call to another function that contains a prange then nesting will occur.

I expressed that there may be a small number of cases where light weight nested regions might perform badly. I think it might be possible to support both variants (the "true nesting", as present, and the "maximum number of threads", which was an implementation detail of the <0.49 libraries), I think the cost of implementing this will be high. I'll also take a look at the TBB implementation to see if something can be done to improve performance in the case of light weight nested tasks.

3. I think what I would also want is to configure that only the outer most prange is multithreaded to avoid having too many tiny tasks which actually hurts the performance. I'm not very sure, but am I using prange wrong and should've used range for trivial calculation loops?

Nested parallelism is hard. The issue you have is that you've got nested parallel regions that are trivial, it might improve performance to just make them serial anyway, best thing to do is measure. Your original code "got away with it" due to a side effect of nested parallelism in Numba <0.49 not being configurable such that everything just ran in the same execution "pool" of a fixed size.

@stuartarchibald Thanks for your reply, very much appreciate it.
My production code is quite complex, but the example I showed is the gist of it. You can think of the make_row function being in a library and make_product function being in user code. I run my code in ipython to time it:
Python 3.7.7 (default, Mar 26 2020, 15:48:22)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import numba as nb

In [2]: import numpy as np

In [3]: from test_numba_parallel import make_product

In [4]: nb.set_num_threads(2)

In [5]: a = np.random.random(1000000)

In [6]: b = np.random.random(100)

In [7]: %time m = make_product(a, b)
CPU times: user 4min 38s, sys: 6min 38s, total: 11min 16s
Wall time: 1min 53s

The total time is about 6x of the wall time. Timing in the shell gives similar number:
$ export NUMBA_NUM_THREADS=2
$ /usr/bin/time -v python test_numba_parallel.py
        Command being timed: "python test_numba_parallel.py"
        User time (seconds): 273.25
        System time (seconds): 393.96
        Percent of CPU this job got: 595%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 1:52.09
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 931388
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 220890
        Voluntary context switches: 16458
        Involuntary context switches: 6196
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

I do see 6 threads running at 100% at the time from htop (I'm happy to provide a screenshot but I don't know how to attach a picture/file here). There is a significant amount of system time so I feel there is something off in the threading.
I totally agree with you that my example here has trivial parallel region and that hurts the performance, I will review our production codes to eliminate trivial parallel region. But often times, when we wrote the library codes we wouldn't know whether user would call the function in a prange loop or not. On one hand, we want to have performance boost from prange loop if user code doesn't use prange from higher level. On the other hand, we want to have control over the total number of threads when user code uses prange because we run our codes on shared cluster and oversubscribing CPU slows down all the jobs on the same machine.
I get it that nested parallelism is hard and "true nesting" has its benefits. I like your idea of supporting both "true nesting" and "maximum number of threads". My quick search leads to this thread: https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/289355. I think Intel is punting the implementation of "TBB_NUM_THREADS" kind of environment variable to higher level libraries/applications by providing only the programmatic API. The thread is 5 years old and I'm not familiar with TBB and numba internal workings, but it seems to me it should be relatively easy for numba to implement an environment variable for setting max number of threads when using TBB. Do you agree?

There's potentially a way through this to support the case where users just want "parallel" and that to use a fixed number of threads and this to be default (basically the same as before), but also to permit nesting. The performance problem isn't really about maximum numbers of threads, it's that task arenas are not cheap and are being prolifically created and nested by virtue of the code now paying more attention to nested parallelism. The fix to all this is complicated and will take some time but I'm going to at least attempt it!
CC @anton-malakhov this was the original issue that highlighted the problem of nested task arenas.


Improve examples

According to the traffic stats for this repo, people really like to check out the examples - it's third place in the list after the main repo page (i.e. github.com/meew0/discordrb) and the main wiki page.
Given the need to fulfill the role of what is essentially the repo's poster child, the examples are disproportionately spartanic. While there are six of them, they don't show off every aspect of the lib, by far.
This issue is there to remind myself to do it - if someone else wants to contribute an example, feel free, but please try to make sure it's appropriate for what I described above; I will be even more pedantic about the examples than about normal PRs (is that even possible?)
Tasks:

[x] Add more comments to existing examples
[ ] Add new examples to show off various features
[ ] Add a page somewhere that shows a logical progression through the examples

Tasks:

[ ] Add more comments to existing examples
[ ] Add new examples to show off various features
[ ] Add a page somewhere that shows a logical progression through the examples

[ ] AwaitEvent
[ ] AwaitEventHandler
[ ] ChannelCreateEvent
[ ] ChannelCreateEventHandler
[ ] ChannelDeleteEvent
[ ] ChannelDeleteEventHandler
[ ] ChannelUpdateEvent
[ ] ChannelUpdateEventHandler
[ ] DisconnectEvent
[ ] DisconnectEventHandler
[ ] Event
[ ] EventHandler
[ ] HeartbeatEvent
[ ] HeartbeatEventHandler
[ ] LifetimeEvent
[ ] MentionEvent
[ ] MentionEventHandler
[ ] MessageDeleteEvent
[ ] MessageDeleteEventHandler
[ ] MessageEditEvent
[ ] MessageEditEventHandler
[ ] MessageEvent
[ ] MessageEventHandler
[ ] MessageIDEvent
[ ] MessageIDEventHandler
[ ] Negated
[ ] PlayingEvent
[ ] PlayingEventHandler
[ ] PresenceEvent
[ ] PresenceEventHandler
[ ] PrivateMessageEvent
[ ] PrivateMessageEventHandler
[ ] ReadyEvent
[ ] ReadyEventHandler
[ ] ServerCreateEvent
[ ] ServerCreateEventHandler
[ ] ServerDeleteEvent
[ ] ServerDeleteEventHandler
[ ] ServerEvent
[ ] ServerEventHandler
[ ] ServerMemberAddEvent
[ ] ServerMemberAddEventHandler
[ ] ServerMemberDeleteEvent
[ ] ServerMemberDeleteEventHandler
[ ] ServerMemberEvent
[ ] ServerMemberEventHandler
[ ] ServerMemberUpdateEvent
[ ] ServerMemberUpdateEventHandler
[ ] ServerRoleCreateEvent
[ ] ServerRoleCreateEventHandler
[ ] ServerRoleDeleteEvent
[ ] ServerRoleDeleteEventHandler
[ ] ServerRoleUpdateEvent
[ ] ServerRoleUpdateEventHandler
[ ] ServerUpdateEvent
[ ] ServerUpdateEventHandler
[ ] TrueEventHandler
[ ] TypingEvent
[ ] TypingEventHandler
[ ] UserBanEvent
[ ] UserBanEventHandler
[ ] UserUnbanEvent
[ ] UserUnbanEventHandler
[ ] VoiceStateUpdateEvent
[ ] VoiceStateUpdateEventHandler

?

I just created this list from the available events. I'll check those that are covered enough so that we can easily keep track

There won't be an example for every single event, that would be stupid. I will just make an example for every aspect of it, like say, commands, voice, light, ...
There will also be examples that show off commonly-needed functionality, and that may include events such as server_create, but one for every event would be completely redundant.

Ok

[ ] Make idea
I have a great idea: Be able to send messgaes from the command prompt or line of which the bot was run from, You have to know the server name and channel name but those are pretty easy.
[x] Make idea

@riolibrary please don't suggest features in here - this thread is about the examples. If you believe you have a feature worth adding, make a new issue (however what you suggested is perfectly possible to do with existing functionality, so it won't be added to the lib anytime soon).

If I may, I'd like to suggest some examples I'd like to see.

Proc prefix handler -- While it wouldn't be too hard to understand the instructions given for making a proc that will do prefix handling, I would enjoy seeing an example of this. Specifically, I think an example of a Proc that has different prefixes per-server (with a default set in case it's from a server not in the list) would be useful.
LightBot -- While this wouldn't be an issue anyways, we should have at least one example of how to use the LightBot functionality. I don't imagine many people use LightBot, which would lead to finding help for it being pretty hard -- making the example would also theoretically remind us to improve it.
Events -- Not necessarily a big one, but I would like to see an example where more than just bot.message() or bot.command() are used -- how about one that uses bot.user_ban() and bot.user_unban() to log ban and unban events to a certain channel?
Awaits -- I was always confused as to how awaits work, and I imagine some others are too. How do they work? Do they create the handler and then continue on past that while still waiting, like a Thread? Most importantly, how do you set one up? Perhaps we can work off the ping example, whenever the bot sees "Ping!" it'll respond with "Hello!", then wait for "Pong!" and respond to that with "Goodbye."

Could the examples show how to do it outside of a Container, and with an example of how to do it in a Container?
https://github.com/meew0/discordrb/wiki/Containers

Generally, with the examples (specifically the ones in examples/), we try to explain how to do high level tasks with the library. To that effect, I think duplicating the event handlers used in the examples wouldn't add much value when the end result behavior is exactly the same, and the code isn't all that much different. The containers wiki page should suffice for now.
However, more inline @examples could be added - currently that wiki page is the only demonstration on how to use the EventContainer, etc, as a mixin. A basic @example could be attached to module EventContainer that gestures on how to use it as such.
I've also experimented with using docs macros to template examples on the event handler methods - https://zsixtyfour.com/discordrb-middleware-docs/Discordrb/Middleware.html#channel_create-instance_method - but I don't think I like it.

The issue is that @bot_config in your command handler belongs to ExitRunState, and does not refer to your top level @bot_config. As such, it is nil (undefined) and you can't call #[] on it.
In short, instance variables aren't global variables - they strictly belong to whatever scope they are defined in, not any lower or higher.

I am pretty late. I think the needed example is the multiple files with container. When the bot get a bit complex, people
will need to seperate files into different module.


Change background color of drop down

appearance.backgroundColor = UIColor.red is working but
appearance.backgroundColor = UIColor(red: 55, green: 59, blue: 70, alpha: 1) is not working.
Is custom color not supported ?
Thanks

Issue solved. Should have used UIColor(red: 55.0/255.0, green: 59.0/255.0, blue: 70.0/255.0, alpha: 1)


Merak-Agent: Accept Batch Requests

Needed to reduce amount of requests sent per pod

Target on 9/30


Why is format set to default, if not given?

We are having deprecation warning if the format is 'default', my doubt is if the format is not given we can use other formats, why 'default'?
https://github.com/expressjs/morgan/blob/4dd1180260150598657708720c62504bb2200011/index.js#L65

I don't understand the question.

When you don't pass format like this:
app.use(morgan({
    stream: accessLogStream
}))

Log you get for that is this
morgan deprecated morgan(options): use morgan("default", options) instead index.js:32:9
morgan deprecated default format: use combined format index.js:32:9

We are getting default deprecated warning because as there is no format set, we are setting format to default.
My doubt was why is it set to default instead of other formats?

You are getting teo deprecations:
(1) you are passing an options argument as the first argument. You need to pass a format as the first argument.
(2) you are not specifying a format in your call. You need to pass a format.


Add default session manager for in memory session store

Provides a basic in-memory session storage as well as a SessionStore interface that can be implemented for external session store servers such as redis, etc.
The basics of this are the existence of a DefaultSessionStore which implements the 'SessionStore' as well as its methods and Get(SessionToken), NewSession(). Sessions are identified by a SHA256 identifier, which should be included in each request so that session lookup works correctly.
The Context type implements a hashmap with string keys and interface values. By implementing with interface{} values we can assign any type to a key, allowing the addition of any data into a client's context.

This looks horrible. Do not merge.


Handle duplicate pins in netlist generation

Following up from #128 and #129, we need to re-evaluate the netlist generation code to be sure that this fix doesn't break something else and the logic is still correct.

@kdumontnu Do you know if the two warnings here:
https://github.com/AllSpiceIO/py-allspice/blob/069de7c1f64445ddd3d5396444771d39e0812bc0/allspice/utils/netlist_generation.py#L79-L83
and
https://github.com/AllSpiceIO/py-allspice/blob/069de7c1f64445ddd3d5396444771d39e0812bc0/allspice/utils/netlist_generation.py#L87-L91
are "useful"? As in, is it important that we warn for these? Due the same crysknife change that broke the netlist generation, these are triggering very often, and in general the code here can be simpler without them.

I believe this is closed by https://github.com/AllSpiceIO/crysknife/pull/1089 but we will confirm after the next crysknife release and validate it in production 👍

Tested this with 0.3.17 on local and I think we're good to close this.


Distillation: Make TransformerDistiller a no-op in regular pipelines

Description

Override and stub TrainablePipe methods that would be called in a regular training/inference pipeline.
Types of change

Fix
Checklist

[x] I confirm that I have the right to submit this contribution under the project's MIT license.
[x] I ran the tests, and all new and existing tests passed.
[x] My changes don't require a change to the documentation, or if they do, I've added all required information.

The test failure appears to be from the target branch.

The test failure appears to be coming from the target branch.

We probably need to bump it to a newer spaCy version:
ImportError: cannot import name 'validate_distillation_examples' from 'spacy.training'


Add parameter index creation with progressbar

Overview
This PR adds the creation for parameter index here.

Pull Request Test Coverage Report for Build 179

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at ?%

Totals

Change from base Build 177:
0.0%

Covered Lines:

Relevant Lines:
0

💛  - Coveralls


error: upper bound of FOR loop cannot be null

getting
error: upper bound of FOR loop cannot be null

when upserting empty array as a property of an entity
https://stackoverflow.com/questions/6985350/array-length-of-an-empty-array-returning-null

so the coalesce does the trick, like that SO post suggests

      FOR v_array_access_index IN 1 .. coalesce(array_upper(in_photo_ids, 1), 0)

similarly, empty array will be returned as null from ARRAY_AGG - we should coalesce that into a value as well.

    (
      SELECT COALESCE(array_agg(job_version_to_photo.photo_id ORDER BY job_version_to_photo.array_order_index), array[]::bigint[]) as array_agg
      FROM job_version_to_photo WHERE job_version_to_photo.job_version_id = v.id
    ) as photo_ids,


Adapt the "Welcome" section of the style guide

Adapt Welcome section to include not only user documentation but infrastructure documentation as well.

This issue relates to actions for the Nimbus project that are no longer needed.


add export encode_hint.dart

https://github.com/xvrh/zxing-dart/issues/10
Add export encode_hint.dart.
fix below problem

Thanks!

Not at all. Thanks!


POC – Fixed #1688 -- Output translatable labels when displaying permissions

Demos of a potential fix for https://code.djangoproject.com/ticket/1688.
See discussions:

https://forum.djangoproject.com/t/permissions-dont-get-translated-in-admin-interface/21324
https://groups.google.com/g/django-developers/c/Jv1GqGlp3ao/m/n0jc36kZBAAJ

Second PoC (latest), based on django#16053 – resulting labels:

First PoC: see commit 89eb783e46d98d5092840df560c6eb8dc06e27c5. Resulting labels:

I have moved this over to the main Django repository so it’s a bit more visible: https://github.com/django/django/pull/18885. I’m not able to take this beyond the POC stage myself but we have a plan :) Thank you for the early feedback @adamchainz!


Fix #1446: Explorer - add overflow handling to items

This prevents wrapping of items in the explorer menu, and truncates with ellipsis if the name goes outside the explorer UI.
We still need to get resize behavior (#1414), but this is similiar to how other editors handle it.

Fixes #1446


Replace \textbf with \mathbf is there is some math mode inside

Number is \textbf is not bold if in math mode. Must be $\mathbf{\d+}$


Can't close or write jpeg file

I've encountered a strange problem.  exempi can't close a jpeg file.  It is one of several very similar files in the same directory.  You'd suspect a permissions problem but other files in the same directory can be written.  It could be a malformed jpeg for some reason or with bad embedded metadata.  But the mac app called photo meta edit.app can edit and create xmp fields and successfully write and close the file.
But exempi can't.  Here is the error message:
LFA_OpenRsrc: open failure
I have run through Python debugger.  All of the following statements conclude successfully:
xmp = xmpfile.get_xmp()
xmp.set_property(namespace, attr, value)
xmpfile.put_xmp(xmp)

The code fails at:
xmpfile.close_file()

Below I post the python function where I update and write the jpeg file. Also, the state of the xmp metadata as modified by the code.  It looks like clean metadata, but maybe I am missing something.
All I can think is there is something just off about the file size so that there is some awkward word boundary that hangs up exempi.
Sorry for the long post.  Just wanted to include what I could to help figure this out.
Here is my function:
def put_pic_metadata(fname, changes):
    """Write xmp metadata into an image file.  Requires Python XMP Library."""

    result = True   # unless failure or exception, below
    if changes:
        try:
            xmpfile = XMPFiles(file_path=fname, open_forupdate=True)
            xmp = xmpfile.get_xmp()  # load metadata as python dict of arrays
            for item in changes:
                prefix, attr = item[0].split(":")  # assign the 2 pieces
                namespace = xmp_namespaces[prefix]  # expand to url of namespace
                value = item[1]
                if xmpfile.can_put_xmp(xmp):
                    try:
                        if isinstance(value, int):
                            xmp.set_property_int(namespace, attr, value)
                        elif isinstance(value, bool):
                            xmp.set_property_bool(namespace, attr, value)
                        else:
                            xmp.set_property(namespace, attr, value)

                        xmpfile.put_xmp(xmp)  # write it to disk
                    except (TypeError, IOError):
                        print(item)
                        print(sys.exc_info()[0], "Failed to write", fname)
                        result = False  # Failure
                else:
                    result = False  # failure
            xmpfile.close_file()
        except:   # untrappable errors from libxmp
            print("Could not open, write, or close:", fname)
            result = False

    return result

Here is the xml:
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Exempi + XMP Core 5.1.2">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
   <photoshop:DateCreated>2016-04-11T13:52:12-07:00</photoshop:DateCreated>
   <photoshop:Instructions>C1 Edits</photoshop:Instructions>
  </rdf:Description>
  <rdf:Description rdf:about=""
    xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
   <tiff:Orientation>1</tiff:Orientation>
   <tiff:YCbCrPositioning>2</tiff:YCbCrPositioning>
   <tiff:XResolution>350/1</tiff:XResolution>
   <tiff:YResolution>350/1</tiff:YResolution>
   <tiff:ResolutionUnit>2</tiff:ResolutionUnit>
   <tiff:Make>SONY</tiff:Make>
   <tiff:Model>DSC-RX100M4</tiff:Model>
  </rdf:Description>
  <rdf:Description rdf:about=""
    xmlns:xmp="http://ns.adobe.com/xap/1.0/">
   <xmp:CreatorTool>DSC-RX100M4 v1.20</xmp:CreatorTool>
   <xmp:ModifyDate>2016-04-11T13:52:12</xmp:ModifyDate>
   <xmp:CreateDate>2016-04-11T13:52:12</xmp:CreateDate>
  </rdf:Description>
  <rdf:Description rdf:about=""
    xmlns:exif="http://ns.adobe.com/exif/1.0/">
   <exif:ColorSpace>1</exif:ColorSpace>
   <exif:CompressedBitsPerPixel>5/1</exif:CompressedBitsPerPixel>
   <exif:PixelXDimension>4864</exif:PixelXDimension>
   <exif:PixelYDimension>3648</exif:PixelYDimension>
   <exif:ExposureTime>1/800</exif:ExposureTime>
   <exif:FNumber>56/10</exif:FNumber>
   <exif:ExposureProgram>2</exif:ExposureProgram>
   <exif:BrightnessValue>28934/2560</exif:BrightnessValue>
   <exif:ExposureBiasValue>0/10</exif:ExposureBiasValue>
   <exif:MaxApertureValue>434/256</exif:MaxApertureValue>
   <exif:MeteringMode>5</exif:MeteringMode>
   <exif:LightSource>0</exif:LightSource>
   <exif:FocalLength>880/100</exif:FocalLength>
   <exif:CustomRendered>0</exif:CustomRendered>
   <exif:ExposureMode>0</exif:ExposureMode>
   <exif:WhiteBalance>0</exif:WhiteBalance>
   <exif:DigitalZoomRatio>16/16</exif:DigitalZoomRatio>
   <exif:FocalLengthIn35mmFilm>24</exif:FocalLengthIn35mmFilm>
   <exif:SceneCaptureType>0</exif:SceneCaptureType>
   <exif:Contrast>0</exif:Contrast>
   <exif:Saturation>0</exif:Saturation>
   <exif:Sharpness>0</exif:Sharpness>
   <exif:DateTimeOriginal>2016-04-11T13:52:12</exif:DateTimeOriginal>
   <exif:ISOSpeedRatings>
    <rdf:Seq>
     <rdf:li>125</rdf:li>
    </rdf:Seq>
   </exif:ISOSpeedRatings>
   <exif:ExifVersion>0230</exif:ExifVersion>
   <exif:FlashpixVersion>0100</exif:FlashpixVersion>
   <exif:ComponentsConfiguration>
    <rdf:Seq>
     <rdf:li>1</rdf:li>
     <rdf:li>2</rdf:li>
     <rdf:li>3</rdf:li>
     <rdf:li>0</rdf:li>
    </rdf:Seq>
   </exif:ComponentsConfiguration>
   <exif:Flash rdf:parseType="Resource">
    <exif:Fired>False</exif:Fired>
    <exif:Return>0</exif:Return>
    <exif:Mode>2</exif:Mode>
    <exif:Function>False</exif:Function>
    <exif:RedEyeMode>False</exif:RedEyeMode>
   </exif:Flash>
   <exif:FileSource>3</exif:FileSource>
   <exif:SceneType>1</exif:SceneType>
  </rdf:Description>
  <rdf:Description rdf:about=""
    xmlns:dc="http://purl.org/dc/elements/1.1/">
   <dc:creator>
    <rdf:Seq>
     <rdf:li>lewis c levin</rdf:li>
    </rdf:Seq>
   </dc:creator>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>

Hi, I apologize for the lateness in my response, any chance I could get my
hands on the JPEG file in question?
On Fri, May 6, 2016 at 4:48 PM, lewisl<EMAIL_ADDRESS>wrote:

I've encountered a strange problem. exempi can't close a jpeg file. It is
one of several very similar files in the same directory. You'd suspect a
permissions problem but other files in the same directory can be written.
It could be a malformed jpeg for some reason or with bad embedded metadata.
But the mac app called photo meta edit.app can edit and create xmp fields
and successfully write and close the file.
But exempi can't. Here is the error message:
LFA_OpenRsrc: open failure
I have run through Python debugger. All of the following statements
conclude successfully:
xmp = xmpfile.get_xmp()
xmp.set_property(namespace, attr, value)
xmpfile.put_xmp(xmp)
The code fails at:
xmpfile.close_file()
Below I post the python function where I update and write the jpeg file.
Also, the state of the xmp metadata as modified by the code. It looks like
clean metadata, but maybe I am missing something.
All I can think is there is something just off about the file size so that
there is some awkward word boundary that hangs up exempi.
Sorry for the long post. Just wanted to include what I could to help
figure this out.
Here is my function:
def put_pic_metadata(fname, changes):
"""Write xmp metadata into an image file.  Requires Python XMP Library."""
result = True   # unless failure or exception, below
if changes:
    try:
        xmpfile = XMPFiles(file_path=fname, open_forupdate=True)
        xmp = xmpfile.get_xmp()  # load metadata as python dict of arrays
        for item in changes:
            prefix, attr = item[0].split(":")  # assign the 2 pieces
            namespace = xmp_namespaces[prefix]  # expand to url of namespace
            value = item[1]
            if xmpfile.can_put_xmp(xmp):
                try:
                    if isinstance(value, int):
                        xmp.set_property_int(namespace, attr, value)
                    elif isinstance(value, bool):
                        xmp.set_property_bool(namespace, attr, value)
                    else:
                        xmp.set_property(namespace, attr, value)

                    xmpfile.put_xmp(xmp)  # write it to disk
                except (TypeError, IOError):
                    print(item)
                    print(sys.exc_info()[0], "Failed to write", fname)
                    result = False  # Failure
            else:
                result = False  # failure
        xmpfile.close_file()
    except:   # untrappable errors from libxmp
        print("Could not open, write, or close:", fname)
        result = False

return result

Here is the xml:

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Exempi + XMP Core 5.1.2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
photoshop:DateCreated2016-04-11T13:52:12-07:00</photoshop:DateCreated>
photoshop:InstructionsC1 Edits</photoshop:Instructions>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
tiff:Orientation1</tiff:Orientation>
tiff:YCbCrPositioning2</tiff:YCbCrPositioning>
tiff:XResolution350/1</tiff:XResolution>
tiff:YResolution350/1</tiff:YResolution>
tiff:ResolutionUnit2</tiff:ResolutionUnit>
tiff:MakeSONY</tiff:Make>
tiff:ModelDSC-RX100M4</tiff:Model>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
xmp:CreatorToolDSC-RX100M4 v1.20</xmp:CreatorTool>
xmp:ModifyDate2016-04-11T13:52:12</xmp:ModifyDate>
xmp:CreateDate2016-04-11T13:52:12</xmp:CreateDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:exif="http://ns.adobe.com/exif/1.0/">
exif:ColorSpace1</exif:ColorSpace>
exif:CompressedBitsPerPixel5/1</exif:CompressedBitsPerPixel>
exif:PixelXDimension4864</exif:PixelXDimension>
exif:PixelYDimension3648</exif:PixelYDimension>
exif:ExposureTime1/800</exif:ExposureTime>
exif:FNumber56/10</exif:FNumber>
exif:ExposureProgram2</exif:ExposureProgram>
exif:BrightnessValue28934/2560</exif:BrightnessValue>
exif:ExposureBiasValue0/10</exif:ExposureBiasValue>
exif:MaxApertureValue434/256</exif:MaxApertureValue>
exif:MeteringMode5</exif:MeteringMode>
exif:LightSource0</exif:LightSource>
exif:FocalLength880/100</exif:FocalLength>
exif:CustomRendered0</exif:CustomRendered>
exif:ExposureMode0</exif:ExposureMode>
exif:WhiteBalance0</exif:WhiteBalance>
exif:DigitalZoomRatio16/16</exif:DigitalZoomRatio>
exif:FocalLengthIn35mmFilm24</exif:FocalLengthIn35mmFilm>
exif:SceneCaptureType0</exif:SceneCaptureType>
exif:Contrast0</exif:Contrast>
exif:Saturation0</exif:Saturation>
exif:Sharpness0</exif:Sharpness>
exif:DateTimeOriginal2016-04-11T13:52:12</exif:DateTimeOriginal>
exif:ISOSpeedRatings
rdf:Seq
rdf:li125</rdf:li>
</rdf:Seq>
</exif:ISOSpeedRatings>
exif:ExifVersion0230</exif:ExifVersion>
exif:FlashpixVersion0100</exif:FlashpixVersion>
exif:ComponentsConfiguration
rdf:Seq
rdf:li1</rdf:li>
rdf:li2</rdf:li>
rdf:li3</rdf:li>
rdf:li0</rdf:li>
</rdf:Seq>
</exif:ComponentsConfiguration>
<exif:Flash rdf:parseType="Resource">
exif:FiredFalse</exif:Fired>
exif:Return0</exif:Return>
exif:Mode2</exif:Mode>
exif:FunctionFalse</exif:Function>
exif:RedEyeModeFalse</exif:RedEyeMode>
</exif:Flash>
exif:FileSource3</exif:FileSource>
exif:SceneType1</exif:SceneType>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
dc:creator
rdf:Seq
rdf:lilewis c levin</rdf:li>
</rdf:Seq>
</dc:creator>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/57

--
John Evans

I am embarrassed to say I can’t repro it now.  I had made a copy of the errant file and at the time both the original and the copy produced the message.  I only edited the original with Photo Meta Edit so that could have only fixed the original.  Now, it all works (even after editing the xmp data and writing changes with an image editor.
So, nothing for now.
But, a related question:  I looked at the source code to see where you raise libxmp python conditions.  I can see the naming for the module but when I import it I don’t pick up the conditions.  So, I am unable to trap the specific conditions that can occur in libxmp or exempi (I suppose only the Python wrapper).
Thanks for the reply.
Lewis
On May 11, 2016, at 4:50 PM, John G Evans <notifications<EMAIL_ADDRESS>wrote:
Hi, I apologize for the lateness in my response, any chance I could get my
hands on the JPEG file in question?
On Fri, May 6, 2016 at 4:48 PM, lewisl <notifications<EMAIL_ADDRESS>wrote:

I've encountered a strange problem. exempi can't close a jpeg file. It is
one of several very similar files in the same directory. You'd suspect a
permissions problem but other files in the same directory can be written.
It could be a malformed jpeg for some reason or with bad embedded metadata.
But the mac app called photo meta edit.app can edit and create xmp fields
and successfully write and close the file.
But exempi can't. Here is the error message:
LFA_OpenRsrc: open failure
I have run through Python debugger. All of the following statements
conclude successfully:
xmp = xmpfile.get_xmp()
xmp.set_property(namespace, attr, value)
xmpfile.put_xmp(xmp)
The code fails at:
xmpfile.close_file()
Below I post the python function where I update and write the jpeg file.
Also, the state of the xmp metadata as modified by the code. It looks like
clean metadata, but maybe I am missing something.
All I can think is there is something just off about the file size so that
there is some awkward word boundary that hangs up exempi.
Sorry for the long post. Just wanted to include what I could to help
figure this out.
Here is my function:
def put_pic_metadata(fname, changes):
"""Write xmp metadata into an image file. Requires Python XMP Library."""
result = True # unless failure or exception, below
if changes:
try:
xmpfile = XMPFiles(file_path=fname, open_forupdate=True)
xmp = xmpfile.get_xmp() # load metadata as python dict of arrays
for item in changes:
prefix, attr = item[0].split(":") # assign the 2 pieces
namespace = xmp_namespaces[prefix] # expand to url of namespace
value = item[1]
if xmpfile.can_put_xmp(xmp):
try:
if isinstance(value, int):
xmp.set_property_int(namespace, attr, value)
elif isinstance(value, bool):
xmp.set_property_bool(namespace, attr, value)
else:
xmp.set_property(namespace, attr, value)
xmpfile.put_xmp(xmp) # write it to disk
except (TypeError, IOError):
print(item)
print(sys.exc_info()[0], "Failed to write", fname)
result = False # Failure
else:
result = False # failure
xmpfile.close_file()
except: # untrappable errors from libxmp
print("Could not open, write, or close:", fname)
result = False
return result
Here is the xml:

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Exempi + XMP Core 5.1.2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
photoshop:DateCreated2016-04-11T13:52:12-07:00</photoshop:DateCreated>
photoshop:InstructionsC1 Edits</photoshop:Instructions>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
tiff:Orientation1</tiff:Orientation>
tiff:YCbCrPositioning2</tiff:YCbCrPositioning>
tiff:XResolution350/1</tiff:XResolution>
tiff:YResolution350/1</tiff:YResolution>
tiff:ResolutionUnit2</tiff:ResolutionUnit>
tiff:MakeSONY</tiff:Make>
tiff:ModelDSC-RX100M4</tiff:Model>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
xmp:CreatorToolDSC-RX100M4 v1.20</xmp:CreatorTool>
xmp:ModifyDate2016-04-11T13:52:12</xmp:ModifyDate>
xmp:CreateDate2016-04-11T13:52:12</xmp:CreateDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:exif="http://ns.adobe.com/exif/1.0/">
exif:ColorSpace1</exif:ColorSpace>
exif:CompressedBitsPerPixel5/1</exif:CompressedBitsPerPixel>
exif:PixelXDimension4864</exif:PixelXDimension>
exif:PixelYDimension3648</exif:PixelYDimension>
exif:ExposureTime1/800</exif:ExposureTime>
exif:FNumber56/10</exif:FNumber>
exif:ExposureProgram2</exif:ExposureProgram>
exif:BrightnessValue28934/2560</exif:BrightnessValue>
exif:ExposureBiasValue0/10</exif:ExposureBiasValue>
exif:MaxApertureValue434/256</exif:MaxApertureValue>
exif:MeteringMode5</exif:MeteringMode>
exif:LightSource0</exif:LightSource>
exif:FocalLength880/100</exif:FocalLength>
exif:CustomRendered0</exif:CustomRendered>
exif:ExposureMode0</exif:ExposureMode>
exif:WhiteBalance0</exif:WhiteBalance>
exif:DigitalZoomRatio16/16</exif:DigitalZoomRatio>
exif:FocalLengthIn35mmFilm24</exif:FocalLengthIn35mmFilm>
exif:SceneCaptureType0</exif:SceneCaptureType>
exif:Contrast0</exif:Contrast>
exif:Saturation0</exif:Saturation>
exif:Sharpness0</exif:Sharpness>
exif:DateTimeOriginal2016-04-11T13:52:12</exif:DateTimeOriginal>
exif:ISOSpeedRatings
rdf:Seq
rdf:li125</rdf:li>
</rdf:Seq>
</exif:ISOSpeedRatings>
exif:ExifVersion0230</exif:ExifVersion>
exif:FlashpixVersion0100</exif:FlashpixVersion>
exif:ComponentsConfiguration
rdf:Seq
rdf:li1</rdf:li>
rdf:li2</rdf:li>
rdf:li3</rdf:li>
rdf:li0</rdf:li>
</rdf:Seq>
</exif:ComponentsConfiguration>
<exif:Flash rdf:parseType="Resource">
exif:FiredFalse</exif:Fired>
exif:Return0</exif:Return>
exif:Mode2</exif:Mode>
exif:FunctionFalse</exif:Function>
exif:RedEyeModeFalse</exif:RedEyeMode>
</exif:Flash>
exif:FileSource3</exif:FileSource>
exif:SceneType1</exif:SceneType>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
dc:creator
rdf:Seq
rdf:lilewis c levin</rdf:li>
</rdf:Seq>
</dc:creator>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/57

--
John Evans
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/57#issuecomment-218623221

You may be seeing messages raised by the exempi library itself, e.g. the
message you originally mention, ``LFA_OpenRsrc``` is raised by the
libexempi library.
On Wed, May 11, 2016 at 9:11 PM, lewisl<EMAIL_ADDRESS>wrote:

I am embarrassed to say I can’t repro it now. I had made a copy of the
errant file and at the time both the original and the copy produced the
message. I only edited the original with Photo Meta Edit so that could have
only fixed the original. Now, it all works (even after editing the xmp data
and writing changes with an image editor.
So, nothing for now.
But, a related question: I looked at the source code to see where you
raise libxmp python conditions. I can see the naming for the module but
when I import it I don’t pick up the conditions. So, I am unable to trap
the specific conditions that can occur in libxmp or exempi (I suppose only
the Python wrapper).
Thanks for the reply.
Lewis
On May 11, 2016, at 4:50 PM, John G Evans<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Hi, I apologize for the lateness in my response, any chance I could get my
hands on the JPEG file in question?
On Fri, May 6, 2016 at 4:48 PM, lewisl<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

I've encountered a strange problem. exempi can't close a jpeg file. It
is
one of several very similar files in the same directory. You'd suspect a
permissions problem but other files in the same directory can be
written.
It could be a malformed jpeg for some reason or with bad embedded
metadata.
But the mac app called photo meta edit.app can edit and create xmp
fields
and successfully write and close the file.
But exempi can't. Here is the error message:
LFA_OpenRsrc: open failure
I have run through Python debugger. All of the following statements
conclude successfully:
xmp = xmpfile.get_xmp()
xmp.set_property(namespace, attr, value)
xmpfile.put_xmp(xmp)
The code fails at:
xmpfile.close_file()
Below I post the python function where I update and write the jpeg file.
Also, the state of the xmp metadata as modified by the code. It looks
like
clean metadata, but maybe I am missing something.
All I can think is there is something just off about the file size so
that
there is some awkward word boundary that hangs up exempi.
Sorry for the long post. Just wanted to include what I could to help
figure this out.
Here is my function:
def put_pic_metadata(fname, changes):
"""Write xmp metadata into an image file. Requires Python XMP
Library."""
result = True # unless failure or exception, below
if changes:
try:
xmpfile = XMPFiles(file_path=fname, open_forupdate=True)
xmp = xmpfile.get_xmp() # load metadata as python dict of arrays
for item in changes:
prefix, attr = item[0].split(":") # assign the 2 pieces
namespace = xmp_namespaces[prefix] # expand to url of namespace
value = item[1]
if xmpfile.can_put_xmp(xmp):
try:
if isinstance(value, int):
xmp.set_property_int(namespace, attr, value)
elif isinstance(value, bool):
xmp.set_property_bool(namespace, attr, value)
else:
xmp.set_property(namespace, attr, value)
xmpfile.put_xmp(xmp) # write it to disk
except (TypeError, IOError):
print(item)
print(sys.exc_info()[0], "Failed to write", fname)
result = False # Failure
else:
result = False # failure
xmpfile.close_file()
except: # untrappable errors from libxmp
print("Could not open, write, or close:", fname)
result = False
return result
Here is the xml:

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Exempi + XMP Core 5.1.2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/">
photoshop:DateCreated2016-04-11T13:52:12-07:00</photoshop:DateCreated>
photoshop:InstructionsC1 Edits</photoshop:Instructions>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:tiff="http://ns.adobe.com/tiff/1.0/">
tiff:Orientation1</tiff:Orientation>
tiff:YCbCrPositioning2</tiff:YCbCrPositioning>
tiff:XResolution350/1</tiff:XResolution>
tiff:YResolution350/1</tiff:YResolution>
tiff:ResolutionUnit2</tiff:ResolutionUnit>
tiff:MakeSONY</tiff:Make>
tiff:ModelDSC-RX100M4</tiff:Model>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
xmp:CreatorToolDSC-RX100M4 v1.20</xmp:CreatorTool>
xmp:ModifyDate2016-04-11T13:52:12</xmp:ModifyDate>
xmp:CreateDate2016-04-11T13:52:12</xmp:CreateDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:exif="http://ns.adobe.com/exif/1.0/">
exif:ColorSpace1</exif:ColorSpace>
exif:CompressedBitsPerPixel5/1</exif:CompressedBitsPerPixel>
exif:PixelXDimension4864</exif:PixelXDimension>
exif:PixelYDimension3648</exif:PixelYDimension>
exif:ExposureTime1/800</exif:ExposureTime>
exif:FNumber56/10</exif:FNumber>
exif:ExposureProgram2</exif:ExposureProgram>
exif:BrightnessValue28934/2560</exif:BrightnessValue>
exif:ExposureBiasValue0/10</exif:ExposureBiasValue>
exif:MaxApertureValue434/256</exif:MaxApertureValue>
exif:MeteringMode5</exif:MeteringMode>
exif:LightSource0</exif:LightSource>
exif:FocalLength880/100</exif:FocalLength>
exif:CustomRendered0</exif:CustomRendered>
exif:ExposureMode0</exif:ExposureMode>
exif:WhiteBalance0</exif:WhiteBalance>
exif:DigitalZoomRatio16/16</exif:DigitalZoomRatio>
exif:FocalLengthIn35mmFilm24</exif:FocalLengthIn35mmFilm>
exif:SceneCaptureType0</exif:SceneCaptureType>
exif:Contrast0</exif:Contrast>
exif:Saturation0</exif:Saturation>
exif:Sharpness0</exif:Sharpness>
exif:DateTimeOriginal2016-04-11T13:52:12</exif:DateTimeOriginal>
exif:ISOSpeedRatings
rdf:Seq
rdf:li125</rdf:li>
</rdf:Seq>
</exif:ISOSpeedRatings>
exif:ExifVersion0230</exif:ExifVersion>
exif:FlashpixVersion0100</exif:FlashpixVersion>
exif:ComponentsConfiguration
rdf:Seq
rdf:li1</rdf:li>
rdf:li2</rdf:li>
rdf:li3</rdf:li>
rdf:li0</rdf:li>
</rdf:Seq>
</exif:ComponentsConfiguration>
<exif:Flash rdf:parseType="Resource">
exif:FiredFalse</exif:Fired>
exif:Return0</exif:Return>
exif:Mode2</exif:Mode>
exif:FunctionFalse</exif:Function>
exif:RedEyeModeFalse</exif:RedEyeMode>
</exif:Flash>
exif:FileSource3</exif:FileSource>
exif:SceneType1</exif:SceneType>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
dc:creator
rdf:Seq
rdf:lilewis c levin</rdf:li>
</rdf:Seq>
</dc:creator>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/57

--
John Evans
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub<
https://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/57#issuecomment-218623221>
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/57#issuecomment-218634083

--
John Evans

Closing due to age and reproducibility issues, @lewisl please feel free to reopen with additional information that would help reproduce the issue.


Introduce noopCallback

We often use unsafeMkCallbackFn in client code to wrap noop functions. This exposes a function that does that wrapping so that we can remove calls to the unsafe function in client code

Why not just use noop from lodash?

Why not just use noop from lodash?

Do you mean in client code or in this PR? It's a pretty simple (the simplest?) function so I didn't really see the need to add a reference to lodash here

I meant in the client code and as a result not needing noopCallback.

I meant in the client code and as a result not needing noopCallback.

noop doesn't have the right type to be used as CallbackFn- you still need to do unsafeMkCallback(noop). I want clients to avoid needing to use the unsafe function unless absolutely necessary.


Script hangs when calling test with have_errors

Any help would be greatly appreciated.
Firstly, I think I might be hitting issue#623 and/or issue#670, which in turn could lead to my observation of hanging. I have quarantined all the tests that quite consistently fail into https://github.com/alaghu/learn_jquery/blob/webkit_tests_have_error_failing/spec/features/to_not_have_errors_spec.rb
Next, here are my configurations.
Mac : 10.11.1 (15B42)
qt5 5.5.1
Gems installed
gem 'rspec-rails', '3.3.3'

gem 'capybara', '2.5.0'

gem 'capybara-webkit', '1.7.1'
Thirdly, it is hanging quite consistently in my mac but have never seen it hang in travis-ci (https://travis-ci.org/alaghu/learn_jquery/builds/91538832).
hanging.
You can view my changes https://github.com/alaghu/learn_jquery/compare/webkit_tests_have_error_failing. When I run
Anand:learn_jquery/ (webkit_tests_have_error_failing) $ rspec spec/features/to_not_have_errors_spec.rb                                              [22:44:57]
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's default settings.
Finished "EnableLogging()" with response "Success()"
Wrote response true ""
Received "SetTimeout(-1)"
Started "SetTimeout(-1)"
Finished "SetTimeout(-1)" with response "Success()"
Wrote response true ""
Received "Visit(http://<IP_ADDRESS>:49740/)"
Started "Visit(http://<IP_ADDRESS>:49740/)"
Load started
"Visit(http://<IP_ADDRESS>:49740/)" started page load
Started request to "http://<IP_ADDRESS>:49740/"
Finished "Visit(http://<IP_ADDRESS>:49740/)" with response "Success()"
Started request to "http://<IP_ADDRESS>:49740/assets/application.css"
Started request to "http://<IP_ADDRESS>:49740/assets/home_index.css"
Started request to "http://<IP_ADDRESS>:49740/assets/application.js"
Started request to "http://<IP_ADDRESS>:49740/assets/home_index.js"
Received 200 from "http://<IP_ADDRESS>:49740/"
Received 200 from "http://<IP_ADDRESS>:49740/assets/application.css"
Received 200 from "http://<IP_ADDRESS>:49740/assets/application.js"
Received 200 from "http://<IP_ADDRESS>:49740/assets/home_index.css"
Received 200 from "http://<IP_ADDRESS>:49740/assets/home_index.js"
Page finished with true
Load finished
Page load from command finished
Wrote response true ""
Received "ConsoleMessages()"
Started "ConsoleMessages()"
Finished "ConsoleMessages()" with response "Success([])"
Wrote response true "[]"
Received "Reset()"
Started "Reset()"
Finished "Reset()" with response "Success()"
Wrote response true ""
Received "EnableLogging()"
Started "EnableLogging()"
Finished "EnableLogging()" with response "Success()"
Wrote response true ""
Received "SetTimeout(-1)"
Started "SetTimeout(-1)"
Finished "SetTimeout(-1)" with response "Success()"
Wrote response true ""
Received "FindXpath(/html/body/)"
Started "FindXpath(/html/body/)"
Finished "FindXpath(/html/body/)" with response "Success()"
Wrote response true ""
.Received "Visit(http://<IP_ADDRESS>:49740/)"
Started "Visit(http://<IP_ADDRESS>:49740/)"
Load started
"Visit(http://<IP_ADDRESS>:49740/)" started page load
Started request to "http://<IP_ADDRESS>:49740/"
Finished "Visit(http://<IP_ADDRESS>:49740/)" with response "Success()"
Received 304 from "http://<IP_ADDRESS>:49740/"
Started request to "http://<IP_ADDRESS>:49740/assets/application.css"
Started request to "http://<IP_ADDRESS>:49740/assets/home_index.css"
Started request to "http://<IP_ADDRESS>:49740/assets/application.js"
Started request to "http://<IP_ADDRESS>:49740/assets/home_index.js"
Received 304 from "http://<IP_ADDRESS>:49740/assets/application.css"
Received 304 from "http://<IP_ADDRESS>:49740/assets/home_index.css"
Received 304 from "http://<IP_ADDRESS>:49740/assets/application.js"
Received 304 from "http://<IP_ADDRESS>:49740/assets/home_index.js"
Page finished with true
Load finished
Page load from command finished
Wrote response true ""
Received "FindXpath(.//a[./@href][(((./@id = 'Can you book my intro?' or normalize-space(string(.)) = 'Can you book my intro?') or ./@title = 'Can you book my intro?') or .//img[./@alt = 'Can you book my intro?'])] | .//input[./@type = 'submit' or ./@type = 'reset' or ./@type = 'image' or ./@type = 'button'][((./@id = 'Can you book my intro?' or ./@value = 'Can you book my intro?') or ./@title = 'Can you book my intro?')] | .//input[./@type = 'image'][./@alt = 'Can you book my intro?'] | .//button[(((./@id = 'Can you book my intro?' or ./@value = 'Can you book my intro?') or normalize-space(string(.)) = 'Can you book my intro?') or ./@title = 'Can you book my intro?')] | .//input[./@type = 'image'][./@alt = 'Can you book my intro?'])"
Started "FindXpath(.//a[./@href][(((./@id = 'Can you book my intro?' or normalize-space(string(.)) = 'Can you book my intro?') or ./@title = 'Can you book my intro?') or .//img[./@alt = 'Can you book my intro?'])] | .//input[./@type = 'submit' or ./@type = 'reset' or ./@type = 'image' or ./@type = 'button'][((./@id = 'Can you book my intro?' or ./@value = 'Can you book my intro?') or ./@title = 'Can you book my intro?')] | .//input[./@type = 'image'][./@alt = 'Can you book my intro?'] | .//button[(((./@id = 'Can you book my intro?' or ./@value = 'Can you book my intro?') or normalize-space(string(.)) = 'Can you book my intro?') or ./@title = 'Can you book my intro?')] | .//input[./@type = 'image'][./@alt = 'Can you book my intro?'])"
Finished "FindXpath(.//a[./@href][(((./@id = 'Can you book my intro?' or normalize-space(string(.)) = 'Can you book my intro?') or ./@title = 'Can you book my intro?') or .//img[./@alt = 'Can you book my intro?'])] | .//input[./@type = 'submit' or ./@type = 'reset' or ./@type = 'image' or ./@type = 'button'][((./@id = 'Can you book my intro?' or ./@value = 'Can you book my intro?') or ./@title = 'Can you book my intro?')] | .//input[./@type = 'image'][./@alt = 'Can you book my intro?'] | .//button[(((./@id = 'Can you book my intro?' or ./@value = 'Can you book my intro?') or normalize-space(string(.)) = 'Can you book my intro?') or ./@title = 'Can you book my intro?')] | .//input[./@type = 'image'][./@alt = 'Can you book my intro?'])" with response "Success(1)"
Wrote response true "1"
Received "Node.visible"
Started "Node.visible"
Finished "Node.visible" with response "Success(true)"
Wrote response true "true"
Received "Node.tagName"
Started "Node.tagName"
Finished "Node.tagName" with response "Success(a)"
Wrote response true "a"
Received "Node.leftClick"
Started "Node.leftClick"
Started request to "http://<IP_ADDRESS>:49740/book/intro"
Finished "Node.leftClick" with response "Success()"
Wrote response true ""
Received "ConsoleMessages()"
Started "ConsoleMessages()"
Finished "ConsoleMessages()" with response "Success([])"
Wrote response true "[]"
Received "Reset()"
Started "Reset()"
Aborting request to "http://<IP_ADDRESS>:49740/book/intro"
Received 0 from "http://<IP_ADDRESS>:49740/book/intro"
Finished "Reset()" with response "Success()"
Wrote response true ""
Load started
Started request to "http://<IP_ADDRESS>:49740/book/intro"
Started request to "http://<IP_ADDRESS>:49740/book/intro"
Received 0 from "http://<IP_ADDRESS>:49740/book/intro"
Received "EnableLogging()"
Started "EnableLogging()"
Finished "EnableLogging()" with response "Success()"
Wrote response true ""
Received "SetTimeout(-1)"
Started "SetTimeout(-1)"
Finished "SetTimeout(-1)" with response "Success()"
Wrote response true ""
Received "FindXpath(/html/body/)"
Started "FindXpath(/html/body/)"
Finished "FindXpath(/html/body/)" with response "Success()"
Wrote response true ""
.Received "Visit(http://<IP_ADDRESS>:49740/)"
Started "Visit(http://<IP_ADDRESS>:49740/)"
Started request to "http://<IP_ADDRESS>:49740/"
Finished "Visit(http://<IP_ADDRESS>:49740/)" with response "Success()"
Wrote response true ""
Received "FindXpath(.//a[./@href][(((./@id = 'A selection of books!' or normalize-space(string(.)) = 'A selection of books!') or ./@title = 'A selection of books!') or .//img[./@alt = 'A selection of books!'])] | .//input[./@type = 'submit' or ./@type = 'reset' or ./@type = 'image' or ./@type = 'button'][((./@id = 'A selection of books!' or ./@value = 'A selection of books!') or ./@title = 'A selection of books!')] | .//input[./@type = 'image'][./@alt = 'A selection of books!'] | .//button[(((./@id = 'A selection of books!' or ./@value = 'A selection of books!') or normalize-space(string(.)) = 'A selection of books!') or ./@title = 'A selection of books!')] | .//input[./@type = 'image'][./@alt = 'A selection of books!'])"
"TimeoutCommand" waiting for load to finish
Received 304 from "http://<IP_ADDRESS>:49740/"
Started request to "http://<IP_ADDRESS>:49740/assets/application.css"
Started request to "http://<IP_ADDRESS>:49740/assets/home_index.css"
Started request to "http://<IP_ADDRESS>:49740/assets/application.js"
Started request to "http://<IP_ADDRESS>:49740/assets/home_index.js"
Received 304 from "http://<IP_ADDRESS>:49740/assets/application.css"
Received 304 from "http://<IP_ADDRESS>:49740/assets/home_index.css"
Received 304 from "http://<IP_ADDRESS>:49740/assets/application.js"
Received 304 from "http://<IP_ADDRESS>:49740/assets/home_index.js"
Page finished with true

Hi ,
Any updates?

Is there anything in your development server log that indicates the requests are finishing?
I can try and clone the application and poke around, but I'm not sure when I'll have time to do so.

Hi,
I have pushed changes to https://github.com/alaghu/learn_jquery/tree/webkit_tests_have_error_failing that now only has three tests. Each of these tests have "have_errors" check.
Failure case
here is the output for a failure case for rpsec https://gist.github.com/alaghu/b6e4a6bf7e3c42a37108
here is the log file of the same run https://gist.github.com/alaghu/28fb1c58c2d8cc315207
Pass Case
here is the output for a pass case for rpsec https://gist.github.com/alaghu/1af08ffe153c737be7a7
here is the log file of the same run https://gist.github.com/alaghu/dcfaaa986e9f75479ea4
Thank you in advance to look into this. Appreciate your help.

@alaghu thanks for putting together those test cases. I'll take a look at those as soon as I can. Unfortunately, my schedule is pretty packed right now, and I can't promise I'll be able to look at them for another week or so.

Hi @jferris , not a problem. Thank you for looking into this.

Closing due to age - if this is still an issue with current releases we can reopen


Add an API concepts document and describe terminology and API chunking

Create a new API reference page that covers some high level topics

terminology, paths, verbs, watching resources, chunking, and content
type negotation.

Needed a place to define chunking, and we don't have a doc for it.
@kubernetes/sig-api-machinery-api-reviews
Covers kubernetes/features#365

This change is

@kubernetes/api-reviewers a new high level API doc for the public docs so I had someplace to document chunking.

Updated with nits fixed.

Any other reviewers have comments?


[SPARK-40850][SQL] Fix test case interpreted queries may execute Codegen

What changes were proposed in this pull request?
Fix CodegenInterpretedPlanTest always will execute Codegen even set spark.sql.codegen.factoryMode to NO_CODEGEN. We should set spark.sql.codegen.wholeStage to false too.

Why are the changes needed?
Fix test case

Does this PR introduce any user-facing change?
No

How was this patch tested?
Add breakpoint on WholeStageCodegenExec::doConsume. Even set spark.sql.codegen.factoryMode to NO_CODEGEN, the WholeStageCodegenExec::doConsume also will be executed. When set spark.sql.codegen.wholeStage to false, the logic will skip.

cc @HyukjinKwon @MaxGekk

cc @holdenk

@Hisoka-X How about other places, like:
https://github.com/apache/spark/blob/f26bdb7bfde56e4856a2f962162f204ba2dbb1c1/sql/core/src/test/scala/org/apache/spark/sql/errors/QueryExecutionErrorsSuite.scala#L81
Could you re-check them too, please ... or open an JIRA if you don't have time.

+1, LGTM. Merging to master.
Thank you, @Hisoka-X.

Thanks @MaxGekk


feat: barretenberg doxygen CI

First pass on doxygen CI. This is now uploading files to S3 based on running doxygen on the barretenberg codebase.

It's mostly a listing of everything's signature + source, and a few pieces of documentation. We can figure out a documentation plan from here
This needs to actually be pointed somewhere to be meaningful right now, but lives here https://s3.console.aws.amazon.com/s3/buckets/aztec-ci-artifacts?region=us-east-2&prefix=barretenberg-doxygen/3f0fad0de81d472cf71c03df11cf01ed6e7e09e0/&showversions=false

Benchmark results
Metrics with a significant change:

circuit_simulation_time_in_ms (public-kernel-private-input): 202 (+17%)
circuit_simulation_time_in_ms (public-kernel-non-first-iteration): 200 (+17%)
circuit_input_size_in_bytes (private-kernel-ordering): 30,953 (+20%)
circuit_input_size_in_bytes (public-kernel-private-input): 31,891 (+27%)
circuit_input_size_in_bytes (public-kernel-non-first-iteration): 31,933 (+26%)
circuit_output_size_in_bytes (private-kernel-init): 25,561 (+25%)
circuit_output_size_in_bytes (private-kernel-ordering): 14,809 (+53%)
circuit_output_size_in_bytes (private-kernel-inner): 25,561 (+25%)
circuit_output_size_in_bytes (public-kernel-private-input): 25,561 (+25%)
circuit_output_size_in_bytes (public-kernel-non-first-iteration): 25,561 (+25%)
tx_size_in_bytes (0): 15,487 (+50%)
tx_size_in_bytes (1): 31,879 (+21%)
l2_block_public_tx_process_time_in_ms (8): 4,261 (+20%)
l2_block_public_tx_process_time_in_ms (32): 16,928 (+21%)
l2_block_public_tx_process_time_in_ms (128): 67,833 (+21%)
note_trial_decrypting_time_in_ms (8): 80.5 (+76%)

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Values are compared against data from master at commit ec2e36e6 and shown if the difference exceeds 1%.
L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
8 txs
32 txs
128 txs

l1_rollup_calldata_size_in_bytes
45,444
179,588
716,132

l1_rollup_calldata_gas
223,032
868,412
3,448,256

l1_rollup_execution_gas
867,141
3,746,465
23,305,021

l2_block_processing_time_in_ms
1,368 (+4%)
5,251 (+4%)
21,042 (-1%)

note_successful_decrypting_time_in_ms
370 (+10%)
1,128 (-3%)
4,114 (+8%)

note_trial_decrypting_time_in_ms
:warning: 80.5 (+76%)
39.4 (+8%)
139 (-5%)

l2_block_building_time_in_ms
14,842 (+6%)
59,024 (+6%)
238,512 (+6%)

l2_block_rollup_simulation_time_in_ms
10,548 (+1%)
42,020 (+1%)
170,404 (+1%)

l2_block_public_tx_process_time_in_ms
:warning: 4,261 (+20%)
:warning: 16,928 (+21%)
:warning: 67,833 (+21%)

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric
5 blocks
10 blocks

node_history_sync_time_in_ms
15,097
28,816 (-1%)

note_history_successful_decrypting_time_in_ms
2,898 (+15%)
5,441 (+10%)

note_history_trial_decrypting_time_in_ms
116 (+46%)
151 (-32%)

node_database_size_in_bytes
3,615,795
3,732,461

pxe_database_size_in_bytes
29,923
59,478

Circuits stats
Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit
circuit_simulation_time_in_ms
circuit_input_size_in_bytes
circuit_output_size_in_bytes

private-kernel-init
210 (+5%)
44,709 (+4%)
:warning: 25,561 (+25%)

private-kernel-ordering
136 (+18%)
:warning: 30,953 (+20%)
:warning: 14,809 (+53%)

base-rollup
1,076 (+1%)
128,374 (+4%)
881

root-rollup
82.2
4,088
889

private-kernel-inner
287 (+10%)
71,236 (+10%)
:warning: 25,561 (+25%)

public-kernel-private-input
:warning: 202 (+17%)
:warning: 31,891 (+27%)
:warning: 25,561 (+25%)

public-kernel-non-first-iteration
:warning: 200 (+17%)
:warning: 31,933 (+26%)
:warning: 25,561 (+25%)

merge-rollup
9.65
2,608
881

Miscellaneous
Transaction sizes based on how many contracts are deployed in the tx.

Metric
0 deployed contracts
1 deployed contracts

tx_size_in_bytes
:warning: 15,487 (+50%)
:warning: 31,879 (+21%)


Is it possible to define a global loader function using generouted with react-router?

Basically, I want to protect my routes and Loader seems the best way to do it, just wondering is it possible to define the loader once and re-use it across routes? Thanks for the library! Great work 👍
export async function Loader() {
	try {
		const data = await trpcClient.authTestRouter.session.fetch()

		const user: User = {
			...data,
		}
		return { user }
	} catch (error) {
		return new Response('Unauthorized', {
			status: 302,
			headers: { location: '/auth/sign-up' },
		})
	}
}

@atresnjo Yes, that's possible. You can define this Loader as a global Loader by adding it to the src/pages/_app.tsx layout file similar to the global Pending and Catch defined in this react-router example.
If you need a Loader at a smaller scope, you can add it to a parent regular layout or a pathless layout group.
Hope that helps!


Updating Details for the SyncPlay.SyncPlay manifest

Folder and file is being renamed.

Microsoft Reviewers: Open in CodeFlow

It look like this one need to seperate.


Gleam modules are not compiled to beam when using gleam v0.25.0

When using gleam v0.25.0 the erlang code generated by gleam is not compiled later in the compilation stages when using mix tasks. As a result gleam modules are not available at runtime. I suspect it is caused by the change of output directory for the erlang code produced by gleam https://github.com/gleam-lang/gleam/commit/b35ecd3c58b9ca4448392837c4ffe70c877d0b57#diff-bab1783d97666c826f55924d7d1dc3f73c005ddd445b14c77ce2e52880fcdb64R5.
Changing :erlc_paths in mix.exs to ["build/dev/erlang/#{@app}/_gleam_artefacts"] works as a fix for modules of current application but the dependencies are still not available.

Thanks for the report! Let's get this fixed


Automatic metadata

The original pr could be found at #105. The branch is moved from my fork to the upstream repo.

Thanks, @luwol03 and @GogoVega for cooperation!


IR Camera not working after Windows 10 update

My IR Camera isnt working anymore after Windows 10 Update. Everything is plugged in right and the camera status led and its ir led are on but when i start the videotrackercalibrationutility.exe its not detecting the beacons (with numbers). OSVR server wont let me do the calibration also.

Isn't this the known webcam breakage caused by the Win 10 Anniversary update?
http://arstechnica.com/information-technology/2016/08/windows-10-anniversary-update-breaks-most-webcams/


Move build-base to the build dir in GCR

Let's put all knative/build images together, it's cleaner.
Part of https://github.com/knative/test-infra/issues/161
Bonus: separate building and pushing the base images, so you can safely use --nopublish.

/lgtm
/approve

Oh, I have to push the base images to the new place for the integration tests to work... @ImJasonH the E2E tests shouldn't rely on these base images, right?

Base image pushed.
/retest


leaflet v1.0.2 - clickable has been replaced with interactive

With leaflet v1.0.0 clickable has been replaced with interactive, see https://github.com/Leaflet/Leaflet/pull/2838 - minimap anyway still uses clickable:
aimingRectOptions: {color: '#ff7800', weight: 1, clickable: false},
shadowRectOptions: {color: '#000000', weight: 1, clickable: false, opacity: 0, fillOpacity: 0},
...
this.options.aimingRectOptions.clickable = false;
this.options.shadowRectOptions.clickable = false;

I see! Looking at the demo now I notice that the hover hand has indeed started appearing over the aiming rectangle.  Should be a quick fix.

Fixed by #144


Concrete idents: per-backend name policies & reserved words for F*

Inspecting a concrete ident is now done up to a name policy.
For now, a name policy only consists in a set of reserved words that should be escaped.
(this was required for dealing --in F*-- with an argument named val in the new chacha20)

bors r+


[Draft]: Specify database backend to use

Based on suggestions provided here - https://github.com/RealOrangeOne/django-tasks/issues/38. I went ahead with implementing the solution using django routers. This is a draft PR, just wanted to get a go-ahead on the approach before I can proceed to actually implementing it completely.

Using a router is definitely the right way to go about it. There definitely need to be some tests to confirm it works correctly.
I'll admit, the database configuration in the tests for this project are a little complex, but just using SQLite in memory for the second ought to be fine, since the rest of the database setup is tested elsewhere.


adds source epoch to ipxe build for reproducibility

Issue #, if available:
Description of changes:
Set build time based on the ipxedust repo commit timestamp to make builds reproducible.
Going to keep boots set to ignore checksums because updating boots due to a update in ipxe will get a bit problematic.  I started to code out a way for the boots presubmit to build ipxe and then use it so that we can use presubmits to validate checksums like we do for other projects.  That would have made it so whenever ipxe changes the boots pre would fail, cluing us into the need to update the checksum.  The issue is that the boots bin, both the amd and the arm, needs to include the amd and arm versions of ipxe.  We do not have a good way to build both arm and amd in the same prow job so we could build just the amd or just arm, depending on the job, but that means we would have an out of date version of the other which would affect the checksum anyway.
I think this is a fine trade off. We can validate the checksums in ipxe and ignore them in boots.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/hold

/test all

/test all

/unhold

/test all


pt to px

Coverage remained the same at 100.0% when pulling 1278b2839b25ea650d07860b418752317fcb82ee on patch into 53bd9f919d7cfeecbab2748d938ea8d05a053a5e on master.


Tabbing howdy command does not list full features

Linux distribution: Ubuntu 20.04
Howdy version: 2.6.0
sudo howdy version is not present after entering the 'tab' on sudo howdy

Good catch, outdated opts in the autocomplete script


[Card] Add onClick prop and focus style

Description

Add onClick prop to Card
Add keyboard support (enter & space)
Add cursor style when onClick is provided
Add focus style
Update snapshots

Closes #194
Motivation and context

Consumers sometimes need their users to be able to click the entire Card.
How to test

cd mineral-ui/packages/card && npm start
Find the With onClick example
Click the Card
Click and hold on the Card then drag your mouse off and release (or find some other way to focus it)

Press Enter
Press Space

Check the console for the event being logged

Types of changes

New feature (non-breaking change which adds functionality)

Checklist

[x] Renders and functions properly in all supported browsers
[x] Automated tests written and passing
[x] Accessibility and inclusivity considered
[x] Rendering performance (initial load time & 60fps) and perceived performance considered
[x] Documentation created or updated

How does this PR make you feel?

All comments addressed.


is it possible to dump the script with the game object

It would be sweet to have a game object with all attached mono-scripts instead of having all missing scripts?
Hope we could have this support
Thanks

It works for Mono. IL2Cpp isn't supported yet.


Include interface that config DropwizardServers#configure can use to get stacktracePropagation setting

To make this:
DropwizardServers.configure(env, config, USER_AGENT, true);

into this
DropwizardServers.configure(env, config, USER_AGENT);

And now everybody doesn't have to choose a different config name to put this on

I think generally we don't want users to enable stacktrace propagation.

For integration testing it's quite nice

I don't quite understand what the ask is here, sorry

At the moment its up to every product to come up with a different name in their configuration.yml for what they call the ability to turn on or off stack trace propagation. If you require that the user's dropwizard config extends an interface then you control what the user has to call this so its the same across everything.

We do not want anyone to make this configurable – I'm tempted for us to force it to false at this point, actually.

It makes circle debugging sad :( but sure


[Application] OS.js IDE/Interface Designer

I have been experimenting with this in the past, but the API is now starting to get really solid so further development can resume.

[x] Create Application
[x] Create UI Window
[x] Create Preview Window
[x] Insertion of elements (drag and drop)
[ ] Add support for all GUI Elements
[ ] Support for GUI Element property setting/getting
[ ] Moving already inserted elements
[x] Deletion of currently selected element
[ ] Create spec on how to make "scheme" files (like Glade)
[ ] Create Window abstraction for the "scheme" files
[ ] Add scheme support to preloading

@junland :)

:+1: Nice. Good job! @andersevenrud

Blocked by #136

I'm closing this for now. Will reopen after gui-ng is finished

GUI-NG is finshed.

But I still don't have enough feedback to actaually call it finished :(

@ComputeLinux I was just about to look into this... and it seems I have deleted what I made earlier and there is no record of it on github :( So I have to start over... but not to worry, I'm on the case :)

@ComputeLinux I've started on this again and this time it will be in it's own repo: https://github.com/andersevenrud/OS.js-v2-IDE So follow the progress there :)

@ComputeLinux I will now re-open this issue. I have made quite some progress this weekend :)

I am closing this issue now because there is a working version in https://github.com/os-js/OS.js-development that you can now use. It's not finished, but you can design your UI with it :)

For anyone interested, here is a demo: https://www.youtube.com/watch?v=qPhBpkbeZBU


Ability to access 'canUndo' and 'canRedo' from vuex state

As-Is
The plugin determines if the state of the store is "undo-able" or "redo-able" internally when subscribing to the undo and redo actions.
To-Be
The application state (i.e. vuex store) should be aware whether an undo or redo is possible. This will allow UI controls (e.g. buttons) to be enabled/disabled accordingly.

Resolved from version 1.0.0
https://github.com/andrewbeng89/undo-redo-vuex#accessing-canundo-and-canredo-properties


Switch to Vue.js v3

Fixes #183
Changes proposed in this pull request:

moving codebase to Vue 3 with only most necessary changes.
update lock plugin (https://github.com/snapshot-labs/lock/pull/5)
update vue3-jazzicon package (published by me) (https://www.npmjs.com/package/vue3-jazzicon, https://github.com/samuveth/vue3-jazzicon/blob/main/README.md)

Search seem to be broken

When i do a vote, i got triggered twice to sign a message on Metamask, can you reproduce that issue? You can try a vote here: https://bafybeiegqll6nacfqzpcucuakti6c5bwcleqphnk6gz2mbm55nwyoaagbq.on.fleek.co/#/dai/proposal/QmSjEBnZsSGL7CLRQyEbZ8U7jz2Fi8AqDzjjFd6jQSxuYa

Search seem to be broken

When i do a vote, i got triggered twice to sign a message on Metamask, can you reproduce that issue? You can try a vote here: https://bafybeiegqll6nacfqzpcucuakti6c5bwcleqphnk6gz2mbm55nwyoaagbq.on.fleek.co/#/dai/proposal/QmSjEBnZsSGL7CLRQyEbZ8U7jz2Fi8AqDzjjFd6jQSxuYa

@bonustrack Yes, there are some issues with events like click and input that I haven't been able to figure out yet.

@bonustrack Yes, there are some issues with events like click and input that I haven't been able to figure out yet.

@bonustrack Sorry for that large commit, I should've split things up a little more. There a lot more still left to do and I'll keep working at it :)

@bonustrack Sorry for that large commit, I should've split things up a little more. There a lot more still left to do and I'll keep working at it :)

@samuveth Sound good!

@samuveth Sound good!

@bonustrack Everything seems to work well now. Let me know if you find any more issues.

@bonustrack Everything seems to work well now. Let me know if you find any more issues.

There is some issue when i try to vote here can you reproduce? https://bafybeiburnjxitlul44pnjcuwvidupirctzta3xttavcgbsfqy5zhsn3au.on.fleek.co/#/dai/proposal/QmdNR3Eed8nmNPMciQkTznQfR98sDcXVbLpGqUZ996M8tk
I've added some comments, i will do more tests but otherwise it seem to work well, you're doing an impressive work 👏

Thanks :)

There is some issue when i try to vote here can you reproduce? https://bafybeiburnjxitlul44pnjcuwvidupirctzta3xttavcgbsfqy5zhsn3au.on.fleek.co/#/dai/proposal/QmdNR3Eed8nmNPMciQkTznQfR98sDcXVbLpGqUZ996M8tk
I've added some comments, i will do more tests but otherwise it seem to work well, you're doing an impressive work 👏

Thanks :)


Adding to gistMediaTypes.ttl

I would  like to discuss how to best handle media types not currently covered in gistMediaTypes.ttl. I'm working on a project that will require a lot of media types not currently covered. The project involves cataloging most of the files on our SA sharepoint drive, so any media types appearing there will need to be covered.
If we add all the new media types to gistMediaTypes.ttl, what patterns should we follow? Or should we consider the alternative of using the IANA media type namespace?
https://www.w3.org/ns/iana/media-types/

I had a plan to some day write a script to create a new Media Type file with all of the defined media types from IANA (and leave the smaller file available for anyone that doesn't want to import all MediaTypes).
When I proposed the creation and format of the gistMediaTypes file I had not found the link you provided. I might have suggested using those IRIs if I had known about them.
However, if you look at their "RDF" it is not very good. And they make the common mistake of creating classes for each Media Type whereas our file creates instances of a gist:Category (this is more in line with our recommendations and how gist does things).
For instance:
gist:FormattedContent
        a owl:Class ;
        owl:equivalentClass [
                a owl:Class ;
                owl:intersectionOf (
                        gist:ContentExpression
                        [
                                a owl:Restriction ;
                                owl:onProperty gist:isExpressedIn ;
                                owl:someValuesFrom gist:MediaType ;
                        ]
                ) ;
        ] ;
        skos:definition "Content which is in a particular format. (E.g., HTML, PDF, JPG.)"^^xsd:string ;
        skos:prefLabel "Formatted Content"^^xsd:string ;

Here we are using gist:MediaType to "tag" a node representing some FormattedContent with a Media Type, instead of saying that the node itself "is" an instance of a gist:MediaType.

Jamie: IANA defines media types as classes, we define them as instances.
Rebecca: Adding triple to the IANA IRIs results in namespace squatting and, if a user ingests both, punning.
Someone should look at the IANA ontology and RDF to compare to ours and report back.

I would like to add application/pdf and application/msword.

Closing now. The immediate use case no longer exists. This may arise in the future because the dev team needs additional media types.


Feature/auto completion

Basic auto-completion feature for tags and attributes.

Lets get it in :)


Just curious about your motivation for creating this and benefits/drawbacks vs Three/Babylon

I have used PixiJS a lot in my professional career and wanted a easy way to just "throw in and animate some 3d models". I wanted it to play nice with rest off PixiJS without having to deal with hacking WebGL state back and forth. I also though it would be a fun challenge as a project.
Pixi3D is a benefit to use if you already like and use the PixiJS API, because it's the same. If you instead need all the features of Three/Babylon pick that instead. Those libs also have a lot more people working on them.


GoogleAppMeasurement version bounds incompatible with latest firebase_analytics

Plugin Version

google_mobile_ads: ^1.3.0
Steps to Reproduce

Use latest firebase_core and firebase_analytics dependencies. Also use latest google_mobile_ads dependency.
Build your project for iOS

Expected results:
App starts, and works fine :)
Actual results:
Pod install fails. See logs

Logs
[!] CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
In Podfile:
firebase_analytics (from .symlinks/plugins/firebase_analytics/ios) was resolved to 9.1.12, which depends on
Firebase/Analytics (= 9.2.0) was resolved to 9.2.0, which depends on
Firebase/Core (= 9.2.0) was resolved to 9.2.0, which depends on
FirebaseAnalytics (~> 9.2.0) was resolved to 9.2.0, which depends on
FirebaseAnalytics/AdIdSupport (= 9.2.0) was resolved to 9.2.0, which depends on
GoogleAppMeasurement (= 9.2.0)
google_mobile_ads (from .symlinks/plugins/google_mobile_ads/ios) was resolved to 0.0.1, which depends on
Google-Mobile-Ads-SDK (= 8.13.0) was resolved to 8.13.0, which depends on
GoogleAppMeasurement (< 9.0, >= 7.0)

Hi @csbence10, Thanks for filing the issue.
There is a similar issue describing this case https://github.com/googleads/googleads-mobile-flutter/issues/594, Please follow up there for further updates, Closing this issue as a duplicate. If you disagree feel free to write in the comments and we will reopen it.
Thank you.


Add CMake support for native compilation.

Add a single CMakeLists.txt to support building natively on
systems like aarch64 where bazel support is lacking. Also keep
all CMake files in one file to not confuse the supported
bazel way of building.
TEST=run examples on Gentoo 64 bit RPi4 with Coral and x86
powderluv@pi64 ~/github/edgetpu/src/cpp/b $ LD_LIBRARY_PATH="."
./classify_image -image_path parrot.bmp -labels_path
inat_bird_labels.txt -model_path
mobilenet_v2_1.0_224_quant_edgetpu.tflite
Zonotrichia querula (Harris's Sparrow)
Score: 0.996094
Score: 0
Score: 0

Superseded by #88


[raudio] (Bug) Audio is cut and never resumes if Windows goes into sleep

I am using a custom AudioStream to play audio in my emulator. However, I noticed that if the computer goes in sleep mode while the emulator is running, once the computer has booted back up the program will have no audio whatsoever and there is no chance of it coming back; only closing and reopening the emulator works.
I am initializing a custom audio stream with LoadAudioStream() and then manipulating it by calling SetAudioStreamCallback() with a custom function that populates the audio frames.
Is there a function that lets me detect the standby state to close the stream and to open a new one? Or am I missing something?

@michelelorusso05 It sounds like an issue with the device re-initialization after sleep, not sure if this scenario is contemplated by miniaudio... Maybe @mackron could provide more info?

This is related to this miniaudio issue: https://github.com/mackron/miniaudio/issues/717
If this is critical to you, consider adding MA_NO_WASAPI to your build settings. That will disable the WASAPI backend and force the DirectSound backend which I believe works. Alternatively, if there's a way for you to detect the computer going to sleep and waking up, you can manually handle this at a higher level than miniaudio and manually uninitialize and reinitialize miniaudio from there. This is not something I consider super high priority so it might be a while before I get to addressing this at the miniaudio level.

@mackron thank you very much for the reply and the details on the issue.
@michelelorusso05 It seems this issue is related to miniaudio and low-priority, you can try the approach proposed or wait for a potential fix in the future. I'm closing the issue on raylib side.


MD014 triggers when it shouldn't

https://github.com/mivok/markdownlint/pull/68 contains an exclusion for MD014 in the tests even though dollar signs aren't present inside the code blocks. Work out why this is and fix the rule accordingly.

MD014 assumed that code blocks couldn't be empty (indentation based code blocks couldn't be, but fenced code blocks can), and looked for at least one line that didn't begin with '$ '.


Can you tag a new release?

1.5.2 is a year old. But many additions are added to the list. So we doensn't have to use the unstable branch.

done

thanks..!
Maybe do a new release every week if new additions are added?


valgrind doesn't work on non-NixOS

Issue description
$ valgrind ./a.out
==17997== Memcheck, a memory error detector
==17997== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==17997== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==17997== Command: ./a.out
==17997==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
valgrind:
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind:
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind:
valgrind:  Note that if you are debugging a 32 bit process on a
valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
valgrind:  package (e.g. libc6-dbg:i386).
valgrind:
valgrind:  Cannot continue -- exiting now.  Sorry.

$ ldd `which valgrind`
	linux-vdso.so.1 (0x00007ffe2f741000)
	libc.so.6 => /nix/store/fivq0nbggp4y8mhy3ixprqd7qyn1hy2j-glibc-2.27/lib/libc.so.6 (0x00007f6bfe5b4000)
	/nix/store/fivq0nbggp4y8mhy3ixprqd7qyn1hy2j-glibc-2.27/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f6bfe968000)

$ file /lib64/ld-2.27.so
/lib64/ld-2.27.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

Steps to reproduce
Install valgrind to the user profile with e.g. nix-env.
Technical details

system: "x86_64-linux"
host os: Linux 4.14.83-gentoo, Gentoo, noversion
multi-user?: yes
sandbox: no
version: nix-env (Nix) 2.0.4
channels(root): "nixos-18.09.1922.97e0d53d669, nixpkgs-19.03pre166887.db8e3654e2c"
channels(swim): "nixpkgs"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixpkgs

PS. I fixed it by following the directions here: https://wiki.gentoo.org/wiki/Debugging#Valgrind

@furrycatherder I spotted this issue while looking into some unrelated problems I'm having with valgrind on macOS.
I noticed that the Valgrind derivation has been updated a few times since you posted this. If you're still using Gentoo, Nix, and Valgrind, can you confirm whether you still see this problem without -fno-builtin-strlen in the CFLAGS?

Tentatively closing. Happy to reopen if anyone squeals.


Is it possible to grab ip address of twitter user or tweet?

Hey
Thanks for great tool.
Is it theoretically possible to get ip address of twitter user or tweet?
Thanks

Yes but not with Twint

I hope that this is impossible without direct access to Twitter's infrastructure?

Well talking about "IP of the tweet" has almost no sense, imho. For the IP of the user, one could just use an IP grabber


[Bloc] Optimize large visualisations

Large visualisations with a lot of edges make the UI almost unresponsive.

We implemented a common parent detector which allows us to avoid listening to position in space changed events.


x-style is not a valid HTML5 attribute

Using an x-style (and x-apply) attribute fails HTML5 validators.
Custom attributes needs to start with data-, which is what is used for the configuration on the script tag.
Suggestion: add support for data-x-* attributes (and support both kinds of attributes).

I think we can add an option to customize attribute names.


vmap + indexing bug on branch index-take-batching-rule

This looks like a bug. I get an error when indexing using a Traced array inside a vmapped function.
Function f below fails, only when using jax.vmap:
def f(vector):
    inds = np.argsort(vector)
    result = vector[inds]
    return result

def g(vector):
    inds = np.zeros(vector.shape[0], dtype=int)
    result = vector[inds]
    return result

batch_size = 10
length = 3

g(np.ones(length)) # works
f(np.ones(length)) # works

jax.vmap(g)(np.ones((batch_size, length))) # works
jax.vmap(f)(np.ones((batch_size, length))) # TypeError: reshape total size must be unchanged, got new_sizes (1,) for shape (3,).

This is related to https://github.com/google/jax/issues/246 and it depends on the code from this branch, but it's possible that the bug is independent of those changes.

In #307 we actually deleted lax.index_take as a primitive, and so the branch with 63caf13 dies with it. However, we do need to add a batching rule for lax.gather now...
I'm going to close this issue in favor of tracking the feature in #246.


Feature/delete page

[ ] When the user clicks the "Delete" button, the selected item is marked as removed and does not show on the main list anymore.

@gisachris Thank you for taking the time to review my project. I appreciate your help!


Add test and update docs for VmType derive

While playing around with the new VmType derive I noticed there was no test for newtypes. I also updated the docs for the new features, at least where I noticed missing things :)

bors r+

bors r+
(Flaky test :/)


Revert "fix(TDI-45418):Upgrade Jackson libraries"

Reverts Talend/components#1829

Pull request test result: success :star:

Pull request test result: success :star:


Support direct sending by looking up MX records.

Is your feature request related to a problem? Please describe.
Right now you either need to use a relay or look up the target IPs yourself. It would be nice if there was support for resolving MX records.
It isn't 100% clear if this should live in lettre or a layer above, because there are a bunch of related features that could be layered on top of lettre nicely:

MX record fallback upon failure.
Support for mta-sts to automatically require TLS.

So maybe there should be a layer on top that resolves the MX records and delivers. Either way opening the issue here for discussion.

Currently direct sending is an explicit non-goal for lettre, but it's definitely worth discussing here. We could maybe imagine a lettre optional feature to enable relay stuff.

Hi there :wave:
These features are very interesting !
We are developing a complete MTA/MSA and thus we implemented already few of those.
Currently our codebase is divided in few crates, and we have a runtime for the policy execution.

https://docs.rs/vsmtp-server (contains the SMTP server and the queue logics)
https://docs.rs/vsmtp-delivery (contains the delivery logics, using lettre+trust_dns)
https://docs.rs/vsmtp-rule-engine (contains the runtime engine)

Depending on what features we want to see in lettre, we can implement some in vsmtp.
I am considering adding a vsmtp-queue crate containing all the logics between the 250 OK sent by the receiver when it takes the responsibility of the mails, to the delivery to the next component of the SMTP ecosystem.
What do you think about that ?


schemast: Support Mixins for UpsertSchema

Add mixin kind
Add AppendMixin to Context
Add Mixin func that provides a ast.Expr

@C-Deck 👋
Did you see my last review comments ? I think we're close to done here 😊

@C-Deck 👋
Did you see my last review comments ? I think we're close to done here 😊

I have been unable to come back to this. I will update the PR with changes per the review.


Initializing Shader Matrix Parameter Relative To World Writes Random Values to .oso

This isn't a big issue - it should perhaps just be illegal to do, but currently oslc accepts it, and produces a randomly varying .oso, which isn't good.
If I write a shader like this:
shader UninitializedMatrix
(
    matrix projectionOrigin = matrix( "world", 1 ),
)
{
    printf( "%f\n", projectionOrigin );
}

and then repeatedly run:
oslc UninitializedMatrix.osl && testshade  UninitializedMatrix
I get varying results such as:
0.000000 1.000000 0.000000 0.000000 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
0.000000 1.000000 0.000000 0.000000<PHONE_NUMBER>398819024714655604160856064.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
0.000000 1.000000 0.000000 0.000000<PHONE_NUMBER>500368666624.000000 0.000000 0.000000 0.000000 0.000000 0.000000<PHONE_NUMBER>312.000000 0.000000 0.000000 0.000000<PHONE_NUMBER>28.000000 0.000000
Worst case, I had a situation where the parameter would always be connected to something, so I hadn't noticed that the initializer wasn't working, until one compile hit some particularly bad luck and wrote a nan into the .oso, which caused the .oso to fail to parse.
Not a problem for me now that I'm aware, but perhaps to make it more obvious to others this should be an error, or should receive an identity matrix even though the actual world matrix isn't know yet during compile?
I'm testing in 1.7.2 on Linux, in case this behaviour has changed recently.

That certainly seems broken to me. I'll look into it.

I'm unable to reproduce this. Maybe it was already fixed?
Do you still see this behavior on the current version of OSL?


Rolling back to WindowsAzure.Storage 9.3 due to API timeout issues.

Storage SDK stopped respecting ServicePointManager settings starting with 9.4 and this is causing issues for our customers since we moved up from 9.3.  I am rolling back to 9.3 until the issue is addressed.
Issue is tracked on Storage Github Repo - https://github.com/Azure/azure-storage-net/issues/971

@tg-msft  - Do you know if there is anything in the new storage client that would potentially mitigate the issue here?

I know we use ServicePointManager.DefaultConnectionLimit in our tests and it's respected.  You can also set your own transport if you want more fine grained control over timeouts.

All my tests showed ServicePointManager is not respected. For example, 100 parallel storage I/O calls resulted in 100 connections wheres default limit was 2.

To be clear, my comment was about the new Azure.Storage.Blobs package and not Microsoft.Azure.Storage.Blob which is what I'm assuming you tested against.

Thx!