Enable display scaling in client

This is a patch to allow the command-line client to tell the server what display scaling to use. It supports telling the server the following:

Physical display size (in millimeters)
Display orientation
Text scaling to use (in %)

I have tested the it from a linux command-line client connecting to a Windows 8.1 computer, and was only able to get the scaling parameters to have any effect. I do not have time to diagnose this fully, and hope that someone else will be able to work out the issues with the other parameters.
This might be a start toward closing #1701 and #2064.
Future work might attempt to implement [MS-RDPEDISP] Remote Desktop Protocol: Display Update Virtual Channel Extension, which would allow changing the scaling during a session (on servers that support this).

@freerdp-bot test.

@freerdp-bot test.

@irichter, Is it necessary to specify all of those parameters? Or can I just pass a single one to say "Scale at 1.5x"?

I built it locally and am running
./xfreerdp /u:Default /p:default /v:<IP_ADDRESS> /scale-desktop:200
but I'm not seeing any changes.

@irichter, Is it necessary to specify all of those parameters? Or can I just pass a single one to say "Scale at 1.5x"?

@colemickens: Per [MS-RDPBCGR] section <IP_ADDRESS>.2:

Both /pwidth and /pheight (called desktopPhysicalWidth and desktopPhysicalHeight in the specification) must be given valid values or both will be ignored.
/orientation (called desktopOrientation in the specification) can be specified on its own.
/scale-desktop and /scale-device (called desktopScaleFactor and deviceScaleFactor in the specification) must both be specified with valid values, or both will be ignored. Alternately, setting /scale:NNN is the same as setting /scale-desktop:NNN /scale-device:NNN.

I'd love this feature. managing a windows server from my 4K linux machine is quite the exercise for my eyes.

@irichter am I mistaken or must the desktopScaleFactor  always be 100, 140 or 180? In this case the "scale" option as currently implemented makes only sense for those values as well.
Otherwise the pull request looks good to me.
+1

@bmiklautz deviceScaleFactor is the one that is limited to 100, 140, or 180 (not desktopScaleFactor), but your statement about the "scale" option is correct.
Perhaps I should have added logic to coerce to the nearest allowed value for deviceScaleFactor, and pass through desktopScaleFactor as provided by the user? Although if I do that, I should probably also coerce desktopScaleFactor to a value between 100 and 500. That said, who knows what additional valid values may be added for Windows 10, so any restrictions implemented now might end up coming back to cause problems later.

@irichter I would restrict the values according to the current documentation. If new values getting available the documentation should get updated.

By the way, this is working for me. It must have been user error before, or I wasn't using my custom built freerdp. Either way, I'm using this successfully for connecting to a remote machine from a high dpi client.
There are a few things that aren't scaled properly. I'm not sure if that's due to the Windows implementation of scaling, or due to how xfreerdp sends arguments... I'll attempt to shake it out by comparing freerdp with Remote Desktop from a Windows install somewhere.
Thanks for this patch @irichter, it would be very hard for me to use RDP otherwise!

Looks good to me except:

your git log is not clean with an upstream merge in it;
Is it safe to send 0 as physical width / height when no argument is given on the command line ?

Sorry to use this as a support channel, but does anyone have any idea what the difference between scale-device and scale-desktop are? I can't tell if it's desirable to set them both, just one - a bit difficult to tell what's going on without maybe taking screenshots and comparing closely.
@irichter Are you going to clean up the git log so this can be pushed it?

@irichter Can I resubmit this with a clean git history if you're not interested in doing so?
@hardening Is there a normal way of handling stale pull requests? I don't want to step on toes, and I'm also unsure of how copyright works in a case of a pull request.
I have this on my master: https://github.com/colemickens/FreeRDP and will keep rebasing when I think of it... I can send a new PR if everyone is okay with that.

superseded by #2756


MNT: rerender

Hi! This is the friendly automated conda-forge-webservice.
I've rerendered the recipe as instructed in #86.
Here's a checklist to do before merging.

[ ] Bump the build number if needed.

Fixes #86

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


[RFC] Inconvenient defaults?

As part of “Projectimport attrs” (see also #408) we get a unique opportunity to change default options/behaviors that grew over the years but couldn't be fixed due to backward-compatibility restrictions.
The rough plan is create a new, friendlier API on top of @attr.s and attr.ib() that won't go anywhere.
The following is cast in stone:

auto_attribs=True
consistent (Python 3-style) hashing behavior on every Python version
#428

The following would be really nice to have:

#368 but it might need too much thinking/research

What else is bugging you?

One thing that I just can't make up my mind is related to #223: should we make slots=True the default? I’m quite confident that in 99,9% of cases it's the right thing to do and will guide people to write better classes.
However on the other hand, our approach of rewriting classes breaks in certain scenarios, usually involving metaclasses.
So the question is, whether we want to tolerate a higher rate of bogus bug reports/help requests or make the default case nicer?
I welcome your input.

Finally a controversial idea: we could make import attrs Python 3 only. There isn't much baggage we'd get rid of but there is some and 2020 is less than a year ahead. It would also allow us to embrace enums as part of our API.

Not to derail an excellent conversation about mutability, but has attrs ever considered building in support for disallowing 'empty values for attributes that are not assigned a default?
For instance, in my own little world, I can't think of a single case where, given the type
@attr.s(auto_attribs=True)
class MyDatabaseType:
    username: str
    firstname: str
    email_addresses: List[str]

    favorite_colors: List[str] = attr.Factory(list)
    bio: str = ''

I would ever want to allow empty strings or lists for the attributes where I did not specifically provide a default. To me, making something optional is the same thing as providing a default - under all other circumstances (well, at least for strings and collections types), an empty value is a sign of failure.
Obviously I can write validators for each of these items, but that ends up being at least 2 extra lines in the class definition for each attribute, or a single, very long line using attr.ib syntax, where previously the class definition was extremely clean.
I am probably totally wrong about all this, and would love to have it explained to me why. But if I'm not, may I suggest adding a flag to the decorator that, if provided, enables this basic level of validation for all str and list/set/other collection types for which a default value is not provided?
Again, I apologize for jumping into this ongoing conversation about better defaults - this is probably a simple feature request. But as it seems like default behavior to me, I couldn't resist.  Thanks for an incredible project that has made programming with classes/typing in Python literally 500% more pleasant!

@petergaultney That sounds a bit off-topic for this thread, which is more about cleaning up the API around existing functionality.  You're asking for a new feature, which you've filed as #495; it'll be easier to track that conversation there.

I just remembered another common "pain" point: equality & comparison.
I would like to split it up in the new API and I guess the least confusing way would be Enums. Cmp.NOTHING, Cmp.EQUALITY and Cmp.COMPARE or something along those lines.

Another one: auto-detect methods that are defined on the current class (and the current class only): #324

I just remembered another common "pain" point: equality & comparison.  I think?
+100

Sounds like it's already captured but I personally have to type @attr.s(hash=True) for every attrs class, so that'd be great to change yeah.
(I have to read the rest of this thread but I'm being lazy since I just saw this issue pinned :)
And the other one that bugs me often is silently ignoring methods that are replaced. I.e.:
>>> @attr.s
... class Foo(object):
...     def __init__(self):
...         print 12

should IMO do something different than what it does today -- either the old characteristic behavior where that gets used as attrs_post_init or an error at class creation time.

(Probably the latter, considering the same can't be done for someone defining __repr__ with repr=True)

I like the name order= instead of cmp=, as dataclasses does, since cmp is a bit opaque -- "what is 'compare' anyway?", and order sounds like functools.total_ordering which is good.
Maybe it's too late to change that though.

Maybe it's too late to change that though.

It's not for import attrs.
I like eq and order!

Regarding mutability/frozen in an auto_attribs setting. Python 3.8 now has a typing.Final type qualifier (PEP 591), also available to older versions in typing_extensions.Final. This has some overlap with frozen:
At type checking time, frozen is equivalent to marking all fields Final. So Final is more flexible, since if just one field is mutable, all the others can still be marked Final. But it is less ergonomic, though maybe we can convince typing to add a decorator which flips the default Finality.
At run time, attrs adds runtime checks that the fields are not mutated, while Final doesn't. But I suppose attrs can detect Final, and add the same checks? So that should be equivalent.

Thanks for this effort, great stuff. I would humbly submit https://github.com/python-attrs/attrs/issues/391 for consideration. Stripping private attrs should not happen by default and instead be configurable with private_stripping=True or something like that.

We are about to standardize on from attr import dataclass everywhere in our codebase so I'm just wondering if there's been any movement on this lately :)

Well, I'm annoyed of typing @attr.s(auto_attribs=True, auto_exc=True, slots=True) as the next person.
And I've been cranking out PRs to fix all things that I want fixed before import attrs (notably #642, #635, and #607) but sadly nobody was reviewing so I just merged after two weeks of silence. So that takes a while with all the timeouts.
The last big remaining thing are pre-attribute on_setattr hooks that allow for both freezing single attributes and force validation on setting attributes. Been procrastinating on the spec for a while now but attr.ib(on_setattr=run_validator) seems like the correct default value and it would be a shame to not include it.

Well, I'm annoyed of typing @attr.s(auto_attribs=True, auto_exc=True, slots=True) as the next person.

Perhaps a solution might be a "templating" approach, e.g. with some kind of a AttrsTemplate class or namedtuple:
my_template_1 = AttrsTemplate(auto_attrib=True)
my_template_2 = AttrsTemplate(auto_attrib=True, auto_exc=True)

@attr.s(template=my_template_1)
class Foo:
   ...

The last big remaining thing are pre-attribute on_setattr hooks that allow for both freezing single attributes and force validation on setting attributes

Oooh I just needed that recently, ended up using metadata to denote "mutability" of an attribute.

Work has started in #645!

@berislavlopac in theory the templating approach can be accomplished by meta-decorators, right?
def my_template_1(cls=None, **kwargs):
    def decorator(cls):
        return attrs(cls, **kwargs, auto_attrib=True, auto_exc=True)
    return decorator(cls) if cls else decorator

I wonder if either documenting this pattern or providing some sugar for it, e.g.
def attrs_template(**template_kwargs):
    def the_template(cls=None, **attrs_kwargs):
        def decorator(cls):
            merged_kwargs = {**attrs_kwargs, **template_kwargs}
            return attrs(cls, **merged_kwargs)
        return decorator(cls) if cls else decorator
    return the_template

my_template_1 = attrs_template(auto_exc=True, auto_attribs=True)

@my_template_1(frozen=True)
class Foo:
    bar: int

Excellent point, haven't though of this approach -- it would definitely be useful to at least be documented if not implemented in this way.

@berislavlopac @petergaultney I use this approach all the time (https://github.com/Tinche/flattrs/blob/master/src/flattr/_fb_attrs.py#L35). Note that it needs special boilerplate if you're using mypy, and mypy doesn't perfectly support it.

attr.ib(on_setattr=run_validator)

Perhaps attr.ib(on_setattr=validate) be a little more concise?

attr.ib(on_setattr=run_validator)

Perhaps attr.ib(on_setattr=validate) would be a little more concise?

That’s not really an issue since it’s gonna be the default in upcoming APIs. I don’t think we need to pollute our APIs with any sugar for it in the meantime.

You can simply use partial:
>>> from functools import partial
>>>
>>> auto = partial(attrs, auto_attribs=True, auto_exc=True)
>>>
>>> @auto(frozen=True)  # additional parameters
... class Foo:
...     foo: int
...
>>> @auto               # no parameters and no parentheses
... class Bar:
...     bar: str
...
>>> Foo?
Init signature: Foo(foo: int) -> None
  ...
>>> Bar?
Init signature: Bar(bar: str) -> None
  ...

You can even stack these:
>>> frozen = partial(auto, frozen=True)

Given how easy and readable and pythonic this is, I think having the least magical defaults is very reasonable. Perhaps with the exception of cache_hash, are there reasons to not enable this by default for frozen instances?
Mypy is the bigger problem here, as it currently doesn't understand partial, and doesn't even understand auto = attrs; @auto; class ...
P.S. I personally would like to be able to drop parentheses on attrib like this:
@attrs
class Foo:
    foo = attrib

Sadly the mypy angle ruined this approach that I used to use all the time. :(

Mypy is the bigger problem here, as it currently doesn't understand partial, and doesn't even understand auto = attrs; @auto; class ...

This partial application decorator-forwarding usecase can be managed with a micro-plugin for mypy - you basically need something that says:
import typing as ty
from mypy.plugin import Plugin, ClassDefContext
from mypy.plugins.attrs import attrs_class_maker_callback

MODULE_PATH_TO_YOUR_DECORATOR = "your.module.path.autoattrs"

class YourDecoratorPlugin(Plugin):
    def get_class_decorator_hook(
        self, fullname: str
    ) -> ty.Optional[ty.Callable[[ClassDefContext], None]]:
        def fwd_auto(cls_def_ctx: ClassDefContext):
            if fullname == MODULE_PATH_TO_YOUR_DECORATOR:
                attr_class_maker_callback(cls_def_ctx, True)
        if fullname == MODULE_PATH_TO_YOUR_DECORATOR:
            return fwd_auto
        return None

def plugin(_version):
    return YourDecoratorPlugin

What this doesn't support is things like frozen - however the mypy attrs plugin itself could be trivially rewritten to expose those parameters directly for these sorts of mypy plugins.

@hynek do you think mypy would accept a PR to make the built-in plugin more directly reusable? This whole mess of plugin code could probably be rewritten to be a one-liner that 'registers' a decorator with the mypy plugin.

I've opened an issue asking for this almost two years ago: https://github.com/python/mypy/issues/5406
FWIW, #650 is of interest here too.

doesn't even understand auto = attrs;

by the way, while assignment doesn't make mypy happy, importing under a different name does:
if TYPE_CHECKING:
    from attr import attrs as slotted
else:
    slotted = functools.partial(attrs, slots=True)

one thing which breaks some functional programming stuff, is the fact you can't do bracketed lookup with attrs objects
a = {"name": "a"}
a["name"]
a
@attrs
class Person:
name: str = attrib()
a = Person(name="a")
a["name"]
TypeError: 'Person' object is not subscriptable
means you can't do functional lenses, lookPath, assocPath, makes me miss Ramda!

You can always implement your own getitem...

    def __getitem__(self, key):
        return self.__getattribute__(key)

worked like a charm, thanks for reminding me, that would be a fun default to add!

Please check out #666 y'all.

So FTR, NG APIs will ship as stable in 21.1, now is the last chance to ask for changes in APIs that are annoying.
So far there's #705 but I'm sure there might be more?
To be clear: define/mutable/frozen/field are set in stone now. But there's a buttload of other APIs that may benefit from polish?

I just want to say thanks for order=False by default.  :pray:


Get Font Size

Would like a feature to get the font-size used after layout. This is so I can standardize the font-size in adjacent boxes (on same page)
GlobalKey  textKey = GlobalKey();
WidgetsBinding.instance!.addPostFrameCallback((timeStamp) {

   test.getActualFontSizeUsed();

});

// In build
Widget test =  AutoSizeText(
   'Trying to get Font Size',
   key: textKey,
);

I think this would be quite easy to add support for, but I wonder if it wouldn't be better to have this in a callback instead, as it is calculated on build.
The way you would use this to "standardize the font-size" is a bit questionable to me, although I do understand the sentiment.
I'm just a user so I don't have much to say, whether it's a method or a callback. I wouldn't mind implementing it though.

I also would like this ability. I have a SizedBox containing my text. If the text resizes, I want the SizedBox to resize in proportion to the text size. Right now, I have no ability to do that.

I would also like to determine the adjusted font size. This is because I'm converting an AutoSizeText element into a PDF Text element, and I need to specify the exact font size after resizing.

I still want to get the resized font size


Fix build issues in SASL/SCRAM branch

Fix the failing lint: https://github.com/IBM/sarama/actions/runs/6048278130/job/16413331386?pr=2482
Merge latest from upstream to resolve the warning on the PR This branch is out-of-date with the base branch

Linked to:

https://github.com/scram-sasl/info/issues/1


Fixed placeholderTextColor.

This was removed as part of v2, and moved to textInputProps.
<GooglePlacesAutocomplete
      placeholder="Search"
      onPress={(data, details = null) => {
        // 'details' is provided when fetchDetails = true
        console.log(data, details);
      }}
      query={{
        key: googleKey,
        language: "en", // language of the results
      }}
      textInputProps={{
        placeholderTextColor: "red",
      }}
    />


Updating master with release 1.0.0

Codecov Report

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

@@            Coverage Diff            @@
##             master      #58   +/-   ##
=========================================
  Coverage     64.91%   64.91%
  Complexity      506      506
=========================================
  Files            90       90
  Lines          1431     1431
  Branches        126      126
=========================================
  Hits            929      929
  Misses          432      432
  Partials         70       70

Continue to review full report at Codecov.

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


[WIP] chore(utils): introduces edge-related utilities

📖 What's in there?
Utility functions that we need for executing edge-related code on server side.
Work in progress!

Codecov Report

Merging #219 (2ff7c19) into main (fbf30d4) will increase coverage by 0.32%.
The diff coverage is 88.75%.

@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   88.51%   88.84%   +0.32%
==========================================
  Files          14        6       -8
  Lines        1280      242    -1038
  Branches       67       30      -37
==========================================
- Hits         1133      215     -918
+ Misses        143       27     -116
+ Partials        4        0       -4

Impacted Files
Coverage Δ

packages/utils/src/edge-to-node/stream.ts
64.93% <64.93%> (ø)

packages/utils/src/edge-to-node/handler.ts
100.00% <100.00%> (ø)

packages/utils/src/edge-to-node/headers.ts
100.00% <100.00%> (ø)

packages/utils/src/edge-to-node/index.ts
100.00% <100.00%> (ø)

packages/utils/src/index.ts
100.00% <100.00%> (ø)

packages/jest-expect/src/index.ts

packages/cookies/src/request-cookies.ts

packages/vm/src/temp-file.ts

packages/jest-expect/src/shared.ts

packages/jest-environment/src/index.ts

... and 8 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


WA3: exoplayer fails with the version

Hi,
currently, the specified version for the exoplayer workload is '2.4.0', I'm using 2.5.4 so I have to update the init.py file with the new version. Is it possible to specify a version wildcard or eg. > 2.4.0 ?

Hi,
No we do not currently support wildcard versions or greater than a specific version, however WA3 does support loose version matching so for example if you specify 2.5 in the __init__.py file then this will match against versions 2.5.2 2.5.4 etc.

Does it make sense to have:
versions = ['2.4.2', '2.5']

It would make sense to have multiple versions listed yes.
I have just tested this workload with version 2.6 which also appears to work so have added both of these versions to the supported versions for the workload with commit https://github.com/ARM-software/workload-automation/commit/fbf1bbb1cfbfa09a9bd5fb7553622210b13e16a0

It fails with a 2.5 version.
I think this is related to:
2018-02-08 16:19:40,532 DEBUG      resolver:     Resource <'s apk 2.6> not found.

In your agenda you will need to specify version: 2.5 as by default wa will look for the latest supported version now 2.6.

I tried but it still fails. I have the following agenda:
workloads:

name: exoplayer
id: audio_workload_task_placement
classifiers:
tag: ogg_128kbps_30s
workload_parameters:
format: "ogg_128kbps"
duration: 30

Where shall I add the version tag ?

You would add it as a workload parameter. So something like:
- name: exoplayer
  workload_parameters:
      format: "ogg_128kbps"
      duration: 30
      version: 2.5

Ok, it works now. Thank you very much!


"undefined symbol" error when running the demo with a TensorFlow source installation

I tried to run the demo (run_demo.py) following the instructions provided in the README, however I incurred in the following error:
Traceback (most recent call last):
  File "run_demo.py", line 25, in <module>
    from crfrnn_model import get_crfrnn_model_def
  File "/home/massimo/repositories/crfasrnn_keras/crfrnn_model.py", line 28, in <module>
    from crfrnn_layer import CrfRnnLayer
  File "/home/massimo/repositories/crfasrnn_keras/crfrnn_layer.py", line 28, in <module>
    custom_module = tf.load_op_library('./cpp/high_dim_filter.so')
  File "/home/massimo/.local/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
  File "/usr/lib/python3.5/contextlib.py", line 66, in __exit__
    next(self.gen)
  File "/home/massimo/.local/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 467, in raise_exception_on_not_ok_status
    c_api.TF_GetCode(status.status))
tensorflow.python.framework.errors_impl.NotFoundError: ./cpp/high_dim_filter.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

Initially (i.e. right after cloning the repository) the compilation was failing because it couldn't find neither the entire TensorFlow nor nsync_cv.h.
So I edited compile.sh as follows:
TF_INC=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
NSYNC_INC=$TF_INC/external/nsync/public

g++ -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -shared high_dim_filter.cc modified_permutohedral.cc -o high_dim_filter.so -fPIC -I $TF_INC -I $NSYNC_INC -O2

Specifically, I changed the first line to use Python3 (I have TensorFlow and everything else working under Python3) and included the nsync path.
With this modification the compilation succeeded and high_dim_filter.so was generated without any error/warning being issued.
Then, as per instructions, I downloaded the pre-trained model weights crfrnn_keras_model.h5 and finally tried to run python3 run_demo.py, which failed with the above error message.
I googled the error message, but others seemed to solve similar issues with the -D_GLIBCXX_USE_CXX11_ABI=0 option that is already in place.
Relevant system information:

Ubuntu 17.04
Python 3.5.3
TensorFlow 1.3.0 (compiled from source)
Keras 2.0.8
g++ 6.3.0 (I also tried with version 5.4.1, but I got the same error)
CUDA 9.0
cuDNN 7.0.2

Please let me know if I need to provide any other info to help you replicate the issue.
Thanks in advance!

Hi @mminervini
I haven't tested this with a Tensorflow compiled-from-source installation. Please follow the steps in the "Compile the op using bazel (TensorFlow source installation)" section of https://www.tensorflow.org/extend/adding_an_op to compile the high_dim_filter op.
Please let us know the outcome.

Hi @sadeepj
Thank you for your prompt reply!
Following your pointer, I delved into the TensorFlow documentation and spent several hours trying to compile the op using bazel. Sadly, I couldn't get it to work.
I compiled the op using bazel and tried to import the .so created by bazel, but I still got a (slightly different) undefined symbol error.
Among other things, I also tried to re-compile the entire TensorFlow (now including the op), but then I got errors when importing TensorFlow.
Overall, I feel that this part of the TensorFlow documentation might be a bit lacking and probably I'm missing some (perhaps obvious to others) step.
For the time being I gave up on battling against compilers and decided to switch to the TensorFlow binary installation with pip (even though this meant that I had to downgrade CUDA and cuDNN, respectively, to version 8.0 and 6.0.21, in order to meet TensorFlow requirements). This enabled me to run the CRF-RNN demo.
The issue of making it work with a TensorFlow source installation remains unsolved, though.

I tried tensorflow docker image and pip installed tensorflow. Neither of them works...

@clarke07 we support Tensorflow 1.4 as of https://github.com/sadeepj/crfasrnn_keras/commit/66e5c0f7ae5bc29926c03ff60b923c951bfebe2c. See #19 for more details.

Hello,
I tested your code with Tensorflow 1.3, it works.
Unfortunately it doesn't work in my configuration with Tensorflow 1.4 or 1.4.1
Is there any particular configuration we should make to avoid the error:
undefined symbol: _ZTIN10tensorflow8OpKernelE
Thanks a lot

@RomRoc ,hi,I have the same problem. I do not use the source command, and I get the .so file. I don't know how to fix it

@RomRoc Please try the following:
#  ------------------------------------------------------------------------------------------------------------i----------
#  Instructions:
#  1.  Activate your Tensorflow virtualenv before running this script.
#  2.  This script assumes gcc version >=5. If you have an older version, remove the -D_GLIBCXX_USE_CXX11_ABI=0 flag below.
#  3.  On Mac OS X, the additional flag "-undefined dynamic_lookup" is required.
#  4.  If this script fails, please refer to https://www.tensorflow.org/extend/adding_an_op#build_the_op_library for help.
#  -----------------------------------------------------------------------------------------------------------------------

TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')

g++ -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -shared high_dim_filter.cc modified_permutohedral.cc -o high_dim_filter.so -fPIC -I$TF_INC -I$TF_INC/external/nsync/public -L$TF_LIB -ltensorflow_framework -O2

Excellent, with the provided instructions it works with Tensorflow 4.1. I just had to change python to python3 command in the TF_INC and TF_LIB.
Thanks!

@sadeepj this is good.thanks,

Just FYI. This issue is fixed on master as of 1d7b6f3.

I am facing same issue though I am using latest version that seems to have fixed this issue and I didn not face any problem while compiling .so file either. (TF=1.10) This is the error I am getting -

Traceback (most recent call last):
  File "run_demo.py", line 27, in <module>
    from crfrnn_model import get_crfrnn_model_def
  File "./src/crfrnn_model.py", line 28, in <module>
    from crfrnn_layer import CrfRnnLayer
  File "./src/crfrnn_layer.py", line 28, in <module>
    import high_dim_filter_loader
  File "./src/high_dim_filter_loader.py", line 28, in <module>
    custom_module = tf.load_op_library(os.path.join(os.path.dirname(__file__), 'cpp', 'high_dim_filter.so'))
  File "/home/local/AAPL/manish/.virtualenvs/crf-rnn/local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: ./src/cpp/high_dim_filter.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

Any inputs on how to fix this would be highly appreciated.

I am facing same issue though I am using latest version that seems to have fixed this issue and I didn not face any problem while compiling .so file either.
I am using binary TF installation (TF=1.10), gcc is 5.4.
This is the error I am getting -

Traceback (most recent call last):
  File "run_demo.py", line 27, in <module>
    from crfrnn_model import get_crfrnn_model_def
  File "./src/crfrnn_model.py", line 28, in <module>
    from crfrnn_layer import CrfRnnLayer
  File "./src/crfrnn_layer.py", line 28, in <module>
    import high_dim_filter_loader
  File "./src/high_dim_filter_loader.py", line 28, in <module>
    custom_module = tf.load_op_library(os.path.join(os.path.dirname(__file__), 'cpp', 'high_dim_filter.so'))
  File "/home/local/AAPL/manish/.virtualenvs/crf-rnn/local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: ./src/cpp/high_dim_filter.so: undefined symbol: _ZTIN10tensorflow8OpKernelE

Any inputs on how to fix this would be highly appreciated.

hello,manishh,i get the same problem,can you tell me how to sovle it?? thanks a lot!!


MinimumLogLevel is not respected in options configuration

https://github.com/OmniSharp/csharp-language-server-protocol/blob/4050dad05963ac5d7df3579345bde9edd25971fb/src/Server/LanguageServer.cs#L171 overrides all log level settings done in the "From" clause.

This didn't fix it - the option is never inspected when creating the language server.
    public static async Task<ILanguageServer> From(LanguageServerOptions options, CancellationToken token)
    {
        var server = new LanguageServer(
            options.Input,
            options.Output,
            options.Reciever,
            options.RequestProcessIdentifier,
            options.LoggerFactory,
            options.Serializer,
            options.Services,
            options.HandlerTypes.Select(x => x.Assembly)
                .Distinct().Concat(options.HandlerAssemblies),
            options.InitializeDelegates,
            options.InitializedDelegates
        );

        if (options.AddDefaultLoggingProvider)
            options.LoggerFactory.AddProvider(new LanguageServerLoggerProvider(server));

        await server.Initialize(token);

        return server;
    }

A lot of the logging infrastructure has been rebuilt, if this is still an issue let me know and I can reopen it.

Is there a place to go to find out how to use the new infrastructure?


Embedding encrypted files

I have files that are stored encrypted, when I generate a URL for them the interceptDownload hook decrypts them and sends them over to the client, the file gets downloaded and everything works fine. Now if I try to use the URL in an embed html object or similar, I get an error saying that the file PDF in this case cannot be loaded. Is there a way to stream + decrypt files without the user having to specifically download them ?
If there's any other alternative way of doing this I'm open to suggestions as well.

Hello @sylido ,
I'd like to see server logs for both cases to understand difference. Please, post server logs with enabled debug option for "download" and for "embedded" file

@sylido friendly ping

hey @dr-dimitru I think I had the wrong headers going - I was trying with the download one which didn’t work. Next I tried with “inline” which resulted in the browser’s tab freezing. Then I just removed that header part completely and the stream + download now work as expected, thanks for the nudge in the right direction.


Error on TenancyServiceProvider.php initial setup.

Describe the bug
I have installed the package following the Quick Start guide, and I`m getting this error
syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
on TenancyServiceProvider.php, line 19, see the line below.
18    // By default, no namespace is used to support the callable array syntax.
19    public static string $controllerNamespace = '';

I have tried using 'App\Http\Controllers' which is the namespace of my Controllers and same thing happens. There is nothing about this on the doc, I assume is something that should work out of the box but is not working for me.
Best,
Alex
Your setup

Laravel version: [e.g. 8.2.0]
stancl/tenancy version: [e.g. 3.1.0]

The error says

unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

If you Google it and click the first result, you'll see

The error says

unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)

If you Google it and click the first result, you'll see

Thanks @stancl !!!

Thanks @stancl !!!

Hi!
i have an issue
when i run command "php artisan tinker"
I receive below error. can you please help me to fix.

**ParseError
syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
at app/Providers/TenancyServiceProvider.php:19
15▕
16▕ class TenancyServiceProvider extends ServiceProvider
17▕ {
18▕     // By default, no namespace is used to support the callable array syntax.
➜  19▕     public static string $controllerNamespace = '';
20▕
21▕     public function events()
22▕     {
23▕         return [
  +1 vendor frames

2   [internal]:0
Composer\Autoload\ClassLoader::loadClass("App\Providers\TenancyServiceProvider")
  +8 vendor frames

11  artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))**

Can you read text?

Hello, good day, I had the same problem because I was using<EMAIL_ADDRESS>So I solved this Problem simply by stepping down my default PHP version to 7.4, and my machine setup was MacBook Pro running Catalina OS,
So how did I achieve this?

php -v (To see what version PHP has)
brew install<EMAIL_ADDRESS>brew unlink<EMAIL_ADDRESS>&& brew link --force<EMAIL_ADDRESS>remember its brew unlink php@{current default version}
run echo export PATH="/usr/local/opt/php@7.4/bin:$PATH"
(Optionally, do a manual edit) vim ~/.zshrc
add to the config file export PATH="/usr/local/opt/php@7.4/bin:$PATH"
source ~/.zshrc
php -v to check if switching was successful.

Good luck.


OVDB-64: Introduce OpHide Policy to SOPs

I've implemented this new OpHide Policy, I'll add a little more discussion regarding this approach on the email thread:
https://lists.aswf.io/g/openvdb-dev/topic/proposal_unifying_vdb_and/29915127

I would like to at least see what this logic would look like implemented purely as a Python script incorporating a node table of some kind. That approach has the advantage that it would provide a working example that TDs could easily adapt to their needs; a simple all or none choice is unlikely to satisfy everyone.

One of the key features I wished to include by doing it like this is to have the logic about hiding variables and parent names be co-located with the SOP itself. Thus if you only built and installed one SOP it would replace it's parent SOP and no other ophiding would take place. That may still be feasible with your node table suggestion, but if you could outline an example implementation, that would be helpful?
I would suggest that we're not attempting to satisfy absolutely everyone here, the default remains to not hide anything for that reason. If the hiding policies that we're offering doesn't meet someone's needs, the SideFX recommended solution is to introduce an ophide script on startup. I think that remains preferable over introducing our own Python script that duplicates this functionality.

Are ophide scripts still required to be written in HScript?

From the docs, hou.NodeType.setHidden() should do the same as ophide.  So you could run this as a python script.
My objection is that requires installation into the right location.  I think it would be as helpful as just providing an OPcustomize snippet and asking people to append it.  Ie, it won't be able to help with the easy deployment problem.
By building it into the node definitions we can update this policy in the logical place - the node itself - as we add and improve nodes.  We also ensure the policy can be deployed if the nodes are; eliminating another failure point.

With the new op customization script, you can now remove all of the OPENVDB_HOUDINI_DEFAULT_POLICY logic from the CMake script and revert all of your changes to the SOPs and to ParmFactory (except maybe the calls to setOpTabSubMenuPath, but you can make those conditional on the node name ending with "(ASWF)").  If you must have an OPENVDB_OPHIDE_POLICY environment variable, handle it entirely in the pythonrc.py customization script.  Even the label suffix logic can go in the Python script, though you might have to do something like
if os.getenv('OPENVDB_OPHIDE_POLICY') == '0':
    hou.hscript('oprename Sop {name} "{label} (ASWF)"'.format(...))

because there doesn't appear to be a HOM equivalent for oprename.
It would of course be better to use meaningful names rather than integers for the OPENVDB_OPHIDE_POLICY states.

Closing this PR now. After much discussion, this has been split out into three separate PRs - #456, #461 and #464.


batch Video Upscaling script

I've written a script that performs video upscaling using S3Diff in batch mode. The file inference_s3diff_video.py should be located in the src subdirectory of the S3Diff folder. The default location for input video files is the "video" folder. Place the video upscaling script, video_upscale.py, in the root directory of S3Diff. The models are assumed to be at these paths: 'assets/mm-realsr/de_net.pth', 'models/s3diff.pkl', and 'models/sd-turbo'. You can modify the paths to the models within the upscaling script itself, as well as the codec if you prefer a different one. :)
Simply run the script within your conda environment with the command: python video_upscale.py
The upscaled videos will be placed in the "video" folder alongside the originals, with a suffix appended. :)
You'll need to download and install FFmpeg. On Windows, you'll need to add it to your PATH environment variable. I haven't tested the script on Ubuntu, but it should work. :)
v2
S3Diff_video_upscaling_batch script.zip

@zelenooki87 Thank you so much for your valuable contribution!

:) I know the model isn't intended for video upscaling and doesn't give perfect results, but it gives okay and more consistent results, and better than, for example, OseDiff. I just forgot to mention that the sr_test.yaml path needs to be adjusted: lr_path: input. I'm glad if it helps someone :)

I've added the edited script and the necessary files to the first message. :)


Declare unused methods as deprecated

Some methods are entirely unused and/or commented as deprecated. We should mark this more clearly via @Deprecated.

Deprecated methods should only be removed at major versions. It is a good practice to leave deprecated methods in a while after deprecation. However, considering that JWPL is just about to make a major version jump, it could be considered to not deprecate but remove the methods outright. Depending on the method though, you might think that it may still be useful and so should stay.
In any case, please consider using the new properties of the @Deprecated annotation and document what the intended upgrade path is - or if there is none - using the JavaDoc @deprecated tag.
/**
 * @deprecated Use {@link XXX#foo} instead. / or / To be removed without replacement.
 */
@Deprecated(since="2.0.0), forRemoval="3.0.0")

That's what I planned :)

Note:
@Deprecated(since="2.0.0", forRemoval=true) is working, the other example is not consistent with what the annotation allows for.

Yes, indeed. In other projects in I am using a custom @forRemoval JavaDoc tag to mark the version for the method to be removed. That confused me here. Thanks for correcting me. If you find it helpful to announce in which version the deprecated method is expected/planned to be removed, you could also use a custom JavaDoc tag. It only requires configuring the JavaDoc Maven Plugin to make it know it is there and not warn about it.
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <notimestamp>true</notimestamp>
          <doclint>all,-missing</doclint>
          <tags>
            <tag>
              <name>forRemoval</name>
              <placement>X</placement>
            </tag>
          </tags>
        </configuration>
      </plugin>

Example above also includes two additional config parameters which might be useful.


set master_doc

Need to set this to master_doc = 'index' to specify the document that contains the root toctree directive.

@masco Why is the CI still running? Also we can ask CI to not run for any changes in docs, if that makes sense.


Embedly button not diplayed after upgrade to v3.0

Hey! Great plugin, however after the recent upgrade from v2.2.1 to v3.0 the Embed.ly button is no longer displayed. I updated the app/config/nova/froala-field.php toolbarButtons array according to the upgrading instructions but for some reason it's not displaying the Embed.ly button even though I have it in my config:
'options' => [
        // 'key' => env('FROALA_KEY'),

        'iconsTemplate' => 'font_awesome_5',

        'tuiEnable' => true,

        'toolbarButtons' => [
            [
                'bold',
                'italic',
                'underline',
            ],
            [
                'formatOL',
                'formatUL',
            ],
            [
                'insertImage',
                'insertFile',
                'insertLink',
                'insertVideo',
                'embedly',
            ],
            [
                'html',
            ]
        ],
    ],

Thanks for reporting! Just tagged patch version 3.0.1. Let me know if you will have any issues.

Thanks 🥰


Allow timeouts to run on the message list screen

Currently, when a new message is delivered, the messages app starts a timeout timer that returns to the clock after a while. If the message being displayed is removed without user interaction (for instance by the user dismissing a notification on their phone), the app returns to the message list and stops the timer. The result is that if a message is received and then before the timeout is dismissed on the phone, the device will permanently display the message list until the user manually returns to the clock.
This change lets the timer keep on running as long as the user doesn't interact with the screen, restoring the clock as usual.
One possible improvement to this change (that I haven't attempted to write) could be to clear the timeout if the screen gets unlocked by the user while on the messages screen.

Ok, thanks - we'll see if anyone complains :) I guess a timeout of 60 secs if you leave the watch of that screen seems fine - although as you say even if you're scrolling up and down it, you'll still end up reloading the clock after 60 sec

Yep, if that ends up being an issue I won't mind adding something that checks locked/unlock status before returning (that ought to solve that usecase for most people I think) or just adding a setting for it, so just @ me in the issue if it comes up.


Interactive Terminal / TTY Hangup

When using tini with a TTY, interactive shell commands like python and irb hang the terminal. Either of the following Dockerfiles will reproduce the issue (python can be replaced with ruby, etc.):
FROM krallin/ubuntu-tini:trusty
RUN apt-get update && apt-get install -y --no-install-recommends python

FROM debian:8.2

RUN apt-get update && \
    apt-get install -y --no-install-recommends ca-certificates curl libc6 python && \
    curl -sSL "https://github.com/krallin/tini/releases/download/v0.8.0/tini" -o /usr/bin/tini && \
    chmod +x /usr/bin/tini && \
    rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/usr/bin/tini", "--"]

$ docker build -t tini-tty .
$ docker run --rm -it tini-tty python

Commenting out the ENTRYPOINT and rebuilding the image results in a working TTY session. Non-interactive commands, such as $ docker run --rm -it tini-tty python --version work just fine.
Am I missing something simple here like an option? Thanks!

Indeed, this isn't super surprising. Interactive mode isn't something I have considered as a goal so far (and thus not something I worked on).
Now, that doesn't mean it shouldn't be supported! If it's lightweight and doesn't make the tool harder to use, then it should be supported (one of the design goals of Tini is that adding it shouldn't break things that would otherwise work).
I'll try to get to the bottom of this and fix it (happy to hear suggestions!).
Cheers,

Thanks! This isn't a mission-critical requirement... I just wondered if I was missing something obvious. FWIW, here's the output of running w/ -vvv:
Running in -vvv mode shows the following (Interrupt is the result of Ctrl-C):
$ docker run --rm -it tini python
[INFO ] Spawned child process 'python' with pid '8'
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
[DEBUG] Passing signal: 'Window changed'
[TRACE] No child to reap
[DEBUG] Received SIGCHLD
[TRACE] No child to reap
[...]

@mattwilliamsnyc just as a sidenote: you should check the hash of tini when curling it from github. See https://github.com/jenkinsci/docker/blob/master/Dockerfile for an example.

@danilobuerger Thanks! That example is not how I'm installing tini. I was just trying to keep it small and to the point... but out of curiosity, where did you get the checksum?

The first time you could just download it and do $ openssl dgst -sha1 tini

Ah, ok. I didn't know if this was published somewhere as an .asc or whatever. I have an update script that scrapes for the latest version and updates my base Dockerfiles:
curl -s https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'

I can do the hashing there and pin that as well. Thanks for the tip!

I eventually want to make this published somewhere (but right now the builds happen in Travis so it's not entirely trivial!)

Hey @mattwilliamsnyc,
I was able to reproduce the issue, and I think I have a fix for it in #21
We introduced this as a side effect of #15 (tests didn't catch it, but now we have some that will).
The problem is that the foreground process group on the tty is Tini, not the child process group, which thus means the child process (Python in your example) hangs when it tries to write to tty / set settings.
In Python's case, this happens when the readline module is loaded (you can see that by running python -vvv). Python gets interrupted by SIGTTOU, which is also tini receives a SIGCHLD with nothing to reap in the log you sent over.

The solution in #21 is to have Tini make the child process group the new foreground process group (and to gracefully bail if there is no tty).
I want to test a few last things before I merge it, but I think I'll do that soon.
Cheers,

Oh, and I was about to forget: thanks a ton for the report!

Hey @krallin,
Thanks for the explanation and the quick fix. I'll continue to report anything I encounter that doesn't match standard Docker behavior since that's a design goal.
Thanks again for the update and for all your work on this project!

All right, I fixed the concerns I had yesterday. Will probably merge and release a new version tomorrow!

@mattwilliamsnyc This should be fixed as of 0.8.2. I'm building new images and they should be live soon.
@danilobuerger since you're already in this thread ;). How do we get the Alpine packages updated to this new version? : )

I dont mind to carry on maintaining this package for alpine. So best way for the future would be if you ping me here or via twitter when you want it updated.

Awesome; thanks @danilobuerger. I'll continue pinging you in issues when a release goes out then! : )

Thanks for interactive / tty support! I was using dumb-init but had to switch because it doesn't support it (https://github.com/Yelp/dumb-init/issues/78).

Thanks @jamshid!


2.0: DO provisioning can randomly fail

Summary of Issue:
When spinning up a DO cluster, nodes can randomly fail.
Steps to Reproduce:

Spin up a DO cluster

Expected Results:
Clusters spin up without issue.
Actual Results:
Node provisioning randomly fails. You get the attached error in the SG logs.
Dev Info: (fill out and add links to log files)

go version: 1.10
SG latest commit hash or release tag: dddedff38267d34e16763fde1955ca4dec1cc5d7
Number of Masters and Nodes: Any
cloud provider: DO
do_issue.log

Seems to be resolved by another pull. If this continues please re-open. We also need more specific reproduction notes.


Will there be a readme of sorts? :)

Hi! Congrats on the release! I've been subscribed to them just in case. I'm glad you kept working on it ❤
Anywho... is there a readme on the roadmap? I feel like it would help me feel less lost when using the mod :)

@Setadokalo thank you! 💖

@Setadokalo thank you! 💖


SyntaxError: invalid syntax for print(file=saveto, *args, **kwargs)

i've got the error as the traceback below, when I try to run the command python setup_rouge.py
Traceback (most recent call last):
  File "setup_rouge.py", line 7, in <module>
    from files2rouge import settings
  File "/home/cerdas/files2rouge/files2rouge/__init__.py", line 2, in <module>
    from files2rouge.files2rouge import main
  File "/home/cerdas/files2rouge/files2rouge/files2rouge.py", line 17, in <module>
    from files2rouge import utils
  File "/home/cerdas/files2rouge/files2rouge/utils.py", line 16
    print(file=saveto, *args, **kwargs)
              ^
SyntaxError: invalid syntax

I have no idea whats wrong with the code, thanks.

Could you specify which python version you're running? (it's working on my 3.6.1)
You could try with print(*args, file=saveto, **kwargs), I guess using keyword (i.e. file=) before positional arguments (i.e. *args) may cause trouble.

Thanks, I change the python version to 3.x and its working properly.


table.unique's name parameter does not escape properly

Steps to reproduce:
Create an index with a table with a reserved keyword:
connection.schema.createTable(this.name, function configureTable(table) {
    //add columns here
    table.unique(['col1','col2'], 'all'); //all is the index name
})

This will output something like this:
create table `tableName` (`id` int(11) unsigned not null auto_increment primary key, `col1` datetime, `col2` float(12,2)); alter table `tableName` add unique all(`date`, `visitnumber`, `devicetype`, `trackingcode`, `clienttype`)

The key here is that if the index name was a reserved keyword such as "all" or "concatenate", it would not create the index. It will also output without error as the table was created successfully.

I just tried to reproduce the issue with knex 0.11.3
knex.schema.createTable('taabl', function configureTable(table) {
  table.string('col1');
  table.string('col2');
  table.unique(['col1','col2'], 'all');
}).toString()

postgres: 'create table "taabl" ("col1" varchar(255), "col2" varchar(255));\nalter table "taabl" add constraint "all" unique ("col1", "col2")'

mysql: 'create table `taabl` (`col1` varchar(255), `col2` varchar(255));\nalter table `taabl` add unique `all`(`col1`, `col2`)'

Seems to be quoted ok now and printed query actually did create table + constraint.


[Bug]: Leaf Pages always contain the top-menu as children

Plugin
@knodes/typedoc-plugin-pages
Typedoc plugin(s) version(s)
<EMAIL_ADDRESS>Typedoc version
0.24.6
Describe the problem
Hi, thanks for all your work on this plugin!
I am having trouble with the menu in the output.
Here is my config:
{
"pluginPages": {
    "source": "docs",
    "pages": [
      {
        "name": "Configuration",
        "childrenSourceDir": "./docs",
        "children": [
          {
            "name": "CLI usage",
            "source": "cli.md"
          },
          {
            "name": "Node.js usage",
            "source": "node.md"
          },
          {
            "name": "Templates",
            "source": "templates.md"
          },
          {
            "name": "Configuration Files",
            "source": "configuration_files.md"
          }
        ]
      }
    ]
  }
}

But the output looks like this (notice the duplication, highlighted in red):

What did you expected ?
I expect the pages to be the bottom of the navigation in these subsections. Not sure what I've done wrong.
I have toyed around with childrenDir, childrenSourceDir and children sub-grouping but to no avail.

Hi,
As mentionned in the README:

Compatibility
Plugins versions should match TypeDoc major.minor.x for compatibility.

You're using plugins v0.23, incompatible with Typedoc v0.24. I'm even surprised it worked at all.
I'm still trying to find time to make a 0.24-compatible version, but I'm super busy right now. So as far as I'm concerned, this is not a bug.
If Typedoc 0.23.x does the work for you, I recommend you rollback to it waiting for the plugin to be updated.

Very well, I have used a workaround with a custom CSS file for now, will do for the meantime :)
If anyone else is interested, this is the relevant CSS, also note the comments
/* replace "Configuration" and "Changelog" with relevant keys from `data-key` on `.tsd-index-accordion` */
.tsd-index-accordion[data-key*="Configuration."] ul.tsd-nested-navigation,
.tsd-index-accordion[data-key*="Configuration."] .tsd-accordion-summary > svg,
.tsd-index-accordion[data-key="Changelog"] ul.tsd-nested-navigation,
.tsd-index-accordion[data-key="Changelog"] .tsd-accordion-summary > svg,
/* Change the n + 6 to the correct number according to the menu items you have */
.tsd-index-accordion[data-key="Configuration"] li:nth-child(n + 6) {
  display: none;
}

Awesome trick, super clever ! Still, I recommend you to be super careful when updating Typedoc, it might break with this plugin entierly at any point


Update project architecture

Not much functional changes, but important refactoring of Pitclipse's architecture.
Changes in the architecture
The new architecture:

relies on a target platform to avoid platform-dependent builds
uses only OSGi bundles and avoids declaring dependencies in POM files
is split into more bundles in order to separate concerns

Version changes
This PR also introduces some major version changes:

bump Java version to 1.8
bump Pitest version to 1.4.6
bump project's version to 2.0.0

Code quality improvement
checkstyle.xml has also been slightly modified:

remove deprecated maxLineLength property of LeftCurly rule
allow methods that start with a single lower case letter

The code has been cleaned so that it is consistent and in accordance with Checkstyle's rules.
More tests are automated
Both unit & integration tests are launched by Travis CI.
Improved documentation
License headers have been added to source files.
Added some Markdown files that:

present the architecture
explain how to contribute

Fixed issues
This PR should fix the following issues:

#6 Change the Sonar build to run bdd tests
#69 Travis CI build
#72 fails to run tests on Eclipse Oxygen
#74 Always getting java.lang.IllegalArgumentException when running as PIT Mutation Test
#80 Inconsistent code style

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@d96b2d2). Click here to learn what that means.
The diff coverage is 85.02%.

@@            Coverage Diff            @@
##             master      #80   +/-   ##
=========================================
  Coverage          ?   85.02%
  Complexity        ?      299
=========================================
  Files             ?       45
  Lines             ?     1242
  Branches          ?       88
=========================================
  Hits              ?     1056
  Misses            ?      126
  Partials          ?       60

Impacted Files
Coverage Δ
Complexity Δ

...pitclipse/runner/server/PitServerProviderImpl.java
0% <0%> (ø)
0 <0> (?)

...er/src/org/pitest/pitclipse/runner/PitRequest.java
100% <100%> (ø)
6 <6> (?)

...org/pitest/pitclipse/runner/results/Mutations.java
100% <100%> (ø)
3 <3> (?)

.../results/summary/SummaryResultListenerFactory.java
100% <100%> (ø)
4 <4> (?)

...test/pitclipse/runner/config/PitConfiguration.java
100% <100%> (ø)
12 <12> (?)

.../pitest/pitclipse/runner/model/MutationSorter.java
100% <100%> (ø)
4 <4> (?)

...esults/mutations/RecordingMutationsDispatcher.java
100% <100%> (ø)
3 <3> (?)

...est/pitclipse/runner/service/PitclipseService.java
100% <100%> (ø)
2 <2> (?)

...itest/pitclipse/runner/client/PitCommunicator.java
100% <100%> (ø)
2 <2> (?)

...pitest/pitclipse/ui/notify/PitResultsNotifier.java
100% <100%> (ø)
3 <3> (?)

... and 35 more

Continue to review full report at Codecov.

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


PUT /api/user doesn't work according to swagger documentation

PUT /api/user doesn't work according to swagger documentation. Here is the error message:

Afaik, You need to pass authentication token to get a response

I removed the auth function, but there is still something wrong in the toString part...

This is the current error message:

started working on this


adding Data-Science Roadmap

Closes #559
Fixes Issue
Closes #559
Changes proposed
Adding the Data-Science Roadmap
Screenshots

screenshots which support your changes

@chaitanyakatore please do the changes as suggested by @inclinedadarsh

Hey @chaitanyakatore any updates on the changes?

in progress

did the changes as suggested by @inclinedadarsh

did all formatting and changes suggested by @siddhant-khisty

removed white spaces as suggested by @siddhant-khisty


SR-14221: Add tricky parsing test case for trailing closure

This PR adds a tricky parsing test case to ensure there is a correct interpretation of trailing closure.
Resolves SR-14221

@swift-ci Please smoke test

@varungandhi-apple Could you please review it? Thanks.

@swift-ci please smoke test

Hi, thanks for submitting the patch. Couple of points:

I think it would be helpful for this to be in a file with tests for trailing closures, instead of being its own file. I think you can rename test/Parse/multiple_trailing_closures.swift to trailing_closures.swift and add this check there.
New contributors can't trigger CI due to some trouble we've had in the past, but I can do that for you after you're done with making changes.

@swift-ci smoke test

CI is passing; merging! 🚢


add ecr list and delete image

Please check if the PR fulfills these requirements

[x] The commit message describes your change
[x] Tests for the changes have been added if possible (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)
[x] Changes are mentioned in the changelog (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

adds ecrDeleteImages and ecrListImages

What is the current behavior? (You can also link to an open issue here)
feature does not exist

What is the new behavior (if this is a feature change)?
adds ecrListImages ecrDeleteImages

Does this PR introduce a breaking change? (What changes might users need to make in their setup due to this PR?)
no

Other information:

I like the new pipeline steps but there seems to be a test failure.


Fix Bug in Issue Config when only contact links are set

Blank Issues should be enabled if they are not explicit disabled through the blank_issues_enabled field of the Issue Config. The Implementation has currently a Bug: If you create a Issue Config file with only contact_links and without a  blank_issues_enabled field,  blank_issues_enabled is set to false by default.
The fix is only one line, but I decided to also improve the tests to make sure there are no other problems with the Implementation.
This is a bugfix, so it should be backported to 1.20.

I was unable to create a backport for 1.20. @JakobDev, please send one manually. :tea:
go run ./contrib/backport 26521
...  // fix git conflicts if any
go run ./contrib/backport --continue

I was unable to create a backport for 1.21. @JakobDev, please send one manually. :tea:
go run ./contrib/backport 26521
...  // fix git conflicts if any
go run ./contrib/backport --continue


[Bug]: After reload a category page with a previous "itemPerPage" selected, the select start on 10

Expected Behavior

Enter Category page
Select 5, 15 or 20 on "show on page" select in bottom
Reload page
The select is populated with the url "itemsPerPage" query param

Actual Behavior

Enter Category page
Select 5, 15 or 20 on "show on page" select in bottom
Reload page
The select is populated with the url "itemsPerPage" with 10, even if we choose another value

Possible Solution
No response
Steps to reproduce
No response
What version of odoo integration are you using?
any
What version of Node.js are you using?
14.19.0
What browser (and version) are you using?
Chrome 98.0.*
What operating system (and version) are you using?
Linux
Relevant log output
No response
Code of Conduct

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

Fixed in previous versions / commits.


Add feature waitFunction to script

The purpose of this feature is to add waitFunctionStart and waitFunctionStop commands that are used to synchronize the execution of functions.
The start and stop signals are used by the commands to wait for the function to start or to complete before continuing the script execution.
The waitFunctionStart command causes the script to wait until a function with the given ID starts running. The script will continuously poll the function's state until it is determined that the function has started. Once the function is found to be running, the script will resume execution from where it left off.
Similarly, the waitFunctionStop command causes the script to wait until a function with the given ID stops running. The script will continuously poll the function's state until it is determined that the function has stopped. Once the function is found to be stopped, the script will resume execution from where it left off.
Example usage:

QLC v4:

waitfunctionstart:2 // Wait for function 2 to start
waitfunctionstop:0 // Wait for function 0 to stop
startfunction:3 // Start function 3

QLC v5:

Engine.waitFunctionStart(2); // Wait for function 2 to start
Engine.waitFunctionStop(0); // Wait for function 0 to stop
Engine.startFunction(3); // Start function 3

In this script, the function 3 is started only if function has started and function 0 has stopped after function 0 as started.

This pull request includes pull request #1573 Add feature stopOnExit to script
Thus it should be ignored or merged before this one.
#1573 description:
This feature introduces a new script command: stoponexit.
The purpose of this command is to control whether functions started during the script should be stopped at the end. When stoponexit is set to true, all functions started afterward will be stopped when the script finishes. By default, stoponexit is true.
Example usage:

QLC v4:

startfunction:1

stoponexit:false
startfunction:2

stoponexit:true
startfunction:3

stoponexit:false
startfunction:4

QLC v5:

Engine.startFunction(1);

Engine.stopOnExit(false);
Engine.startFunction(2);

Engine.stopOnExit(true);
Engine.startFunction(3);

Engine.stopOnExit(false);
Engine.startFunction(4);

In this script, functions 1 and 3 will be stopped at the end, but functions 2 and 4 will continue running.

Tested on v4 and v5 and working fine

coverage: 32.003% (-0.02%) from 32.027%
when pulling 248bae9a230d1d5c9c359f5cf71e5c538bc5146d on ldebs:waitFunction
into 351ee83b9a3df810d41fd155728d10ae39d5aa6d on mcallegari:master.

* please don't mix pull requests. It's a bad practice and lead to confusion

As this pull request need and include the #1573 one, I close the #1573.

* no need for polling the function status (which is very inefficient). The Doc class has signals for function running/stopped

I can't find the signals running/stopped handling in the Doc class.
For v4 (Script class), as I implemented it, there is no such things as polling the function status, except for the first execution of the waitFunction commands and I just call the running() or stopped() methods of the function that just return the internal field value.
The write loop exits because the waiting() function return false because the m_waitFunction is not NULL.
the value of m_waitFuntion is set to NULL when the function signals is received.

* this feature is very risky and can lead to Script hanging while waiting for external triggers. You need to be 100% sure the Script can be killed at any time and doesn't consume CPU for no reason.

The implementation has the same behavior as the wait command. The write loop is interruptible in the same way.
I adapted the v5 (ScriptRunner class) to handle signals like the v4 version and thus consume less CPU during the write loop.
Please, let me know how to handle running/stopped signals through Doc class

Merged, thanks :+1:


CSRF Tokens - Resend Confirmation

Context
CSRF Tokens can be generated by calling ‘/api/auth/csrf’ and are valid for the lifetime of the session.
  The API will attempt to resend the confirmation code to the user and return the exact Cogntio error to the sender.

Impact

3rd Party service impact (Cognito user pool usage calls and Notify emails for confirming users).
Hitting the maximum number of emails with Notify service.  This impacts GCForms users as no Form Responses, Testing Data Delivery, User Registrations, or passwords will be able to be completed.
Significant costs due to usage of Lambdas, Cognito, and Notify to send messages to users

Acceptance Criteria:

[x] Request rate limiting set at 100 reqs / 5min

Request rate set to 100 req/ 5 min in Production and Staging

Request rate set to 100 req/ 5 min in Production and Staging


'NoneType' object has no attribute 'strip'

AttributeError at /admin/<app>/<class>/<pk>/
'NoneType' object has no attribute 'strip'
...
Exception Location: /root/venv/nobleChaos/lib/python3.4/site-packages/mysql/connector/cursor.py in statement, line 868

The error is produced in /admin/ when submitting the edit of the Tags field of an object.
This error was caused by using mysql-connector-python==1.2.2 & django 1.65 & python 3.4.1. After changing to PyMySql, the error appears to be solved.
the django setup of PyMySql requires:

using 'ENGINE': 'django.db.backends.mysql',

impersonating that backend by modifying manage.py
try:
import pymysql
pymysql.install_as_MySQLdb()
except ImportError:
pass

I apologize in advance... I have fixed the error and didn't have a complete text-copy of the error/traceback.

I've run into this problem, and do have a traceback (see below).
Version information:

Python 3.4.0
Django 1.7.3
django-taggit 0.12.2
mysql-connector-python 2.0.1

Exception Type: AttributeError
Exception Value: 'NoneType' object has no attribute 'strip'
Here's the traceback:
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/contrib/admin/options.py" in wrapper
  583.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
  105.                     response = view_func(request, *args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/contrib/admin/sites.py" in inner
  206.             return view(request, *args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/contrib/admin/options.py" in change_view
  1456.         return self.changeform_view(request, object_id, form_url, extra_context)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapper
  29.             return bound_func(*args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/utils/decorators.py" in _wrapped_view
  105.                     response = view_func(request, *args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/utils/decorators.py" in bound_func
  25.                 return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/transaction.py" in inner
  394.                 return func(*args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/contrib/admin/options.py" in changeform_view
  1405.                 self.save_related(request, form, formsets, not add)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/contrib/admin/options.py" in save_related
  1067.         form.save_m2m()
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/forms/models.py" in save_m2m
  100.                 f.save_form_data(instance, cleaned_data[f.name])
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/taggit/managers.py" in save_form_data
  329.         getattr(instance, self.name).set(*value)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/taggit/utils.py" in inner
  128.         return func(self, *args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/taggit/managers.py" in set
  171.         self.add(*tags)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/taggit/utils.py" in inner
  128.         return func(self, *args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/taggit/managers.py" in add
  155.             tag_objs.add(self.through.tag_model().objects.create(name=new_tag))
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/manager.py" in manager_method
  92.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/query.py" in create
  372.         obj.save(force_insert=True, using=self.db)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/taggit/models.py" in save
  59.                     res = super(TagBase, self).save(*args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/base.py" in save
  589.                        force_update=force_update, update_fields=update_fields)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/base.py" in save_base
  617.             updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/base.py" in _save_table
  698.             result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/base.py" in _do_insert
  731.                                using=using, raw=raw)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/manager.py" in manager_method
  92.                 return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/query.py" in _insert
  921.         return query.get_compiler(using=using).execute_sql(return_id)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/models/sql/compiler.py" in execute_sql
  920.                 cursor.execute(sql, params)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/debug_toolbar/panels/sql/tracking.py" in execute
  159.         return self._record(self.cursor.execute, sql, params)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/debug_toolbar/panels/sql/tracking.py" in _record
  125.                     self.cursor, sql, self._quote_params(params)),
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/mysql/connector/django/base.py" in last_executed_query
  369.         return cursor.statement
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/django/db/backends/utils.py" in __getattr__
  25.         cursor_attr = getattr(self.cursor, attr)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/mysql/connector/django/base.py" in __getattr__
  145.         return getattr(self.cursor, attr)
File "/home/leigh/environments/nestle/lib/python3.4/site-packages/mysql/connector/cursor.py" in statement
  858.             return self._executed.strip()

This looks like a bug in mysql-connector-python to me.
self._executed gets initialised to None: https://github.com/mysql/mysql-connector-python/blob/master/lib/mysql/connector/cursor.py#L273
statement property accesses self._executed without checking if it has a value first: https://github.com/mysql/mysql-connector-python/blob/master/lib/mysql/connector/cursor.py#L856

Thanks for looking into this.
That diagnosis seems sensible given the original report from @ogrotten stating that PyMySql works correctly. Looks like I need to plan a migration! The try...catch in the statement property (https://github.com/mysql/mysql-connector-python/blob/master/lib/mysql/connector/cursor.py#L855-858) makes it look like someone's already tried to fix this in mysql-connector-python.
I guess you can probably close this now.

I've now migrated to mysqlclient and django-taggit works as expected.


[MM-53847] Expose isDev API to allow webapp to check if the app is in dev mode

Summary
This change is being done to allow the Desktop App to continue to authenticate properly against versions of the server/webapp that have the new Desktop Auth flow enabled (see here: https://github.com/mattermost/mattermost/pull/24140)
It exposes a boolean call to check if the app is in dev mode, and if so, the server/webapp will post a deep link to the mattermost-dev: protocol which should avoid interference with the locally installed production version.
Ticket Link
https://mattermost.atlassian.net/browse/MM-53847
NONE

@calebroseland Can you please expedite review so we can cut v5.5 RC1? Thanks!


[CON-227] Model Roles

Validations

[X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
[X] I'm not able to find an open issue that requests the same enhancement

Problem
There's currently no way to specify a model to use for Cmd+I or other specific features (currently it uses whatever is manually selected in the dropdown).
Solution
Add a "modelRoles" section to config.json that allows specification of model titles for each of several tasks. For example, this might look like:
{
  "models": [
    {
      "title": "Claude 3 Sonnet",
      "provider": "anthropic",
      "model": "claude-3-sonnet-20240229",
      "apiKey": "ANTHROPIC_API_KEY"
    },
    {
      "title": "Llama 3",
      "provider": "ollama",
      "model": "llama3"
    },
    {
      "title": "Starcoder 2 3b",
      "provider": "ollama",
      "model": "starcoder2:3b"
    }
  ],
  "modelRoles": {
    "cmdI": "Llama 3",
    "chat": "Claude 3 Sonnet",
    "autocomplete": "Starcoder 2 3b"
  }
}

CON-227

modelRoles in config.json should be the default for all IDEs, but the model roles should be overrideable in vscode settings.json and in jetbrains preferences respectively

I'd avoid using cmdI as it's a Mac-specific shortcut. interactive maybe?

Model title as modelrole key is a no-go. When using ollama autodetect, the models are not listed in the config.json file. e.g. I have:
    {
      "model": "AUTODETECT",
      "title": "Ollama",
      "completionOptions": {},
      "apiBase": "http://localhost:11434",
      "provider": "ollama"
    }

But I can select:
You might want to support at least <model title>:<actual model key>

Agreed this is a problem. Autodetect is the way to go but it blocks using modelRoles.

Ideally we would be able to set modelRoles in the UI as well.

@fbricon @buck-0x I just made this commit (https://github.com/continuedev/continue/commit/721ce6c7992de326f2a4e6bfb9c092247244ce6d) which introduces a model role called "inlineEdit", rather than "cmdI" for the reason you mentioned.

You might want to support at least :

If you are using AUTODETECT, you can follow the pattern used in the UI. For example, with "title": "Ollama" and the name of the autodetected model being "llama3:latest", you could set "inlineEdit": "Ollama - llama3:latest"

I still think these properties should be overrideable per IDE. At the very least, provide the model role properties under an ide parent node, using keys as vscode, idea, ....

Tried the pre-release. I selected an invalid model, then requested something, the extension didn't error, provided some response, but I don't know which model was used. So did it really work? was it accidental fallback? I think there should be some feedback, in the form of a notification, in case the model is invalid/unreachable


Close #131

Is yarn finally working smoothly? I once tried to use yarn for Fela and it was not able to correctly resolve all the packages.

I believe it is. I tested it thoroughly with thoroughly with https://github.com/este/este, which is pretty huge project. The only problem was wrong published react-router 4 aplha. Ensure you have 0.17.8 version.


Support Module Import / Export

Sometimes I'm spinning up worlds fresh and just want to bring over as all my modules with me. Would be awesome if there was somehow to support module import/export. I've seen this (https://foundryvtt.com/article/module-development/#options) but don't know if that's helpful

Thanks for the suggestion.  You can bundle other modules with a module, but not dynamically install them.   That would be a security flaw if someone included a virus module or some other module that was purposely made to cause issues with Foundry Core.  There would be no way to exclude that from the adventure file easily.  What you're looking for is something of a world setup, which this was never meant to be, it was only for importing and exporting content, not functionality.

Thanks for the thoughtful reply @cstadther, I learned something. Will look into a different approach to accomplish what I'm looking for. Thanks again!

No matter how I change things, every time I try to import an exported file, it fails and says "The provided scene thumbnail does not have a valid file extension." I've regenerated the images and exported again but no luck. How can I fix this?


Which datasets were trained on?

Hello,
Would it be possible to have a list of the datasets that were trained on?
Thanks!

Please see section 4.6 in our manuscript https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>8439 for the datasets we used. If you are interested in the pretraining datasets, we filtered and manually downloaded them from the cellxgene portal. The first paragraph in section 4.6 describes this process.
For legal reasons, we don't release the pretraining datasets for now. However, I think you can follow the same process to download a similar collection of data from the cellxgene portal. Note that we downloaded the data last year, so the exact collection after filtering may vary a bit now on the portal website.

Close the issue for now. Let me know if this is any further questions or comments

Hi,
I was wondering what was the reason for focusing so strongly on immune/PBMC datasets for pre-training if this is supposed to be a model that generalizes well across datasets.