CIP-0016: Cardano Addresses

Abstract
This specification describes the binary structure of addresses in Cardano, covering both addresses introduced in the Shelley era and the legacy format from the Byron era.
Motivation
Document design choices for posterity. Most applications interacting with the Cardano blockchain will likely not have any need for this level of details, however some might. This CIP is meant to capture this knowledge.
Specification
Overview
In Cardano, addresses are comprised of two parts, a header and a payload. Depending on the header, the interpretation of the payload varies.
In the header, bits [7;4] indicates the type of addresses being used; we'll call these four bits the header type. The remaining four bits [3;0] are either unused or refer to what we'll call the network tag. There are currently 11 types of addresses in Cardano which we'll divide in three categories: Shelley addresses, stake addresses and Byron addresses.
  1 byte     variable length
 <------> <------------------->
┌────────┬─────────────────────┐
│ header │        payload      │
└────────┴─────────────────────┘
    🔎
    ╎          7 6 5 4 3 2 1 0
    ╎         ┌─┬─┬─┬─┬─┬─┬─┬─┐
    ╰╌╌╌╌╌╌╌╌ │t│t│t│t│n│n│n│n│
              └─┴─┴─┴─┴─┴─┴─┴─┘

See also the more detailed ABNF grammar in annex.
Network Tag
Except for Byron addresses (type 8 = 1000), the second half of the header (bits [3;0]) refers the network tag which can have the following values and semantics. Other values of the network tag are currently reserved for future network types. In the case of Byron addresses, bits [3;0] have a completely separate definition detailed in the section below.

Network Tag (. . . . n n n n)
Semantic

....0000
Testnet(s)

....0001
Mainnet

User-facing Encoding
By convention, Shelley and stake addresses are encoded using bech32 with human-readable prefixes defined in CIP-0005. Byron addresses are however encoded in base58. Historically, Byron addresses were introduced before the design of bech32, which solves various issues of the base58 encoding format (see bech32's motivation for more detail). Byron addresses were however kept as Base58 to easily distinguish them from new addresses introduced in Shelley, massively making use of bech32 for encoding small binary objects.
Summarizing:

Address Type
Encoding
Example

Byron
Base58
37btjrVyb4KDXBNC4haBVPCrro8AQPHwvCMp3RFhhSVWwfFmZ6wwzSK6JK1hY6wHNmtrpTf1kdbva8TCneM2YsiXT7mrzT21EacHnPpz5YyUdj64na

Shelley
bech32
addr1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5eg0yu80w

stake
bech32
stake1vpu5vlrf4xkxv2qpwngf6cjhtw542ayty80v8dyr49rf5egfu2p0u

Shelley Addresses
There are currently 8 types of Shelley addresses summarized in the table below:

Header type (t t t t . . . .)
Payment Part
Delegation Part

(0) 0000....
PaymentKeyHash
StakeKeyHash

(1) 0001....
ScriptHash
StakeKeyHash

(2) 0010....
PaymentKeyHash
ScriptHash

(3) 0011....
ScriptHash
ScriptHash

(4) 0100....
PaymentKeyHash
Pointer

(5) 0101....
ScriptHash
Pointer

(6) 0110....
PaymentKeyHash
ø

(7) 0111....
ScriptHash
ø

PubKeyHash and StakeKeyHash refers to blake2b-224 hash digests of Ed25519 verification keys. How keys are obtained is out of the scope of this specification. Interested readers may look at CIP-1852 for more details.

ScriptHash refers to blake2b-224 hash digests of serialized monetary scripts. How scripts are constructed and serialized is out of the scope of this specification.

Pointer is detailed in a section below.

Payment part
Fundamentally, the first part of a Shelley address indicates the ownership of the funds associated with the address. We call it, the payment part. Whoever owns the payment parts owns any funds at the address. As a matter of fact, in order to spend from an address, one must provide a witness attesting that the address can be spent. In the case of a PubKeyHash, it means providing a signature of the transaction body made with the signing key corresponding to the hashed public key (as well as the public key itself for verification). For monetary scripts, it means being able to provide the source script, and meet the necessary conditions to validate the script.
Delegation part
The second part of a Shelley address indicates the ownership of the stake rights associated with the address. We call it, the delegation part. Whoever owns the delegation parts owns the stake rights of any funds associated with the address. In most scenarios, the payment part and the delegation part are owned by the same party. Yet it is possible to construct addresses where both parts are owned and managed by separate entities. We call such addresses mangled addresses or hybrid addresses.
Some addresses (types 6 and 7) carry no delegation part whatsoever. Their associated stake can't be delegated. They can be use by parties who want to prove that they are not delegating funds which is typically the case for custodial businesses managing funds on the behalf of other stakeholders. Delegation parts can also be defined in terms of on-chain pointers.
Pointers
In an address, a pointers refers to a point of the chain containing a stake key registration certificate. A point is identified by a 3 coordinates:

An absolute slot number
A transaction index (within that slot)
An output index (within that transaction)

These coordinates form a concise way of referring to a stake key (typically half the size of a stake key hash). They are serialized as three variable-length positive numbers following the ABNF grammar here below:
POINTER = VARIABLE-LENGTH-UINT ; slot number
        | VARIABLE-LENGTH-UINT ; transaction index
        | VARIABLE-LENGTH-UINT ; output index

VARIABLE-LENGTH-UINT = (%b1 | UINT7 | VARIABLE-LENGTH-UINT)
                     / (%b0 | UINT7)

UINT7 = 7BIT

Stake Addresses
TODO
Byron Addresses
Before diving, please acknowledge that a lot of the supported capabilities of Byron addresses have remained mainly unused. The initial design showed important trade-offs and rendered unpractical to sustain the long-term goals of the network. A new format was created when introducing Shelley and Byron addresses were kept only for backward compatibility.
Like many other objects on the Cardano blockchain yet unlike Shelley addresses, Byron addresses are CBOR-encoded binary objects. Conveniently enough, the first 4 bits of their first byte are always equal to 1000.... which allows to land back on our feet w.r.t to the address type. Their internal structure is however vastly different and a bit unusual.
┌────────┬──────────────┬────────┐
│  root  │  attributes  │  type  │
└────────┴──────────────┴────────┘
  ╎        ╎              ╎
  ╎        ╎              ╰╌╌ Standard
  ╎        ╎              ╰╌╌ Redeem
  ╎        ╎
  ╎        ╰╌╌ Derivation Path
  ╎        ╰╌╌ Network Tag
  ╎
  ╎                   ┌────────┬─────────────────┬──────────────┐
  ╰╌╌╌╌ double-hash ( │  type  │  spending data  │  attributes  │ )
                      └────────┴─────────────────┴──────────────┘
                                 ╎
                                 ╰╌╌ Verification Key
                                 ╰╌╌ Redemption Key

The address root uniquely identifies the address, and is a double-hash digest (SHA3-256, and then Blake2b-224) of the address type, spending data and attributes.
Then comes the address attributes which are both optional. The network tag is present only on test networks and contains an identifier which is used for network discrimination. The derivation path (detailed below) was used by legacy so-called random wallets in the early days of Cardano and its usage was abandoned with the introduction of Yoroi and so-called Icarus addresses.
Finally, the address type allows for distinguishing different sub-types of Byron addresses. Redeem addresses are used inside the Byron genesis configuration and were given to early investors who helped funding the project.
A full and more detailed CDDL specification of Byron addresses is given in annex to the CIP.
Derivation path
Historically, Cardano wallets have been storing information about the wallet structure directly within the address. This information comes in the form of two derivation indexes (in the sense of child key derivation as defined in BIP-0032) which we call derivation path. To protect wallet's anonymity, the derivation path is stored encrypted using a ChaCha20/Poly1305 authenticated cipher.
Rationale
N/A
Backwards Compatibility
N/A
Reference Implementation(s)

input-output-hk/cardano-addresses (Byron & Shelley)

input-output-hk/cardano-ledger-specs (Byron)

input-output-hk/cardano-ledger-specs (Shelley)

Test Vectors
All test vectors below uses the following payment and stake keys:

addr_vk1lytzhygjvgftw9gqazwu0k33zywlc9rx48ey7j9rfel222wj6vuq6kwe5j
stake_vk1c6erq4mydnzym2p604p9duumdlx5td4sunh626avc0jv400fkwqqyfzntu

# type = 0, network = 0
- addr_test1qqy6nhfyks7wdu3dudslys37v252w2nwhv0fw2nfawemmn8k8ttq8f3gag0h89aepvx3xf69g0l9pf80tqv7cve0l33sw96paj
# type = 0, network = 1
- addr1qyy6nhfyks7wdu3dudslys37v252w2nwhv0fw2nfawemmn8k8ttq8f3gag0h89aepvx3xf69g0l9pf80tqv7cve0l33sdn8p3d

# type = 4, network = 0, ptr = #(1,2,3)
- addr_test1gqy6nhfyks7wdu3dudslys37v252w2nwhv0fw2nfawemmnqpqgps5mee0p
# type = 4, network = 1, ptr = #(24157,177,42)
- addr1gyy6nhfyks7wdu3dudslys37v252w2nwhv0fw2nfawemmnyph3wczvf2dqflgt

# type = 6, network = 0
- addr_test1vqy6nhfyks7wdu3dudslys37v252w2nwhv0fw2nfawemmnqtjtf68
# type = 6, network = 1
- addr1vyy6nhfyks7wdu3dudslys37v252w2nwhv0fw2nfawemmnqs6l44z

Copyright
CC-BY-4.0

There's a PR about to be merged flagged as CIP-0016  - adding comment here to prevent accidental mixup - due to past conversations, it might be worth moving this one to 'CIP-0019'?
FYI tentative CIP-0017 and tentative CIP-0018 also on the table... 19 and higher unused yet


[feat] append_to_result

Having append_to_result would be useful, took it upon my self to figure it out and came up with this. its type safe so it would work with this. would be uesful to include to save sending multiple requests.
type FindArgs<T extends ('credits' | 'videos')[]> = {
    id: number;
    include?: T;
};

tmdb.movies.find = async <T extends ("credits" | "videos")[]>(args: FindArgs<T>) => {
    type Credits = "credits" extends T[number] ? CreditResponse : undefined; // CreditResponse is the type that '[api]/movie/[movieId]/credits' would return (same as below)
    type Videos = "videos" extends T[number] ? VideoResponse : undefined;

    type Response = Movie & {
      credits: Credits;
      videos: Videos;
    };

    return await get<Response>(`movie/${args.id}?append_to_response=${args.include}`);
  },

You could use this with more then just videos and credits but its more of a proof of concept.

Can you append multiple args to the response?

https://developers.themoviedb.org/3/getting-started/append-to-response
Yes, saves sending multiple requests. its a nice feature and its quicker also

Ahh yeah that would be nice.


Feature: ScreenBuf allocated on PSRAM

I found myself struggling to get the library working with  CONFIG_GC9A01_BUFFER_MODE enabled with other Tasks running. WiFi and SD/MMC where unstable.
The Issue was the massive amount of memory used by the ScreenBuff on internal RAM.
Changes

Added CONFIG_GC9A01_BUFFER_MODE_PSRAM to enable allocation on PSRAM
Added GC9A01_Free function only when CONFIG_GC9A01_BUFFER_MODE_PSRAM is set, to free memory

Attention only tested on a ESP32-S3 platform with 8MB RAM

BTW: Really like the library, great work thanks alot

Ok, Thanks!


Collapse support added to AsyncSearch helper (#769)

Description
This PR adds collapse support to AsyncSearch helper
Issues Resolved
#769
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

To maintainers: the same tests seem to fail on other PRs as well :)

To maintainers: the same tests seem to fail on other PRs as well :)

I debugged this but couldn't find a solution. You can rebase with the workaround in https://github.com/opensearch-project/opensearch-py/pull/828 for now (or maybe you know how to fix that failure?).

We can release quickly. Open an issue that says "Release v. Next".
I'd like to merge an update from #814 and make sure things work there too. Currently those tests are failing, someone (you? wink wink) needs to take a look.


Changed resources to resources_bundle

Thank you for PR
Can I ask you question ?
what's the difference between resources and bundle?

Thank you for PR
Can I ask you question ?
what's the difference between resources and bundle?

If you use resource or resources in a CocoaPods PodSpec file, you tell Cocoapods that these are the resource files your library will load during runtime.
As resourceBundle cannot change at runtime, it is safe to create it only once (e.g. on app start or when your framework is initialized) and store it into a global variable (or global class property), so you have it always around when needed

@4taras4 I see, thank you for explaining!

@4taras4 I approved you to run Checks on GitHub Actions.
Can you see the results of the checks?

https://github.com/muukii/Brightroom/pull/149


Training SCNN model

Hi,
I started training from scratch, during training its printing accuracy and mean_accuracy as shown below in snapshot

What does it mean between accuracy and mean accuracy.?
From term mean i understand like its mean of accuracy of each and every epoch...
Kindly give some interpretation towards the mentioned terms.

Interested in knowing difference between accuracy and accuracy back terms

@chokkarapu , accuracy and accuracy_back denote the pixel accuracy of lane pixels and background pixels, respectively. Besides, your reported accuracy is too low as the training episodes reach 3w. Please check whether your codes and the training process are right.

@chokkarapu , training from scratch is not recommended. You should use the vgg.npy as the backbone and start training from that model.

@chokkarapu , the accuracy and accuracy_back should be similar to this figure as the training process proceeds.

@chokkarapu , that's weird. You need to check if the hyper-parameters are appropriately selected, e.g., learning rate scheme, momentum, etc.

Besides, you need to check whether the labels are used appropriately.

Any idea how to check the labels are rightly provided or not?
In some of images I dont lane markers still I marked it "no_lane " label, I providing that label as "1" in train_gt.txt for example.

@chokkarapu , in my implementation, the background is labelled as "0". To check the labels, you can either print them as figures or use numpy.unique() to check if the range of the labels is right. From your training process, it is obvious that the model does not learn to detect lanes well as it almost predict every pixel as background.

@cardwing : Thanks for response.
In my dataset,  the instance label Image is RGB channel imagewith following pixel information
Background pixel is labelled as "0" i.e. (0,0,0)
Left_To_Left_Lane = (128, 128, 128)
Left_lane = (255, 0, 0)
Right_Lane = (0, 255, 0)
Right_Right_Lane = (255, 255, 255)
The sample image is shown below...

In training code I have considered chaneel-1 from RGB image i.e. "label_insta = label_img[:, :, 1] "
Kindly correct me is my labelled data is proper as per CULane for example.

@chokkarapu , in the default setting of SCNN, the input label should be a map filled with 0, 1, 2, 3, 4, where 0 denotes background and 14 denote lane 1 lane 4. Therefore, in your custom dataset, you should label the image in the same manner. In other words, you should change your 3-channel label map to a 1-channel map and the background is denoted as 0, lane 1lane 4 as 14. Just perform a simple operation can accomplish that goal.

Thank you for input...Even me too planning to do mentioned operation.
To Be clear the i need to have data to be mentioned as below:
Background: Pixel Value =0
Lane-1  ; Pixel value= 1
Lane-2 : Pixel Value = 2
Lane-3 : Pixel Value = 3
Lane-4 : Pixel Value = 4

@chokkarapu , yes.


Feature/file create

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: VolshebnikQ:x: Andrey YumatovAndrey Yumatov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Handle all exceptions except SignalException and SystemExit

Previously Sneakers was able to handle StandardError and ScriptError exceptions and their descendants. But there are more exceptions that could cause problems.

SystemStackError (stack level too deep)
NoMemoryError
custom descendants of Exception (e.g. declared by gems)

In case of these exceptions, the handler is unable to report job state to the RabbitMQ. RabbitMQ keeps sending new jobs to the Sneakers until prefetch value reached. It makes Sneakers worker hang without processing any new message.

@jondot Hello! Can you please tell me what we should do for merge this PR?


chore: implement poseidon2 opcode

This PR create constraints for poseidon2permutation Noir opcodes.
I added a unit test for the opcode.
The poseidon2permutation implementation is duplicated in new files of the stdlib: poseidon2_permutation_classic.
These files implement the 'classic' version of Poseidon2, without lookups
And it also duplicate the lookup version in the goblin_permutation() function. I was not able to get a template specialisation works for Ultra and Goblin of the permutation() function, but I am sure it can be done better.
However, as a Noir backend, it should be able to work for UltraPlonk and use the optimised version if we switch to Honk.

Benchmark results
Metrics with a significant change:

note_history_trial_decrypting_time_in_ms (5): 177 (+95%)

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Values are compared against data from master at commit a7889f8d and shown if the difference exceeds 1%.
L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
8 txs
32 txs
128 txs

l1_rollup_calldata_size_in_bytes
45,956
181,604
724,196

l1_rollup_calldata_gas
227,036
888,752
3,535,700

l1_rollup_execution_gas
320,227
1,007,200
3,756,078

l2_block_processing_time_in_ms
1,202 (-1%)
4,498 (+1%)
17,770 (+1%)

note_successful_decrypting_time_in_ms
324 (-1%)
990 (+2%)
3,671 (+2%)

note_trial_decrypting_time_in_ms
34.1 (-16%)
124 (+20%)
176 (+2%)

l2_block_building_time_in_ms
18,322 (-1%)
72,242
289,610

l2_block_rollup_simulation_time_in_ms
13,591
53,500
214,815 (-1%)

l2_block_public_tx_process_time_in_ms
4,698 (-1%)
18,663 (+1%)
74,528 (+1%)

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric
5 blocks
10 blocks

node_history_sync_time_in_ms
14,000 (-8%)
27,060 (-9%)

note_history_successful_decrypting_time_in_ms
2,311 (-7%)
4,542

note_history_trial_decrypting_time_in_ms
:warning: 177 (+95%)
230 (+5%)

node_database_size_in_bytes
17,256,528
33,194,064

pxe_database_size_in_bytes
29,923
59,478

Circuits stats
Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit
circuit_simulation_time_in_ms
circuit_input_size_in_bytes
circuit_output_size_in_bytes

private-kernel-init
327
44,528
25,313

private-kernel-ordering
196
43,633
16,193

base-rollup
1,455
129,774
933

root-rollup
82.7
4,192
729

private-kernel-inner
434
70,819
25,313

public-kernel-private-input
241
33,663
26,945

public-kernel-non-first-iteration
239
33,705
26,945

merge-rollup
7.84 (+1%)
2,712
933

Tree insertion stats
The duration to insert a fixed batch of leaves into each tree type.

Metric
0 deployed contracts
1 deployed contracts

tx_size_in_bytes
16,859
35,462

Transaction processing duration by data writes.

Metric
0 new commitments
1 new commitments

tx_pxe_processing_time_ms
551
1,439

Metric
0 public data writes
1 public data writes

tx_sequencer_processing_time_ms
0.488 (-10%)
576


Initial work

Running through my first deployment to CodeRed, and using that to write an initial version of the plugin.
Tasks

[x] Make a successful deployment.
[x] Write a platform_deployer.py file that replicates the configuration and deployment process.
[x] Write the success message.
[ ] Implement automate-all support.
[ ] Package this, and post it to pypi.

Working notes

[ ] Split the settings file using a template.
[ ] Modify manage.py so it loads settings from settings/base.py. Otherwise it uses prod settings locally.

Split settings file
If we just call cr check, it drops to an interactive terminal session. Do the settings.py split in dsd, so we don't need to make that call.

[ ] Split settings.py into settings/base.py and settings/prod.py, using results of a previous cr check call.

[ ] Make dir.
[ ] Copy settings.py to base.py.
[ ] Remove settings.py
[ ] Write prod.py from template.
[ ] Any other changes?
[ ] Update tests.

[ ] Should be able to run dsd, then run check, and get no output or confirmation message that settings are configured correctly.

Integration tests

[ ] Fix failing test_sd_logs_exists() test.

Modify manage.py to use base settings

[ ] This will make the project continue to work locally, but may impact deployment if CodeRed runs management commands.

[ ] If issues, comment out this modification. Deploy, modify a view to share production env vars. Choose an env var as a signal for when to use prod settings in manage.py?

Env vars on codered
On a free deployment, I dumped env vars into a view:
# Let's see the env vars.
import subprocess
cmd = "printenv"
output = subprocess.run(cmd, capture_output=True)
env_vars = output.stdout.decode().splitlines()

context = {
    "env_vars": env_vars,
}

There are several markers in here that should be consistent over deployments, and unlikely to be present in a local environment:
VIRTUAL_HOST=blog.codered.cloud
WSGI_RUN_USER=blog
WSGI_RUN_GROUP=blog
HOSTNAME=blog.codered.cloud
CR_USER_UID=<redacted>
CR_TENANT_DOMAIN=blog.codered.cloud
CR_TENANT_NAME=dsd-sample-project
CR_EXTRA_DOMAINS=
CR_EMAIL_DOMAIN=email.codered.cloud
CR_USER_GID=<redacted>
CR_TENANT_HANDLE=blog
CR_DFLT_DJANGO=5.1.*

Modified manage.py:
def main():
    """Run administrative tasks."""
    if "CR_USER_UID" in os.environ:
        os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blog.settings")
    else:
        os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blog.settings.base")

Success message

[ ] Mention how to delete project?

Docs

[ ] Keep it to just a README for now.
[ ] How to delete a project.

Next steps

[ ] Package to pypi.
[ ] In a fresh project, install dsd-codered from pypi and make sure configuration-only instructions work.
[ ] Reply VS re API errors, mention this plugin work.
[ ] Implement automated support.
[ ] Sort out tests.
[ ] Announce.
[ ] Anything more for dsd 1.0?

Working notes

[ ] Remove comment about installing cr in README. It's installed as a dependency when installing the plugin.


get content item by external id

code looks good, make the few changes I mentioned. Also, let's add an index for ProviderId + ExternalId... in large schools, this will be needed. You can do this in ./api/src/main/resources/ContentReviewItem.hbm.xml and will need a migration path as well.

Let's defer the index work in ticket https://turnitin.atlassian.net/browse/INT-11180 since Ben will need this PR today


Webpack build fails after upgrade to postcss-cssnext 2.11.0

This is basically the same issue as #357, but the cause this time is not css-rrggbbaa but css-image-map.
I've submitted #380 to fix this.

Thanks, I had the same problem upgrading caniuse-db fixed the issue.

@YasserKaddour this works great if you have a direct dependency upon caniuse-db. But if you are like me and do not, then adding a peerDependency to the package.json feels super hacky.

@YasserKaddour Be aware that if you throw away your yarn.lock, you're also throwing away all the benefits of using Yarn - i.e. you'll get the newest versions of all your dependencies again.
@jimboslicethat Yes, and modifying the resolved dependency is yarn.lock is somewhat less so, but still hacky. I hope the PR will get accepted and that the peerDependency will be kept up-to-date when new capabilities are added in the future; as far as I know that's the only non-hacky solution :)

@Vinnl Thanks,I knew about the risk of deleting yarn.lock, but I didn't mind and everything worked just fine.
Just a question for next time, how can I quickly get the resolved address for yarn with hash and all? like this one
  resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000636.tgz#08230e9dd26632193f29c9d935185c6f6f9fd9ef"

Thanks.

@YasserKaddour I believe I just looked at the registry to find the _shasum for the latest version.

Thanks, good to know.


runtime: SIGPIPE is raised when using net.DialTimeout and timeout is reached

What version of Go are you using (go version)?
1.7.4 darwin
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rk/g9b46vzx70g86vhvqtmwtjxw0000gn/T/go-build402316604=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?
Application that connects to remote server using net.DialTimeout. The application part that connects remotely is written in Go, the application GUI is written in C++ (Qt5). And Go part is statically linked to GUI.
The pseudo-code that causes the issue:
	serverConn, err := net.DialTimeout("tcp", c.remoteServer, CONNECT_TIMEOUT) // 5 seconds timeout
	if err != nil {
		return err // Error is fully handled in calling method
	}

What did you expect to see?
Since error is handled and written to STDERR as a log message I expect to see message and app keep on running.
What did you see instead?
The app exits with code 141 (SIGPIPE). If in C++ part I specify to ignore SIGPIPE (such as signal(SIGPIPE, SIG_IGN);) then I can see log output. Without that the application exists silently**(!)**, which I believe should not be the case, if we raise SIGPIPE, then we at least should see stack trace leading us to the line where EPIPE happened....
Comment
I think preferred solution would be not to raise SIGPIPE at all. Since I can get err value on timeout and can handle it appropriately. FYI, net package has no error type for timeout error. so the only way to ensure that the error is due to timeout is to lookup for substring in error message...

We need to see a complete example that demonstrates the problem.  See https://golang.org/pkg/os/signal for how the Go runtime handles SIGPIPE.  What you are describing is not what is intended to happen, and the runtime has code that is intended to ensure that it does not happen.  So we need a test case we can run ourselves so that we can find out why it is not working for you.

Also, please try Go 1.8. We're no longer fixing bugs (only security issues) in Go 1.7.

this is probably dup of #17393 isn't it @eliasnaur ?

@dcu Thank you for the reference, looks like the same though slightly different use-case.
I agree with comment in referenced issue that in theory Go should not be raising SIGPIPE at all (instead of ignoring it). SIGPIPE is meant for environment where it is not possible to handle error upon write/read to/from closed socket, which is the case for low level languages. Go already provides necessary tools for managing socket errors.
I guess can close as a dup, though sad to see that (according to referenced issue) the fix for this won't be in 1.8.

It looks like a dup of #17393. I'll try (again) to fix it for Go 1.9.


Configure conditional to use hasKey to enable boolean usage

Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[ ] All code is covered by unit and/or runtime tests where feasible.
[x] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[ ] If your commit description contains a Fixes: <commit-id> tag, then
please add the commit author[s] as reviewer[s] to this issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[ ] Provide a title or release-note blurb suitable for the release notes.
[ ] Are you a user of Cilium? Please add yourself to the Users doc
[ ] Thanks for contributing!

Requiring a string yields poor user experience. As is used elsewhere, change conditional to use hasKey to parse value as a boolean, rather than a string.
Fixes: #28381
Make use of hasKey in cilium-configmap.yaml to enable proper use of booleans in values.yaml

The original issue was referencing enable-k8s-networkpolicy and when making the changes to enable proper usage of booleans, I came across several other flags that required the same.
Pre-change (after changing k8sNetworkPolicy to false):
➜  cilium git:(main) helm template cilium . -f values.yaml | grep 'enable-k8s-networkpolicy'
➜  cilium git:(main) ✗

Post-change (after changing k8sNetworkPolicy to false):
➜  cilium git:(use-hasKey-for-booleans) helm template cilium . -f values.yaml | grep 'enable-k8s-networkpolicy'
  enable-k8s-networkpolicy: "false"
➜  cilium git:(use-hasKey-for-booleans) ✗

Workflow needs to be triggered again @squeed. TIA.

/test

/test

Please note that the CI fails are persistent, and will require investigation.

/test

#29409 is probably relevant here as well.

Converting this to a draft until CI failures are sorted out.


Malformed UTF-8 data on fetchEpisodeSources

i got this error today  probably something with crypto js key or something
flixhq.fetchEpisodeSources("movie/watch-living-93718","93718").then(data => {     console.log(data);   })
`node_modules\flixhq-core\dist\crawler\movies\flixhq.js:376
            throw new Error(err.message);
                  ^
Error: Malformed UTF-8 data`

Same Issue

@shin202 can you please have a look

same issue

same issue

I fixed the issue.

same issue

I can fix the issue.

I can fix the issue.
Can you make a PR?

I can fix the issue.

Can you make a PR?

Yes, tonight I will.

@murataktasli  Please have a look.
https://github.com/shin202/flixhq-core/issues/10#issuecomment-1877235317
If you need any help please let me know.

I can fix the issue.

Can you make a PR?

https://github.com/shin202/flixhq-core/pull/23

@murataktasli please let me know if you need more help!

It does not work I also keep getting the malformed utf8 error

It’s working at my end.

It does not work I also keep getting the malformed utf8 error

does anyone know how to bypass the cors restriction, is there a m3u8 proxy available by any chance?

does anyone know how to bypass the cors restriction, is there a m3u8 proxy available by any chance?

M3u8 files from flixhq?

does anyone know how to bypass the cors restriction, is there a m3u8 proxy available by any chance?

M3u8 files from flixhq?

oh I just noticed I was using vidcloud server instead of the default upcloud. but still

does anyone know how to bypass the cors restriction, is there a m3u8 proxy available by any chance?

M3u8 files from flixhq?

oh I just noticed I was using vidcloud server instead of the default upcloud. but still

Paste one m3u8 link here for test

does anyone know how to bypass the cors restriction, is there a m3u8 proxy available by any chance?

M3u8 files from flixhq?

oh I just noticed I was using vidcloud server instead of the default upcloud. but still

https://github.com/shin202/flixhq-core/assets/30212746/c55d6d95-9123-4303-a407-3e9398629db4
Upcloud links are working normally. Have a look

does anyone know how to bypass the cors restriction, is there a m3u8 proxy available by any chance?

M3u8 files from flixhq?

oh I just noticed I was using vidcloud server instead of the default upcloud. but still

https://github.com/shin202/flixhq-core/assets/30212746/1b5cd408-77b8-43a4-803f-707bc5cace26
Upcloud links are working. Have a look.

so I have been testing alot today and just sometimes randomly for a few minutes the malformed utf-8 error appears then fixes itself again. and upcloud works fine no cors restriction, alot of buffering can that be helped? also vidcloud server I get cors error

so I have been testing alot today and just sometimes randomly for a few minutes the malformed utf-8 error appears then fixes itself again. and upcloud works fine no cors restriction, alot of buffering can that be helped? also vidcloud server I get cors error

Yesterday there was some issue in e4 key.
Regarding Vidcloud i will test and let you know.


mpu_init() failed

Hello , I have a problem with using the package ,
I'm using beaglebone black with ubuntu 16.04.3 LTS xenial and mpu9250 at pins 19,20 at bbb .
I used (i2cdetect -r 2) to ensure that the imu is in the right channel and that was right ( The address 0x68 appeared when i attached the imu module to the board).

When i run the node , This error appears :

Iniitializing IMU .open(i2c_bus) : no such file or directory .
mpu_init() failed

I  guessed that the default i2c channel isn't the channel i used
and when i modified the file ( bb_mpu9150/src/linux-mpu9150/local_defaults.h)
and put

DEFAULT_I2C_BUS =2

instead of 1 and compiled again ( I compile directly using catkin_make) and rerun the ros node , The error became:

Iniitializing IMU .Unsupported software product rev 6 .
mpu_init() failed

Any help with these errors ? Does this package need any extra packages to work?
Thank you

I tried it with another sensor (mpu9150) and it worked . Thank you.
I want to try to edit the package to be compatible with mpu9250 . Any suggestions , Where can i begin?

Hello @ma7moudk where you successful in porting this project for MPU9250?

Yes , It worked for mpu9250.
I had to change product revision info. to work.
File:  	bb_mpu9150/src/linux-mpu9150/eMPL/inv_mpu.c
Lines: 715:723

Thanks for the update @ma7moudk . i haven't integrated this into the kernel yet. as of now I'm using as a standalone application. One thing which i would like to know is, Do you face any quaternion values drift issue(Yaw drift which i see after converting quaternions to Roll,Pitch & Yaw) when using this DMP? when i leave the MPU9250 on a stable position, after 20-30 mins i see the Quaternion values slowly getting drifted away which isn't expected. Have you faced this issue? If so can you help me on how to fix it. I tried few options and couldn't fix it. I'm still working on figuring this out.

No , I didn't face this issue , My yaw value don't drift in time.
I have another issue : I tried to calibrate much more than once , The best result I got wasn't so great :+1:
When I move the imu 90 degree four times , I get 70  , 100 , 80 , 110  yaw differences.
I had to map these wrong values to the right values assuming that the error is linear.
But whatever orientation I got in a specific heading , I always have this orientation when I come back to this heading.
I believe there is something I can improve that with . I haven't succeeded yet.
Hope you can solve your issue , I use the YAW_MIX_FACTOR with value 4.


Port custom materials to Hlms pieces

Desired behavior
Right now specific passes such as the Segmentation Camera iterates through all objects, changes their material to a custom low level materials, and renders that.
This works but has a few issues:

It cannot handle all details that HlmsPbs/HlmsUnlit does (e.g. HW skeletal animation)
It doesn't handle custom Hlms implementations (such as Terra's)
It can be slow to change the materials so often (switch it on every object to render, then restore them back)
It isn't API portable (it needs one material per API i.e. D3D11/Metal/GL)

Ogre +2.1 supports Hlms pieces, which allows users to add custom code that can be run before/during/after our default code runs.
This solves all outstanding issues:

It's fast
No need to switch materials (we'd still need to iterate through objects to disable those unwanted, unless we use visibility flags instead, but that's out of scope of this ticket)
It's API portable
It works with (nearly?) all Hlms implementations
All features supported by the underlying implementation that affect vertex position (i.e. HW skeletal animation) are automatically supported.

Alternatives considered
This is the recommended way.
Implementation suggestion
I'll be the one implementing this feature
Additional context

yeah that'll be nice go with the recommended way. Originally, we tried material schemes but couldn't get it to work in ogre 2.1. We then resorted to this workaround and have been doing it in many places of our code, e.g. MaterialSwitcher used by selection buffer. So it would nice to go with the proper solution.

The changes are currently on https://github.com/darksylinc/ign-rendering/tree/matias-hlmsCustom
A few takes:

It's going to be slighter harder than I realized; because we have to send custom data per object (not a huge deal given that it's only 1 set of float4)
Iteration through objects is still needed so we can set those values to the object. What changes is that we no longer need to swap out materials (the rest of the benefit remain, e.g. API cross portability, vertex shader-based deformation such as HW skinning, etc)

Not iterating through objects every time we need the segmentation camera looks doable but that'd be a refactor from Ign side, rather than interface through Ogre. I won't be addressing that now; and anyone could do it

Segmentation camera is already working! I couldn't believe it worked on first try. I was suspicious at first and... it wasn't working :)
But after a few fixes it's working!
Things missing:

[ ] Unlit
[ ] Terrain
[ ] Harmonize with other Hlms customizations
[ ] Reuse same code for other types of cameras?

I have a question (I think I'm already answering myself):
I wish to rename the class Ogre2IgnHlmsCustomizations to Ogre2IgnHlmsSphericalClipMinDistance because that's the only thing it does and will do (there is already another class at a higher level that groups all modules together)
The rename should happen in the PR? If I do it now, it would make review harder, not to mention a whole file (Ogre2IgnHlmsCustomizations.hh and Ogre2IgnHlmsCustomizations.cc) would have to be renamed.
Since it's a simple rename, it should be split into its own standalone PR, right?

Ogre2IgnHlmsCustomizations rename is in branch matias-hlmsCustom2

(*) As for Fortress, personally I'd say HlmsPbsTerraShadows has higher priority than Ogre2IgnHlmsCustomizations, because the latter was fixing a bug that was also fixed in several ways IIRC. I'm not sure how necessary it is now.
Worst case scenario, Ogre2GpuRays could call hlmsPbs->setListener when it needs to render, then when it's done it restores HlmsPbsTerraShadows as the listener

I just tried disabling the Ogre2IgnHlmsCustomaizations in Ogre2GpuRays.cc by doing the test mentioned in https://github.com/ignitionrobotics/ign-rendering/pull/356#issuecomment-923490966, and found that the lidar returns are now different so we will need to do the workaround of calling setListener when render is needed.

Since it's a simple rename, it should be split into its own standalone PR, right?

Update: I've decided to put it in its own standalone PR

yep that sounds good to me.

I just tried disabling the Ogre2IgnHlmsCustomaizations in Ogre2GpuRays.cc by doing the test mentioned in #356 (comment), and found that the lidar returns are now different so we will need to do the workaround of calling setListener when render is needed.

Understood (note that it affects Fortress).
I do have something to raise though: Enabling Ogre2IgnHlmsCustomizations makes GL_DEPTH_CLAMP pointless:
void Ogre2DepthCamera::Render()
{
#ifndef _WIN32
  if (useGL)
    glEnable(GL_DEPTH_CLAMP);
#endif

 ...
#ifndef _WIN32
  if (useGL)
    glDisable(GL_DEPTH_CLAMP);
#endif
}

Thus if you remove it, you will probably get the same results as having Ogre2IgnHlmsCustomizations on 99% of the time.

for Ogre2DepthCamera I remember it was important to have the GL_DEPTH_CLAMP, otherwise the integration test fails. We currently don't have hlms customizations for this particular class, and I think you don't need to touch that class for the work you're using right?

This ticket is almost done except we're missing porting Ogre2ThermalCameraMaterialSwitcher and Terrain.
Ogre2ThermalCameraMaterialSwitcher will be a more difficult because it has two materials: solid colour (easy) and a texture variation. I'm tempted to leave the texture variation using a V1 material. That will depend on how easy/difficult it ends up being.

OK Ogre2ThermalCameraMaterialSwitcher is done. It had 3 paths: solid colour, textured heat source, and background (can be solid or textured).
Solid colour and background are covered via Hlms pieces.
However textured heat source I preferred to keep it as a Material because it makes more sense: Using Hlms would be more work, there could be little to gain, and there's potential for introducing more bugs than I'd be fixing.
The things that remain are:

Terrain (easy)
Adding removeCustomParameter

This last one item I just added it. The thing is I realized that after we're done we must call removeCustomParameter. By doing that, if we combine multiple cameras (e.g. Thermal + Segmented) we may miss bugs because one camera set a custom parameter while the other did nothing. This mistake is present in all previous branches (i.e. Fortress, Edifice, etc) and I just want to harden our codebase to detect incorrect usage.

This is fixed by #545.


Rotating models in SceneComposer in SDK not done correctly

From @Ali-RS on March 2, 2016 19:0
Rotating a model in scene composer is not done correctly and Parent node box not rotating along with mesh box and cause problem in transforming model in scene.
see detailed description here :
http://hub.jmonkeyengine.org/t/bug-report-problem-with-rotating-models-in-scenecomposer-in-sdk/35224
Copied from original issue: jMonkeyEngine/jmonkeyengine#437

From @grizeldi on March 2, 2016 19:32
I'll try to figure out where the problem lies.
Don't expect too much from a beginner though :wink:

From @grizeldi on March 3, 2016 6:42
@Dokthar I know. Checked out the classes yesterday, added some debug printlns, but I still didn't find the void that is called when you rotate something...

From @Dokthar on March 2, 2016 23:37
@grizeldi don't go crazy on this, you'll have to look into scenecomposer's tools (some stuff i worked on  ;) ).

created a pr #16


Test_sql_compute.py could benifit from test fixtures

In many places the tests just check that the correct looking query is made. In other places sqlite databases are made on a pertest level. And there is no testing against an on disk RDBMS, which is probably important for our use case (reference).
We should create a test fixture with a default dataset (or maybe two), and refactor all the tests to use this.

I think this would be a nice use case for pytest's indirect parameterization. The parameters would be the connection strings, like so:
mysql = 'mysql+pymysql://user@host:port/public::accounts'
postgres = 'postgresql+psycopg2://user@host:port::accounts'
sqlite = 'sqlite:///test.db::accounts'
dshape = 'var * {id: int64, amount: float64, name: string}'

raw = [...]

@pytest.yield_fixture(params=[mysql, postgres, sqlite])
def data(request):
    t = odo(raw, request.param, dshape=dshape)
    try:
        yield t
    finally:
        drop(t)

def test_column_arithmetic(data, s):
    expr = t.amount  * 2
    assert odo(compute(expr, data), list) == odo(compute(expr, raw), list)

etc.

Then, every test that uses data would automatically get run against postgres, mysql and sqlite

Seems fine to me.
On Thu, Apr 9, 2015 at 12:11 PM, Phillip Cloud<EMAIL_ADDRESS>wrote:

Then, every test that uses data would automatically get run against
postgres, mysql and sqlite
—
Reply to this email directly or view it on GitHub
https://github.com/ContinuumIO/blaze/issues/1026#issuecomment-91330873.

Okay, this would totally change the module. So to break it up into more managable chunks, I need to:

Consolidate all tests to use the same data, for now an in-memory sqlite db.
Create corresponding on-disk databases for sqlite, mysql, and postgres.
Set up the yield_fixture with the data.

Issue #1027 is a partial step towards 1.


Automated cherry pick of #6528: fix: 避免regional network-list --zone导致返回结果为空

Cherry pick of #6528 on release/3.2.
#6528: fix: 避免regional network-list --zone导致返回结果为空

Codecov Report

Merging #6529 into release/3.2 will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@               Coverage Diff               @@
##           release/3.2    #6529      +/-   ##
===============================================
- Coverage         7.04%    7.03%   -0.01%
===============================================
  Files              649      650       +1
  Lines           111531   111596      +65
===============================================
- Hits              7858     7856       -2
- Misses          103065   103131      +66
- Partials           608      609       +1

Flag
Coverage Δ

#aFlag
7.03% <0.00%> (-0.01%)
:arrow_down:

Impacted Files
Coverage Δ

pkg/compute/models/guest_queries.go
0.00% <0.00%> (ø)

pkg/compute/models/guests.go
0.56% <ø> (ø)

pkg/compute/models/wireresource.go
0.00% <0.00%> (ø)

pkg/monitor/alerting/conditions/query.go
0.64% <0.00%> (ø)

pkg/monitor/alerting/conditions/reducer.go
95.87% <0.00%> (-2.02%)
:arrow_down:

.../monitor/alerting/conditions/suggestrulereducer.go
0.00% <0.00%> (ø)

pkg/multicloud/esxi/host.go
0.94% <0.00%> (-0.01%)
:arrow_down:

pkg/multicloud/esxi/storage.go
0.00% <0.00%> (ø)

pkg/multicloud/esxi/vdisk.go
0.00% <0.00%> (ø)

pkg/multicloud/esxi/virtualmachine.go
0.00% <0.00%> (ø)

... and 3 more

Continue to review full report at Codecov.

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


[REQUEST] Improved prompt with inline updates

How would you improve Rich?
Hi Will, again, thanks for the wonderful work you're doing.
I've seen you've added support for prompts in 3.4.0. Is that something you want to continue building on?
It would be great to have a more sophisticated framework of building prompts, similar to questionary or listr2 for NodeJS. Questionary has arrow-key based navigation between "menu" items, listr2 offers options such as building multi-line outputs where part of the output can be refreshed, easy to use symbols (checkmark, question mark etc.), conditional outputs and so on.
What problem does it solved for you?
Building more interactive CLI tools.

I've been thinking about that for a while. Rich based menus and widgets would make a slick interface. It would take bit of time and effort to do it justice, and I'm not sure I want to take it on. Maybe if I get more sponsorship!

I needed a menu similar to the original post where you could interactively select an item and wanted the awesome features rich has. This only works on termios supported systems and is not the best way to implement it, but I will post it here if someone else is looking for it.

 Code
from __future__ import annotations

import sys
import termios
import threading
import time
import tty
from typing import TYPE_CHECKING, Iterator

from rich.live import Live
from rich.style import Style
from rich.text import Text

if TYPE_CHECKING:
    from rich.console import Console, ConsoleOptions, RenderResult

# Function to update the last clicked key
def get_key_press() -> str:
    fd = sys.stdin.fileno()
    old_settings = termios.tcgetattr(fd)
    try:
        tty.setraw(fd)
        return sys.stdin.read(1)
    finally:
        termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)

class Menu:
    def __init__(
        self, items, *, title=None, select_style=None, non_style=None, lock=None
    ) -> None:
        self.items = items
        self.title = title
        self._key_count = 0
        self.selected_item = 0

        if select_style is None:
            self.select_style = Style(color="green", bold=True)
        else:
            self.select_style = select_style

        if non_style is None:
            self.non_style = Style(color="white")
        else:
            self.non_style = non_style

        self._lock = lock if lock else threading.RLock()
        self._thread = threading.Thread(target=self.get_user_input)
        self._threadstart = False
        self._stop = False

    def display(self) -> Iterator[Text]:
        self.selected_item = self._key_count % len(self.items)
        for i, item in enumerate(self.items):
            if i == self.selected_item:
                yield Text(f"➤  {item}", style=self.select_style)
            else:
                yield Text(f"   {item}", style=self.non_style)

    def get_user_input(self) -> None:
        while not self._stop:
            with self._lock:
                key = get_key_press()
                if key == "\x1b":
                    # The Escape key was pressed (arrow keys usually start with ESC)
                    char = sys.stdin.read(2)
                    if char == "[A":  # Up arrow
                        self._key_count = self._key_count - 1
                    elif char == "[B":  # Down arrow
                        self._key_count = self._key_count + 1
                elif key == "\r":
                    self._stop = True
                    break

            time.sleep(0.1)

    def __rich_console__(
        self, console: Console, options: ConsoleOptions
    ) -> RenderResult:
        if self.title:
            yield self.title

        with self._lock:
            yield from self.display()

        if not self._threadstart:
            self._thread.start()
            self._threadstart = True

def live_menu(menu_items, console, **menu_kwargs):
    menu_keys = list(menu_items)
    menu_values = menu_items.values() if isinstance(menu_items, dict) else menu_items

    with Live(console=console, transient=True) as live:
        menu = Menu(menu_values, lock=live._lock, **menu_kwargs)
        while not menu._stop:
            live.update(menu)
            time.sleep(0.05)

    return menu_keys[menu.selected_item]

if __name__ == "__main__":
    from rich.console import Console

    console = Console()
    menu_items = {"Option 1": "Test 1", "Option 2": "Test 2", "Option 3": "Test 3"}
    selected = live_menu(menu_items, console, title="Select an option")
    console.print(f"You selected: {selected}")

https://github.com/Textualize/rich/assets/19758978/6a3be039-fb34-4818-bf80-c5c1daa01dba


Change the version format to displayed in logs

Description:
Resolves #

Codecov Report

Merging #53 (5d907e3) into master (3738815) will decrease coverage by 0.08%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
- Coverage   81.51%   81.43%   -0.09%
==========================================
  Files          13       13
  Lines        1185     1185
==========================================
- Hits          966      965       -1
- Misses        164      165       +1
  Partials       55       55

Impacted Files
Coverage Δ

pkg/controllers/machinenodepool_controller.go
80.33% <0.00%> (-0.34%)
:arrow_down:

pkg/controllers/machine_controller.go
74.92% <0.00%> (ø)

Continue to review full report at Codecov.

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


completed assignment 1

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Adding code
What did you learn from the changes you have made?
Python
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
How were these changes tested?
A reference to a related issue in your repository (if applicable)
Checklist

[Y] I can confirm that my changes are working as intended

You did a good job here!
A few things to note, your function works but can be simplified further. Since you are already sorting the strings and comparing characters one by one in the loop, the loop itself is redundant because comparing sorted strings directly achieves the same result. This happens in the second part as well for checking the case sensitivity.
Please go ahead and do the modifications and then let me know, Thanks!

You did a good job here! A few things to note, your function works but can be simplified further. Since you are already sorting the strings and comparing characters one by one in the loop, the loop itself is redundant because comparing sorted strings directly achieves the same result. This happens in the second part as well for checking the case sensitivity. Please go ahead and do the modifications and then let me know, Thanks!

Hi there, I have optimized the code by removing the redundant loop. Thank you!

you did a great job here!
Just a quick note, there are a few lines that can be removed or modified to be simpler and shorter.
Please go ahead and close this pull request now. Thanks!


jsx comments?

I didn't see an issue for this. If this is already known, I appologize.

Additionally, tag auto complete also does not work in JSX.

@johnsoncodehk it looks like comments inside map functions are incorrect. should I file a new issue for this?

@whaaaley yes please open a new issue.


Support to dropdown menus

Summary

Added a javascript file to be loaded in active_admin.js.coffee
Added support to navbar's dropdown menus

Related issue: https://github.com/vinhnglx/active_bootstrap_skin/issues/4

@mrosso10 thanks for your PR. But, when I test your PR on my local, I don't see any class has_nested. So the code doesn't work. Could you please check this PR again?

Oh, I will. Maybe we have different ActiveAdmin versions. I'll check it out.

@vinhnglx In which versions of Rails and ActiveAdmin did you try it?

@mrosso10
Rails 4.2.5
ActiveAdmin 1.0.0.pre2

@mrosso10 hey man, you can check my PR #8


Bug/react/add props to typography component

I added the union of the default props of h1, h2, h3, h4, h5, h6, and p react elements in Typography component.

@mjfura thanks for your contribution your PR is approved and merged and added to the new update for tomorrow.


WFRP4e 2nd dice for d100 is always 0

Foundry VTT:  v12 build 331
Warhammer Fantasy RP 4e:  8.2.2
When using GoDice Connector on Android Phone and inherent Unfullfilled roles the second die is always 0.
The GoDice application on Android shows the correct values, but Foundry VTT has incorrect value.
This means if you roll: d10%, d10 then the value is X0
if you roll: d10: d10% the value is 0X

Can confirm that there is something fishy going on.
FoundryVTT: v12 build 331
WFRP4e: 8.2.2
GoDice: 2.0
Config done over the Foundry core settings.
I have a bit different results. Here are my findings that are reproducible:

The dice wont blink to show which dice to roll.
On a D100 roll, if you just roll one dice, it instantly rolls in Foundry. The result is correct bit it rolles just the first or the second digit.
If you roll both dice at the same time, only the first recognized dice is shown with the correct digit. The second is totally random.
The result is always correct in the app.


Prints out a warning mismatch

Original issue: https://charm.cs.illinois.edu/redmine/issues/449

Note: Related to #448 due to when connection happens (takes two tries), otherwise independent

Original date: 2015-10-06 20:38:57

Write a real description for this so the bug is comprehensible.

Original date: 2015-10-26 18:31:05

Could not reproduce using (presumably) the same program (as mentioned in #448).


Cow: Watch automationtools.ai

Cow requests the watch of the watch_keyword automationtools\.ai. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

automationtools\.ai has been seen in 2 true positives, 0 false positives, and 0 NAAs.

Approved by VLAZ in Charcoal HQ


[Config profile]: create base config profile

Issue: https://github.com/opentargets/genetics/issues/521
Deploy preview: https://deploy-preview-192--genetics-app.netlify.app/

@mbdebian comments addressed in https://github.com/opentargets/genetics-app/pull/192/commits/0faa0c1b4d2c9f0d8a1e12f97a6497497a96e6bb


Matching fails when JSON contains maps and keys are not alphabetically ordered

I've run into an issue where my expected result JSON is failing to match, and being re-ordered before diffing which is producing an incorrect and strange result.
My JSON looks something like this - ignoring the ugliness of this output, the test was failing because it was expecting things to be in a different order, specifically it was expecting the keys to be alphabetical.
{
  "md": {},
  "r": [
    {
      "dt":<PHONE_NUMBER>000
    },
    {
      "dt":<PHONE_NUMBER>000
    },
    {
      "dt":<PHONE_NUMBER>000,
      "participation": {
        "pa": {
          "e": 0,
          "r": 0,
          "mb": 0,
          "a": 0,
          "m1": 5,
          "m3": 0,
          "m12": 0
        }
      }
    }
  ],
  "km": {
    "5295d6aadb4d08a0cb00101d": "0",
    "5295d6a9db4d08a0cb00101a": "1",
    "5295d6aadb4d08a0cb00101e": "2",
    "5295d6a9db4d08a0cb00101b": "3",
    "5295d6aadb4d08a0cb00101f": "4",
    "5295d6a9db4d08a0cb00101c": "5",
    "5295d6aadb4d08a0cb001022": "6",
    "5295d6aadb4d08a0cb001020": "7",
    "5295d6aadb4d08a0cb001021": "8",
    "4ef025c218072e09ab0000f3": "e",
    "4ef025c218072e09ab0000f4": "f",
    "5295d6a9db4d08a0cb001019": "9",
    "5295d6a9db4d08a0cb001018": "a",
    "5295d6a9db4d08a0cb001017": "b",
    "5295d6a9db4d08a0cb001016": "c",
    "5295d6a9db4d08a0cb001015": "d"
  }
}

I've stepped through the code and this is what I think's happening:
1. It uses JsonSlurper.parse to read the file containing my expected body JSON into a map in private static loadFile method in PactReader.groovy
2. It use JsonOutput.toJson to extract the body contents from the JSON into a string, in static extractBody method in PactReader.groovy
This has the side effect of re-ordering the JSON keys to be alphabetical, which shouldn't matter in most cases, however ...
3. In JsonBodyMatcher.scala, for some reason it's failing to match the JSON.
This is using some Scala libraries to turn the json into an object map. It seems to deal OK with simple string values being in a different order, but when one of the values is a map with its own keys in a different order, it fails.
4. It then runs through the groovy code in compareBody in ResponseComparison.groovy, and fails to match, because the expectedBody now has its keys reordered, and does not match the actualBody.
I've made a change that fixes the problem by loading the actualBody through the JsonSlurper and then running JsonOutput.toJson before pretty printing it, but I don't really think it's a great fix. I'm making a PR of it anyway in the hopes that it's clear enough to show you what the issue is, and maybe you can suggest a better fix. It seems like the real issue is in the JSON comparison in the Scala, but I really didn't know how to go about fixing that.
I've also written a test in ResponseComparisonTest.groovy (which does fail if you reverse my change, so this should at least help to track down the issue).

I'll have a look to see what is happening, but the comparison should not be impacted by key order. This must be a regression introduced from switching Json4s for parsing JSON.

Awesome, thanks for the quick response. It was only specific cases that seemed to be affected, not all (as I described).
Let me know if you need any other info or help to fix it.

I have worked out what is the problem. It is not the comparison, but the diff of the bodies that is displayed afterwards. Your fix is the correct one, because if the keys are in a different order, the displayed diff is useless.


[Custom Trims] Custom Trims I made for anyone to use

Batch 2:

Feel free to download and use
Edit: will add to this list as I make more

@NathanQuayle Feel free to include any of these in the defaults that you want.

I love these! Great job 👍 . I'll try to find some time this weekend to move them to https://github.com/NathanQuayle/max-skill-trim/tree/custom-trims :)

Hey Nick, gonna close this. You can now see all the trims at: https://nathanquayle.github.io/max-skill-trim/.
I've marked them all as 'Designed by anonymous' because I wasn't sure if you wanted your username there. But if you do feel free to move them into a folder with whatever display name you'd like and it'll be picked up.

Hey Nick, gonna close this. You can now see all the trims at: https://nathanquayle.github.io/max-skill-trim/.
I've marked them all as 'Designed by anonymous' because I wasn't sure if you wanted your username there. But if you do feel free to move them into a folder with whatever display name you'd like and it'll be picked up.

Awesome!!


Merge more Material 3 libraries

As you can see in this image. A lot of code should be shipped in Compose Multiplatform 1.6.0, but it is still missing.
On the left is the original Androidx repository with version 1.2.0-beta02 of Material 3 checked out.
https://developer.android.com/jetpack/androidx/releases/compose-material3#1.2.0-beta02
https://android.googlesource.com/platform/frameworks/support/+/7a45f0bc9e0a73744b3780a6f92e1b570de58bba

Don't worry, we're aware of this diff and working on it.
1.6 merge - https://github.com/JetBrains/compose-multiplatform-core/pull/980
material 1.2 in our queue as well.
Duplicate of #4052

Hm, that issue doesn't formally mention material3 1.2, so let's keep it open then

Is there a plan to make it to 1.6 release?

yes

I created a new issue to describe my thoughts on the version management of the Compose Multiplatform. https://github.com/JetBrains/compose-multiplatform/issues/4201

Merged in https://github.com/JetBrains/compose-multiplatform-core/pull/1044

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


increase from 2048 to 4096 bits

You might want to cherry pick out the README change, but I feel 2048 might be too weak for today's crypto standards

This sounds great. Exactly what I was trying to do with my install. 2048 bits is waaaay too small for modern standards.

@dylanmtaylor nice work, might be worth taking a look #23, specifically this update

I could easily write a bit of code to prompt for the bit size, it's not overly complicated to do, but I definitely think 4096 should be the default. 8192 seems a bit overkill in my opinion. Is there much demand for the feature?

@Stsosz and @dylanmtaylor I'm NOT the maintainer but it seems to me that this community has differing ideas RE: a safe key-bit length. I think that a prompt would be a good addition, but that may just be me.
From my point of view it would be a nessisity to add a section in the README about key length. Here's a few links I've found, it's not at all complete but just a little research I've done today.

May, 2015, OpenVPN.net has a section on hardening

Up to 4096-bit is accepted by nearly all RSA systems (including OpenVPN,) but use of keys this large will dramatically increase generation time, TLS handshake delays, and CPU usage for TLS operations; the benefit beyond 2048-bit keys is small enough not to be of great use at the current time. It is often a larger benefit to consider lower validity times than more bits past 2048, but that is for you to decide.

Feb 2015, Torrentfreak.com VPN Service Provider Review

Key Length
Used as standard length
Total mentions

1024
0
0

2048
12
18

4096
13
18

8192
0
0

July 2012, National Institute of Standards and Technology Recommendation for Key
Management

2048 bits will be sufficient for commercial use until around the year 2030.

Obviously this is just a start and we can draw our own conclusions, but it seemed like a good unbiased set of data to me.

@stefancrain you would be correct. The idea of this script is to provide users with a quick and easy way to setup a VPN server. The security customizations are sometying that the end user can do after everything is installed should they choose.
Adding an additional option during the install while a good idea for the advance users add more complexity to the script which may discourage some new users.
Keeping it simple and easy is what this script is setup to do.

I feel it should stay simple but use hardened security. 4096 bits isn't too much overhead, and is more secure. There is little downside for personal use and use with a small number of clients

@jamesrascal totally agree with you - maybe this could be solved with a set of instructions?
Here's another source, this time from the EU.

Oct 2013, European Union Agency for Network and Information Security

We have focused on 128 bit security in this document for future use recommendations; clearly this offers a good long term security gaurantee. (RSA 2048 = 112 bit) p35
It would seem prudent that only legacy applications should use 1024 bit RSA modulus going forward, and that future systems should use RSA keys with a minimum size of 3072 bits. p31

Legacy
Near Term ￼(10+ years)
Long Term (30-50 years)

1024
3072
15360

@Stsosz: 2048 bits is waaaay too small for modern standards.

Prove why.

@Stsosz isn't too much overhead

Just a quick test on a DigitalOcean VPS:
root@test:/etc/openvpn/easy-rsa/2.0# time /etc/openvpn/easy-rsa/2.0/build-dh
Generating DH parameters, 2048 bit long safe prime, generator 2
This is going to take a long time
................................................................................................+...................+.................................................................................................................................................................................
[...]
.......................+....................................................................................+.........+.............................................+............++*++*

real	3m37.371s
user	3m35.396s
sys	0m0.912s
root@test:/etc/openvpn/easy-rsa/2.0#

root@test:/etc/openvpn/easy-rsa/2.0# time /etc/openvpn/easy-rsa/2.0/build-dh
Generating DH parameters, 4096 bit long safe prime, generator 2
This is going to take a long time
..............................................+...........................+.......+.......................................................................................+...........................................................................................................................
[...]
..............................................+...............................................................................................................................++*++*

real	19m44.100s
user	19m37.156s
sys	0m1.480s

@dylanmtaylor: I definitely think 4096 should be the default

Convince the OpenVPN devs about it and the script will use it by default in its current form.

Uh... That second quote was not by me... @Nyr

2048 is the minimum that should be acceptable anywhere. Debian is forbidding 1024 bit keys for instance (source: https://lists.debian.org/debian-devel-announce/2010/09/msg00003.html) If a way to crack 2048 bit keys is discovered, it will still take a sufficiently long time to crack a 4096 bit key. I do not find 20 minutes to generate the primary key on a low-end VPS completely unacceptable. It only has to be done once, and after that, adding user certs takes only a few seconds (tested on bare metal)

@Stsosz sorry, fixed.
@dylanmtaylor: 2048 is the minimum that should be acceptable
I agree, that's why it's the default currently.
@dylanmtaylor: I do not find 20 minutes to generate the primary key on a low-end VPS completely unacceptable
Neither do I, but DigitalOcean is not a low-end service, more like middle class. On low-end OpenVZ services with a slow CPU, users could even be suspended during setup if I switched to generating 4096 bit keys and if not, it could still take more than an hour. Not to mention a Raspberry Pi or something like that.
@dylanmtaylor: I strongly feel that your security is worth 15 minutes of your time.
I do too, but I feel like shorter keys provide a good balance between performance and security, which is the same position held by the OpenVPN developers. And remember, longer key lengths do not only affect performance during key generation.

What if I were to code in an option that the user selects? For instance

Would you like to upgrade to using a 4096-bit RSA key [Y/n]? n

No, because:

The script is a "road warrior" installer. If your adversary potentially has the capacity to crack 2048 bit keys in a reasonable amount of time, your threat model shouldn't include this script.
One prompt wouldn't explain the implications to the user. I don't really consider it an upgrade, certainly not on the performance side.
There are ZERO practical security benefits on using longer keys at this time. There are some serious disadvantages which proponents for the change seem to ignore.
Someone would later want to add a prompt to change the cipher too. Same implications as with this: decreased performance and confused users.
I am not a commercial VPN provider selling a false sense of privacy or security to my users. They need to implement longer keys because paranoid customers with little technical knowledge ask them. They are in the business of selling bullshit, I am not.

TL;DR: longer keys have little/no benefits for the OPSEC of the users. I understand there are differing opinions on this matter, but I prefer to respect the default OpenVPN settings which were selected by very capable people and will probably be considered secure for the next 10+ years. Forks about this are welcome but will not be merged at this point.


Zero Padding Support for Channel Dimension

Hi,
I am trying to convert a nn.LocalResponseNorm(size=5, alpha=0.0001, beta=0.75, k=1.0) layer in pytorch to CoreML. It successfully got converted to ONNX, but cannot be converted to CoreML due to a zero padding error in channel dimension. Here is the trace of the error:
File "convert_coreml.py", line 31, in convert_to_coreml
coreml_model = convert(onnx.load('coreml_models/' + onnx_name), image_input_names=['input_image'], mode='classifier', class_labels=[i for i in range(2)], disable_coreml_rank5_mapping = True)
File "/Users/ddzhou/anaconda3/envs/ACMICPC/lib/python3.6/site-packages/onnx_coreml/converter.py", line 565, in convert
_convert_node_nd(builder, node, graph, err)
File "/Users/ddzhou/anaconda3/envs/ACMICPC/lib/python3.6/site-packages/onnx_coreml/_operators_nd.py", line 1475, in _convert_node_nd
return converter_fn(builder, node, graph, err)
File "/Users/ddzhou/anaconda3/envs/ACMICPC/lib/python3.6/site-packages/onnx_coreml/_operators_nd.py", line 924, in _convert_pad
_convert_pad_5d(builder, node, graph, err)
File "/Users/ddzhou/anaconda3/envs/ACMICPC/lib/python3.6/site-packages/onnx_coreml/_operators.py", line 1369, in _convert_pad
builder, node, graph, err)
File "/Users/ddzhou/anaconda3/envs/ACMICPC/lib/python3.6/site-packages/onnx_coreml/_operators.py", line 217, in _add_conv_like_op
get_params_func(builder, node, graph, err, params_dict)
File "/Users/ddzhou/anaconda3/envs/ACMICPC/lib/python3.6/site-packages/onnx_coreml/_operators.py", line 1335, in _get_pad_params
pad_t, pad_l, pad_b, pad_r = pads
ValueError: too many values to unpack (expected 4)
Any help would be appreciated!

Fixed this by first transposing it and then transposing it back


FIFA 19 Dataset Analysis

ML-Crate Repository (Proposing new issue)
:red_circle: Project Title : FIFA 19 Dataset Analysis
:red_circle: Aim : Analyze different aspects of the dataset and provide the pattern of the dataset from the visualization.
:red_circle: Dataset : https://www.kaggle.com/karangadiya/fifa19
:red_circle: Approach : Try to use 3-4 algorithms to implement the models and compare all the algorithms to find out the best fitted algorithm for the model by checking the accuracy scores. Also do not forget to do a exploratory data analysis before creating any model.
Hello, ML-Crate contributors, this issue is only for the contribution purposes and allocated only to the participants of SWOC 2.0 Open Source Program and JWOC '22 Open Source Program.

📍 Follow the Guidelines to Contribute in the Project :

You need to create a separate folder named as the Project Title.
Inside that folder, there will be four main components.

Images - To store the required images.
Dataset - To store the dataset or, information/source about the dataset.
Model - To store the machine learning model you've created using the dataset.
requirements.txt - This file will contain the required packages/libraries to run the project in other machines.

Inside the Model folder, the README.md file must be filled up properly, with proper visualizations and conclusions.

:red_circle::yellow_circle: Points to Note :

The issues will be assigned on a first come first serve basis, 1 Issue == 1 PR.
"Issue Title" and "PR Title should be the same. Include issue number along with it.
Follow Contributing Guidelines & Code of Conduct before start Contributing.
This issue is only for 'SWOC' and 'JWOC' contributors of 'ML-Crate' project.

:white_check_mark: To be Mentioned while taking the issue :

Full name :
GitHub Profile Link :
Participant ID :
Approach for this Project :
What is your participant role?

[ ] SWOC 2.0 Participant.
[ ] JWOC 2022 Participant.
[ ] Contributor

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎

Full name : Tandrima Singha
GitHub Profile Link : https://github.com/tandrimasingha
Participant ID: 1044
Approach for this Project : Analyzying different aspects of the dataset and provide the pattern of the dataset from the visualization. Using 3 algorithms to predict.
What is your participant role?
SWOC 2.0 Participant.


Choose square nav_shape if detected num_frames is square (web-only)

Fixes #1309
Required updating tests for MIB and MRC detect_params. Quite difficult to test this for the other datasets affected as we don't necessarily have data recorded on a square nav grid (apart from mocking the data).
Contributor Checklist:

[x] I have added or updated my entry in the creators.json file
[x] I have added a changelog entry for my contribution
[ ] I have added/updated documentation for all user-facing changes
[x] I have added/updated test cases
[ ] I have included the rebuilt production build of the client (only if changes were made to the GUI)

Reviewer Checklist:

[ ] /azp run libertem.libertem-data passed
[x] No import of GPL code from MIT code

/azp run libertem.libertem-data

/azp run libertem.libertem-data

Test failure could be related to our quite low cleanup_timeout of 0.5s - I think if enough tasks of FailEventuallyUDF choose to sleep, the timeout could be hit. as we have 32 partitions in the test case, and each task can sleep for max 0.1 seconds, the total run time is bounded by something like 3.2s
Increasing this value should only influence the run time of tests that handle exceptions, or where the workers for some reason take a long time to die on close(). Could you try to maybe put a value of 5s and rerun tests?

Seems to have done the trick, though I guess this is a random failure rather than consistent. Might be worth an issue ? (I don't 100% understand the effect of cleanup_timeout so I'd prefer if you made it!)


NameError: name 'load_lua' is not defined

Thanks for your wonderful work. I ran train.py but I meet an error. NameError: name 'load_lua' is not defined. The version of torch is 1.4.0

Thanks for your attention.
You can download pre-trained vgg16-weight from here: https://drive.google.com/drive/folders/1DvOFGIdXXnNm1iage69HuasUPHZSXYYt.
And you will never face NameError again.

Okay, thank you very much, I understand it.

为什么下载了文件，依然会出现“NameError: name 'load_lua' is not defined”,load_lua在高版本pytorch中有可以替换的函数吗


VM: DateTime handles Daylight Saving Time incorrectly

In DartVM (timezone is in U.S.), the following code
void main() {
  // In the U.S., March 12, 2017, 2:00:00 am clocks were turned forward
  // 1 hour to Sunday, March 12, 2017, 3:00:00 am local daylight time instead.
  var a = new DateTime(2017, 3, 12, 2);
  print(a);
  print(a.millisecondsSinceEpoch);
}

Will output (which is incorrect):
2017-03-12 01:00:00.000
1489309200000

However In Dart2Js, the time is correct:
2017-03-12 03:00:00.000
1489312800000

This is a fairly critical issue for Flutter apps. Our production app got affected due to this today.
@floitschG could you please give us an estimated time to fix?
@sethladd @eseidelGoogle @Hixie FYI

FYI @a-siva

If you also print a.timeZoneOffset, it appears to print the same time zone in both case (-8h for TZ=America/Los_Angeles).
With the script dp.dart:
main(args) {
 for(var arg in args) {
   var d = DateTime.parse(arg);
   print(d);
   print(d.millisecondsSinceEpoch);
   print(d.timeZoneOffset);
   print("--");
 }
}

I get:
$ TZ=America/Los_Angeles dart dp.dart "2017-03-12 01:59:59.999" "2017-03-12 02:00:00.000" "2017-03-12 03:00:00.000"
2017-03-12 01:59:59.999
1489312799999
-8:00:00.000000
--
2017-03-12 01:00:00.000
1489309200000
-8:00:00.000000
--
2017-03-12 03:00:00.000
1489312800000
-7:00:00.000000
--

The first and third entry are one millisecond apart, as expected.
The 2:00:00.000 time does not exist (there was no 2 o'clock that day), so it seems the system is normalizing it in a surprising way, by subtracting one hour instead of adding one.

I started working on this almost immediately, but ran into a limitation of iOS.
https://dart-review.googlesource.com/c/sdk/+/9300
I will try to finish it this week.

Since the mentioned CL is not yet ready to land, I had a look at the current implementation, trying to figure out what went wrong. Initially this was a mystery: the code was implementing the ECMAScript spec (for compatibility) and yet Dart was having different results.
I finally found this line in V8's sourcecode:

Literally following spec here leads to incorrect time computation at the points were we transition to and from DST.

New CL up: https://dart-review.googlesource.com/c/sdk/+/14044
It comes with the same issues as V8: it doesn't work correctly in timezones that don't have a 1 hour transition.

Thanks!

It doesn't work correctly in timezones that don't have a 1 hour transition.

Could you please elaborate with an example? Do you mean it does not work for countries which do not follow DST? or for countries/regions where the transition is not 1 hour (but 1/2 hour or 2 hours)?

It will have difficulties at the DST shift, if the savings is not an hour (30 minutes or 2 hours). Basically, this issue is not fixed for these countries.

Is this problem still not solved?

I tried it with the latest Dart version and it seems to print the correct value
sivalinuxmach[sdk]>out/DebugX64/dart /tmp/time.dart
2017-03-12 03:00:00.000
1489312800000
sivalinuxmach[sdk]>cat /tmp/time.dart
void main() {
  // In the U.S., March 12, 2017, 2:00:00 am clocks were turned forward
  // 1 hour to Sunday, March 12, 2017, 3:00:00 am local daylight time instead.
  var a = new DateTime(2017, 3, 12, 2);
  print(a);
  print(a.millisecondsSinceEpoch);
}

Closing issue.


Implement shutdown sequence

Description
I finally had some time to continue the work on adding the multi server node support on Peer Calls. I noticed there was an issue where the other side did not notice that a SCTP association was closed from the other side.
I tried to follow the steps from the SCTP Association State Diagram and Shutdown of an Association sections of RFC 4960.
I added two new tests and all existing tests passed.
Instead of modifying the existing Close function I added a new Shutdown method to keep the backwards compatibility. I also thought it made sense to allow the users to pick which teardown strategy to use.
Perhaps the Close should be modified to use Abort?
Reference issue
Fixes #152.

Oh wow this is amazing! Nice work @jeremija sorry I got distracted by v3.0.0 :(
Reviewing now @enobufs would love your help (if you can!) you know this way better then me.

My apologies for not being able spare time for this. I will review this from now.  I have just rebased on current master. It appears to be such an excellent work indeed! :D

Thanks for your review. No worries about not being about the time - this is open source after all :) I've lost a little bit of context, but I'll do my best to answer your questions  :slightly_smiling_face:

Thanks for your review @enobufs!

we'd consider renaming Shutdown to Close and the current Close to Abort

Actually I think the current implementation of Close is not implemented as per the specification for Abort:
9.1.  Abort of an Association

   When an endpoint decides to abort an existing association, it MUST
   send an ABORT chunk to its peer endpoint.  The sender MUST fill in
   the peer's Verification Tag in the outbound packet and MUST NOT
   bundle any DATA chunk with the ABORT.  If the association is aborted
   on request of the upper layer, a User-Initiated Abort error cause
   (see Section <IP_ADDRESS>) SHOULD be present in the ABORT chunk.

   An endpoint MUST NOT respond to any received packet that contains an
   ABORT chunk (also see Section 8.4).

   An endpoint receiving an ABORT MUST apply the special Verification
   Tag check rules described in Section 8.5.1.

   After checking the Verification Tag, the receiving endpoint MUST
   remove the association from its record and SHOULD report the
   termination to its upper layer.  If a User-Initiated Abort error
   cause is present in the ABORT chunk, the Upper Layer Abort Reason
   SHOULD be made available to the upper layer.

According to my understanding, we don't send any chunk after Close is called, we just exit the write goroutine. But I might as well be missing something here.


Remove support for loops, if clauses and translation to SSA

The discussion in #4 looked to me like nobody was particularly keen on keeping and fixing the loop support, so this PR removes all references to it. In addition that it also removes the SSA translation which was only introduced as a helper for this.
Obviously, we can discuss this further here if someone disagrees and wants to keep the loop sugar.

Looks great.


chore: update sandbox for ng-schematics

Opening as a separate PR to discuss the refactoring of ng-schmatics sandbox.

I'd prefer if we use a build pattern instead of the one-off functions.


Add num iterations setter

Current coverage is 44.68% (diff: 70.00%)

Merging #20 into master will increase coverage by 0.33%

@@             master        #20   diff @@
==========================================
  Files            27         27
  Lines           496        499     +3
  Methods         486        490     +4
  Messages          0          0
  Branches         10          9     -1
==========================================
+ Hits            220        223     +3
  Misses          276        276
  Partials          0          0

Powered by Codecov. Last update 7c891a0...24ec85a


[PE-D][Tester A] Wrong error message: Edit command

Description
Wrong error message for incorrect prefix
Steps to reproduce
execute edit 1 r/partner pred/2022-12-22
Expected
Error message that is relevant
Actual
Error message of invalid roles despite having the valid roles inserted
Screenshots

Labels: severity.Medium type.FeatureFlaw
original: LynetteLeeSiYing/ped#5

This one should be considered a bug @seah-minlong @zzzlou @voldiemort @Justin-Yeo . Thoughts?

Not a bug, its cus role is case-sensitive (like most of our commands are). Might need to update the UG instead.

Yeah bug


Error adding the D103 G1 device.

I have installed integration version 1.1.0. I am adding a new D103 device. I get the error of adding a device "Unknown error occurred".
home-assistant_smart_maic_2023-11-08T19-39-44.243Z.log

Thanks for the report. Log is really useful in this case. It looks like the component does not receive the data it expects, seems like this is due to the missing MQTT prefix.
This is likely because this feature is not supported on the firmware version you have. Could you please check whether your device has the latest firmware? If there's an update, install it and then re-add the device to HA so it sets proper config again.

Ok, can you send me a screenshot of the MQTT settings screen?

Version 1.2.0-beta-0  works correctly and the device was added without any problems!

Great! Can you confirm all sensors display correctly and dry switch also works? Thanks

Perhaps I will set a shorter update time in the MQTT Server settings.

I'm afraid this might not work, because it seems like device manufacturer enforces the interval at 60 seconds for "standard" devices and 5 seconds for "extended" versions. Anyhow this should be working pretty much the same as you had with manual MQTT sensor configuration.

dry contact works correctly, but a warning message appears.

Thanks for confirming. Could you check whether this message coincides in the log with something like this:
2023-11-09 15:24:56.117 DEBUG (SyncWorker_1) [custom_components.smart_maic.smart_maic] Smart MAIC request: GET http://<IP_ADDRESS>/?page=getdata&devid=xxxxxx&devpass=yyyyyyy&pout=1
2023-11-09 15:24:56.268 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547338859328]
Traceback (most recent call last):
  File "/config/custom_components/smart_maic/smart_maic.py", line 81, in _get_request
    r.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: http://<IP_ADDRESS>/?page=getdata&devid=xxxxxx&devpass=yyyyyyy&pout=1

If that's the case I guess the cause is rate limit enforced by the device (for whatever reason), I currently don't know how to handle this better
Alright, I will close this issue then


Test changes in iMOD Python to iMOD Coupler

Since we are going to make changes to MetaSWAP module in iMOD Python, our changes affect primod and iMOD Coupler.
It would be useful for future developments to have a test suite that could at least be run locally.
The iMOD Coupler test bench can be used for this:, roughly following these steps:

pull imod_coupler repo
pixi install
replace imod-python release with editable install of iMOD Python
Each time you want to tests changes in iMOD Python, run in iMOD Coupler directory: pixi run unittests

I see here that it should be possible to have multiple editable installs via PyPI in pixi: https://prefix.dev/blog/using_python_projects_with_pixi#pypi-source-dependencies
Also this also allows dev installing from git branches.
I've had some bad experiences with a general conda env and editable installations of iMOD Python and xugrid before, let's hope that pixi doesn't suffer from this.
Next steps would be to also get this to work in the CI.

@luitjansl also ran into the issue that 2 editable installs seems very hard to do.
In the end I resorted to installing from a github feature branch of iMOD Python directly in the iMOD Coupler pixi environment, in this feature branch: https://github.com/Deltares/imod_coupler/pull/348
I think that is good enough for now. We can re-open this issue if we want to test how changes in iMOD Python affect things downstream for imod coupler.


Direct resource access: Fix gep zero counting

When nesting one GEP inside another, account for the fact
that the first ("element" or "slide") index will be combined
with the last element of the previous (dominating) GEP.
If we don't do this then the type accounting is wrong and we
generate an invalid GEP.

Fixes an assert failure on the internal shader suite found with the Debug build.
Passes Release and Debug build integrated tests.
Passes in HW on internal test suite.
LGTM


When --serial is passed, configure target for SWV/SWO anyway.

We'll have to modify the probe-rs API to use external pin instead. This will be target specific.
When this is done, we can drop the whole setup module from cortex-m-rtic-trace.

This is not an itm-decode issue.


add test and fix for reverse peer address in openchannel

This test fails due to #38

Thanks, I've added a fix.
Closes #38


Remote storage queue's concurrent sends cause out-of-order samples

The remote storage queue manager fires off concurrent requests to send sample batches to the remote storage: https://github.com/prometheus/prometheus/blob/e980913cd69a85d9644ffd0d0cfeb26633e9f983/storage/remote/queue_manager.go#L183-L204
This causes samples to be sent out-of-order, which the receiving side might not be equipped to handle. Not sure what's going to happen with this interface in general, but if it's generally going to stay, we should consider removing the parallelism (or make it configurable in case people have a backend that doesn't care?).

I think the other end will need to be able to deal with this. I'm expecting parallelism to be required to have the required throughput.

We could have both parallelism and in order delivery.  For instance, we could shard by metric name (or fingerprint...) and then deliver in parallel.

To get to the point where you could consider not having parallelism would require major design first (as in we'd need to completely flesh out this interface), so I think that's very much out of scope for the medium term anyway.


Cannot import / create a new study

2.14.3, desktop version
Ubuntu 20.04

Start the desktop version

./AntaresWebServer -c ./resources/deploy/config.yaml

Open it in the browser
Try to import / create a study
Failure

FileNotFoundError: [Errno 2] Aucun fichier ou dossier de ce type: 'examples/internal_studies/4ba2e498-fd5a-41b5-a0c1-a474ab0688af'
INFO:     <IP_ADDRESS>:57022 - "POST /v1/studies?name=Exemple&version=850 HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "anyio/streams/memory.py", line 98, in receive
  File "anyio/streams/memory.py", line 93, in receive_nowait
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "starlette/middleware/base.py", line 41, in call_next
  File "anyio/streams/memory.py", line 118, in receive
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "uvicorn/protocols/http/httptools_impl.py", line 375, in run_asgi
  File "uvicorn/middleware/proxy_headers.py", line 75, in __call__
  File "fastapi/applications.py", line 212, in __call__
  File "starlette/applications.py", line 112, in __call__
  File "starlette/middleware/errors.py", line 181, in __call__
  File "starlette/middleware/errors.py", line 159, in __call__
  File "ratelimit/core.py", line 82, in __call__
  File "starlette/middleware/cors.py", line 92, in __call__
  File "starlette/middleware/cors.py", line 147, in simple_response
  File "starlette/middleware/base.py", line 63, in __call__
  File "antarest/core/logging/utils.py", line 168, in dispatch
  File "starlette/middleware/base.py", line 44, in call_next
  File "starlette/middleware/base.py", line 34, in coro
  File "starlette/middleware/base.py", line 63, in __call__
  File "antarest/core/utils/fastapi_sqlalchemy/middleware.py", line 56, in dispatch
  File "starlette/middleware/base.py", line 44, in call_next
  File "starlette/middleware/base.py", line 34, in coro
  File "starlette/exceptions.py", line 82, in __call__
  File "starlette/exceptions.py", line 71, in __call__
  File "starlette/routing.py", line 656, in __call__
  File "starlette/routing.py", line 259, in handle
  File "starlette/routing.py", line 61, in app
  File "fastapi/routing.py", line 226, in app
  File "fastapi/routing.py", line 161, in run_endpoint_function
  File "starlette/concurrency.py", line 39, in run_in_threadpool
  File "anyio/to_thread.py", line 33, in run_sync
  File "anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
  File "anyio/_backends/_asyncio.py", line 807, in run
  File "antarest/study/web/studies_blueprint.py", line 248, in create_study
  File "antarest/study/service.py", line 766, in create_study
  File "antarest/study/storage/rawstudy/raw_study_service.py", line 223, in create
  File "pathlib.py", line 1288, in mkdir
FileNotFoundError: [Errno 2] Aucun fichier ou dossier de ce type: 'examples/internal_studies/6780d72f-d136-4be8-8ed9-5ae5f2964dec'

As discussed with @MartinBelthle, it's necessary to start AntaresWebWorker from the parent directory. Then everything works.


Wait for secrets to become managed by K8ssandra controller

What this PR does:
Wait for secrets to become managed by K8ssandra controller
Which issue(s) this PR fixes:
None
Checklist

[ ] Changes manually tested
[ ] Automated Tests added/updated
[ ] Documentation added/updated
[ ] CHANGELOG.md updated (not required for documentation PRs)
[ ] CLA Signed:  DataStax CLA

@adutra what is the status on this?

@jsanda current status is "forgotten".
I will try to rebase and then I will revert the function name change to make @burmanm happy.
Stay tuned!

Status update: this is not relevant anymore. We decided not to check if secrets exist in e2e tests, so all the parts affected by this change were deleted since. I'm closing this.


Make creationDate bot an api

An API for a "creationDate" bot would provide the creation date of an account ID.   It is import because people are farming tokens on ton network, and you can use that to avoid  bots and fake accounts

Or better still open dates.json #11


LuDown CLI - Provide guidance to incomplete parameters

LuDown should guide the user on missing parameters rather than terminate with no feedback
To Reproduce
Steps to reproduce the behavior:

Type LuDown, review commands (parse, refresh, help)
Type LuDown parse file.lu (incorrect!)
No response - tool terminates

Expected behavior
Highlight to the user missing commands (ToLuis or ToQnA) which aren't clear on the first help page leading users into expecting just parse to work.
Screenshots

Fixed in v1.0.26


添加"app_pay"参数唤醒支付宝客户端

Alipay Gloab Wap 已支持 "app_pay" 参数唤醒支付宝客户端

Codecov Report

Merging #11 into master will decrease coverage by 0.05%.
The diff coverage is 60%.

@@             Coverage Diff             @@
##             master     #11      +/-   ##
===========================================
- Coverage     66.55%   66.5%   -0.06%
- Complexity      259     261       +2
===========================================
  Files            12      12
  Lines           598     603       +5
===========================================
+ Hits            398     401       +3
- Misses          200     202       +2

Impacted Files
Coverage Δ
Complexity Δ

src/Message/WapPurchaseRequest.php
72.8% <60%> (-0.59%)
48 <2> (+2)

Continue to review full report at Codecov.

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


Use G59.3 As TLR - tool length reference

Basically add an option to use the G59.3 directly as the TLR - Tool length reference. That way it's persistent between resets, and tools are measured compared to a static machine space point.
I don't know if this is a grblhal core thing or if it could just be set within iosender as T98 or something (since T99 is often used for 3d probe)

It is a core thing, the sender handles all tool change modes (except ATC toolchanges which are 100% transparent to the sender) the same way.
Associating a tool with the probe is new info for me, any links or further information on how this is supposed to work?

Basically, the PrintNC group runs G6T99 in to "pick" the probe, and touch off and set the tool offset reference.  But if a reset occurs, the initial TLO is lost and set to the next tool in the series instead which means G54 Z changes.  So the hope is to have a set TLR that survives a reset.

So the hope is to have a set TLR that survives a reset.

Ok, can you try with moving these lines to down below line 359 (after alarm)?
I am not able to test this myself as I am away.

I'll see if I can get a teensy environment setup for compiling tonight and give it a test.  Thanks.

Would it be possible to set a manual $TLR?
When we could set it at a known location that would basically provide a workaround route for just setting $TLR after homing.
We've tried issuing a $TLR (since the documentation implies this is possible) over the MDI and it responds with OK but doesnt give the tool referenced flag.


Godot crashes when opening a project, can't write caches and confiqs

Godot version:
Godot 3.0.5 64-bit Mono version.
OS/device including version:
Windows 10
Issue description:
When creating and opening a project, Godot crashes instantly after it has loaded the project. It seems that it cant write confiq and cache files:

There isn't even a file called projects in godots appdata folder, so it doesn't even start  writing the fscache.
Also every time when opening the launcher, it says that i dont have any projects and sets the default language, but thats expected since it cant write confiqs.
Also, i dont have an antivirus other than windows defender.
Steps to reproduce:
Opening a project.
Minimal reproduction project:
project.zip (just a basic empty project)

Seems that you had problem with permissions in appdata folder.
Can you reproduce this with the latest version?
I think that reinstalling OS should help fix this issue.

Seems that you had problem with permissions in appdata folder.
Can you reproduce this with the latest version?
I think that reinstalling OS should help fix this issue.

Yeah it was, if I remember correctly it was windows' controlled folder access which prevented it from writing.
Solved it by myself after opening this thread, but then forgot to close this.
My bad, sorry!