text:
Call for comments: EnTT, libs and Windows

This is a follow up of #182 to discuss the problem in the title.
To sum up: on Windows, inline variables aren't guaranteed to be unique between all the TUs and thus things could break when the registry is pushed across boundaries.
There are several solutions that could make it work when a single library is used with a main executable. However, most of them will still break in case of multiple libraries used together at once. Therefore I won't even mention these solutions.
So far, a widely accepted proposal (discussed on gitter) is based on named components. In other terms, components that will be pushed across boundaries must be assigned a compile-time name.
This solution can be implemented in two different ways, each with its pros and cons:

Components inherit from a dedicated class template:
struct my_component: entt::shared<"my_name"_hs> { /* ... */ };
// or even SHARED(my_component) { /* ... */ };
// ...
registry.do_something<my_component>(entity);

A macro can be used to ease the definition, of course. In this case, whenever a shared component is detected, the registry searches it by name instead of by identifier. A secondary macro can be used to force the behavior only on libraries and rely on direct access through identifiers in the main executable.

The other way around doesn't affect component definitions, but require users to explicitly specify when to use a components in shared mode, that is by name. Something along this line:
struct my_component { /* ... */ };
// ...
registry.do_something<my_component>(entity); // direct access with numeric identifier
registry.do_something<SHARED(my_component)>(entity); // work fine across boundaries

This is a bit more verbose, but users have finer control and their components are theirs. Moreover, it's clear at the call site whether a component is used in shared mode or not.

I'm open to comment, critiques and suggestions. I won't to get rid of this limitations, because it's getting annoying, so let's discuss it and solve the problem once and forever.

EDIT
I tried to implement a first draft. Another possible approach is to rely on 1. and split components between shared and non-shared ones. In other terms, to have two vectors of pools. The drawback is that there are two vectors ofc. :smile:
It would affect to an extent only those components that are pushed across boundaries.
On the other side, this is trickier, it requires much boilerplate and it will be most probably harder to maintain.
A trivial approach instead, probably the easiest to implement and to maintain, is to have the whole registry as shared and non-shared.
It means that internally the registry uses always a direct access or always a name based lookup. When users are dealing with dlls on Windows, it's enough to set up a macro and have components that inherit from shared_t to provide a name. In all the other cases, the lookup by name is disabled and everything works by direct access.
Less granular, ofc, but it requires to change only one function at a first glance.
Comments?

EDIT
@ArnCarveris came up with a good idea that is a compromise between what we discusses so far, gets rid of inheritance and is safe as well.
This edit to keep track of it (names can change in the final version):
template<typename>
struct shared_traits;

template<>
struct shared_traits<my_component> {
    static constexpr auto value = "my_component"_hs;
};

A few macros will be provided to ease the definition of shared components. In particular:

 ENTT_SHARE(my_component);

To use to turn an already existing type in a shared one.

 ENTT_SHARED_STRUCT(my_component) { /* ... */ };
 ENTT_SHARED_CLASS(my_component) { /* ... */ };

To use to define directly a type as a shared class.

Feedback are welcome.

My vote for 2

@skypjack
registry.share<my_component>("my_name"_hs);

@ArnCarveris The problem is that this way you set a name for a component and that's fine, but you don't know when and why to use direct access or indirect one. I want to avoid to go by name if possible, when you're in the main executable.

@skypjack Ok when why at this point name hashstring is needed?
registry.share<my_component>(); No??

@ArnCarveris no, I want to use shared types with already existing member functions like registry.get<SHARED(my_type)>(entity);, but still I want direct access in the main executable as registry<my_type>(entity);.
What should registry.share<my_component>(); do instead? I don't get it. Just set a name for my_component to use later? This wouldn't solve the problem of using it only when needed, because you don't know what the user wants, when and why.

It will make my_component sharable from main executable to lib.
What SHARED macro defines?

The point isn't to make it sharable. The point is to know whether we must get a pool directly (as it happens now) or by name. For a given type, I can do both the thing and make it sharable doesn't give me a clue on when to use direct access or not.
SHARED is a way to tell - yo, registry, for this member function and for this specific call only, get the pool for T by name instead of by relying on direct access.
This way you can avoid searching by name within the main executable or on linux (eg by defining SHARED yourself as a no-op).

I think having it on the view is a huge mistake. Its far too easy to get wrong.
Programmers have mistakes constantly, and every EnTT user will forget to type SHARED a few times, causing weird bugs or crashing in an assert. Even if the shared component way is slightly slower, i think its preferred just due to it being miles more safe to use.

@skypjack Is possible to avoid using macro?

@ArnCarveris yeah, sure, macros will be only shortcut to ease the definition of components.
You can do either:
SHARED(my_component) { /* ... */ };

Or:
struct my_component: entt::shared<"a_name"_hs> { /* ... */ };

@skypjack how entt::shared will be implemented?

@ArnCarveris I don't know yet what's the final definition, probably something like this:
template<typename hashed_string::hash_type HS>
struct shared_t { static constexpr auto value = HS; };

@skypjack I prefer to avoid force inherence, maybe this?:
template<typename Type, typename hashed_string::hash_type HS>
struct shared_t { using type = Type; static constexpr auto value = HS; };

using my_shared_component = entt::shared_t<my_component, "a_name"_hs>;

registry.view<my_shared_component>().each([](auto &&...) { /* ... */ });

This is possible?

@ArnCarveris but then you have to worry about my_shared_component and my_component. It's possible to lookup the right pool and cast it to the right type using that approach but I don't like it. It's not polymorphic inheritance and the base is empty so I don't think of it has "real inheritance". If you really, really hate any kind of inheritance with a passion you could do this:
struct my_component {
  static constexpr hashed_string::hash_type entt_hash = "my_component"_hs;
};

but that's just more typing with no real benefit.

Hmm, agree.
template<typename>
struct shared_traits;

template<>
struct shared_traits<my_component>
{
    static constexpr hashed_string::hash_type value = "my_component"_hs;
};

I prefer do no modify my_component for making it shared.

The fact is that it's risky to allow users to pass a component either as shared or as a plain type. In the second case, you don't have a name and you don't know it was shared, so the registry ends up creating two pools: one for the type when used the standard way and one for the type when used as shared. It summons for subtle errors almost surely.
I'm not a fan of forcing classes to inherit from something, but also I don't want to spend my time trying to explain to new users that they are shooting in their feet because they did both registry.view<my_shared_component>().each([](auto &&...) { /* ... */ }); and registry.view<my_component>().each([](auto &&...) { /* ... */ }); in their code.

@skypjack I agree with this fact

For shared traits is acceptable to implement macro:
ENTT_SHARE_COMPONENT(my_component);

Then you have to mention the component name twice. If shared_t::value was private and shared_t was friends with the registry, you'd never even notice that my_component inherits shared_t (unless you look at the code or use std::is_base_of_v). shared_t is empty and doesn't expose any interface to the user.

Hmm, but you could define ENTT_SHARE_COMPONENT so that it forward declares my_component, specializes shared_traits, then inserts struct my_component

It doesn't look bad actually and I thought the same @Kerndog73 - this would get rid of inheritance and we can still detect whether a type is shared or not in all cases (internal utility is_shared_v or similar). No ambiguities or risky uses.

ENTT_SHARE(my_component);

ENTT_SHARED_STRUCT(my_component) {
  // ...
};
ENTT_SHARED_CLASS(my_component) {
  // ...
};

@ArnCarveris what is ENTT_SHARE for? I think the two below are more than enough. I don't want to provide a third default version that is just unclear and misleading. My two cents.

How about ENTT_SHARE which defines a struct. If the user wants a class they could do this:
ENTT_SHARE(my_component) {
private: // now it's a class!
  // ...
};

If those will work when  ENTT_SHARE will be not needed;
struct my_struct_component {};

class my_class_component {};

ENTT_SHARED_STRUCT(my_struct_component);
ENTT_SHARED_CLASS(my_class_component);

Anyway there should work:
ENTT_SHARE(my_component) {
  // ...
};

and
ENTT_SHARE(my_component);

Got the reasoning.

@ArnCarveris @Kerndog73 I'm not that sure that shared is the right term here.
In fact, if I've a registry in the main executable and I want to push it across boundaries, all the components used within the library should have a name to avoid conflict with already existing identifiers. However, they could not be shared between the library and the main executable.
Therefore the name is a bit misleading. Probably also the fact that one can mix shared and non-shared components to an extent can create confusion.
To make things easier to understand for users, maybe the best thing would be to make the whole registry shared. Something like ENTT_SHARED that forces components to have a name, all of them and that's all.

@skypjack Well, maybe user should define ENTT_EXPORT &ENTT_IMPORT macros?

@ArnCarveris can you provide me with more details on their purposes?

@skypjack I mean this use case: https://www.gamedev.net/forums/topic/550895-dllimport--dllexport-with-libsdlls/

@skypjack hmm...
ENTT_SHARE:
ENTT_API_INCLUDE(my_component);

ENTT_SHARED_STRUCT:
ENTT_API_STRUCT(my_component) { /* ... */ };

ENTT_SHARED_CLASS:
ENTT_API_CLASS(my_component) { /* ... */ };

You made me think... could we just solve the problem with a dllexport? Why didn't I try it before to start?

@skypjack I mean is common practice to define DLL_EXPORT, DLL_IMPORT and DLL_API when dealing with shared libs...

Yeah, I see, but I was wondering if using dllexport/dllimport would work on Windows without changes to EnTT.

Issue happens also with static libs on windows, i dont think this would
solve anything.
On Fri, Feb 15, 2019, 23:36 Michele Caini <notifications@github.com wrote:

Yeah, I see, but I was wondering if using dllexport/dllimport would work
on Windows without changes to EnTT.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/skypjack/entt/issues/186#issuecomment-464230331, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AIvaVn-slW9HawRjBxDOUigiOUaMAvUTks5vNzaFgaJpZM4a2dV4
.

Right. Let's continue with what we agreed on so far. :+1:

Just want to add, that "naming" components might benefit or impact serialization. It could make saving and loading not component-wise-equal snapshots easier.

@Green-Sky that's true, but I don't plan to update also snapshot so as to use names tbh, mainly because I don't really need it at the moment. However, what you say can be applied archive side.
These changes will allow to push across boundaries those classes that use families internally (registry, dispatcher, emitter) instead.
I'm open to PR or paid feature requests in case.

I've still to test it, but branch wip contains a first draft to make a registry work across boundaries.
ENTT_ShaRED_TYPE can be used to make a type exportable once defined. ENTT_SHARED_STRUCT and ENTT_SHARED_CLASS can be used to define the type itself and make it exportable at once.
If you decide to test it, do not open new issues in case of problems. Please, just add a comment to this issue and let me know what's wrong.
It will take a while to write a test suite for this feature. Moreover, there are other classes that deserve the same treatment (dispatcher and emitter). I don't know yet if I'll merge wip on master a class at a time or all at once when everything is done.

Code coverage 100%. Macro reviewed. I've to write doc yet.
The branch misses a test that pushes and uses a registry across boundaries, but I'm quite confident that everything works as expected. :+1:

Up and running on branch wip. Doc updated (see lib.md).
Roughly speaking, we have the registry working across boundaries. :heart_eyes:
If no one comes out complaining about problems with the new implementation, I'll merge it on master during the week. :+1:

Ready to go. Available on branch experimental.

Upstream on master.

authors: ArnCarveris Green-Sky Kerndog73 skypjack trashuj vblanco20-1

repo: skypjack/entt


text:
Research insights + Wireframe of Spinner

User Story
As a Sanoma Learning Design System user, I want a versatile and user-friendly Spinner Component that can effectively handle various use cases across our educational products. This Spinner Component should be adaptable to convey:
Definition
Spinner is used to display the loading state or a section of a page. As a visual indicator that a process is happening in the background but the interface is not yet ready for interaction.
Key Points

Used when some part of the page takes 2–10 seconds to load.

Acceptance Criteria
Elements

Name
Optional

Spinner
No

Label
Yes

Sizes

Extra-Small
Small
Medium (Default)
Large

Layout

Inline (Default)

A11y

Spinners provide feedback to users that the system is working but don’t give any indication on how long users will have to wait; therefore, they are best used when the page takes 2–10 seconds to load.
Tooltip when the label isn’t displayed.

Figma Links

Figma Spinner  Component Research

### Tasks
- [x] See what other products have right now (make overview in figma)
- [x] research spinner in button
- [x] research spinner on page (when skeleton is not possible)
- [x] Wireframe of spinner (?)  focus more on animations and what the best practices are
- [ ] Write acceptance criteria for feature

In the refinement we came to the conclusion that the spinner doesn't need a label. This is changed in figma by @arecuenco-dsgn but not yet here. That is the reason I removed it.

source: gharchive/issue

authors: DanielleRameau Diaan

repo: sl-design-system/components

license_type: permissive

license_source: github-api


text:
feat: gather a random gif from the giphy connector

Type of change

[ ] New sample
[x] New feature
[x] Bug fix
[ ] Documentation

Summary
This PR replaces the Find a GIF custom function with the Giphy connector and uses the custom function to format the kudo_message with better formatting.
A few other changes happen too:

selecting a kudo_vibe is required in the form since something is needed for connector input
the link trigger defaults to the channel ID it's used in to save this selection
the custom message formatting function fixes a bug where only the first line of a multiline message was quoted
the custom message formatting also gathers just the link from the connector response- an example is in tests

Reviewers
Clone the sample:
$ slack create kudo -t slack-samples/deno-give-kudos -b feat-giphy-connector
$ cd kudo
$ slack deploy  # Gather a link trigger

Then test the workflow in a channel. GIF results can be unexpected and prompting the connector is an art. Open to all suggestion here!
Requirements

[x] I’ve checked my submission against the Samples Checklist to ensure it complies with all standards
[x] I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
[x] I've read and agree to the Code of Conduct

@lukegalbraithrussell appreciate the review and suggestions! The suggestions are great as always 🙌
And huge thanks for tutorial updates! Please let me know if I can help or should hold off on merging this or whatever makes the most sense. I defer to thee powerful mind 🧠 ✨

source: gharchive/pull-request

repo: slack-samples/deno-give-kudos

license: MIT


text:
403 Forbidden with slack bolt Auth API

Reproducible in:
pip freeze | grep slack
python --version
sw_vers && uname -v # or `ver`

The slack_bolt version
1.10.0
Python runtime version
3.6
OS info
linux VM
Steps to reproduce:

Start up Python server, python3 app.py
'botToken' is stored in DB, where we are successfully getting a valid token
Runs code: "app = App(token=botToken)"
Returns back 403

Expected result:
, {"ok":true,"url":"https://vz-gnt.slack.com/","team":"VZ-GNT","user":"atlasbot","team_id":"xxx","user_id":"xxx","bot_id":"xxx","enterprise_id":"xxx","is_enterprise_install":false}

We expect this response to be returned back after calling the above code snippet.
Actual result:
ERROR:slack_bolt.App:Failed to send a request to Slack API server: <urlopen error Tunnel connection failed: 403 Forbidden>
INFO:slack_bolt.App:Going to retry the same request: POST https://www.slack.com/api/auth.test
ERROR:slack_bolt.App:Failed to send a request to Slack API server: <urlopen error Tunnel connection failed: 403 Forbidden>
When we manually test our Bot Token with this API, we get the valid response. Its only when we run this code in our Linux VM this error appears.

Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Hi @balma8f, thanks for asking the question.

urlopen error Tunnel connection failed: 403 Forbidden

The Slack API server never returns 403 even if your request data is invalid. It can return 200 OK with error information in its response body data. In your Python app, you will see SlackApiError exception with the error information.
I am confident that your corporate / data center network does not allow this type of outgoing HTTP requests by their policies. Perhaps, you need to pass proxy settings to your bolt app.
Please consult with your admins about the details of the proxy or outgoing request restrictions. If there is an HTTP proxy, you can pass the URL to your app this way: https://github.com/slackapi/bolt-python/blob/v1.14.0/examples/socket_mode_proxy.py#L16
I hope this was helpful and you will figure out what to do soon.

so the example you gave, we gave it a try and for some reason it throws an error of us not providing the right "WebClient" even though we have it exactly as your code snippet has. Also for the proxy topic, in the VM if we manually test the auth test API, we get a valid response (either invalid auth or ok: true), could this issue be from anything else?

@balma8f With the given information, I don't have any other suggestions.

urlopen error Tunnel connection failed

Again, this error message indicates the error is not returned from the Slack server. By googling the error message, you can find a few resources as below:

https://stackoverflow.com/questions/29744418/urllib2-urlerror-urlopen-error-tunnel-connection-failed-403-tunnel-or-ssl-for
https://kktechinnovation.wordpress.com/2014/05/21/proxy-tunneling-failed-forbiddenunable-to-establish-ssl-connection/
https://www.pythonanywhere.com/forums/topic/8902/

I hope that you will resolve the problem soon!

repo: slackapi/bolt-python


text:
Can we use custom decorators alongside Bolt's decorators ?

I am using a simple slash command event to trigger my lambda function from slack. I have a piece of code that is listening for the slash command:
main.py
@app.command("/echo")
@it_platform
def action_echo(ack, respond):
    ack('HI')

    # * Log to Cloudwatch
    logging.info("The user {} triggered the command /echo")

    respond('Hello user')

access.py
def it_platform(func):

    @wraps(func)
    def wrapper(*args, **kwargs):

        logging.info(f"Arguments for it_platform {args}")
        logging.info(f"Kwarguments for it_platform {kwargs}")

        func(*args, **kwargs)

    return wrapper

When i send the command /echo from my slack, i get the following error message:
[ERROR]	2022-08-08T05:03:06.984Z	b38c38c8-ed45-46f2-80e8-8613da4ab0aa	Failed to run listener function (error: action_echo() missing 2 required positional arguments: 'ack' and 'respond')
Traceback (most recent call last):
  File "/opt/python/lib/python3.8/site-packages/slack_bolt/listener/thread_runner.py", line 65, in run
    returned_value = listener.run_ack_function(
  File "/opt/python/lib/python3.8/site-packages/slack_bolt/listener/custom_listener.py", line 49, in run_ack_function
    return self.ack_function(
  File "/var/task/models/neo_access.py", line 18, in wrapper
    func(*args, **kwargs)
TypeError: action_echo() missing 2 required positional arguments: 'ack' and 'respond'`

If I remove the decorator it_platform from the function, it works fine. However, I need to have this decorator perform other tasks.
The slack_bolt version
slack_bolt version 1.11.4
Python runtime version
python3.8
OS info
serverless AWS Lambda x86_64
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., setup.py))

Expected result:
Decorator function it_platform to execute successfully
Actual result:
[ERROR]	2022-08-08T05:03:06.984Z	b38c38c8-ed45-46f2-80e8-8613da4ab0aa	Failed to run listener function (error: action_echo() missing 2 required positional arguments: 'ack' and 'respond')
Traceback (most recent call last):
  File "/opt/python/lib/python3.8/site-packages/slack_bolt/listener/thread_runner.py", line 65, in run
    returned_value = listener.run_ack_function(
  File "/opt/python/lib/python3.8/site-packages/slack_bolt/listener/custom_listener.py", line 49, in run_ack_function
    return self.ack_function(
  File "/var/task/models/neo_access.py", line 18, in wrapper
    func(*args, **kwargs)
TypeError: action_echo() missing 2 required positional arguments: 'ack' and 'respond'`

Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Hi @mervin-hemaraju-cko, this issue has been resolved (see https://github.com/slackapi/bolt-python/pull/689) in the recent release! Please upgrade to the latest version. Let me close this issue now.

authors: mervin-hemaraju-cko seratch


text:
Address forkjoin missing request context

This removes the RequestContext.current() from wrapping from the direct executor. Since the direct executor is a caller-runs policy, this should not be needed.

This isn't generating the trace data as I'm expecting, so I'm going to take a different approach on this. I'll reopen this if needed, but will likely use a different PR.

repo: slackhq/kaldb


text:
Set the default .env location to the absolute path of the working directory

Using the PWD env var we should be able to set the env in the root directory.  I think this is a better default than where the executable file is.  What do you guys think?
Good work on the package by the way.  :smile:

I don't have a strong opinion on this. What do other dotenv packages do? (I should probably know that...)
@chills42 Thoughts?

If I'm reading it correctly bkeepers implementation defaults to a relative path.
https://github.com/bkeepers/dotenv/blob/master/lib/dotenv.rb

Also, the env! macro refers to the value of the environment value at compile time, not at runtime, which may or may not be what you want (but almost surely isn't what the implementation @chills42 linked does).
In any case, it would be nice if it didn't crash the application when PWD isn't defined; perhaps use option_env instead?

As far as what dotenv for Ruby goes, every project I have ever used has had .env file in the root.
From the readme: "Add your application configuration to your .env file in the root of your project"
That is a good call with option_env.  I will work on making it not break when missing the PWD.
If instead of the making the pwd the default would it be better to just add an arg that would allow you to load from root: dotenv("root") or something along those lines?

Oh, okay. It seems to me that making the root folder the default is the right thing to do.
I'm still unsure about the usage of env!/option_env! (that is, getting the compile-time value of the environment variable, as opposed to using std::env::var to get the run-time value). Furthermore, it seems like Rust provides you with a function that outputs the current working directory (std::env::current_dir), which is probably the right way to do this.

@slapresta,  I pushed up a change that uses current_dir().

I like this, it's a breaking change, but it is aligning us with other implementations, so it would still be a good move.

Lovely, @mfpiccolo! Thanks for the pull request :)

authors: chills42 mfpiccolo slapresta

repo: slapresta/rust-dotenv

license: mit

license_source: bigquery


text:
Update file 1 with PyMC4 (PyMC)

Hello Seungjae,
I updated the PyMC3 packages in your code with PyMC4 (PyMC) while I exercise Bayesian regression examples. I'll update the other files when I am available.
Sincerely,
Jinyoung

What is 1_Linear Regression_jinyoung.ipynb?
Also, I think it may be a good idea to have files for both PyMC3 and PyMC4 instead of replacing old files with new ones.

authors: jykoresearch sleebldg

repo: sleebldg/IIB-training


text:
Build failure in Windows (MinGW-W64) due to missing <sys/sysctl.h>

Chipmunk 7.0.0 fails to build in Windows.
The compiler used was MinGW-W64, and the reason appears to be a missing <sys/sysctl.h> include in src/cpHastySpace.c:
[ 20%] Building C object src/CMakeFiles/chipmunk.dir/cpHastySpace.c.obj
C:\Devel\build\Chipmunk-7.0.0\src\cpHastySpace.c:9:24: fatal error: sys/sysctl.h: No such file or directory
 #include <sys/sysctl.h>
                        ^
compilation terminated.
src\CMakeFiles\chipmunk.dir\build.make:342: recipe for target 'src/CMakeFiles/chipmunk.dir/cpHastySpace.c.obj' failed
mingw32-make[2]: *** [src/CMakeFiles/chipmunk.dir/cpHastySpace.c.obj] Error 1
CMakeFiles\Makefile2:76: recipe for target 'src/CMakeFiles/chipmunk.dir/all' failed
mingw32-make[1]: *** [src/CMakeFiles/chipmunk.dir/all] Error 2
makefile:116: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I was able to work around this issue temporarily by adding the following around the <sys/sysctl.h> include in src/cpHastySpace.c:
#ifndef _WIN32
#include <sys/sysctl.h>
#endif /* not _WIN32 */

I also had to link with a threading library, which I did this way (in src/CMakeLists.txt):
# near the top
find_package(Threads)

# ...
# after the add_library() line:
target_link_libraries(chipmunk ${CMAKE_THREAD_LIBS_INIT})

# ...
# similar for `chipmunk_static`:
target_link_libraries(chipmunk_static ${CMAKE_THREAD_LIBS_INIT})

Adding the threading library additions to src/CMakeLists.txt given breaks configuration on Mac OS X. You need to put those inside platform specific blocks:
if(WIN32)
  ...
endif(WIN32)

They break on MSVC too. So:
if(WIN32 && !MSVC)
  ...
endif(WIN32 && !MSVC)

Apparently, this is also broken in some older versions of FreeBSD (u_int is apparently not present).
I find it odd that this would break on OS X, though; I thought cmake would handle that.

I'm also trying to resolve this more generically, instead of on a per-platform basis, at least in the code.
Someone in the FreeBSD bug report has suggested including <unistd.h> instead of <sys/sysctl.h>, and working in terms of that. @ezavada, could you perhaps check if his <unistd.h> solution (see the attached file) works in OS X? I don't have access to that operating system, myself.

Sorry, I wasn't clear about the Mac OS X problem. The #include <sys/sysctl.h> works fine. The problem on the Mac in the find_package(Threads) and target_link_libraries(chipmunk ${CMAKE_THREAD_LIBS_INIT}).
That said, #include <unistd.h> doesn't give the results you want:
[  3%] Building C object src/CMakeFiles/chipmunk_static.dir/cpHastySpace.c.o
/Users/ezavada/work/pdg/deps/chipmunk/src/cpHastySpace.c:323:3: warning: implicit declaration of function 'sysctlbyname' is invalid in C99
       [-Wimplicit-function-declaration]
             sysctlbyname("hw.ncpu", &threads, &size, NULL, 0);

This is with
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0

@ezavada: I know you meant the threading thing. And it's not just a replacement of the include; again, see the attached file in the previously-linked reply in the FreeBSD issue.

I had this problem compiling for Android. The following change to the includes in cpHastySpace should fix for all platforms:
//#include <sys/param.h >
//#include <sys/sysctl.h>
#ifdef APPLE
#include <sys/sysctl.h>
#else
#include <sys/sysconf.h>
#endif

@slembcke : we over at msys2 have a fix for this
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-chipmunk/001-build-fix.patch
would you consider merging this patch :)
Many thanks
Martell

As @fuguelike  said, <sys/sysctl.h> is not present on Android. However, Android has <linux/sysctl.h>.

authors: darkuranium ezavada fuguelike martell ricardoquesada


text:
Guided Joins

Right now joins only allow in order iteration with entities, which works for most use cases. In some use cases, however, you need a sorted way of doing things to make sure the order of operation is correct. (For example, amethysts transform system/scene graph).
So I propose a GuidedIter:
pub struct GuidedIter<I, J> {
    guide: I,
    bitset: J::Mask,
    values: J::Value,
};

impl<I, J> Iterator for GuidedIter<I, J>
    where I: Iterator<Item = usize>,
          J: Join,
{
    type Item = J::Type;
    fn next(&mut self) -> Option<J::Type> {
        while let Some(index) = self.guide.next() {
            if self.bitset.contains(index) {
                return Some(index);
            }
        }
        None
    }
}

Usage:
let list: Vec<usize> = vec![5, 1, 8, 2, 9, 12];
for (comp1, comp2) in (&comp1s, &comp2s).guided_join(list) {
    ...
}

@Aceeri How would you know the order of components in advance?

The order of the components should be the same as the join that is used for the guided if that is what you are asking.

Relevant

As noted by @Object905, if somebody wants this feature they can use specs_guided_join.

authors: Aceeri Object905 torkleyy

repo: slide-rs/specs


text:
Improving fetch usage

Improves situation in #23.

Thanks!

authors: WaDelma kvark


text:
问答模块-答案详情

TS+ Version: v#.#.#
PHP Version:
Database Driver & Version:

Description:
@this-BaiShi
答案详情的接口没有返回答案的具体内容，该答案是公开答案
Steps To Reproduce:

Fixed step:

[ ] fixed.

已修改

@this-BaiShi dev
"question_id": 270, 还有这个问题

我看了一下。。270开启了围观的

authors: legendarytym this-BaiShi

repo: slimkit/thinksns-plus


text:
Can't running IDE debugger. Database connection issue when modifying autoapp.py

This is more of a question rather than an issue. I would like to use the PyCharm debugger, but in order to do this, I should run autoapp.py through the IDE interface, not call flask run from the command line. However, upon adding the line app.run() to autoapp.py, when attempting to login, I receive the following error.
OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
This seems to be common (not just to this project). Do I need to adjust my database in order to run the application directly from autoapp.py?
Thanks!

I use PyCharm to debug my Flask applications. It should not be necessary to introduce any config or code changes to do this.
All you need to do is create a debug configuration, and then set the necessary Environment variables to replicate what you have on the command line.
You can, and should, then still make use of flask run to launch your app by specifying the path to your Flask binary in Script and simply setting Script parameters to 'run'.

Fantastic. I think I understand how this works better now. This seemed to work. Another quick followup question, how are the commands within the command file different from running flask with an argument after it? I see that these are click commands (and probably not flask commands).
Thanks

repo: sloria/cookiecutter-flask


text:
[e2e]: container workflow_dispatch main workflow_inputs slsa3

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/3391124243
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.container.workflow_dispatch.main.workflow_inputs.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.container.workflow_dispatch.main.workflow_inputs.slsa3.yml
Trigger: workflow_dispatch
Branch: main
Date: Fri Nov  4 04:06:16 UTC 2022

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/3391124243
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.container.workflow_dispatch.main.workflow_inputs.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.container.workflow_dispatch.main.workflow_inputs.slsa3.yml
Trigger: workflow_dispatch
Branch: main
Date: Fri Nov  4 06:07:28 UTC 2022

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/3391631134
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.container.workflow_dispatch.main.workflow_inputs.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.container.workflow_dispatch.main.workflow_inputs.slsa3.yml
Trigger: workflow_dispatch
Branch: main
Date: Fri Nov  4 06:14:27 UTC 2022
Tests are passing now. Closing this issue.

repo: slsa-framework/slsa-github-generator


text:
feat: GCB refactor for v1.0 support

In anticipation for GCB's v1.0 support, this PR re-factors the code to look similar to GHA's code

@ianlewis friendly ping for a review

repo: slsa-framework/slsa-verifier


text:
Error with Pyspark GBTClassifier

@QuentinAmbard
I just installed Shap from PyPi (0.32.0) and running a version of your test still produces the same error - shown below. Is there something that I am missing in the use of Shap with a pyspark model?
import pyspark
print(pyspark.__version__)
import shap
print(shap.__version__)
import sklearn.datasets
from pyspark.sql import SparkSession
from pyspark import SparkContext, SparkConf
from pyspark.ml.feature import VectorAssembler, StringIndexer
from pyspark.ml.classification import RandomForestClassifier, DecisionTreeClassifier, GBTClassifier
import pandas as pd

iris_sk = sklearn.datasets.load_iris()
iris = pd.DataFrame(data= np.c_[iris_sk['data'], iris_sk['target']], columns= iris_sk['feature_names'] + ['target'])[:100]
spark = SparkSession.builder.config(conf=SparkConf().set("spark.master", "local[*]")).getOrCreate()

col = ["sepal_length","sepal_width","petal_length","petal_width","type"]
iris = spark.createDataFrame(iris, col)
iris = VectorAssembler(inputCols=col[:-1],outputCol="features").transform(iris)
iris = StringIndexer(inputCol="type", outputCol="label").fit(iris).transform(iris)

classifier = GBTClassifier(labelCol="label", featuresCol="features")
model = classifier.fit(iris)
explainer = shap.TreeExplainer(model)
X = pd.DataFrame(data=iris_sk.data, columns=iris_sk.feature_names)[:100] # pylint: disable=E1101
shap_values = explainer.shap_values(X)

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-31-f47b3a56c25f> in <module>
     23 explainer = shap.TreeExplainer(model)
     24 X = pd.DataFrame(data=iris_sk.data, columns=iris_sk.feature_names)[:100] # pylint: disable=E1101
---> 25 shap_values = explainer.shap_values(X)

/mnt1/anaconda3/lib/python3.7/site-packages/shap/explainers/tree.py in shap_values(self, X, y, tree_limit, approximate, check_additivity)
    283
    284         if check_additivity and self.model_output == "margin":
--> 285             self.assert_additivity(out, self.model.predict(X))
    286
    287         return out

/mnt1/anaconda3/lib/python3.7/site-packages/shap/explainers/tree.py in predict(self, X, y, output, tree_limit)
    785             import pyspark
    786             #TODO support predict for pyspark
--> 787             raise NotImplementedError("Predict with pyspark isn't implemented")
    788
    789         # see if we have a default tree_limit in place.

NotImplementedError: Predict with pyspark isn't implemented

@QuentinAmbard
Have anyone else ran this code successfully?

That's almost the code from the unit test, so yes it should run without error.
I'll try to debug that this week, maybe there is an issue with 0.32.0 ...

This is also happen to me. It used to work with RandomForest in version 0.30.2.
I'll try to revert and check again ..

Hello, I`m having the same problem with Shap version:  shap-0.32.1
I also tried previous version but I get the same error since the commit which added GBT and RF.
I made a test to check the unit test and copy all function: test_pyspark_classifier_decision_tree()
And run it in my environment and I get the same error.
Could be that the build was done without unit testing?

Hello, I`m having the same problem with Shap version: shap-0.32.1
I also tried previous version but I get the same error since the commit which added GBT and RF.
I made a test to check the unit test and copy all function: test_pyspark_classifier_decision_tree()
And run it in my environment and I get the same error.
Could be that the build was done without unit testing?

@caspiDoron You may try version 0.30.2. it works for me.

Hello, I`m having the same problem with Shap version: shap-0.32.1
I also tried previous version but I get the same error since the commit which added GBT and RF.
I made a test to check the unit test and copy all function: test_pyspark_classifier_decision_tree()
And run it in my environment and I get the same error.
Could be that the build was done without unit testing?

@caspiDoron You may try version 0.30.2. it works for me.

Thanks but it seems to work only for DT, Random forest failing on the tests: AssertionError: SHAP values don't sum to model output for class0!
GBT is not supported which is the one i use...

I just re-run the unit test and something is broken indeed.
As a workaround you can set check_additivity=False when computing the shap_values
It's a new check that has been added and calls the predict function.
I suspect this hasn't been catch in the unit tests because spark isn't in the env and the test is ignored in this case.

Thank you @QuentinAmbard it is working with this workaround.

Great!
I suggest we do the following:

Create a small fix to disable check_additivity for spark models (I'll commit that soon as a fix to this issue)
Make sure the tests are launched with the spark lib in the env to prevent from this kind of issues (will create a new issue to fix that)
More long term / viable: implement the prediction with spark (I'll create a new feature too)

Thanks for checking into this @QuentinAmbard! I just pushed an updated tolerance check for additivity to address #887, but I suspect this might be a true error that this new check uncovered. Happy to help work through it on the PR

Hi. I can run the example code properly.
But I'm not fully understand how shap_values works actually.
Can anyone please explain why shap_values takes 'X' as data in from of features in each column (i.e. sepal_length, sepal_width, petal_length, petal_width, separately in each column), while GBTClassifier model actually takes features in 1 column (named 'features').
Why shap_values can understand the difference between when the model was trained (features in 1 column) and when the model was to be explained?
Thank you sir.

shap_values takes a pandas Dataframe containing one column per feature.
GBTClassifier is a spark classifier taking a spark Dataframe to be trained. Spark works with 1 column containing an array with all the features you are using (that's what is doing the VectorAssembler)
Once the model is trained shap will explain it using shap_values(...).
You have to convert your data into a pandas dataframe to  explain it. If your dataset is too big you can easily create a spark Pandas UDF to run the shap_values in a distributed fashion.

shap_values takes a pandas Dataframe containing one column per feature.
GBTClassifier is a spark classifier taking a spark Dataframe to be trained. Spark works with 1 column containing an array with all the features you are using (that's what is doing the VectorAssembler)
Once the model is trained shap will explain it using shap_values(...).
You have to convert your data into a pandas dataframe to explain it. If your dataset is too big you can easily create a spark Pandas UDF to run the shap_values in a distributed fashion.

Thanks @QuentinAmbard. I still wonder how shap_values knows that each column in Pandas Dataframe equal to which element of Spark Dataframe (when the model was trained).

I'm using the index of the features, I assume the order of the pandas column must be the same as the features added in the vector assembler of your spark dataframe. Probably worth mentioning it in the documentation.
https://github.com/slundberg/shap/blob/master/shap/explainers/tree.py#L951

Hi All,
Is there any solution for NotImplementedError: CategoricalSplit are not yet implemented" in pyspark?

Using iris example i  try to parallelize shap values calculation in this way:
iris_shap=iris.drop('type','features','label').repartition(10)
X_columns=iris_shap.columns
explainer = shap.TreeExplainer(model)

def calculate_shap(rows,X_columns,explainer):
  a=pd.DataFrame(rows,columns=X_columns)
  shap_values = explainer.shap_values(a)
  return [Row(*( [float(f) for f in shap_values[i]])) for i in range(len(shap_values))]

iris_shap.rdd.mapPartitions(lambda j:calculate_shap(j,X_columns,explainer)).toDF(X_columns)

if model is sklearn.ensemble.GradientBoostingClassifier no problem but when is equal to pyspark.ml.classification.GBTClassifier obtain this error:
PicklingError: Could not serialize object: Py4JError: An error occurred while calling o135.__getstate__. Trace:
py4j.Py4JException: Method __getstate__([]) does not exist
	at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318)
	at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:326)
	at py4j.Gateway.invoke(Gateway.java:274)
	at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
	at py4j.commands.CallCommand.execute(CallCommand.java:79)
	at py4j.GatewayConnection.run(GatewayConnection.java:238)
	at java.lang.Thread.run(Thread.java:748)

Any suggestion?

The explainer can't be serialized probably because we are keeping spark references inside. I'll try to have a look.
As workaround you can recompute the explainer in each partition maybe ?

i try passing model to function calculate_shap and compute the explainer inside partition but obtain the same error

@QuentinAmbard
I am trying to get shap to work with a pyspark GBT classifier. I got my features as a numpy array X and then tried (as in the example):

model = pyspark.ml.classification.GBTClassificationModel.load("/path/to/trained/model")
explainer = shap.TreeExplainer(model)
Setting feature_perturbation = "tree_path_dependent" because no background data was given.
sv = explainer.shap_values(X)

It gave the following error:

Traceback (most recent call last):
File "", line 1, in
File "/lib/python3.7/site-packages/shap/explainers/tree.py", line 304, in shap_values
assert self.model.fully_defined_weighting, "The background dataset you provided does not cover all the leaves in the model, "
AssertionError: The background dataset you provided does not cover all the leaves in the model, so TreeExplainer cannot run with the feature_perturbation="tree_path_dependent" option! Try providing a larger background dataset, or using feature_perturbation="interventional".

I did not provide a background dataset, so I don't understand why it wants me to provide a larger one.  Also, the matrix X contains my entire training dataset, so I don't understand how it could not cover all the the leaves in the model. Am I doing something obviously wrong?
Then, when I tried using feature_perturbation="interventional", it gave a different error:

explainer = shap.TreeExplainer(model, data=X)
Traceback (most recent call last):
File "", line 1, in
File "/lib/python3.7/site-packages/shap/explainers/tree.py", line 151, in init
self.expected_value = self.model.predict(self.data).mean(0)
File "/lib/python3.7/site-packages/shap/explainers/tree.py", line 972, in predict
raise NotImplementedError("Predict with pyspark isn't implemented. Don't run 'interventional' as feature_perturbation.")
NotImplementedError: Predict with pyspark isn't implemented. Don't run 'interventional' as feature_perturbation.

Also, if running the predictions with spark is complicated to implement, it might be worth adding the ability of the user to supply the expected predictions for validation.

You should get this error when your tree is built with a leaf without data inside. If you get this error, I assume you are using shap on a model built with a small data size?
Can you open another issue to track the implementation of the predictions with spark to make it works with interventional ?

You mean that not all paths to the leaf are the same length, so some of what would otherwise be intermediate nodes have no children?
Also, I created Issue #1192 to track spark predictions.

@QuentinAmbard
Are there news about the error of @amandolesi? Any new suggestion?
Thank you.

Hi All,
Is there any solution for NotImplementedError: CategoricalSplit are not yet implemented" in pyspark?

I run into the same problem, did you find out the solution to it?

I didn't had time to search what's causing this exactly these last weeks. I suspect there is a reference to spark kept somewhere and it breaks the serialization of the tree explainer with a spark model.  I'll have a look when I got some time, but it shouldn't be a big deal, especially if the serialisation is working with other models.

@QuentinAmbard
Hello Quentin, to recap and also give you some additional feedback, I performed some tests using a local standalone instance of spark.
As you mentioned a serialization error, I tried pickling a 'pyspark.ml.classification.RandomForestClassificationModel' object, basically a fitted pyspark random forest and I got a Py4J error, the same that @amandolesi reported above.
In explainer/tree.py, TreeExplainer class, row 695:
elif "pyspark.ml" in str(type(model)):
            assert_import("pyspark")
            self.original_model = model

so this serialization problem propagates. I tried commenting out "self.original_model = model" and I was then able to pickle the TreeExplainer object with a PySpark model. Of course it is a workaround but predictions are not implemented with PySpark yet, so commenting that line for the time being should not be an issue, what do you think about it?

Thanks @guidiandrea ! Absolutely that's what I had in mind too, but still haven't find time to do the change :/ The original_model was indeed kept in order to implement predictions (https://github.com/slundberg/shap/issues/1192) but I think we should find another way to avoid breaking serialisation with spark models.
Would you like to do the PR ?

Here you are:
https://github.com/slundberg/shap/pull/1307
Thank you @QuentinAmbard!

@slundberg I think we can now close this issue as everything should be solved with #1313

Looks like this should be closed @allard-jeff

I am still having `NotImplementedError: CategoricalSplit are not yet implemented" error. I am using shap==0.39.0 and Spark 3

@chengyin38
Does shap.TreeExplainer(pipeline_model.stages[-1]) work?

@chengyin38  The issue is that Shap can not handle categorical splits. So, in the Pyspark pre-processing you really need to drop the meta data from the data frame that pyspark will implicitly use to determine a feature is a categorical variable. This is done it seems as df= df.rdd.toDF(). String indexing without categorical splits might not be an optimal approach to the modeling however.

@QuentinAmbard I am finding that with Shap 0.39.0 this error continues with pyspark GBT.  The weird issue is that this error only seems to happen when a saved GBT is loaded. If I use the original model in memory, the error does not occur. Any ideas?
    assert self.model.fully_defined_weighting, "The background dataset you provided does " \
AssertionError: The background dataset you provided does not cover all the leaves in the model, so TreeExplainer cannot run with the feature_perturbation="tree_path_dependent" option! Try providing a larger background dataset, or using feature_perturbation="interventional".

Any idea how to fix this?
Model type not yet supported by TreeExplainer: <class ‘sparkdl.xgboost.xgboost_core.XgboostRegressorModel’>
I am trying to run this type of code:
xgboost = XgboostRegressor(**params)
pipeline = Pipeline(stages=[stringIndexer, vecAssembler, xgboost])
pipelineModel = pipeline.fit(trainDF)
explainer = shap.TreeExplainer(pipelineModel.stages[-1])

@QuentinAmbard I am finding that with Shap 0.39.0 this error continues with pyspark GBT. The weird issue is that this error only seems to happen when a saved GBT is loaded. If I use the original model in memory, the error does not occur. Any ideas?
    assert self.model.fully_defined_weighting, "The background dataset you provided does " \
AssertionError: The background dataset you provided does not cover all the leaves in the model, so TreeExplainer cannot run with the feature_perturbation="tree_path_dependent" option! Try providing a larger background dataset, or using feature_perturbation="interventional".

any updates with this problem?

@QuentinAmbard I am finding that with Shap 0.39.0 this error continues with pyspark GBT. The weird issue is that this error only seems to happen when a saved GBT is loaded. If I use the original model in memory, the error does not occur. Any ideas?
    assert self.model.fully_defined_weighting, "The background dataset you provided does " \
AssertionError: The background dataset you provided does not cover all the leaves in the model, so TreeExplainer cannot run with the feature_perturbation="tree_path_dependent" option! Try providing a larger background dataset, or using feature_perturbation="interventional".

Any progress with this problem? @QuentinAmbard

authors: AllardJM AnastasiaProkaieva BDon-Tan Ekkalak-T MatteoManzari QuentinAmbard allard-jeff amandolesi antonwnk caspiDoron chengyin38 critical-thinker guidiandrea jennyivy ppakawatk sacmax slundberg

repo: slundberg/shap


text:
Error in roi_pooling_op.cc:

whenever I am trying to do make as per the instructions.. I am getting this error
In file included from roi_pooling_op.cc:25:0:
work_sharder.h:21:49: fatal error: tensorflow/core/lib/core/threadpool.h: No such file or directory
#include "tensorflow/core/lib/core/threadpool.h"
Please advice what i am missing

I think this is caused by the version of tensorflow, and I change the latest to solve this problem

I had the same problem and my version of tensorflow is 1.0.0(CPU ) the latest version.
Have you solved this problem ?


text:
🦈 add resolve-srv option 🦈

WIP - fixes #548

need to add some tests
add to docs

Nice!

added Tests and Doco
cc: @cescoffier

@eformat I've (force) pushed a few changes:

revapi justification
make the test a bit more robust

Let's see what the CI says, but I think it's good to go.

Thanks!

thanks @cescoffier 👍

authors: cescoffier eformat

repo: smallrye/smallrye-stork


text:
Add "strictPort" configuration property

New Feature Proposal
For more information, see the CONTRIBUTING guide.
Description
Occasionally, and from external factors, the desired port number for the local server is in-use.  Through the get-port npm package, piral-cli deals with this by having the local server listen on another random port.
The feature request is a configuration option that would change the server behavior to immediately exit if the desired port is not available.  This is similar to the "strictPort" option introduced in vitejs https://v3.vitejs.dev/config/server-options.html#server-strictport
Background
When running automated tests, the switch to another random port cannot be readily detected, aside from some indeterminate time limit waiting on the server being available on the desired port number.  An immediate exit on the server with some error code would make this situation immediately detectable and the automated tests can be aborted.

Yes we can add this. I'd propose to call this --strict-port with default being false (i.e., --no-strict-port is the default); besides the CLI it can be configured via the .piralrc, too.
Sounds good?

Yes we can add this. I'd propose to call this --strict-port with default being false (i.e., --no-strict-port is the default); besides the CLI it can be configured via the .piralrc, too.
Sounds good?

🙏
That is totally fine.  Any which way that the gist of the requested feature can be provided will be helpful to our dev/test workflow.  I really wish I could spare the time writing the PR for this...  just too much other dev work on the table.  We're okay if this gets bumped lower in implementation priority.

Part of the preview for the 1.6.0.
Tested and works.

authors: FlorianRappl peter-at-work

repo: smapiot/piral


text:
Cartoon Effect

Greetings sir,
I observed by the project repository that project aims for Image related manipulations.
I'd love to contribute to the repository.
Please can we add the cartoon effect as well in the option of effects with necessary process libraries like tqdm and OpenCV.
@smaranjitghose Can we please held onto this contribution?

Sure! Have a look at the White Box Cartoonization technique

Hey! @smaranjitghose
Can I work on this issue?
I am contributing as a part of DWOC

Hey! @smaranjitghose
Can I work on this issue?
I am contributing as a part of DWOC

Hey! @smaranjitghose
Can I work on this issue?
I am contributing as a part of DWOC

Sure. Have a look at the White Box Cartoonization paper and repo

Hey! @smaranjitghose
Can I work on this issue?
I am contributing as a part of DWOC

Sure. Have a look at the White Box Cartoonization paper and repo

authors: AnanyaNagar RawX18 smaranjitghose

repo: smaranjitghose/ArtCV


text:
Settings page: Added Contributors

Fixes #191
Added contributors list view with github contributors API,
@anushbhatia hope you review it and merge it.

Hey @Udit-singh! Welcome to the repo. Can you provide with any screen shot of your change ?

@arteevraina I have Incorporated following requested changes and attached a snapshot below.
https://user-images.githubusercontent.com/55452299/113503824-f463c180-9551-11eb-8345-d0a5613f4010.mp4

Remove our names if possible. Smaranjit and Anush.

Remove our names if possible. Smaranjit and Anush.

@anushbhatia I have Incorporated following requested changes.

authors: Udit-singh anushbhatia arteevraina

repo: smaranjitghose/DocLense


text:
Copyright missing

Copyright is missing in footer section of main page.

This is an open-source project with an aim that anyone can use and modify freely so having a copyright is not required at the moment. We do have a license on the project repo though


text:
Work Expereince Section in Expereince Page [React]

Reference

Modification w.r.t the above reference:

The color scheme should be the same as followed throughout the current website
Instead of the title appearing over the image, put it above the text for simplicity
Remove the space allocated for hashtags, emoji, and the hyperlink for the case study
The text should be in bullet points (as in the  current version of the website)
Instead of using the data given in the current version of the website, try to come up with something new
Inplace of the images/illustrations, logos of companies should be used
The data should be dynamically fetched from a variable as done currently in the expereince.js
All the images/logos should be placed inside assets/images/workex/

I will like to work on this.

Can I work on this issue also because I am working on an open-source card issue that is also present on the experience page?

@Anita-ihuman  Assigned for 3 days.
@ujju20 Try to wrap up the one you are assigned as per the feedback given. We also have a Hackathon Section for the page which needs to done as well. Perhaps you can take that

@Anita-ihuman Assigned for 3 days.
@ujju20 Try to wrap up the one you are assigned as per the feedback given. We also have a Hackathon Section for the page which needs to done as well. Perhaps you can take that

Ok after completing the open source card I will work on the hackathon section.

@ujju20, I would like to be clarified on something.
Currently, the page is lacking an Src and a pages folder, I should include this right?
The changes we are making are to this webpage, right? https://portfolio.smaranjitghose.com/experience.html.
Also, how about the React package.json(I should install this too?)

@ujju20, I would like to be clarified on something.
Currently, the page is lacking an Src and a pages folder, I should include this right?
The changes we are making are to this webpage, right? https://portfolio.smaranjitghose.com/experience.html.
Also, how about the React package.json(I should install this too?)

Actually, experience is a component of this react app so why does it include src and pages folder, we have to make files in the experience folder.
Ya we are making changes to this webpage you mentioned.

@Anita-ihuman Actually, the changes you are making is not the hosted version of the website rather the codebase on reactjs branch.

Alright then. Thanks for clarifying.

authors: Anita-ihuman smaranjitghose ujju20


text:
Adding help button in navbar

I guess there should be a help button where the steps should be written , because About  is not to help the  people ,
to help people there must be help button  and i guess there is difference between about and help.
i am participate of GSSoC'21 i want to add help button in navbar, can you please assign me.

Hey, I'm gssoc'21 participant, I would like to give my hand in this project. Please assign this issue to me.
I have made these type of projects ... so i can easily solve this issue.

l'm GSSoC'21 participant, I have a bit good hand in html and css. So, I would like to contribute in this project.  Please assign this issue to me. I can solve this easily.

The Home Page is really self explantory. Anyone who has used a word processor like MS Word or Google Docs can use it


text:
feat: add country support

add support for feature flags in the auth url
add country parameter to compatibility endpoint

NIT : I think we need to update README on this one. Maybe add to the sample auth code snippet ?

got it! will do 😃
On Wed, Sep 23, 2020 at 5:25 PM Ashwin Kumar Subramanian <
notifications@github.com> wrote:

NIT : I think we need to update README on this one. Maybe add to the
sample auth code snippet ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/smartcar/ruby-sdk/pull/6#issuecomment-698040361, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AJLCJ5PTMKDDPU4NQV6W3DLSHKGX3ANCNFSM4RIS45NQ
.

--
This message and its attachment(s) are confidential and may contain
privileged information for the sole use of the intended recipient.

@allisonc07  this is good to go right ? THe deployment to rubygems is manual i can merge and deploy.

repo: smartcar/ruby-sdk


text:
More information on activities and amenities

During our CUTgroup test, we heard questions about the activities/amenities a preserve offers. One example is that a tester was interested in finding a place to rent a canoe. She searched for "Canoe" and saw that her only option was "canoe landing." She then wondered if a canoe landing can also rent canoes or if she has to bring her own. She was not sure, and then thought she might want to look at "Boat rentals" but did not know if boat rentals would have canoes.

@smarziano We need to try to come up with a list of alternative names for activities and amenities that help this situation. One of my testers searched "run" or "running," which will be a common query, and came up empty. So the official amenity is hiking, but that should also trigger for "run," "jog," etc. Similar issue when someone searched "kayak."

Covered in enhanced search and POI descriptions (example: POIs with boat rentals/launches indicate what boats are allowed. Provides link to more info about boat rentals).

authors: smarziano versatilehuman

repo: smartchicago/trailsy


text:
[SDL 0101] Add Android SDL Internal Interface

Proposal: Add Android SDL Internal Interface

The internal SDL interface will help reduce the dependency on the SDLProxyBase class and allow us to move away from it in the future when we introduce a more enhanced framework.

Review: https://github.com/smartdevicelink/sdl_evolution/issues/298

PR Merged, closing issue

authors: brettywhite theresalech


text:
kafka eagle 无法查看消费组消息

我现在使用kafka单机 下载了eagle并安装提供文档配置好了。所有功能都能正常使用！唯独查看消费组 running时 一直在加载中 显示不了 信息 是什么情况 有人能解答一下吗

kafka version ?
use kafka api (new or old)
Reference blog Kafka Eagle Install

authors: smartloli sushicai

repo: smartloli/kafka-eagle


text:
simplified col

Col now uses tput as compared to bash functions for simplicity, and the whole thing is now compressed into a single variable as compared to a function. This has been a total bingus moment.

Great, thank you for this.

authors: BrentBoyMeBob smartsyncing

repo: smartsyncing/dotfiles

license: WTFPL


text:
Autoplay is not working properly

I'm trying to use the play and stop events on a carousel but I can't get them to work as they should.
I configured the carousel like this:
function init() {
    var owl = $("#s01e13-slideshow");
    owl.owlCarousel({
        autoplay: true,
        autoplayTimeout: 500,
        autoplayHoverPause:false,
        center: true,
        items: 1,
        responsive:{
            0:{
                items:1,
            },
        600:{
            items:1,
        },
        1000:{
            items:1,
        }
        },
        animateIn: 'fade',
        animateOut: 'fade'
    });

    $('.prevBtn').click(function() {
        owl.trigger('prev.owl.carousel', [0]);
    });
    $('.nextBtn').click(function() {
        owl.trigger('next.owl.carousel', [0]);
    });

    $('.playBtn').on('click', function() {
        owl.trigger('play.owl.autoplay', [1000]);
    });
    $('.pauseBtn').on('click', function() {
        owl.trigger('stop.owl.autoplay');
    });
}

And when it's loaded it starts autoplaying and I can stop it, so the stop event works. But then when I click on the "play" button it doesn't autoplay.
Also, in this demo page: http://www.owlcarousel.owlgraphic.com/demos/autoplay.html
In the example you use the events "autoplay.play.owl" and "autoplay.stop.owl", while according to the documentation they should be "play.owl.autoplay" and "stop.owl.autoplay".
Thanks for your help

You can just use :
$('.play').on('click',function(){
owl.trigger('owl.play',5000);
})
$('.stop').on('click',function(){
owl.trigger('owl.stop');
})

authors: ayoub-bousetta carlotrimarchi


text:
Accept Element Callbacks with TACS and ESP/CAPS + Blade Stiffener Example

Made changes in the tacsAIM (part of ESP/CAPS CAD software package) to write out TACS Component files
Adapts Alasdair Gray's Mach tutorial wing example in TACS for creating blade stiffened shells. Will be used for aeroelastic benchmark in FUNtoFEM
See companion TACS PR https://github.com/smdogroup/tacs/pull/300

Going to squash the commits and then reopen the PR (so the PR looks cleaner)

repo: smdogroup/funtofem


text:
feat: added container tokens

References:

Jira https://autoricardo.atlassian.net/browse/DM-242

Figma https://www.figma.com/file/WmNmJ7jdB0Z7tOjj516nFB/AS24-Tokens?node-id=84%3A36

Motivation and context
Setup of base theme CONTAINER tokens as defined in the design system.
Before
No base theme for the container tokens
After
Base theme for container tokens 📦
Thank you 🍦

@talamcol If I understand correctly those are the containers we'd use to set max-width of the content

For what are those needed?

The containers tokens are the ones we will use to set elements in a max-width of a content.

authors: Averethel GutierrezGo

repo: smg-automotive/components-pkg


text:
400201 user not fould sendbird

I am getting "400201 user not found" when connecting to sendbird using connect() method. Any idea why am i getting this issue ?

@sujitpanda Which version is this occurring on?

I am using SendBird SDK 3.0.22 . It is working fine in the demo app with the same version but when i integrating it to my app it is showing this "400201 : User Not Found" error .

@sujitpanda Does this happen when connecting as a certain user? Or all users? One possible cause might be that you are including whitespace in the user ID.

@terrykwon No I have tried with so many users .  Same issue i am getting for all users. Do i need to create different app in the SendBird dashboard and get new API_KEY for using in different application . Currently i am using the same API_KEY that i used in the SendBird demo app .

Well, you should eventually create a new app that you can manage, but I don't think using the demo API key would cause an error when creating a user.
Could you share your code when you call SendBird.connect()? And could you double-check if you're getting the error in the onConnected(User user, SendBirdException e) callback or someplace else? Logs might be helpful!

I created a new test project and copy paste my code from actual project to new test project. In the new test project it is working absolutly fine but the same code not working in my existing project . onConnected() callback is getting called and then the SendBirdException is coming . Code is straightforward. Here is the code snippet .
protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        SendBird.init(appId, this);
        connect();
    }
 private void connect() {
        SendBird.connect(sUserId, new SendBird.ConnectHandler() {
            @Override
            public void onConnected(User user, SendBirdException e) {

                if (e != null) {
                    Toast.makeText(MainActivity.this, "" + e.getCode() + ":" + e.getMessage(), Toast.LENGTH_SHORT).show(); // This toast is getting shown with message "400201: User not found"
                    return;
                }
            }
        });
    }

Very strange issue. Is it someing related to my existing project dependencies ? becaue the exaxt code i have copy paste and it is working in new test app but not in existing app.

I created a new test project and copy paste my code from actual project to new test project. In the new test project it is working absolutly fine but the same code not working in my existing project . onConnected() callback is getting called and then the SendBirdException is coming . Code is straightforward. Here is the code snippet .
private static final String appId = "C5****-*****-*****-******";

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        SendBird.init(appId, this);
        connect();
    }
 private void connect() {
        SendBird.connect(sUserId, new SendBird.ConnectHandler() {
            @Override
            public void onConnected(User user, SendBirdException e) {

                if (e != null) {
                    Toast.makeText(MainActivity.this, "" + e.getCode() + ":" + e.getMessage(), Toast.LENGTH_SHORT).show(); // This toast is getting shown with message "400201: User not found"
                    return;
                }
            }
        });
    }

Very strange issue. Is it someing related to my existing project dependencies ? becaue the exaxt code i have copy paste and it is wokring in my new test app but not in existing app.

My mistake . I was using GroupChannel.createChannelWithUserIds() and the id i was using for this  was missing/not created . That is why i was getting this error. Thanks.

authors: sagrawal2418 sujitpanda terrykwon

repo: smilefam/SendBird-Android


text:
Remove vectorized versions of (log)pdf (etc.) functions

These are now deprecated in Distributions.jl and seem to be causing issues in testing/compiling with newer versions of Julia.

Actually, the test errors seem to need to be fixed by importing instead of using Distributions.jl.


text:
[BUG] Can't filter on Å and å

Expected Behavior
When searching for a file with the special character å, it should show up.
Actual behavior
When searching for a file with the special character å, it is not shown in the popup.
Steps to reproduce behavior

Create a file with name forhåndsvisning.svg and add it to the assets/img/acf/-folder (see attached file)
Search for forh and the icon will appear
Search for forhå and the icon will not appear

Notes
Other special characters like æ and ø work as expected.
What version of the plugin are you using?
3.1.2
What version of WordPress are you using?
6.6.1
What version of PHP are you using?
8.2

Fixed by @Rvervuurt in #21

authors: Rvervuurt mike-sheppard

repo: smithfield-studio/acf-svg-icon-picker


text:
Splitting src/iface/interface.rs into multiple files

I was thinking of splitting the implementations of Interface, InterfaceBuilder and InterfaceInner into multiple files, where each file implements for a specific medium. I was working on the IEEE802.15.4 and 6LoWPAN protocol and I found that the src/iface/interface.rs was getting big with things that where sometimes unrelated. What do you think about this change?
But then again, I'm not sure if this is the best way to go as well, since, for example, lookup_hardware_addr is needed for Ethernet and IEEE802.15.4.

I did an attempt at splitting multiple mediums in multiple structs in #336 and it went really badly. Interface is really complex and Ethernet/IP aren't really independent of each other, so you can't simply split them like that. It was an uphill battle against the borrow checker :)
What might work is splitting them in multiple files, but still being impls on the same Interface struct. It's a mostly "cosmetic" improvement though, everything is still a megastruct, but it could still be worth it.

What might work is splitting them in multiple files, but still being impls on the same Interface struct. It's a mostly "cosmetic" improvement though, everything is still a megastruct, but it could still be worth it.

I tried doing that as well and agree that it's very "cosmetic" and even worse than everything in one file. I'll close this issue then.

authors: Dirbaio thibautvdv

repo: smoltcp-rs/smoltcp


text:
Bi LSTM residual.

At https://github.com/smousavi05/EQTransformer/blob/01bf112a00c1a3bbb43adb2c7dba3e21b5fbcdb9/EQTransformer/core/EqT_utils.py#L2596
you claim it is a residual block, but it is not. What is correct here?

@Erik-BM this is a specific type of residual block called network-in-network block.

@smousavi05 ok, thank you for the clarification. Closing this.


text:
你好，怎么直接分离视频的手势并存为适用于EchoMimicV2的npy文件

你好，怎么直接分离视频的手势并存为适用于EchoMimicV2的npy文件

选择save_pose即可默认保存

emmm,输出的npy文件都是0，怎么回事

同样问题，报错：!!! Exception during processing !!! list indices must be integers or slices, not str

EchoMimic的新版已集成sapiens的pose，不需要再用这个来生成npy文件


text:
Discord Bot

Tasks

[x] List
[x] Chat
[x] Find
[x] Servers
[ ] Reload
[x] Info

Removed reload

Will be with version 4.0.0

repo: smuddgge/Leaf


text:
Added Silver and Gold Problem Solution in Java

This Closes #575
Problem statement:
There are N coins kept in a line. Each coin has two sides - one is colored gold and the other silver. You can flip two adjacent coins any number of times. You need to make the gold-colored side of every coin facing up. You are given the initial status of coins in a binary string s where 1 represents the gold side facing up and 0 represents the silver side facing up. If it is possible to make the gold-colored side of every coin facing up, return  Yes, otherwise return  No
Input:
N = 8, s = "11001100"
Output:
Yes
Explanation:
Flipping 3rd and 4th coin together and 7th
and 8th coin together will do the task.

Explain the question in the comments at the top of the file, or add relevant links in the comments form as well.

Explain the question in the comments at the top of the file, or add relevant links in the comments form as well.

"Is it okay now?"


text:
Naming fatigue when reusing css styles.

This is just a question.
I choose jsxstyle over styled-components for less naming fatigue, but when I try to reuse some styles under jsxstyle, I found myself having naming fatigue again.
Here's how I reuse css styles at first:
import { bps } from '../constants'
import { Block } from 'jsxstyle'
import React from 'react'
import PropTypes from 'prop-types'
const ArticleHeader = ({ children }) => (
  <Block
    marginBottom='1em'
    component='header'
    mediaQueries={bps}
    smMarginBottom='3em'
  >
    {children}
  </Block>
)
export default ArticleHeader
ArticleHeader.propTypes = {
  children: PropTypes.node.isRequired
}

Oh, file named ArticleHeader.js.
Then I found that I can actually make a style object and spread it like:
const articleHeaderStyle = {
  marginBottom: '1em',
  mediaQueries: bps,
  smMarginBottom: '3em'
}
<Block {...articleHeaderStyle}>some wrapped contents</Block>

Again, I need to name articleHeaderStyle.
I'm wondering if these naming are possible to eliminate in jsxstyle :)

Good question! At the end of the day, something is going to need to be named, but since one component can be styled by many style objects, style object names don’t need to map directly to the components they’re styling.
At Smyte, we use a combination of primitive reusable components and small reusable style objects named by feature (focusStyles) as opposed to implementation (userSearchInputFocusStyles). For primitive components that might need slightly different styles based on where they’re used, we pass through the necessary style props.
The example you posted is pretty close to what we do—ArticleHeader is a primitive reusable component and articleHeaderStyle is a reusable style object. articleHeaderStyle could be named in a way that’s more descriptive of what that style object does. I know that doesn’t entirely solve the problem of naming fatigue, but I’ve found that it’s much easier to name small style objects according to the style changes the apply than it is to name mundane components according to their function on the page. Bonus: you can be as verbose as you need with style object names since the style objects themselves will either be minified or completely inlined with jsxstyle-loader.

On a related note, if you’ve got any feedback on or suggestions for the media query feature I’d love to hear it. We built it for a very specific use case but there’s a lot of room for improvement.

In practice I’ve found that we don’t reuse a lot of our reusable style objects, and the ones we do reuse are style groups that have been reverse-engineered from styles we found ourselves applying many times over, like the a11y styles I mentioned above. I end up using single constants a lot more often than I do groups of styles.
For context, my approach to writing CSS is rather designer-y—that is to say, I nudge things along pixel by pixel until they’re where I want them to be. As a result, my CSS ends up being a bit more specific than it would if I was reusing lots of style objects.
My least favourite thing with writing CSS is when I reach the point where I can no longer keep the entire system in my head. That problem is something we’ve explicitly tried to avoid with jsxstyle. If the end result of jsxstyle was a pile of JS files full of object-syntax CSS, it would provide very little benefit over plain old CSS.
The trick is balance, I think. If you’re finding that you’re grow weary of naming things, perhaps you can group smaller named components into larger ones. Our objective with having a few generic stylable primitives is to save you from naming fatigue, not to reinvent it 😀
Anyways. Hope that makes sense.

Thanks for sharing.
Balance is obviously difficult :)
I'll post it when I have any feedback for media query.

authors: chenxsan meyer

repo: smyte/jsxstyle


text:
Provide tutorial for mars.name_cell_types

Hi, I am wondering if you could provide more guidance for how to generate interpretable names for discovered clusters by calling: mars.name_cell_types(adata, landmarks, cell_type_name_map).
This was not included in any available tutorial, and the help/comments in the source code are not detailed enough.

Hi! I now updated the code with better description.
Naming function takes as argument:

adata: anndata object returned by function train
landmarks: cell type landmarks also returned by function train
cell_type_name_map: dictionary with cell type name of previously seen cell types as key, and their cluster idx as value

This function will return dictionary with novel cell type cluster index as key and probabilities to all previously seen cell types as value.
You can check example of calling this function main_TM for Tabula Muris data.

Thanks for the quick reply! To my understanding, main_TM is the code for the leave-one-tissue-out analysis described in the Nature Methods manuscript?
And by using adata, landmarks, scores = mars.train(evaluation_mode=True) , scores are the performance scores?

authors: Winbuntu mbrbic

repo: snap-stanford/mars


text:
Mentioning a BSky bridged account on Mastodon links to a raw JSON file

I've linked  https://bsky.app/profile/openbenches.org to @openbenches.org@bsky.brid.gy
If I mention the new account on Mastodon, some users report that clicking on it results in being served a JSON file:

https://swiss.social/@darkcisum/113395660031030572
https://hachyderm.io/@http_error_418/113395644143499459

The raw HTML of my mention shows:

   @openbenches.org

Some apps (Fedilab) support clicking on that and showing the account properly. Others (Tusky) don't.
If I click on the link from the website I use, it works. If I click on a link from a different Mastodon instance, I get the JSON.

Should this be in https://github.com/snarfed/bridgy-fed/issues? Might be the same issue as #1429 there.
Due to a combination of known implementation decisions by Mastodon and Bridgy Fed, being redirected to the JSON response is what I would expect to see on servers where I'm not logged in (I can elaborate on this if needed). But oddly enough your mention shows a local profile to me on an anonymous mastodon.social tab, but redirects to the JSON in my own logged-in Mastodon web interface. 🤔 Strange stuff.

authors: edent jfietkau

repo: snarfed/bridgy


text:
Fixing Windows support by changing logdir to POSIX format

Using pathlib to change the logdir path to POSIX format. The change would make the shlex.split work properly, thus making it work on Windows, and it will still work on Linux.

I will create a new release on PyPI over the weekend :)

repo: snehankekre/streamlit-tensorboard


text:
[FATAL ERROR] Download didn't progress

Download didn't progress

Use a newer ffmpeg version. Also please run in CMD.exe or PowerShell, not in CygWin.

I've runed it in cad, but it seems not work, still no progress.

What ffmpeg version are you using. Try 4.3.1 or newer.
ffmpeg --version

I have the same issue. OS: windows 10
ffmpeg version 4.4
progress [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% 0 0s
[ERROR] FFmpeg returned an error:
[FATAL ERROR] Unknown FFmpeg error
Downloading Video: xxxxxxxxxxxxxxxxxx
[FATAL ERROR] Unknown FFmpeg error nd HLS URL. This may take a few seconds...
ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100

Try to get a different ffmpeg binary, something that doesn't come from www.gyan.dev

Try to get a different ffmpeg binary, something that doesn't come from www.gyan.dev

thanks, it works now.

authors: cnchehon snobu wbhinspector

repo: snobu/destreamer


text:
Using it in a middleware

Hi,
I have a middleware in place that logs requests, response time, etc, something like:

    @app.middleware("http")
    async def log_requests(request: Request, call_next):
        logger.info(f"Request: {request.method} {request.url.path}")
        start_time = time.time()
        response = await call_next(request)
        process_time = (time.time() - start_time) * 1000
        formatted_process_time = '{0:.2f}'.format(process_time)
        logger.info(f"Finished request in {formatted_process_time}ms with status: {response.status_code}")
        return response

After configuring the correlation id, I can see it working when using logger.info("Route") inside the route, but the middleware above won't log the ID. Is there a way to make it available in other middleware?
Thanks a lot!

Perfect, thanks a lot!
I added the (correlation-id) middleware and it works perfectly.
Thanks!

repo: snok/asgi-correlation-id


text:
Could You port it to asyncio?

https://github.com/kszucs/asyncpw
I've tried to use asyncpg (only postgres) as backend, but gut stuck.
Here is the diff: https://github.com/snower/torpeewee/compare/master...kszucs:master
There is no usable asyncio orm right now.

Already supported!

authors: kszucs snower

repo: snower/torpeewee


text:
configure file not executable

In the current gh version, pbdXGB/configure is not executable. The version on HPCRAN appears to be ok.

Done.

authors: snoweye wrathematics

repo: snoweye/pbdXGB


text:
Add optional deploy files argument

Pre-review checklist

[x] I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
[x] I've added or updated automated unit tests to verify correctness of my new code.
[x] I've added or updated integration tests to verify correctness of my new code.
[x] I've confirmed that my changes are working by executing CLI's commands manually.
[x] I've confirmed that my changes are up-to-date with the target branch.
[x] I've described my changes in the release notes.
[x] I've described my changes in the section below.

Changes description
Following up on #921, this PR adds the option to provide specific files to stage when running snow app deoply:
snow app deoply file1 dir/file2

If no files are specified, all files will be staged (existing behavior).
The file paths are assumed to be relative to the deploy root. There are arguments for using paths relative to the current working directory (mostly autocomplete), but since there are also drawbacks to this, and the deploy root is currently assumed to be cwd anyway, I went with the relative-to-deploy-root approach.
Absolute paths, directories and patterns are currently not supported.

An additional comment: your description states that the deploy root is CWD, but that's inaccurate, it's the project root that is current. Deploy root is typically a subdirectory of the project root. I still believe that falling back to look for files relative to the project root is a valuable addition to this command.

authors: sfc-gh-bdufour sfc-gh-gbloom

repo: snowflakedb/snowflake-cli


text:
SNOW-754383: [BUG] Issue for missing analyzer argument in SelectSnowflakePlan API.

https://github.com/snowflakedb/snowpark-python/blob/a15df2887eb3a09ec67d95c38fdddc4fd6eceb20/src/snowflake/snowpark/dataframe.py#L1752
In line 1752 and 1783, no analyzer is specified, so error occurs: init() missing 1 required keyword-only argument: 'analyzer'.
Please check this issue!

Hi @pivv This is a good catch. Thank you.
I can find a way to reproduce it. But could you share the code to reproduce the issue? I'm curious how your code hits the problem.

Hi @sfc-gh-yixie , thank you for your fast response.
To my best knowledge, this is the simplest code to reproduce the issue, though flatten API is now deprecated.
Assume that connection_parameters are verified.
from snowflake.snowpark import Session
session = Session.builder.configs(connection_parameters).create()
df = session.create_dataframe([(1, 1),(1, 2),(2, 1),(2, 2),(3, 1),(3, 2)], schema=["a", "b"])
df2 = session.create_dataframe([(1, [1]),(1, [2]),(2, [1]),(2, [2]),(3, [1]),(3, [2])], schema=["a", "blist"])
df2 = df2
.flatten(df2["blist"])
.withColumnRenamed("value", "b")
.select("a", "b")
df.intersect(df2).show()

authors: pivv sfc-gh-yixie

repo: snowflakedb/snowpark-python


text:
Missing dist-derivedconstants

In standard build, we will have multiple targets in includes/dist-derivedconstants, like includes_GHCCONSTANTS_HASKELL_VALUE (equals to includes/dist-derivedconstants/header/platformConstants).
They will be installed to /usr/local/lib/ghc-<version>/includes.
Related issue: https://github.com/snowleopard/hadrian/issues/219
Related make script: https://github.com/ghc/ghc/blob/master/includes/ghc.mk#L170

These files are built in _build/generated and can be copied from there to appropriate destination during installation. Note, we have the following installTargets in Rules/Generate.hs:
installTargets :: [FilePath]
installTargets = [ "inplace/lib/ghc-usage.txt"
                 , "inplace/lib/ghci-usage.txt"
                 , "inplace/lib/platformConstants"
                 , "inplace/lib/settings"
                 , "inplace/lib/template-hsc.h" ]

Also see copyRules which already copies inplace/lib/platformConstants:
copyRules = do
    "inplace/lib/ghc-usage.txt"      <~ "driver"
    "inplace/lib/ghci-usage.txt"     <~ "driver"
    "inplace/lib/platformConstants"  <~ generatedPath
    "inplace/lib/settings"           <~ "."
    "inplace/lib/template-hsc.h"     <~ pkgPath hsc2hs
    rtsBuildPath -/- "c/sm/Evac_thr.c" %> copyFile (pkgPath rts -/- "sm/Evac.c")
    rtsBuildPath -/- "c/sm/Scav_thr.c" %> copyFile (pkgPath rts -/- "sm/Scav.c")
  where
    file <~ dir = file %> copyFile (dir -/- takeFileName file)

Oh right, thanks a lot!
BTW, I guess I might need to modify inplace/lib part. I've written something equivalent to $(ghclibdir).
I will close the issue now.

authors: izgzhen snowleopard

repo: snowleopard/hadrian


text:
Add convenient methods for DeepLinkReceived event (close #474)

I've added a couple of factory methods to generate a DeepLinkReceived event from an Intent or a ReferrerDetails.
The Intent is provided by the Activity that receives the deep link. The developer can create the DeepLinkReceived event just passing the Intent.
Same for the ReferrerDetails. In this case the ReferrerDetails is generated by the Install Referrer Library that can be added as a dependency by the developer. We don't force this dependency and it's optional in the tracker.
Below the suggested documentation (that integrate the one in PR: https://github.com/snowplow/snowplow-android-tracker/pull/472)

Deep Linking
In the mobile world the Deep Links are url that links to a specific content directly in a mobile app. Usually they are used to redirect the user from a website or a banner-ad to the installed app instead of another web page. The Deep Links help the user to go straight to the content they are interested of inside the app, similarly to the navigation in the web.
Usually the Deep Link is received by the mobile operating system and passed to the related app. It's the responsability of the developer to parse the received deep-link's url and show the right content to the user. The way the Deep Link is used is strongly dependant by the way the app routing is implemented. For this reason, our mobile tracker can't automatically track the Deep Link, but we provide an out-of-the-box event that can be used by the developer to manually track it as soon as the Deep Link is received in the app. It will be duty of the tracker to automatically attach the informations of the Deep Link to the first ScreenView tracked.
The Android platform documentation provides clear instructions about how to declare the Deep Links that the app is able to handle. Following those instructions, to enable Deep Link support in your app you should declare an intent filter in your AndroidManifest.xml that sends the Deep Link to the selected Activity as an intent.
In practice, when the activity receives the Intent, the developer can track it through the DeepLinkReceived event.
For example (in your Activity):
@Override
public void onCreate(Bundle savedInstanceState) {
    ...

    // Extract info from Intent
    Intent intent = getIntent();
    String deepLinkUrl = intent.getData().toString();
    String referrer = null;
    Bundle extras = intent.getExtras();
    if (extras != null) {
        Uri referrerUri = extras.get(Intent.EXTRA_REFERRER);
        if (referrerUri != null) {
            referrer = referrerUri.toString();
        }
    }
    // Create and track the event
    DeepLinkReceived event = new DeepLinkReceived(deepLinkUrl).referrer(referrer);
    tracker.track(event);

    ...
}

It's also possible to use the factory method fromIntent that directly generates the DeepLinkReceived event from an Intent passed.
@Override
public void onCreate(Bundle savedInstanceState) {
    ...

    // Generate event directly from an Intent
    Intent intent = getIntent();
    DeepLinkReceived event = DeepLinkReceived.fromIntent(intent);
    // Create and track the event
    if (event != null) {
         tracker.track(event);
    }

    ...
}

The deep link can be received by an already installed app. In case the developer wants to receive a deep link of a fresh installed app, they have to use the Install Referrer Library which can provide the original deep link url.
The Install Referrer Library is an Android standard library that can be instrumented as explained here. The Snowplow Android tracker doesn't force this dependency so the developer has to add the dependency on gradle:
dependencies {
    ...
    implementation("com.android.installreferrer:installreferrer:2.2")
}

The ReferrerDetails will be accessible as explained here. In there you can generate the DeepLinkReceived event and track it.
@Override
    public void onInstallReferrerSetupFinished(int responseCode) {
        switch (responseCode) {
            case InstallReferrerClient.InstallReferrerResponse.OK:
                ...
                // Generate event directly from an ReferrerDetails
                ReferrerDetails referrerDetails = referrerClient.getInstallReferrer();
                DeepLinkReceived event = DeepLinkReceived.fromReferrerDetails(referrerDetails);
                // Create and track the event
                if (event != null) {
                    tracker.track(event);
                }
                ...

Every time a DeepLinkReceived event is tracked, the tracker keeps memory of the tracked Deep Link url and will attach a Deep Link entity to the first ScreenView tracked in the tracker.
This is helpful during the analysis of the data because it will be clear the relation between the content visualized by the user (ScreenView event) and source (DeepLink entity) that originated that visualization.
This behaviour is enabled by default but it can be disabled from the TrackerConfiguration.
For example:
TrackerConfiguration config = new TrackerConfiguration()
    ...
    .deepLinkContext(false)
    ...

Thanks for your pull request. Is this your first contribution to a Snowplow open source project? Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://docs.snowplowanalytics.com/docs/contributing/contributor-license-agreement/ to learn more and sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.

A similar issue about the topic (noticed now): https://github.com/snowplow/snowplow-android-tracker/issues/249

authors: AlexBenny snowplowcla

repo: snowplow/snowplow-android-tracker


text:
Send focus_form 'type' field as 'elementType'

Change form and focus form events collect the same data and are tracked via the same method. Currently the schema for focus_form events has an elementType field but no type field, where the change form event uses type - resulting in legitimate events going to bad rows.
Minor schema upgrade should fix this issue.

The more pragmatic solution is to have the tracker conform to the existing schema - renamed issue to suit

repo: snowplow/snowplow-javascript-tracker


text:
No basic auth requested for /iglu-server endpoint

After spinning up a new instance and accessing http://<ip>/iglu-server/ directly, Swagger interface appears without requesting for any authentication.
See screenshot.

Since private schemas on the iglu server can be accessed with api key only and iglu server can have public schemas, iglu-server endpoint did not included to the endpoints which accessed with http auth. This is expected behaviour.

Can confirm behaviour - private schemas only accessible with valid API key.
Closing.

authors: aldemirenes ungn

repo: snowplow/snowplow-mini


text:
aggiunta ingredienti

aggiunti ingredienti torta cuore con lista puntata

Spettacolo! :+1:

authors: blumele olistik


text:
api crashed when I upload object

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:
/kind bug

What happened:
I tried to upload an object more than 16MB, and api service crashed:

What you expected to happen:
api service runs normally.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

Gelato(release/branch) version:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

It's already fixed. So closing

repo: sodafoundation/multi-cloud


text:
Jest did not exit one second after the test run has completed

Hi!
In my current setup I'm using the following versions
"scripts": {
	"test": "vite-jest",
},
"devDependencies": {
	"jest": "^27.4.3",
	"jest-environment-jsdom": "^27.4.3",
	"vite": "^2.7.1",
	"vite-jest": "^0.1.4"
}

My test runs fine and everything passes, but after that, I get the following message:
Ran all test suites.
Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

And the process just hangs.
This is fine for local development (I can just CTRL+C), but it freezes my CI pipeline.

I made it work by adding the option --forceExit
-	"test": "vite-jest",
+	"test": "vite-jest --forceExit",

You can close this issue if you want. 🙂

I'm having the same issue. '--forceExit' works, but does not feel like a very good long-term solution

Agreed, according to the --detectOpenHandles it's saying that it's related to esbuild. Don't know why or how to fix it but thought I'd post it here.
Jest has detected the following 2 open handles potentially keeping Jest from exiting:

  ●  MESSAGEPORT

      at startWorkerThreadService (../../node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1978:48)
      at Object.buildSync (../../node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1757:29)

  ●  WORKER

      at startWorkerThreadService (../../node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1979:16)
      at Object.buildSync (../../node_modules/.pnpm/esbuild@0.13.15/node_modules/esbuild/lib/main.js:1757:29)

authors: Aapzu BenjaBobs rszemplinski

repo: sodatea/vite-jest


text:
feat: add WithDateTimeKind to builder

this adds support for using different date time kinds. this is actually an extension in my lifesupport lib and not a feat in the OG autobogus, so will want to keep that in mind when we get to docs

Thank you! 🎉


text:
Close issue #866 softlayer/sl-ember-components#866

Fixed the typo 'inpus' in the sl-date-range-picker documentation

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io

authors: Yogeswar notmessenger

repo: softlayer/sl-ember-components