How can I contribute to py-pf? Port to python 3?

Hey Daniele,
Note: not an actual issue.
Hope you are doing good.
First of all, thank you for the time and effort you put into py-pf. It really makes life a little more bearable for newbies like me. :>
I'm currently having fun with flask and py-pf on my free time. Working on a Web GUI for pf. So far, so good. Neat. :+1:
I noticed that you don't update py-pf often lately (your last commit is recent but the one before that was from 2019). I did test it from OpenBSD 6.6 to 6.9 and everything worked as expected (at least from what I tested).
I would like to contribute to this project. What can I do? From the top of my mind, one thing that could be done is to port your code to python 3 (flask will drop python 2.7 and 3.5 support soon for example). Would this be a good first PR?
Care to share some lights on where py-pf can be improved? What would you think should be addressed first? I really don't have any clue but I'm willing to learn. :>
Thank you and have a nice week.
Cheers,

Hi PiRAT4,
Thanks a lot for your interest in py-pf.
Yes, I think the most urgent improvement for py-pf is porting it to Python3; it's something I've been postponing for too long.
I think the most boring part would be all the strings-to-bytes and bytes-to-strings conversions...
I would really appreciate your help on this task very much! :-)
Best regards,
Daniele

Thanks for your feedback. Need to read some documentation before I start (new to python). :)

Hi @dotpy,
I'm a bit stuck with string to bytes conversion.
How do you suggest that I approach this?
Getting this kind of error:
Traceback (most recent call last):
  File "/home/pirata/py-pf/pf/tests/test_filter.py", line 20, in setUp
    "ruleset": self.pf.get_ruleset()}
  File "/home/pirata/py-pf/pf/filter.py", line 497, in get_ruleset
    for rule in self._get_rules(path, d, clear):
  File "/home/pirata/py-pf/pf/filter.py", line 465, in _get_rules
    pr = pfioc_rule(anchor=path)
TypeError: expected bytes, str found

Btw, why is DIOCGETRULESET commented? pfioc_ruleset is not defined.
Would be something like this?
PF_ANCHOR_NAME_SIZE  = 64              # From /usr/include/net/pfvar.h
PF_ANCHOR_MAXPATH    = PATH_MAX - PF_ANCHOR_NAME_SIZE - 1

class pfioc_ruleset(Structure):        # From /usr/include/net/pfvar.h
    _fields_ = [("nr",                 c_uint32),
                ("path",               c_char * PATH_MAX),
                ("name",               c_char * PF_ANCHOR_MAXPATH)]

# TODO: pf_ruleset?

Sorry if this is a dumb question.
Thank you.
Have a nice week.
Ricardo

Hi @PiRAT4 ,
Thanks for your effort, I know those string-to-bytes conversions are the most annoying thing to take care of when porting py-pf to Python3... :-(
I've made a new branch (py3) with a few changes to get to the point where you were stuck.
I think there are two ways to approach this:

leave to the user the responsibility of converting strings and only pass bytes to py-pf;
keep the conversion "hidden" from the user and do it internally whenever a string has to be inserted in a C-like struct;

I prefer the second strategy, so I've made this commit with a few conversion examples, such as:
diff --git a/pf/filter.py b/pf/filter.py
index 7188db0..55231f6 100644
--- a/pf/filter.py
+++ b/pf/filter.py
@@ -117,7 +117,7 @@ class _PFTrans(object):

         for a, t in zip(self.array, trans_type):
             a.type = t
-            a.anchor = path
+            a.anchor = path.encode()

         self._pt = pfioc_trans(size=self.size, esize=sizeof(pfioc_trans_e),
                                array=addressof(self.array))
@@ -458,7 +458,7 @@ class PacketFilter(object):
         if path.endswith("/*"):
             path = path[:-2]

-        pr = pfioc_rule(anchor=path)
+        pr = pfioc_rule(anchor=path.encode())
         if clear:
             pr.action = PF_GET_CLR_CNTR

@@ -606,7 +606,7 @@ class PacketFilter(object):
         io = pfioc_table(pfrio_esize=sizeof(pfr_table))

         if filter is not None:
-            io.pfrio_table = pfr_table(pfrt_anchor=filter.anchor)
+            io.pfrio_table = pfr_table(pfrt_anchor=filter.anchor.encode())

I think this is the best way to go...
WRT the second question: DIOCGETRULESET, as well as a few other syscalls, is commented out simply because it's not used by py-pf.
All syscalls were initially commented out in py-pf, and were progressively uncommented as they were being implemented in py-pf; they acted like a kind of "to-do" list. :-D

Oh, I was close then:
Tried with:
pr = bytes(pfioc_rule(anchor=path))

OK, I fixed the syntax and  (iteritems -> items, basestring -> str,

Hey @dotpy,
Thank you for your help. I really appreciate it. :)
I agree that the 2nd option is better but do we need to this manually to all strings or can we create a general function? Something similar to this?
def _to_bytes(self):
    if type(self) is str:
        return codecs.encode(self, 'utf-8')
    elif type(s) is bytes:
        return s
    else:
        raise TypeError("Expected bytes or string but got %s instead." % type(s))

OK, I fixed some syntax and added your latest commit https://github.com/PiRAT4/py-pf/commit/690c7f58afcaef83f6e0d35fed048e1acb3b421b.
I'll keep trying to fix these type errors. Probably need to read more documentation.
Last error log:
EEEEEEEEEEEEEEEEEEEEEEEE
======================================================================
ERROR: test_add_addrs (pf.tests.test_filter.TestPacketFilter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pirata/py-pf/tests/test_filter.py", line 20, in setUp
    "ruleset": self.pf.get_ruleset()}
  File "/home/pirata/py-pf/filter.py", line 500, in get_ruleset
    for rule in self._get_rules(path, d, clear):
  File "/home/pirata/py-pf/filter.py", line 463, in _get_rules
    if path.endswith("/*"):
TypeError: endswith first arg must be bytes or a tuple of bytes, not str
----------------------------------------------------------------------
Ran 24 tests in 0.076s

FAILED (errors=24)

OK, that was my first thought when I saw all those constants commented out. I guess I could help with you that too later on. :)
Thank you and have a nice weekend.
Ricardo

Hi @PiRAT4,
I don't think we need a generic function like _to_bytes(), the idea is simpler than that: every time a c_char * is accessed, it must be decoded to a string, and every time a string is assigned to a member of a structure, it must be bytes-encoded.
I've made a few more changes to get the same error you're hitting, but I couldn't, so I tried to fix it anyway.
Now the tests pass, but I must have missed some conversions that might not be  triggered by tests.
I think now we could do a grep c_char _struct.py and check that all those c_char * are correctly converted in the code.
Cheers,
Daniele


Error while installing the project template

Category
[] Question
[X] Bug
[ ] Enhancement
Versions
Visual Studio Professional 2017
[    ]  SPFx Generator version (npm list -g @microsoft/generator-sharepoint)
Expected or Desired Behavior
Successful installation
Observed Behavior
Error due to pre-requisites that can not be resolved

The only defined pre-requisites for the VSIX package are the Core editor and .NET Framework 4.5. It is scoped for Community, Professional and Enterprise editions from 14.0 - 16.0. As it appears you are on a compatible version, there must be something missing from the VS install that the VSIX framework is expecting. Can you post the Help > About page from your instance? And do you have another machine you can try it on?


When window re-focused pickadate pops up

Initialize pickadate
Focus on another window or tab
Focus back to window
Calendar pops up

Happens on demo page too so this must be a new issue...

this goes back to 3.4.0, didn't try earlier versions

This has been mentioned several times before. Please read here: #160
Cheers.


Request for inner mini scroll bar

I wish to has inner mini scroll bar like http://noraesae.github.io/perfect-scrollbar/ .
because different browser scroll bar always make layout change, and this type of scroll bar wont effect the layout.
Correct me if i do something wrong =)
Thanks

Your issue is already submited #2206 and discussed


snap support

Lets make sure that we squash these commits

LGTM. Let me know if we want this merged or not.


Bug/async early stream break

Summary

Checklist

[ ] I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
[ ] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
[ ] I've updated the documentation accordingly.

git@github.com:ItakGol/Skep_Tech.git

git pull origin master

git@github.com:ItakGol/Skep_Tech.git

git pull origin master

git checkout bug/async-early-stream-break

git merge master

git push -u origin bug/async-early-stream-break

git push -u origin bug/async-early-stream-break


Fix unused assignment

Fix unused assignment

Initially, you creating variable name and assigning to her value of msg.Name and checks for an empty name.
But in the end msg.Name using to create an actor actor.SpawnNamed(&props, "Remote$"+msg.Name) where it make sense to use name

Good catch! thanks

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


back/forward buttons sometimes don't reflect history

I've seen this happen in two different ways:

Click back a few, then click forward. The forward button doesn't go forward to the last page. Instead it stops at the second to last.
Click back all the way to the end. The back button gives you one more press backwards then it should and it loads some other page from your history.

This gif shows issue 1. I navigate a few pages (ending up on Gmail) then click back to start page. When I click forward, I can't get back to Gmail.

@linclark Is this still happening? I can't reproduce it.

I can't reproduce it now either. I'm going to close it since we can always reopen if it comes up again.


Add merge subdomain method

This adds a method to fv3fit.reservoir.domain.RankDivider that is used to reshape reservoir model outputs from a flat array to the original x, y, z dims.
The reshaping in the function is not very intuitive to follow in the code, a more detailed breakdown of the reshaping is in this notebook. The section "Breakdown of what's going on in the merge function" demonstrates what the various reshaping steps are doing.
Added public API:

RankDivider.merge_subdomains

[x] Tests added

Resolves # [JIRA-TAG]
Coverage reports (updated automatically):

Thanks- merging for now, so that there's an API that can be used to work towards getting a wrapper model that can work in the prog run.


Expanding grid overlay feature to rotation mode

I have added this to the original implementation so now crop window can display different grid layout even during rotation. Note Fibonacci is known to be still broken (hence it is still disabled under rotation mode) and this is on TODO list to fix.

Just added the last piece of this work. Now grid overlay is full functional under rotation mode.

This works fine in Crop mode. Now I can rotate any kind of grids if I drag outside of the crop bounds. :+1:
In the Rotate mode, I could change origin of rotation grid when I click on the grid in previous versions and it was useful when I want to rotate the grid lines to match vertical/horizontal lines, but it is not possible now. IMHO it would be better idea to keep the Rotate mode as-is and show the new grid patterns only in the Crop mode. I'm going to push a commit for this later.

I think one way to do this is when starting the rotate mode the display automatically turn back to the grid. Once the mouse is released (the user feels the rotation is ok) then the display can get to change again to different overlay to see whether it works for other composition. This should be a very easy change.

@MarinnaCole Yes, it is very easy (and it's what the Crop mode was in v4.1.5), but what I'm talking about is a different thing. Could you build eb1ce40 and try its Rotation mode (with  button, not with  button)?  A picture is worth a thousand words of my poor explanation. The origin of rotation is marked with a circle for clarity in this commit, and I think you will understand what I'm trying to explain when you click somewhere inside the crop bounds then rotate the grid with mouse dragging.


[Doc] Update expression_partitioning.md

Update docs to say that Currently, only support partition by date_trunc() for date or datetime.
Why I'm doing:
What I'm doing:
Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[x] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[ ] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.2
[x] 3.1
[x] 3.0
[x] 2.5

revised: wanted to tell users that the type of partitioning col in expression partitioning cannot be int. But, this is already included in the description for partition_column. So this pr can be closed.


Add voice sending for GUI example

Closed?

open another.
19 июля 2016, 17:27:53, от "Martin Evans" <<EMAIL_ADDRESS>>:
Closed? —
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub , or mute the thread .


Fix typo fluentd_params plugin

I got failed: [default] (item=source) => {"ansible_loop_var": "item", "changed": false, "item": "source", "msg": "NameError: name 'params_to_text' is not defined"} error when using the filter plugin.
I solved the problem as rename params_to_text to fluentd_params_to_text.
Thanks.

That's right! Thank you for solving that


Second otp item generation causes unable to dismiss adding dialog

Looks like this is an issue from QR code generator

Hmm, odd. This can't be reproduced...


Wallet read part 2

lives on #979
lives on #981
lives on #983

flicking this to CI it

I'd like to land this so that we can use proptest on #963


chore: 2.10.0 release and changelog

Why is this needed?
Update CHANGES.md and version.py according to the latest 2.10 release.
Proposed Changes

update CHANGES.md
update version.py
...

Does this PR introduce any breaking change?
No

Happy too that we finally found some time to finalize this long due release... I like being a maintainer, but with work and, well, life, it can really be challenging to dedicate some time... I hope I will be more consistent this year.


aur fetch: fail if history was rewritten.

The AUR enforces a ff-only policy for PKBUILDS, however, in rare
occasions TUs will rewrite and force-push. Prime exemple being removal
of commits that introduce malicious code to the package.
Refuse to fetch in such scenario. When this happens, the user should
investigate why history got rewritten and take appropriate measures.
The check can be bypassed by the new option --force.
Users should update any existing cached repos to make sure they have the
non-fastforward refspec:
find "${AURDEST}" -name .git -execdir git config remote.origin.fetch 'refs/heads/*:refs/remotes/origin/*' \;

:+1:
Probably needs to be documented in the new man page as well, see #550...


python312Packages.avwx-engine: init at 1.8.28

Description of changes
Aviation Weather parsing engine
https://github.com/avwx-rest/avwx-engine

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

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

Result of nixpkgs-review pr 311413 run on x86_64-linux 1

4 packages built:

python311Packages.avwx-engine
python311Packages.avwx-engine.dist
python312Packages.avwx-engine
python312Packages.avwx-engine.dist


npm resolution error report

When trying to use npx hyperbook setup I get the following error report:
# npm resolution error report

2022-08-16T09:38:37.205Z

While resolving<EMAIL_ADDRESS>Found<EMAIL_ADDRESS>node_modules/@openpatch/patches
<EMAIL_ADDRESS>from the root project

Could not resolve dependency:
peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>node_modules/@bitflow/core
<EMAIL_ADDRESS>from the root project

Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Raw JSON explanation object:

{
  "code": "ERESOLVE",
  "current": {
    "name": "@openpatch/patches",
    "version": "5.2.1",
    "whileInstalling": {
      "name": "hyperbook-simple-template",
      "version": "0.1.1",
      "path": "/home/janek/data/1-projects/software-challenge/docs/hyperbook/.hyperbook"
    },
    "location": "node_modules/@openpatch/patches",
    "isWorkspace": false,
    "dependents": [
      {
        "type": "prod",
        "name": "@openpatch/patches",
        "spec": "5.2.1",
        "from": {
          "location": "/home/janek/data/1-projects/software-challenge/docs/hyperbook/.hyperbook"
        }
      }
    ]
  },
  "currentEdge": {
    "type": "prod",
    "name": "@openpatch/patches",
    "spec": "5.2.1",
    "from": {
      "location": "/home/janek/data/1-projects/software-challenge/docs/hyperbook/.hyperbook"
    }
  },
  "edge": {
    "type": "peer",
    "name": "@openpatch/patches",
    "spec": "6.x",
    "error": "INVALID",
    "from": {
      "name": "@bitflow/core",
      "version": "0.6.0",
      "whileInstalling": {
        "name": "hyperbook-simple-template",
        "version": "0.1.1",
        "path": "/home/janek/data/1-projects/software-challenge/docs/hyperbook/.hyperbook"
      },
      "location": "node_modules/@bitflow/core",
      "isWorkspace": false,
      "dependents": [
        {
          "type": "prod",
          "name": "@bitflow/core",
          "spec": "0.6.0",
          "from": {
            "location": "/home/janek/data/1-projects/software-challenge/docs/hyperbook/.hyperbook"
          }
        }
      ]
    }
  },
  "strictPeerDeps": false,
  "force": false
}

Thanks. I fixed the dependency mismatch in 67901f7872b5ab39357089c1750583cf42bff949


[FEAT] Seach-bar

A search bar on the top left corner of the website to search any name from the list/table.

@bilalakhter - your working on this, right?


extra . in URL

https://github.com/google/liblc3/archive/refs/tags/v.1.1.0.tar.gz

There is an extra . in v.1
Seems like a mistake?

Oh yes, it's a mistake.
Should be fixed.
Thanks.


Feature : Privacy and Copyright Policy Implementation for Metaverse Website

Is your feature request related to a problem? Please describe.
The Metaverse website currently lacks a comprehensive privacy and copyright policy, which poses several issues:

Users are not informed about how their data is collected, used, or protected, leading to potential privacy concerns.
There is no clear guideline on the ownership and usage rights of the content shared on the platform, which could result in copyright infringement and disputes.

Describe the solution you'd like
To address these issues, a detailed privacy and copyright policy should be implemented on the Metaverse website. The solution should include:

Privacy Policy:

Data Collection: Outline what personal data is collected, including cookies, IP addresses, and user-provided information.
Data Usage: Describe how the collected data is used, such as for improving user experience, marketing, or analytics.
Data Protection: Explain the measures taken to protect user data from unauthorized access, breaches, or misuse.
User Rights: Inform users about their rights regarding their data, including access, correction, deletion, and opting out of data collection.
Third-party Sharing: Disclose any sharing of data with third parties and the purposes of such sharing.

Copyright Policy:

Content Ownership: Clarify the ownership rights of the content created and shared by users on the platform.
Usage Rights: Define how users can use the content available on the platform, including any restrictions.
Infringement Reporting: Provide a clear process for reporting copyright infringement and how such reports will be handled.
License Agreements: If applicable, detail any licenses under which content is shared or distributed.

Describe alternatives you've considered

Minimalist Approach: Implement a basic policy with limited details. However, this might not fully address user concerns or legal requirements.
Third-party Services: Use third-party services for privacy compliance and copyright management. This could be costly and less integrated with the platform’s specific needs.

Are you contributing under any open-source program?
Yes, this project is under GSSOC'24 Open Source Contribution. The implementation of these policies will not only enhance user trust but also ensure compliance with legal standards, thereby supporting the open-source community's values of transparency and user rights.

@apu52
Kindly assign me this issue under GSSOC'24

@anuragverma108 Welcome to METAVERSE!!!!!!!
Thanks for raising the issue.
I have assigned you . you can start working on this issue.

Kindly assign this issue to me!

@PriyaGhosal Assigned!
Make sure to attach before & after screenshots in your PR. Also, star the repo before working on it. While creating your PR, ensure you pull all existing changes beforehand to avoid conflicts.
Happy open-source contributing!


add status bit struct for SpringController SCRecord

Addresses #58

Tests for the status field in SCRecord have been added and pass in #70


RuntimeProfiler: catch the exception in case application instance is null

Description

When running xaml in a desktop process in XamlPresenter mode, we might not have an Application instance object.
Trying to get it in the telemetry will throw an exception and crash the app.
This code change will catch the exception and simply 'eat' it if it's thrown.

/azp run


CL_MAP_WRITE_INVALIDATE_REGION is a valid flag in 1.2

No need for this ifdef https://github.com/boostorg/compute/blob/master/include/boost/compute/command_queue.hpp#L88

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27975358-cl_map_write_invalidate_region-is-a-valid-flag-in-1-2?utm_campaign=plugin&utm_content=tracker%2F402515&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F402515&utm_medium=issues&utm_source=github).

Based on this https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/enums.html#cl_map_flags and this https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/enums.html#cl_map_flags, I think ifdef is needed, but it should be CL_VERSION_1_2 instead of CL_VERSION_2_0.

Yeah.

Thanks ;) I'll fix it soon.

Can be closed - see https://github.com/boostorg/compute/pull/533.


can you share the English language model

HI，thank you to share this repo，can you share the English language model

Please share the english model as english model contains the hindi models for hifi gan


Encode/Decode sub messages without callbacks

Hi,
I'm new to nanopb. I'm trying to create a simple example with nested messages but It seems that encoding is fine but when I want to decode it I get end-of-stream error. If I understand correctly I only need callbacks if I define reapeated messages or undefined string size message. Is my encoding steps is correct? How about decoding which one should I decode first submessages (child) or main message?
Thanks.
Suppose this example:
# my_sample.proto
message MainMessage {
    message Child {
        required int32 a = 1;
        required int32 b = 2;
    }
    // if I use required it works fine, but for optional I get issue
    optional Child child = 1;
}

void decode(uint8_t *input, size_t message_length)
{
    MainMessage msg = MainMessage_init_zero;
    pb_istream_t stream = pb_istream_from_buffer(input, message_length);
    bool status = pb_decode(&stream, MainMessage_Child_fields, &msg.child);
    if (!status)
    {
        printf("Decoding failed: %s\n", PB_GET_ERROR(&stream));
        return;
    }
    status = pb_decode(&stream, MainMessage_fields, &msg);
    if (!status)
    {
        printf("Decoding failed: %s\n", PB_GET_ERROR(&stream));
        return;
    }
    printf("Message decoded a: %d, b:%d\n", msg.child.a, msg.child.b);
}

void encode()
{
    MainMessage msg = MainMessage_init_zero;
    msg.child.a = 1;
    msg.child.b = 2;
    uint8_t buffer[128] = {0};
    size_t message_length = 0;
    bool status;
    pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer));

    if (! pb_encode_submessage(&stream, MainMessage_Child_fields, &msg.child)){
        printf("pb_encode_submessage Failed!\n");
        return;
    }

    if (!(status = pb_encode(&stream, MainMessage_fields, &msg)))
    {
        printf("pb_encode Encoding failed: %s\n", PB_GET_ERROR(&stream));
        return;
    }
    message_length = stream.bytes_written;
    printf("buffer: ");
    for (int i = 0; i < sizeof(buffer); i++)
    {
        if (buffer[i])
            printf("%d, ", buffer[i]);
    }
    printf("\nmessage_length: %d\n", message_length);
    decode(buffer, message_length);
}

int main()
{
    encode();
}

Thanks.

You don't need to separately encode/decode the submessage.
Just the parts that encode the mainmessage is enough, the submessage will automatically be encoded as part of it.

@PetteriAimonen I already tried that but after decoding the values for sub-messages is all default ones. I edited the main code I get zeroes for a and b.

For optionals, you need to set has_child = true.

@PetteriAimonen Thanks, but where should I add this param? Can you give me an example?

@masoudr Check out this.

@uraj I still can't get it. Do you mind adding it to my current example?

@masoudr Sorry my previous comment was wrong. I've edited it. Check it out.

@uraj Thanks. Do I need to set it for encoding too?

You set it only for encoding. When decoding, the decoder sets it for you so you know whether the incoming message contains the optional or not.

Can you tell me what option should I set when I use a repeated field? It seems that there is no option with has_... for the repeated fields.

Don't be afraid to look inside the generated .pb.h files. You'll find a "field_count" field there.


Allow custom annotation within a task

For instance, in Dask, we can only get input and output params.
Sometimes it's useful to add a custom annotation associated to a task, inside a task, which changes at runtime.

Use case: I want to capture the GPU id used by a task. This is not a task parameter nor this is an output result.


wrong number of arguments at pickler

Hi
I copied the code verbatim from
https://github.com/vincenzobaz/spark-scala3/blob/main/examples/src/main/scala/sql/StarWars.scala
But I'm getting
[error] 34 |    ).toDS.map((n,f) => Friends(n, f))
[error]    |          ^
[error]    |wrong number of arguments at pickler for (targetObject: org.apache.spark.sql.catalyst.expressions.Expression,
[error]    |  functionName
[error]    |: String, dataType: org.apache.spark.sql.types.DataType, arguments:
[error]    |  Seq[org.apache.spark.sql.catalyst.expressions.Expression]
[error]    |, methodInputTypes: Seq[org.apache.spark.sql.types.AbstractDataType],
[error]    |  propagateNull
[error]    |: Boolean, returnNullable: Boolean, isDeterministic: Boolean):
[error]    |  org.apache.spark.sql.catalyst.expressions.objects.Invoke: (org.apache.spark.sql.catalyst.expressions.objects.Invoke.apply :
[error]    |  (targetObject: org.apache.spark.sql.catalyst.expressions.Expression,
[error]    |    functionName
[error]    |  : String, dataType: org.apache.spark.sql.types.DataType, arguments:
[error]    |    Seq[org.apache.spark.sql.catalyst.expressions.Expression]
[error]    |  , methodInputTypes: Seq[org.apache.spark.sql.types.AbstractDataType],
[error]    |    propagateNull
[error]    |  : Boolean, returnNullable: Boolean, isDeterministic: Boolean):
[error]    |    org.apache.spark.sql.catalyst.expressions.objects.Invoke
[error]    |), expected: 8, found: 6
[error]    | This location contains code that was inlined from Serializer.scala:68

I'm using Scala 3.1.1 and Spark 3.2.1
Any help would be very appreciated
Thanks

Thanks, I won't be able to try it for the moment as I reverted to Scala 2 given the issues I was hitting with Scala 3. Might try again in the future.

I still have this issue using Spark 3.3.1 in 0.1.3 using a simple final case class Person(name: String, age: Long).

The library is using 3.2.0. Could you try with this version to check if this is the issue?
I guess it's time to upgrade spark and scala in this project 😓

You are right, I guessed that a minor would not influence the result my bad !

 I am running a publish for version 0.1.4 with spark 3.3.0


NCCL backend in DeepSpeed not yet implemented

Hi, when i run with single_node with 4 GPUs, it gives that NCCL is not implemented, how can i use NCCL?
[2023-06-30 11:01:34,361] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2023-06-30 11:01:34,795] [INFO] [launch.py:145:main] WORLD INFO DICT: {'localhost': [1, 2, 3, 4]}
[2023-06-30 11:01:34,795] [INFO] [launch.py:151:main] nnodes=1, num_local_procs=4, node_rank=0
[2023-06-30 11:01:34,795] [INFO] [launch.py:162:main] global_rank_mapping=defaultdict(<class 'list'>, {'localhost': [0, 1, 2, 3]})
[2023-06-30 11:01:34,795] [INFO] [launch.py:163:main] dist_world_size=4
[2023-06-30 11:01:34,795] [INFO] [launch.py:165:main] Setting CUDA_VISIBLE_DEVICES=1,2,3,4
[2023-06-30 11:01:36,125] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2023-06-30 11:01:36,129] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2023-06-30 11:01:36,139] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2023-06-30 11:01:36,152] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2023-06-30 11:01:39,534] [WARNING] [comm.py:152:init_deepspeed_backend] NCCL backend in DeepSpeed not yet implemented
[2023-06-30 11:01:39,535] [INFO] [comm.py:594:init_distributed] cdb=None
[2023-06-30 11:01:39,556] [WARNING] [comm.py:152:init_deepspeed_backend] NCCL backend in DeepSpeed not yet implemented
[2023-06-30 11:01:39,556] [INFO] [comm.py:594:init_distributed] cdb=None
[2023-06-30 11:01:39,556] [INFO] [comm.py:625:init_distributed] Initializing TorchBackend in DeepSpeed with backend nccl
[2023-06-30 11:01:39,568] [WARNING] [comm.py:152:init_deepspeed_backend] NCCL backend in DeepSpeed not yet implemented
[2023-06-30 11:01:39,568] [INFO] [comm.py:594:init_distributed] cdb=None
[2023-06-30 11:01:39,576] [WARNING] [comm.py:152:init_deepspeed_backend] NCCL backend in DeepSpeed not yet implemented
[2023-06-30 11:01:39,576] [INFO] [comm.py:594:init_distributed] cdb=None

As far as I know. NCCL is not implemented by deepspeed yet, but deepspeed will use torch.distribute, which is inited by NCCL.
In short, deepspeed does not implement NCCL, but torch does.

As far as I know. NCCL is not implemented by deepspeed yet, but deepspeed will use torch.distribute, which is inited by NCCL. In short, deepspeed does not implement NCCL, but torch does.

no effect on usage of nccl in deepspeed?

As far as I know. NCCL is not implemented by deepspeed yet, but deepspeed will use torch.distribute, which is inited by NCCL. In short, deepspeed does not implement NCCL, but torch does.

no effect on usage of nccl in deepspeed?

No. Please try.

These error messages should be resolved after https://github.com/microsoft/DeepSpeed/pull/4009
Please reopen and tag me if you are still seeing this problem. Thanks!

Upgrading deep speed to latest version solved the problem for me.


Ball position is reset when a direct free kick happens

Describe the Bug
The rules say, that `A direct free kick is taken from the place where the offense occurred.
Steps to Reproduce

Do an offence like ball holding, the ball gets teleported to the middle

Expected behavior
The ball should stay at the position.

The comment here is too generic and does not exactly match the rule. The place an offense occurred is not necessarily the location of the ball.
There are multiple tests scenarios available to check different kind of fouls, an easily reproducible way would be to either add a scenario or patch one of those scenarios to add a test on the ball position (e.g. forceful contact).

Ball positions should be checked in:

ball_holding/multi_robot_kid
forceful_contact/*


binding bcwig missing the ending zero value

The last bar [xl, xr] of value v shall give two points in histogram:
{x: xl, value: v},
{x: xr, value: 0}

The second point is not generated.

fixed


Exported Hunts not refreshing

After finishing a hunt it doesn't show up in exported hunts. I have to close and reopen the client.
Either a force refresh button or an auto refresh would be nice.

Oh, that seems to be a bug, HunterPie does cache the exported hunts list, but it was supposed to clear the cache after 5 minutes, which is apparently not happening

Fixed #459


MudAutocomplete Clearable, close dropdown when X is pressed

Feature request type
Enhance component
Component name
MudAutocomplete
Is your feature request related to a problem?
When you click the X to delete a value in the search fields the dropdown menu continues to be displayed.
Describe the solution you'd like
The field should be cleared and no drop down until typing starts again. Need to use version 6.x.
Have you seen this feature anywhere else?
No response
Describe alternatives you've considered
No response
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

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

Might be that this is only NOT happening on MAUI.

@Light407 Which platform / operating system?

Please let me know which platform this is occurring on and if it's still an issue in the latest version so I can reopen the issue.


License - Update AddBlock interface

Update AddBlock(block *ledgercore.ValidatedBlock) error to AddBlock(block *types.ValidatedBlock) error. This should move vb, err := helpers.ConvertValidatedBlock(*vblk) from AddBlock() to a higher level.

not necessary after all, handled in #1321


Added sauce_safari_web

Added sauce_safari_web for running the selenium tests on SauceLabs

Can you link to this running on SauceLabs? They have a video playback feature.

@smcgregor Yes, the tests still dont run currently and I am working on that right now. Once the tests run good, I will comment the link on this PR.

@smcgregor The tests run successfully now on SauceLabs. The test-run can be seen at https://saucelabs.com/tests/29a8893777de46fc88eeb7fed7c8b58a
Should I squash the commits into one for the PR to be merged?

Yes, unless you want to add TravisCI support first.

@smcgregor I have squashed the commits into one. I was planning on implementing safari_extension and sauce_safari_extension next and then finally adding TravisCI support to run the tests.


Passages truncated to 256 tokens?

From the scripts to reproduce the dense indices of the documents (wiki paragraphs):
https://github.com/castorini/pyserini/blob/1219cdbca780e869ba77658c29e1aaa972585d09/pyserini/resources/index-metadata/faiss.miracl-v1.0.20221004.2b2856.mdpr-tied-pft-msmarco.README.md
It seems that you have used the default max-length from pyserini.encode which seems to be 256:
https://github.com/castorini/pyserini/blob/b7e1da305dd31b195244d49321087505996260c6/pyserini/encode/__main__.py#L121
Even if the max_length of the base model used (BERT) is 512 (https://huggingface.co/castorini/mdpr-tied-pft-msmarco-ft-miracl-es/blob/main/tokenizer_config.json).
Am I getting this right? There might be paragraphs in wikipedia longer than 256 tokens and it might not be a good idea to truncate them.
Thank you very much for such a great resource!

Hi @ftvalentini! Thanks for your interest in MIRACL! yes we use the default length 256 for the encoding


Self-Supervised Learning for an efficient use of large, unlabeled datasets

Motivation for the feature

Self-supervised Learning (SSL) is a hot topic in computer vision research that aims to make proper use of the large amounts of unlabeled data that is readily available by unsupervised pretraining through auxiliary tasks. Given how the medical field is already constrained from having relatively smaller datasets, SSL could help in efficiently utilizing the unlabeled datasets without having to depend on manual segmentations. For more context, it is common to hear from clinicians/hospitals that only a subset of a (possibly large) dataset is manually labeled. SSL could be helpful in using that unlabeled data, without asking the clinicians to go through the manual segmentation process again.
SimCLR is a well-known SSL method based on contrastive learning and has also been explored in the medical domain in this paper. I tried reimplementing the latter for a course project (details/code here) but have not seen much improvement with SimCLR over supervised baselines. There are other methods like BYOL, Barlow Twins, ViT, etc. that have since been the SOTA but their applications to medical data (in particular, brain and/or SC for MS and/or SCI lesion segmentation) are yet to be explored.
Additional context

A few more resources for medical imaging-based SSL:

https://arxiv.org/pdf/2101.05224.pdf
https://proceedings.neurips.cc/paper/2020/file/d2dc6368837861b42020ee72b0896182-Paper.pdf

Alternatives

A related (and also simpler) topic is the idea of transfer learning but I am not fully sure of the latest advancements on that.

VISSL from FB (or Meta 😛) includes reproducible implementations for most SOTA SSL methods.

Thank you for the link! This is really useful! 🙌


Add cell navigation commands as well as a default set of keyboard bindings for most new interactive window cell commands

For #12414 and #12415

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[x] Title summarizes what is changing.
~[x] Has a news entry file (remember to thank yourself!).~
[x] Appropriate comments and documentation strings in the code.
~[ ] Has sufficient logging.~
[x] Has telemetry for enhancements.
~[ ] Unit tests & system/integration tests are added/updated.~
~[ ] Test plan is updated as appropriate.~
~[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).~
~[ ] The wiki is updated with any design decisions/details.~

Codecov Report

Merging #13334 into master will decrease coverage by 0.04%.
The diff coverage is 22.85%.

@@            Coverage Diff             @@
##           master   #13334      +/-   ##
==========================================
- Coverage   59.73%   59.69%   -0.05%
==========================================
  Files         670      670
  Lines       37289    37338      +49
  Branches     5292     5305      +13
==========================================
+ Hits        22276    22289      +13
- Misses      13879    13911      +32
- Partials     1134     1138       +4

Impacted Files
Coverage Δ

src/client/datascience/types.ts
100.00% <ø> (ø)

src/client/telemetry/index.ts
82.35% <ø> (ø)

...ient/datascience/editor-integration/codewatcher.ts
67.80% <8.00%> (-2.82%)
:arrow_down:

src/client/datascience/commands/commandRegistry.ts
34.50% <33.33%> (-0.03%)
:arrow_down:

src/client/datascience/constants.ts
99.78% <100.00%> (+<0.01%)
:arrow_up:

src/client/common/utils/platform.ts
64.70% <0.00%> (-11.77%)
:arrow_down:

src/client/datascience/crossProcessLock.ts
79.41% <0.00%> (-11.77%)
:arrow_down:

src/client/linters/pydocstyle.ts
86.66% <0.00%> (-2.23%)
:arrow_down:

src/client/datascience/debugLocationTracker.ts
76.56% <0.00%> (-1.57%)
:arrow_down:

src/client/common/process/proc.ts
14.49% <0.00%> (-0.73%)
:arrow_down:

... and 15 more

Continue to review full report at Codecov.

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


Closurization operator closures should not reflect their results

This issue was originally filed by @seaneagan

The closures returned from:
https://api.dartlang.org/docs/channels/be/latest/dart_mirrors/ClassMirror.html#[]
https://api.dartlang.org/docs/channels/be/latest/dart_mirrors/InstanceMirror.html#[]
are specified to return the result of invoke which is an InstanceMirror.  This makes the closures much less useful.  They should just return the raw result of the invocation.

API was removed in 10ecef79683a8c633bddf202a90008c4f8598ad0


scheduler: fix network schedtag not set capacity

这个 PR 实现什么功能/修复什么问题:
调度进行 network 过滤时设置 capacity
是否需要 backport 到之前的 release 分支:

release/2.10.0

/cc @wanyaoqi

/area scheduler

/lgtm
/approve

Codecov Report

Merging #1484 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #1484      +/-   ##
=========================================
- Coverage     7.7%   7.68%   -0.03%
=========================================
  Files         411     411
  Lines       62834   62834
=========================================
- Hits         4844    4829      -15
- Misses      57583   57595      +12
- Partials      407     410       +3

Flag
Coverage Δ

#aFlag
7.68% <ø> (-0.03%)
:arrow_down:

Impacted Files
Coverage Δ

pkg/util/seclib2/seclib.go
91.48% <0%> (-4.26%)
:arrow_down:

pkg/util/rbacutils/rbac.go
71.33% <0%> (-3.43%)
:arrow_down:

pkg/appsrv/response.go
66.15% <0%> (-3.08%)
:arrow_down:

Continue to review full report at Codecov.

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


openblas 0.3.4 build error on visual studio 2017 and windows 10

when I build openblas 0.3.4 on windows10 using cmake and visual studio 2017, errors occur:
1>Create openblas.def file
1>Can't locate File/Spec.pm in @INC (you may need to install the File::Spec module) (@INC contains:) at E:/Tools/OpenBLAS-0.3.4/exports/gensymbol line 3515.
1>BEGIN failed--compilation aborted at E:/Tools/OpenBLAS-0.3.4/exports/gensymbol line 3515.
1>D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,5): error MSB6006: “cmd.exe”已退出，代码为 255。
can anybody tell me how to fix this problem ?

I got the points.
when building openblas on visual studio, it DO NEED perl to handle file operation. The perl installed on my system may have some problem, when I reinstall perl,the problem is fixed.


Fix json parsing error on api_call: Issue #169

[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
[x] I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferably).
[ ] I've written tests to cover the new code and functionality included in this PR.
[x] I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary

Fixes json parsing bug when running the SlackClient.api_call by returning son payload of ok is False

Related Issues

Fixes #169

Test strategy

N/A

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Ronan McCann-Jackson seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Patrons cause a penalty if not served

Required for #45
Reference:
https://docs.google.com/document/d/1YmSmHOAYKzmCU9hBz_QsyhOy-GWBxBwKasGI5-ZyYhw/edit#bookmark=id.jevttwg4u16d
Patrons currently just keep walking away forever.   There should be a penalty to your bucks if a patron reaches the end of the bar.

adding collider at end of bar to destroy drinks


Optimizely Feature flag example

In this example, you will be able to use optimizely feature flags at the edge with NextJS applications deployed on Vercel. For details, please refer to the readme.

@gbibeaul Thanks for the detailed review and feedback. I have incorporated all the implementation related changes. Now working on adding detailed messaging on the actual pages as per your suggestion.

@gbibeaul We have incorporated all your feedback. This is ready for another look!

@gbibeaul It will be great if you can spare some time to take another look at this

@zashraf1985 Sorry for the delay, somehow the notification got out of my todo list 🤔 . All looks good on the edits. I'll make a last few checks and we should be good to go.

@gbibeaul Really appreciate your quick response on this. Thanks for reviewing and merging this.


Edit code default keyboard shortcut takes precedence over terminal paste

This is a minor gripe, because the shortcut can easily be rebound by the user, but I'd like to suggest the default be changed from Ctrl+Shift+V, as this is the default shortcut for paste in many modern terminals (in my case, Bash in VS Code in Gnome on Fedora).  Alternatively perhaps it could be limited to not activate when the terminal is focused.

This is still a problem for new Cody installations.

This can be resoled by adding editorFocus to the When Expression of Cody's keybinding.

Still needs fixing afaik.

Hi all, sorry this issue was left open longer than it should have. This is now fixed, we no longer use this shortcut but instead Opt+K (or Alt+k)


Error when docker run piped command

[root@ovh2 /]# docker run --rm --volumes-from adt-wp-nginx -v /backup:/backup busybox tar -chf - /usr/share/nginx/www /etc/s6 /etc/nginx/| pv -L 5m > /backup/volumes_adt_wp_nginx_test.tar
tar: removing leading '/' from member names                                                                                ]
^C02GiB 0:03:28 [5,27MiB/s] [                         <=>                                                                                ]
Error deleting container: Error response from daemon: Cannot destroy container 13aca325fa4c7cab0dc64c5efff968c8050a9c4dd1152a1f545d363632aa10d4: Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f
write /dev/stdout: broken pipe
[root@ovh2 /]# docker ps
CONTAINER ID        IMAGE                                     COMMAND                CREATED             STATUS              PORTS                                                            NAMES
13aca325fa4c        busybox                                   "tar -chf - /usr/sha   3 minutes ago       Up 3 minutes                                                                         thirsty_kowalevski

was what i did then i hited control + c and as you see it leaves a ghost container.
this is reproduce able

Hi!
Please read this important information about creating issues.
If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
This is an automated, informational response.
Thank you.
For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
uname -a:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

Its reproduce able on all systems and versions including all storage drivers greetings.

Define a "ghost container".
If I had to guess, the tar is running.
Note that the command you are doing is piping commands to the client's shell, not in the container.

Also, please provide output of docker version and docker info.

Closing because we need more info, but happy to reopen after that

@thaJeztah, @cpuguy83 I can provide more details. Ghost container is a running container you don't expect to be running.
bobrik@whatever: ~
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

bobrik@whatever: ~
$ docker run --rm alpine:3.3 /bin/sh -c 'while true; do date; sleep 1; done'
Fri Jan 29 09:41:57 UTC 2016
Fri Jan 29 09:41:58 UTC 2016
Fri Jan 29 09:41:59 UTC 2016
^C
bobrik@whatever: ~
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

bobrik@whatever: ~
$ docker run --rm alpine:3.3 /bin/sh -c 'while true; do date; sleep 1; done' | head -n1
Fri Jan 29 09:42:07 UTC 2016
Error deleting container: Error response from daemon: Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f
write /dev/stdout: broken pipe

bobrik@whatever: ~
$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
035d59cce261        alpine:3.3          "/bin/sh -c 'while tr"   10 minutes ago      Up 3 seconds                            determined_khorana

bobrik@whatever: ~
$ docker info
Containers: 1
Images: 399
Server Version: 1.9.1
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 423
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.13-boot2docker
Operating System: Boot2Docker 1.9.1 (TCL 6.4.1); master : cef800b - Fri Nov 20 19:33:59 UTC 2015
CPUs: 2
Total Memory: 1.956 GiB
Name: dev
ID: OMPX:6CDR:MV3Z:RGOF:DTBS:G25L:EIY5:JWBE:6RFB:UZTO:XLMO:PEAR
Debug mode (server): true
 File Descriptors: 19
 Goroutines: 33
 System Time: 2016-01-29T09:42:25.678309895Z
 EventsListeners: 0
 Init SHA1:
 Init Path: /usr/local/bin/docker
 Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
 provider=vmwarefusion

bobrik@whatever: ~
$ docker version
Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.5.3
 Git commit:   a34a1d5
 Built:        Sun Jan 17 16:14:45 UTC 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.3
 Git commit:   a34a1d5
 Built:        Fri Nov 20 17:56:04 UTC 2015
 OS/Arch:      linux/amd64

I think this happens because from docker engine's point of view nothing is wrong. Client disconnected, but this is no big deal, no need to kill the container that might be doing something useful.
On the other side, containers that are run this way are probably meant to be killed when they don't have a connected endpoint. Since docker client observes this error, it can gracefully stop the container.
If we are going to keep things the way they are, I think it's worth to at least document this behavior.

@thaJeztah @cpuguy83 I have this problem too. You can do a quick check by this command
$ docker run --rm python:3.4 pip list | docker run --rm python:3.4 wc -l
0
Error deleting container: Error response from daemon: Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f
write /dev/stdout: broken pipe

The docker container that couldn't be deleted is the one running pip list.
Interestingly, this does not raise error but wc -l still returns 0
$ docker run --rm python:3.4 ls | docker run --rm python:3.4 wc -l
0

My docker information:
$ docker info
Containers: 12
 Running: 1
 Paused: 0
 Stopped: 11
Images: 515
Server Version: 1.10.3
Storage Driver: aufs
 Root Dir: /media/data1/docker/aufs
 Backing Filesystem: extfs
 Dirs: 511
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
 Volume: local
 Network: null host bridge
Kernel Version: 4.2.0-35-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.6 GiB
Name: valhalla
ID: TXEV:XA22:T4RJ:GSTQ:Q67I:XKJQ:CGVZ:E42W:U2FM:IEP2:R5BI:3VNC
WARNING: No swap limit support

$ docker version
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:59:07 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:59:07 2016
 OS/Arch:      linux/amd64

My apologies. The problem seems to be caused by me forgetting to specify -i for the second docker run
$ docker run --rm python:3.4 pip list | docker run --rm -i python:3.4 wc -l
You are using pip version 8.0.3, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2

However, I don't understand why docker behaves this way. Anyone cares to explain?

interisting point with -i thx hai-id


Fix broken build and publish workflow

many rebases later and a little force push and no one is the wiser


Move ownership to c-frame organization?

@oscarmarinmiro if you're interested, you can move the repo to the c-frame organization so active maintainers like me can help triaging issues and PRs and keep the component working with latest aframe versions.

The repo was transferred in the c-frame organization.


Scrollable Dot and Scrollable view

Hello i made a line chart which can be scrollable if there is big data
and width={Dimensions.get('window').width*4 }
, but i want to add a scroller dot , but when I implement the scroll dot it dosen't work and the scroller won't work also
it show me error
Animated.event now requires a second argument for options

See #563 for the Animated.event error


TypeError: Path must be a string. Received true

When I run command yarn play, get error

Fixed in<EMAIL_ADDRESS>


Do not expose puma directly

Depends on: https://github.com/kubic-project/salt/pull/314
Depends on: https://github.com/kubic-project/caasp-container-manifests/pull/134

How to test: https://github.com/kubic-project/salt/pull/314#issuecomment-346907208

Force merging the 3 PRs in together.


Change app icon and logo

If necessary, the theme colors can also change to match the new design.
The goal is to differentiate the mobile app from the website.

Closed with #28


[tool_crash] FileSystemException: Exists failed, OS Error: The file or directory is corrupted or unreadable., errno = 1392

Command
flutter doctor

Steps to Reproduce

...
...
...

Logs
FileSystemException: Exists failed, OS Error: El archivo o directorio está dañado o es ilegible.
, errno = 1392
#0      _Directory.existsSync (dart:io/directory_impl.dart:94:7)
#1      ForwardingFileSystemEntity.existsSync (package:file/src/forwarding/forwarding_file_system_entity.dart:43:33)
#2      ErrorHandlingDirectory.existsSync.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:469:22)
#3      _runSync (package:flutter_tools/src/base/error_handling_io.dart:556:14)
#4      ErrorHandlingDirectory.existsSync (package:flutter_tools/src/base/error_handling_io.dart:468:12)
#5      PubDependencies.isUpToDate (package:flutter_tools/src/cache.dart:757:57)
<asynchronous suspension>
#6      Cache.updateAll (package:flutter_tools/src/cache.dart:558:11)
<asynchronous suspension>
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1109:7)
<asynchronous suspension>
#8      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1009:27)
<asynchronous suspension>
#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10     AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#11     CommandRunner.runCommand (package:args/command_runner.dart:197:13)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:278:9)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14     AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>

[✓] Flutter (Channel stable, 2.0.4, on Microsoft Windows [VersiÃ³n 10.0.19042.631], locale es-MX)
    • Flutter version 2.0.4 at C:\src\flutter
    • Framework revision b1395592de (6 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\kroer\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.55.0)
    • VS Code at C:\Users\kroer\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[✓] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.114
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 84.0.522.52

• No issues found!

Flutter Application Metadata
No pubspec in working directory.

This is failing checking if C:\src\flutter\packages\flutter_tools\.dart_tool\package_config.json exists.  @kroer84 Does that file exist?  Are you able to open it?


Build failed using carthage

I am using Xcode 6.3.2, with the following dependencies in my Cartfile (utilizing carthage):
github "SwiftyJSON/SwiftyJSON" >= 2.2
github "kishikawakatsumi/KeychainAccess" >= 1.2.1
github "Alamofire/Alamofire" >= 1.2
When I run carthage update, I get the following error:
$ carthage update
*** Fetching Alamofire
*** Fetching KeychainAccess
*** Fetching SwiftyJSON
*** Downloading KeychainAccess at "v1.2.1"
*** Checking out Alamofire at "1.2.3"
*** Checking out SwiftyJSON at "2.2.0"
*** xcodebuild output can be found in /var/folders/jd/gwqqglhn6lzdk0d7wz4yjg880000gp/T/carthage-xcodebuild.velBld.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'
A shell task failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Any ideas?

I ran into this a couple of times. Usually re-runing the command solves the problem.

Unfortunately, I keep getting the same error.

I hit this issue as well, I fixed it by going to General → Identity in your build target and make sure that the provisioning profile is correctly configured. For me this meant agreeing to a new legal agreement on the developer centre, waiting a couple of hours for it to get recognised, then clicking the “Fix” button in the Identity panel.

Thanks for helping out here @NicholasTD07 and @ianp.
I am able to compile the 1.2.3 release using carthage update without issue right now. I would encourage you to either open an issue with the Carthage project or open an issue on Stack Overflow. Both of those locations will be able to better help you solve your issue.
Cheers. 🍻


automated backups to S3

I'd like Gogs to do automated scheduled backups of everything to a S3 bucket.

IMO this is way outside the scope of gogs, and is easier (and more reliable) to do as a cron-script.
You'd need to run gogs dump and copy the repo-directory.

Duplicated to https://github.com/gogits/gogs/issues/353...


add Huggingface Spaces Gradio Demo

added Web demo on Huggingface Spaces using Gradio

Can you change the hyperlink for 'FILM: Frame Interpolation for Large Motion' from the arXiv abstract page to the project webpage (https://film-net.github.io)?
Thanks!

@fitsumreda thanks, sure updated here https://huggingface.co/spaces/akhaliq/frame-interpolation/commit/d24fd05093b43d116779a38624d66e934e98fd02

Thanks @AK391 !

Hey @AK391 ,
Is it possible to add the existing frame-interpolation Huggingface space to the ECCV 2022 leaderboard that’s being organized by huggingface? I see there that you’re also a member of the organization.
Our frame interpolation paper has been accepted to ECCV, and wanted to see if there is a quick way to participate.
Thanks a lot!

@fitsumreda Hi, yes I have transferred the space to the ECCV organization: https://huggingface.co/spaces/ECCV2022/frame-interpolation
also you can join the ECCV organization here to edit the space directly, thanks

Thanks @AK391!


Make RankDivider agnostic to time dimension

The RankDivider class is used in reservoir computing to handle the division and reconstruction of cubedsphere ranks into subdomains. Previously, its initialization was assumed to include information about the time dim and its extent. This PR changes RankDivider to only allow ordering and extent of spatial dimensions to be provided. Since the RankDivider only cares about spatial dimensions when slicing data, it didn't make sense for it to have the time extent in its attributes since this dimension could change or be absent in various use cases.
Refactored public API:

initialization of RankDivider will raise an error if time is included as a dimension

Added TimeSeriesRankDivider, which inherits from `RankDivider and has all of its functionality, the following methods differ from the parent class in that they operate on data with dims [time, x, y, z] as opposed to [x, y, z].

get_subdomain_tensor_slice
unstack_subdomain
flatten_subdomains_to_columns

e.g. for training, the data being split and reshaped is a time series, so the training function uses a TimeSeriesRankDivider. Predictions are a single time step and don't have a time dimension, so they are reconstituted into the original [x, y, z] dims using a RankDivider.

[x] Tests added

Resolves # [JIRA-TAG]
Coverage reports (updated automatically):

Thanks, removing the time dimension handling entirely from RankDivider was a good idea. I added a TimeSeriesRankDivider child class which redefines the relevant methods to assume the first dim is a time dimension.

Awesome.  I agree, this was a nice simplifying update!


Multiples MobileServicePushFailedException

The callbacks work fine, but for no reason at some point this error appears and it is no longer possible to remove it until it clears the application cache, Pull and Push
java.util.concurrent.ExecutionException: com.microsoft.windowsazure.mobileservices.table.sync.push.MobileServicePushFailedException
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:500)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:401)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:83)

@omar25vx We haven't heard back from you. I'm closing the issue for now but please feel free to reach out to us if you have any questions. Thanks!


[DNM] pdclient: meta request split to store/region/config

LGTM

wait for https://github.com/pingcap/pd/pull/98 merge to master and solve conflicts

@disksing  PTAL

LGTM


Replace OSSpinLock with pthread_mutex

New Pull Request Checklist

[x] I have read and understood the CONTRIBUTING guide

[x] I have read the Documentation

[x] I have searched for a similar pull request in the project and found none

[x] I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

[x] I have added the required tests to prove the fix/feature I am adding

[x] I have updated the documentation (if necesarry)

[x] I have run the tests and they pass

[x] I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: ...
Pull Request Description
Replace OSSpinLock with pthread_mutex. Related issue: #886.

Codecov Report

Merging #889 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #889      +/-   ##
==========================================
- Coverage   21.26%   21.23%   -0.04%
==========================================
  Files          18       18
  Lines        2633     2637       +4
  Branches      282      282
==========================================
  Hits          560      560
- Misses       2033     2037       +4
  Partials       40       40

Impacted Files
Coverage Δ

Classes/Extensions/DDDispatchQueueLogFormatter.m
0% <0%> (ø)
:arrow_up:

Classes/Extensions/DDContextFilterLogFormatter.m
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Public API should / could enable me to write code agnostic of, and invariant over, runtime implementation (jruby vs. other)

As a consumer of this gem, in order to write ruby code that talks to kafka, I want the gem's API to abstract away any differences that might occur internally based on the execution time environment (MRI vs. JRuby or the corresponding helper gems that are used in those cases to talk to kafka), so that my code can remain agnostic to, and invariant over, the future choice of runtime.

sorry, deleting, i got confused by something lol


Can't build PHP 7.1.11 on Windows 10 x64

I try to build PHP 7.1.11 on Windows 10 x64 according to new  [building manual]
(https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2)
Have installed Visual Studio Community 2015 (full installation, all the components).
When running phpsdk-vc14-x64.bat error message occuring
ERROR: The system was unable to find the specified registry key or value.
Windows SDK not found.

It happen because bin\phpsdk_setshell.bat try to check registry for HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1
But name of this key in my system's registry is v8.1A
Also, there is no Include directory in SDK's installation path.
May be problem is in Community VS edition? Should I use Professional, or Enterprise one?

Thanks for the report. Do you have the latest VS version? Of course, we can fallback to lookup for another SDK version, but i actually wouldn't recommend it. PHP core might be ok, but all the dependencies are also using a newer SDK.
Thanks.

I was just checking setups on several machines. The installation paths shown in the registry
8.1 - C:\Program Files (x86)\Windows Kits\8.1
8.1a - C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A
The latter doesn't contain any useful stuff for us - no headers, no libs, etc. v8.1a was added in VS2013 and it seems it requires 8.1 to actually work properly. At this point it seems that something went wrong with the setup on your side, thus closing as not a bug.
Thanks.

Also please keep in mind, that we don't officially support the new SDK for PHP versions < 7.2. You can try to use in in the old way by caling vcvarsall.bat manually, or you can switch to the old SDK.
Thanks.


chore: updated dependencies

:warning: BREAKING CHANGE: changed D-API version from v6 to v9

Codecov Report

Merging #39 (8901082) into main (eb319f5) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #39   +/-   ##
=======================================
  Coverage   75.45%   75.45%
=======================================
  Files          13       13
  Lines        2049     2049
  Branches        5        5
=======================================
  Hits         1546     1546
  Misses        503      503

Impacted Files
Coverage Δ

src/base/BaseCluster.ts
54.05% <100.00%> (ø)

src/base/BaseNode.ts
82.63% <100.00%> (ø)

src/core/Player.ts
36.28% <100.00%> (ø)

Continue to review full report at Codecov.

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


[ Wait    ] Loading Workspace Error: failed to load workspace: runtime error: invalid memory address or nil pointer dereference

[ Wait    ] Loading Workspace
Error: failed to load workspace: runtime error: invalid memory address or nil pointer dereference
Steampipe version (steampipe -v)
v0.18.6
Plugin version (steampipe plugin list)
+-----------------------------------------------------+---------+--------------+
| Installed Plugin                                    | Version | Connections  |
+-----------------------------------------------------+---------+--------------+
| hub.steampipe.io/plugins/turbot/aws@latest          | 0.123.0 | aws          |
| hub.steampipe.io/plugins/turbot/azure@latest        | 0.51.0  | azure        |
| hub.steampipe.io/plugins/turbot/azuread@latest      | 0.14.0  | azuread      |
| hub.steampipe.io/plugins/turbot/microsoft365@latest | 0.4.1   | microsoft365 |
| hub.steampipe.io/plugins/turbot/openai@latest       | local   |              |
| hub.steampipe.io/plugins/turbot/steampipe@latest    | 0.9.1   | steampipe    |
+-----------------------------------------------------+---------+--------------
To reproduce
Steps to reproduce the behavior (please include relevant code and/or commands).
Just runned command
steampipe dashboard

Hi OleksiyHimranov  could you please let us know if the issue mentioned above has been resolved or if it is still persisting?
Thanks

Thnaks
After upgrading plugins, it works


[boost-log:x64-windows] possible port degradation from 1.75 to 1.78

Describe the bug
Installed boost-log:x64-windows generate compilation error in VS:
Error	LNK2038	mismatch detected for 'boost_log_abi': value 'v2_mt_nt62' doesn't match value 'v2_mt_nt6' in ****.obj	****	***\ImageUtils.obj	1
Environment

OS: Windows 10 Pro
Compiler: VS2019

To Reproduce
Steps to reproduce the behavior:

./vcpkg install boost-log:x64-windows
try to compile existing project that use boost-log
See error

Expected behavior
v 1.75 do not have this issue.
Additional context
from 1.78 boost changelog:
On Windows, when building the library for Windows 8 or later, the library will use nt62 tag in the version namespace to denote the target OS ABI. For example, the version namespace could be named as v2_mt_nt62. This name will be part of all symbols exported by the library. Use the BOOST_USE_WINAPI_VERSION macro consistenly when building Boost and your code to request the minimum target Windows version.
Sound like boot-log port missed mandatory for correct build macro.

@ssh4net, thanks for reporting this issue! could you please share the repro code with us, or a project to help us repro this issue quickly?

Sorry, can't share code or project. And not skilled too much to make minimal possible from existing code that reproduce this bug.
But my coder gave me temporary fix for issue
compiling project with this option:
-DBOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN7
looks like this is a bug in Boost itself

I saw this issue while looking for a solution for what looks like this exact problem.
This isn't really a minimal example but I hope it suffices to analyze the issue further.
Building this code fails for me as soon as I define _WIN32_WINNT to target Windows 8 or later.
As @ssh4net and the boost changelog already mentioned defining BOOST_USE_WINAPI_VERSION to BOOST_WINAPI_VERSION_WIN7 also fixes the linker errors.
// Setting this to 0x0602 (Windows 8) or higher will cause linking to fail.
// It works with 0x0601 (Windows 7).
#define  _WIN32_WINNT   0x0602

// Uncomment this to fix linker errors independent of targeted Windows version.
//#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN7

#include <boost/log/sources/logger.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/sources/global_logger_storage.hpp>
#include <boost/log/sources/severity_logger.hpp>

enum class LogLevel
{
    LEVEL_DEBUG,
    LEVEL_ERROR
};

BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT(MyLogger, boost::log::sources::severity_logger_mt<LogLevel>)

#define LOGGER(lvl) BOOST_LOG_SEV(MyLogger::get(), lvl)

int main()
{
    LOGGER(LogLevel::LEVEL_DEBUG) << "Hello World!\n";
}

@MarcelNehring, thanks for the example code! it seems Upstream by design issue, relate to https://github.com/boostorg/log/issues/172.
BOOST_USE_WINAPI_VERSION is defined to BOOST_WINAPI_VERSION_WIN7 by default, and _WIN32_WINNT and WINVER are defined in boost-winapi header[1], which value is BOOST_WINAPI_VERSION_WIN7[2], that cause conflicts when user define these two macros in their custom project. Do you have any ideas to handle this case? cc @yurybura @Kojoley @strega-nil-ms @BillyONeal
[1] https://github.com/boostorg/winapi/blob/develop/include/boost/winapi/config.hpp#L214-L219
#if !defined(_WIN32_WINNT)
#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
#endif
#if !defined(WINVER)
#define WINVER BOOST_USE_WINAPI_VERSION
#endif

[2] https://github.com/boostorg/winapi/blob/develop/include/boost/winapi/config.hpp#L105-L120
#if !defined(BOOST_USE_WINAPI_VERSION)
#if defined(_WIN32_WINNT)
#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
#elif defined(WINVER)
#define BOOST_USE_WINAPI_VERSION WINVER
#else
// By default use Windows 7 API on compilers that support it and Vista or XP on the others
#if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW)
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
#elif (defined(_MSC_VER) && _MSC_VER < 1600)
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6
#else
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN7
#endif
#endif
#endif

Do I understand correctly that you install boost-log via vcpkg, then in your code that uses boost-log you define _WIN32_WINNT to some value (and which differs from one boost-log would guess, or you had supplied to vcpkg explicitly) - you are getting a linkage error?

@Kojoley yes that is correct.
I have not tried it yet but you could probably install boost-log while setting _WIN32_WINNT to the desired value using VCPKG_CXX_FLAGS in a custom triplet and thus get a matching boost-log version that does not produce linker errors.

Obviously vcpkg couldn't know which Windows version you want to target if you haven't tell that to it.
@PhoebeHui maybe a warning could be added when boost-log is installed telling that it will be built using a default _WIN32_WINNT value?

I don't think we need a specific-to-vcpkg answer here. Triplets already let you set _WIN32_WINNT.

I also have the above linkage issue.  Boost-Log frequently has porting issues that could easily be flushed out prior to pushing the port - I remember having to manually patch boost headers a few releases ago when I used to download the binaries & prebuilt headers from the boost.org website.  This was prior to making the switch to building boost using vcpkg & triplets - (in my case x64-windows).  I thought this would make upgrading to the latest versions of boost (in particular boost-log) a bit easier - unfortunately I was wrong.  I was able to work around the issue by setting a common preprocessor setting _WIN32_WINNT=0x0601 for all of my projects - not just the executable that performs the linkage.   I would prefer not to force the older Windows 7 API - but there you go.  I wish I know how to make a local git patch to work around this problem - now I have to remember to remove the _WIN32_WINNT=0x0601 at some later date when boost finally gets around to fixing the issue.


headlesstask wake-lock consumes battery

I have a headless task that wakes up every 30 minutes. does some work for 1-2 seconds and finishes. However I see that the wake-lock is held much much longer than necessary. The battery is draining like crazy. I thought this might be something with my code, so I created an empty project with just my headless task code, but the wake-lock keeps draining the battery. I added logs and I see that the services is destroying after the task is done, so it's releasing the wake-lock acquired in the receiver. So either I'm doing something wrong, or the problem is in react-native.
I uploaded my demo example here:
https://github.com/atlanteh/headlesstask-battery-consumption-example

React Native version: 0.41.2
Platform: android
Development Operating System: windows

Why did you close this issue? Is it solved?

@hramos Can you please explain why you closed this issue? It still happens to me..

@atlanteh maybe you need to call onHeadlessJsTaskFinish() instead of stopSelf() directly.

I don't think so. onHeadlessJsTaskFinish() is meant after a task is finished, not when it was never executed. I left this specific task a long time ago, but now I see that some other modules implement it and you can see here, for example, that they don't call stopSelf() or anything, just return null. so maybe this is the problem.
Do you have any insights on this?

I haven't got this far with HeadlessJsTaskService. My issues revolve around ReactContext created not on the main thread. see #15915.
However, I did notice that inside HeadlessJsTaskService.startTask() there is already a call to acquireWakeLockNow(). So with your call from the received that makes it 2 calls. Maybe you can drop the call from the receiver (I know we are told to do so from the documentation but worth a shot).

Also, maybe try to update React Native to latest and see if it reproduces.

I must call the acquireWakeLockNow in the broadcast receiver. See the docs:

If you start your service from a BroadcastReceiver, make sure to call HeadlessJsTaskService.acquireWakeLockNow() before returning from onReceive().

This is to prevent the phone from falling asleep before actually starting the service.


Update Built-In AutoHashable Template to Compile

For the current AutoHashable.stencil template that is distributed with Sourcery, given some source code, the generated code will not compile and is semantically incorrect for the following reasons:

Implementations of hashValue on types call combineHashes with n arguments, whereas combineHashes takes in an array of integers.
Enumeration cases with no associated values call combineHashes directly with no arguments, resulting in all cases of an enumeration having the same hash value.
There is no checking that an associated value of an enum case implements Hashable and can then be used for calculating the hash value of the containing case.

This PR updates the template to address most of these issues[1]. Given the same source code, the generated code using this new template compiles and behaves as expected.
I could see about adding tests to warn about this in the future, if you think that's something worth adding. I can imagine two possibilities for a test:

Do a straight text comparison. Generate some code using the built-in template and store it on disk for use as a fixture. Then, for a test, regenerate the code and compare it to that fixture. If the string comparison fails, then the test fails.
Analyzing for valid Swift code. This could either be done by attempting to compile the source code that is generated by running Sourcery with the built-in templates, or possibly by using SourceKitten to try to analyze the source code (I'm assuming that, if the Swift code has some syntax error, then SourceKitten will surface the error and not complete the analysis of the code). If either operation fails (depending on which is implemented), then the test fails.

Footnotes
[1]: This PR addresses problems 1 and 2. It does not appear that problem 3 can be addressed as Sourcery currently does not return the necessary information for associated values to determine what protocols these associated values do or don't conform to. I suppose a simple solution to fix part of that would be to ignore any associated value where isClosure is true, but I don't know if that's the route you want to go down.

@grantjbutler Thanks for contributing 👍
you are right, my mistake as I wrote the template in our project and we have more variants of combineHashes in NYT :)

There is no checking that an associated value of an enum case implements Hashable and can then be used for calculating the hash value of the containing case.

FYI: You can check if type of associated value implements a protocol if its your project type, but since Hashable is not known to Sourcery (Apple framework not your project) you'd have to use type.based.Hashable.
But I wouldn't because I think skipping some variables for hashing should be explicit, and its too easy to not realise a variable type might not be hashable when writing type, right now you'd get compile error and just be forced to either explicitly skip it or add AutoHashable conformance in another type, which is simple enough and prevents some human errors.
But 👍  on skipping those that are closures.

FYI: You can check if type of associated value implements a protocol if its your project type, but since Hashable is not known to Sourcery (Apple framework not your project) you'd have to use type.based.Hashable.

Does that work for AssociatedValue? The documentation under the "Writing Templates" section of the ReadMe didn't explicitly state that AssociatedValue types have all the properties from Type, so I assumed that doing a check for protocol conformance wasn't possible.

But I wouldn't because I think skipping some variables for hashing should be explicit

Sure. I wanted to add support for a skipHashing annotation as is done for the generated implementation of Hashable for non-enumeration types, but it looks like you can't add annotations for associated values. I guess you add the annotation to the EnumCase instead. However, I'm guessing that you can't have multiple declarations of the same annotation (to opt multiple associated values out of the implementation of hashValue) as it's not explicitly mentioned in the ReadMe.

But 👍 on skipping those that are closures.
For tests I think using simple fixtures as you proposed in 1 would be good enough to prevent regressions as we work on the tool and templates.

Cool. I'll get those changes up as separate PRs. Would you want them as two distinct PRs, or combined into one?

Does that work for AssociatedValue? The documentation under the "Writing Templates" section of the ReadMe didn't explicitly state that AssociatedValue types have all the properties from Type, so I assumed that doing a check for protocol conformance wasn't possible.

AssociatedValue has type property, but it won't work for types from outside your project like Apple / 3rd Party code, so it could only be used for specific filtering. Thus why I prefer to not attempt it and just enforce that all variables that aren't skipped are hashable, avoiding programmer mistakes.

Sure. I wanted to add support for a skipHashing annotation as is done for the generated implementation of Hashable for non-enumeration types, but it looks like you can't add annotations for associated values. I guess you add the annotation to the EnumCase instead. However, I'm guessing that you can't have multiple declarations of the same annotation (to opt multiple associated values out of the implementation of hashValue) as it's not explicitly mentioned in the ReadMe.

Indeed, right now we don't support annotations per associated value, our annotation parser though would scan them if you separated enum case definition into multiline, making adding this feature pretty straightforward.
Seems to me like it would be fine to just have a single PR for those changes we discussed


None

PS C:\Users\messi\Downloads\FFMPerative-main> ffmperative do --prompt "edit video '\Users\messi\Downloads\mainclip.mp4 for social media"
None
this is what is returned

This may be caused by the local llm binary not downloading correctly - did you install with pip?
Also something to note is that we've tested on linux and osx, can try to reproduce this on windows

@Chrables thanks for sharing! We're looking into it - it's possible there's an issue making the model binary executable in this environment.

Thanks for checking! Quick follow up, I also tried to run it on macOS
(arm64) and I get the same “None” output. Give me a shout if you need logs
off me if you cant reproduce.
On Sat, 23 Mar 2024 at 3:39 am, smellslikeml @.***>
wrote:

@Chrables https://github.com/Chrables thanks for sharing! We're looking
into it - it's possible there's an issue making the model binary executable
in this environment.
—
Reply to this email directly, view it on GitHub
https://github.com/remyxai/FFMPerative/issues/10#issuecomment-2015787826,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFRQNCQAI2QQ5MPB4YGT7SLYZSCINAVCNFSM6AAAAABDHFAUBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVG44DOOBSGY
.
You are receiving this because you were mentioned.Message ID:
@.***>


Question 69 - conflastion of terms

The question is:

All people - regardless of factors like culture or sexuality - should be treated equally.

Culture, unlike sexuality or race, is mutable. Was this question deliberately worded to conflate a mutable attribute and an immutable attribute?

^The immutability of sexuality is debatable. One could classify it as a part of that persons culture. I agree that there are issues with this question as well as many others like this next one: "Do you prefer a strong leader"... as opposed to a weak one? Supporting a strong leader does not make a person pro-authority at the expense of liberty. The overall aggregation methodology of users' answers is overreaching and generous in scope when combined with vague or poorly worded questions.

I agree as well to an extent. I feel this question is quite ambiguous for a number of reasons. There are potentially many possible factors and categories that this question could include. Just using culture and sexuality as definers I'm afraid serves to only muddy what the true question might be. Had the question just been about culture, this wouldn't be an issue. The issue is introducing a second factor like sexuality, along with the general wording of the question. The issue is that by introducing a second factor, the question suddenly becomes very vague as to what it's extent it. I'll give an example, under the general basis for this question, it's asking to what extent people should be treated in an egalitarian way. Here's the issue with that, where does the question end? Should we assume that wealth and/or class are included in the general basic idea of the question, suddenly we have an economic issue based question, but what about those that want to treat other cultures or sexualities in a different, non-equal,  way, but still want a "fair", egalitarian economic system? When I first read this question, I had trouble not lumping in things like wealth or class into what this question might include, prompting me to choose an answer based on that more so than things like culture or sexuality.
My suggestion to make this question clearer is to simply make the question about one specific thing, like culture, instead of including multiple different categories under it. This should help to clear up some confusion with the question


Window Background Transparency behavior backwards?

I just installed Windows Terminal for the first time this morning and the first thing I noticed -- before trying to make ANY changes to settings or even using the command lines -- was the semi-transparent background in the CMD tabs.  I think it looks neat, but I am confused about why it is transparent when the terminal window is in use but becomes solid when the terminal window loses focus?
It would seem to make much more sense with those states reversed as it is much easier to read text on a single, solid background color and it may be useful to have an idea what is behind the inactive terminal window.
Environment
Windows build number: Microsoft Windows [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.3.2171.0

Any other software? no

Steps to reproduce
Open a CMD tab and focus then unfocus the terminal window to see the background opacity change.
Expected behavior
My preference would be for solid when in use and some transparency when inactive.  Or at least, I would like an option to choose that mode.
Actual behavior
The CMD tab is semi-transparent when in use and becomes solid when inactive.

This is by design. The system-level policy for all acrylic is that only an active and focused window is allowed to have it. :(

The system-level policy for all acrylic is that only an active and focused window is allowed to have it.

Luckily I figured out how to disable it.  A feature like this will only have value for me when can work like I expect.  Sorry if I wasted your time.

@nurbles No worries! Just curious, how were you able to disable it?

You need to mess with the JSON settings file and set "useAcrylic": false for the shells you don't want to do acrylic at all or set "acrylicOpacity":1.0 (or maybe to zero, I'm not sure which way is completely solid)  But if you search for those settings, they are documented online.

Really broken if you ask me. The point of transparency in the terminal (for example in Unix) was always to allow you to see beneath the window when it does not have focus to help find other things you might have hidden underneath. When it has focus, you want the background to be tight on the font to make them easier to read.

If the Fluent folks have made that decision, and in such a rigid manner, then it seems like Acrylic is simply being mis-used in this context? I'm not a UI designer, but it seems like Acrylic isn't really intended for this type of application. Is there some other means to achieve a similar effect, while maintaining more control? I think it's super pretty, but I've just had to turn it off, since the behavior is so jarringly upside-down. Even straight-up transparency that changes between a focused/unfocused window would be better than nothing.


Add support for unboxed

To stay in sync with https://github.com/BuckleScript/bucklescript/pull/4057.
Applies to:
" if the type is a single-field record or a concrete type with a single constructor that has a single argument."
See what happens in the typed tree.

See https://caml.inria.fr/pub/docs/manual-ocaml/manual035.html.

Note, example from @ryyppy:
(* For inline records / inside variants *)
type t3 = B of { g : string } [@@ocaml.unboxed];;
let x = B { g = "foo" }

Here: https://github.com/cristianoc/genType/pull/340.


Manage TileGrids in LayerFactory instead of MapComponent

Currently the TileGrids, which are defined in the app-conf.json are managed withing the MapComponent: the OL TileGrids are instanciated in the created hook of the MapComponent (see here) and are stored in the tileGrids member variable. This works quite well in case you have only static map layers defined in the app-conf.json.
In case you want to create dynamic layers with a custom TileGrid by the LayerFactory this won't work. The TileGrid instance is set within the createLayers function of the MapComponent and not by the LayerFactory. Therefore a layer created in the app code with the LayerFactory is not aware of the TileGrid. In a project / app we used the following overwrite, which works quite well (here for Tile WMS):
// ==========================
// Overwrite LayerFactory with custom changes not (yet) in Wegue master
// ==========================
LayerFactory.tileGrids = {};
LayerFactory.createTileWmsLayer = (lConf) => {
  // apply additional HTTP params
  const params = { 'LAYERS': lConf.layers };
  ObjectUtil.mergeDeep(params, lConf.params);

  // manage TileGrid instances from app config
  const tileGridDefs = Vue.prototype.$appConfig.tileGridDefs || {};
  // Optional TileGrid definitions by name, for ref in Layers
  Object.keys(tileGridDefs).map(name => {
    LayerFactory.tileGrids[name] = new TileGrid(tileGridDefs[name]);
  });
  const tileGrid = lConf.tileGridRef ? LayerFactory.tileGrids[lConf.tileGridRef] : undefined;

  const layer = new TileLayer({
    ...LayerFactory.getCommonLayerOptions(lConf),
    // ...this.getCommonLayerOptions(lConf),
    source: new TileWmsSource({
      url: lConf.url,
      params: params,
      serverType: lConf.serverType,
      tileGrid: tileGrid,
      projection: lConf.projection,
      crossOrigin: lConf.crossOrigin,
      hoverable: lConf.hoverable,
      hoverAttribute: lConf.hoverAttribute,
      hoverOverlay: lConf.hoverOverlay
    })
  });

  return layer;
};
// ==========================
// END Overwrite LayerFactory
// ==========================

Should I come up with a PR for that or are there any objections for this approach?
/cc @fschmenger @JakobMiksch @justb4 (and anybody else welcome of course)

I think the scope of the question should be enhanced. As far as I can see, we have a wrapper on top of the LayerFactory, which currently manages the following config attributes:

tileGrid
zIndex
supportsPermalink
selectable
(and maybe I'm missing something else)

All of those won't work as expected, if we instantiate layers by passing in a config object directly into the LayerFactory.
Currently I don`t regard this as a major problem, as the LayerFactory is an internal component and not part of a publicly document API.
However, if we think about exposing it as part of the Wegue API, then this requires a structural cleanup.


improve print methods @scoped_enums

When scoped enums are used in print statements they print the whole module. For example
[ Info: Unit System changed to InfrastructureSystems.UnitSystemModule.UnitSystem.SYSTEM_BASE = 0

If UnitSystem is exported, which it probably should be, then you get this:
julia> set_units_base_system!(sys, "NATURAL_UNITS")
[ Info: Unit System changed to UnitSystem.NATURAL_UNITS = 2

Would that resolve the issue?


[0.11.0]maybe BUG.The missing data at the end auto fill "0" when using python-influxdb Dataframeclient to wirte data.

for example,the end of my  data is:
                                   some_para
....                                      ...
2016-02-01 06:45:18                        1
2016-02-01 06:45:19                        2
2016-02-01 06:45:20                        1
2016-02-01 06:45:21
2016-02-01 06:45:22

Then use python-influxdb Dataframeclient to wirte and query
I got the result:
                                 some_para
....                                   ...
2016-02-01 06:45:18                        1
2016-02-01 06:45:19                        2
2016-02-01 06:45:20                        1
2016-02-01 06:45:21                        0
2016-02-01 06:45:22                        0

the missing data at end is autofill "0"
I didn't find this problem in [influxdb 0.10.3]
In [influxdb 0.10.3] ,the missing data is also NaN,don't fill with "0"

What query are you using and can you provide a reproducer?

@jsternberg
Thank you.
I use 0.12 and everthing is OK.


Can't understand the problem

When I try to use this : $mangoPayApi->Users->CreateBankAccount($UserId, $BankAccount);
I get "Bad request. One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error."
But I used the exact codes from the demo scripts on sandbox. And my mangopay user id is correct ( I can check it on dashboard) Also I can create a bank account for that user on mangopay dashboard. I can't figure out what is the problem. Are you planning to implement more detailed error responses? It is really hard to get what's wrong.

Hi @suhaboncukcu, you should use try/catch to view the specific error details (as in this example: https://github.com/Mangopay/mangopay2-php-sdk/blob/master/demos/users_create.php).
But I suspect you're using v2.01 of the API and the demo script was designed for v2 and hence you have a problem with the OwnerAddress field - more info: https://docs.mangopay.com/api-v2-01-overview/

Ok, thanks or the reply.