text:
Adding 3 new features for this program

Hi, I'm interested to add 3 new features for this program. :) :)

Make a GUI for this program
Inside GUI, add start speed test button instead of starting speed test directly when you run the program & add pop up message to let user know when the speed test is finished
Save the result data on a text format file within same directory of speedtest.py

I already did this

I have no plans of implementing 1 and 2 here.  3 can roughly be done by just piping the output to a file.

repo: sivel/speedtest-cli


text:
small ML to guide the tool

you can add small ML to guide the tool like
tool will discover the target
then tool will detect interesting parameters like ?id=
then tool send to the parameter some requests by curl for get status code 500
then use automation like ghuari for exploit it

I was thinking about this as well but you really need an LLM spesifically rained for security testing as well as somewhere to host it and run it (which would require trmendous ammounts of GPU power). It will also make the process significantly slower as well.
Unless some cheap hosted security trained models arise , this seems extreme innefficient at the moment.

source: gharchive/issue

authors: Zierax kleozzy

license: MIT

license_type: permissive

license_source: github-api


text:
Add .md to temporary file suffix

This shows how we can add syntax highlighting to the temporary files,
but isn't super flexible.
This begs the question of how we should be doing "configuration" to not?
I.e., should we force .md? Should we look for ~/.not_config and let
people specify suffix there?

merged, in an albeit hacky way https://github.com/sixninetynine/not/commit/1af414c9a446978003a7d159bbaccf2c0afc073d
woo!

source: gharchive/pull-request

authors: sholsapp sixninetynine

repo: sixninetynine/not

license: mit

license_source: bigquery


text:
API response returns tab character in subject

I have a problem when I call the api. I'm using .NET Mimekit library and a mailcatcher:latest docker image. The thing is I need to get
the subject but when making a request to "/messages/:id.json" it comes with a tab character in it. And after deserializing it with Newtonsoft it's still there.
I think it's because of how mailcatcher displays de subject in the UI leaving a tab at the start of each line of a header when it's folded.

I've also build a new mailcatcher docker image using ruby.mail version 2.7.1 but still happens. I would like for that tab character not to be there after unfolding the header.

Thanks for the report!
Could you please provide an email that replicates the issue when delivered?

Yeah that seems to replicate.
220 EventMachine SMTP Server
EHLO domain
250-Ok EventMachine SMTP Server
250-NO-SOLICITING
250 SIZE 20000000
MAIL FROM: user@domain.com
250 Ok
RCPT TO: user@domain.com
250 Ok
DATA
354 Send it
From: user@domain.com
Subject: This is the subject of an email testing the tab character in the
	subject when is too long and has to be folded
To: user@domain.com
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"

This is the body.

.
250 Message accepted

[{"id":1,"sender":"user@domain.com","recipients":["user@domain.com"],"subject":"This is the subject of an email testing the tab character in the\tsubject when is too long and has to be folded","size":"254","created_at":"2021-08-04T11:26:31+00:00"}]

RFC5322 describes long header treatment in section 2.2.3. Headers are unfolded by removing any CRLF in a header value, but preserves whitespace. It seems like both the smtp and mail parsers are behaving to specification here, and mail clients will do the same thing. I don't think this is a bug.

But when I create the message I´m not inserting any tab character in the subject. So I guess that tab character shouldn't be there in the first place. And if I send that message to a gmail or hotmail account, in their UIs its folded form is displayed without a tab character but with a CRLF and a space character, like this:
Subject: This is a long
 subject

So when I get its unfolded form, the CRLF is removed just like RFC5322 specifies, leaving the space character that separates the words "long" and "subject". So everything fine there. That's why I opened this issue, because the problem happens only with mailcatcher so far.

How are you sending mail to mailcatcher? Whatever library or client you are using must be folding your subject and inserting tabs?
I’d suggest squishing white space and/or replacing tabs with spaces is a presentational concern. Wherever you’re presenting the subject might need to be able to do this, for compatibility with the spec?

Sorry, I think mailcatcher is behaving correctly and according to spec here.

Yeah sorry. I tried looking up at the email to see if the library I'm using is inserting the tab character before sending it, but found nothing. The subject is fine before being sent, so I don't really know who or what is doing that.
Either way, thank you for the quick replies.


text:
How to use DiagGaussianDistribution? the default is CategoricalDistribution

Hi, I am training my multi-agent  environment (continuous action, continuous observation) with PSRO+PPO in branch "policy-support-baseline", see the paper Emergent Complexity via Multi-agent Competition for the specific environment. I found that  in Policy's probability distribution, if the action space is continuous, a DiagGaussianDistribution is returned. see distribution.py ,line 876. But here on line 125 of malib/rl/pg/policy.py the default here is to use CategoricalDistribution (because only proba_distribution of the CategoricalDistribution class has the action_mask parameter),see the figure below. How do I use DiagGaussianDistribution? Can the logits obtained in the figure, line 122, help me to use it? I am looking forward to read your answer, thank you!

@donotbelieveit a good question, you can try to override this function with DiagGaussianDistribution as your dist_fn

how do I get parameters "mean_actions" and "log_std" that DiagGaussianDistribution need?is there any suggestions

how do I get parameters "mean_actions" and "log_std" that DiagGaussianDistribution need?is there any suggestions

the mean_actions and log_std should be the outputs our your policy outputs.

thank you for replying me!I am a second year student in UCAS,looking forward to having more communication with you about the use of the framework.

authors: KornbergFresnel donotbelieveit

repo: sjtu-marl/malib


text:
Bitbucket:637 更新履歴の元ファイルがでかすぎるので分割したい

テキストファイルとしては別にーなんだけど開いてちょっと修正する際に下が邪魔。

BitBucket から移植

項目
内容

元課題
#637

起票日時
2020-05-17T11:42:19Z

起票者
sk_0520

resolved #637
→ 《cset 01ee026a1a40》

BitBucket から移植

項目
内容

元コメント
#637 コメント

コメント日時
2020-05-17T16:48:29Z

コメントユーザー
sk_0520

license: WTFPL


text:
Altering datetime defaults causes panic

Describe the bug
I'm trying to alter a datetime column, that has DEFAULT NULL and nothing else, to have CURRENT_TIMESTAMP as DEFAULT and ON UPDATE.
Environment

Skeema version and OS:

skeema version 1.11.1-community
commit d637ed77fa1fe1f82f8fdd982740b99f754cf2d5, released 2023-12-04T22:50:03Z
Running on MacOS

Database vendor, version, OS/platform: MySQL 5.7.12-log (select version();) on RDS
Any other environmental notes or special configuration: ENGINE=InnoDB DEFAULT CHARSET=utf8

To Reproduce

skeema pull production - No file system changes, already up to date
Change updated_at datetime DEFAULT NULL, to updated_at datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
skeema diff production (--debug)

General warnings Docker images for mysql:5.7 are not available. Substituting

Debug output:
2024-03-08 12:13:45 [DEBUG] goroutine 249 [running]:
                            runtime/debug.Stack()
                                /opt/hostedtoolcache/go/1.21.4/x64/src/runtime/debug/stack.go:24 +0x64
                            main.panicHandler()
                                /home/runner/work/skeema/skeema/exit.go:150 +0x114
                            panic({0x102c40a60?, 0x102e325d0?})
                                /opt/hostedtoolcache/go/1.21.4/x64/src/runtime/panic.go:914 +0x218
                            github.com/skeema/skeema/internal/applier.CreatePlanForTarget(0x14000386630,
                            0x14000384090?, {0x1, 0x2, 0x0, {0x0, 0x0}, {0x0, 0x0}, 0x0, ...})
                                /home/runner/work/skeema/skeema/internal/applier/applier.go:318 +0x7d0
                            github.com/skeema/skeema/internal/applier.ApplyTarget(0x14000386630, {0x102c91fb8,
                            0x14000125200})
                                /home/runner/work/skeema/skeema/internal/applier/applier.go:164 +0x4bc
                            main.PushHandler.func1()
                                /home/runner/work/skeema/skeema/cmd_push.go:121 +0xe8
                            golang.org/x/sync/errgroup.(*Group).Go.func1()
                                /home/runner/work/skeema/skeema/vendor/golang.org/x/sync/errgroup/errgroup.go:75 +0x58
                            created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
                                /home/runner/work/skeema/skeema/vendor/golang.org/x/sync/errgroup/errgroup.go:72 +0x98

2024-03-08 12:13:45 [ERROR] Uncaught panic in github.com/skeema/skeema/internal/applier.CreatePlanForTarget at
                            /home/runner/work/skeema/skeema/internal/applier/applier.go:318: runtime error: invalid
                            memory address or nil pointer dereference
                            This situation indicates a bug in Skeema. Use --debug to view full stack trace.
                            Please file an issue report at https://github.com/skeema/skeema/issues with any available
                            background information.

Expected behavior
It should generate the diff
Additional context
Sample table
CREATE TABLE `mytable` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `field1` varchar(20) NOT NULL,
  `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

This is the exact same issue you just reported in #226. Again, under these exact conditions you will get an uncaught panic:

Target database server is running MySQL 5.7 (or anything before MySQL 8)
Client machine is a recent Mac (Apple Silicon / ARM CPU)
Skeema is configured to use workspace=docker
At least one table has a column (anywhere in your schema) that uses the legacy 3-byte utf8 character set

It does not matter what is in the diff. If these conditions are true you will get a panic from skeema diff or skeema push, it's the exact same cause as already discussed in your other issue.

Ah ok, thanks, didn't realise it was related, sorry! It's against a different database that doesn't have the 0900 collation, so I assumed it was different.

authors: evanelias rkorebrits-paystack

repo: skeema/skeema


text:
content gets overridden on elfeed-search-fetch

I've added a function to elfeed-new-entry-hook that adds some metadata and overrides the default content.  If I run elfeed-search-fetch (press G) some time later it resets the content of all already existing entries to it's original state (though as expected the things I've set in meta stay the same).
I'm not sure if this is intended behavior.
If so what would be the best way to get around this?

As a general rule, information provided by the feed is kept in sync with
the feed. This includes title, date, and content. That's why if you want
a custom title displayed in elfeed-search, you set the metadata :title
slot. This is local — i.e. not supplied by the feed itself — so it
doesn't get synced / overridden during updates. It's useful because
elfeed-search knows to use it instead of the original title when it's
non-nil.
The same could be extended to content via a :content metadata slot. For
this to completely work, it would require support from elfeed-search (to
choose it instead of the original content) and the database garbage
collector (treat :content, if not all metadata slots, as a GC roots).
There's nothing stopping you from using a :content metadata slot now
except for those two reasons.

Thanks for the quick answer, especially pointing me towards the garbage collector has likely saved me a lot of time/headache.
Would it be sensible to make the GC process check the whole entry for refs by default? (I suppose "indirect" references like images would still be collected/removed that way)
Not sure how much of a performance impact that would be on bigger feeds. (though I suppose it shouldn't make much of a difference)
Other than that I consider this issue solved.

I ran into this issue as well, and after considering a few solutions, I think I found one that could work.
The idea is that elfeed would expose a list of functions (technically a hook) that are each passed an entry and must return an elfeed-ref or a list of elfeed-refs, which are counted as being in use by elfeed-db-gc.
Heres an example of what I mean:
(defvar elfeed-db-gc-trace-functions nil
  "A list of functions called to determine which elfeed-refs are reachable.
Each function is called with an elfeed-entry and should return a
single elfeed-ref or a list of them, which will be considered in
use by `elfeed-db-gc'.")

(defun elfeed-db-gc (&optional stats-p)
  "Clean up unused content from the content database.
If STATS is true, return the space cleared in bytes."
  (elfeed-db-gc-empty-feeds)
  (let* ((data (expand-file-name "data" elfeed-db-directory))
         (dirs (directory-files data t "^[0-9a-z]\\{2\\}$"))
         (ids (cl-mapcan (lambda (d) (directory-files d nil nil t)) dirs))
         (table (make-hash-table :test 'equal)))
    (dolist (id ids)
      (setf (gethash id table) nil))
    (with-elfeed-db-visit (entry _)
      (let ((content (elfeed-entry-content entry))) ;this is left hardcoded in
        (when (elfeed-ref-p content)
          (setf (gethash (elfeed-ref-id content) table) t)))
      ;; NEW STUFF
      (dolist (trace-function elfeed-db-gc-trace-functions)
	(let ((refs (funcall trace-function entry)))
	  (unless (listp refs)
	    (setf refs (list refs)))
	  (dolist (ref refs)
	    (when (elfeed-ref-p ref)
	      (setf (gethash (elfeed-ref-id ref) table) t))))))
     ;;END OF NEW STUFF
    (cl-loop for id hash-keys of table using (hash-value used)
             for used-p = (or used (member id '("." "..")))
             when (and (not used-p) stats-p)
             sum (let* ((ref (elfeed-ref--create :id id))
                        (file (elfeed-ref--file ref)))
                   (* 1.0 (nth 7 (file-attributes file))))
             unless used-p
             do (elfeed-ref-delete (elfeed-ref--create :id id))
             finally (cl-loop for dir in dirs
                              when (elfeed-directory-empty-p dir)
                              do (delete-directory dir)))))

I think its worth leaving elfeed-entry-content hardcoded in as a GC root (as opposed to having it being the default value of elfeed-gc-functions) so if elfeed-gc-functions gets set to nil by accident the user won't lose all their old entry contents (like I did while testing this out), and if they really want to delete all the old contents, they can just run this:
(with-elfeed-db-visit (entry _)
  (setf (elfeed-entry-content entry) nil))

(elfeed-db-gc)  ;; garbage collect everything

which i found in this neat blog post.
As for the other block, elfeed-show-refresh-function already exists, which has been more than customizable enough for my needs.

repo: skeeto/elfeed

license: unlicense


text:
Access to D: drive (secondary drive) denied on windows

Hello,
I am facing an issue with the fortran w64devkit .exe. I am running it on windows 10, and inside the terminal I try to access the d: drive, because that's where my projects are located, but I always get a permission denied error. I have tried running in administrator mode, and running from inside an admin cmd (sh -l). Both methods didn't work.

Would appreciate help in solving this.
Thanks in advance.

Have you tried cd D:/ ?

The w64devkit shell is busybox-w32 ash, a POSIX shell, which behaves
differently than cmd.exe. To change drives, "cd d:" just like you would
any other directory change. Changing the current drive isn't a special
case operation. When you type "d:" you're (I think) telling the shell to
execute the drive like a program. Since you can't execute a drive, it
fails with the error translated to a permission error.

Oh, it worked. Silly mistake.
Thanks a lot!

From: Christopher Wellons @.>
Sent: Wednesday, June 19, 2024 1:16:54 AM
To: skeeto/w64devkit @.>
Cc: Yaser @.>; Author @.>
Subject: Re: [skeeto/w64devkit] Access to D: drive (secondary drive) denied on windows (Issue #139)
The w64devkit shell is busybox-w32 ash, a POSIX shell, which behaves
differently than cmd.exe. To change drives, "cd d:" just like you would
any other directory change. Changing the current drive isn't a special
case operation. When you type "d:" you're (I think) telling the shell to
execute the drive like a program. Since you can't execute a drive, it
fails with the error translated to a permission error.
—
Reply to this email directly, view it on GitHubhttps://github.com/skeeto/w64devkit/issues/139#issuecomment-2176989939, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGCBNA6MRC364VQIVBWFS6LZICPUNAVCNFSM6AAAAABJQZGCMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWHE4DSOJTHE.
You are receiving this because you authored the thread.Message ID: @.***>

When you type "d:" you're (I think) telling the shell to execute the drive like a program.

Actually, D: refers to the current directory of drive D. If you haven't visited D before it'll be the top-level directory of the drive (D:/). The effect is much the same: you can't execute a directory so the command fails.
Paths of the form D:path (note, no slash after the colon) are relative to the current directory of the drive.
For more about this and how busybox-w32 handles paths see my pathnames webpage.

Thanks for the info, Ron. I didn't know some of this, and it's very
helpful!

authors: YaserAlOsh grable0 rmyorston skeeto

license: Unlicense


text:
NEXT Date Picker and Date Handling

[!WARNING]
This issue is a work in progress.

This will act as a hub to centralize this information.
Maintainer Requests
The following requests are coming straight from the Skeleton team. These are highly likely be implemented:

[ ] Review: https://date-fns.org/
[ ] Review: https://react-day-picker.js.org/

Community Requests
The following requests have come from the community and are under consideration:

https://github.com/skeletonlabs/skeleton/issues/1452

Bugs and Issues

n/a

Feedback
If you have additional updates or requests for this feature, please do so in the comments section below.

Haven't used day picker yet, but date-fns is my current go to for Date Functionalities.

bits datepicker integrates very well with Skeleton.

https://vanilla-calendar.pro/

authors: Sarenor dagassa endigo9740 riziles

repo: skeletonlabs/skeleton


text:
fix: compile error without header

A trivial compile erro on my arm64 machine with gcc 12.2.1 master@cd1e6ddf7:
[  8%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o
[ 16%] Linking C static library libggml.a
[ 16%] Built target ggml
[ 25%] Building CXX object CMakeFiles/bert.dir/bert.cpp.o
/home/wesley/WorkPlace/chatGPT/bert.cpp/bert.cpp: In function ‘std::string stripAccents(const std::string&)’:
/home/wesley/WorkPlace/chatGPT/bert.cpp/bert.cpp:215:10: error: ‘unordered_map’ is not a member of ‘std’
  215 |     std::unordered_map<std::string, char> accentMap = {{"À", 'A'},{"Á", 'A'},
      |          ^~~~~~~~~~~~~
/home/wesley/WorkPlace/chatGPT/bert.cpp/bert.cpp:17:1: note: ‘std::unordered_map’ is defined in header ‘<unordered_map>’; did you forget to ‘#include <unordered_map>’?
   16 | #include <algorithm>
  +++ |+#include <unordered_map>

Hi, thanks. I think I'm going to remove the unordered map soon.

authors: lindeer skeskinen


text:
Release please? Readme documentation does not match version

Hi,
I was trying to use the plugin, but it seems that 0.91 -the version mentioned in the documentation- is old and does not match the information in the Readme file. I cannot seem to find a newer version anywhere or snapshots?
Thanks!

The problem is avro4s is no longer shipped for scala 2.10 and sbt needs a scala 2.10 version.

sbt-avro4s only depends on avro4s-generator, though, which compiles fine under 2.10.6 afaict. Can just that package be published be as 2.10?

Fair point.

The whole generator can probably just move in here.

authors: SohumB siliconcat sksamuel


text:
The only variable as input should be the target which is part of time_varying_unknown_reals

My data set has : time_idx, Date, Ticker, Open, high, low, close, Stock split and Dividends.
My Time series data set is:
training = TimeSeriesDataSet(
combined_data[lambda x: x.time_idx <= training_cutoff],
time_idx="time_idx",
target="Close",
group_ids=["Ticker"],
max_encoder_length=60,
max_prediction_length=7,
static_categoricals=["Ticker"],
time_varying_known_reals=["time_idx", "Open", "High", "Low", "Volume", "Stock Splits", "Dividends"],
time_varying_unknown_reals=["Close"],
allow_missing_timesteps=True,
target_normalizer=GroupNormalizer(
groups=["Ticker"], transformation="softplus"
),
add_relative_time_idx=False,
add_target_scales=True,
add_encoder_length=True,
)

I get this error, when I run this :
Define the model with the suggested hyperparameters
model = NBeats.from_dataset(
    training,
    learning_rate=learning_rate,
    hidden_size=hidden_size,
    widths=widths,
    backcast_loss_ratio=backcast_loss_ratio,
    dropout=dropout
)

I see the data set has reals like encoder_length, Close_min, close_scaled and all time varying known reals I gave in the data set.
I tried removing all the reals, still I get the error as number of reals are encoder, and Close related variables. I cannot not give encoder length. Issue arise from this piece of code:
assert (
len(dataset.flat_categoricals) == 0
and len(dataset.reals) == 1
and len(dataset.time_varying_unknown_reals) == 1
and dataset.time_varying_unknown_reals[0] == dataset.target
), "The only variable as input should be the target which is part of time_varying_unknown_reals"

Can someone please update on this issue as soon as possible?

Currently, only Nbeats is implemented and not the extension NBeatsx.
See this issue for more information: https://github.com/sktime/pytorch-forecasting/issues/471

repo: sktime/pytorch-forecasting


text:
Feature/vcx v3 delete credential

Developed a new API that deletes a credential from the wallet and in the memory.
It only takes care of the Aries protocol (V3).
For now, I implemented the Java wrapper only.

Suggestion

get_credential() 함수 처럼 테스트 코드가 있으면 원할하게 PR되는데 도움되지 않을까 싶습니다~

authors: airoasis chaeso

repo: sktston/indy-sdk


text:
bug/docs: remove reference to page packs from CLI docs

The CLI docs make reference to page packs which appears to only be a supported feature for Skuid SFX per the documentation here.
References to page packs should be eliminated from skuid-cli docs since it only supports NLX per the this comment in #183.

Addressed in the same fix as this thread:
https://github.com/skuid/skuid-cli/issues/183#issuecomment-2307322348

authors: itmightbecody techfg

repo: skuid/skuid-cli


text:
Pulsar operator is not parsing docker repository correctly

Hi,
I have  a following CR spec:
Spec:
  Auto Recovery:
    Image:
    Pod:
      Components:
    Size:  3
  Bookie:
    Image:
      Pull Policy:             Always
      Repository:              10.108.43.202:8082/path/to/pulsar-all
      Tag:                     latest
    Journal Storage Capacity:  1
    Ledgers Storage Capacity:  1
    Pod:
      Components:
    Size:                1
    Storage Class Name:  standard
  Broker:
    Image:
      Pull Policy:  Always
      Repository:   10.108.43.202:8082/path/to/pulsar-all
      Tag:          latest
    Pod:
      Components:
    Size:  1
  Manager:
    Enable:  true
    Image:
      Pull Policy:  Always
      Repository:   10.108.43.202:8082/path/to/pulsar-manager
      Tag:          latest
    User Name:      pulsar
    User Password:  pulsar
  Monitor:
    Grafana:
    Ingress:
    Prometheus:
  Proxy:
    Image:
      Pull Policy:  Always
      Repository:   10.108.43.202:8082/path/to/pulsar
      Tag:          latest
    Pod:
      Components:
    Size:  1
  Zookeeper:
    Image:
      Pull Policy:  Always
      Repository:   10.108.43.202:8082/path/to/pulsar-all
      Tag:          latest
    Pod:
      Components:
    Size:  1

Note that docker registry is running at private IP 10.108.43.202:8082
However when starting the bookie pod I see the following errors:
  Warning  InspectFailed  5m32s (x13 over 7m46s)  kubelet, minikube  Failed to apply default image tag ":": couldn't parse image reference ":": invalid reference format
  Warning  Failed         2m44s (x26 over 7m46s)  kubelet, minikube  Error: InvalidImageName

I think if registry is running at some port, it is not able to parse the repo correctly.
Also note that proxy, zookeeper and manager are all running correctly, so issue seems only with bookie.

Can you take a look at bookie's YAML details for the Pod and see if the mirror address in the Pod is correct？

Unfortunately I don't have this detail now, I decided to run docker registry at port 80 and referenced the image without port and all worked fine. So issue seems to be with port only and that too only for bookie.
I doubt docker image address on pod would have been correct, I think it had : in place of tag.
What I suspect is that it maybe parsing the repository to check for : and if it finds a value for it, it assumes that's the image tag.
Since in this case supposedly parsed tag is a port number and not a valid tag, we get that error.

I am also having a problem with the bookie image name:
k logs jericho-pulsarcluster-bookie-autorecovery-deployment-746772srbv
Error from server (BadRequest): container "replication-worker" in pod "jericho-pulsarcluster-bookie-autorecovery-deployment-746772srbv" is waiting to start: InvalidImageName
I am running on EKS with :
apiVersion: pulsar.apache.org/v1alpha1
kind: PulsarCluster
metadata:
name: jericho-pulsarcluster
spec:
zookeeper:
size: 3
autoRecovery:
size: 3
bookie:
size: 3
storageClassName: "gp2"
journalStorageCapacity: 10
ledgersStorageCapacity: 10
broker:
size: 3
proxy:
size: 3
monitor:
enable: true
prometheusPort: 30002
grafanaPort: 30003
ingress:
enable: true
annotations:
kubernetes.io/ingress.class: "nginx"
manager:
enable: true
annotations:
kubernetes.io/ingress.class: "nginx"

Could you please provide the Yaml information of this Pod 'Jericho - Pulsarclub-Bookie - Autorecovery-Deploy-746772SRbv'?
For example 'Kubectl get POD Jericho - Pulsarclub-Bookie - Autorecovery-Deploy-746772srBV-O Yaml' post the results. @rfinner

k logs example-pulsarcluster-bookie-autorecovery-deployment-c79b4rsv8c
Error from server (BadRequest): container "replication-worker" in pod "example-pulsarcluster-bookie-autorecovery-deployment-c79b4rsv8c" is waiting to start: InvalidImageName

apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/psp: eks.privileged
creationTimestamp: "2020-09-11T16:41:04Z"
generateName: example-pulsarcluster-bookie-autorecovery-deployment-c79b476d9-
labels:
app: pulsar
cluster: example-pulsarcluster
component: autoRecovery
pod-template-hash: c79b476d9
name: example-pulsarcluster-bookie-autorecovery-deployment-c79b4rsv8c
namespace: default
ownerReferences:

apiVersion: apps/v1
blockOwnerDeletion: true
controller: true
kind: ReplicaSet
name: example-pulsarcluster-bookie-autorecovery-deployment-c79b476d9
uid: 6418301e-2f05-4ec5-b909-8a71cb19e644
resourceVersion: "3905968"
selfLink: /api/v1/namespaces/default/pods/example-pulsarcluster-bookie-autorecovery-deployment-c79b4rsv8c
uid: 191c39d3-3594-4600-90ad-2f8ba8c2e9ac
spec:
containers:
args:

bin/apply-config-from-env.py conf/bookkeeper.conf && bin/bookkeeper autorecovery
command:
sh
-c
env:
name: BOOKIE_MEM
value: '" -Xmx256m "'
name: PULSAR_GC
value: '"  "'
envFrom:
configMapRef:
name: example-pulsarcluster-bookie-configmap
image: ':'
imagePullPolicy: IfNotPresent
name: replication-worker
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-9qgpn
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
nodeName: ip-192-168-57-243.us-west-2.compute.internal
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:

effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
name: default-token-9qgpn
secret:
defaultMode: 420
secretName: default-token-9qgpn
status:
conditions:
lastProbeTime: null
lastTransitionTime: "2020-09-11T16:41:04Z"
status: "True"
type: Initialized
lastProbeTime: null
lastTransitionTime: "2020-09-11T16:41:04Z"
message: 'containers with unready status: [replication-worker]'
reason: ContainersNotReady
status: "False"
type: Ready
lastProbeTime: null
lastTransitionTime: "2020-09-11T16:41:04Z"
message: 'containers with unready status: [replication-worker]'
reason: ContainersNotReady
status: "False"
type: ContainersReady
lastProbeTime: null
lastTransitionTime: "2020-09-11T16:41:04Z"
status: "True"
type: PodScheduled
containerStatuses:
image: ':'
imageID: ""
lastState: {}
name: replication-worker
ready: false
restartCount: 0
started: false
state:
waiting:
message: 'Failed to apply default image tag ":": couldn''t parse image reference
":": invalid reference format'
reason: InvalidImageName
hostIP: 192.168.57.243
phase: Pending
podIP: 192.168.38.109
podIPs:
ip: 192.168.38.109
qosClass: BestEffort
startTime: "2020-09-11T16:41:04Z"

image: ':'
imagePullPolicy: IfNotPresent

i also have same problem with the most simple of configs: apiVersion: pulsar.apache.org/v1alpha1
kind: PulsarCluster
metadata:
name: example-pulsarcluster
spec:
zookeeper:
size: 3
autoRecovery:
size: 3
bookie:
size: 3
broker:
size: 3
proxy:
size: 3

The 2.5.0 image seems to work fine and so maybe this has something to do with the latest version?
This deployment worked for me:
apiVersion: pulsar.apache.org/v1alpha1
kind: PulsarCluster
metadata:
name: example-pulsarcluster
spec:
autoRecovery:
size: 1
image:
repository: apachepulsar/pulsar-all
tag: 2.5.0
pullPolicy: Always
bookie:
size: 1
image:
repository: apachepulsar/pulsar-all
tag: 2.5.0
pullPolicy: Always
broker:
size: 1
image:
repository: apachepulsar/pulsar-all
tag: 2.5.0
pullPolicy: Always
proxy:
size: 1
image:
repository: apachepulsar/pulsar-all
tag: 2.5.0
pullPolicy: Always
zookeeper:
size: 1
image:
repository: apachepulsar/pulsar-all
tag: 2.5.0
pullPolicy: Always
monitor:
enable: true
prometheus:
nodePort: 30006
grafana:
nodePort: 30007

After more testing I discovered that docker pull apachepulsar/pulsar-all:2.6.0 and 2.6.1 are not working with this operator but 2.5.2 seems to be working.

authors: rfinner sjmittal sky-big

repo: sky-big/pulsar-operator


text:
K8s: add nodes via k8s probe if do not already exist

@lebauce - Added creation of a node item directly from k8s probe, given that this competes with the agent generated node, it will only add/update if an agent created node does not exist. To test you can fireup a k8s and view that even without an agent installed within the host (on which the pods are running) you still get a node element (double-clicking with expose the pods).

Just a really quick review as I'm (supposed to be) on vacation :-)
I'm ok with creating for discovering Kubernetes nodes. We need to be careful though as it's a bit special type of nodes (I'm thinking about HostGraphDeleted messages when a 'host' disappears).
In the case where the K8s are running a Skydive agent but are discovered by K8S first, we need to make sure that the Metadata set by the 'k8s' probe are not overriden (same thing if the 'host' node is seen first)

@lebauce - the HostGraphDeleted message is a challenge and will delete pods, containers and of-course host (with our k8s metadata) for now when the agent initializes such a message we will loose any accumulated data/metadata - this is not ideal - but that said anything re-created after the delete will appear. To solve this we would need either to periodically re-create k8s elements from cached data, or track which agent (such as host-agent, analyzer, etc.) added any specific graph element, and thus restrict HostGraphDeleted to the elements added by the agent issuing the request ... but in any case this is orthogonal to the change and can be delayed for a future PR.
As to not overriding fields that the agent added, as explained I no longer blindly overwrite the node metadata in case it already exists.

In any case will close this PR and use a different PR to handle the changes.

authors: hunchback lebauce

repo: skydive-project/skydive


text:
Buffer overflow in appendData_Block in the_Foundation

I can reproduce an immediate SIGSEGV about 40% of the time when starting lagrange on NetBSD.
Program terminated with signal SIGSEGV, Segmentation fault.

#0  appendData_Block (d=0x7aead377d510, data=0x7aead1b6c600, size=1440)
    at /home/nia/git/lagrange/lib/the_Foundation/src/block.c:370
370         d->i->data[d->i->size] = 0;
[Current thread is 1 (process 6679)]
(gdb) bt
#0  appendData_Block (d=0x7aead377d510, data=0x7aead1b6c600, size=1440)
    at /home/nia/git/lagrange/lib/the_Foundation/src/block.c:370
#1  0x00000000004c2941 in gotIncoming_TlsRequest_ (d=0x7aead338dc00, socket=0x7aead338bd40)
    at /home/nia/git/lagrange/lib/the_Foundation/src/tlsrequest.c:722
#2  0x00000000004beceb in run_SocketThread_ (thread=0x7aead2220000)
    at /home/nia/git/lagrange/lib/the_Foundation/src/platform/posix/socket.c:190
#3  0x00000000004b8cf4 in run_Threads_ (arg=0x7aead2220000)
    at /home/nia/git/lagrange/lib/the_Foundation/src/thread.c:84
#4  0x00007aead2406f08 in __thrd_create_tramp (arg=0x7aead2e44060)
    at /usr/src/lib/libpthread/thrd.c:58
#5  0x00007aead240bf7e in pthread__create_tramp (cookie=0x7aead221ac00)
    at /usr/src/lib/libpthread/pthread.c:560
#6  0x00007aead0c91d30 in ?? () from /usr/lib/libc.so.12
Backtrace stopped: Cannot access memory at address 0x7aeac69f0000

Thanks for the backtrace. Unfortunately, I'm not seeing what could be the problem there.
Which commit/tarball did you use to compile Lagrange?
Could I also see the output from stdout? The requested URLs should be visible there.

If you compile with address sanitizer and undefined behavior sanitizer (see gcc instrumentation options) or test with valgrind it will be observable on Linux. This is reproducible on both current git clones and the latest release. It occurs before any URLs are requested.

#1  0x00000000004c2941 in gotIncoming_TlsRequest_
...
It occurs before any URLs are requested.

According to the stack trace, a request is ongoing? There are two kinds of requests that are done immediately after launching Lagrange: fetching remote bookmarks (occurs always when you have remote sources enabled), and feed refresh (occurs if enough time has passed). Do you have one or more of these?
I've tried to catch this on Linux (gcc) and macOS (Apple's clang), with the address sanitizer, undefined behavior sanitizer, and thread sanitizer. I also tried valgrind on Linux. No luck yet.

SIGSEGV about 40% of the time

This suggests it's a race of some sort.
I'll keep the sanitizers enabled, but it's pretty difficult to do anything with this before I can reproduce it.

I've pushed changes (latest is a806290e35706) that may have bearing on this issue. These changes were done after running valgrind. I have been getting a SIGSEGV out of GCC 10 -fsanitize=thread but gdb shows no actionable information about the crash.

I’m assuming this is fixed since no one has reported anything related to this in a year.

authors: alarixnia niacat skyjake

repo: skyjake/lagrange


text:
java.lang.UnsupportedClassVersionError[gui]

Issue details
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: jadx/gui/JadxGUI has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Jadx version
1.5.0
Java version
1.8 / 11
OS

[ ] Windows
[X] Linux
[ ] macOS

Java 11 is required now

authors: kwaiching skylot

repo: skylot/jadx


text:
Unexpected behaviour when iterating a view

Sorry if I'm massively misunderstanding here, but I'm getting some quite unexpected behaviour from running the following code (part of my test suite, but I've put together a Minimal Reproducible Example):
#include <iostream>

#include <entt/entt.hpp>

struct Parent
{
    unsigned int children = 0;
    entt::entity first = entt::null;
};

struct Child
{
    entt::entity parent = entt::null;
    entt::entity next = entt::null;
};

int main()
{
    entt::registry registry;

    const auto parent_entity = registry.create();
    const auto child_entity_1 = registry.create();
    const auto child_entity_2 = registry.create();

    auto &parent_component = registry.assign<Parent>(parent_entity);
    auto &child_component_1 = registry.assign<Child>(child_entity_1);
    auto &child_component_2 = registry.assign<Child>(child_entity_2);

    parent_component.children = 2;
    parent_component.first = child_entity_1;

    child_component_1.next = child_entity_2;
    child_component_1.parent = parent_entity;
    child_component_2.parent = parent_entity;

    registry.view<Child>().each([&](const auto entity, const auto &child) {
        if (!registry.valid(child.parent))
        {
            registry.destroy(entity);
        }
    });

    std::cout << registry.valid(child_entity_1) << "\n";
    std::cout << registry.valid(child_entity_2) << "\n";
    std::cout << registry.valid(parent_entity) << "\n";
}

Output:
1
1
0

During the registry.view<Child>().each() call, first child_entity_1 is visited, but then parent_entity is visited (even though it doesn't have a Child component!). This results in parent_entity being destroyed. child_entity_2 is never visited.
Am I misunderstanding something concept here? I was under the impression that all the entities with a Child component should be visited, and since they all have a valid parent entity they shouldn't be destroyed.

You're doing a common mistake in C++, it has nothing to do with EnTT.
Imagine this:
std::vector<int> vec{};
auto &ref = vec.emplate_back(1);
vec.emplate_back(2);

Is ref still valid after the last line? It's not guaranteed, it may be or may be not invalidated. This depends on the fact that the vector reallocated, thus invalidating the reference.
You've exactly the same issue here:
auto &child_component_1 = registry.assign<Child>(child_entity_1);
auto &child_component_2 = registry.assign<Child>(child_entity_2);

Is child_component_1 still valid after the second line? If it's not, then you've an UB when you modify it and this means that everything could happen.
Pools of components are just containers. They can reallocate as any other container.
The following version works as expected:
int main()
{
    entt::registry registry;

    const auto parent_entity = registry.create();
    const auto child_entity_1 = registry.create();
    const auto child_entity_2 = registry.create();

    registry.assign<Parent>(parent_entity, 2, child_entity_1);
    registry.assign<Child>(child_entity_1, parent_entity, child_entity_2);
    registry.assign<Child>(child_entity_2, parent_entity);

    registry.view<Child>().each([&](const auto entity, const auto &child) {
        if (!registry.valid(child.parent))
        {
            registry.destroy(entity);
        }
    });

    std::cout << registry.valid(child_entity_1) << "\n";
    std::cout << registry.valid(child_entity_2) << "\n";
    std::cout << registry.valid(parent_entity) << "\n";
}

If you don't want to pass arguments on construction, then:

Initialize your components before creating new ones to avoid using potentially dangling pointers.
Get (as in registry::get<T>(entity)) the component when you want to use it, so that you are guaranteed that the returned reference is a valid one.

Ah thanks, that's my bad then. Thanks a lot for the help. I had forgotten that the EnTT registry is basically a collection of vectors under the hood.

Yup. It's a collection of pools and you can specialize them but at the end of the day all them are dynamic containers in a way or the other, so this issue is pretty common. :+1:

authors: Omegastick skypjack

repo: skypjack/entt


text:
bug: All the bugs I find

Is there an existing issue for this?

[X] I have searched the existing issues

Description of the bug
A catalogue of any issues when I'm working with the project
Steps To Reproduce
Will be filled out when I find bugs as a comment
Expected behavior
n/a
Screenshots
n/a
Additional context
n/a

Issue 1:
when starting the bot I get this error:
node:internal/modules/cjs/loader:488
      throw e;
      ^

Error: Cannot find module 'C:\Users\outra\Documents\GitHub\nekokai\node_modules\@skyra\http-framework\dist\index.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
    at resolveExports (node:internal/modules/cjs/loader:482:14)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\outra\Documents\GitHub\nekokai\dist\libs\command-register.js:3:26)
    at Module._compile (node:internal/modules/cjs/loader:1101:14) {
  code: 'MODULE_NOT_FOUND',
  path: 'C:\\Users\\outra\\Documents\\GitHub\\nekokai\\node_modules\\@skyra\\http-framework\\package.json'
}

to reproduce just require the project, then compile and attempt to start

The HTTP framework works exclusively with ECMASCript Modules. Please update your application to use ESM.

@devramsean0 the bot has to be ESM. We don't support CJS with http-framework.

I'm an idiot lol

it is already esm

Closing because the issue is becoming stale, and @favna is finding most of the bugs anyways.

authors: devramsean0 favna kyranet

repo: skyra-project/archid-components


text:
[OAuth] How to implement Authenticating with OAuth using an adapter

How to use the fastapi adapter to implement the OAuth flow?
The slack_bolt version
slack-bolt==1.18.0
Python runtime version
Python 3.10.13

from slack_bolt.adapter.fastapi import SlackRequestHandler

oauth_settings = OAuthSettings(
    client_id=config.slack_secrets.client_id,
    client_secret=config.slack_secrets.client_secret,
    scopes=["channels:read", "groups:read", "chat:write"],
    installation_store=SQLAlchemyInstallationStore(
        engine=config.database.sql_engine,
        client_id=config.slack_secrets.client_id,
    ),
    state_store=SQLAlchemyOAuthStateStore(
        expiration_seconds=600, engine=config.database.sql_engine
    ),
)

app = App(
    signing_secret=config.slack_secrets.signing_secret,
    oauth_settings=oauth_settings,
)

handler = SlackRequestHandler(app=app)
@router.get("/slack/oauth_redirect")
async def oauth_redirect(request: Request) -> Any:  # noqa: D103
    raise NotImplementedError

What should I do next?

Hi @Tomperez98, thanks for asking the question! Checking this example code: https://github.com/slackapi/bolt-python/blob/main/examples/fastapi/oauth_app.py should be helpful to you!

repo: slackapi/bolt-python


text:
Fix #545 Enable to use lazy listeners even when having any custom context data

This pull request fixes #545 by enhancing the internals of lazy listener execution mechanism.
Category (place an x in each of the [ ])

[x] slack_bolt.App and/or its core components
[x] slack_bolt.async_app.AsyncApp and/or its core components
[ ] Adapters in slack_bolt.adapter
[ ] Document pages under /docs
[ ] Others

Requirements (place an x in each [ ])
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've run ./scripts/install_all_and_run_tests.sh after making the changes.

Although “copiable” seems to be an accepted variant, a Google Ngram search shows “copyable” is more commonly used.
I bring this up because if somebody greps the code for “copy”, naming the methods to_copyable would match.
Just a small observation (functionally the code looks OK to me 🙂)

@eddyg Thanks! I'm happy to rename it 👍

Renamed the methods

authors: eddyg seratch


text:
latency due to daemon threads getting created on every event in slackclient 2.5

im using slackclient 2.5, while using rtm.start(), every time we receive an event from slack, it opens a new daemon thread, since a daemon thread wont stop until main thread is terminated, these threads keep adding up and ultimately result in high cpu utilization.

Hi @rish-lab , we've fixed the CPU usage issue in version 2.6.0. https://github.com/slackapi/python-slack-sdk/issues/569
Could you consider upgrading to 2.6.0+? Using the latest - 2.9.3 is highly recommended. All 2.x versions do not have any breaking changes.

@rish-lab Was my previous comment helpful for you? Let me close this issue after waiting for your response for a few more days.

authors: rish-lab seratch

repo: slackapi/python-slack-sdk


text:
Invalid compaction on slow block writes

While trying to replicate #121, I triggered the following error:
invalid compaction: Err(
    InvalidCompaction,
)

On this checksum: 47ab5dae0359bac41fd15adc423c3a7456ba12c0
The only changes I made to SlateDB's code was this:
--- a/src/tablestore.rs
+++ b/src/tablestore.rs
@@ -11,9 +11,11 @@ use object_store::buffered::BufWriter;
 use object_store::path::Path;
 use object_store::{ObjectStore, PutPayload};
 use parking_lot::RwLock;
+use tokio::time::sleep;
 use std::collections::{HashMap, VecDeque};
 use std::ops::Range;
 use std::sync::Arc;
+use std::time::Duration;
 use tokio::io::AsyncWriteExt;

 pub struct TableStore {
@@ -306,6 +308,7 @@ impl<'a> EncodedSsTableWriter<'a> {

     async fn drain_blocks(&mut self) -> Result<(), SlateDBError> {
         while let Some(block) = self.builder.next_block() {
+            sleep(Duration::from_millis(100)).await;
             self.writer.write_all(block.as_ref()).await?;
             self.blocks_written += 1;
         }

The intent was to simulate slow-ish block writes to object storage.
Then, I ran this code with the modified slatedb library:
use std::{sync::Arc, time::Duration};

use object_store::{memory::InMemory, path::Path, ObjectStore};
use slatedb::{config::{CompactorOptions, DbOptions}, db::Db};
use tokio::time::Instant;

#[tokio::main]
async fn main() {
    let object_store: Arc<dyn ObjectStore> = Arc::new(InMemory::new());
    let options = DbOptions {
        flush_ms: 100,
        manifest_poll_interval: Duration::from_millis(100),
        min_filter_keys: 10,
        l0_sst_size_bytes: 1024,
        compactor_options: Some(CompactorOptions::default()),
    };
    let kv_store = Db::open_with_opts(
        Path::from("attempt3"),
        options,
        object_store,
    )
    .await
    .unwrap();

    println!("Writing for some time");
    let mut record_count = 0;

    // write a loop that inserts 1000 keys repeatedly or a duration of 1 minute
    let start = Instant::now();
    let write_options = slatedb::config::WriteOptions {
        await_flush: false
    };

    while start.elapsed() < Duration::from_secs(10) {
        let iteration = start.elapsed().as_secs();
        for i in 0..1000 {
            kv_store.put_with_options(format!("key-{}-{}",iteration % 5, i).as_bytes(), format!("value{}", i).as_bytes(), &write_options).await;
            record_count += 1;
        }
    }

    println!("Total records written: {}", record_count);

    // Close
    kv_store.close().await.unwrap();
}

The application failed with the InvalidCompaction message I listed above

I'm also sometimes seeing:
conflicting manifest version. retry write

at the tail end of the stdout logs (right before the "total records written" log line).

From @rodesai:

ah I think this is because I haven't yet had the compaction policy look at what compactions are running when selecting a compaction to schedule. So if it starts a compaction, and then the scheduler runs again before the compaction finishes you'll see this bug. The error is returned when the scheduler tries to schedule a compaction to a sorted run, but there's already an in-progress compaction to that sorted run.

@rodesai is it possible that this issue will be solved by #96?

After looking at #96 and the compaction doc, I think this issue is different. #96 is about validating that the inputs adhere to the rules set forth in the doc. This issue is just about making sure that a scheduled run does not attempt to get re-scheduled.

Yeah. #96 is just meant to track adding more validation. To fix this we need to fix the compaction policy to not submit redundant compactions. I've got a patch in flight to do just this, and fill in the policy with compaction beyond just l0->compacted. So I can just take this ticket.

Fixed by https://github.com/slatedb/slatedb/pull/147

authors: criccomini rodesai

repo: slatedb/slatedb


text:
DenseVecStorage is not really that dense - should be mentioned in the docs?

Reading the DenseVecStorage docs gives the impression that everything is densely packed, trading some access performance for better memory usage. Which is true - but a bit misleading, since only the data is dense. The index vector is still sparse.
I think it's worth mentioning that in the docs - that DenseVecStorage can still have a big memory footprint for a small number of entities if their IDs are large.

Fair point.

Thanks for pointing this out. Up until this point, I thought "DenseVecStorage" was
"entity id -> location" in BTree,
"location -> data" in Vec
Was not aware the "entity -> location" was in a sparse Vec

authors: idanarye torkleyy zeroexcuses

repo: slide-rs/specs


text:
How to disable Integrated Editor? The little audience ruined my ppt and lots of related files...

I've check all the guides here and find no switches to cut off this feature...
How to disable it?
ps: I know build may probably solve this problem, but I didn't find a way to set password while hosting build version...

I found changing this code (/slidev/node_modules/@slidev/client/internals/NavControls.vue, line 121)would work:
        <button v-if="__DEV__ && !isPresenter" class="slidev-icon-btn <md:hidden" @click="showEditor = !showEditor">

here the logic should be a bug. why an audience instead of a presenter could change all the ppts???
and also, the password could be seen directly so it's dangerous also...
so here I currently change !isPresenter to !isPresenter or 0 to forbid this smart editor and so the smart students...

You can use a password to protect the presenter mode. I won't recommend directly exposing your dev slides to your audience tho, it's better to do with a deployed SPA.

You can use a password to protect the presenter mode. I won't recommend directly exposing your dev slides to your audience tho, it's better to do with a deployed SPA.

As I said, SPA seems have no password protection? I didn't find any way.

I want to know how to disable the editor.
It will be great if it is only enabled in the presenter mode.

I came up with a solution by directly adding the following code to styles/index.ts file. It removes the entire <nav> element.
const observer = new MutationObserver((mutationsList) => {
  for (const mutation of mutationsList) {
    for (const node of mutation.addedNodes) {
      if (node.classList) {
        if (node.classList.contains("slidev-icon-btn")) {

          /* optional: use frontmatter to control
          if (document.title.includes("dev")) {
            observer.disconnect()
            return
          }
           */

          if (!window.location.pathname.startsWith("/presenter")) {
            const navElem = document.querySelector("nav")
            if (navElem) {
              [...document.querySelectorAll(`[class~="slidev-icon-btn"]`)].forEach(e => e.parentElement.remove())
              observer.disconnect()
            }
          }
        }
      }
    }
  }
})
observer.observe(document, {
  childList: true, subtree: true,
})

If you also want to hide the drawing tool, you can enable this setting (frontmatter.drawings.presenterOnly: true) so that it only appears in the presenter view.

I want to know how to disable the editor. It will be great if it is only enabled in the presenter mode.

you can see my comment above: https://github.com/slidevjs/slidev/issues/1048#issuecomment-1626600123
which can only enable the editor in the presenter mode by changing !isPresenter to isPresenter.

authors: 15921483570 CarsonSlovoka antfu

repo: slidevjs/slidev


text:
Add tag filtering option for dbt-coverage users

Not sure if you're taking oss contributions. I saw that you had path filtering, but this would allow users to filter their reports to a specific tag which would fit our use case for dbt-coverage. Great project, btw!
Usage:
dbt-coverage compute doc --cov-report coverage-test.json --model-tag-filter tag:<put-your-dbt-tag-here>

Hey @chrishronek, thanks for your PR, we're definitely accepting contributions. 😊
Thinking about the added functionality, wouldn't it be sufficient to simply run the dbt docs generate only for the selected tag, i.e. dbt docs generate --select tag:<tag>? I'm just thinking whether it's a good idea to replicate functionality from dbt. We already did this once - https://github.com/slidoapp/dbt-coverage/pull/45 - but I think it's mostly only more code to maintain without much added value.

Hey @chrishronek, thanks for your PR, we're definitely accepting contributions. 😊
Thinking about the added functionality, wouldn't it be sufficient to simply run the dbt docs generate only for the selected tag, i.e. dbt docs generate --select tag:<tag>? I'm just thinking whether it's a good idea to replicate functionality from dbt. We already did this once - #45 - but I think it's mostly only more code to maintain without much added value.

Frankly, I'm a little embarrassed that I didn't think of that myself 😅. Feel free to Close. Thanks for the response!

No worries at all! 😊

authors: chrishronek sweco

repo: slidoapp/dbt-coverage


text:
Cannot using CURL

Hello when i update to current version, i cannot using curl anymore. there's always show error 500.
this is bugs?? or what??

Show me an example of your code, please.

hello @ursoforte .
this is my code.
NB: this is my directory
public
 activity
    .htdocs
    index.php
 schedule
    .htdocs
    index.php

That error show only if i calling API on my server, but in localhost that's running well, all setting already check it and it's working before.
in folder schedule  > index.php
function call_api_post_internal($url, $postdata) {
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, HOST.$url);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  $response = curl_exec($ch);
  if (curl_error($ch)) die("Connection Error: ".curl_errno($ch).' - '.curl_error($ch));
    curl_close($ch);

    return json_decode($response);
}
$app->post('/new', function (Request $request, Response $response) {
 try
 {
  $param = $request->getParsedBody();
  /* some process insert to database here */

  $actiivity = array();
  $activity['schedule_id'] = $id;
  $activity['log'] = 'some message';
  call_api_post_internal('public/activity/insert');
  return $response->withStatus(200)->withHeader('Content-type', 'application/json')->withJson(array('id'=>$id, 'message'=>'Schedule has been inserted'));
}
catch(Exception $e)
{
  return $response->withStatus(400)->write($e->getMessage());
}
});

in folder activity > index.php

$app->post('/insert', function (Request $request, Response $response) {

 try
 {
  $param = $request->getParsedBody();
  /*do something process insert here*/
  return $response->withStatus(200)->withHeader('Content-type', 'application/json')->withJson(array('id'=>$id, 'message'=>'Schedule has been inserted'));
}
catch(Exception $e)
{
  return $response->withStatus(400)->write($e->getMessage());
}
});

Why use curl directly and not some abstraction library like Guzzle?

I'm closing this as it's not really a "slim" issue. If you have more questions about how to use Slim we have great resources on our https://discourse.slimframework.com/ forum.

authors: geggleto gieboyz ndobromirov ursoforte

repo: slimphp/Slim


text:
When request error by ajax - show Prettyprint

Many times when i develop my APP i had problem with debug in on ajax.

I think that will be nice if is ( ajax ) request then Prettyprint res, otherwise i have to copy response to html file then read it
Details
Type: ErrorException
Code: 8
Message: Undefined index: ohno
File: [....]adm.php
Line: 23
Trace
[...]

You can see the rendered HTML in the HTML tab. Check it. :dango:

I think you may have opened this PR against the wrong branch? There's over 250 commits in this PR…

Please create a new PR by branching 3.x then putting your change on your new branch and then creating the PR between your new branch and 3.x.

authors: DavidePastore akrabat dawjan


text:
Firewall DNS

Automatically adds firewall rules to block any DNS requests (UDP packets on port 53) that does not go to one of the DNS addresses specified/pushed by the VPN server.
This solves the problem of "the bind mount will silently disappear in the protected namespace", by blocking DNS requests that don't go to the servers we want.
Downsides:

Blocks all UDP traffic on port 53. So if someone for some reason need port 53 UDP, it won't work.
If you end a connection, and the namespace is still up, and run namespaced-openvpn again, it will increase the iptables chain by 2. This is obviously reset upon restart or removing the protected namespace. This is not really a limitation, just lazy coding :D.

Note:
I only tested this on IPv4 connections, I don't know if IPv6 connections will work (it should, just not tested).

Thanks for the contribution! This is a good idea.
I don't want to make this the default behavior, in keeping with the goal of making namespaced-openvpn's behavior as close as possible to stock openvpn. I'm considering two options for this:

Make this a separate script that can be run with --up (adds the rules) and --down (removes them)
Make this a command-line option for namespaced-openvpn (something like --harden-dns); add the rules in route_up() and remove them in a new function that is run as a --down script. (This would require overriding the default behavior of --down, along the lines of routeup_from_config().)

repo: slingamn/namespaced-openvpn


text:
Inherit recipes of the Application Workflow

Connected to #501

Quick thing.  Suggestion to change from builded to built.
✔ ~/code/SlipStreamServer [issue_#501-inherited_targets|…16⚑ 9]
09:13 $ grep -ri builded ./*
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:              public final String buildedOn;
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:                      this.buildedOn = clouds.stream().collect(Collectors.joining(","));
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:      public List<String> getCloudNamesWhereBuilded() {
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:              buildStates.add(new BuildState(image.getResourceUri(), image.getCloudNamesWhereBuilded()));
✔ ~/code/SlipStreamServer [issue_#501-inherited_targets|…16⚑ 9]
09:14 $ grep -ri builded ./* | sed -e 's/uilded/uilt/g'
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:              public final String builtOn;
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:                      this.builtOn = clouds.stream().collect(Collectors.joining(","));
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:      public List<String> getCloudNamesWhereBuilt() {
./jar-persistence/src/main/java/com/sixsq/slipstream/persistence/ImageModule.java:              buildStates.add(new BuildState(image.getResourceUri(), image.getCloudNamesWhereBuilt()));
✔ ~/code/SlipStreamServer [issue_#501-inherited_targets|…16⚑ 9]
09:14 $

Just a general comment.  There were +409/-57 lines of code added/removed, but no tests were added/updated.  There are no regressions with the current tests, but in the future it would be good to supply such big changes with tests.  It would simplify the validation as well by showing the intended usages (with assertions) of the introduced code/features/etc.

authors: konstan schaubl

repo: slipstream/SlipStreamServer


text:
[e2e]: generic schedule main multi-subjects slsa3

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/2709376655
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.generic.schedule.main.multi-subjects.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.generic.schedule.main.multi-subjects.slsa3.yml
Trigger: schedule
Branch: main
Date: Thu Jul 21 04:51:41 UTC 2022

Seems like another rekor error: validating log entry: verifying inclusion proof: wrong proof size 13, want 14
Maybe some kind of backwards incompatibility with cosign.VerifyTLogEntry?

Hmmm checking in on this. I'll try to reproduce it.

Locally, things worked fine (I usually comment out the provider code and give an empty GH workflow context to run ./generic attest locally.
It is very weird that this might be a flake.
I went through Rekor logs and searched via time to find the Rekor entry:
$ ./rekor get --log-index 2993780 --format json | jq
{
  "Attestation": "{\"_type\":\"https://in-toto.io/Statement/v0.1\",\"predicateType\":\"https://slsa.dev/provenance/v0.2\",\"subject\":[{\"name\":\"artifact1\",\"digest\":{\"sha256\":\"482ce8c8f7e867da3a3c05a9aee637703e17470ed1cf882a9e5b405e8f82619d\"}},{\"name\":\"artifact2\",\"digest\":{\"sha256\":\"89cfc6954e88b2f92a7c2879d9eb085c42f3c7065d012a5066f450dbe59b2c00\"}},{\"name\":\"artifact3\",\"digest\":{\"sha256\":\"7a5d21a6adac945561d859bd1decfc37b2408788cf3206df3519e281afd31b6e\"}}],\"predicate\":{\"builder\":{\"id\":\"https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@refs/heads/main\"},\"buildType\":\"https://github.com/slsa-framework/slsa-github-generator@v1\",\"invocation\":{\"configSource\":{\"uri\":\"git+https://github.com/slsa-framework/example-package@refs/heads/main\",\"digest\":{\"sha1\":\"3595a6696ff38f34547758e2733c15b84b5ca752\"},\"entryPoint\":\".github/workflows/e2e.generic.schedule.main.multi-subjects.slsa3.yml\"},\"parameters\":{},\"environment\":{\"github_actor\":\"laurentsimon\",\"github_actor_id\":\"64505099\",\"github_base_ref\":\"\",\"github_event_name\":\"schedule\",\"github_event_payload\":{\"schedule\":\"0 4 * * *\"},\"github_head_ref\":\"\",\"github_ref\":\"refs/heads/main\",\"github_ref_type\":\"branch\",\"github_repository_id\":\"486325809\",\"github_repository_owner\":\"slsa-framework\",\"github_repository_owner_id\":\"80431187\",\"github_run_attempt\":\"1\",\"github_run_id\":\"2709376655\",\"github_run_number\":\"12\",\"github_sha1\":\"3595a6696ff38f34547758e2733c15b84b5ca752\"}},\"metadata\":{\"buildInvocationID\":\"2709376655-1\",\"completeness\":{\"parameters\":true,\"environment\":false,\"materials\":false},\"reproducible\":false},\"materials\":[{\"uri\":\"git+https://github.com/slsa-framework/example-package@refs/heads/main\",\"digest\":{\"sha1\":\"3595a6696ff38f34547758e2733c15b84b5ca752\"}}]}}",
  "AttestationType": "",
  "Body": {
    "IntotoObj": {
      "content": {
        "hash": {
          "algorithm": "sha256",
          "value": "802d343ce19151dbf79a56887ba212657faa4b2c6950df85036070a63842f3aa"
        },
        "payloadHash": {
          "algorithm": "sha256",
          "value": "96d9227d8784a4268db3b1f6a4f179f17ed3014d85001e6ec4971967bd09bc4d"
        }
      },
      "publicKey": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURkekNDQXZ5Z0F3SUJBZ0lUQ3JtU3VqN2Fyd29rMTlSQ0JxR3hwVTJseURBS0JnZ3Foa2pPUFFRREF6QXEKTVJVd0V3WURWUVFLRXd4emFXZHpkRzl5WlM1a1pYWXhFVEFQQmdOVkJBTVRDSE5wWjNOMGIzSmxNQjRYRFRJeQpNRGN5TVRBME5URXlORm9YRFRJeU1EY3lNVEExTURFeU0xb3dBREJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5CkF3RUhBMElBQkRuRXZPbDNKTDBqaVlPZmVON2FvcytsM2ZtZmlMNnBTY2c3RVlYK1d1c2VyVXZTUVlIR21mem8KNm1hRC9WVFF0WUVXVGR4eC9jUStVejJJZnlDS3lJQ2pnZ0lwTUlJQ0pUQU9CZ05WSFE4QkFmOEVCQU1DQjRBdwpFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUhBd013REFZRFZSMFRBUUgvQkFJd0FEQWRCZ05WSFE0RUZnUVVkMGVrCm8yWHp4MHFmdnhmODQrVER5ZVdYZlBjd0h3WURWUjBqQkJnd0ZvQVVXTUFlWDVGRnBXYXBlc3lRb1pNaTBDckYKeGZvd2dZTUdBMVVkRVFFQi93UjVNSGVHZFdoMGRIQnpPaTh2WjJsMGFIVmlMbU52YlM5emJITmhMV1p5WVcxbApkMjl5YXk5emJITmhMV2RwZEdoMVlpMW5aVzVsY21GMGIzSXZMbWRwZEdoMVlpOTNiM0pyWm14dmQzTXZaMlZ1ClpYSmhkRzl5WDJkbGJtVnlhV05mYzJ4ellUTXVlVzFzUUhKbFpuTXZhR1ZoWkhNdmJXRnBiakEyQmdvckJnRUUKQVlPL01BRURCQ2d6TlRrMVlUWTJPVFptWmpNNFpqTTBOVFEzTnpVNFpUSTNNek5qTVRWaU9EUmlOV05oTnpVeQpNQ3dHQ2lzR0FRUUJnNzh3QVFVRUhuTnNjMkV0Wm5KaGJXVjNiM0pyTDJWNFlXMXdiR1V0Y0dGamEyRm5aVEFXCkJnb3JCZ0VFQVlPL01BRUNCQWh6WTJobFpIVnNaVEJTQmdvckJnRUVBWU8vTUFFRUJFUXVaMmwwYUhWaUwzZHYKY210bWJHOTNjeTlsTW1VdVoyVnVaWEpwWXk1elkyaGxaSFZzWlM1dFlXbHVMbTExYkhScExYTjFZbXBsWTNSegpMbk5zYzJFekxubHRiREE1QmdvckJnRUVBWU8vTUFFQkJDdG9kSFJ3Y3pvdkwzUnZhMlZ1TG1GamRHbHZibk11CloybDBhSFZpZFhObGNtTnZiblJsYm5RdVkyOXRNQjBHQ2lzR0FRUUJnNzh3QVFZRUQzSmxabk12YUdWaFpITXYKYldGcGJqQUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUF3U04xRnJUZ0FpenlxQitoMmwwekF1T21KWkgzenJrRApYZGxCbGdHeHJXK0c3VWkvclBwSjVzOXN2b050eFhEUkFqRUE5Tk5VaFF3WElYM2tOd0JFMWZqaDFON1VBQ2ZrCm02ZFhNdmFhUzY2SW5RRlpKWWFmNkozWVF3ajlTSTFSSDZNaQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
    }
  },
  "LogIndex": 2993780,
  "IntegratedTime": 1658379085,
  "UUID": "49a10fe0f0b0192f6cf3ddddb46d45724362a8d64dab49bd8a6ae8bb385adcba",
  "LogID": "c0d23d6ad406973f9559f3ba2d1ca01f84147d8ffc5b8445c224f98b9591801d"
}

Running ./rekor verify --log-index 2993780 worked correctly.
I will try with cosign.VerifyTLogEntry.

I also tried a cosign.VerifyTLogEntry using that entry, and it was able to succeed...
Unfortunately, the inclusion proof size is not "reproducible" -- the current inclusion proof for that entry is now 20 hashes long, as opposed to the 14 sized one from before.

Ok, I guess we can see if it closes on its own when it runs next and keep our eye out for similar errors in the future.

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/2716374076
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.generic.schedule.main.multi-subjects.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.generic.schedule.main.multi-subjects.slsa3.yml
Trigger: schedule
Branch: main
Date: Fri Jul 22 04:51:59 UTC 2022
Tests are passing now. Closing this issue.

authors: asraa ianlewis

repo: slsa-framework/slsa-github-generator


text:
Image plot PyTorch

I'm trying to use the image plot function on a PyTorch DeepExplainer but I'm not sure if it's working correctly. I'm using the MNIST code from https://github.com/pytorch/examples/tree/master/mnist.
Then, to make the image plot I do:
import shap
import numpy as np

# select a set of background examples to take an expectation over
background = next(iter(train_loader))[0][:100]
# explain predictions of the model on four images
e = shap.DeepExplainer(model, background)

shap_values = e.shap_values(next(iter(test_loader))[0][:5])

sv_transposed = [shap_value.transpose(0, 2, 3, 1) for shap_value in shap_values]

shap.image_plot(sv_transposed, -next(iter(train_loader))[0][:5].permute(0, 2, 3, 1).numpy())

The result:

This doesn't seem right, does it? If you compare it to the plots on the shap GitHub example.
Thanks for the help!

It does seem less intuitive than what I have seen the in past. Could be an odd model. To debug it is helpful to check and make sure the sum of the SHAP values equals the model output they are explaining (plus the expected_value base). Another thing to consider is if the 100 background samples are actually random (if they are all from the same class that would change things).

authors: DavidRuhe slundberg

repo: slundberg/shap


text:
SHAP DeepExplainer has no attribute 'get_session' with TF 2.0

I just deployed a tf.keras model using tensorflow 2.0 and I would like to use DeepExplainer but it creates an error message considering that
import shap
explainer = shap.DeepExplainer(model_pred, df[1][2])

When I run DeepExplainer (shap==0.28.5) with my tensorflow 2.0 model (which does not have a session anymore) I get this error message:

AttributeError                            Traceback (most recent call last)
 in
3 # select a set of background examples to take an expectation over
4 #background = trainX[np.random.choice(trainX.shape[0], 500, replace=False)]
----> 5 explainer = shap.DeepExplainer(model_pred, df[1][2])
/anaconda3/lib/python3.6/site-packages/shap/explainers/deep.py in init(self, model, data, session, learning_phase_flags)
127         # ...this will catch the one that keras uses
128         # we need to find them since we want to make sure learning phase flags are set to False
--> 129         if learning_phase_flags is None:
130             self.learning_phase_ops = []
131             for op in self.session.graph.get_operations():
AttributeError: module 'tensorflow.python.keras.api._v2.keras.backend' has no attribute 'get_session'

I have not been looking forward to learning all the ways TF 2.0 will break things :) ...I am adding this as a todo since it will require a more in-depth review of TF 2.0 and it's impact on shap.

@slundberg @olivierblais1
I need shap to work with TF 2.0 as well, as will most people now that it is officially released.
You don't use tf.Session much anymore, so that is the issue. It has to do with eager execution being enabled by default and the backend being tensorflow by default, so no session is needed. See Tensorflow 2.0 Guide to Converting Models
Once I disable eager execution with tf.compat.v1.disable_eager_execution() I get this error: InvalidArgumentError: Operation 'dropout_6_1/cond' has no attr named '_XlaCompile'.

Is there any update on this? tf.compat.v1.disable_eager_execution() doesnt fix the issue for me and I continue to get:
session = tf.keras.backend.get_session()
AttributeError: module 'tensorflow_core.keras.backend' has no attribute 'get_session'

error
I have run tf.compat.v1.disable_eager_execution() before compiling and running the model and am still getting this error.

My understanding of TF is fairly limited, but to shift to the paradigm of Eager Execution, maybe SHAP could be implemented as a Keras Callback. That would be pretty amazing.

I just pushed a new version of GradientExplainer that supports TensorFlow 2.0 models. Updating DeepExplainer is going to take more work, since it relies a lot on graph traversal in the current session, so right now I recommend using GradientExplainer and let me know if you run into issues.

thank you! is the implementation of gradient explainer the same? i.e
explainer=shap.Gradientexplainer(model, train)?
shap_values.. etc

i continue to get an error with this..
AttributeError: module 'tensorflow_core.keras.backend' has no attribute 'get_session'
I am running a sequential model so unsure as to how this differs to the example in the vignettes for gradient explainer..
thanks!

Are you on the master version (0.31.0) or still on pypi?

I think pypi (0.30.2)..
im sorry for the confusion, i did do pip upgrade shap, but im guessing that didnt upgrade it?

You will need to either wait for the next release to drop, or you will need to git clone the repo and run python setup.py install. I plan to release the next version soon (few days).

aa awesome! thanks so much, i will wait for the push!

@slundberg This is great, thanks!

Any news on this? I feel like I might have a problem related to this
-------------------------------------------------------------------------
RuntimeError                            Traceback (most recent call last)
<ipython-input-26-cc0528227812> in <module>
     10
     11 # explain predictions of the model on four images
---> 12 e = shap.DeepExplainer(new_model, background)
     13 # ...or pass tensors directly
     14 # e = shap.DeepExplainer((model.layers[0].input, model.layers[-1].output), background)

/usr/local/lib/python3.7/site-packages/shap/explainers/deep/__init__.py in __init__(self, model, data, session, learning_phase_flags)
     78
     79         if framework == 'tensorflow':
---> 80             self.explainer = TFDeepExplainer(model, data, session, learning_phase_flags)
     81         elif framework == 'pytorch':
     82             self.explainer = PyTorchDeepExplainer(model, data)

/usr/local/lib/python3.7/site-packages/shap/explainers/deep/deep_tf.py in __init__(self, model, data, session, learning_phase_flags)
    119                 ksess = keras.backend.tensorflow_backend.tf_keras_backend._SESSION.session
    120             if keras is not None and ksess is not None:
--> 121                 session = keras.backend.get_session()
    122             else:
    123                 try:

/usr/local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py in get_session()
    377     if not _is_tf_1():
    378         raise RuntimeError(
--> 379             '`get_session` is not available '
    380             'when using TensorFlow 2.0.')
    381     if tf.executing_eagerly():

RuntimeError: `get_session` is not available when using TensorFlow 2.0.

I have the exact same issue! I can't run shap at all.

I installed shap with "pip install shap"
I  wanted to use shap.GradientExplainer, but I get keyError 27282.
Does anybody know what this could be?, I have pasted my code and error message below:
explainer = shap.GradientExplainer(model, df) shap_values = explainer.shap_values(df.iloc[1].values)
`---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/mnt/c/Users/PARANJAPEAkshay/icon_work/PycharmRepo/venv_tf2/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2645             try:
-> 2646                 return self._engine.get_loc(key)
2647             except KeyError:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 46649
During handling of the above exception, another exception occurred:
KeyError                                  Traceback (most recent call last)
 in
----> 1 shap_values = explainer.shap_values(df.iloc[1].values)
/mnt/c/Users/PARANJAPEAkshay/icon_work/PycharmRepo/venv_tf2/lib/python3.6/site-packages/shap/explainers/gradient.py in shap_values(self, X, nsamples, ranked_outputs, output_rank_order, rseed, return_variances)
104         were chosen as "top".
105         """
--> 106         return self.explainer.shap_values(X, nsamples, ranked_outputs, output_rank_order, rseed, return_variances)
107
108
/mnt/c/Users/PARANJAPEAkshay/icon_work/PycharmRepo/venv_tf2/lib/python3.6/site-packages/shap/explainers/gradient.py in shap_values(self, X, nsamples, ranked_outputs, output_rank_order, rseed, return_variances)
251                         else:
252                             x = X[l][j]
--> 253                         samples_input[l][k] = t * x + (1 - t) * self.data[l][rind]
254                         samples_delta[l][k] = x - self.data[l][rind]
255
/mnt/c/Users/PARANJAPEAkshay/icon_work/PycharmRepo/venv_tf2/lib/python3.6/site-packages/pandas/core/frame.py in getitem(self, key)
2798             if self.columns.nlevels > 1:
2799                 return self._getitem_multilevel(key)
-> 2800             indexer = self.columns.get_loc(key)
2801             if is_integer(indexer):
2802                 indexer = [indexer]
/mnt/c/Users/PARANJAPEAkshay/icon_work/PycharmRepo/venv_tf2/lib/python3.6/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2646                 return self._engine.get_loc(key)
2647             except KeyError:
-> 2648                 return self._engine.get_loc(self._maybe_cast_indexer(key))
2649         indexer = self.get_indexer([key], method=method, tolerance=tolerance)
2650         if indexer.ndim > 1 or indexer.size > 1:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 46649
`

Any news on this issue ? I am facing the same problem as well with DeepExplainer

I've git cloned and rebuilt Shap and am still getting the 'get_session' issue with both DeepExplainer and GradientExplainer. Has anyone found a work-around for this?
AttributeError                            Traceback (most recent call last)
 in
----> 1 explainer = shap.DeepExplainer(model, X_train)
2 shap_values = explainer.shap_values(X_train)
/opt/anaconda3/lib/python3.7/site-packages/shap/explainers/deep/init.py in init(self, model, data, session, learning_phase_flags)
78
79         if framework == 'tensorflow':
---> 80             self.explainer = TFDeepExplainer(model, data, session, learning_phase_flags)
81         elif framework == 'pytorch':
82             self.explainer = PyTorchDeepExplainer(model, data)
/opt/anaconda3/lib/python3.7/site-packages/shap/explainers/deep/deep_tf.py in init(self, model, data, session, learning_phase_flags)
113         if session is None:
114             # if keras is installed and already has a session then use it
--> 115             if keras is not None and keras.backend.tensorflow_backend._SESSION is not None:
116                 session = keras.backend.get_session()
117             else:
AttributeError: module 'keras.backend.tensorflow_backend' has no attribute '_SESSION'

Can anyone confirm that DeepExplainer is still not compatible with TF 2? Running into similar problems.


text:
Improve the type inference in denoLoadLibrary

This pr use Deno.ForeignLibraryInterface to improve type inference in denoLoadLibrary, fix missing Quit function in IMG and TTF, and adjust _data property of Color class to avoid typescript error.

Hi sorry I've been on vacation for the last 3 weeks. I'll try and take a look at this in the next few days.

I'll be willing to take the toPlatformStruct changes but please run deno fmt on the code. The changes from DynamicLibrary to Deno.DynamicLibrary are a no go for me.

So can we make DynamicLibrary infer return type from FFI symbol type? Some copy from deno is needed, with a MIT license

Honestly it's not needed. There is never any interaction directly with the FFI layer. Only generated code directly interacts with the FFI stuff. If you can figure out how to keep the names of the functions available via FFI I would gladly accept that but we don't need to copy the entire interface from deno.


text:
Typescript version

Hey @smakosh 👋 ,
I have a suggestion: a typescript version of your boilerplate.
it will be on another branch, so anyone can use the js or ts version.
what do you think?

Yes I was planning to do it, feel free to kick start it & I'll contribute when I can! Great suggestion!
Thank you

✔
thank you.

Added here: https://github.com/smakosh/CRA-boilerplate/tree/typescript

authors: fdrissi smakosh

repo: smakosh/CRA-boilerplate


text:
Chat UX

Focus on chat tab doesn't disable functions: it's not clear that you cannot use them in chat
Chat works with all your messages, you can't cancel it
It would be better if chat will open in separate tab group (split)
You can run chat "function" while another is in progress...is it a fuction actually?

Problem remained
Fixed
Recommendation
Recommendation

repo: smallcloudai/refact-vscode


text:
Code generation resulting in import conflict

Spotted with 1 case in Mutiny-fying https://github.com/reactiverse/elasticsearch-client
See:

https://gist.github.com/jponge/1e8784dbeddf9d0b6d7176489c147b03#file-generated-java-L72 source and generated code with the issue
https://github.com/reactiverse/elasticsearch-client/pull/11 pull request with the reproducer

2 imports, same name:
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import import org.elasticsearch.client.core.AcknowledgedResponse;

Yes, the other code generators do not have this problem.

authors: cescoffier jponge

repo: smallrye/smallrye-mutiny-vertx-bindings


text:
Title line of the repository still points to old (deprecated) wiki

Below the repository title, the description still has a link that points to the old wiki, misleading visitors. How about we remove that link?
@smangul1 - I believe you're the only one who can edit it.

done!


text:
notify after all download has finished.

Is there a way to notify the user when all the download has finished after press Start All ?
thanks

there is already a lisstener in lbirary. void onDownloadComplete (int id); you can check your all downloads in this method and if done,notify it.

Thanks @erginduran. @MrThiago Thats the way to achieve what you wanted. You can keep a track of list of downloads you initiated and check if everything is completed when you receive onDownloadComplete method.

authors: MrThiago erginduran smanikandan14


text:
🛑 CBT (Computer Based Test) Website (proxmox tunnel) is down

In 5c1d6f9, CBT (Computer Based Test) Website (proxmox tunnel) (https://cbt-cfd.sman3palu.sch.id) was down:

HTTP code: 530
Response time: 118 ms

Resolved: CBT (Computer Based Test) Website (proxmox tunnel) is back up in 25c967b after 1 hour, 20 minutes.

repo: smantriplw/uptime-services


text:
🛑 Proxmox Portal Website is down

In 95e8b2a, Proxmox Portal Website (https://proxmox-cfd.sman3palu.sch.id) was down:

HTTP code: 502
Response time: 1143 ms

Resolved: Proxmox Portal Website is back up in f5ff309 after 1 hour, 42 minutes.


text:
🛑 Dapodik Portal (tunnel) is down

In a0a584c, Dapodik Portal (tunnel) (https://dapodik.sman3palu.sch.id) was down:

HTTP code: 530
Response time: 52 ms

Resolved: Dapodik Portal (tunnel) is back up in 3f2804c after 37 minutes.


text:
new icons added and improvement in footer interface

solved issue #316
//before

//after

@sauravvsonu Brother You have open same PR twice !! You can check here

Sorry, I was getting conflict in others and, by mistake, created 3 PR. I have closed others 😜✌

is this issue still open?

Sorry, I was getting conflict in others and, by mistake, created 3 PR. I have closed others 😜✌

Can you please pull the recent changes and squash them with this PR

This is what we can see from the PR preview


text:
Improvement of Contact-Us Done

Updated Validations of contact-us form with proper error messages

Added Goodbye Card which will be shown after successfully submitting of form

Also, card will be responsive in all screen-sizes!
Also fixed the page reload issue in contact-us form!

@smaranjitghose , pls review pr!

Deploy is failing, create a new PR and also use a minimal colour of red so that blue and red match.

@anushbhatia Could you please suggest a better scheme for the font and the text colors. The red over violet background is somewhat weird

@anushbhatia Could you please suggest a better scheme for the font and the text colors. The red over violet background is somewhat weird

@smaranjitghose, but the errors should be thrown in red color to follow standards, right?

if you want to follow the standards then change the background to a minimal colour.

authors: ShubhamSj07 anushbhatia smaranjitghose


text:
is my media_player configuration correct?

This is my switch.yaml
- platform: broadlink
  host: 192.168.1.38
  mac: '00:00:00:00:00:00'
  type: rm_mini

This is my media_player.yaml
- platform: smartir
  name: Kitchen Television
  unique_id: kitchen_television
  device_code: 1001
  controller_data: 192.168.1.38
  power_sensor: binary_sensor.tv_power

This is my custom_components\smartir\codes\media_player\1001.json
{
    "manufacturer": "Toshiba",
    "supportedModels": [
      "42C3530D"
    ],
    "supportedController": "Broadlink",
    "commandsEncoding": "Base64",
    "commands": {
        "off": "JgBQAAABKJQRFBEUERQRExEUERQSOBEUETkSOBE4EjgRORI4ERQROREUEjgRFBAUETkRFBEUERQROREUEjcSOBITETkRORE5EQAFIgABJkwRAA0FAAAAAAAAAAA=",
        "on": "JgBQAAABKJQRFBEUERQRExEUERQSOBEUETkSOBE4EjgRORI4ERQROREUEjgRFBAUETkRFBEUERQROREUEjcSOBITETkRORE5EQAFIgABJkwRAA0FAAAAAAAAAAA=",
        "previousChannel": "JgBUAAABJpMVEhITEhMRFBEUERQQOREUETkRORE5ETkROBE5ERQRORE5ETkSOBA5ETkRFBEUEhQRExITERQQFRAVEDkRORI4EwAFIAABJ0sRAAFdBQANBQAAAAA=",
        "nextChannel": "JgBQAAABKJMRFBEUEhMRFBEUERQRORISEjgSOBI4ETkSOBM2ERQSOBE5ETkRFBE5ETkSEhEUEhMRFBITETkRFBEVEDkQORI4EQAFIgABJkwSAA0FAAAAAAAAAAA=",
        "volumeDown": "JgBUAAoAAdsAASaWERMTExEUEBQRFRAUEDkRFBI3EzcSNw87EDkROBEUETgSFQ85EDkRORE4ERQQFREUEDkSExAUERUQFg84ETkROBIABSsAASZMEQANBQAAAAA=",
        "volumeUp": "JgBQAAABJZcQFRAVDxYSEBIWEBUQOBEUEDkSNxE4EzcRORA5ERUMPBETETgSFBI4EDYTFRESEhQRORAUETkSExAUEToPORA5EQAFLAABKUkQAA0FAAAAAAAAAAA=",
        "mute": "JgBQAAABJ5QSExIUEhITEhISExISOBMSEzYTNxE4EjcSOBA5ERQROBMSERQSExETFDUSFBMSERMSNxM3ETgTNhMSEjgSNxM2EwAFKwABJkoTAA0FAAAAAAAAAAA=",
        "sources": {
            "VGA": "JgBQAAABJ5QUEhETEhMTEhITEhITNxMSEzUUNxI3EzYSOBI3EhMTNhMSEhQSNhI4ETgUNRMSEhMROBM2EhQSExETExITNhI4EQAFLAABJ0oSAA0FAAAAAAAAAAA=",
            "HDMI1": "JgBQAAABKZURExITEhMSEhMSEhQROBMSEjcRORI3ETgSOBI3ERMTNxITExISEhM3ETgSNxITEhMRNhU3EzcSEhITEhMTNhI4EwAFKgABJ0kTAA0FAAAAAAAAAAA=",
			"HDMI2": "JgBQAAABJ5MUEhIUERMRFBMSEhMROBITEjcUNRI4ETgUNRM3ExISNxQ2ERQSEhI3EjgSNxITExMQFBE4EzYTEhMSEhMSNxM2EgAFKwABKEoTAA0FAAAAAAAAAAA=",
            "AV Side": "JgBQAAABKZMTEhIUEhISExMSEhITNxEUEjcTNhM3EzYSOBI3ExISNxE5ETcSFBETEzcSNxITEhMTEhEVETcSNxIUEBURNxI4EQAFLAABJksTAA0FAAAAAAAAAAA=",
			"Channel 0": "JgBQAAABJ5UUEBITExISEhIUERQROBMREjgTNhM2EzcTNhI3EhQSNxITEhMSEhMSFRASExITEhMROBI4ETgSNxM3ETgROBI4EgAFKwABJkkTAA0FAAAAAAAAAAA=",
            "Channel 1": "JgBQAAABJ5MTExIUERISExMSEhQQORETFDUTNxE4EjcTNxE4EhMTNhU1ExISEhITEhMTEhITEhMRFBI3EjgTNRI4ETgSNxI4EQAFLAABKEkSAA0FAAAAAAAAAAA=",
			"Channel 2": "JgBQAAABKJUTEhETEhMUERMSEhMROBMSEzYTNxI3EjcSOBM2EhMRORISEzYTEhITEhMTEhITERQSNxITETgTNhI4EjcTNhI4EgAFKwABJ0oSAA0FAAAAAAAAAAA=",
			"Channel 3": "JgBQAAABKZQTEhITEhMSExISEhMSOBITETgRORM0FTYRORI3EhISOBI3EjcTExEUERMTEhITERMTEhIUETgTNhI4EjcSNxM3EgAFKwABJ0kSAA0FAAAAAAAAAAA=",
			"Channel 4": "JgBQAAABJpUSExITEhMSExISEhQQORETEjcTNxM2EzYSOBM2EhMSOBITERMTNhMSExMQFBITExISNxI4ExISNxE5EjcROBE5EgAFKwABJkoTAA0FAAAAAAAAAAA=",
			"Channel 5": "JgBQAAABJpMUEhEVEhMRExMSEhITNxMSEjcSNxM3EzYSNxI4ExISNxI4ERMSNxITExIRFBITExISExI3EhMSNxM2EjgSNxI3EwAFKQABKEsSAA0FAAAAAAAAAAA=",
			"Channel 6": "JgBQAAABJ5QRFBITEhMSExISExITNxITETgROBI4EjcSNhI5ERMUNRIUETgTNhITERQSExEUEhMROBITEhMSNxI3EjgSNxM2EgAFKwABKEkTAA0FAAAAAAAAAAA=",
			"Channel 7": "JgBQAAABJ5USEhMTERMSExETExMQORETEzYTNxM2EjgSNxM2EhQROBI3EjcSOBITERMTEhMSExIRFBMSExMOOhE5ETgSNxI4EQAFLAABJkoTAA0FAAAAAAAAAAA=",
			"Channel 8": "JgBQAAABJ5QSExITEhMSExITERMSNxIUETgUNRI4ETgTNhQ2ERQROBETExISFBI3ExIRExMSEhQRNxI4EzcRExQ1EjgROBI3EwAFKgABKEoSAA0FAAAAAAAAAAA=",
			"Channel 9": "JgBQAAABKJQTEhISExISExMSEhMTNhITEjgSNxI3EjgSNhM3EhMSNxM2ExMTEhI3ExISEhITEhQQFBI3EzcRFBI3EjcTNxI3EgAFKwABJksSAA0FAAAAAAAAAAA="
        }
    }
}

My climate configuration appears like this in the UI

But my media_player configuration appears like this in the UI

Is it normal for my TV configuration to appear like this? No controls or anything, just a power button?

Is your media player turn on?

its not a media player, its just my tv. It's infrared commands, just like my air conditioner. There's no feedback from my air conditioner, nor my tv, because they are both infrared. And yet i get this nice interface for my AC but not my TV.

Please delete power_sensor: binary_sensor.tv_power if not exists

I removed it. Now media_player.yaml is like this
- platform: smartir
  name: Kitchen Television
  unique_id: kitchen_television
  device_code: 1001
  controller_data: 192.168.1.38

But the result is the same

Press the power button to turn on and then the 3 dots for more actions

ok, that brings everything to life.

Any way I can bring all these controls to the front, on the card? Like it is with the AC controls?
Thanks

Are you familiar with custom cards?
If yes try this:
https://community.home-assistant.io/t/lovelace-mini-media-player/68459

thanks for your help

authors: aristosv smartHomeHub

repo: smartHomeHub/SmartIR


text:
bones stop working

every time my character respawn, mesh with smartbones working properly stop working when the character respawns pls help

Can you share your setup

so i tried some testing and i copied the exac same startercharacter from the demo place and paste it in my game and it happens to with that character (only added the Debug property in the hair mesh)
https://github.com/user-attachments/assets/fc88a1eb-ad6b-4c8e-9d19-3f51d830eae9

https://www.mediafire.com/file/nzyvfm1nl2p0l05/bones_dont_working.rbxl.lock/file
i made a place with the character and the smart bones script replicating the problem

i fix'd it im sorrry :/, the problem was  that i paste the client loader in the character and not the player, but thanks for replying no problem

authors: Fosforitoquemado JakeyWasTaken


text:
Chainlink Fulfilling Requests tutoorial is having at discrepancy

Inside the node tutorialcreating TestnetConsumer.sol

The hyperlink links us to the smart contract inside github gist
I imported the code to my Remix IDE and it gave an error Ownable.sol can't be found.
Solution:
The two imports in the gist code need to be updated to the following:
import "https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.4/ChainlinkClient.sol";
import "https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.4/vendor/Ownable.sol";

the previous links have been modified.

Thanks for catching it. There was a recent update of the contracts' path. Try the following imports:
import "@chainlink/contracts/src/v0.4/ChainlinkClient.sol";
import "@chainlink/contracts/src/v0.4/vendor/Ownable.sol";

Yeah used this one @dmitrydao . Thanks. Time to update?

We're making a mega update soon to avoid any issues with Remix and gists. You're gonna love it so I think it can wait.

Awesome

authors: dmitrydao lopeselio

repo: smartcontractkit/documentation


text:
[WIP] Feature/permission manager

This feature adds centralized processing and management of permissions.
Developers can register a permission listener with the permission manager to be notified when permissions they are interested in change. This listener will be called IFF permissions in the filter provided to the manager with the listener change.
Developers can also poll permission information about specific permissions from the manager.
An Enum is provided that describes all of the potential permissions that are returned in the OnPermissionChange object.
The PermissionManager will also listen to the HMI state of the proxy and use that information to correctly drive permission listener callbacks based on the current state to notify the listener of what actions can be taken at the present time instead of requiring that this statefulness is handled by the developer.

This should be targeted to develop.


text:
fix(code style): use formatter and examples

To please the flutter pub score,
use flutter format instead of flutter stylizer and create a small example.

:tada: This PR is included in version 1.0.1 :tada:
The release is available on:

v1.0.1
GitHub release

Your semantic-release bot :package::rocket:


text:
[Feature]: add expand prop

Expand animation just like in sonner libs https://vue-sonner.vercel.app/
I found this library more advanced and more customizable than vue-sonner Can you add expand feature to this lib?
Adding Headless toasts is much easier in Notivue, it would be nice to add this lib to shadcn-vue :pray:

Sry just saw this https://github.com/smastrom/notivue/issues/43

Sry just saw this #43

HI @sadeghbarati, no problem. I totally get that the sonner-like repositioning experience is super appealing and would be nice to have it in Notivue. But as I said in the quoted issue, I just don't think it's a good fit for this package.
Anyways, thanks again for your interest in Notivue and I hope you keep enjoying it. Cheers!

authors: sadeghbarati smastrom

repo: smastrom/notivue


text:
Makes Jason the default json lib and adds ability to configure your own

This makes the JSON library configurable and defaults it to Jason.

Coverage remained the same at 85.135% when pulling 167534fc4178375222d466414019f601d6ddf0e8 on abitdodgy:jason into b2588485b263f79cc64baa3668e5adae24af5d74 on smeevil:master.

Than you once again @abitdodgy \o/
Release 1.3.0 has been published :)

authors: abitdodgy coveralls smeevil

repo: smeevil/cloudex


text:
feat: make interface responsive

I think we can make the interface responsive, for two purposes:

I can imagine that people share playground links, with the receiving party opening the playground on their phone. Not to edit, but just to check the results.

Having the playground side-by-side on a single monitor with other editing tools makes sense. The current layout is quite wide and limits the efficiency in "split screen" layouts.

Quick sketch:

Based on what I see in the tailwind docs, this shouldn't be hard.

Closed by #16

repo: smeijer/testing-playground


text:
🛑 Home is down

In 4ff09a4, Home (https://www.eseade.edu.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Home is back up in f16fe22 after 18 minutes.

repo: smeseade/upptime


text:
feat: add invalid state to datepicker

References JIRA
Motivation and context
We need a way to highlight field and show error message for datepicker.
Before
Datepicker component doesn't have invalid state.
After
Datepicker component has a prop to toggle its invalid state.

Thank you Rados! Just on question: is it possible to display the error message with this props only?

Thanks for the review @Marine-Berthier
We have a separate component FormControl that wraps the input, and adds a label and errorMessage for it.

repo: smg-automotive/components-pkg