Add layouts directory under _patterns

To accommodate Twig's modularity I'd suggest adding a layouts directory under _patterns, between organism and templates this way:
patterns
|__00-atoms
|__01-molecules
|__02-organisms
|__03-layouts
|__04-templates
|__05-pages

The idea is to have general layout templates in layouts that are not really templates of pages, but rather micro layout components, which with be extended in templates using the extends and embed tags in `templates. Something along the lines of:
03-layouts/baseLayout.twig:
<header>
  {% block header %}
  {% endblock header %}
</header>

{% block content %}
{% endblock content %}

<footer>
  {% block footer %}
  {% endblock footer %}
</footer>

03-layouts/fixedFluid.twig:
  <div class="l-fixed-fluid-wrapper">
    <main class="l-fluid-column">
      {% block fluidCol %}
      {% endblock fluidCol %}
    </main>
  </div>
  <aside class="l-fixed-column">
      {% block fixedCol %}
      {% endblock fixedCol %}
  </aside>

03-templates/articlePage.twig:
{% extends `layouts-baseLayout` %}

{% block content %}
  {% embed `layouts-fixedFluid` %}
      {% block fluidCol %}
        ... content ...
      {% endblock fluidCol %}
      {% block fixedCol %}
        ... content ...
      {% endblock fixedCol %}

  {% endembed %}
{% endblock content %}

If this is to much of a break from the Mustache edition, I guess they could be included in either oragnizms or templates, but it makes sense to me from a Twig perspective and, I think, lives pretty well with Atomic Design principles.

@TxHawks -
Not too much of a break. I would put them at 05- just because I don't think it really has anything to do with AD and is more about leveraging the template language. Hell, you don't even need the ordinal.  I'd even make sure they got hidden in the nav.
Have you tried implementing layouts? You should just be able to create the folder and layouts and go to town. PL should keep happily working. PL doesn't know anything about AD. That's completely defined by the organization and naming convention that you use in source/_patterns/. Try renaming something and you'll see.
PS - Technically, the PHP version of Mustache has a BLOCKS feature but it's not spec-compliant as far as I know.

I did implement layouts and it works great. Just wanted to suggest it to be part of the default directory layout, and maybe the demo so it can help users easily understand templating options and points to best practices.
I wouldn't mind it being `05-
Didn't know about blocks in the Mustache version. Whish I did a while back... It isn't anywhere in the documentation, right? Are there any other hidden Mustache features the Mustache version?

@TxHawks -
AD is in Brad's wheelhouse. I'm just an implementor ;) Since blocks and filters aren't spec-compliant in Mustache they're a little annoying to set-up. I never supported that in PL1. PL2 supports filters though I'm calling them helpers since you use the addHelper() method to make them work in Mustache. They're quite weak compared to Twig though. Tough to have filters in a template language that takes a strong stand on not having business logic in templates ;)

Hey @TxHawks,
Thanks for the extra info about all the Twig stuff. I've been following
from a distance and it looks really interesting.

Just wanted to suggest it to be part of the default directory layout, and
maybe the demo so it can help users easily understand templating options
and points to best practices.

Feel free to set up a Twig-specific demo showcasing what you feel is the
best structure for working this way. However, adding a new layer definitely
won't be included into the default PL directory and the demo. Again, as
@dmolsen mentioned PL is super malleable, so the atomic design structure
can be modified, extended, or bulldozed completely. But the default atomic
design structure will continue to be the PL default.
On Sunday, March 1, 2015, Dave Olsen<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

@TxHawks https://github.com/TxHawks -
AD is in Brad's wheelhouse. I'm just an implementor ;) Since blocks and
filters https://github.com/bobthecow/mustache.php/wiki/FILTERS-pragma
aren't spec-compliant in Mustache they're a little annoying to set-up. I
never supported that in PL1. PL2 supports filters though I'm calling them
helpers since you use the addHelper() method to make them work in
Mustache. They're quite weak compared to Twig though. Tough to have filters
in a template language that takes a strong stand on not having business
logic in templates ;)
—
Reply to this email directly or view it on GitHub
https://github.com/pattern-lab/edition-php-twig-development/issues/12#issuecomment-76536332
.

--

Brad Frost
http://bradfrost.com
http://twitter.com/brad_frost

@TxHawks -
Actually, I thought of a different way to tackle this so it doesn't affect the demo structure because these aren't "patterns." I could follow the organizational structure of "macros" and do something like source/_layouts. I do think we need a clear way to embrace the extension points of Twig since it has a whole lot more options than Mustache. They don't have to be required but they have to be accounted for.

Hey @bradfrost,
Makes perfect sense that it won't be part of the demo. It's very Twig-centric.
@dmolsen - A clear and easy way to extend Twig in PL would be very exciting. An ability to easily add custom Twig filters and functions by just placing simple php files in a folder would be great.
The source/_layouts directory is another issue though, as they are definitely not  extensions. On the one hand, it makes sense, and feels like and extension of the _meta directory idea. On the other hand, it's a bit different, as layouts actually need to be actively extended or embeded in patterns. Placing them outside the _patterns directory may be confusing, I'm not sure.
Perhaps a better option could be source/_patterns/_layouts?

Twig-centric is a great band name.

Brad Frost
http://bradfrost.com
http://twitter.com/brad_frost
On Mon, Mar 2, 2015 at 10:42 AM, TxHawks<EMAIL_ADDRESS>wrote:

Hey @bradfrost https://github.com/bradfrost,
Makes perfect sense that it won't be part of the demo. It's very
Twig-centric.
@dmolsen https://github.com/dmolsen - A clear and easy way to extend
Twig in PL would be very exciting. An ability to easily add custom Twig
filters and functions by just placing simple php files in a folder would
be great.
The source/_layouts directory is another issue though, as they are
definitely not extensions. On the one hand, it makes sense, and feels like
and extension of the _meta directory idea. On the other hand, it's a bit
different, as layouts actually need to be actively extended or embeded in
patterns. Placing them outside the _patterns directory may be confusing,
I'm not sure.
Perhaps a better option could be source/_patterns/_layouts?
—
Reply to this email directly or view it on GitHub
https://github.com/pattern-lab/edition-php-twig-development/issues/12#issuecomment-76775868
.

@TxHawks -
I'm not sure how it'd be confusing. Not any more confusing than source/_meta/ at least. I think for now we'll run with source/_patterns/05-layouts or whatever someone wants to set-up because we know that works. I would like a clear "best practice" at some point though. Hopefully more Drupal folks can chime in too.
 Right now the same concept for Mustache requires an install via Composer and registration of the function with the PatternEngine. It's not "drop in a folder" and go. I'll have to play around but I don't want to have to rely on eval().

@dmolsen -
It's not a huge deal, but source/_layouts could be slightly less obvious than source/_meta. From a user's perspective, _meta "just works". You don't extend it, you don't embed it, it just wraps all your partials "by itself". In that sense, layouts are more similar to pattern partials.
source/_patterns/05-layouts works out for me for the time being, but I agree that a clear best practice sohuld be established.

@TxHawks -
Got filters working. I guess the same technique can be used for functions and tests. The problem at the moment is that _source gets a little crowded. We could be looking at a project that has this possibly:
  source/
    |_ _annotations
    |_ _data
    |_ _filters
    |_ _functions
    |_ _layouts
    |_ _macros
    |_ _meta
    |_ _patterns
    |_ _tests
    |_ css
    |_ favicon.ico
    |_ fonts
    |_ images
    |_ js
    |_ styleguide

That's a little crowded. Maybe just a source/_twig-components with filters, functions, layouts, macros, and tests listed underneath would work better? Any other ideas?

@dmolsen -
Wow, great. I really didn't expect anything so soon after you said filters and functions make you queasy :). I should really buy you a beer.
So, are they just drop in directories after all? Should I composer update pattern-lab/patternengine-php-twig?
I think source/_twig-components makes sense for _filters, _functions tests (and theoretically tags, though that's probably overkill and more complicated), which are indeed extensions of Twig itself, while _macros and _layouts aren't.
Come to think about it, my earlier point about _layouts is also true for _macros, so in the least, they should stay under source. Just my two cents.
About that beer - any way to show my appreciation?

@TxHawks -
I haven't committed the feature yet. Trying to wrap my arms around all of the possibilities. I hadn't even considered tags but I should keep it mind. The same technique for filters should work for tags. Only difference is class loading :)

The final layout for source/ directories in Twig-related projects will need to look like:
  source/
    |_ _annotations
    |_ _data
    |_ _layouts
    |_ _macros
    |_ _meta
    |_ _patterns
    |_ _twig-components
           |_ filters
           |_ functions
           |_ tags
           |_ tests
    |_ css
    |_ favicon.ico
    |_ fonts
    |_ images
    |_ js
    |_ styleguide

In this way layouts don't show up under _patterns though technically someone can still do that. Hopefully this layout gives the hint that they shouldn't do that. This layout will be used in the Base StarterKit for Twig. This is the StarterKit that will be installed if someone wants an empty starting point and uses the php core/console --starterkit --init command.


sessionAuthenticated not called in PhantomJS tests

I have a basic acceptance test to test for redirection after successful login.
The redirection is implemented with the routeAfterAuthentication config.
The redirect works in development.  It also works in testing with chromedriver.  However it does not work with phantomjs.
I dropped a console.log in the sessionAuthenticated handler and noticed that it is not fired when I run my test with phantom.

This stemmed from the fact that PhantomJS does not implement String.prototype.includes.  I had a mirage handler to authenticate if the post request contained a certain password which was failing silently in Phantom.


Get allocations info

Add possibility to get information about Allocations with Server::get_allocations_info method. This method returns HashMap<FiveTuple, AllocationInfo>.
Now AllocationInfo provides fivetuple, name and transmitted bytes, but can be extended.

@k0nserv a new PR is ready for your review :)


Can't set custom validation messages for nested fields.

Data structure:
Schemas = {};
Collections = {};

Schemas.Post = new SimpleSchema({
    title: {
        type: String
    },
    category: {
        type: String,
    },
    comments: {
        type: [Object],
        defaultValue: []
    },
    'comments.$.nick': {
        type: String
    },
    'comments.$.content': {
        type: String
    }
});

Schemas.Post.messages({
    'required': 'Generic custom message',
    'required category': 'Specific custom message for category field'
});

For top level fields (like title) the generic message is displayed. For the category field the specific message is displayed. But for the nested fields (like comments.$.content) i get the default SimpleSchema message (I mean: [label] is required). I tried to override it this way:
Schemas.Post.messages({
   'required comments.$.content': 'My custom, message',
});
```

but it doesn't work.

**// Edit;**

I was able to override default messages for nested fields using global SimpleSchema object.
``````javascript
SimpleSchema.messages({
    required: 'Generic required message'
});
```

But it's a work around not a solution.

Thanks for your patience. SimpleSchema 2.0.0-rc.1 is now released and should fix this bug.
There are a number of breaking changes when updating to 2.0, so be sure to check out the change log. If you use aldeed:collection2, you will need to use 2.10.0 or higher of that package in order to use SimpleSchema 2.0. If you use autoform, it is not yet updated to work with SimpleSchema 2.0, but hopefully soon.
SimpleSchema is now an isomorphic NPM package, so you can check out the updated readme and file issues over at the other repo. The Meteor wrapper package will exist for now but eventually I will probably deprecate support for it.
This is still a beta/RC and I do expect people will find issues, so use with caution. Production use is not yet recommended. That said, there are more and better unit tests than ever before, and the codebase should be much easier for others to read through and debug quickly.


Valinor may crash when encountering a PHPStan/Psalm type syntax it doesn't support yet

It appears that Valinor may crash when encountering a type syntax it doesn't support yet. This can be an issue as this prevents from using some PHPStan/Psalm features on objects that may be mapped by Valinor.
For example, the following code:
<?php

require 'vendor/autoload.php';

class B {}

class A
{
    /**
     * @phpstan-param ($a is 1 ? B : null) $b
     * @param B|null $b
     */
    public function __construct(
        public readonly int $a,
        public readonly ?B $b,
    ) {
    }
}

return (new \CuyZ\Valinor\MapperBuilder())
    ->mapper()
    ->map(
        A::class,
        new \CuyZ\Valinor\Mapper\Source\JsonSource('{"a":0,"b":null}')
    );

leads to this assertion failure:
PHP Fatal error:  Uncaught AssertionError: assert(!$type instanceof UnresolvableType) in src/Mapper/Tree/Shell.php:31
Stack trace:
#0 src/Mapper/Tree/Shell.php(31): assert()
#1 src/Mapper/Tree/Shell.php(41): CuyZ\Valinor\Mapper\Tree\Shell->__construct()
#2 src/Mapper/Tree/Builder/ObjectNodeBuilder.php(50): CuyZ\Valinor\Mapper\Tree\Shell->child()
#3 src/Mapper/Tree/Builder/ObjectNodeBuilder.php(23): CuyZ\Valinor\Mapper\Tree\Builder\ObjectNodeBuilder->children()
#4 src/Mapper/Tree/Builder/NativeClassNodeBuilder.php(39): CuyZ\Valinor\Mapper\Tree\Builder\ObjectNodeBuilder->build()
#5 src/Mapper/Tree/Builder/CasterNodeBuilder.php(24): CuyZ\Valinor\Mapper\Tree\Builder\NativeClassNodeBuilder->build()
#6 src/Mapper/Tree/Builder/UnionNodeBuilder.php(37): CuyZ\Valinor\Mapper\Tree\Builder\CasterNodeBuilder->build()
#7 src/Mapper/Tree/Builder/InterfaceNodeBuilder.php(51): CuyZ\Valinor\Mapper\Tree\Builder\UnionNodeBuilder->build()
#8 src/Mapper/Tree/Builder/CasterProxyNodeBuilder.php(24): CuyZ\Valinor\Mapper\Tree\Builder\InterfaceNodeBuilder->build()
#9 src/Mapper/Tree/Builder/IterableNodeBuilder.php(26): CuyZ\Valinor\Mapper\Tree\Builder\CasterProxyNodeBuilder->build()
#10 src/Mapper/Tree/Builder/StrictNodeBuilder.php(36): CuyZ\Valinor\Mapper\Tree\Builder\IterableNodeBuilder->build()
#11 src/Mapper/Tree/Builder/ErrorCatcherNodeBuilder.php(33): CuyZ\Valinor\Mapper\Tree\Builder\StrictNodeBuilder->build()
#12 src/Mapper/Tree/Builder/RootNodeBuilder.php(16): CuyZ\Valinor\Mapper\Tree\Builder\ErrorCatcherNodeBuilder->build()
#13 src/Mapper/TypeTreeMapper.php(44): CuyZ\Valinor\Mapper\Tree\Builder\RootNodeBuilder->build()
#14 src/Mapper/TypeTreeMapper.php(25): CuyZ\Valinor\Mapper\TypeTreeMapper->node()
#15 test.php(24): CuyZ\Valinor\Mapper\TypeTreeMapper->map()
#16 {main}
  thrown in src/Mapper/Tree/Shell.php on line 31

Should Valinor fallback to the unprefixed @param in this case?

Hey there, thanks for the report!
I think that the fallback option is not the best as it cannot be guaranteed that the @param annotation works as well.
I was thinking about adding a @valinor-* annotation support that has precedence over all the others, for the following cases: @valinor-var, @valinor-param, @valinor-return, @valinor-extends, @valinor-template, @valinor-type.
WDYT?

@stiflerbox your usecase was actually a "bug" (rather an unwanted feature actually 😛 ), see #520.


PrivateGPT.py missing,

Launching privateGPT...
C:\Users\Acer\anaconda3\envs\pgpt\python.exe: can't open file 'C:\TCHT\privateGPT\privateGPT.py': [Errno 2] No such file or directory
Please, help, ty.

Can you pull last changes and follow docs instructions?


Add updateIn, getIn, setIn, removeIn

I'm back from #4.
Adds the following methods to Dictionary:

updateIn(dictionary, keyPath, updater, notSetValue)
getIn(dictionary, keyPath, default)
setIn(dictionary, keyPath, newValue)
removeIn(dictionary, keyPath)

Implementations and test cases are similar to Immutable.js's implementations of these methods.
Todo:

[x] Implementation
[x] Write tests
[ ] Make sure this is something we would want to add
[ ] Documentation

@freddylist Should I proceed with this PR? I'd like to get the greenlight that this is something worth contributing.

Hello, thanks for the PR!
Any new features to Llama are probably not worth pursuing at the moment; I have just updated the readme with a notice that I will no longer be maintaining Llama.
If it's ok with you, I will just leave this PR hanging. :)
Thanks again!


ML: Category issues - desktop

CATEGORIES

[ ] On a large monitor the bottom of the panel is a different colour, needs to match up, example from build: HIGH

[ ] Categories/filters panel should not scroll by itself, it should just scroll with the page @phoebemirman is this something we can quickly switch on/off? HIGH

[ ] Top 5 category icons, crypto, sports and politics are not correct Figma HIGH

[ ] Categories have no hover states, see text link states here Figma LOW

[ ] Style updates to category items: [See states in Figma] (https://www.figma.com/file/GKhft5ZOwuH3ANrupGNCLHUU/Market-list-page?node-id=1343%3A1618) HIGH

[ ] See panel 1 on figma - category text style in the default state are bold
[ ] See panel 1 on figma - styling to the default state of the count for each category has been updated (new text colour, fill colour and border added)
[ ] See panel 2 on figma - styling to the active state of the count for each category has been updated (same as above with new text colour)
[ ] See panel 2 on figma - when a category has been selected, only the active category text is bold, all other categories use regular text style

[ ] When I select a category, it should be left aligned with "category" text above, currently it's indented slightly, example of this in the build: HIGH

[ ] When I select a category, the alignment of the categories doesn't match the alignment from the default state, and the back arrow icon should be centre aligned with the category icons, see example of this in the build: LOW

[ ] When I select a category, the counts are not the same distance from the right side of the column, they have moved in a few pixels, they should be the same HIGH Example from build:

[ ] The "+ Show more (2)" link colour needs to be changed to "text primary" or E0DFDF HIGH

[ ] The "+ Show more (2)" link is missing a hover state LOW

[ ] When I click the  "+ Show more (2)" link, the link disappears, it needs to update to "- Show less" which then collapses the list back up HIGH

The first 3 issues mentioned here are not fixed. Any update on these 3 @phoebemirman ?
Everything else are styling related and have been replaced by another ticket.

ill check out the first one and the others we can keep in backlog


Allow timeout to be configurable via the cli

Please do... Currently I have to monkey-patch your module, because the default timeout of 5 seconds is to short for slower servers.


Run pipeline on remote

When using CLI commands the pipeline initialization is done on a worker process.
The process can request ray remote resources via (multiple) -r options, e.g. -r "num_cpus:3" -r "resources.my_resource:1".
With this the main pipeline process can be requested to run on a worker machine.
If debug: True is detected in a pipeline config the process will not be started in a worker process (making it easier to use ipdb).
~Currently using eogrow config.json will spawn a local cluster if it does not exist yet. This might be a win for researchers, but after some testing i got 72 idle ray processes so I'm inclined to put brakes on that.~
The cluster has to be started manually even when running locally. I get lots of zombie processes if i let python do it.
Any names are up to debate, I think there is a lot of repetition between these and the pipeline parameters.
The one downside i see is that all stdout logs now have a worker-process prefix (file logs are fine). Maybe we could/should get rid of that? takes up valuable screen space.

a downside of this approach is that in chain configs one cannot specify main-process resources per-pipeline.
However this can probably be alleviated by simply having worker instances be big and the worker instance with the main-process can also process eopatches on the side (one can reserve 16GB memory for the main process and appropriately less worker processes will be run on that worker)

in the end we decided to go with config chain improvements


example fails on new Linux Mint install

Hello, I found csv-plot searching for csv plotting utilities and installed locally on current Linux Mint 21.3 (i.e. did NOT use sudo with "pip install..."). I followed the first example (example_file.txt and configuration-1.yaml), which resulted in the following output (seems to be advisory, nothing actually says "error"), but I'm not seeing a graph.
Am I doing something wrong? Assistance would be greatfully appreciated, csv-plot appears to be exactly the tool I've been looking for!
Cheers,
Dale
dale@firefly:~/Documents$ csv-plot ./example_file.txt -c ./configuration-1.yaml
Process CSV file... Traceback (most recent call last):
  File "/home/dale/.local/bin/csv-plot", line 8, in <module>
    sys.exit(app())
  File "/home/dale/.local/lib/python3.10/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/dale/.local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/dale/.local/lib/python3.10/site-packages/typer/main.py", line 497, in wrapper
    return callback(**use_params)  # type: ignore
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/entrypoint.py", line 279, in main
    pad_and_sample(csv_path, FILES_DIR, x, cpu_count())
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 336, in pad_and_sample
    sample_sampled_to_the_end(nb_workers, dir_path, 1)
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 283, in sample_sampled_to_the_end
    sample_sampled_to_the_end(nb_workers, sampled_global_dir, index + 1)
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 283, in sample_sampled_to_the_end
    sample_sampled_to_the_end(nb_workers, sampled_global_dir, index + 1)
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 283, in sample_sampled_to_the_end
    sample_sampled_to_the_end(nb_workers, sampled_global_dir, index + 1)
  [Previous line repeated 3 more times]
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 262, in sample_sampled_to_the_end
    if are_files_fully_sampled(current_sampled_dir):
  File "/home/dale/.local/lib/python3.10/site-packages/csv_plot/csv/pad_and_sample.py", line 79, in are_files_fully_sampled
    next(lines)
StopIteration
dale@firefly:~/Documents$

dale@firefly:~/Documents$ head ./example_file.txt
index,sin,cos,sin_rand,cos_rand
0,0,1,-0.07456652762,1.039341379
1,0.06379051953,0.9990267284,0.122423516,1.098801076
2,0.1273332336,0.9941147013,0.1391795401,0.9790017212
3,0.1903813146,0.9852872507,0.2364198969,0.8756242061
4,0.2526898872,0.9725831611,0.3508306833,0.9489513789
5,0.3140169944,0.9560565163,0.3985702648,1.018873161
6,0.3741245527,0.9357764859,0.4404979239,0.8948342146
7,0.4327792916,0.9118270525,0.4145093978,0.9751999311
8,0.4897536741,0.88430668,0.4701196006,1.004694956
dale@firefly:~/Documents$

dale@firefly:~/Documents$ cat configuration-1.yaml
general:
  variable: index

curves:
  - variable: sin

dale@firefly:~/Documents$

Fyi, I found pyqtgraph fails when run directly per pyqtgraph doc introduction page (https://pyqtgraph.readthedocs.io/en/latest/getting_started/introduction.html)
dale@firefly:~/Documents$ python3 -m pyqtgraph.examples
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: offscreen, eglfs, minimal, linuxfb, wayland, xcb, minimalegl, vkkhrdisplay, vnc, wayland-egl.

Aborted (core dumped)
dale@firefly:~/Documents$


feat: add worflow for smoke test stage and prod

Description
Changes proposed in this pull request:

feat: add worflow for smoke test stage

Related issue(s)

/hold

/unhold


clip_model_weights and auto_layer_k

Hello,
in you paper under Appendix I Table 3 you list different hyperparameter combinations. For the ViT-B/16 CLIP model you vary weighting it with 1.0 and with 0.0. Does a weight of 0.0 mean turning the adaptive layer selection off? If so, wouldn't different values for auto_layer_k be useless when using [1.0, 0.0] for clip_model_weights? My thinking is: if you weigh the global loss with 0, the w codes will remain untouched. This means, that you cannot rank the importance of the corresponding layers and thus not select any layers at all.
In the same vein, does it make sense to use values other than 1.0 or 0.0 for the clip_model_weights? I would say no, because it would effectively just be another way to influence the learning rate. Or am I missing something?
Thank you!

The entire pipeline could have been implemented using any of the available CLIP models, or a mix thereof. Setting the weight of the ViT-B/16 CLIP model to 0.0 just means that it did not contribute to any of the loss / layer selection calculations. The other CLIP model (ViT-B/32) would still be used, and you could simply rank the layers according to its output (rather than a weighted sum of the outputs of several CLIP models).
The instances where adaptive layer selection is off are the instances where the number of selected layers is the same as the number of W-code inputs for the model (e.g. 18 for the 1024x1024 FFHQ model).
It does make sense to use values other than 1.0 and 0.0. Each CLIP model leads to different visual effects. Using models with smaller patch sizes (16, 14) leads to better identity preservation. Using larger models (32) typically leads to better representation for styles etc. You can use values between 1.0 and 0.0 in order to interpolate between these preferences and decide how much importance you want to place on each.
If you're only using one CLIP model, then you are correct that you may as well just use 1.0 or 0.0 and play with the scale of the loss instead.

I see, there was a misunderstanding on my part. So for both, the global and directional loss, you use the same two CLIP models (ViT-B/32 and ViT-B/16)? And for both losses you sum the individual CLIP losses from ViT-B/32 and ViT-B/16?

Every place where we use CLIP, we use the same weighted combination of the two models, yes. In practice, for many of our results (as you saw in the supp table), we set the weight of one of the models to 0, which effectively means we used just one model.
The 32/B model has larger patch sizes, and it focuses less on local content and more on global things like style. The 16/B model helps somewhat when you want to improve smaller scale attributes like shape. There's also a 14/L model, but it almost always makes the results worse :) You can add it to help improve identity preservation, but you'll probably want to give it a low weight.


local variables work in development, but not during build

Expected behavior and actual behavior
I'm trying to build and deploy my dynamic page but when building it, middlemen doesn't recognize the local variables. It did recognized them in development though.
undefined local variable or method curso' for #<#Class:0x007fb1bdc13c40:0x007fb1c41c3c20>`
I know there was a similiar issue some time ago,  #1766, but I don't understand how it got solved.
Steps to reproduce the problem (from a clean middleman installation)
Additional information

Ruby version: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin15]
Middleman version:  gem 'middleman', '~> 4.2'
OS version: 10.11.5 (15F34)

I solved it by adding ignore: true on my config.rb


EIP-1559 not supported

Summary
Nodes don't create EIP-1559 transactions and can't verify other nodes whose transaction is an EIP-1559 one.
Steps to reproduce

Create a wallet with some gETH for a new node
Create an EIP-1559 transaction from said wallet
Try to launch a light node with said transaction as proof for the overlay address

Expected behavior
Nodes should create type 2 transactions and verification should just work with EIP-1559 transactions.
Related: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md#backwards-compatibility
Actual behavior
The verification fails with the following debug log:
DEBU[2021-08-16T13:20:19Z] stream handler: handshake: handle 16Uiu2HAmJccsCKu98Wq4PD3peuEJSUxYC1qRXziF4cGv1qqRDqtG: overlay 17c696c1ec633efba090b5434958afd11a7ccb39f53db807fbfef9da0a69a8d7 verification failed: transaction type not supported: transaction not found

xdai does not support 1559 at this time so we cannot use them yet. latest master already accepts presented 1559-style transactions.

I tried on Goerli while running the :latest tag yesterday, and bee version returned 1.1.1-db09d74-dirty at that point, which is #2408's commit I believe?

hm, the odd thing is that the error is transaction not found so it actually seems to be the receipt lookup that fails. what ethereum backend are you using?

hm, the odd thing is that the error is transaction not found so it actually seems to be the receipt lookup that fails. what ethereum backend are you using?

I'm using an OpenEthereum node, latest version.
By the way, I think this might indirectly impact the testnet. Right now, Goerli is post-London and the block hash has changed: https://eips.ethereum.org/EIPS/eip-1559#block-hash-changing
This results in bee returning invalid hashes for blocks, and thus breaking overlay addresses.
Simple check:
package main

import (
	"context"
	"fmt"
	"math/big"

	"github.com/ethereum/go-ethereum/ethclient"
)

func main() {
	ctx := context.Background()
	client, _ := ethclient.Dial("GOERLI_RPC_HERE")
	block, _ := client.BlockByNumber(ctx, big.NewInt(5220820))

	fmt.Printf("%x\n", block.Hash())
}

returns 76ed8d98818bb8a57cd4f1b880510b5564d2c1633ee01cb2d986d5c10af97337 in older bees and should return c876a6267d76ebae87043a5c9ee0f93006bcd35646e0d7bd3824357053ddae28 with the latest master (I'm assuming). This block is used for the overlay address generation, and thus different versions of bee might not be able to handshake.
At least it displays the right hash when using the following go.mod:
module test/verify

go 1.16

require github.com/ethersphere/bee v1.1.0-rc2.0.20210816203416-5a6ddbdfd10a

indeed. probably because bee 1.0.0 uses a version of go-ethereum before they added london-support. which means we cannot maintain 1.0.0 compatibility on london-enabled networks.

Looks like I might have been running an outdated version when this happened.
However, let's keep in mind that right now the testnet is in a quite unstable state, and this might also happen whenever xDai hardforks. Maybe some backwards compatibility would be nice during the transition phase?

closing this as it seems this is no longer relevant :+1:


[Logging v2] - YAML preview generated from ClusterOutputs UI Form showing incomplete configuration

Rancher version: master-head (09/23/2020) e9a98a3 HA k8s with RKE DO downstream
rancher/dashboard#1102
Create ClusterOutput Preview YAML is not showing the spec preview.

Rancher version: master-head (09/29/2020) a2a141e
Validated working on latest master.


v1.8.2 breaks my code - Unexpected end of input

Hello.
v1.8.2 breaks my code instance.relateTo({alias:'Relationship', where{id: theId}}),
Neo4jError: Unexpected end of input: expected whitespace or SetItem ....  ->(target) SET
it works when I revert to v1.8.1
I hope I don't need to change all of the codes for new versions.

Thanks for reporting this bug. In 1.8.2 I had fixed something regarding relationship properties in relateTo, but as it seems the function didn't work if it wasn't creating any relationship properties.
This should now be fixed in 1.8.3. I have also added a test for calling relateTo without any properties. I hope this didn't cause much inconvenience.


How can I install this library on Ubuntu?

What is the recommended procedure for installing the latest release on Ubuntu (or similar)? apt has a really old version, but it's not clear to me how to install by hand from what's on the Releases page. I'm not even quite sure how to compile the code.
What I mean by "install" is basically get it so a command like this while correctly find and link the library with my code:
gcc main.c -lSDL2 -lSDL2_ttf -o main

and put the headers in /usr/include/SDL2.

Installing libraries to /usr/include and /usr/lib is generally discouraged.
Your linux distribution (=Ubuntu) is the owner of these directory.
Instead, install to /usr/local, and make sure to remove the Ubuntu sdl2-ttf-devel packages.
git clone https://github.com/libsdl-org/SDL_ttf /tmp/sdl_ttf --depth 1 --branch SDL2
cmake -S /tmp/sdl_ttf -B /tmp/sdl_ttf_build -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build /tmp/sdl_ttf_build

Install it with sudo cmake --install /tmp/sdl_ttf_build
Disclaimer: untested, and I take no responsibility in any potential damage to your system


Performance issues with Object.create()

Hey, it looks like, creating objects with Object.create() and add properties is slow at initialization but also at accessing them later. See this post:
http://mrale.ph/blog/2014/07/30/constructor-vs-objectcreate.html
What do you think about ist and how stampit can/has solved this?

Object creation and property access are lightning fast no matter which technique you use. These are micro-optimizations. I've never seen an application where this is the bottleneck. Don't optimize this unless you've profiled your app and proven that it's a problem. Read You're Optimizing the Wrong Things.


Update data.js

Hey appreciate the PR, but we are only accepting PRs from WKC. sorry, thanks for the effort


simple test executable

Aren't the https://github.com/ethereum/evmjit/tree/develop/examples fulfilling this role now?

I want something I can run unittests with.


Fix devnet203 tortoise beacon issues

Motivation

Closes #2694
Closes #2696

Changes

Revert changing GetNodeLastAtxID signature
Fix incorrect usage of miner PK when passing to GetNodeLastAtxID
Accept types.NodeID instead of ED public key in tortoisebeacon.New
Send types.NodeID instead of ED public key in ProposalMessage

Test Plan

Unit tests
DevOps Notes

[x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources)
[x] This PR does not affect public APIs
[x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.)
[x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)

bors try

bors try

i will try to merge it to test if it helps with unmanaged miners syncing
bors merge

p2p test failed

bors merge

bors merge

https://github.com/spacemeshos/go-spacemesh/issues/2700

latenodes failed again

bors merge

bors merge

bors merge


Object.keys Error

Hi!
When trying to export specs in some files I got this error message
Any tips?

You'd better provider sketch file to reproduce it.
You can remove all other layers, just keep the part that lead to this issue, notice it's related to layer Headline-Kachel

I've upload the isolated file. I guess it's something with the mixes typo?
error.zip

I cannot reproduce it with your file

I tried again with this file.
It didn't worked.
It seems it have something to to with the mixed color in one textfield (black + red).
I will just keep Attention to that. Indeed you should build like this :)

https://github.com/sketch-hq/SketchAPI/issues/810


Release of pretrained model on SemanticKITTI

Thank you for the excellent work and release of the source code! I just want to ask if you have any plan to release the checkpoint trained on SemanticKITTI? I want to reproduce some baseline results for my recent project and it would be very helpful if you can share the file.

Yes, yes, yes. Might need to wait until after this CVPR deadline. I will have a big update at the end of this year. I cannot access some old experiment records due to the change of internship company.

Thanks for the reply. Looking forward to the update and wishing you good luck for the coming CVPR :)


Tokenization

Introduce tokenization transaction type
Responsible for collecting 3-D Secure Data and credit card tokenization
Simplify and refactor cod
Remove duplicated calls for #make_response

🆙

🆙


Fix required_extension behavior in read_parquet

This PR changes the behavior of read_parquet(path, ..., required_extension=) to only apply when path is a directory without an active _metadata file. That is, we should not be filtering out "unsupported extensions" when the path is a single file, and specific list of files, or when we are using a _metadata file to tell us what files are valid.

[x] Closes #8349
[ ] Tests added / passed
[x] Passes pre-commit run --all-files

cc @jsignell @martindurant @jrbourbeau


pypy, pypy3: 7.3.1 → 7.3.2

Motivation for this change
Upgrade pypy.
Things done

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

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

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

Works fine on Linux.
Build fails on macOS Big Sur 11.1, maybe due to this issue #91748. I'm rebuilding on staging branch now.

Works fine on Linux.
Build fails on macOS Big Sur 11.1, maybe due to this issue #91748. I'm rebuilding on staging branch now.

I just ran into something similar so I thought I'd comment:

assert libc_name is not None, "Cannot find C library, ctypes.util.find_library('c') returned None"

Apple removed the /usr/lib/libc.dylib from disk on macOS Big Sur and only has it available in the linker cache now.
The API calls still work, but things that actually look for the file do not.
This was the patch that fixed it for Python: https://bugs.python.org/issue41100
It is already merged and available in nix: https://github.com/NixOS/nixpkgs/pull/107453
Seems possibly related?


fix(pretty-format): Handle empty string children in React same as react-test-renderer

Summary
I tried to upgrade the entire repo to React 18 (for #14463), and it turns out react-test-renderer@18 has a change in how it handles empty string children. Which is fine, but aligning is a breaking change in Jest.

Test plan
Adjusted the test

I missed this made the tests time out on circle ci... 1a96a5c6a348dd3bf9134813d1a99e6273f53ec2 fixes it


Add support for data:// url scheme (BB IN2OZO3N)

The problem
Per BB finding, we are not covering the data:// url scheme properly.
Context

The scheme is mainly used by PHP. PHP supports data: scheme without "//" like data:text/plain, not data://text/plain.
URL scheme comes from http://www.faqs.org/rfcs/rfc2397.html
A data URL scheme's media type specification can include other parameters; for example, one might specify a charset parameter: data:text/plain;charset=iso-8859-7,%be%fg%be

Proposed solution

Create new rule to handle data: url scheme
Duplicate the data rules needed until the include preprocessor is fixed to handle this case
Add tests that cover solution and BB finding

References

https://github.com/coreruleset/coreruleset/pull/2792

Now that the include preprocessor was fixed, we can continue with this one.


Add [PowerShell] Gallery platform support

Now that we have PowerShell Core the cross-plat version of PowerShell... it'd be really cool to have a badge that shows the OS's that your module works on.
On the PowerShell Gallery, users can do this by using the tags Windows MacOS Linux. In this PR, I use the PowerShell Gallery API to grab the tags from that package and display windows macos linux if they exist.
The result is:

which aligns with Conda and Cocoapods
Let me know if there's anything else I need to do! It's been a pleasure working on this - the dev experience is incredible!

Messages

:book:
:sparkles: Thanks for your contribution to Shields, @TylerLeonhardt!

  Generated by :no_entry_sign: dangerJS

I don't THINK I touched anything that would make that test fail! Did I do something wrong? 😰

Hi! Thanks so much for this. I opened #2466 for the flaky test and I'll re-run the tests now. Thanks for the kind words about the dev experience! We've been working really hard at it!

@paulmelnikow looks like we're all good now! 😄

Looks good! Service tests passing.
Looks like a package-lock update snuck in on 9a12af4c86223854fb732c873b7888fac8e55687. Could you reset it?

@paulmelnikow reverted!

@TylerLeonhardt I know this PR is merged already, so this likely requires another PR, but it would be more appropriate if every use of Powershell in names in this PR (e.g. the class name and the module exports list), the names used the proper casing: PowerShell.

How can I make my module show this? The example uses Az.Storage, but I don't see any platform in the tags of Az.Storage.psd1:
https://github.com/Azure/azure-powershell/blob/172b856ae7145de34811573c8624dff3c85c3570/src/ResourceManager/Storage/Commands.Management.Storage/Az.Storage.psd1#L163

Yeah perhaps Az.Storage wasn't the best example. I'm fine with that being changed.
This badge is populated by the presence of the Tags: Windows, Linux, macOS in the module manifest.

@TylerLeonhardt Is there a reference to the docs about the manifest we could include?

@paulmelnikow @felixfbecker just wrote a draft of the docs last Friday.  Isn't merged yet.  However you can take a look at the Indicating OS Compatibility section here: https://github.com/PowerShell/PowerShell-Docs/pull/3434/files?short_path=6186c34#diff-6186c3471bb6880b62a9a75d8970d509


Initialize Application & Add User-Model

Create site skeleton
Add controller, model and route for user
Ensure user can be created, updated & deleted

Integrated under: commit aa28d1f1190d046ff93327941822f2213e1809a9 .


[(Basic) Bookmarks] Showing something went wrong on opening "Create Bookmark".

Extension
https://www.raycast.com/rauno/bmrks
Description
Error:
When I select open bookmark it gives this error screen.

Error Output log:
Error: Command failed with exit code 1: osascript
87:91: execution error: Not authorised to send Apple events to System Events. (-1743)

a7:run-applescript.js:38:21

---
35:         timedOut,
36:         command: "osascript",
37:         options,
38:         parentError: new Error(),
39:     })

### Steps To Reproduce

1. Install the extension
2. Log In to the extension
3. Select: Create bookmark

### Current Behaviour

Giving Error on creating bookmark

### Expected Behaviour

Open Input boxes for creating new bookmark

Is that happening consistently?

yes, at least the whole day i tried it.
On Mon, Mar 4, 2024 at 6:12 PM Pedro Duarte @.***>
wrote:

Is that happening consistently?
—
Reply to this email directly, view it on GitHub
https://github.com/raycast/extensions/issues/11080#issuecomment-1976500439,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANJA2ZSTTL273ZB34D2L7RLYWRT5FAVCNFSM6AAAAABEE2X7T2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZWGUYDANBTHE
.
You are receiving this because you authored the thread.Message ID:
@.***>


[i2c,doc] Update diagrams after recent changes

From https://github.com/lowRISC/opentitan/issues/20971#issuecomment-2002726384:

[ ] ACQFIFO diagrams here to be updated based on https://github.com/lowRISC/opentitan/pull/21857 changes
[ ] Implementation FSM diagrams here to be updated based on https://github.com/lowRISC/opentitan/pull/22049 changes

[ ]  ACQFIFO diagrams here to be updated based on [i2c,rtl] NACK after timing out on a stretch #21857 changes[ ]  Implementation FSM diagrams here to be updated based on [i2c,rtl] Halt controller FSM when unexp. NAK is seen #22049 changes

This got reworked later, but in any case, the diagrams have been updated in https://github.com/lowRISC/opentitan/pull/23853

[ ] Implementation FSM diagrams here to be updated based on https://github.com/lowRISC/opentitan/pull/22049 changes

The effect of NAKOK is still not shown in the FSM diagram yet.


AutoDMG 1.5.4

Thank you!

Thank you for the contribution. It was merged directly as ea4165fc92fc0f242a29d27a0bdab33cf0d7f6af to keep commit history cleaner. Your contribution is still credited to you.


[Bug] [zeta] fix rest api submit a job with chinese name returns an Garbled code name.

Purpose of this pull request

Fixed an issue where the rest API submitted a task with garbled characters if the task name was in Chinese.
Does this PR introduce any user-facing change?

No
How was this patch tested?

Tested in RestApiIT, I modified the name of the submitted task in the test, which was originally test, and now it is test测试, adding Chinese.

can we put this kind of param into body rather than url?

The body used to put job config. So put it into params is fine. Anyway, if we want to put it into body, it would be new feature not bug fixed. So Let me merge this now.

Thanks, the parameter is placed in param based on the submission mode of the client. The parameter in params is similar to the parameter in command and the value in body is similar to job config. Users can directly use job config in client. No changes to config are required for the rest api submission method.


[TACHYON-896]Remove unused field in BlockLockManager

LOCK_ACQUIRE_TIMEOUT_MS is no longer used.

Can one of the admins verify this patch?

ok to test

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/Tachyon-Pull-Request-Builder/4598/
Test PASSed.

Thanks!


Update hugo and remove ^ from version

Attempt to update hugo and see if that helps it build.

Hmm can't even build it, I think we need a newer version of go, I'll test that out

Hmm can't even build it, I think we need a newer version of go, I'll test that out

The path of least resistance might be to revert the config file rename for now?

Latest version of go fixed the build issue, but yeah, I think changing the go version might be too risky for a blog post change, and should be separate.

Found a nice middleground, updated hugo to 0.111.3, which is what I have running locally, so I know it works, and it compiles with our current version of go.


How to check for a custom input and sytle

@roopeshn28 Could you elaborate a bit plz ? To produce your own style coefficients you need to get the 3DMM coefficients of the driving style video. You can follow PIRenderer to know how to do it. Sometimes it is a bit tricky to install all the libraries but I was able to do it so it can work. For the phonemes you have to use a phoneme detector and put the result in the same format as in AVCT. I tried a lot of things with pocketsphinx but was unable to reproduce as good results as styletalk, so I moved to a custom solution using librosa to segment speech and add silences when needed, and then using allosaurus to detect the phonemes, and doing a mapping with CMU sphinx dictionary (but you could also replace the word embedding by a IPA-based one and retrain the model like this).

@BeauGeogeo That's great that you were able to successfully extract phonemes. I also tried pocketsphinx but got poor results. I am in the process of trying allosaurus. Could you share the code you are using to extract phonemes accurately?

@BeauGeogeo That's great that you were able to successfully extract phonemes. I also tried pocketsphinx but got poor results. I am in the process of trying allosaurus. Could you share the code and ipa-to-cmu map you are using to extract phonemes accurately?

Hello @andrewkuo. Unfortunately I cannot share the code I'm sorry, as it is not allowed by the corporation I'm currently working for.
But I can give you some indications. For the mapping, you can go to Papagayo repository they have a faire enough mapping. On the net you can find other github issues adressing this problem, and sometimes I checked by myself the IPA phonemes and try to find the closest one in CMU.
Then, you use Librosa to segment the audio thanks to the split function. For the timestamps corresponding to voice activity, you use allosaurus on them. Allosaurus is pretty good, just get the emission parameter a bit higher than 1 I think, you'll get some "noisy" phonemes but can catch some who are missing with the default parameter. For the period of silence (between the timestamp ending a voice activity detected and the timestamp starting the following voice activity) you have to add silence (and add the empty symbol which is one way to represent silence).
Finally, you perform the mapping and then use the parsing phonemes function of AVCT (mentionned by styletalk) to have your phonemes sequence, but be carefull you have some values to change in the AVCT function due to the fact that the sampling rate is not the same. You'll have to change 25 by 30 and < 4 by <3 or 3.3 something like that, you can make some experiences and find the best values.
Last but not least, we got not too bad results, but clearly not as accurate as StyleTALK. BUT I think it is only an issue of re-training the model. Indeed, the phonemes of allosaurus are not always the same as CMU, and in particular the duration are not the same. It means that no matter how good is your mapping, phoneme detection and audio segmentation, the weights of the model are not suited for the sequences produced because it saw different patterns during training, hance you'll have to retrain the model.
For the training, you can keep the IPA-CMU mapping, it is the easiest way. You can get better results I think by keeping IPA symbols and using a different word embedding than styleTALK, ie an IPA-based one. This step I did not have the time to check it but will do it in the following weeks I think.
I hope it helps, let me know if you have additional questions or if you get interesting results.
Best regards

@BeauGeogeo thank you very much for posting your process. I will implement this and see if I can get good results. I'll let you know if I find any other good techniques.

@BeauGeogeo I have gotten some good results with your direction. Thank you so much!
Have you encountered jittering and zoom in/zoom out effects from custom pose from custom videos? For the most part my custom pose videos are pretty good, but every once in a while during the video the face jitters/zooms in/out. Have you encountered this issue?

Hi @andrewkuo , glad to hear it, you're welcome !
Firs of all, I want to let you know that I have modified a bit my solution. I had too many cases of silence periods and so empty phonemes list and my code was becoming messy to handle them, so I wrote a simpler yet more effective code. I make librosa pretty sensitive to voice detection, and I only store in a list the periods of voice activity where allosaurus detects phonemes. Then, I just have to do a loop, I check if I have to add silence at the beginning and at the end, and for the rest I just add silences in between the period of activities. I set the duration of silence according to bg of current voice activity period and ed of previous voice activity period (and according to start and end of the audio for the particular cases of beginning and end of it of course).
Moreover, allosaurus working fine + the good mapping are able to produce good results even withtout retraining contrary to what I thought first, and apparently you have witnessed the same thing as I guess you did not re trained the model ?
Now that you mention it, I have the case of just one moment of jittering in a video among the 3 I produced. It is a video of yann lecun speaking french, and he's doing a lot of silences and 'huuuh' sounds so this time maybe it is really a question of odd sequence the model has never seen before so it might fail a little bit but I'm not sure. It happens only in this video and for a short duration but indeed it happens.
In my case I do not use any cropping, I just produce the video with styletalk inference file.
It could be interesting to share some of the videos and phonemes files we produced by mail, let me know if you are interested.
Best regards

@BeauGeogeo I have gotten some good results with your direction. Thank you so much!
Have you encountered jittering and zoom in/zoom out effects from 3DMM pose coefficients from custom videos? I followed PIRenderer DatasetHelper to extract 3DMM coeff for videos. For the most part it is pretty good, but every once in a while during the output video the face jitters/zooms in/out. Have you encountered this issue?
I'm wondering if it is because I have not preprocessed the initial video correctly. I currently use FOMM's crop-video.py helper to crop initial video.

Sorry @andrewkuo I realized I missed the point in my previous answer (not a good idea to answer when you've juste wake up ^^). I don't remember witnessing the effects you are talking about. I have sometimes lot of artifacts for challenging identities or when the head pose is extreme or/and when the pose chosen is really different from the one of identity. But jittering and zoom in zoom out no.
I used PIRenderer preprocessing and code to extract 3DMM coeffs from custom driving videos but to generate a video with styletalk I just give the inputs without any particular preprocessing, I just sometimes resize the image to 256x256 and convert it to png.

@BeauGeogeo No worries. Thanks for responding. I actually figured out why my jittering and zoom in zoom out was happening. My source video had some weird mouth movements which caused some oddities with styletalk output. I have tested with other videos and am not getting that issue anymore.

Oh OK great, thank you for this information and glad you solved your problem !


implemented global permission check in shortcuts for get_objects_for_use...

...r and get_objects_for_group
I implemented the checks directly within the functions. But: shouldn't this be inherently implemented in ObjectPermissionChecker.has_perm function? I am not sure, what side effects this would have, and if this is desired at all..

Coverage increased (+0.12%) to 96.14% when pulling a814158fea0ff592f39b5fc4bd0a4e63bc708bfe on v-erena:global-permission-check-in-get-objects into dd33b2c44cc18c44d16fd3cbad8507a971c86623 on lukaszb:devel.

PR looks well thought out and well tested

@aidanlister thank you! I honestly don't have much time to go through those changes so am merging based on your opinion.

Alright that scares me a little bit but I'll pull this into production and feed back with any issues.

@aidanlister haha, wondered if you feel it ;-) Good to hear I'm not the only one that worried. But seriously, before I put release comment I'm going to go through it more closely anyway ;-)

happy to have any feedback on that, and of course, eager to contribute further ;-)


Document streaming body

Automatically document all operations with a streaming body. Previously they were incorrectly documented as bytes.
This fixes boto/boto3#330

High level:

Can you show an example of the rendered docs?
I see there's functional tests, but I feel we should still have unit tests for this.

Looks fine. It is sort of weird that we pass the operation_model to the constructor of ShapeDocumenter when we access properties of operation_model to pass to the constructor. But I think we can wait on that refactoring this. :ship:

I like this approach more. Just had one comment.

This seems fine. :ship:

looks good :shipit:

:ship: on the assumption that a streaming output shape will never be reused in the output shape as a non streaming output.


vargs in query string implementation causes errors

error is explained in #23.

@bhudgeons can you please share the sample code? This one compiles fine:
client
      .get("foo/bar")
      .addQueryParams("param1" -> "value1", "param2" -> "value2", "param2" -> "value2")
      .addQueryParams("param2" -> "value2")
      .addQueryParams("param2" -> "value3")
      .accept("text/plain")
      .addQueryParams("param1" -> "value1", "param2" -> "value2", "param2" -> "value2")

@ilya-murzinov check out https://github.com/bhudgeons/featherbed/commit/6d2465b37bbbe0598dfdb6d3ca17bf87f2dd443c

@ilya-murzinov map makes more sense as a key->value parameter list anyway, and it avoids https://issues.scala-lang.org/browse/SI-7420

@bhudgeons Why do you need to define that type alias?  It is unfortunate that such a strange problem occurs, but I don't think removing the varargs method is the solution.  We could have both a varargs method and a List method, if that would be helpful.  But I don't see the need for the type alias to begin with.

@jeremyrsmith https://finagle.github.io/featherbed/doc/04-building-rest-clients.html :)    ... you're exactly right ... the way to fix it is with a couple of convenience methods that accept List instead of varargs. One sec.

@bhudgeons Yikes, that documentation is what needs to change.  It's preferable now to use .accept("application/json"), since you don't have to specify it as a type argument anymore.

@bhudgeons which obviates the need for the type alias

In that case, (1) does the PR potentially get rid of other similar issues, and (2) are the convenience methods worth the code clutter. I'd bet most query parameter lists are built with maps, since that's the most natural key-value collection. I understand that we must support "param1=x&param1=y" query strings. With just the varargs, there's going to be a lot of mymap.toList: _* going on.

I think this has been fixed by the changes to how params are specified; I'm going to close this but please reopen if you still have this problem @bhudgeons


modify visible and opaque TxV / translators for auctions

Referencing https://github.com/penumbra-zone/web/pull/1041/files#diff-3e744d2ab8ce04a85b15dc5bdef5573655ddfe9aed91fb38b01c11744ec1336eR87-R98, modify ActionDutchAuctionSchedule and ActionDutchAuctionEnd action views to display more descriptive information about each action. Currently, only the input / output metadata is being rendered to the user.
ActionDutchAuctionWithdraw will not be modified, and is currently shelved: https://github.com/penumbra-zone/penumbra/issues/4219.
cc @jessepinho

https://github.com/penumbra-zone/web/blob/main/packages/perspective/src/translators/action-view.ts#L45 this specifically will need to be expanded for auctions

added this to the tracking issue, which was created after the tracking issue was closed. Previously, we were only displaying the input / output metadata to the user, which was sufficient for our purposes. We can, however, expand the metadata showed in the approval dialogue to be richer and shower more information to the user about their auctions. All the fields are opaque, so there's no risk of a privacy leak.

on further reflection, the only other relevant field is the auction ID, which we should append. With our eventual push towards https://github.com/penumbra-zone/web/issues/1394, the approval dialogue is expressive enough.


Conda package?

Any interest in a conda package?

I haven't heard of Conda before. If you create a Conda package, I could merge it though.
Maybe a more useful thing would be a Flatpack package (or a Snapcraft package ?).


pdf is not loading which stored in firebase storage

I want to load a pdf  url from firebase storage in my android app using this library.
But it's showing blank screen .
How to solve this ?

You would have to download the pdf local and then open it, remove storage is not supported.


Wazuh packages redesign tier 1 - Stage 2 -  Migrate and adapt the Wazuh dashboard

Description
We are on an effort to modernize the packages' generation and lifecycle. This issue aims to track the effort to migrate the packages' generation process from the wazuh-packages repository and automate its generation, testing and delivery steps of their lifecycle.
The tasks listed below are extracted from https://github.com/wazuh/internal-devel-requests/issues/712. Use that issue for additional information and requirements.
Note that most of these tasks are already part of the https://github.com/wazuh/wazuh-dashboard/issues/117 project. We'll use that one for development and this one for tracking, describing the steps taken for each of them.
Tasks

[x] Migrate code into target repository for manual package generation

https://github.com/wazuh/wazuh-dashboard/pull/71
https://github.com/wazuh/wazuh-dashboard/issues/85
https://github.com/wazuh/wazuh-dashboard/issues/119

[x] Automate packages generation through CI

https://github.com/wazuh/wazuh-dashboard/issues/120

[x] Automate packages testing through CI

https://github.com/wazuh/wazuh-dashboard/issues/132

[ ] Add secrets to GH (to upload packages to S3)
[ ] Upload packages to S3 through CI

First estimated ETA provided by @Tostti : 2024/03/22

The repository has been configured with CI secrets, please, refer to the main comment of the https://github.com/wazuh/wazuh-jenkins/issues/6290 issue to check the secrets names, the CI used has been configured to put and get objects from the development warehouse


put real eror message instead of undefined

I often get undefined error in hue web UI while in the console I see the real reasons (for instance 413 for limitations of client request size or permissions problems or something else). Why not desplay the real reason in web UI itself then?

Do you see the info in the return of the ajax calls or on the /logs page of Hue?
Do you have easy ways to reproduce them?
Those sounds like bugs, the errors should be logged properly and the end user should have a useful message instead.


Sharing an image and text in iOS

Hi,
I have read the documentation that sharing Image with Text in Whatsapp( only IOS) is not possible until WhatsApp creates a proper iOS extension to fix this.
"WhatsApp
Note that on iOS when sharing an image and text, only the image is shared - let's hope WhatsApp creates a proper iOS extension to fix this.
Before using this method you may want to use canShareVia('whatsapp'.. (see below)."

There is any solution in the updated version of the plugin?

Same issue here. Waiting a fix.

Same issue here. Waiting a fix.

Is there any update on a fix for this? any idea why WhatsApp allows this for android and only prevents this from iOS

@SidiBecker @cloudexpresssolutions With the current plugin it's not possible. so I would advise that better change Business requirement. I did the same.


Add examples for 1.4 Audio Selection and Volume Indicator features

To merge when 1.4 is released and pinned.

Tested and +1


WIP: Fix race condition in python_webserver_1

Fix a race condition in the python_webserver_1 test case, where the test
fails because the http webserver is not yet ready when being checked to
be present.
Related ticket: https://progress.opensuse.org/issues/111164
Verification run: failing without fix | passing with fix

I guess this issue has been resolved in the meantime and I'm gonna close this PR.


Automations triggering on other attribute updates (since v0.2)

This may not be so much of a bug, but more of a how do I workaround this now.
I have a single automation for a remote, it looks like this:
trigger:

entity_id: remote.abc_bedroom_switch
platform: state
condition:
condition: or
conditions:

condition: state
entity_id: remote.abc_bedroom_switch
state: 1_click_up
condition: state
entity_id: remote.abc_bedroom_switch
state: 2_click_up
condition: state
entity_id: remote.abc_bedroom_switch
state: 3_click_up
condition: state
entity_id: remote.abc_bedroom_switch
state: 4_click_up
action:

data_template:
button: '{{ trigger.to_state.state }}'
room: abc_bedroom
service: script.abc_bedroom_hue_remote

The script it calls looks like this:
abc_bedroom_hue_remote:
alias: ABC bedroom bedside hue remote
description: Call various scripts depending on the button/press type
sequence:
- service_template: >
{% set group = 'group.' ~ room ~ '_lights' %}
{% set script = {
'1_click_up': 'script.lights_off' if is_state(group, 'on') else 'script.lights_on',
'2_click_up': 'script.lights_increase_brightness',
'3_click_up': 'script.lights_decrease_brightness',
'4_click_up': 'script.lights_off',
}
%}
{{- script[button] -}}
data_template:
room: '{{ room }}'
lights: >
{% set group = 'group.' ~ room ~ '_lights' %}
{% set lights = {
'1_click_up': expand(group) | map(attribute='entity_id') | join(','),
'2_click_up': expand(group) | selectattr('state','eq', 'on') | map(attribute='entity_id') | join(','),
'3_click_up': expand(group) | selectattr('state','eq', 'on') | map(attribute='entity_id') | join(','),
'4_click_up': expand(group) | map(attribute='entity_id')| join(',') ~ ',' ~ expand('group.abc_bathroom_lights') | map(attribute='entity_id') | join(','),
}
%}
{{- lights[button] -}}
Probably not the most efficient way to do this, but I was using it as a reason to learn more about scripts. I plan to move most of it back to the automation, and reduce the number of script calls. I originally started with a bunch of ifs, but saw someone using the Jinja dicts in a neat way and I replicated it.
With the new version of HASS/Hueremote, additional attributes are exposed, including the battery level. While the last_updated: doesn't change, I've noticed the battery can jump around a bit, mainly after being used. What's now happening is I press a button, and it triggers as expected. Let's say I pressed button 1, and my lights toggle. The state may look like:
model: ZLLSwitch
last_button_event: 1_click_up
last_updated: 2020-04-18, 03:10:00
name: ABC Bedroom switch
on: true
reachable: true
battery_level: 94
friendly_name: ABC Bedroom switch
icon: mdi:remote
supported_features: 0
Shortly afterwards, my lights turn off again and I can see the state has changed to:
model: ZLLSwitch
last_button_event: 1_click_up
last_updated: 2020-04-18, 03:10:00
name: ABC Bedroom switch
on: true
reachable: true
battery_level: 93
friendly_name: ABC Bedroom switch
icon: mdi:remote
supported_features: 0
Since the button event doesn't have a reset back to 'none', the battery level updating causes the trigger to fire, and rerun the same action.
With my limited knowledge and skill set, I can see two ways to fix this. One would be to make a template sensor/input/something that just takes the button press event and replicates it without anything else attached. The other would be to check the last_updated and see if it's changed in the last second, but I don't know how to compare times yet, although I'm sure there are plenty of examples online.
I wanted to report this in case anyone else ran across it, or has suggestions on how best to deal with it.
Edit: I've added the following condition to my automation:
{{ as_timestamp(now()) | int - as_timestamp(states.remote.ABC_bedroom_switch.last_updated) | int < 1 }}

I have been getting two automations triggering randomly since updating to 0.2. One is a simple light turning on and the other is a script that turns off most lights and tv's off d/stairs. Rolled back to v0.1 and so far so good it is not happened since.

@grantclem having a template condition of:
{{ as_timestamp(now()) - as_timestamp(states.remote.abc_bedroom_switch.last_updated) > 1 }}
Has solved the issue for me. It checks to ensure that the late_updated attribute is within 1 second of the automation trigger. So if the state of the remote changes (e.g. updated battery level) it won't trigger the automation. It may be possible to have a condition based on the changed attribute, but I'm not 100% sure.

@iamcagn I'm thinking I might want to add your timestamp consideration to my own code, just to be safe.  Would you mind posting your full condition, including the timestamp consideration?  I often get templates wrong, so it would be helpful to see yours.  Also, can you click the "<>" button above so it is formatted as code?  I know I'm being picky!!  Maybe I am reading it wrong, but it looks like your condition is saying that it is greater than one second rather than less than one second difference between now and the last time it was updated.

@mikesalz You're correct, I actually fixed it up but forgot to edit this post.
`  alias: ABC bedroom - hue - bedside hue remote
description: ''
trigger:

entity_id: remote.ABC_bedroom_switch
platform: state
condition:
condition: or
conditions:

condition: state
entity_id: remote.ABC_bedroom_switch
state: 1_click_up
condition: state
entity_id: remote.ABC_bedroom_switch
state: 2_click_up
condition: state
entity_id: remote.ABC_bedroom_switch
state: 3_click_up
condition: state
entity_id: remote.ABC_bedroom_switch
state: 4_click_up

condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(states.remote.ABC_bedroom_switch.last_updated)
< 1 }}'
action:
data_template:
button: '{{ trigger.to_state.state }}'
room: ABC_bedroom
service: script.ABC_bedroom_hue_remote`

@mikesalz you're correct, and I ended up changing it a bit but didn't update the post.
`  alias: calum bedroom - hue - bedside hue remote
description: ''
trigger:

entity_id: remote.calum_bedroom_switch
platform: state
condition:
condition: or
conditions:

condition: state
entity_id: remote.calum_bedroom_switch
state: 1_click_up
condition: state
entity_id: remote.calum_bedroom_switch
state: 2_click_up
condition: state
entity_id: remote.calum_bedroom_switch
state: 3_click_up
condition: state
entity_id: remote.calum_bedroom_switch
state: 4_click_up

condition: template
value_template: '{{ as_timestamp(now()) | int - as_timestamp(states.remote.calum_bedroom_switch.last_updated)
| int < 1 }}'
action:
data_template:
button: '{{ trigger.to_state.state }}'
room: calum_bedroom
service: script.calum_bedroom_hue_remote`

@mikesalz I ended up changing it, but forgot to update it here. Also I can't get the code tags to work, so see https://pastebin.com/6X9j7QYD

@iamcagn Well, that stinks!  Maybe @robmarkcole can review this issue?

Oddly it was working when I had it as > 1, so just doing some debugging at the moment.

So the last_updated in the state is a field set by HA, and is set when the state changed in HA, not the attribute from the remote. For that we need:
state_attr('remote.abc_bedroom_switch','last_updated')
That's returning a UTC tiume for me, so the difference between the two times is actually closer to 36000/36001. I don't know how to handle this without needing to update the difference when my timezone switches to daylights savings. Anyone have any suggestions?

@mikesalz
So I found the issue. The last_updated timestamp on the remote is UTC time, but since it has no timezone suffix, Home Assistant takes it as whatever your timezone is set to (e.g. +10:00 for me). as_timestamp() always returns the seconds based on UTC, regardless of what you pass to it (e.g. now() and utcnow() return the same value).
Since the last_updated time stamp is being assumed as local time, converting it to UNIX time it is adding/subtracting the local timezone from it. To work around this, you can append +00:00 to the string before converting, telling HA that it's already UTC time.
{{ as_timestamp(now()) | int - as_timestamp(state_attr('remote.calum_bedroom_switch','last_updated') | join(' ') ~ '+00:00') | int < 5 }}
Full condition:
condition: template
value_template: "{{ as_timestamp(now()) | int - as_timestamp(state_attr('remote.calum_bedroom_switch','last_updated') | join('  ') ~ '+00:00') | int <= 2 }}

I noticed that sometimes, maybe due to rounding as the remote time_updated doesn't go past seconds, that it would sometimes have a difference of 2 seconds. I've set the check to be less than or equal to 2. Your setup may vary, so you may need to adjust that comparison. So far I've had no false positives. There is a chance that the battery level could update within 2 seconds of pressing a button, but so far it's not occurred.
@robmarkcole would it be possible to include +00:00 at the attribute level, so I don't need to format it myself?

@iamcagn thanks for your detective work on this. Lets get @azogue input, as the main contributor to this repo recently

Hi @iamcagn, wow!
I'll try to summarize the issue here:

Using a generic state change trigger makes false positives when something changes, even when nor the press code or the bridge timestamp change.

Yes, that is true and could be inconvenient.
Let's see how HA works, and the actual trends in dev:

In HA automation, state triggers are checked by 2 ways: with specific to/from state, or generic. In the 2nd case, the trigger fires when anything in the state+attributes is changed (like the battery level, which is known to oscillate when batts are not at 100%). So this is per design in HA core.
In "modern" HA integrations, battery levels are extracted into separate special entities, linked to the same device in the devices list (and then they show the batt level in the right column)
Also, the actual trend in development is to extract anything "variable" and unrelated to the main state into different entities, always grouping them in devices. Also, constant attributes related to the physical devices are encapsulated in the device_info property, to be shown/stored at device level, instead of entity level.

Now about the lastupdated attribute:

In HA every entity has a last_updated and last_changed attribute, related to the HA state, but these don't say anything about when the buttons are pressed, it only talks about when HA sees those changes. These attributes are internal datetimes in UTC.
But the Hue bridge also stores the "real" timestamps of the button presses, with a naive timestamp (but in UTC). We are showing it as an extra state attribute lastupdated made by splitting the ts string in a date/time tuple. Why is that is something I don't know, but the thing is that timestamp is never parsed into a datetime, so it looks similar to the state.last_changed but it is a simple string from the hue bridge data.
In HA >=0.108, with remotes implemented and firing events hue_event, HA is also using internally this lastupdated string to check for new presses (because if not, a new press on the last pressed button would pass undetected)

So everything above must be taken into account. Now, finally, how to address the specific problem of false positives?  ---> Do not use generic state triggers :)
My general suggestion for a scenario like this: instead of 1 generic trigger + 4 "or" conditions, make it 4 specific triggers:
trigger:
- entity_id: remote.abc_bedroom_switch
  platform: state
  to: 1_click_up
- entity_id: remote.abc_bedroom_switch
  platform: state
  to: 2_click_up
- entity_id: remote.abc_bedroom_switch
  platform: state
  to: 3_click_up
- entity_id: remote.abc_bedroom_switch
  platform: state
  to: 4_click_up
action:
  service: script.abc_bedroom_hue_remote
  data_template:
    button: '{{ trigger.to_state.state }}'
    room: abc_bedroom

And at this point, you could say to me: "sorry, but I tried that and it didn't work!". And you may be right :) (I'm not sure, but I can imagine that it won't work for repeated presses)
But there are solutions for this: Use device triggers without any extra custom integration
Device triggers for button presses are implemented in last HA, and they won't fail because of a battery level change. They will fire if the button changes, or if the sensor lastupdated string changes. So this issue is solved with them, and, in fact, after HA 0.108 this CC is basically deprecated:

You have the battery level of remotes in their own battery entity
You have the device info (almost every constant attr) of the remote assigned to a "device" in HA.
You have events fired when a button press is detected
You have "device triggers" to easily configure these events as automation triggers from the UI.

So every piece you need is already present, just in a different way :), but is the general trend for modern HA, so we should get used to it.
"Ok, but what you said doesn't mirror completely what we have with this CC!". Well, you're right again. Let's review what main Hue doesn't give us, and suggestions to overcome that:

I want to have a HA entity to show what the last button press was, when it was, have a state "history" of it, etc ---> Use eventsensor CC to create a sensor entity for each remote press event.
I need a faster refresh rate for sensors&remotes than the 5s of the main hue ---> Use fasthue CC to enable any refresh rate you want, and even use different rates for each bridge or change it dynamically.

I hope I've been of any help :)

About what to do, if something, in this repo right now, relating to this issue, my only suggestion would be to:

remove the battery_level attribute from the remote entity, so battery oscillations don't affect the remote state, so no STATE_CHANGED event, and no extra trigger fires.

As things are right now, main hue already creates sensor entities to track the battery level of remotes, so that attribute is not necessary!

@iamcagn Unfortunately, I just encountered the same issue as you, with automations firing after a non-button press event.  @azogue I sure how you guys can fix this!! :)

@azogue thanks for the great insight in your answer. Regarding you point after HA 0.108 this CC is basically deprecated:, I am thinking this could be the time to archive this CC, and point users to your CC.

What seems to trigger my automations randomly is that the remote goes unavailable for 2 seconds randomly through out the day which in turn ends up as a state change that triggers the automation.

What seems to trigger my automations randomly is that the remote goes unavailable for 2 seconds randomly through out the day which in turn ends up as a state change that triggers the automation.

Hi @acordill, I suppose when that happens you also get a "Fetching error" for the hue integration in the HA logs, right?
In the last version we are sharing basically everything with the main hue, and the remote entities created here inherit from the GenericHueSensor, so when one of the requests to the hub fails and the main hue sets all sensors as unavailable, the remote entity also moves to unavailable.
This usually only lasts 1 update interval, but the 'collateral damage' is that 2 state change events are fired, first one going to unavailable and the 2nd restoring the old state, resulting in another false positive.
Again, this is fixed for hue device triggers or automations listening directly to hue_event (the button press event is not fired in these 'unavailable' moments)
Also, if using the eventsensor CC from HACS to extract those events to a sensor entity, for those entities that 'bug' is never going to happen, as they rely on fired events.
So, 1 more reason to migrate :)
cc @robmarkcole

I am thinking this could be the time to archive this CC, and point users to your CC.

I'm currently working on an update for eventsensor to move it to UI config flow, no HA-restart, etc. Also trying to make easier the migration with a config wizard for hue remotes, so if you wait a bit I can redact the migration instructions by this week.

Thanks for the info. Yes lets ty make the transition as smooth as possible, and well communicated

What seems to trigger my automations randomly is that the remote goes unavailable for 2 seconds randomly through out the day which in turn ends up as a state change that triggers the automation.

Hi @acordill, I suppose when that happens you also get a "Fetching error" for the hue integration in the HA logs, right?
In the last version we are sharing basically everything with the main hue, and the remote entities created here inherit from the GenericHueSensor, so when one of the requests to the hub fails and the main hue sets all sensors as unavailable, the remote entity also moves to unavailable.
This usually only lasts 1 update interval, but the 'collateral damage' is that 2 state change events are fired, first one going to unavailable and the 2nd restoring the old state, resulting in another false positive.
Again, this is fixed for hue device triggers or automations listening directly to hue_event (the button press event is not fired in these 'unavailable' moments)
Also, if using the eventsensor CC from HACS to extract those events to a sensor entity, for those entities that 'bug' is never going to happen, as they rely on fired events.
So, 1 more reason to migrate :)
cc @robmarkcole

I am thinking this could be the time to archive this CC, and point users to your CC.

I'm currently working on an update for eventsensor to move it to UI config flow, no HA-restart, etc. Also trying to make easier the migration with a config wizard for hue remotes, so if you wait a bit I can redact the migration instructions by this week.

Thank you.  I just switched over to using your eventsensor, seems to have fixed my issue so far.

I too will try out the eventsensor/fasthue CC's instead, if it means less work to get the automations working then it sounds good to me.

I've converted my things over and found no issues so far. For those who have remotes, you can use the state map below and save a little time having to type it out ;)
state_map:
1000: 1_click
1001: 1_hold
1002: 1_click_up
1003: 1_hold_up
2000: 2_click
2001: 2_hold
2002: 2_click_up
2003: 2_hold_up
3000: 3_click
3001: 3_hold
3002: 3_click_up
3003: 3_hold_up
4000: 4_click
4001: 4_hold
4002: 4_click_up
4003: 4_hold_up

I can redact the migration instructions by this week.

It took a little bit more than I wanted, but at last there is a proposal in #16, please take a look

For those who have remotes, you can use the state map below and save a little time having to type it out ;)

@iamcagn check the new version of EventSensor, with UI configuration and wizard to configure Hue remotes :)

@azogue Thank you so much for all of your hard work!  Just to make sure I understand, my best bet is to capture the event data, correct?  I see the data changing in the sensor details in the HA UI, but I must be missing something in my automation.  I tried capturing both forms of "1 clck up" and neither is triggering.  How should I write my trigger?
  trigger:
    - platform: state
      entity_id: sensor.loft_hue_switch
      to: '1002'
    - platform: state
      entity_id: sensor.loft_hue_switch
      to: '1_click_up'
  action:
    - service: light.turn_on
      entity_id: light.loft_ceiling_fan_light

Hi @mikesalz,

It works, but it takes several seconds before a click is registered and the trigger fires

That is because of the hue polling every 5 secs. It is not a problem with the automation trigger (or the EventSensor CC)
For an immediate response, you need to use another ZigBee controller for your switches (like a conbee usb stick with the deconz integration, for example)
If you don't want to change and need a faster polling rate, use the Fast-Hue Polling CC, as it is described now in the README.
BTW, in your automation you don't need the 2 triggers: if using a state mapping, leave only the 2nd one, and if not, then the "code" would not be "1002" but 1002 (a number instead of a string).

Thanks for for the info, @azogue!  I will give the Fast Hue Polling CC a try.  I do still have a problem, though.  This issue has not been resolved with the new CC.  The buttons still "stick" until a different button is pressed.


Show the ~/Library folder not working on macOS 10.13.2

sudo chflags nohidden ~/Library doesn't work anymore.

I just did complete macOS setup on new hardware and this option does not work. I had to go through same steps as @Voleking mentioned.


[R-package] Request: provide more idiomatic interface

LightGBM for R has an interface which requires creating a dataset object from an R native type, and passing this custom type to the model training function. The prediction functions then take native R objects instead.
This interface is inconvenient to use, and is very different from what base R or typical R packages for decision trees (or classification/regresssion in general) have as interface.
Would be better if lightgbm could offer a more idiomatic interface, like ranger for example, which among others:

Allows a formula interface as well as an X/y interface, both of which accept R's own types (including data frames).
Accepts non-standard evaluation for column names in data frames.
Automatically determines categorical features when using data frames.

Thank you for your interest in LightGBM, and for writing this up! In the future, please link to previous conversations when you create new issues from them, as this helps us to keep track of the many conversations in this project. Specifically, I believe the content of this issue is very closely related to #42007 and ttps://github.com/microsoft/LightGBM/pull/4207#issuecomment-840895032.

Allows a formula interface as well as an X/y interface, both of which accept R's own types (including data frames).

Accepts non-standard evaluation for column names in data frames.

Have you seen {treesnip}'s LightGBM integration?
https://github.com/curso-r/treesnip/blob/bf27cd871b7fb663a76818f66ea0a5f9bf09f444/tests/testthat/test-lightgbm.R#L16
Does that package's interface satisfy the first two items (accept a formula, use non-standard evaluation for column names)? If not, it would be very helpful if you could provide code examples describing how you would like {lightgbm} to work. More specifics on the interface you would like this {lightgbm} to provide are necessary for maintainers or other contributors to do the work to satisfy this request.

could offer a more idiomatic interface

Is there a standard in the R ecosystem that you recommend {lightgbm} try to follow? Similar to https://scikit-learn.org/stable/developers/develop.html?

Yes, treesnip provides an interface with handling of data frames, categorical features, and non-standard evaluation; but it is a parsnip connector.
A good standard to follow would be Tidymodel's guidelines for modeling packages:
https://tidymodels.github.io/model-implementation-principles/
ranger is a very good practical example to copy from. Lots of other R packages for decision trees follow similar conventions (e.g. randomForest, gbm, party, C5.0, among many others) - not sure if I'd call it an ecosystem though.


unix: set non-block mode in uv_{pipe,tcp,udp}_open

R=@saghul
I didn't have time to write a test.  Feel free to steal this PR and put your own changes in.

Thanks, Ben! I'll add some versionchanged thing to the docs and update some tests a bit later then.

@bnoordhuis can you PTAL at this? https://github.com/saghul/libuv/compare/libuv:v1.x...do_you_even_open Pay special attention to the change to test-spawn.c, we used to set the fd to non-blocking before spawning a child process, it would now be after.
Also, I wonder if we should do the same for poll handles, WDYT? Windows doesn't do it either. /cc @piscisaureus

@saghul
For windows:

Doesn't matter for poll handles
For imported tcp handles it gets done: https://github.com/libuv/libuv/blob/550147fd67f03aba27545b80d4b62d3fd3a6ed39/src/win/tcp.c#L90

Why doesn't it matter for poll handles? I see we do put the fd as
nonblocking in the tests.
On Jan 13, 2015 10:52 PM, "Bert Belder"<EMAIL_ADDRESS>wrote:

@saghul https://github.com/saghul
For windows:

Doesn't matter for poll handles
For imported tcp handles it gets done:
https://github.com/libuv/libuv/blob/550147fd67f03aba27545b80d4b62d3fd3a6ed39/src/win/tcp.c#L90

—
Reply to this email directly or view it on GitHub
https://github.com/libuv/libuv/pull/134#issuecomment-69827627.

I added another patch for poll handles. PTAL: https://github.com/saghul/libuv/compare/libuv:v1.x...do_you_even_open

Why doesn't it matter for poll handles? I see we do put the fd as nonblocking in the tests.

The problem with uv_pipe_open() arises because libuv itself tries to do a nonblocking operation, but the fd is not in nonblocking mode. With uv_poll() we don't actually do any nonblocking stuff, we just do epoll-like things for the user.
The test must set SOCK_NONLBLOCK because it does nonblocking sends and receives.

The problem with uv_pipe_open() arises because libuv itself tries to do a nonblocking operation, but the fd is not in nonblocking mode. With uv_poll() we don't actually do any nonblocking stuff, we just do epoll-like things for the user.
The test must set SOCK_NONLBLOCK because it does nonblocking sends and receives.

I'm a bit confused :-/ AFAIK, all uv_{pipe, tcp, udp}_open work correctly on Windows. Apparently there are tricks on uv_pipe_open but It Just Works (TM), right?
Now, on poll handles the user needs to set the fd to non-blocking mode manually, which is what one of the patches here solves, for consistency with the other functions where the user doesn't need to do it.
Is there anything I'm missing? Thanks!

Had some discussion with Saùl on IRC.
This PR lgtm.

As discussed with @piscisaureus on IRC, the PR landed, I'll take the poll handles thing to another PR.


It's redundant to ask for layer type when creating a layer

It's compulsory to add type attrib as parameter when creating a layer, but the type is implicit in the function name:
createCartoDBLayer({...type:'CartoDB'...})
createTorqueLayer({ ...type: 'Torque', ...})
...

It would be way simpler if the type is defined only once as a parameter instead of having 6 different functions:
createLayer({...type:'CartoDB'...})
createLayer({ ...type: 'Torque', ...})
...

Issue moved to CartoDB/cartodb.js #1354 via ZenHub


Provide links to artifacts referenced in report

(plus some refactoring in check module)
Closes #104
Signed-off-by: Sergio Castaño Arteaga<EMAIL_ADDRESS>

Looks great, thanks!


Encoding of "complex business rules" in the shapes

We are often facing the situation where a SHACL application profile needs to encode "business rules" that go beyond what the SHACL core constraints can express. Typical real-world examples are:

"All instances of class X with dcterms:type = A or B must have the value M, N, O, or P in the property Z"
"On instances of class X with property P1 referring to a entity where dcterms:type = A, property P1 is mandatory, otherwise it is not"

These can be encoded as an additionnal "business rule" layer in the application profile using SHACL SPARQL constraints (https://www.w3.org/TR/shacl/#sparql-constraints)
Is this in scope of the style guide ?

Much of this can be expressed with DCTAP aka "DublinCore Tabular Application Profiles", and there is someone working on a DCTAP-to-SHACL program (not yet complete).


read_block_names exists but not callable

The function read_block_names is implemented here:
https://github.com/cmhamel/Exodus.jl/blob/master/src/Blocks.jl#L83
but when calling it there is an error:
julia> read_block_ids(mesh)
1-element Vector{Int32}:
 1

julia> read_block_names(mesh)
ERROR: UndefVarError: `read_block_names` not defined
Stacktrace:
 [1] top-level scope
   @ REPL[7]:1

For now you can use that method by typing Exodus.read_block_names
I need to add some more methods to the exports of the package.


cloudscraper can't solve some captchas

I get 403 sometimes on this website because of captcha:
You can test : https://www.43einhalb.com/adidas-yeezy-500-soft-vision-364709

Is the question something like "cloudscraper can't solve captchas even though I use captcha solving services"? The link has a hard captcha on it so cloudscraper is not gonna be able to go past it unless you provide a 2captcha/anticaptcha key.

@simonsruggi are you re-using your cookies? Or constantly generating a scraper object in a loop? The latter will trigger cloudflare anti bot protection , can you give some more detail how you are making your requests ? Like some example code?
Cheers

@null-routed  Obviously i use a 2captcha api key and it works but not on that page.
@VeNoMouS :
Example code:
scraper = cloudscraper.create_scraper()
scraper.recaptcha= {'provider': '2captcha', 'api_key': apikey}
response = scraper.get(link, headers = headers)
print(response.status_code)  #which turns to be 403 on that specific captcha item

What are headers? If you send wrong ordered headers, cf will reject you

Re recaptcha , if that site has a recaptcha outside of cf and it’s embedded into the site, my module won’t solve that, it only solves when the recaptcha is presented by cf

Re recaptcha , if that site has a recaptcha outside of cf and it’s embedded into the site, my module won’t solve that, it only solves when the recaptcha is presented by cf

I’m not on my pc atm so I can’t look at it right now

headers = {
'Host': 'www.43einhalb.com',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36',
'sec-fetch-user': '?1',
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'navigate',
'referer': 'https://www.43einhalb.com/adidas-yeezy-500-soft-vision-364709',
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7,fr;q=0.6,es;q=0.5',
}
The captcha is from cloudflare:
https://www.43einhalb.com/cdn-cgi/l/chk_captcha?s=2f0a65dd72ed6b170e26439b0a25ccede786dfd4-1573582965-0-AWQVoIsPlUO60sNGqJ6aKwvTgHhI7ZwPchCh4S74KA6Tcgxuoef8TOtM%2BmaV93gk7gTomgYivoHW9ohkL%2BpsmPI8LGswB38gx%2BEoVDWm6PLEHX3PbPHHg%2BagRgQzyRKZ1AgNWVcWs9gkqL%2BCHPJ%2BL4ArDWzOQFpGdvfgjEyF%2BTlREXOQ7cOFfOvyfGblZ3w6MnYgMI7ElBi42A5UyrniSia1RJXcIjW12iuB3%2BsuG6BmZl%2BNhlREbYpvu2nKvxi0mA%3D%3D&id=534a887c682d3c81&g-recaptcha-response=03AOLTBLS9v3-Ch_j25L98LUsDdSxTI_RDHTDaS8rO_5F9CUyDQCKehkxZqzSSQe95C1ArtAUCFtGv09XZfLpGLKgx-8pP4vCCelGzGI5uPBo1wYScZqIfofCxDw3Cx76y_HegC5ZUFvEuO7GeYrC9LbjtEkcxpArenonJaFdry-4wiRJ35-0LEfQxgiCbORrlVkqNYo-WLpW078hmmiAufC3KYpYxTY-0i-dgXwGS5YYBsReYt8YC4y6vWh3kBtFjsfeeLiXmPNo9-uonI5mmd38VnttcVZsM9z979M9m4wGCBmWyGlCg3uqBXwK182tZUjk0Ktgi0kK37BEHo_w-AYdl70qq7UgnuEapdKD_zcob68hG5o7wzpPxR6fwMte_deg76dlbgw-etMNspnkLlQlYUK7LBz1gI_WC-qeR083fzVR65mCHMdLWLCs-NTYbFca7mGZuX6ccbVaoUXUDvW7Z3LAEvY9YJ_mO4E1sykgFG8OY70_7fd3WYPPprTcKPASpnDvmOhK0

Your headers are not an ordered dict which will create your own issues, if you do

import cloudscraper
from pprint import pprint

scraper = cloudscraper.create_scraper()
pprint(scraper.headers)

You'll see these are an ordered dict, a normal dict does not keep order of insert
The problem is most likely from you trying to manually set your own headers rather than the scrapers ones and doing it in correctly.

Actually I tested this myself, and its reCaptcha on by default
Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cloudscraper
>>> scraper = cloudscraper.create_scraper(debug=True)
>>> scraper.get('https://www.43einhalb.com/adidas-yeezy-500-soft-vision-364709')
< GET /adidas-yeezy-500-soft-vision-364709 HTTP/1.1
< Host: www.43einhalb.com
< User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0.2
< Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
< Accept-Language: en-US,en;q=0.5
< Accept-Encoding: gzip, deflate, br
< DNT: 1
<

> HTTP/1.1 403 Forbidden
> Date: Tue, 12 Nov 2019 19:22:14 GMT
> Content-Type: text/html; charset=UTF-8
> Transfer-Encoding: chunked
> Connection: close
> CF-Chl-Bypass: 1
> Set-Cookie: __cfduid=d4eff3f2deab65b8b0c54a91b282ad0f01573586534; expires=Wed, 11-Nov-20 19:22:14 GMT; path=/; domain=.43einhalb.com; HttpOnly
> Cache-Control: max-age=2
> Expires: Tue, 12 Nov 2019 19:22:16 GMT
> X-Frame-Options: SAMEORIGIN
> Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
> Vary: Accept-Encoding
> Server: cloudflare
> CF-RAY: 534adfa1ced5eea6-AKL
> Content-Encoding: br

Also looking at the site... its not actually detecting reCaptcha for some reason,
I need to investigate whats going on.

Basically the first request is always a 403 (because of captcha) but then, solving captcha and making a new request with new cf_clearance cookie you’ll get 200

The actual problem appears that requests is not decoding the brotli even though I can see it ok in the debug, but when I access content or text attribute its encoded.. very strange bug I wonder if requests / urllib3 has a bug  , ill keep looking into it

Upgrading urllib3 resolved issue for me , it now decodes and detects reCaptcha and solves correctly.

Thank you! Working now but i get this warning:
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version!

upgrade your requests?

I don't think https://github.com/VeNoMouS/cloudscraper/blob/master/cloudscraper/init.py#L172 is working correctly

Thank you so much, everything is working smoothly now!

Found the issue, https://github.com/VeNoMouS/cloudscraper/blob/master/cloudscraper/init.py#L325 , since we super to requests and bypass our own hijack routine, we don't try decode brotli on earlier versions of urllib3, I will put in a fix for this
thanks for raising the issue @simonsruggi

Thank you for solving it

@simonsruggi release 1.2.8 has been pushed to resolve for any one else that might come across the same problem.
Since you have upgraded you won't have this issue, as this is for people with urllib3 < 1.25.1 installed