Random assignment for a subset of variables in predict.

Summary
Add random assignment for a subset of variables in predict.
Motivation
Random assignment for a variable V in a tree is a way to drop the effect of that variable in the model. The procedure is assign randomly in every node that uses V for spliting and in the rest do as usual.
Random assignment of a subset of variables W = {V1, V2..Vi} is similar. The assignment in nodes which splitting use any variable in W is random and the rest as usual.

This is usefull for computing honest variable importance over a new test set as the difference between the prediction error with and without perturbation.
This method can be used for interaction computation of two subsets of variables V and W, defined as the difference between paired importance (importance when both V and W are assigned randomly) vs added importance (sum of importance when each of W or V is assigned randomly).

References
The method is referenced in:
Hemant Ishwaran. "Variable importance in binary regression trees and forests." Electron. J. Statist. 1 519 - 537, 2007. https://doi.org/10.1214/07-EJS039

Call Path For Prediction
I have organized most of the call paths for LightGBM's prediction functions to figure out how to implement this feature. There may be some trivial mistakes because I'm new to LightGBM's source code, but these shouldn't be problems:smirk:

My Implement Plan
It seems to me that this feature is about adding one or more input parameters in Apis in the External Interface Layer and passing them down through a call path to control prediction behavior in Model Layer.
As to add more input parameters, I think we may add two variables to Class Config which is used as an expandable cross-language parameter set. One variable represents the type of prediction strategy, another variable contains control parameters of prediction strategy as "a subset of variables" mentioned in this issue. We should also do some similar work to Class Predictor.
  //this piece of code in c_api.c shows the way we pass an expandable cross-language parameter set from Python/R to C/C++
  API_BEGIN();
  auto param = Config::Str2Map(para meter);
  Config config;
  config.Set(param);
  OMP_SET_NUM_THREADS(config.num_threads);
  Booster* ref_booster = reinterpret_cast<Booster*>(handle);
  ref_booster->Predict(start_iteration, num_iteration, predict_type, data_filename, data_has_header,
                       config, result_filename);
  API_END();

As to control prediction behavior in Model Layer, I think there is a choice here:

add a new function as predict/predictRaw/predictContrib to Class Boosting and Class Tree

introduce a new Class named as PredictStrategy(to be determined), which is a wrapper class for Tree::Predict. We create a PredictStratgy object in Booster Layer and pass it down to Class Tree.

inline int Tree::GetLeafByMap(const std::unordered_map<int, double>& feature_values) const {
  int node = 0;
  auto decision_func = pred_strategy.getDecisonFunc(Decison);
  auto num_decision_func = pred_strategy.getNumericalDecisonFunc(Decision);
  if (num_cat_ > 0) {
    while (node >= 0) {
      node = decision_func(feature_values.count(split_feature_[node]) > 0 ? feature_values.at(split_feature_[node]) : 0.0f, node);
    }
  } else {
    while (node >= 0) {
      node = num_decision_func(feature_values.count(split_feature_[node]) > 0 ? feature_values.at(split_feature_[node]) : 0.0f, node);
    }
  }
  return ~node;
}

Consider that we may have some similar feature requests in the future, I currently think choice 2 is a more scalable option.
It seems this issue has no one working on it. I'd like to work on it and already have an preliminary scheme. May I have this issue assigned to me and some suggestions for my preliminary scheme? @jameslamb

Hi @suncanghuai , thank you very much for the detailed plan and careful thoughts! The scheme looks good to me, I think option 1 is better for now; option 2 could be left in the future if there are indeed more similar functions.
Please go ahead, and ping us if you have any further questions.


Add MonadFree and ComonadCofree

I need this for some comonads-as-spaces work I'm doing in purescript-pairings.
I think we ought to discuss how to properly give attribution for ported Haskell code before we merge this, since free is BSD-3 licensed which would mean switching this repo over to BSD-3 too, and then adding a section to the license file. Thoughts?

Another option here is to move liftFree (and tail) into the class, but that would be a breaking change.

Updated for 0.12 and the new license.

LGTM! 👍

Ok if I merge and tag a minor update then?

Sure thing... I meant to do so but got distracted :smile:


Set LDAP via configuration file

Hi!
We are trying to add an LDAP authentication source. I know it can be done via Admin Panel but was wondering if it possible to do it via configuration file as well?

Have you seen the add-ldap command line option? more info here: https://docs.gitea.io/en-us/command-line/

thanks @techknowlogick, that helped!
gitea gui/cli does not seem to have an option to pass on certs to it while adding an authentication source.
is there a plan to support those use cases where ldap strictly demands clients to present the certificates?

OK, so as far as I can see we would need to duplicate something like the below code from modules/graceful/server.go:
	config.Certificates = make([]tls.Certificate, 1)

	certPEMBlock, err := ioutil.ReadFile(certFile)
	if err != nil {
		log.Error("Failed to load https cert file %s for %s:%s: %v", certFile, srv.network, srv.address, err)
		return err
	}

	keyPEMBlock, err := ioutil.ReadFile(keyFile)
	if err != nil {
		log.Error("Failed to load https key file %s for %s:%s: %v", keyFile, srv.network, srv.address, err)
		return err
	}

	config.Certificates[0], err = tls.X509KeyPair(certPEMBlock, keyPEMBlock)
	if err != nil {
		log.Error("Failed to create certificate from cert file %s and key file %s for %s:%s: %v", certFile, keyFile, srv.network, srv.address, err)
		return err
	}

Are you suggesting that people paste in the key and the certificate directly into the GUI or would you have the key/cert pair in some standard position?

Hi,
If possible, I would have liked to be able to point out the location of the certs, that way they can be stored in a place which I deem safe (and I would not necessarily need to have duplicate certs on the same machine).


Confirm before exit

It is too easy to hit the ESC key and then have to wait to load all the notifications again.
Would it be possible to add a confirmation before escaping (where hitting escape again will cancel the exit)?

Excerpt from the fzf man page
# EXIT STATUS
         0      Normal exit
         1      No match
         2      Error
         126    Permission denied error from become action
         127    Invalid shell command for become action
         130    Interrupted with CTRL-C or ESC

We could modify the code to allow the ⎋ Escape key to be reassigned to another key combination, such as ⌃ Control + C (expanding #87).
diff --git a/gh-notify b/gh-notify
index cb3caff4928a..7b66d28fc8b1 100755
--- a/gh-notify
+++ b/gh-notify
@@ -40,6 +40,7 @@ GH_NOTIFY_PER_PAGE_LIMIT=50
 : "${GH_NOTIFY_VIEW_KEY:=enter}"
 : "${GH_NOTIFY_TOGGLE_PREVIEW_KEY:=tab}"
 : "${GH_NOTIFY_TOGGLE_HELP_KEY:=?}"
+: "${GH_NOTIFY_EXIT_KEY:=esc}"

 # Assign 'GH_NOTIFY_DEBUG_MODE' with 'true' to see more information
 : "${GH_NOTIFY_DEBUG_MODE:=false}"
@@ -164,7 +165,7 @@ ${WHITE_BOLD}Key Bindings fzf${NC}
   ${GREEN}${GH_NOTIFY_MARK_READ_KEY}   ${NC}  mark the selected notification as read and reload
   ${GREEN}${GH_NOTIFY_COMMENT_KEY}   ${NC}  write a comment with the editor and quit
   ${GREEN}${GH_NOTIFY_TOGGLE_KEY}   ${NC}  toggle the selected notification
-  ${GREEN}esc      ${NC}  quit
+  ${GREEN}${GH_NOTIFY_EXIT_KEY}      ${NC}  quit

 ${WHITE_BOLD}Table Format${NC}
   ${GREEN}unread symbol${NC}  indicates unread status
@@ -569,8 +570,8 @@ select_notif() {
             --color "header:green:italic:dim" \
             --color "prompt:80,info:40" \
             --delimiter '\s+' \
-            --expect "esc,${GH_NOTIFY_COMMENT_KEY}" \
-            --header "${GH_NOTIFY_TOGGLE_HELP_KEY} help · esc quit" \
+            --expect "${GH_NOTIFY_EXIT_KEY},${GH_NOTIFY_COMMENT_KEY}" \
+            --header "${GH_NOTIFY_TOGGLE_HELP_KEY} help · ${GH_NOTIFY_EXIT_KEY} quit" \
             --info=inline \
             --multi \
             --pointer="▶" \
@@ -590,13 +591,13 @@ select_notif() {
     # 2nd line: the selected line when the user pressed the key
     expected_key="$(command sed q <<<"$output")"
     selected_line="$(command sed '1d' <<<"$output")"
-    if [[ $(sed -n '$=' <<<"$selected_line") -gt 1 && $expected_key != "esc" ]]; then
+    if [[ $(sed -n '$=' <<<"$selected_line") -gt 1 && $expected_key != "${GH_NOTIFY_EXIT_KEY}" ]]; then
         die "Please select only one notification for this operation."
     fi
     IFS=' ' read -r _ thread_id thread_state _ repo_full_name _ _ _ _ type num _ <<<"$selected_line"
     [[ -z $type ]] && exit 0
     case "$expected_key" in
-        esc)
+        "${GH_NOTIFY_EXIT_KEY}")
             # quit with exit code 0; 'fzf' returns 130 by default
             exit 0
             ;;

Coupled with the GH_NOTIFY_FZF_OPTS assigned to ignore the ⎋ Escape key press, it would not exactly fulfill your request, but it would definitely make it more difficult to accidentally close the list.
GH_NOTIFY_FZF_OPTS="--bind 'esc:ignore'" GH_NOTIFY_EXIT_KEY="ctrl-c" gh notify -an 20

Could you check out #98 and see if the behavior is acceptable?
GH_NOTIFY_FZF_OPTS="--bind 'esc:ignore'" GH_NOTIFY_EXIT_KEY="ctrl-c" gh notify -an 20


underline code that is a link and remove when hover, fixed a hovers

Fixes #29

Thanks, @evans! Really appreciate you filing this PR for master too.


Added new open source tool: ETCD Manager

Just added this new tool:
ETCD Manager is a new, modern multi-platfiorm ETCD GUI. It is written in VueJS and it uses Electron.

This PR has been opened a week ago and there is no progress.
Could you please merge it or tell me what's wrong?

Just updated the URL.
The project is now sponsored by a company, so we moved it to a different repo. Of course, it's still open source and free stuff.

@kazupon
Could you please check this out? If changes are required please let me know.
Thanks in advance!

@LinusBorg
Could anybody please look into this? This PR has been opened while ago and there seem to be no activity at all..
Thanks in advance!


ruby: remove build references from cross compiles

Motivation for this change
Cross-compiling ruby pulls the host/build "baseruby" into the resulting closure, as well as bash, grep, coreutils... There's already a cleaning step for useRailsExpress, so I added a similar one for cross too.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

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

[ ] Fits CONTRIBUTING.md.

Can we just always do this, and add the baseruby to disallowedRequisites to enforce it?

Can we just always do this, and add the baseruby to disallowedRequisites to enforce it?

baseruby isn't passed in the case of a native compile, so it still needs to at least be partially conditional. Do you mean we can just unconditionally sed out the CONFIG["BASERUBY"] lines because they presumably won't exist anyway? And likewise with the other coreutils entries?

(not really sure if this is what requested but I added a commit to simplify/generalize the baseRuby handling. will target staging since this causes massive rebuilds now)

@ofborg eval

4ac0f8e045b31feac792bd39fa26e5f12dc18fe7 was intended to address a failure borg revealed on darwin but now it won't build at all due to timeouts. I don't have a darwin machine to test on. I could just use disallowReferences = op (!stdenv.isDarwin) baseRuby instead?


added HIP backend for activation layer

Added HIP backend option for activation layer which uses MIOpen

@kiritigowda : merge this after merging PR#575

CI set - http://math-ci.rocm.amd.com/blue/organizations/jenkins/compute-rocm-dkms-no-npi-hipclang%2FShort-GPUOpen%2FMIVisionX/detail/PR-576/1/pipeline


Added UI

Added UI which gives information about the bot and allows the user to change settings easily.

Couple of things that will need rearranging but I'll take care of that. Thanks alot!


Native authenticator app for Ubuntu for Phones/Tablets

Original issue 250 created by florian.kiersch on 2013-02-19T18:26:17.000Z:
With the upcoming release of flashable images of Ubuntu for Phones/Tablets there will likely be an increasing interest in a native Google Authenticator for those platforms.
Considering that the first devices that work with these versions of Ubuntu are all Nexus devices, there is a high probability that the user of such a device actually has a Google account to protect with two-step authentication.
In addition Ubuntu being a linux distro should make it considerably easier to get the app ported in comparison to e.g. Windows Phone.

This is very old, but I suppose should be closed now. There has been a native app for HOTP/TOTP on Ubuntu for phones for quite some time now. It is now in the new Open Store at https://open-store.io/app/authenticator-ng.dobey

Thanks.


Makes WARMUP_COUNT_TOLERANCE and MISS_COUNT_TOLERANCE configurable

This pull request makes the constants WARMUP_COUNT_TOLERANCE and MISS_COUNT_TOLERANCE configurable via aframe parameters.This makes it possible to tune the settings for each project.
Should be backwards compatible since the original constants will be used as defaults.

added in v1.1.3
example use:
https://github.com/hiukim/mind-ar-js/blob/23e505d98e8dc5c8c0a791502b3425b1ae2b609d/examples/image-tracking/example4.html#L28


[Bug]: Allow pull timeout configuration

Module
Core
Testcontainers version
1.20
Using the latest Testcontainers version?
Yes
Host OS
All
Host Arch
All
Docker version
Latest

What happened?
During CI build there is an exception when pullImage takes over than 2 minutes
Is it possible to allow pull timeout configuration (by env variable) to allow more than 2 minutes pulling ?
Relevant log output
No response
Additional Information
No response

I want to take this issue, can you please assign this to me?

@arnaud-thorel-of please review this.

@arnaud-thorel-of can you please review the PR?


Refactor raftexample using interfaces to better separate concerns

This is a re-roll of https://github.com/etcd-io/etcd/pull/15471 on top of https://github.com/etcd-io/raft/pull/67. It is almost identical to the original PR, with the following exceptions:

The changes have been adapted to apply against the files in this repository instead of etcd-io/etc, and directory raftexample instead of config/raftexample.
It starts with two preparatory commits to get go build -o bin/raftexample ./raftexample, go test -race ./raftexample/..., and golangci-lint run running without errors on Linux. (Those tests also run cleanly against every subsequent in this patch series.)
A few things have been changed to keep the linter happy.

For convenience, the following top-level explanation of the changes is copied from https://github.com/etcd-io/etcd/pull/15471:
I come to etcd by way of evaluating go.etcd.io/raft for use in a project. When I saw that there was a sample application raftexample showing how to use the module, I started reading it, hoping that this would make it obvious what components I would have to implement to use raft in my own application.
But unfortunately, it wasn't easy to figure that out from the source code of raftexample. True, it provides a nice end-to-end example. Also, raftNode is a fairly nice abstraction, showing how to deal with the channels going into and coming out of the raft library. But I didn't find the interface between raftNode and the "application code" super transparent. For example,

It is not obvious what features the Snapshotter must provide.
It's hard to see the boundary between the raft code and the finite state machine being driven by it. kvstore is the FSM, but it also does things like read straight out of raft-managed channels and interact directly with the snapshotter.
httpKVAPI contains a pointer to the whole kvstore, even though it really only interacts with its "public" interface, Propose() and Lookup().
The design forces an awkward initialization step, where main() creates a getSnaphost function that closes over an initialized variable (kvs) then passes that function into newRaftNode(). That function returns a shapshotterReady <-chan *snap.Snapshotter channel from which main() reads a Snapshotter. It was unclear how much of this was essential complexity and how much could be avoided. (It turns out that most of this complexity can be avoided.)
newRaftNode() returns commitC, which is handed on to newKVStore() and read from a goroutine in that type. It seems like it would be simpler for raftNode to read from commitC and invoke kvstore methods to trigger commits.
newRaftNode() returns errorC, to which it writes an error if there is a problem. But multiple pieces of code try to read from that channel, and the semantics of Go channels make it indeterminate which one will discover that there was an error. (In general, error reporting is somewhat inconsistent.)

This PR consists of a series of refactorings that attempt to fix a bunch of the problems listed above:

It introduces a few interfaces and uses them to better separate concerns:

SnapshotStorage represents permanent storage for snapshots. It only needs to know how to read and write them:type SnapshotStorage interface {
    SaveSnap(snapshot raftpb.Snapshot) error
    Load() (*raftpb.Snapshot, error)
    LoadNewestAvailable(walSnaps []walpb.Snapshot) (*raftpb.Snapshot, error)
}

FSM represents the finite state machine that raftNode is able to drive. It only has to know how to take and restore snapshots and to apply commits:type FSM interface {
    TakeSnapshot() ([]byte, error)
    RestoreSnapshot(snapshot []byte) error
    ApplyCommits(commit *commit) error
}

KVStore represents the interface that httpKVAPI uses to interact with the key-value store. Note that this interface only exposes application-level concepts and doesn't really expose anything about raft, but internally it has to know how to serialize its calls into log entries that can be managed by raft:type KVStore interface {
    Propose(k, v string)
    Lookup(k string) (string, bool)
}

kvstore now presents a KVStore face to httpKVAPI and a FSM face to raftNode, but itself is now a passive type (no internal goroutines).

Now raftNode implements more of the raft data flows internally; in particular, its ProcessCommits() method reads commits from commitC and applies them to the kvstore via the FSM interface.

Now main() creates the snapshotter and passes it to raftNode. This eliminates the complexity of snapshotterReady.

raftNode now has Done() and Err() methods (replacing the errorC channel) that the caller can use to find out when it is done and whether it experienced any errors.

I think these changes make the code easier to read, and more importantly, make it easier for the reader to figure out would they would have to change to use the raft module within their own application, even if that application doesn't happen to be a key-value store.
This is a long patch series, but each commit is a self-contained step, meant to be readable/reviewable independently, and the tests pass after each commit. I'd be happy to break it up into multiple smaller PRs if that is preferable.
Along the way I fixed a couple of other minor problems, such as the ambiguity about error reporting mentioned above, and in the strange TestProposeOnCommit() test. See the commit messages for more information.
I only changed code within raftexample. But within that package, I have changed some internal interfaces. I assume that since this is just demonstration code, there are no backwards-compatibility promises made about this package. For the same reason, I have introduced some interfaces where there were none before, which will probably decrease performance very slightly and maybe force a few more allocations. Again, my goal was to make the code easier to understand, and I assume that preserving uncompromising performance is a lower priority than clarity.
I think that some further refactoring would be nice, to better delineate the interfaces between raftNode and the write-ahead log, and perhaps between raftNode and the transport layer. But I'll wait to see how this PR is received before proceeding.
I hope this is helpful!
/cc @Elbehery

Really nice job and useful to beginners! Can we PR this into main branch？


You are being redirected / Javascript is required. Please enable javascript before you are allowed to see this page

Hello, I have the next code in shell script
#!/bin/bash
func_scrape() { V_SCRAPE_URL="$1"
cat <<EOF
-- coding: utf-8 --
import cfscrape
headers = {"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36"}
scraper = cfscrape.create_scraper(delay=20)  # returns a CloudflareScraper instance
print scraper.get("$V_SCRAPE_URL", headers=headers).content
EOF
}
But where I executed, view the next error:
func_scrape "https://www.divxtotal3.net/series-16" | python
You are being redirected...
Javascript is required. Please enable javascript before you are allowed to see this page.

It is the equal error, if I execute with command curl
curl -sk https://www.divxtotal3.net/series-16
You are being redirected...
Javascript is required. Please enable javascript before you are allowed to see this page.

I am use the last version to cloudflare-scrape with python2.7
pip show cfscrape
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Name: cfscrape
Version: 2.0.7
Summary: A simple Python module to bypass Cloudflare's anti-bot page. See https://github.com/Anorov/cloudflare-scrape for more information.
Home-page: https://github.com/Anorov/cloudflare-scrape
Author: Anorov
Author-email<EMAIL_ADDRESS>License: UNKNOWN
Location: /usr/local/lib/python2.7/dist-packages
Requires: requests
Required-by:
The nodejs is the last version
nodejs -v
v11.15.0
and the curl is
curl --version
curl 7.52.1 (arm-unknown-linux-gnueabihf) libcurl/7.52.1 OpenSSL/1.0.2r zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
My OS is raspbian strech.
Any ideas on how to solve the problem? Thanks

Oh wow, I thought Cloudflare had retired that code a long time ago... Looks like it'll have to be added back in...

I might have spoke too soon. I'm not sure if this is related to Cloudflare...
I'll try to poke around a bit more at a latter time.

This isn't Cloudflare related.
There is some code to handle this in another Cloudflare scraping library of which I am a contributor. I was thinking about removing the bits that handles this, a method called setCookieAndReload. It wouldn't handle this particular case anyway because, as it turns out, this isn't Cloudflare related at all.
I'm curious as to have often people encounter these but it's unlikely that the capabilities to handle this would be added here. Still, feel free to open another issue for a feature request.


Remove legacy workflow

I'm submitting a ...

[ ] bug report

What is the current behavior?
Obsolete workflow pages build and deployment runs (and fails) on github actions no matter whether I've deleted the workflow. Needs deletion.

What is the expected behavior?
No pages build and deployment  workflow at all.

What is the motivation / use case for changing the behavior?
Cleanup.

Resolved by navigating to Settings -> Pages, and changing Build and Deployment source to Github Actions, then deleting all the unwanted legacy workflow runs.


[Feature Request] The role of observation_spec and output_spec

The current state of things
Currently, the output of an env is described by an output_spec
output_spec{
     done -> done_spec
     reward -> reward_spec
     observation -> observation_spec{
               observation -> real_observation_spec
     }
}

What is the problem?
In my opinion this might be confusing because:

The observation spec must be composite and have an observation key
The output_spec is just an container of predetermined specs. In fact, if you look at https://github.com/pytorch/rl/blob/main/torchrl/envs/common.py#L791, you can see that even if you added new keys to output specs, these are not considered in the fake_tensordict, giving errors in the code when those keys will be present in tensordicts and not expected.

As a result of 2 (but also as a choice in the library design) all extra info coming from the environment MUST be placed in observation_spec.
For example, your env may output infos like bitcoin_cost_of_action_taken which you may not want to put under observation_spec as it should not be an observation, but just a metric.
Possible solutions
Option 1
Just fixing issue 2 by enabling to add other keys to output_spec which are infos that are not observations.
Option 2
To fix 1 and 2 we can think of this:
Since we now enforce observation_spec to be composite and have an observation key, why not enforcing directly output_spec to be composite (which is already) and have an observation_spec (in the same way as reward and done) which can be any spec.
Therefore, users can decide where to put their infos.
For example let's say that my env outputs 3 keys: stock_price, bitcoin_cost_of_action_taken and number_of_stocks_sold.
Normally, I would have to put them all under the observation_spec and decide which one to call observation. But altrenatively I could act in the following ways:

Case 1: I want my observation to be stock_price and the rest to be infos. Then I create an observation_spec which is non composite with the bounds of stock_price and I return tensordicts with the "observation" key and the value corresponding to stock_price . I put bitcoin_cost_of_action_taken and number_of_stocks_sold as keys in output_spec.
Case 2: I want my observation to be stock_price and number_of_stocks_sold and the rest to be infos. Then I create an observation_spec which is composite and has keys stock_price and number_of_stocks_sold and I return  tensordicts with these keys and their values. I put bitcoin_cost_of_action_taken in output_spec.

In this solution, to check what are my observations I would look at observation_spec.

If it is non composite I know that my observation is simply the one under the "observation" key in a tensordict
If it is composite I will look for the respective keys  in the tensordict (this still allows to have one key named "observation" but this could also not be the case)

Since we now enforce observation_spec to be composite and have an observation key, why not enforcing directly output_spec to be composite (which is already) and have an observation_spec (in the same way as reward and done) which can be any spec.

This is not possible for the following reason:
it is common to have an env that returns a single obs, say
env = GymEnv("Pendulum-v1")

Now following this logic this should have
output_spec = {"observation": BoundedSpec(...), "done": ..., "reward": ...}

Now say I want to render my env in the same script. I have
env = GymEnv("Pendulum-v1", from_pixels=True)

with
output_spec = {"observation": {"state": BoundedSpec(...), "pixels": ...}, "done": ..., "reward": ...}

This becomes very confusing and impractical: I need to tell my actor what to do when the env returns pixels and when it doesn't, which is peculiar to say the least.
There are many similar cases but the idea is essentially that we need observation to be a composite and to unpack it. If you have another way of making the above example work seamlessly (ie without headache for unexperienced users) and that is more elegant i'm glad to read it!

For the rest I'm happy with having anything custom in output_spec, we can fix fake_tensordict to accomodate that.

Thanks for writing that down, I remembered that we discussed it but I had forgotten the specific example.
we could have what you wrote above and just instead of calling the key “state” in your example we would call it “observation” this would let the actor know that that is the key that corresponds to the uncomposite obs spec in the normal case
So that the only thing that from_pixel does is extending the observation spec by making it composite, putting the observation in the observation key and adding a new key “pixels”.
this is for the case that pixels are for input to the neural network. for just rendering, pixels would be added to the output spec and the obs spec left untouched

but we don't make the observation spec private!
Here just because you call from_pixels=True you change the nature of your
spec, that does not seem right to me, especially if on the other side your
input/output structure is unchanged. It becomes quite counter intuitive IMO
On Mon, 17 Apr 2023 at 21:47, Matteo Bettini @.***>
wrote:

Thanks for writing that down, I remembered that we discussed it but I had
forgotten the specific example.
we could have what you wrote above and just instead of calling the key
“state” in your example we would call it “observation” this would let the
actor know that that is the key that corresponds to the uncomposite obs
spec in the normal case
So that the only thing that from_pixel does is extending the observation
spec by making it composite, putting the observation in the observation key
and adding a new key “pixels”.
this is for the case that pixels are for input to the neural network. for
just rendering, pixels would be added to the output spec and the obs spec
left untouched
—
Reply to this email directly, view it on GitHub
https://github.com/pytorch/rl/issues/1068#issuecomment-1512064460, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AGCY4GW3BPGZDZACUGB6BUTXBWT6ZANCNFSM6AAAAAAXBNDKLY
.
You are receiving this because you were assigned.Message ID:
@.***>

I didn’t get the point about privacy.
But doesn’t from_pixel=True change the input/output? It adds a new pixel env output for the neural network to use, so there are more observations now cause you have the pixels too.
if the pixels are only for rendering and are not to be considered an obs, that key can just be added to the output spec
Btw, i am also down to just go with solution 1 like you said. I am just poking to see if we can brainstorm an idea for solution 2

Another option is to treat observation_spec like the one that is give and never modify it and operations like from_pixels always add stuff just to the output_spec.

Another option is to treat observation_spec like the one that is given and never modify it and operations like from_pixels always add stuff just to the output_spec.

I think that would be very surprising to multiple users. What is a pixel if not a an observation? In atari (always from pixels), you would put the pixels out of the observation spec? Or you would have pixels sometimes there sometimes somewhere else? How would ToTensorImage know where to fetch the pixel spec to transform (in output or observation)? Seems like a lot of headaches to me.

aka observation_spec just becomes the content of observaton_spec[“observation”] and the rest goes in output_spec
this follows your philosophy even more as we do no modifications at all to observation_spec with from_pixel
users will know that if they ask for extra pixels they will find them in output_spec[“pixels”] and they can decides what parts of output_spec to add to their nn input according to their liking

I disagree, I think user won't "know" anything and will be surprised to find pixels in output and not observation. Most user won't care about env.output_spec and will only look at env.observation_spec IMO.
What I still don't get is what is the problem of having extra stuff in observation spec? Why do we need extra levels of complexity?
It seems to me that if we start saying "we put step_count in output_spec, info in output_spec["info"], the trajectory id in output_spec["traj_id"], the pixels in output_spec["observation", "pixels"]..." we're going to have to document a lot of opinionated choices that will scare people off.
IMO it's much easier to just say "outpu_spec contains the done, reward and observation. observation contains everything else." It's a one liner that is loosely restrictive (since you can put whatever you want in observation spec anyway).
I think the confusion is just about the term "observation". If that is the problem let's rename it data or give an alias with whichever name the community thinks is fit. But a naming issue should not add extra levels of complexity to an env class that is already hard ot maintain in its current state...

Ok, well it was good to write down this conversation anyway so maybe in the future users can weigh in.
From a retrocompatibility of user mindsets I think having both infos and observations in the observation spec is surprising and the same goes for the forced observation key.
About solution 1, is it ok if I make a PR to allow extra keys in output_spec or now we want to keep it forcibly only contain reward, done and obs?
Cause now the fake_tensordict function causes bugs when users add more keys to their output spec

I agree it's good to have these discussions
My TLDR is:

I agree that the current state is suboptimal and could be improved
I agree that the "observation" name is confusing
Any solution would need to satisfy these items:

it must be bc-compatible
it must be simple: GymEnv(..., from_pixels=True) GymEnv(..., from_pixels=False) must have the same spec structure, and the same output structure (we can't have the state suddenly moved in a nested dict)
I don't think it is wise to always have states written in tensordict["next", "observation", "pixels"] or smth like that (this is what the expansion of observation_spec at the root level is supposed to address) because that would be unintuivite for many users. The "basic" user will wonder why a single state is nested three levels down in the tensordict.
the solution needs to be transparent: if "pixels" is in observation_spec, and I apply a transform to these pixels, the resulting entry should still be in observation_spec. In general Transforms should not be more complex if we refactor this (ie I'm not in favour of CatTensors(..., spec_dest="output") bc it's going to be a nightmare to maintain).

Things I'm not sure about:

I decided to put the StepCounter output in observation_spec. It is not an observation, but if we start to say "step_count goes in output_spec, infos go in output, transforms of obs go in observation, ..." i'm afraid that we'll end up to a place where we need to make quite opinionated choices that will require our used to dig in the doc to find the relevant information. Putting everything in observation_spec is convenient. Example: for decision transformers we cat "obs" "action" and "reward". This creates a new item to feed to the policy. Where should its spec go? Bc if I stack "joint-position" and "joint-speed" from a robot, I expect this tensor to live in observation spec. So what is the rule to put the result somewhere else, and more importantly, how can we make that transparent?

env.append_transform(CatTensors(in_keys=["action", "obs", "reward"], out_key=["new_obs"])) # where should the "new_obs" spec go?
env.append_transform(CatTensors(in_keys=["join-pos", "joint-speed"], out_key=["new_obs"])) # where should the "new_obs" spec go?

Same for info-keys. I understant that these are not obs, but how can we be transparent about why we put them somewhere else? What if they are used as state for training?

I don't want to give the impression that i'm against refactoring this, actually i don't like it either
it's been tickling me for quite some time
but IDK what to do that wouldn't break things apart or make the UX of basic users worse


Shapes Modifications -- Add Point Type functionality

Pull request
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
Please ensure you have read and noticed the checklist below.
Checklist
Put an x in the boxes that apply. If you're unsure about any of them, don't hesitate to ask. We are here to help!
This is simply a reminder of what we are going to look for before merging your code.

[x] I have read and noticed the CODE OF CONDUCT document
[x] I have read and noticed the CONTRIBUTING document
[x] I have added necessary documentation or screenshots (if appropriate)
[x] I have tested my changes or additions for proper functionality.
[x] I have followed, as best as possible, the same function layout and coding style of other existing functions/code.

Types of changes
Please check x the type of change your PR introduces:

[ ] Bugfix (change which fixes an issue)
[x] Feature (change which adds functionality)
[ ] Code style update (formatting, renaming)
[ ] Refactoring (functional, structural)
[x] Documentation content changes
[ ] Other (please describe)
**	|-->:

What is the current behavior?
Please describe the current behavior that you are modifying, or link to a relevant issue.
**	|-->:

We were unable to modify and add specific Shape Point Types, such as symmetrical.
Certain Line type shapes weren't inserted in a curved form.

What is the new behavior?
Please describe the behavior or changes that are being added by this PR.
**	|-->:

Symmetrical Point types can now be added.
Line type shapes are now more curved.

Influences and relationship to other functionality
Describe how the changes will affect other functions, potential script breaking changes, etc.
**	|-->:

Smooth type shape points aren't able to be inserted, and any present within the shape are reverted to "Normal" when modified. I am unable to fix this as I can't even insert Smooth point types. Libre Office limitation?

Additional context
Add any other context about the problem here.
**	|-->:
System under test
Please complete the following information.

OS: [e.g. Windows 10]
OS Arch.: [e.g. X64]
LibreOffice Component [e.g. Main, Writer, Calc, ]
LibreOffice version [e.g. <IP_ADDRESS>]

This should be my last modification to shapes, for now anyway. Shapes, and Shape Points are tricky to deal with. If we get many complaints regarding them, I'm thinking we could just remove the functionality, as they are complex to deal with.
Sorry for the rat's nest of code, it took a lot of head banging to get it all to function at least half correctly, and I'm sure there are probably many ways to break it I haven't discovered yet. Any suggestions or criticism is welcome.


Improve text visibility

Issue
I started to work with this module and wanted to test graphics in the NHD-2.7-12864WDW3-M it's a 128x64 display and I did the following code to setup custom fonts and I found it here #247.
from PIL import ImageFont
FontTemp = ImageFont.truetype("./TestFont.otf",16)
draw.text((0, 0), "Example Text", font=FontTemp)

Type of Raspberry Pi
Raspberry Pi 4
Linux Kernel version
Linux raspberrypi 5.4.51-v7l+ #1327 SMP Thu Jul 23 11:04:39 BST 2020 armv7l GNU/Linux
Expected behaviour
A better visibility and smooth letter writing in the display
Actual behaviour
The problem is that the expected font's visibility is not the best and I want to know how I could improve this without having to use the legacy text used in the module like LCD_FONT, SINCLAIR_FONT. In smaller displays like the adafruit SSD1306 works great but this one since use the same resolution I think is when the problem starts to grow.... Do you have any idea about how to improve the text visibility?
I tested all the fonts included in the luma.examples repository but none of them improves the results.

You dont say which driver class you are using ... lets presume ssd1325 as I suspect that your device is a greyscale display based on the image, and so Pillow is trying to anti-alias when drawing the font. You can force it to be monochrome (mode=1 rather than RGB) when you initialize the class, e.g. something like:
device = ssd1325(serial_interface=spi, mode="1")

Issue #280 may also give you some background context.

Hi and sorry about that!, You're right. I'm actually using the ssd1322_nhd driver.
Thanks to your suggestion, I did have an improvement.
self.device = ssd1322_nhd(self.serial, mode="1", width=128, height=64)

Glad you got it working! 👍


Fix New Warnings; Drop OpenSSL Hyper Feature; Bump Hyper Minor Versio…

…n; Bump Patch Version

Coverage remained the same at 91.157% when pulling b9ad96fbce9d8bf7782d89645bfd39064030f3a0 on drop_openssl_requirement into 5c57cb2e6e4a126de364a8bd9a80a7013fb452b9 on master.


[test] just to check that disabling ipsec heals the test

Test pr

Closing as not needed anymore (this was a test PR).


Warning: not found: compass Use --force to continue.

I am trying to use electron-preferences in an application but am getting the following error:
Warning: not found: compass Use --force to continue.

Aborted due to warnings.
npm ERR! code 3
npm ERR! path /Users/daryl/Projects/Electron/electron-preferences
npm ERR! command failed
npm ERR! command sh -c npm run build

npm ERR!      /Users/daryl/.npm/_logs/2021-04-25T17_51_48_353Z-debug.log

Any help would be greatly appreciated, thanks!
Regards,
Daryl

Hi @daryl-williams
Building electron-preferences currently has a dependency on 'compass' (there's issue #63 which will resolve that).
So if you want to build the project yourself, you should install compass (https://rubygems.org/gems/compass/) and ruby (if not yet installed: https://www.ruby-lang.org/en/documentation/installation/)
However, if you just want to use electron-preferences in your current project, I suggest installing the prebuild versions via NPM.
Just run npm install electron-preferences in your project folder.


Increase stability on click

Capybara checks visible? before clicing the node.
Current implementation checks visibility without checking it the element is attached or not. Thus, it causes error:
Failures:

  1) Example search capybara
     Failure/Error: @element.click(**click_options.as_params)

     Playwright::Error:
       Error: Element is not attached to the DOM
       =========================== logs ===========================
       attempting click action
         waiting for element to be visible, enabled and stable
         element is visible, enabled and stable
       ============================================================
       Note: use DEBUG=pw:api environment variable to capture Playwright logs.
     # ./lib/capybara/playwright/node.rb:345:in `click'

CI failure is caused by breaking change Playwright 1.11->1.12.
It is fixed in another PR.


Single-byte characters are  entered twice in Japanese IME on Firefox

monaco-editor version: 0.15.6
Browser: Firefox 65.0.1 (64-bit)
OS:  Windows 10
When I select a single-byte characters in IME on Firefox, the selected characters is entered twice.
It does not occur with double-byte characters.

Fixed via 83f000df03411224969a37415cb4719ded6265ba

@wumf-terra this is fixed, can you verify?

Thank you for fixing it.
@roblourens
Sorry.
This fix has not been released. I can't confirm because I don't know how to npm install monaco-editor that is applied this fix.

Verified on Firefox by testing on https://vscode-web-test-playground.azurewebsites.net/


Full scripts for training

Hello，could u please provide a few samples of your training data and the full scripts for training?
Thanks

Hi, thanks for your attention.
Releasing of our full scripts for training is scheduled after this paper is accepted.

I read the training code. Method supervised_training_iter takes image, trimap and gt_matte.
To generate trimap I wrote next code:
def makeEdgeMask(mask, width):
    kernel = np.ones((width,width), np.uint8)

    erosion = cv2.erode(mask, kernel, iterations = 1)
    dilation = cv2.dilate(mask, kernel, iterations = 1)

    return dilation - erosion

def makeTrimap(mask, width = 5):
   edgeMask = makeEdgeMask(mask, width)
   trimap = mask.astype(np.float)
   trimap[edgeMask == 1] = 0.5
   return trimap

@lrjj, may be that will help you.
In my case code training technically works - semantic, detail and matte losses become very low:

But generated masks are incorrect.
As training data I took 640x480 CocoDataset images.

Hello, if it is convenient, could you please send me a copy of your training script?Thank you very much.

哈喽 我实现了一个完整的训练代码 用的是bg的数据 效果不好 欢迎一起探讨一下


Add first user checklist as part of online help or pop-up text

This is a Feature Request

What would you like to be added
First-time contributors must be able to navigate to/refer to the online help or an inline description feature - that helps them with their first check-in.
Why is this needed
Now: First-time contributors check-in their updates and due to lack of CLA or other missing items - the check-in does not get accepted.
What is needed: A small "i" beside each field describing what the pre-requisites are.
Comments

I don't think it's feasible to change GitHub to work the way you're asking @jyerramilli
We do already have a “Details” link, and we can try to make sure that clicking on Details tells people what they need to know.

@jyerramilli : I'll be closing out this issue since there has been no feedback/suggestions forthcoming from your side regarding the comment by Tim. Additionally, we can't change GitHub as mentioned in the comment. If there's any further clarity required, please feel free to reopen the issue and chime in.
/close


Add type hints for @typechecked

Adds a py.typed marker file to indicate pytypes has type hints (see PEP 561), and adds type hints for @typechecked. These type hints are added in a separate pyi file to help with compatibility for python 3.3 & 3.4, since inline type annotations are a syntax error for those versions.
~The fixes in typechecker.py were for issues flagged by the typechecker and shouldn't change the behavior of the code at all. They may not be strictly needed since type hint resolution order is supposed to check *.pyi files before their associated *.py files.~
EDIT: Dropped the type checker fixes. They were more trouble than I expected and probably not needed.
Fixes #74.

This breaks too many tests. Please try if reverting the lines I commented fixes this. One would thing it cannot be caused by anything else as the asserts etc are not invasive. But then there was the recent incident with the blank line breaking a test...

This breaks too many tests. Please try if reverting the lines I commented fixes this. One would think it cannot be caused by anything else as the asserts etc are not invasive. But then there was the recent incident with the blank line breaking a test...

Yeah, you're right, sorry for the noise. I think I'm going to drop all the little fixes from this PR since any remaining improvements are pretty minor by themselves.
Besides that, I'm also updating the pyi file to be more complete and include types for no_type_check. I don't understand from the docs I've read what behavior things will give if something's defined in .py but not in .pyi. I worry that it'll start complaining "module 'pytypes.typechecker' has no attribute 'foo'" where it originally had more self-explanatory "No such module pytypes". I'm not sure if that's going to be a pain to keep up-to-date, but I suspect it won't matter much either way, if you're game to push to pypi and see if it's an improvement in practice.

Would it work to make this a pytypes.pyi rather than a typechecker.pyi? pytypes imports all relevant bits and makes them available as pytypes.xxx, e.g. pytypes.typechecked. This would allow for a clean distinction:
everything directly available in pytypes would have type-annotations (ideally, one day) while other stuff is considered internal. Or does the static typechecker strictly require the pyi to traget the location where the functions are actually implemented?

Yeah, that's fair, I agree that's probably the way to go. Let me look into that and update you when it's ready for another look.

I have second thoughts on the pytypes.pyi idea. IIRC stubfiles are supposed to match the functions and classes as implemented in a module, not imported stuff. Stubfiles are really meant to augment code in static sense while imports and aliases are runtime stuff. So, probably it's best to proceed according to your initial proposal.
At first glance I thought this could solve the issue with annotating functions from type_util, e.g. is_subtype (alias for type_util._issubclass). Traditionally, type info for these functions causes infinite runtime typecheck recursion in profiler mode.
I guess the best solution would be to go from
from type_util import _issubclass as is_subtype
to
from type_util import _issubclass

def is_subtype(...): #with type annotation
    return _issubclass(...)

but anyway, that's beyond this PR. Just explaining my reasoningthat led to the idea with pytypes.pyi.

I suppose there is a way to let mypy validate whether the pyi file still fits to the corresponding py file. E.g. whether all functions and classes are present, and if the signatures match. If you have the right command at hand, I would like to note it down for pre-release checks to avoid a change in the py file was forgotten to be applied in the pyi.

I suppose there is a way to let mypy validate whether the pyi file still fits to the corresponding py file.

Looks like no per python/mypy#5028. What I'd done is used stubgen to create a skeleton pyi file and then modified it to add the desired type hints. I could probably formalize it with a quick script to generate and patch a fresh pyi file based on the latest .py file changes. There doesn't seem to be a good automated way to detect discrepancies, though.

Isn't there a (simple) way to get mypy in case of an invalid stubfile produce these little "no such attribute" errors you mentioned?
I assume this would not catch every possible incompatibility but it would be a handy consistency check.

There doesn't seem to be a good automated way to detect discrepancies, though.

Maybe we should consider to add such kind of thing to pytypes. It's intended to host useful utilities for typing, actually.
I think stubfile_manager already does some portion of this. I think it would error if the pyi defines something that is not in the py file (including methods and other OOP constructs and nested classes which were especially painful to get right I remember). However, it does not check the "totality" aspect ATM. Also, I am not fully sure what could and should be done in terms of signature checking. I guess the result of inspect.get(full)argspec should be similar between every py and pyi defined function and method. Or is that too restrictive?

Isn't there a (simple) way to get mypy in case of an invalid stubfile produce these little "no such attribute" errors you mentioned?

The "no such attribute" errors I mentioned were from calling code referencing pytypes code that wasn't in the pyi. The unsolved problem is comparing the .py to the .pyi and noticing discrepancies like missing functions, wrong number of params, etc.

Maybe we should consider to add such kind of thing to pytypes. It's intended to host useful utilities for typing, actually.
I think stubfile_manager already does some portion of this.

Good idea! I filed issue #100 for this. I hadn't seen anything about stubfile_manager yet and can't find any usage notes on it. Sounds like I should look into what it can do.

I hadn't seen anything about stubfile_manager yet and can't find any usage notes on it. Sounds like I should look into what it can do.

It's just internal and hardly documented. It locates stubfiles and attaches the types therein to the members of the original module. It is the motor of @annotations.
Unfortunately it predates PEP 561 and only locates stubfiles "naively" by the logic and heuristics that were common before PEP 561. It's a long-standing todo to implement PEP 561 here properly.

Sorry to bother again. I already thought it could be merged, then the two cleanup comments occurred to me...

K, should be 100% good to go now. Take a look.

Thanks for working this through!


Update MD file on new branch 2017-25-15_16-11-36

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestCon.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


revert: revert to 3.10-canary

This commit makes template changes for
3.10 release branch to use 3.10-canary tag.

@mergifyio queue

/test ci/centos/mini-e2e/k8s-1.26


Materials lost when transform a SnapshotDb to another by using core-transform

Describe the bug
I try to transform a SnapshotDb to another, but materials lost.
And then, I try to transform it to an empty SnapshotDb，materials get lost and error.
To Reproduce
Steps to reproduce the behavior:

Convert House_Model.dgn to a local house.bim file. And do same thing with testY1.dgn.
Build an iModelTransformer with<EMAIL_ADDRESS>Excute iModelTransformer.processAll( house.bim, testY1.bim, no options),
When transform done, excute targetDb.saveChanges( )
Open the targetDb in view, and could see the materials lost.

Expected behavior
Materials exist and be correct.
Screenshots
The house.bim view :

The result.bim view: (materials get lost)

If transform to an empty db, and view: (roof material lost, wall and steps meterial error)

Desktop (please complete the applicable information):

iTwin.js Version [3.4.4]

Additional context

Did you try with the latest version (3.6)? @MichaelBelousov

I have tested<EMAIL_ADDRESS>just now and materials still get lost.

@fatalstar I'm sorry for missing this. The transformer has moved to a separate repository, so I will make an issue there and close this one if that's OK. Texture loss should have been fixed by #5059.

@fatalstar I'm sorry for missing this. The transformer has moved to a separate repository, so I will make an issue there and close this one if that's OK. Texture loss should have been fixed by #5059.

Sure, thanks for that!


Check edits before written to manifest

Now we check edit validity after written to manifest. That is to say, if the validity check does not pass for some edits, then the restart of Titan would always fail because the invalid edits are ready written to manifest.

PTAL @yiwu-arbug @GlitterIsMe

Codecov Report

Merging #37 into master will increase coverage by 0.07%.
The diff coverage is 80.35%.

@@            Coverage Diff            @@
##           master     #37      +/-   ##
=========================================
+ Coverage   84.12%   84.2%   +0.07%
=========================================
  Files          43      43
  Lines        2577    2614      +37
=========================================
+ Hits         2168    2201      +33
- Misses        409     413       +4

CI failure is irrelevant, so merge


hook method appears to be missing the final character

my understanding is that the introducer for a device control string should follow the same syntax as a csi sequence, which means that the final character is used to determine the operation to perform. the hook method in the Perform trait doesn't receive the final byte though (like csi_dispatch does), so this doesn't appear to be possible.
(it's possible that i'm confused about something here - i don't really have a need for this, i just noticed it when trying to add some debug logs for the parsing process.)

my understanding is that the introducer for a device control string should follow the same syntax as a csi sequence

I'm not quite sure what you mean by this. Looking at the docs, it seems like the structure of CSIs and DCSs is quite different.
Are you saying that there's a missing action as parameter to the hook function?

the final byte of the overall dcs should be a string terminator, but that is what triggers the unhook method (which correctly doesn't have a parameter). the final byte of the dcs introducer is the thing you need at hook time to determine which dcs sequence was given, and my understanding is that the dcs introducer has exactly the same structure as a csi sequence (except that it uses ESC P instead of ESC [). for instance, given something like ESC P 5 g foobar ST, hook is called after the g, then put is called for each byte in foobar, then unhook is called when ST is seen. the problem is that currently the value of g is lost, so there's no way to actually interpret the bytes given to put.
https://github.com/jwilm/vte/compare/master...doy:patch-1 is what i believe should be the correct behavior (don't have time to make a full pr at the moment, but i can clean it up in a bit if the idea looks reasonable).

I'd have to look at the output myself and check the contents of params and intermediates. Though it would probably make sense to look at actual escapes, I don't think ESC P 5 g foobar ST would do anything, right? At least it's not mentioned in the XTerm docs.


the edge of the bolck can only go straight. What should I do?

With MovementPatterns.Full, the edge of the bolck can only go straight. eg. if (x,y) is block, can't move (x-1, y) to (x+1, y-1) . What should I do?

Hey,
I'm sorry I don't understand. Can you take a screenshot in the editor when this problem occurs?

//var cellCost = grid.GetCellCostUnchecked(position);
var cellCost = grid.GetCellCostUnchecked(current, option);
    internal float GetCellCostUnchecked(Position current, Offset option)
    {
        if (Array.IndexOf(MovementPatterns.DiagonalOnly, option) == -1)
        {
            return GetCellCostUnchecked(current + option);
        }
        else
        {
            var posx = current + new Offset(option.X, 0);
            var posy = current + new Offset(0, option.Y);

            if (float.IsInfinity(GetCellCostUnchecked(posx)))
                return float.PositiveInfinity;

            if (float.IsInfinity(GetCellCostUnchecked(posy)))
                return float.PositiveInfinity;

            return GetCellCostUnchecked(current + option);
        }
    }

I modified the code so that I won’t stick to the wall when I walk.


Updated with title attributes and ALT tags

Summary
Updated README.md:
Added title attribute tags to profile links
Added title attribute tags to other links
Added ALT image tags where required
Updated CONTRIBUTING.md:
Added title attribute tags to links
Updated CODE_OF_CONDUCT.md:
Added title attribute tags to links
Type of change

[x] Updated documentation (updated the readme, templates, or other repo files)

How Has This Been Tested?

[x] Checked changes made for spelling
[x] Checked links work
[x] Checked profile pages still using feature
[x] Reported some profiles are not linking back to repository or demo site

Additional Information
I physically checked all profile links to make sure the example profiles were still using this feature. Positively, all profiles still use this feature but some are not linking back to the repository or demo site.
The following are using but not linking back as per the source link code provided:
https://github.com/jcs090218 - Tree Profile Image
https://github.com/yousafesaeed - CRT Monitor Image
https://github.com/HectorSaldes - White Shirt Glasses Image
https://github.com/Maagnitude - Guy Beard Grey Top Image
https://github.com/quiet-node - Smiling Guy Black Jacket Image
https://github.com/wiz64 - White Cat Image
https://github.com/thakurballary - Guy Black Beard & Hair White Top Image
https://github.com/BenjaminMichaelis - Guy Smiling Red Cap
https://github.com/PROxZIMA - Guy Black Hair & Top Glasses
https://github.com/angelofallars - Guy Red Profile Image
https://github.com/tavignesh - Never Settle with Hat Image
https://github.com/Tarun-Kamboj - Black & White Eternal Image
https://github.com/8BitJonny - Dark Face Mask Glasses Image
This is a result of 13/41 meaning on average, 32% or 1/3rd of users do not actively provide a link back to the repository. Seems a shame to use a feature and not really give credit to the developer.

Should be able to close Issue #200 when merged.

This is your repository and indeed your choice moving forward. I don't fully agree with your comments regarding title tags as some search engine do use them, some categorisations stored in databases use them to find keywords, and screen readers would certainly look out for them. However, I do accept if the title tag data is duplicating the element data, there would be no point. However, I certainly was not going to start adding more content and replacing your ideal element descriptions without clearing anything with you first :smile:  I have accepted your reversion changes and do appreciate the time taken to address the concerns and changes made. This should be good to merge having accepted the suggested reversions made above.

Not a problem. I am glad to help the project out. Was a little concerning collecting the statics regarding the link-backs and a third of users wanting profile links do not even honour you with a link back to the repo or demo site. Very disappointing to have found those statistics :frowning_face:


Crash after WebSocket opened    "Error: spawn ENOMEM"

code-server version: 1.408-vsc1.32.0
OS Version: ubuntu 18.10 cloud // vulture  - 1 CPU /1024MB Memory

Description
Error
root@node:~# code-server
INFO  code-server v1.408-vsc1.32.0
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/root/.local/share/code-server","working-dir":"/root","log-dir":"/root/.cache/code-server/logs/20190403071721342"}
INFO  Starting webserver... {"host":"<IP_ADDRESS>","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://coder.com/docs
INFO
INFO  Password: 1dc067aad902ac9e90fbadf0
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
INFO  Starting shared process [1/5]...
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n    at Timeout.setTimeout [as _onTimeout] (/home/travis/build/codercom/code-server/packages/server/build/bootstrap-fork.js.gz:52540:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)\n"}
INFO  WebSocket opened / {"client":1,"ip":"<IP_ADDRESS>"}
internal/child_process.js:313
    throw errnoException(err, 'spawn');
    ^

Error: spawn ENOMEM
    at ChildProcess.spawn (internal/child_process.js:313:11)
    at Object.exports.spawn [as _spawn] (child_process.js:508:9)
    at t.async (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:34463)
    at e.exports (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:33964)
    at e (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:32689)
    at Timeout.u [as _onTimeout] (/home/travis/build/codercom/code-server/packages/server/out/cli.js:504:32982)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)

Seeing a similar issue on a fresh install of Ubuntu 18.04:

INFO  code-server v1.408-vsc1.32.0
INFO  Additional documentation: http://github.com/codercom/code-server
INFO  Initializing {"data-dir":"/root/.local/share/code-server","working-dir":"/usr/local/workspace/ng-hybrid-cloud-manager","log-dir":"/root/.cache/code-server/logs/20190403094537673"}
INFO  Starting shared process [1/5]...
INFO  Starting webserver... {"host":"<IP_ADDRESS>","port":8443}
WARN  No certificate specified. This could be insecure.
WARN  Documentation on securing your setup: https://coder.com/docs
INFO
INFO  Password: 723a63107af95ae84751d8ca
INFO
INFO  Started (click the link below to open):
INFO  http://localhost:8443/
INFO
ERROR Port scanning will not be available: spawn netstat ENOENT.
INFO  Connected to shared process
ERROR SHARED stderr {"data":"Uncaught Exception:  Error: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n\nError: ENOENT: no such file or directory, open '/root/.local/share/code-server/Backups/workspaces.json'\n    at Timeout.setTimeout [as _onTimeout] (/home/travis/build/codercom/code-server/packages/server/build/bootstrap-fork.js.gz:52540:31)\n    at ontimeout (timers.js:498:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:290:5)\n"}

You might need to bump up the memory a bit, the memory management should be much better in later releases.

I just stopped code-server and ran this

free -m
total        used        free      shared  buff/cache   available
Mem:          12008        2061        7438         124        2509        9527
Swap:          2047           0        2047

Then I just restarted code-server and it started! :) No idea why, I didn't change anything...
I still see this error here - not sure whether this is something that needs to be fixed:

ERROR Port scanning will not be available: spawn netstat ENOENT.

Thanks

Yeah, that definitely looks like a bug. Thank you for reporting.

awesome product, by the way ;)

You'll need to install netstat for the port-scanning to work properly. It isn't used yet, but will be in the future!
Closing for now :)

cool, thanks for the hint - worked. I did:

sudo apt update
sudo apt install net-tools

I have the same error.so how can I solv

e it?

ENOMEM = Error. No Memory.
You may need more RAM, some users have reported problems running the binary on machines with less than 1GB of RAM.

Thanks.I create a server .It has 4gb of RAM.Now it works well.
Michael Desantis<EMAIL_ADDRESS>于2019年4月16日周二 上午12:36写道：

ENOMEM = Error. No Memory.
You may need more RAM, some users have reported problems running the
binary on machines with less than 1GB of RAM.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/codercom/code-server/issues/410#issuecomment-483326808,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ApK1K4XpApMd3uJic93-shBtLlqVkLs3ks5vhKqigaJpZM4cZz_s
.


When removing a container, confirmation dialog falls under header

I believe adding:
  .modal {
    top: 10%;
  }

To theme.scss -> theme will fix it.

Cool, I was hoping just a CSS offset tweak would do it.


CMD client usability issue

Expected behavior

$ fullstop --help resolve-violations
$ fullstop help resolve-violations

Shows help about resolve-violation subcommand (OPTIONS available)

fullstop resolve-violations help doesn't resolve violations in bulk
Step needed
I was trying to get help for the resolve-violations command and this is what happened:
$ fullstop --help
Usage: fullstop [OPTIONS] COMMAND [ARGS]...

Options:
  -V, --version  Print the current version number and exit.
  -h, --help     Show this message and exit.

Commands:
  configure           Configure fullstop.
  list-violations     List violations
  resolve-violations  Resolve violations
  types               List violation types

$fullstop --help resolve-violations
Usage: fullstop [OPTIONS] COMMAND [ARGS]...

Options:
  -V, --version  Print the current version number and exit.
  -h, --help     Show this message and exit.

Commands:
  configure           Configure fullstop.
  list-violations     List violations
  resolve-violations  Resolve violations
  types               List violation types

$ fullstop help resolve-violations
Usage: fullstop [OPTIONS] COMMAND [ARGS]...

Error: No such command "help".

$ fullstop resolve-violations help
Resolving violation<PHONE_NUMBER>63/eu-west-1 MISSING_SPEC_LINKS 2512182.. OK
Resolving violation<PHONE_NUMBER>63/eu-west-1 WRONG_AMI 2506345.. OK
Resolving violation<PHONE_NUMBER>63/eu-west-1 WRONG_AMI 2506344.. OK
...

see: https://github.com/zalando-stups/fullstop-cli/issues/15


Progress bar does not render big numbers properly.

For ex. https://progress-bar.dev/1111111111111/
Probably a maximum limit would be useful (I think<PHONE_NUMBER>9).

I guess you could use the width query param for this:
https://progress-bar.dev/1111111111111/?width=120


Messages are sent slow.

Related Problem
I hooked PyWhatKit up to a little webscraper of mine but it typed the messages really slow in WhatsApp Web.
It would take upwards of 3 minutes send the results of a single scraping session.
A Clear and Concise Description of what the Problem is
Messages are typed really slow.
Feature Description
I think this part of the code is what makes it type really slowly
for char in message:     if char == "\n":          hotkey("shift", "enter")     else:         typewrite(char)
pywhatkit/core/core.py:58
A Clear and Concise Description of the Feature
A different implementation of the message sending system that is quicker than the current implementation.

Hey @dr-noid, thanks for the valuable suggestion. We'll surely look into this and try to find a better way to type the messages in the field.

https://github.com/Vashesh08/PyWp


Multi-line valid comment rejected as possibly correct answer

Challenge http://freecodecamp.com/challenges/waypoint-comment-your-javascript-code has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

The multiline comment does have 5 or more characters but is rejected by the Regex assertion.

@junhaoyap thanks for posting this issue!
Note that your issue is a duplicate:
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/1999
Also there is PR https://github.com/FreeCodeCamp/FreeCodeCamp/pull/2185 which fixes this issue.
Please review the Guidelines for Contributing, thank you!.

Apologies, let me close this issue.


Can't unstake, withdraw on parachain when using a QR signer account

Description the bug
Can't unstake, withdraw on parachain:

Moonriver/ Moonbeam/ Moonbase: fixed
Turing Staging/ Turing network #743

To reproduce the bug
Pre-condition:
- Attach a external QR-signer account successfully
- Enable to unstake/withdraw on Turing Staging/ Turing network/ Moonriver/ Moonbeam/ Moonbase on this account
Version test: v0.6.6
Steps:

Open the extension
Switch to QR-signer account
Go to Staking tab, perform unstake/withdraw action with valid data
Observe the Unstake/Withdrawal result

Actual: Unstake/ Withdraw failed
https://user-images.githubusercontent.com/102292476/194984752-bab8b59e-68c5-44aa-8639-fc131f288e66.mp4
Expected: Unstake/ Withdraw successfully

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./740-merge-build-0.6.7-1-1666233969504.zip
Please check issue when sign transaction
Steps:

Open the extension
Open the Moonbeam app to staking: https://apps.moonbeam.network/moonbase-alpha/staking
Connect wallet successfully
Perform staking feature on the Moonbeam app with QR Account
Sign transaction then observe the result

Actual: Transaction failed
Notes: Perform staking successfully with normal account

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./740-merge-build-0.6.7-1-1666350225732.zip
Validation passed:
https://user-images.githubusercontent.com/102292476/197319791-e47a5121-41fc-4341-beeb-f51972822528.mp4
https://user-images.githubusercontent.com/102292476/197319800-386ce8f6-1dfe-4ab2-87b9-ad3e7e22dbb5.mp4


feat: button modifications

feat: button modifications, uses functional component styling, extends native props, a11y fix, allows anchor buttons, utilizes forwardRef

Looks good! I was actually working on this exact thing, but slightly differently :) I had adopted https://stitches.dev to handle theming, variants, design tokens (which look like they could use some standardization 😅) etc.
If this gets approved I can propose that idea in a separate pr 🚀

@kysley because this only hits one component, I'm kind of just leaving it around as recommendations @joshdschneider
I'm not sure these changes will actually get merged as is, and I'm cool if they either get ditched/cherry-picked or merged

@kysley this is my first component library (I'm still learning 😅), but @EthanStandel has been super helpful showing me the ropes. Don't think I'll merge this pr, was going to start with passing forward all the native props for each component. Then merge that and update the docs.
Also, stitches looks legit! Was going to try out emotion to clean up the scss but I'm down to give stitches a go. Feel free to contribute if you want, could use all the help I can get. I just added prettier and eslint.

@joshdschneider Not a problem 😄 I'll gladly contribute where you would like me too. This is a beautiful component library you have ✨
I'll see if I can get us started w/ stitches

Thanks @kysley! Have at it!


Swagger not working with JBoss 5.

Swagger is not working with Jboss and throwing exception "org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found  [vfszip:xxxx/xxx/xxx"
Swagger is not recognizing vfszip UrlType.
2016-01-24 07:28:10,748 -0800 level=WARN  class=org.reflections.Reflections              could not create Vfs.Dir from url. ignoring the exception and continuing
org.reflections.ReflectionsException: could not create Vfs.Dir from url, no matching UrlType was found [vfszip:/Users/xxxxxx/Install/whp/whp-jboss-web-5/server/default/deploy/xxxx/xxxxx.war/WEB-INF/classes/]
either use fromURL(final URL url, final List urlTypes) or use the static setDefaultURLTypes(final List urlTypes) or addDefaultURLTypes(UrlType urlType) with your specialized UrlType.
at org.reflections.vfs.Vfs.fromURL(Vfs.java:109)

I have the same problem, anyone can fix it?

That's a dependency issue. You need to force it to load a newer version of reflections.org.


'allksky.local's server IP address could not be found'

I tried to access the allsky control panel but encountered the following error message:
'allksky.local's server IP address could not be found'
However, I still have internet access on the pi, and the pi is correctly delivering live view photos even as I type this.
Grateful for any help - thank you!

Hello,
Same thing for me, I have made 'sudo gui/install.sh pi', then in my web explorer (Firefox) 'http://pi.local' doesn't work, same thing with 'http://ip-add-of-pi' .
Thanks
Michel

Hello,
Same thing for me, I have made 'sudo gui/install.sh pi', then in my web explorer (Firefox) 'http://pi.local' doesn't work, same thing with 'http://ip-add-of-pi' .
Thanks
Michel

Whats in the /etc/avahi/avahi-daemon.conf file under the [server] section on the Pi?

Whats in the /etc/avahi/avahi-daemon.conf file under the [server] section on the Pi?

Closing issue - no reply from either user in 9 months.


Resyncing with main pre- alpha2 release

This cannot merge until a PR locking navigator to runner A4 is in.

requires #430

@cidrblock is this PR good to go? I tried to re-sync this PR to the latest main branch since a few more PRs went in since, but it doesn't look I can update this... so I'll open a new PR for the rest of the backports.

Added recently merged PRs to this and opened a new PR https://github.com/ansible/ansible-navigator/pull/447, closing.


Update Apache Commons Beanutils version

fix Apache Commons Beanutils 安全漏洞 CVE-2019-10086
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-10086
Make sure set the target branch to develop
What is the purpose of the change
XXXXX
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

[x] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[x] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
[x] Run mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test  to make sure integration-test pass.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Coverage increased (+0.09%) to 51.87% when pulling 1a1950723389813589eb738df3fb5a41c7d3417c on crazywen:patch-1 into f35cafe1284547be52709ea7a14608d9fa90d48f on apache:develop.


Is it ok to contribute a Simplified Chinese translation?

Following https://github.com/yearn/yearn-finance/blob/develop/CONTRIBUTING.md#pull-requests, I'm asking before embarking on this "significant" task.
I saw the dapp now supports English and Spanish.
I wanted to add Simplified Chinese translation. I'm not a native Chinese speaker, but I'm learning, and I'll use my teacher to check if my translations are ok. I'm also familiar with the yearn app and the crypto space in general, so I hope my translations are high quality.
I've always wanted to contribute to yearn. Let me know if this works, and I'll get started :)

wrong repo 😅 -- moving to https://github.com/yearn/yearn-finance-v3


[CodeComplete] Markup default arguments

Add <callarg.default /> nodes to the annotated description of a
completion result for all arguments that have defaults.
Also add a new option to control whether or not an extra item is added
for calls with no default arguments or not (since clients can now use
the marked up argument to check this themselves).

@swift-ci please test

@swift-ci please test

Windows failure is known (and that test since disabled).

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - 5f701c2252bdbad0bc9e11670f5ac2038a276e8b

@swift-ci please test macOS platform

Build failed
Swift Test OS X Platform
Git Sha - 5f701c2252bdbad0bc9e11670f5ac2038a276e8b

@swift-ci please clean test macOS platform

@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - 5f701c2252bdbad0bc9e11670f5ac2038a276e8b

@swift-ci please clean test macOS platform

Build failed
Swift Test Linux Platform
Git Sha - 5f701c2252bdbad0bc9e11670f5ac2038a276e8b

@swift-ci please smoke test


VZ1287 add startController flag

Adds ability to start just the API server in verrazzano-operator without starting controller. This will help in running UI tests against a version of verrazzano-operator that will not do any work in Kubernetes in response to deployments

@desagar Just one question.  We said that we should have unit tests for any code changes.  Is there coverage for this code?

@desagar Just one question. We said that we should have unit tests for any code changes. Is there coverage for this code?

@desagar Just one question. We said that we should have unit tests for any code changes. Is there coverage for this code?

I've been struggling to to add coverage for this code. I have more changes in main.go in the pipeline, which will also make it a little easier to add coverage. Merging this would make it helpful to make those changes.

Okay, I agree that the refactoring needed for the testing doesn't need to be part of this change.


[require-login] 📦 🐈 Require valid token before running preflight.

@stacyk We're still working on adding realtime updates via websockets, but I think this PR is ready for design and Sass code review.

@wlonk Okay, as far as I'm aware this is good to go. Still interested in review from @cdcarter and/or @davisagli when they get a chance, but I'd say let's go ahead and merge/deploy -- I anticipate there may be unexpected things that crop up in deployment or on staging, and I'd like to test it out.

See also https://github.com/SFDO-Tooling/metadeploy/pull/83 and https://github.com/SFDO-Tooling/metadeploy/pull/84 where some hotfixes went.


Image

please help me with sending image files

for send image
try
$bot = new Linebot();
$bot->pushImage(, 'https://example.com/image.jpg');


Add missing export for IconLinkVertical

Hey, I just made a Pull Request!
The component marked as public, however it wasn't exported on the directory level.
This should make it possible to import it in the userland.
Do we want to add some eslint rules to avoid that in the future?

[X] A changeset describing the change and affected packages. (more info)
[ ] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[ ] Screenshots attached (for UI changes)
[X] All your commits have a Signed-off-by line in the message. (more info)

Do we want to add some eslint rules to avoid that in the future?
That could be a great idea, let's hear @backstages/maintainers thoughts 🙂


Ue4 bp update

Added blueprint support for JoinRequest() and Respond, added latent
blueprint node for getting Discord profile images

Neat, thanks for working on this, I'll take a closer look.

I'm gonna close this because these methods were added in #125. Thank you for getting the ball rolling for me!


Making application more light weight

Is your feature request related to a problem? Please describe.
As I can see, there are many activities in this application, and we know that activity is a bit heavier than fragment. so we can use fragments in place of activity. So we can convert whole application into single activity multiple fragment architechture,
Describe the solution you'd like
We can use new navigation framework. By using it, we can navigate through different fragments and make our application more light weight.
Describe alternatives you've considered
No response
Additional context
No response
Code of Conduct

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

@Harsh4902
It is not mandatory as I have devised future plans that necessitate the preservation of these files. Therefore, it is advisable to focus on other areas that require contributions from contributors in order to enhance the app with simple, innovative, and distinctive functionalities.


Add swap memory

Some emulators such as Yuzu can be very memory heavy. Right now when running out of memory, ChimeraOS just locks up. Adding some swap memory could fix this issue. To avoid slowing down when RAM is still available, the swappiness value could be set to something very low.
For instance I was getting Yuzu constantly lock up on my Rog Ally with heavy games, which I fixed by adding a 16GB swap file.

Dupe: #473

Closing as duplicate


Add GitLabCredentials placeholder text for token field

Part of closing https://github.com/PrefectHQ/prefect/issues/10468

Screenshots

Checklist

[x] References any related issue by including "Closes #" or "Closes ".

If no issue exists and your change is not a small fix, please create an issue first.

[ ] Includes tests or only affects documentation.
[x] Passes pre-commit checks.

Run pre-commit install && pre-commit run --all locally for formatting and linting.

[ ] Includes screenshots of documentation updates.

Run mkdocs serve view documentation locally.

[x] Summarizes PR's changes in CHANGELOG.md

I believe that all our consumers of this block append oauth2: to the token when necessary. If that's true, is this change necessary?

As requested in the issue, if not placeholder text we could include a better description since this is a recurrent issue.
Would something like this make more sense?

Community issues:
GitLab
https://prefect-community.slack.com/archives/CL09KU1K7/p1689115696739679?thread_ts=1689088572.689859&cid=CL09KU1K7
https://prefect-community.slack.com/archives/CL09KU1K7/p1690867549084869?thread_ts=1689088572.689859&cid=CL09KU1K7
Some users are just using GitHubCredentials blocks as a workaround instead, which isn't ideal:
https://prefect-community.slack.com/archives/CM28LL405/p1692025643321819?thread_ts=1690989437.858689&cid=CM28LL405

In those threads, I see that our git_clone step wasn't formatting the URL, and that burden was placed on the user.  That makes me think this change isn't needed, but let me know if there's a use case I'm not considering.

I was thinking if we were to add other deployment steps!
However, with the new _format_token_from_access_token and _format_token_from_credentials helper functions, it shouldn't be hard to do the same thing with similar deployment steps using git. I'll close this then.


how to export chart as image?

Is there a way to export chart or select range of xlsx file to jpeg file?
package main

import (
	"fmt"

	"github.com/xuri/excelize/v2"
)

func main() {
	categories := map[string]string{"A2": "Small", "A3": "Normal", "A4": "Large", "B1": "Apple", "C1": "Orange", "D1": "Pear"}
	values := map[string]int{"B2": 2, "C2": 3, "D2": 3, "B3": 5, "C3": 2, "D3": 4, "B4": 6, "C4": 7, "D4": 8}
	xlsx := excelize.NewFile()
	for k, v := range categories {
		xlsx.SetCellValue("Sheet1", k, v)
	}
	for k, v := range values {
		xlsx.SetCellValue("Sheet1", k, v)
	}

	xlsx.AddChart("Sheet1", "E1", `{"type":"pie","series":[{"name":"Sheet1!$A$2","categories":"Sheet1!$B$1:$D$1","values":"Sheet1!$B$2:$D$2"}],"format":{"x_scale":1.0,"y_scale":1.0,"x_offset":15,"y_offset":10,"print_obj":true,"lock_aspect_ratio":false,"locked":false},"legend":{"position":"bottom","show_legend_key":false},"title":{"name":"Fruit Pie Chart"},"plotarea":{"show_bubble_size":true,"show_cat_name":false,"show_leader_lines":false,"show_percent":true,"show_series_name":false,"show_val":false},"show_blanks_as":"gap"}`)
	// Save xlsx file by the given path.
	err := xlsx.SaveAs("./Book1.xlsx")
	if err != nil {
		fmt.Println(err)
	}
}

This issue was duplicated with #1190.

I closed this issue. Please let me know if you have any questions, and reopen this anytime.


node::Script error 'lpb.ImgFrame' object has no attribute 'getTimestampDevice'

On device in script node python, need to get the device timestamp of the moment a device-side ImgFrame was created.
Unfortunately, creating a node::Script and giving it a python script with rgbImgFrame.getTimestampDevice() fails with error
[14442C10C1A1C6D200] [103.187] [Script(10)] [critical] AttributeError: 'lpb.ImgFrame' object has no attribute 'getTimestampDevice'
At:
  <script>(90): <module>

Setup

depthai-core develop at 04d5149e7cfddc4dc871d55d1a3d9ee270b76835
Microsoft Windows [Version 10.0.19044.1526]
VS2019 v16.11.9

Repro

cmake config, build, install depthai-core as shared lib, x64, debug
Write your main c++ app with a node::ColorCamera, node::NeuralNetwork, node::Script
Link color camera -> NN input
Link NN passthrough -> Script
Make Script node python similar topassrgb = node.io['from_passthrough'].get()
devicetimestamp = passrgb.getTimestampDevice() // timedelta(microseconds=1)

Compile and run your main app

Result
Console errors appear and the device-side python fails with error...
[14442C10C1A1C6D200] [103.187] [Script(10)] [critical] AttributeError: 'lpb.ImgFrame' object has no attribute 'getTimestampDevice'
At:
  <script>(90): <module>

Expected
No console errors and python api imgframe.getTimestampDevice() works
https://docs.luxonis.com/projects/api/en/latest/components/messages/img_frame/
Notes
The non-device timestamp works. Seems to be a missing API in the device-side python
# works
othertimestamp = passrgb.getTimestamp() // timedelta(microseconds=1)

Missed adding this to device side Python bindings back then when it was added on host.
Will fix, thanks!

@diablodale Actually I re-checked the FW implementation, and on device side getTimestamp() would return the device timestamp (what the host returns with getTimestampDevice()).
We store the ImgFrame timestamp in the device-side pipeline as captured from the device monotonic timer, and only before being serialized to the host, we do :

RawImgFrame::tsDevice gets assigned the value as-is
RawImgFrame::ts gets modified by adding the host-sync time diff (this time diff is also captured at the same time the image is captured from camera)

CC @themarpe on how should we get this more standardized, should we keep device getTimestamp() behavior as-is, and add a getTimestampHost()?
We also need to double-check if e.g Python's time.monotonic() on device side uses the same timer.

I think we should make these two equivalent as on host, by having getTimestamp return same time as on host would.
And adding getTimestampDevice.
We should also add a binding for Clock.now (eg: std::steady_clock::now) as on host.


(maint) Minor fixes to the pkgng pacakge provider

This work updates the pkgng package provider to ensure that port names as resource titles are handled correctly, and that fewer calls to 'pkg version' are made.

@xaque208 Thanks for the contribution! It looks like some indentation got messed up with the case statement, would you mind fixing that up?

Fixed the indentation.

@branan I believe the last commit addresses your concern about caching in the provider.  Thank you for raising it.  I think this is a bit cleaner now.

:+1: from me at this point


libproxy: Make JavaScript optional

Motivation for this change
This PR makes the JavaScript support (required for PAC files) optional dependent on the availability of Spidermonkey 68 on the platform.
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes

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

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 126558 at 141d04c2 run on aarch64-linux 1

2 packages marked as broken and skipped:

spring
springLobby

2 packages failed to build:

guitarix
libsForQt514.discover

199 packages skipped due to time constraints:

adapta-gtk-theme
almanah
apostrophe
arc-theme
arx-libertatis
asciidoc-full
asciidoc-full-with-plugins
astroid
balsa
bibata-cursors
...

77 packages built successfully:

clight
dino
flatpak
flatpak-builder
fondo
gajim
gammastep
geoclue2
glib-networking (gnome.glib-networking ,gnome.glib_networking)
gnome.gnome-clocks
gnome.gnome-disk-utility
gnome.gnome-settings-daemon (gnome.gnome_settings_daemon)
gnome.gnome-weather
gnome.gpaste
gnome.mutter
gnome.mutter334 (pantheon.mutter)
networkmanagerapplet (gnome.networkmanagerapplet)
gsignond
gsignondPlugins.lastfm
gsignondPlugins.mail
gsignondPlugins.oauth
gsignondPlugins.sasl
haskellPackages.gi-ostree
hexchat
libproxy
libquvi
libsForQt5.discover (libsForQt515.discover ,plasma5Packages.discover)
lollypop
malcontent-ui
megatools
minishift
monitor
mopidy-iris
mopidy-local
mopidy-mopify
mopidy-mpd
mopidy-mpris
mopidy-musicbox-webclient
mopidy-podcast
mopidy-scrobbler
mopidy-somafm
mopidy-soundcloud
mopidy-subidy
mopidy-tunein
mopidy-youtube
ostree
pantheon.appcenter
pantheon.contractor
pantheon.elementary-dpms-helper
pantheon.elementary-files
pantheon.elementary-settings-daemon
pantheon.gala
pantheon.pantheon-agent-geoclue2
pantheon.sideload
pantheon.switchboard-plug-mouse-touchpad
pantheon.switchboard-plug-network
pantheon.switchboard-plug-pantheon-shell
pantheon.switchboard-plug-power
pantheon.wingpanel
pantheon.wingpanel-indicator-bluetooth
pantheon.wingpanel-indicator-keyboard
pantheon.wingpanel-indicator-network
pantheon.wingpanel-indicator-nightlight
pantheon.wingpanel-indicator-notifications
pantheon.wingpanel-indicator-power
pantheon.wingpanel-indicator-session
pantheon.wingpanel-indicator-sound
phoc
qutebrowser
quvi
redshift
redshift-plasma-applet
redshift-wlr
viking
xdg-desktop-portal
xdg-desktop-portal-gtk
xfce.xfce4-screenshooter

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.

Did some grunt work to add support for Duktape which will make the dependency tree much smaller. It's a bit ridiculous to pull in Rust (spidermonkey) or wait an entire day (webkitgtk) just for it to run simple PAC scripts.

I think let's merge this now. We can make Duktape the default runner when libproxy makes a new release with it. Even if we go with WebKit, we still need the ability to disable JavaScript as it doesn't build on riscv64 at the moment.

@ofborg eval


CI out of retries failures with flow 0.102

Flow version: 0.102
Expected behavior
Flow 0.102.0 should function in CircleCI without issue, just like flow 0.101.1
Actual behavior
When running CI for sourcecred/sourcecred on CircleCI, with flow 0.102.0, it regularly (~50% of the time) fails with the following message:
    Out of retries, exiting!
    error Command failed with exit code 7.

Here is a representative failure: https://circleci.com/gh/sourcecred/sourcecred/1099
These sometimes are accompanied by ENOMEM failures across the other test suites, as seen here: https://circleci.com/gh/sourcecred/sourcecred/1095
This only repros in CI, I can't get it to happen locally. I've done some experimenting and it's specific to flow version 0.102.

Link to Try-Flow or Github repo:

Update: it seems to have failed at least once with flow v0.101.1:
https://circleci.com/gh/sourcecred/sourcecred/1105

Here is an example of latest flow (0.103) failing as "out of retries" on CircleCI when it is the only task running on the server. (So it's can't be in memory contention with other tests/tools.)
https://circleci.com/gh/sourcecred/sourcecred/1403


suma host validation

During image definition validation, we want to validate Suma hostnames so the user knows if their hostname is invalid before creating the image. The current implementation only checks for a non empty string that does not start with “https://” or “http://”
In the future, we want to have a more comprehensive hostname validation check but there are too many differing edge cases to investigate at the moment.

We will potentially reopen if this becomes a recurring problem by users.


experimental/openmmforcefields/gaff.ipynb is failing on openff-docs

The experimental/openmmforcefields/gaff.ipynb notebook has been failing on openff-docs since the release of 0.3.26.
Here's the error:
 nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
imported.visualize()
------------------

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[4], line 1
----> 1 imported.visualize()

File ~/micromamba/envs/openff-docs-examples/lib/python3.10/site-packages/openff/interchange/components/interchange.py:318, in Interchange.visualize(self, backend, include_virtual_sites)
    315 original_positions = self.topology.get_positions()
    317 try:
--> 318     self.topology.set_positions(self.positions)
    319     widget = self.topology.visualize()
    320 except (
    321     MissingConformersError,
    322     IncompatibleUnitError,
    323     ValueError,
    324 ) as error:

File ~/micromamba/envs/openff-docs-examples/lib/python3.10/site-packages/openff/toolkit/topology/topology.py:2175, in Topology.set_positions(self, array)
   2173         molecule._conformers = [array[start:stop]]
   2174     else:
-> 2175         molecule.conformers = [array[start:stop]]  # type: ignore[misc]
   2176 else:
   2177     molecule.conformers[0:1] = [array[start:stop]]

AttributeError: can't set attribute 'conformers'

First failed build: https://github.com/openforcefield/openff-docs/actions/runs/8730323982/job/23976462898
Last successful build: https://github.com/openforcefield/openff-docs/actions/runs/8714190660/job/23903993121
See more builds here: https://github.com/openforcefield/openff-docs/actions/workflows/cookbook_preproc.yaml
Environment file: https://github.com/openforcefield/openff-docs/blob/main/devtools/conda-envs/examples_env.yml
The notebook is currently being skipped: https://github.com/openforcefield/openff-docs/blob/288ae36533136e8e92ac9741238860166b7bcb63/source/ext/cookbook/globals.py#L85

Thanks, this is super helpful context; it took a few minutes but the cause is https://github.com/openforcefield/openff-toolkit/pull/1798/files#diff-7d24b44bfbe7c449b9ecc60a9129b430131efe1dadf2629e97015267f4a0e9edR37-R67

This makes me realize there is potential value in bleeding-edge notebook execution, though I don't have the time to set that up right now

I'll also keep this skipped until openmmforcefields supports newer AmberTools than 22, which is too old for our stack to be constrained to
https://github.com/openmm/openmmforcefields/issues/280


[5.5] include the job name in the MaxAttemptsExcededException

It's helpful to know which job has been exceeding it's max attempts.

On second thought it may be more useful to use job->resolveName. If you want to make another PR.

Yeah thats not a bad idea. PR incoming!