ci: fix rustdoc deployment

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
ref https://github.com/actions/deploy-pages/issues/188#issuecomment-1597613954

Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

Documentation

[ ] My PR contains user-facing changes.

Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.

Installation and deployment
Connector (sources & sinks)
SQL commands, functions, and operators
RisingWave cluster configuration changes
Other (please specify in the release note below)

Release note

test here https://github.com/xxchan/risingwave/actions/workflows/doc.yml


Elliptic Curve Cryptography (ECC) new default instead of RSA (issue #48)

This document gives the technical details of our contribution to the issue #48
Summary of issue #48
The purpose of this issue #48 is to change the generation of x509 certificates by changing the default signature algorithm RSA, to ECDSA.
The advantage of this change is that the size of the key used to sign, is much smaller with ECDSA, for the same level of security proposed by RSA. The calculations are performed faster when keys are smaller.
Details
Code
An backward compatibility option was added, in order to let users choose between the new default algorithm (ECDSA) and the old one (RSA). To do this, we have added --rsa option for the following commands:
    dt extension genca
	dt extension gendevcert
	dt extension gencerts
    dt extension build

The options are managed by click_aliases library. You need to simply add these lines for each command and add them to each function, associated with commands, the is_rsa boolean parameter will be true when the user chooses to use the RSA algorithm :
@click.option(
	"--rsa", is_flag=True, help="Use the RSA algorithm to sign instead of the default algorithm (ECDSA)"
)

We have modified the creation of private keys, with a condition in the presence of --rsa option, as follows :
private_key = None
if is_rsa:
	private_key = rsa.generate_private_key(
		public_exponent=65537, key_size=4096
	)
else:
	private_key = ec.generate_private_key(
		ec.SECP256R1()
	)

For build command, we have changed the information of the algorithm used to sign, which will appear when signing.
We have modified the signature of the zipped extension :
signature = None
if is_rsa:
	signature = private_key.sign(
		hasher.finalize(), padding.PKCS1v15(), utils.Prehashed(sha256)
	)
else:
	signature = private_key.sign(
		hasher.finalize(), ec.ECDSA(hashes.SHA256())
	)

Choices made in order to improve the security of the project
Before, a RSA-4096 bits algorithm to sign and SHA-256 for the hash algorithm were used, to assure a security level of 156 bits (if it is factorised with General Number Field Sieve algorithm) by RSA, and a security level of 128 bits (for a collision attack) by SHA-256.
So to satisfy the security level implemented, we have used the curve SECP256R1 of the NIST and SHA-256 for the hash algorithm based on the recommendations of RFC 5480. We hesitated to use
the SECP384R1 curve with SHA-384, to increase the security level, but the backward compatibility is the priority here, which would obviously have been possible, but hash sizes would have been different which is not very practical.
In addition, a security level of 196 bits is associated with a Secret Defense level, which is not the case here.
Contribution by Project Opensource .

@NMV01 thank You for Your contribution!
I'd need to check if/how this affects the rest of the system before we marge this.
In the meantime may I ask you to rebase this PR onto the latest master where I've fixed the CI flow.

@NMV01 thank You for Your contribution!
I'd need to check if/how this affects the rest of the system before we marge this.
In the meantime may I ask you to rebase this PR onto the latest master where I've fixed the CI flow.

Hi,
I just rebase the PR.

@airborn
Hi,
I saw that a check failed. I'm not familiar with this type of test/error. Should I do something, or just wait for a review validation ?
Thanks in advance

Hi @NMV01
Unfortunately, I've identified yet another problem related to workflow. Forked repositories cannot upload interim docker images. I'm already preparing a fix for this: #54 once this is merged I'll ask you to rebase once more and this should be ok.

Hi @airborn ,
We have resolved the problem in tests (test_signing: Type Error). We have added a default value to the backward compatibility parameter. So this error is fixed.
But we have a new issue. It's not possible to use ECDSA with PKCS1, so we have some tests that don't pass correctly.
We checked the test file and we found that many assert (lines : 68-71 / 108-111 / 184-187 in test_signing.py) don't pass correctly with ECDSA :
assert (
  ca_cert.public_key().public_bytes(serialization.Encoding.PEM, serialization.PublicFormat.PKCS1) ==
  ca_private_key.public_key().public_bytes(serialization.Encoding.PEM, serialization.PublicFormat.PKCS1)
)

We need that the test consider the implementation of ECDSA. For example, with this type of assert :
assert (
  dev_cert.public_key().public_bytes(serialization.Encoding.PEM, serialization.PublicFormat.SubjectPublicKeyInfo) ==
  dev_private_key.public_key().public_bytes(serialization.Encoding.PEM, serialization.PublicFormat.SubjectPublicKeyInfo)
)

So our contribution isn't passing the tests (reasons that we mentioned above). How we can do ? Can you add this modification in the workflow ?

Hi @NMV01
I'm not an active maintainer of this repository. Please give me time to dig into this and find a proper solution

Hi @NMV01
Looks like changing the assertions exactly as You proposed would fix the issue. Could you please add another test case for the RSA? I think simply copying test_generate_ca to test_generate_ca_with_rsa would be enough.

We added the test changes, but now, we have a bot which don't pass "duplication" test. We have already reduced the duplication level. Would you like that we add some more optimisation for tests in order to pass duplication test or it's you that need to pass the bot verification?

I don't think it's needed. I've reviewed the tests and in my opinion, further deduplicating would affect readability.
Thank you for Your contribution, sorry that the road was kinda bumpy ;)

This seems to have broken uploads when not setting --rsa
Traceback (most recent call last):
  File "/home/david/projects/python/ext2/test_extension/venv2/bin/dt", line 8, in <module>
    sys.exit(main())
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/dtcli/scripts/dt.py", line 358, in build
    building.build_extension(
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/dtcli/building.py", line 111, in build_extension
    signing.sign_file(
  File "/home/david/projects/python/ext2/test_extension/venv2/lib/python3.9/site-packages/dtcli/signing.py", line 229, in sign_file
    signature = private_key.sign(
TypeError: sign() missing 1 required positional argument: 'algorithm'


[SPARK-47587][SQL] Hive module: Migrate logWarn with variables to structured logging framework

What changes were proposed in this pull request?
The pr aims to migrate logWarning in module Hive with variables to structured logging framework.
Why are the changes needed?
To enhance Apache Spark's logging system by implementing structured logging.
Does this PR introduce any user-facing change?
No.
How was this patch tested?

Pass GA.

Was this patch authored or co-authored using generative AI tooling?
No.

cc @gengliangwang

Thanks, merging to master


Nebula is now in Fedora official repositories

As title :-)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Great work @Fale! I emailed the maintainer of the old nebula package back in 03/21 to get them to retire it in plans to get this Nebula as an official Fedora package. I am glad you beat me to it 😄
If you don't mind, I'd love to be co-maintainer on this package with you. My fas is jdoss.


Some emoji rendered as box with question mark in feed list

Title in article renders them fine.
Using the MacRumors RSS feed
This article in particular https://www.macrumors.com/2019/07/17/adobe-2019-emoji-study/
Version Version 5.0a4 (2237)
macOS: 10.14.6 Beta (18G48f)

Just noticed this this morning on the same article, ha. Illustration:

Appears to be a duplicate of #805


Is it possible to reset u-boot and then continue with uuu.auto script?

I need to reset my device at the beginning of the flash process but each time I reset/reboot, the next command in my uuu.auto script will fail.
What I tired:
Resetting via FastBoot command reboot
FB: reboot
then the next command in the uuu.auto script will fail because obviously there is no such a device anymore
1:521    8/15 [Bulk(R):LIBUSB_ERROR_NO_DEVICE        ] FB: ucmd setenv fastboot_buffer ${loadaddr}
Asyncronously Resetting via U-boot command
FB: acmd reset
then again the next command in the uuu.auto script will fail because obviously there is no such a device anymore
1:521    8/15 [Bulk(R):LIBUSB_ERROR_NO_DEVICE        ] FB: ucmd setenv fastboot_buffer ${loadaddr}
Is it possible somehow to wait for a reconnect of the device?
regards,
Fabian Büttner

ok thanks for the feedback


cmd/compile: slight reorder of conditions in loop results in much slower code

What version of Go are you using (go version)?

$ gotip version
go version devel go1.21-26a90e4e Mon Jun 5 19:18:13 2023 +0000 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/eliben/.cache/go-build"
GOENV="/home/eliben/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/eliben/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/eliben/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1665273903=/tmp/go-build -gno-record-gcc-switches"

What did you do?
These two functions are equivalent:
func countFor1(s string) int {
	result := 0
	for i := 0; i < len(s); {
		if s[i]&1 == 1 {
			result += 1
		}
		i++
	}

	return result
}

func countFor2(s string) int {
	result := 0
	for i := 0; i < len(s); {
		if s[i]&1 == 1 {
			result += 1
			i++
		} else {
			i++
		}
	}

	return result
}

However, the second is ~2x slower on AMD64 (benchmark: https://go.dev/play/p/IlYydhYWUGl)
Looking at the disassembly, it seems like for countFor2   a useless bounds check is generated on the hot loop path - it's missing in the disasm of countFor1.  Moreover, countFor1 generates a conditonal move instruction to update result, while counteFor2 uses another branch.

I just checked this on arm64 and there countFor2 is 3.5x slower than countFor1.

This seems to be a failure in induction variable finding.
Currently, the induction variable is being detected as (ind min next), where next is (Add inc ind). In countFor2, next is another Phi, with two defs Add inc ind) for if-else branches.
I tried a quick hack to detect this case, and the bound check is removed, but countFor2 is still 1.5x slower than countFor1 on amd64.
I haven't had time to dig deeper.
Kindly cc @randall77 , who (IIRC) is the last one touch to findIndVar.

@eliben Where did you come across this example code? I'm wondering how often this occurs in practice. I think we'd want to know how often this happens in real code before we commit to complicating the induction variable pass to handle it.

Came back to this to evaluate, and unfortunately this is another instance of https://github.com/golang/go/issues/27400#issuecomment-1602602927
Having added a sink to both, the results are very different:
goos: linux
goarch: amd64
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
BenchmarkFor1-8   	    2180	    539757 ns/op	1852.69 MB/s
BenchmarkFor2-8   	    2434	    480561 ns/op	2080.90 MB/s

Seems like this issue can be closed


Return submap ids in InsertionResult along with pointers

Returning just submap pointers in InsertionResult is not very useful for libcartographer users. You can't really tell which submap IDs changed when insertion happened. Therefore, have the pose graph return the assigned submap IDs just like it does for the inserted node ID.
Also, move GetSubmapData to the pose graph interface, so the user can query the pose graph just for these submap IDs (instead of having to use GetAllSubmapData).

Ping?

@pifon2a since we're on a roll, if I could choose a PR review to get as a Christmas present :), it would be this one. I have encountered multiple times so far a need to know which submaps exactly changed with a recent insertion, and I think this would be a really useful extension of the API.

@ojura nice try :). PR review is not really a good Christmas present. I hope you get a normal present instead. Merry Christmas!

Damn :) Merry Christmas and happy new year to y'all as well!

@ojura Are you still interested in getting this merged? If so, please let me know and I will review. Also, it seems this PR is doing two completely separate things. Would it be possible to split off the GetSubmapData change to a separate PR? Should be faster to get it merged then. For the other part: can you give some context how it is used, for example the use case you have in mind?

Hi @wohe. One application is vertex coloring of scan matched point clouds according to the inserted submap ID (e.g. of the older one from the insertion pair). If you use that Golden ratio HSV scheme, I think it’s a nice way to provide false coloring for checking the cloud quality.
Sure, I can split the PR.

@wohe here's a picture of coloring submap ID:


Prediction error on MacOS

We (Ben and me) managed to get everything installed on Mac (MacOS Monterey (M1 chip) version 12.3.1 (21E258)), following the installation instructions here.
But when we tried to run the prediction command on the test dataset, we got this error:

Full error traceback (click to expand)
(omniboard_environment) (incasem) genevieb@Admins-MacBook-Pro 03_predict % python predict.py --run_id 1847 --name example_prediction_cell6_ER with config_prediction.yaml 'prediction.data=data_configs/example_cell6.json' 'prediction.checkpoint=../../models/pretrained_checkpoints/model_checkpoint_1847_mito_CF.pt'
INFO:__main__:Attach Mongo observer
INFO:__main__:['predict.py', '-C', 'no', '--name', 'example_prediction_cell6_ER', 'with', 'config_prediction.yaml', 'prediction.data=data_configs/example_cell6.json', 'prediction.checkpoint=../../models/pretrained_checkpoints/model_checkpoint_1847_mito_CF.pt', 'prediction.run_id_training=1847']
INFO:example_prediction_cell6_ER:Running command 'predict'
INFO:example_prediction_cell6_ER:Started run with ID "2"
Added application/json as content-type of artifact /Users/genevieb/Documents/GitHub/incasem/scripts/03_predict/data_configs/example_cell6.json.
INFO:__main__:total_params=5837730
INFO:incasem.pipeline.sources.data_sources_base:Setting up Cell_6_example_roi_nickname
INFO:incasem.pipeline.sources.data_sources_semantic:No mask given, add dummy mask of all 1s.
INFO:incasem.pipeline.sources.data_sources_semantic:No metric mask given, add dummy metric mask of all 1s.
INFO:incasem.pipeline.sources.data_sources_semantic:No labels given, add dummy background labels.
ERROR:gunpowder.build:something went wrong during the setup of the pipeline, calling tear down
Exception ignored in: <function ProducerPool.__del__ at 0x129fac5e0>
Traceback (most recent call last):
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/producer_pool.py", line 33, in __del__
    self.stop()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/producer_pool.py", line 82, in stop
    self.__watch_dog.join()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/process.py", line 146, in join
    self._check_closed()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/process.py", line 100, in _check_closed
    if self._closed:
AttributeError: 'Process' object has no attribute '_closed'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
    self = reduction.pickle.load(from_parent)
AttributeError: 'ProducerPool' object has no attribute '__run_watch_dog'
ERROR:example_prediction_cell6_ER:Failed after 0:00:02!
Traceback (most recent call last):
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 97, in node_setup
    node.output.setup()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/nodes/scan.py", line 60, in setup
    self.workers.start()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/producer_pool.py", line 46, in start
    self.__watch_dog.start()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle 'weakref' object

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/build.py", line 12, in __enter__
    self.pipeline.setup()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 101, in setup
    self.traverse(
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 69, in traverse
    result.append(callback(self))
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 99, in node_setup
    raise PipelineSetupError(node.output) from e
gunpowder.pipeline.PipelineSetupError: Exception in Scan while calling setup()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 118, in node_teardown
    node.output.internal_teardown()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/nodes/batch_filter.py", line 119, in internal_teardown
    self.teardown()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/nodes/scan.py", line 65, in teardown
    self.workers.stop()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/producer_pool.py", line 82, in stop
    self.__watch_dog.join()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/process.py", line 148, in join
    assert self._popen is not None, 'can only join a started process'
AssertionError: can only join a started process

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/experiment.py", line 312, in run_commandline
    return self.run(
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/experiment.py", line 276, in run
    run()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/run.py", line 238, in __call__
    self.result = self.main_function(*args)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/config/captured_function.py", line 42, in captured_function
    result = wrapped(*args, **kwargs)
  File "predict.py", line 327, in predict
    with gp.build(prediction.pipeline) as p:
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/build.py", line 15, in __enter__
    self.pipeline.internal_teardown()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 123, in internal_teardown
    self.traverse(
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 69, in traverse
    result.append(callback(self))
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/pipeline.py", line 120, in node_teardown
    raise PipelineTeardownError(node.output) from e
gunpowder.pipeline.PipelineTeardownError: Exception in Scan while calling teardown()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "predict.py", line 445, in <module>
    ex.run_commandline(argv)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/experiment.py", line 347, in run_commandline
    print_filtered_stacktrace()
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/utils.py", line 494, in print_filtered_stacktrace
    print(format_filtered_stacktrace(filter_traceback), file=sys.stderr)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/utils.py", line 529, in format_filtered_stacktrace
    return "".join(filtered_traceback_format(tb_exception))
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/utils.py", line 560, in filtered_traceback_format
    yield from filtered_traceback_format(tb_exception.__cause__, chain=chain)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/utils.py", line 566, in filtered_traceback_format
    yield from filtered_traceback_format(tb_exception.__context__, chain=chain)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/utils.py", line 560, in filtered_traceback_format
    yield from filtered_traceback_format(tb_exception.__cause__, chain=chain)
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/sacred/utils.py", line 569, in filtered_traceback_format
    current_tb = tb_exception.exc_traceback
AttributeError: 'TracebackException' object has no attribute 'exc_traceback'
Exception ignored in: <function ProducerPool.__del__ at 0x12abad430>
Traceback (most recent call last):
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/producer_pool.py", line 33, in __del__
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/site-packages/gunpowder/producer_pool.py", line 82, in stop
  File "/Users/genevieb/mambaforge/envs/incasem/lib/python3.8/multiprocessing/process.py", line 148, in join
AssertionError: can only join a started process

Thanks for filing, fixed in 0dedc1cbafc84bee17d4cdccd445616054b6529e.


update the slack information

see... https://github.com/containerd/containerd/pull/2754
Signed-off-by: Mike Brown<EMAIL_ADDRESS>

/lgtm

I'm hesitant to recommend the Docker Slack as it's corporate controlled and not neutral, can we just point people to a mailing list or other means for help?

As usual, momentum is a barrier to shifting gears mid-stream--the community has been in a set of channels on the community Slack team for a long time, with 660 people in our main channel at this point. To be clear, dockercommunity.slack.com is a free community Slack team separate from Docker's corporate slack; but yes, is operated/managed by dev rel team at Docker.

To be clear, we could put something else as a place for "help", but usually you want to point people to where discussion is actually happening and that is currently on the existing Slack channels that have been used for a few years now.

I'm hesitant to recommend the Docker Slack as it's corporate controlled and not neutral, can we just point people to a mailing list or other means for help?

the mailing list is included below.. this is where we chat actively about containerd. This replaced the irc channels. There is a related sig-node channel, but really the conversations about containerd happen at the channels listed.


Potential issue with cleanup and Airflow 2.6

Describe the bug
  File "/usr/local/lib/python3.10/site-packages/astro/sql/operators/cleanup.py", line 189, in _get_executor_from_job_id
    from airflow.jobs.base_job import BaseJob
ModuleNotFoundError: No module named 'airflow.jobs.base_job'

Version

Astro Runtime: 8.0

Hi @fritz-astronomer ! Could you confirm the version of the Python SDK you're using?
There were compatibility issues between the SDK 1.5.x with Airflow 2.6 - but this has been addressed on the SDK 1.6 release. I reached out to the Runtime team so we can update this.
In the meantime, can you override the SDK version for the latest stable release (astro-sdk-python==1.6) in your environment and confirm if the cleanup operator works as expected?


typo

there may be just a couple OF technical people who have admin permissions.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 9ed8d3b0-6dba-f001-2a0d-f77ef9460e28
Version Independent ID: 8d1aa49b-5df0-0363-a61b-ebde6aa563e5
Content: Office 365 admin overview
Content Source: Office365-Admin/admin-overview/admin-overview.md
Service: o365-administration
GitHub Login: @dianef77
Microsoft Alias: dianef

@AndreaBarr - This issue can be closed. Thank you.


Enable pgsql modules

The php modules for pgsql are not enabled by default. This pull request allows the use of postgres as a database.
Fixes https://github.com/mplx/docker-pixelfed/issues/1#issuecomment-877954700

@fleadope thank you very much for your merge request. I've moved the php database extension code in bb70e42b2945553840a014106ce9d89699334bc5 to the docker entry point so it's just loaded what is required. Please have a test drive.

Will do!


Dockerfile for build and release

Created a Multi-Stage Dockerfile to build go binary from sources and create a mkcert Docker image

Hey, thanks for the contribution! I think mkcert makes the most sense when running on the developer machine to install the root, so I'd rather not encourage putting it in a container by shipping a Dockerfile. Also, I want the releases to be built with cgo to get cgo support in os/user and crypto/x509.


💡[Feature]: leaf prediction

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
to detect leaf is it poisonous or not
Use Case
herbal advantage
Benefits
No response
Add ScreenShots
No response
Priority
High
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

I didn't receive score?pls help me out
On Mon, Jun 17, 2024, 8:06 PM github-actions[bot] @.***>
wrote:

Hello @sunnyshin8 https://github.com/sunnyshin8! Your issue #334
https://github.com/Recode-Hive/machine-learning-repos/issues/334 has
been closed. Thank you for your contribution!
—
Reply to this email directly, view it on GitHub
https://github.com/Recode-Hive/machine-learning-repos/issues/334#issuecomment-2173593219,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXMRYQI7VZLBP4RWDY5RXYDZH3X6VAVCNFSM6AAAAABJNMKKMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTGU4TGMRRHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

what you mean, i assigned labels, it will take 12 hours leaderoar dto update daily


__autoload deprecated issue

Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in app/code/core/Mage/Core/functions.php on line 60
Deprecated functionality: The each() function is deprecated. This message will be suppressed on further calls  in  lib/Zend/Cache/Backend.php on line 79

on PHP 7.2

@Nuranto
If You need to remove it You can edit it by composer.
Manually add post-install/update-cmd and patch it.
Of course, it has one major issue - on each upgrade Magento You must recreate patch again.

can you please make it more easier to resolve , what the file should i overwrite


Merge back to strands-project

Can we get everything merged back to the released branch this week? Does prism-robots need to be updated too?

maybe we should create an indigo-devel branch to avoid conflicts with AAF deployment, and because hydro-release is completely different from our other branch names?
It does require prism-robots re-release, do you remember where the instructions are to make a .deb file to send Marc?

Agreed on indigo-devel, with this becoming the main released branch post-AAF deployment. I will make my next PR there.

For the deb stuff, no idea, sorry!


Where can I refer to the code for amodal completion and depth verification for custom datasets?

I really enjoyed reading the paper. So, I'm trying to give it a try on custom data, but for amodal completetion, I read a comment saying to use the code in the de-occlusion repo after seeing another issue's post. So, where can I refer to the code for depth verification?
Or is there any code for amodal completion or depth verfication in this repo? If not, did you encounter any difficulties, such as data structure issues, while proceeding with the separate steps?
Thank you for your kind explanation.

Thank you for your interest in our work. You can download the pre-trained depth prediction model from the MiDaS official website and estimate the depth of your custom dataset images. After getting the estimated depth, you could compute the average depth for each instance and then verify their occlusion relations.

There is no data structure issue for me because it is straight forward to get the image depth map prediction and then calculate the average depth for each instance in the image given their masks.

thanks!!


Highlight the importance of job_id parameter in the docs

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/2574
Originally created by @Zele on 2021-02-10 20:47:52

Problem to solve
Documentation mentions the job_id (last chapter in the Getting Started, Storing logs in the Deployment To Production...), but for newcomers it is easy to miss it because it is not stressed enough the importance of the parameter, as it is easy to miss/not understand for new Meltano users.
Target audience
Mostly people who are new or first timers with Meltano
Further details
I have lost a whole day figuring out why the logical replication always does logical_initial on each run, and given that I was a new user to Meltano, I didn't understand the importance of the job_id parameter, as a lot of stuff was new to me, and basically the job_id is the most important feature/parameter as this enables incremental refreshes, which is one of the most important aspects of an ETL process.
Proposal
Describe a bit more in-depth the importance of the job_id parameter, probably make it as a Tip or Note section (different colour maybe), especially in the Getting Started page, so newcomers immediately understand that as the most important part.
What does success look like, and how can we measure that?
Better documentation, simple as that
Regression test
(Ensure the feature doesn't cause any regressions)
Not Applicable
Links / references
Please note that this was taken from GitLab, to be changed accordingly

View 5 previous comments from the original issue on GitLab


The Lambda Architecture

Hi,
I have seen some videos about Delta.
Many of them are talking about the Lambda Architecture (The need of both batch processing and streaming processing of the same data).
After explaining the problems with this architecture, there is a proposal to use only spark streaming, and streaming it to a Delta table.
Why can't I do it without Delta?
I mean that Delta does not solve the problem of loosing data in stream and therefore using batch to fill up missing data.

Answered on the mailing list.


⚠ Bofrost.at has degraded performance

In 8c2ef7b, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1512 ms

Resolved: Bofrost.at performance has improved in 3d7e9d7 after 8 minutes.


PDF: Footer is only shown on first and last page

Steps to reproduce
Tell us about your environment:

Puppeteer version: 1.10.0
Platform / OS version: macOS 10.13.6
URLs (if applicable): https://github.com/kreftk/pptr-footer-bug
Node.js version: v8.12.0

What steps will reproduce the problem?
I created a repo with a minimal reproducible example.

git clone https://github.com/kreftk/pptr-footer-bug.git
npm install
npm run start
Inspect the created test.pdf

Critical code:
    @page {
        size: A4 portrait;
        margin-top: 50px;
        margin-right: 0;
        margin-bottom: 50px;
        margin-left: 0;
        -webkit-print-color-adjust: exact;
    }
    @page:first {
        margin-top: 0;
    }

What is the expected result?
When deactivating the header through css for the first page, the provided footer should be shown on every generated pdf page.
What happens instead?
The footer is only shown on the first and the last generated pdf page.

this is a bug

yes.

sooo what's the status on this? I have the same problem, if I remove @page:first margin-top: 0, the footer content does work on every page

For anyone with a problem with a footer/header on the first page only or any other combo, i've used a pdf merge tool to first generate the frontpage (without watermark) and the rest of the pages with a watermark.
The solution was in using "pageRanges: '1'" and " pageRanges: '2-10' " and 'easy-pdf-merge' to join the pages after generating.  a bit overkill but the only way I could fix this problem.


[FLINK-27250][sql][build] Remove custom surefire config

AFAICT these are just unnecessary, and were likely just copied from elsewhere.

Out of curiosity: How did you test this change? Just running CI with this change and verifying that no error occurs? Or do we have other means to check that everything's working as expected?

Just running CI with this change and verifying that no error occurs?

yes.

There is always a potential for some test to slip through of course (and no real way to guarantee that nothing breaks at some point).


Renamed files, comments to avoid confusion.

Task/Issue URL:
Description
Steps to test this PR
Feature 1

[ ]
[ ]

UI changes

Before
After

!(Upload before screenshot)
(Upload after screenshot)

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

In this stack: 📱 Android: Enhance media capture and upload functionality(?)

develop

#4052

#4060

#4078   👈

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @anikiki and the rest of your teammates on  Graphite


Updating the default SKU to basic for Linux, Node app & changing to use zipdeployment method from core

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:
docker run -it microsoft/azure-cli:latest
export EXT=<NAME>
pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/panchagnula/azure-cli-extensions.git@sisirap-node-linuxUpdates#subdirectory=src/$EXT&egg=$EXT"

@tjprescott / @williexu  i am seeing this error in CI build failure - can one of you help me with this?
FAIL: test_metadata (main.TestIndex)
Traceback (most recent call last):
File "./scripts/ci/test_index.py", line 133, in test_metadata
supported_generators))
AssertionError: None not found in ['bdist_wheel (0.29.0)', 'bdist_wheel (0.30.0)'] : webapp: 'generator' should be one of ['bdist_wheel (0.29.0)', 'bdist_wheel (0.30.0)']. Build the extension with a different version of the 'wheel' package (e.g. pip install wheel==0.30.0). This is due to https://github.com/pypa/wheel/issues/195

@panchagnula can you make sure you have v0.29.0 or v0.30.0 of wheel installed when you generate your .whl file?
Then, upload that new file.


Redirect to https via global flag configuration

Describe the solution you'd like
On nginx with this config we can configure global https redirect enforcement. We need a similar configuration for contour.
once redirect is configured, we can skip http endpoint creation too.
Anything else you would like to add:
We need to validate each IngressRoute as user can configure "spec.routes.permitInsecure" and allow a http connection via contour. We would like to avoid this validation by a global configuration not exposed to users.
Environment:

Contour version: all
Kubernetes version: (use kubectl version): all
Kubernetes installer & version: all
Cloud provider or hardware configuration: all
OS (e.g. from /etc/os-release): all

Hey @sudeeptoroy, IngressRoutes by default will enforce the 301 redirect automatically. There is a scenario where users can allow insecure which is I think what you are getting at.
Closing as dupe of #864

Of course IngressRoute does redirect automatically, I should have made it explicit that the behaviour is observed for "ingress" resource configuration.
#864 does take care of spec.routes.permitInsecure issue with IngressRoute resource
shall I edit this issue or open a new one?


✨  WIP - add support for importing external cluster

*** WORK IN PROGRESS ***
Summary
Adds support for importing (adopting) external cluster as control plane
Related issue(s)
Fixes #163

Yes, WIP. This still needs a doc update. I do not understand how the user passes the kubeconfig of the cluster to be adopted into the adopt subcommand. The adopt subcommand needs to get added into the command tree.

Yes, WIP. This still needs a doc update. I do not understand how the user passes the kubeconfig of the cluster to be adopted into the adopt subcommand. The adopt subcommand needs to get added into the command tree.

@MikeSpreitzer - correct on all points - I started with the easiest updates, now working on the "adopt" subcommand and getting the kubeconfig. The current idea is that the user will supply the name of the context  (and optionally the path of the Kubeconfig) in the Kubeconfig for the cluster to adopt as flags of the adopt command, and the "adopt" subcommand will take care of creating ClusterRoles, ClusterRoleBindings, SA and Token in the adopted cluster so that the Token + cluster endpoint + CA cert can be used to build a new Kubeconfig for the adopted cluster to store in a secret in the namespace associated with the control plane in the hosting cluster.

@pdettori  I think you have some changes in chart/templates/operator.yaml that may be accidental

Since a kubeconfig has a "current context", the natural default for --adopted-context is the current context of the adopted kubeconfig.


JoErNanO: Blacklist themountaintrails.com

JoErNanO requests the blacklist of the website themountaintrails.com. See the Metasmoke search here

!!/aprove


How to get return value using 3rd party login?

I use 3rd Party Login.
The format of the access token issuance request is as follows.
https://nid.naver.com/oauth2.0/token?client_id={client_id}&client_secret={client_secret&grant_type=authorization_code&state={state}&code={code}
If the access token request succeeds, it returns a JSON-formatted value.
It has a different value from AuthConfig provided by angular-oauth2-oidc, so I putted all the required values in loginUrl.

If I logged in, go to the loginurl and the resulting value appeared in browser.
What I want is to get a return value.
What should I do in this case?

You question is a wee bit hard to follow (and a block of formatted code (text) would be nicer than a screenshot), but from what I see I think you might have things backwards a bit.
Two things I notice from your URIs is:

You pass all parameters already in the URI, but the library should be setting them instead (grant type, secrets, etc). If your server supports it, check out the /.well-known/openid-configuration endpoint, and you'll see it lists a token and/or authorize endpoint without any parameters yet. For comparison, check this example, or this one.
You seem to want to use the Authorization Code flow, but see #549 (and #470, #507): this flow is not yet supported as of versions < 8.

So with current versions, you'd have to rewrite your app to rely on Implicit or Password (legacy) flows.

@jeroenheijmans
Thanks in advance for the answers.
I'll give you one more basic question.
What is the function to request a token?
initImplicitFlow() works just like window.open().

That's not really easy to answer, I recommend first reading up about the implicit flow and possibly the password flow, before continuing implementation of oauth2/oidc in your app.

Hoping the questions got sufficiently answered (for as far as we reasonably can on the issues list of this specific library).
Let us know if you have any specific open issues left with this library, either here so we could reopen, or in a fresh issue.


MNT include all packages via find_packages

we somehow forgot to include all packages in packages attribute. This adds them via find_packages.
We still get warnings for tests, but those we can fix later.

This is dirty, but merging to get the release out for 0.7.post1, and then tomorrow we can find a better solution.

Actually, I uploaded a new version with basically this change, we can clean this up before merging.

So I checked a few other packages, and it's normal to list all packages we want to include, so most people use find_packages. I'm not sure why two are missing from that list.
And yes, skops.card was included due to the entry in MANIFEST.in
I'm gonna read a bit more and try to make it cleaner.

I wonder if there are some easy measures we can take to prevent such problems with the release package in the future. I can imagine that if we add new sub-packages, it is easy to forget to add them in setup.py.
One possibility could be for the GH action, after publishing the package, to install it directly from pypi and to run a few tests (from skorch import *?) to ensure everything works. That way, we may catch this type of error when we do the test deploy, but it also seems cumbersome to do this. Any ideas?

One possibility could be for the GH action, after publishing the package, to install it directly from pypi and to run a few tests (from skorch import ...?) to ensure everything works. That way, we may catch this type of error when we do the test deploy, but it also seems cumbersome to do this. Any ideas?

I think that's actually a good idea. Would you mind adding that step? I think now with this change, all tests and even the persistence checks should run.

Ah, nice solution with the wildcard, this should hopefully mean that we can add more sub-packages in the future without having to adjust the installation step.


Inbox always empty

I get my notifications through github per day, but none show up here. My organization has granted access. Please let me know if there is anything else I need to do.
Thanks

Bug Report Dump (Auto-generated)

Version 1.21.0<PHONE_NUMBER>)
Device: iPhone X (iOS 11.4)
TestFlight: false

hey @rnystrom , thanks for following up. here's a screenshot of my notifications on github:

^i'm guessing I need to enable web notifications?
re: GitHawk settings -> review access - the relevant organization has a green check next to it for approval

@BBarone1 sorry I meant your actual notifications list. The little bell in the top right.
Sent with GitHawk

Or github.com/notifications :)
Sent with GitHawk

Ah got it - turns out turning on those checkboxes was the key. Notifictions now pulling through to GitHawk.
Thanks for the help, marking this resolved. Closing
Sent with GitHawk

Yeah makes sense, you'd need web alerts for them to be available via the API. :)


Review/revise external dependencies

Review this list, update and revise.

SQL CE is now a later version.
What's min .NET version?
Remove Visual C++ 2005 Redist (only applies to 1606 and earlier)
Windows Imaging APIs and Microsoft Policy Platform - aren't these now built-in to all supported OS versions?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6058d56b-cad2-e63a-4a23-f9289a83ea39
Version Independent ID: eb53e852-4eed-680e-6746-64029244f70e
Content: Windows client deployment prerequisites - Configuration Manager
Content Source: sccm/core/clients/deploy/prerequisites-for-deploying-clients-to-windows-computers.md
Product: configuration-manager
GitHub Login: @aczechowski
Microsoft Alias: aaroncz

SQL CE will be updated later today via linked private pull request: 4.0 SP1. This change has been since 1610, so all currently supported versions should be using this (thus no need to mention the specific SCCM version).
Other prerequisites still need to be reviewed


Can't access DataTable contents

Hi!
Thanks for making your product - I'm very excited about it. However, I feel dumb - I cannot seem to access the results from a query or stored procedure. When I step through the code, I can see that the table has successfully been populated in the context object - but it won't let me see row data. I can access the data.table.rows.count property - but not data.table.rows[0][0]. Am I missing something? Here's the code I'm using in LinqPad:
void Main()
{
    var myTable = new customTable();
    myTable.table = MyStoredProcedure(3, 1, 11).Tables[0];
    myTable.Dump();

    var scriptObject = new ScriptObject();
    scriptObject["data"] = myTable;
    var context = new TemplateContext();
    context.PushGlobal(scriptObject);

    var EquipmentSizeTemplate = "Name Property: {{ data.name }} Data From Table: {{ data.table.rows[0][0] }}";
    var template = Scriban.Template.Parse(EquipmentSizeTemplate);
    var result = template.Render(context);
    result.Dump();
}

public class customTable
{
    public string name { get; set;}
    public DataTable table { get; set;}

    public customTable()
    {
        this.name = "TestName!";
    }
}

Thanks for any help you can give.

Sean

Scriban supports only IList for indexers but doesn't expose custom indexers. To workaround this, you can wrap the DataTable (e.g add rows to a ScriptArray object for example)


Upgrade Blackfire Agent to v2

Version 1 will stop working in September 2021. For upgrading instructions see https://blackfire.io/docs/up-and-running/agent-upgrade

Works! And rolled out.


[FR] Allow query builder to build without a table

The query builder in 4.2.x has to start by specifying a table. However, queries (MySQL at least) do not need to select from a table.
For example, during a sync process, I needed to know the current clock time of a remote database by selecting NOW(). The following solved that specific case:
$db_time = DB::connection('my_db')->selectOne('SELECT NOW() AS now')->now;

However, as a generic case, that does not allow me to build the query any further, since selectOne returns the results and not a query builder object to extend. Only DB::table('name') or DB::connection('whatever')->table('name') return a query builder object ready to go, and the name is mandatory.
So how about allowing the table name to be left empty/blank/null? Or maybe skip the table method and provide something like DB::builder() to return the builder without a table.
I suspect the SQL builder or grammar processor will need to be changed to account for there not necessarily being a table to select from.
From what I remember, Oracle got around this problem by providing a single-row table called DUAL, and that helped ensure there was always a table available, even when you were not selecting data from a table.

Closing due to no interest.

Now you can actually use DB::query() which will return you an instance of the builder. Just wanted to say that for anyone else that may come here in the future after googling (like me).
Not sure if that was possible back in 2014 where this issue was opened. And yeah, sorry for posting in outdated issue, just thought I may safe someone else's time

Awesome point @andonovn
Whether this was possible or not in 2014, it was certainly never offered as a solution.

In Laravel 8, you can do:
$dbNow = collect(
    DB::select('SELECT NOW() AS _now')
)->first()->_now;

echo $dbNow;

@andonovn , Thanks You saved my time ! We can create our advanced raw sql query and and convert it to a query builder object like this.
$query_advanced_join = ("a.column FROM  ({$this->getSql($query1)}) a JOIN ({$this->getSql($query2)}) b ON a.column = b.column");
//convert my raw query to query builder instance
        $my_builder = DB::query();
        $my_builder->select(DB::raw($query_advanced_join));

Then we can pass this query builder object to any DataTable Library to set pagination ,sorting etc.
////////////////////////////////////////////////////////////////////////////////////
private  function getSql($builder)
{
$sql = $builder->toSql();
    foreach($builder->getBindings() as $binding)
    {
        $value = is_numeric($binding) ? $binding : "'".$binding."'";
        $sql = preg_replace('/\?/', $value, $sql, 1);
    }
    return $sql;
}


[DOCUMENTATION] typo in section <IP_ADDRESS>, second paragraph.

In section <IP_ADDRESS> More on the display stream, second paragraph, is written:
This would reqest a full resolution main stream, [...]
Instead of:
This would request a full resolution main stream, [...]

Hi, thanks for pointing that out. I've fixed the documentation source so that should filter through "in a little while".


Fix: Unbinding application

When unbinding route fails it must keep on and accept the unbinding

Coverage increased (+0.009%) to 92.289% when pulling 3381a12fdfa9ed813bf8497588a77e9f987c1433 on fix/unbinding_app_must_pass_on_route_unbinding_error into d53c9b091f4bf07ed15f908fbc9ff7028749816a on develop.


[Suggestion] Represent Money Differently

This has been discussed on the Discord server a few times. It would be nice to have currency displayed in a less spammy format.
Current display method:
Suggested display method:
Whether this is the default or simple an option you can flip in a config, it would be greatly appreciated!

Note: Pretend Freedom Dollars is NadekoFlowers. :smile:


'AWSHTTPSConnection' object has no attribute 'server_hostname

I am having problems getting the tts-ros1 code to work. I have permissions setup through the aws-cli and can do something like: aws polly synthesize-speech --output-format mp3 --voice-id Ivy --text 'hello, this is a test' test.mp3 which will work. I can also run the demo from the polly docs without any problem.
Running in kinetic, I have made my own config file to have the region as "us-east-1" and have modified the sample launch file to use the new config file.
I then run the launch file and get logging info that the synthesizer is running, polly is running, sound play is running. I send in a command using the voicer.py, I get some info about the text that was received, that it will use Polly, the request. And then the actual request which will be sent to aws:

Node: /polly_node
Time: 12:14:10.334841966 (2019-05-22)
Severity: Info
Published Topics: /rosout
Amazon Polly Request: {'OutputFormat': 'ogg_vorbis', 'SpeechMarkTypes': [], 'VoiceId': 'Joanna', 'Text': 'hello', 'LexiconNames': [], 'SampleRate': '22050', 'TextType': 'text'}
Location:
amazonpolly.py:_synthesize_speech_and_save:295

But then the request fails to return properly and I get this error:

Node: /polly_node
Time: 12:14:10.472778081 (2019-05-22)
Severity: Error
Published Topics: /rosout
{"Audio Type": "ogg", "Audio File": "/opt/ros/kinetic/lib/python2.7/dist-packages/tts/data/error.ogg", "Traceback": "Traceback (most recent call last):\n  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tts/amazonpolly.py", line 352, in _node_request_handler\n    response = self._dispatch(request)\n  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tts/amazonpolly.py", line 339, in _dispatch\n    return actionsrequest.polly_action\n  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tts/amazonpolly.py", line 296, in _synthesize_speech_and_save\n    response = self.polly.synthesize_speech(**kws)\n  File "/usr/lib/python2.7/dist-packages/botocore/client.py", line 251, in _api_call\n    return self._make_api_call(operation_name, kwargs)\n  File "/usr/lib/python2.7/dist-packages/botocore/client.py", line 526, in _make_api_call\n    operation_model, request_dict)\n  File "/usr/lib/python2.7/dist-packages/botocore/endpoint.py", line 141, in make_request\n    return self._send_request(request_dict, operation_model)\n  File "/usr/lib/python2.7/dist-packages/botocore/endpoint.py", line 170, in _send_request\n    success_response, exception):\n  File "/usr/lib/python2.7/dist-packages/botocore/endpoint.py", line 249, in _needs_retry\n    caught_exception=caught_exception, request_dict=request_dict)\n  File "/usr/lib/python2.7/dist-packages/botocore/hooks.py", line 227, in emit\n    return self._emit(event_name, kwargs)\n  File "/usr/lib/python2.7/dist-packages/botocore/hooks.py", line 210, in _emit\n    response = handler(**kwargs)\n  File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 183, in call\n    if self._checker(attempts, response, caught_exception):\n  File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 251, in call\n    caught_exception)\n  File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 269, in _should_retry\n    return self._checker(attempt_number, response, caught_exception)\n  File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 317, in call\n    caught_exception)\n  File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 223, in call\n    attempt_number, caught_exception)\n  File "/usr/lib/python2.7/dist-packages/botocore/retryhandler.py", line 359, in _check_caught_exception\n    raise caught_exception\nAttributeError: 'AWSHTTPSConnection' object has no attribute 'server_hostname'\n", "Exception": {"Value": "'AWSHTTPSConnection' object has no attribute 'server_hostname'", "Type": "<type 'exceptions.AttributeError'>", "Name": "AttributeError", "Module": "exceptions"}}
Location:
amazonpolly.py:_node_request_handler:376

Any thoughts on what I am doing wrong?

It seems like your boto3 package may be out of date. Could you try running pip3 install -U boto3 and see if that resolves the issue.
 I did get a warning when installing that it might cause some problems with breaking compatibility with the aws-cli, but I am not having any problems.
Yes, after escaping the [ and ], the service call now works too.
Thanks for the help


Building a training set of tags for cpp

Hello lovely maintainers :wave:
We've recently added "tags" to student's solutions. These express the constructs, paradigms and techniques that a solution uses. We are going to be using these tags for lots of things including filtering, pointing a student to alternative approaches, and much more.
In order to do this, we've built out a full AST-based tagger in C#, which has allowed us to do things like detect recursion or bit shifting. We've set things up so other tracks can do the same for their languages, but its a lot of work, and we've determined that actually it may be unnecessary. Instead we think that we can use machine learning to achieve tagging with good enough results. We've fine-tuned a model that can determine the correct tags for C# from the examples with a high success rate. It's also doing reasonably well in an untrained state for other languages. We think that with only a few examples per language, we can potentially get some quite good results, and that we can then refine things further as we go.
I released a new video on the Insiders page that talks through this in more detail.
We're going to be adding a fully-fledged UI in the coming weeks that allow maintainers and mentors to tag solutions and create training sets for the neural networks, but to start with, we're hoping you would be willing to manually tag 20 solutions for this track. In this post we'll add 20 comments, each with a student's solution, and the tags our model has generated. Your mission (should you choose to accept it) is to edit the tags on each issue, removing any incorrect ones, and add any that are missing. In order to build one model that performs well across languages, it's best if you stick as closely as possible to the C# tags as you can. Those are listed here. If you want to add extra tags, that's totally fine, but please don't arbitrarily reword existing tags, even if you don't like what Erik's chosen, as it'll just make it less likely that your language gets the correct tags assigned by the neural network.

To summarise - there are two paths forward for this issue:

You're up for helping: Add a comment saying you're up for helping. Update the tags some time in the next few days. Add a comment when you're done. We'll then add them to our training set and move forward.
You not up for helping: No problem! Just please add a comment letting us know :)

If you tell us you're not able/wanting to help or there's no comment added, we'll automatically crowd-source this in a week or so.
Finally, if you have questions or want to discuss things, it would be best done on the forum, so the knowledge can be shared across all maintainers in all tracks.
Thanks for your help! :blue_heart:

Note: Meta discussion on the forum

Exercise: hello-world
Code
#if !defined(HELLO_WORLD_H)
#define HELLO_WORLD_H

#include <string>

namespace hello_world {

std::string hello() {
  return "Hello, World!";
}

}

#endif

Tags:
construct:define
construct:header
construct:if
construct:namespace
construct:return
construct:string
construct:verbatim
construct:visibility-modifiers
paradigm:declarative
paradigm:functional
paradigm:imperative
paradigm:metaprogramming
paradigm:object-oriented

Exercise: word-count
Code
#ifndef __WORD_COUNT_H__
#define __WORD_COUNT_H__

#include <map>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <iostream>

namespace word_count
{
	std::map<std::string, int> words(const std::string &input)
	{
		std::map<std::string, int> result;
		std::string sanitised;

		for(char inputCh : input)
		{
			if (std::isalnum(inputCh) || std::iswspace(inputCh))
			{
				sanitised += tolower(inputCh);
			}
			else if (inputCh == ',')
			{
				sanitised += ' ';
			}
			else if(inputCh == '\'')
			{
				sanitised += '\'';
			}
		}

		std::istringstream iss(sanitised);
		std::vector<std::string> tokens;
    	copy(std::istream_iterator<std::string>(iss), std::istream_iterator<std::string>(), back_inserter(tokens));
    	for (std::string token : tokens)
    	{
    		if (std::find_if_not(token.begin(), token.end(), std::not1(std::ptr_fun<int, int>(std::isalnum))) == token.end())
    		{
    			continue;
    		}

    		if (token[0] == '\'')
    		{
    			token.erase(token.begin(), token.begin()+1);
    		}

			if (token[token.length()-1] == '\'')
    		{
    			token.erase(token.end()-1, token.end());
			}

    		auto search = result.find(token);

    		if (search == result.end())
    		{
    			result[token] = 1;
    		}
    		else
    		{
    			result[token] = result[token] + 1;
    		}
    	}
		return result;
	}
}

#endif

Tags:
construct:add
construct:assignment
construct:back_inserter
construct:char
construct:class
construct:comment
construct:constructor
construct:continue
construct:define
construct:for-loop
construct:if
construct:implicit-conversion
construct:index-operator
construct:int
construct:integral-number
construct:invocation
construct:iterator
construct:lambda
construct:map
construct:method
construct:namespace
construct:number
construct:optional-parameter
construct:parameter
construct:return
construct:string
construct:subtract
construct:throw
construct:typedef
construct:variable
construct:vector
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:exceptions
technique:higher-order-functions
technique:looping
uses:map
uses:vector

Exercise: food-chain
Code
#include "food_chain.h"

#ifndef __FOOD_CHAIN_H__
#define __FOOD_CHAIN_H__

#include <string>
using namespace std;

namespace food_chain {
	string verse(int num);
	string verses(int start, int end);
	string sing();
}

#endif

#include <sstream>

const string spider_special(" that wriggled and jiggled and tickled inside her");
const string animals[] = { "fly", "spider", "bird", "cat", "dog", "goat", "cow", "horse"  };
const string sentence2[] = {
	"It wriggled and jiggled and tickled inside her.\n",
	"How absurd to swallow a bird!\n",
	"Imagine that, to swallow a cat!\n",
	"What a hog, to swallow a dog!\n",
	"Just opened her throat and swallowed a goat!\n",
	"I don't know how she swallowed a cow!\n"
};

string food_chain::verse(int num) {
	stringstream out;
	out << "I know an old lady who swallowed a " << animals[num - 1] << ".\n";
	if (num >= 8) {
		out << "She's dead, of course!\n";
		return out.str();
	}
	if (num > 1)
		out << sentence2[num - 2];
	for (int ix = num; ix > 1; ix--) {
		out << "She swallowed the "
			<< animals[ix - 1]
			<< " to catch the "
			<< animals[ix - 2]
			<< (ix == 3 ? spider_special : "")
			<< ".\n";
	}
	out << "I don't know why she swallowed the fly. Perhaps she'll die.\n";

	return out.str();
}

string food_chain::verses(int start, int end) {
	stringstream out;
	for (int ix = start; ix <= end; ix++) {
		out << verse(ix) << "\n";
	}
	return out.str();
}

string food_chain::sing() {
	return verses(1, 8);
}

Tags:
construct:class
construct:constructor
construct:for-loop
construct:if
construct:index
construct:int
construct:integral-number
construct:invocation
construct:method
construct:namespace
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:ternary
construct:using-directive
construct:variable
construct:visibility-modifiers
paradigm:object-oriented
technique:looping

Exercise: grade-school
Code
using namespace std;
#include <string>
#include <map>
#include <vector>
#include <set>
#include <iostream>

// I'm not very familiar with TDD, so this may be a naive comment.
// The tests expect a vector back from all the calls that return something.
// But they also expect them to be sorted.
// Why, then, don't they expect a set?  It seems like that would be a reasonable
// negotiation when the API was created in the first place (in the hypothetical company
// where this software is being built)
//
// Of course, this is only an exercise, so expecting a sorted vector might just be part of the fun.
//
namespace grade_school
{

    typedef map<int, vector<string>> rosterMap;

    class school
    {
    public:
        school()
        {
            theRoster = {};
        }

        void add(string pupil, int grade)
        {
            auto &pupilList = theRoster[grade];

            // The pupil list has to be kept sorted.
            // It'd be nice to use a set, but the tests want a vector
            // So we build a vector and keep it sorted
            if (pupilList.empty())  // Empty list, doesn't matter
            {
                pupilList.push_back(pupil);
                return;
            }

            // Does it need to go at the beginning or end?
            if (pupil < pupilList.front())
            {
                pupilList.insert(pupilList.begin(), pupil);
            }
            else if (pupil > pupilList.back())
            {
                pupilList.push_back(pupil);
            }
            else
            {
                // Goes somewhere in the middle
                // Find where to add the name
                for (auto entry = pupilList.begin() + 1 ; entry != pupilList.end() ; entry++)
                {
                    if (pupil > *(entry - 1) && pupil < *entry)
                    {
                        pupilList.insert(entry, pupil);
                        break;
                    }
                }
            }
        }

        const vector<string> grade(int whatGrade)
        {
            vector<string> theList(theRoster[whatGrade]);

            sort(theList.begin(), theList.end());
            return theList;
        }

        rosterMap roster()
        {
            return theRoster;
        };

#ifdef DEBUG
        // For debugging
        void dumpRoster()
        {
            for (auto gradeRoster : theRoster)
            {
                cout << "Grade: " << gradeRoster.first << endl;
                for (auto pupil : gradeRoster.second)
                    cout << "\t" << pupil << endl;
            }
            cout << "---------------" << endl;
        }
#endif
    private:
        rosterMap theRoster;
    };
};

Tags:
construct:add
construct:assignment
construct:boolean
construct:break
construct:class
construct:comment
construct:constructor
construct:for-loop
construct:if
construct:include
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:logical-and
construct:map
construct:method
construct:namespace
construct:number
construct:parameter
construct:return
construct:set
construct:string
construct:subtract
construct:typedef
construct:using-directive
construct:variable
construct:vector
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:boolean-logic
technique:higher-order-functions
technique:looping
uses:map
uses:set
uses:vector

Exercise: robot-name
Code
#pragma once

#include <iomanip>
#include <sstream>
#include <string>

namespace robot_name {
    class name {
        public:
            name(const std::string& model, const int number) : model(model), number(number) {}

            // returns old name while incrementing to the new name
            // Similar to how `return x++` returns the old value of `x` while incrementing `x`
            robot_name::name increment() {
                robot_name::name previous = *this;

                if (number == 999) {
                    number = 0;

                    if (model[1] == 'Z') {
                        model[1] = 'A';

                        if (model[0] == 'Z') {
                            model[0] = 'A';
                        } else {
                            model[0]++;
                        }
                    } else {
                        model[1]++;
                    }
                } else {
                    number ++;
                }

                return previous;
            }

            operator std::string() const {
                std::ostringstream stream;
                stream << this->model << std::setw(3) << std::setfill('0') << this->number;
                return stream.str();
            }

        private:
            std::string model;
            int number;
    };

    class robot {
        public:
            robot() {
                this->reset();
            }

            std::string name() const {
                return this->label;
            }

            void reset() {
                label = std::string(robot::next_name.increment());
            }

        private:
            static robot_name::name next_name;
            std::string label;
    };

    robot_name::name robot::next_name("AA", 0);
};

Tags:
construct:assignment
construct:char
construct:class
construct:comment
construct:constructor
construct:field
construct:if
construct:implicit-conversion
construct:index-operator
construct:int
construct:integral-number
construct:invocation
construct:method
construct:namespace
construct:number
construct:parameter
construct:pragma
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:object-oriented

Exercise: scrabble-score
Code
#pragma once

#include <cctype>
#include <string>

using std::string;

class scrabble_score {
  public:
    static int score(const string &str) {
        static constexpr int scores[] = { 1, 3, 3, 2, 1, 4, 2, 4, 1, 8,
                                          5, 1, 3, 1, 1, 3, 10, 1, 1, 1,
                                          1, 4, 4, 8, 4, 10 };
        int sum = 0;
        for (char ch : str) {
            sum += scores[tolower(ch) - 'a'];
        }
        return sum;
    }
};

Tags:
construct:class
construct:constructor
construct:method
construct:parameter
construct:throw
construct:using-directive
construct:visibility-modifiers
paradigm:object-oriented
technique:exceptions

Exercise: grains
Code
/*
  exercism.io C++ track: grains
  Robert Wheeler
*/

#ifndef GRAINS_H
#define GRAINS_H

#include <unordered_map>

namespace grains
{

  const std::unordered_map< int, unsigned long long > powersOfTwo {
                                        {0,                        1 },
                                        {1,                        2 },
                                        {2,                        4 },
                                        {3,                        8 },
                                        {4,                       16 },
                                        {5,                       32 },
                                        {6,                       64 },
                                        {7,                      128 },
                                        {8,                      256 },
                                        {9,                      512 },
                                        {10,                    1024 },
                                        {11,                    2048 },
                                        {12,                    4096 },
                                        {13,                    8192 },
                                        {14,                   16384 },
                                        {15,                   32768 },
                                        {16,                   65536 },
                                        {17,                  131072 },
                                        {18,                  262144 },
                                        {19,                  524288 },
                                        {20,                 1048576 },
                                        {21,                 2097152 },
                                        {22,                 4194304 },
                                        {23,                 8388608 },
                                        {24,                16777216 },
                                        {25,                33554432 },
                                        {26,                67108864 },
                                        {27,               134217728 },
                                        {28,               268435456 },
                                        {29,               536870912 },
                                        {30,<PHONE_NUMBER> },
                                        {31,<PHONE_NUMBER> },
                                        {32,<PHONE_NUMBER> },
                                        {33,<PHONE_NUMBER> },
                                        {34,<PHONE_NUMBER>4 },
                                        {35,<PHONE_NUMBER>8 },
                                        {36,<PHONE_NUMBER>6 },
                                        {37,<PHONE_NUMBER>72 },
                                        {38,<PHONE_NUMBER>44 },
                                        {39,<PHONE_NUMBER>88 },
                                        {40,<PHONE_NUMBER>776 },
                                        {41,<PHONE_NUMBER>552 },
                                        {42,<PHONE_NUMBER>104 },
                                        {43,<PHONE_NUMBER>208 },
                                        {44,<PHONE_NUMBER>4416 },
                                        {45,<PHONE_NUMBER>8832 },
                                        {46,<PHONE_NUMBER>7664 },
                                        {47,<PHONE_NUMBER>55328 },
                                        {48,<PHONE_NUMBER>10656 },
                                        {49,<PHONE_NUMBER>21312 },
                                        {50,<PHONE_NUMBER>842624 },
                                        {51,<PHONE_NUMBER>685248 },
                                        {52,<PHONE_NUMBER>370496 },
                                        {53,<PHONE_NUMBER>740992 },
                                        {54,<PHONE_NUMBER>9481984 },
                                        {55,<PHONE_NUMBER>8963968 },
                                        {56,<PHONE_NUMBER>7927936 },
                                        {57,<PHONE_NUMBER>75855872 },
                                        {58,<PHONE_NUMBER>51711744 },
                                        {59,<PHONE_NUMBER>03423488 },
                                        {60,<PHONE_NUMBER>606846976 },
                                        {61,<PHONE_NUMBER>213693952 },
                                        {62,<PHONE_NUMBER>427387904 },
                                        {63,<PHONE_NUMBER>854775808ULL },
                                      };

  const unsigned long long grainTotal =<PHONE_NUMBER>3709551615ULL;

  unsigned long long square( int sq ) {
    return grains::powersOfTwo.at( sq-1 ); };

  unsigned long long total() {
    return grains::grainTotal; };

}

#endif //GRAINS_H

Tags:
construct:comment
construct:const
construct:constructor
construct:initializer-list
construct:int
construct:integral-number
construct:invocation
construct:long-long
construct:map
construct:method
construct:namespace
construct:number
construct:parameter
construct:return
construct:std::map
construct:subtract
construct:typedef
construct:unordered-map
construct:using-directive
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:object-oriented
uses:std.map
uses:std.unordered_map

Exercise: raindrops
Code
#include <string>

namespace raindrops {
  std::string convert(unsigned n);
}

// Implementation

#include <map>
#include <sstream>
#include <vector>

using namespace std;

string raindrops::convert(unsigned drops) {
  stringstream stream;

  for (auto &&e: map<unsigned, string> {
                   { 3, "Pling" }, { 5, "Plang" }, { 7, "Plong" }
                 }) if (not (drops % e.first)) stream << e.second;

  if (not stream.tellp()) stream << drops;

  return stream.str();
}

Tags:
construct:assignment
construct:auto
construct:comment
construct:constructor
construct:for-loop
construct:if
construct:initializer-list
construct:integral-number
construct:invocation
construct:lambda
construct:logical-not
construct:map
construct:method
construct:namespace
construct:number
construct:parameter
construct:return
construct:string
construct:template
construct:tuple
construct:unsigned-integral
construct:using-directive
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:boolean-logic
technique:higher-order-functions
uses:map
uses:string
uses:tuple

Exercise: sieve
Code
#include <vector>

namespace sieve { std::vector<int> primes(unsigned); }

// Implementation

#include <algorithm>

using namespace std;

vector<int> sieve::primes(unsigned max) {
  vector<int> sieve;
  sieve.reserve(max/2);
  if (max >= 2) {
    sieve.push_back(2);
    for (unsigned i = 3; i <= max; i += 2) sieve.push_back(i);
  }

  auto prime = sieve.empty()? begin(sieve): next(begin(sieve));
  auto eod = end(sieve);
  while (prime != eod and *prime * *prime < max) {
    eod = remove_if(prime + 1, eod,
                    [&prime](int n) { return not (n % *prime); });
    ++prime;
  }
  sieve.erase(eod, end(sieve));

  return sieve;
}

Tags:
construct:add
construct:algorithm
construct:assignment
construct:auto
construct:boolean
construct:comment
construct:constructor
construct:divide
construct:for-loop
construct:function
construct:if
construct:implicit-conversion
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:logical-and
construct:method
construct:multiply
construct:namespace
construct:number
construct:parameter
construct:return
construct:subtract
construct:ternary
construct:typedef
construct:using-directive
construct:variable
construct:vector
construct:visibility-modifiers
construct:while-loop
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:boolean-logic
technique:higher-order-functions
technique:looping
uses:vector

Exercise: queen-attack
Code
#ifndef _QUEEN_ATTACK_H
#define _QUEEN_ATTACK_H

#include <sstream>
#include <stdexcept>
#include <string>
#include <utility>

namespace queen_attack {

typedef std::pair<int, int> position;

class chess_board {
public:
	chess_board();
	chess_board(position white, position black);
	position white() const;
	position black() const;
	bool can_attack() const;
	explicit operator std::string() const;

private:
	int _board[8][8];
	position _white;
	position _black;
};

chess_board::chess_board() {
	_white = {0, 3};
	_black = {7, 3};
}

chess_board::chess_board(position white, position black) {
	if(white == black){
		throw std::domain_error("Invalid positions");
	}
	_white = white;
	_black = black;
}

bool chess_board::can_attack() const {
	/* row or column attack */
	if(_white.first == _black.first || _white.second == _black.second)
		return true;

	/* diagonal attack */
	if(std::abs(_white.first - _black.first) == std::abs(_white.second - _black.second))
		return true;

	return false;
}

position chess_board::black() const {
	return _black;
}

position chess_board::white() const {
	return _white;
}

chess_board::operator std::string() const {
	std::ostringstream o;
	for(int i = 0; i < 8; i++) {
		for(int j = 0; j < 8; j++) {
			if(_white.first == i && _white.second == j)
				o << 'W';
			else if(_black.first == i && _black.second == j)
				o << 'B';
			else
				o << '_';

			if(j != 7)
				o << ' ';
		}
		o << std::endl;
	}
	return o.str();
}

}

#endif

Tags:
construct:assignment
construct:bitwise-and
construct:boolean
construct:char
construct:class
construct:comment
construct:constructor
construct:define
construct:explicit-conversion
construct:field
construct:for-loop
construct:if
construct:initializer-list
construct:int
construct:integral-number
construct:logical-and
construct:logical-or
construct:method
construct:namespace
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:typedef
construct:throw
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:object-oriented
technique:bit-manipulation
technique:boolean-logic
technique:exceptions
technique:looping
technique:type-conversion

Exercise: atbash-cipher
Code
#include <algorithm>
#include <string>

namespace atbash {
  using namespace std;

  char enc (char c) {
    c = tolower(c);
    if (c >= 'a' && c <= 'z') {
      return 'z' - (c - 'a');
    }
    return c;
  }

  char dec (char c) {
    if (c >= 'a' && c <= 'z') {
      return 'a' + ('z' - c);
    }
    return c;
  }

  string encode (string plain) {
    plain.erase(remove_if(plain.begin(), plain.end(), [](char c) {
          return c == ' ' || c == ',' || c == '.'; }), plain.end());
    string encoded;
    transform(plain.begin(), plain.end(), back_inserter(encoded), enc);
    string spaced;
    for (int i = 0; i < encoded.size(); ++i) {
      spaced += encoded[i];
      if (i > 0 && i != encoded.size()-1 && (i+1) % 5 == 0) {
        spaced += ' ';
      }
    }

    return spaced;
  }

  string decode (string encoded) {
    encoded.erase(remove_if(encoded.begin(), encoded.end(), [](char c) {
          return c == ' '; }), encoded.end());
    string decoded;
    transform(encoded.begin(), encoded.end(), back_inserter(decoded), dec);
    return decoded;
  }
}

#define EXERCISM_RUN_ALL_TESTS

Tags:
construct:add
construct:assignment
construct:boolean
construct:char
construct:class
construct:define
construct:for-loop
construct:function
construct:if
construct:implicit-conversion
construct:index
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:logical-and
construct:logical-or
construct:method
construct:namespace
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:template
construct:transform
construct:using-directive
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:boolean-logic
technique:higher-order-functions
technique:looping

Exercise: all-your-base
Code
#if !defined(ALL_YOUR_BASE_H)
#define ALL_YOUR_BASE_H

#include <vector>

namespace all_your_base {
	std::vector<unsigned int> convert(unsigned int from, std::vector<unsigned int> digits, unsigned int to) {
		if (from <= 1 || to <= 1)
			return {};

		if (digits.size() > 1 && digits[0] == 0)
			return {};

		unsigned int num = 0;
		for (unsigned int i : digits) {
			if (i >= from)
				return {};
			num = num * from + i;
		}

		std::vector<unsigned int> ans;
		while (num) {
			unsigned d = num % to;
			ans.push_back( d );
			num /= to;
		}

		std::reverse(ans.begin(), ans.end());

		return ans;
	}
};

#endif

Tags:
construct:add
construct:assignment
construct:boolean
construct:define
construct:for-loop
construct:if
construct:implicit-conversion
construct:index
construct:initializer-list
construct:integral-number
construct:integral-type
construct:logical-and
construct:logical-or
construct:method
construct:multiply
construct:namespace
construct:number
construct:parameter
construct:return
construct:template
construct:typedef
construct:unsigned-int
construct:variable
construct:vector
construct:visibility-modifiers
construct:while-loop
paradigm:imperative
paradigm:metaprogramming
paradigm:object-oriented
technique:boolean-logic
technique:looping
uses:std::vector

Exercise: robot-simulator
Code
#ifndef ROBOT_SIMULATOR_H_
#define ROBOT_SIMULATOR_H_

#include <utility>
#include <string>

namespace robot_simulator {

enum class Bearing { NORTH, EAST, SOUTH, WEST };

Bearing& operator++(Bearing& bearing) {
    return bearing = static_cast<Bearing>(
        (static_cast<std::uint8_t>(bearing) + 1) % sizeof(Bearing));
}

Bearing& operator--(Bearing& bearing) {
    return bearing = static_cast<Bearing>(
        (static_cast<std::uint8_t>(bearing) - 1) % sizeof(Bearing));
}

class Robot {
    using position_type = std::pair<int, int>;
    using bearing_type = robot_simulator::Bearing;
public:
    Robot() : position_({0, 0}), bearing_(bearing_type::NORTH) {}

    explicit Robot(position_type position, bearing_type bearing)
        : position_(position), bearing_(bearing) {}

    const position_type& get_position() const { return position_; }
    const bearing_type& get_bearing() const { return bearing_; }
    void turn_left() { --bearing_; }
    void turn_right() { ++bearing_; }
    void advance() {
        switch (bearing_) {
            case bearing_type::NORTH: ++position_.second; break;
            case bearing_type::EAST:  ++position_.first; break;
            case bearing_type::SOUTH: --position_.second; break;
            case bearing_type::WEST:  --position_.first; break;
        }
    }
    void execute_sequence(const std::string& sequence) {
        for (const unsigned char c : sequence) {
            switch (c) {
                case 'L': turn_left(); break;
                case 'R': turn_right(); break;
                case 'A': advance(); break;
            }
        }
    }
private:
    position_type position_;
    bearing_type bearing_;
};

} // namespace robot_simulator

#endif // !ROBOT_SIMULATOR_H_

Tags:
construct:assignment
construct:break
construct:char
construct:class
construct:constructor
construct:enum
construct:explicit-conversion
construct:for-loop
construct:initializer-list
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:method
construct:namespace
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:switch
construct:typedef
construct:using-declaration
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:higher-order-functions
technique:looping
technique:type-conversion

Exercise: binary-search-tree
Code
#ifndef BINARY_SEARCH_TREE_H
#define BINARY_SEARCH_TREE_H

#include <memory>

namespace binary_tree {
  template <class T> class binary_tree;

  template <class T> using tree_ptr = std::unique_ptr<binary_tree<T>>;

  template <class T>
  class binary_tree {
  public:
    class inorder_iterator;

    explicit binary_tree(const T&);

    const T& data() const;
    const tree_ptr<T>& left() const;
    const tree_ptr<T>& right() const;
    inorder_iterator begin() const;
    inorder_iterator end() const;

    void insert(const T&);

  private:
    const T m_data;
    tree_ptr<T> m_left;
    tree_ptr<T> m_right;
    binary_tree* m_parent{nullptr};

    binary_tree(const T&, binary_tree*);
  };

  template <class T>
  binary_tree<T>::binary_tree(const T& data)
  : m_data{data} {}

  template <class T>
  const T& binary_tree<T>::data() const {
    return m_data;
  }

  template <class T>
  const tree_ptr<T>& binary_tree<T>::left() const {
    return m_left;
  }

  template <class T>
  const tree_ptr<T>& binary_tree<T>::right() const {
    return m_right;
  }

  template <class T>
  typename binary_tree<T>::inorder_iterator
  binary_tree<T>::begin() const {
    return inorder_iterator{this};
  }

  template <class T>
  typename binary_tree<T>::inorder_iterator
  binary_tree<T>::end() const {
    return inorder_iterator{};
  }

  template <class T>
  void binary_tree<T>::insert(const T& data) {
    auto* parent = this;
    auto* current = data <= m_data ? &m_left : &m_right;

    while (*current != nullptr) {
      parent =(*current).get();

      if (data <= (*current)->m_data)
        current = &(*current)->m_left;
      else
        current = &(*current)->m_right;
    }

    *current = std::unique_ptr<binary_tree<T>>{new binary_tree{data, parent}};
  }

  template <class T>
  binary_tree<T>::binary_tree(const T& data, binary_tree* parent)
  : m_data{data}, m_parent{parent} {}

  template <class T>
  class binary_tree<T>::inorder_iterator
  : public std::iterator<std::forward_iterator_tag, T, std::size_t, const T*, const T&> {
  public:
    explicit inorder_iterator(const binary_tree* = nullptr);

    inorder_iterator& operator++();
    const inorder_iterator operator++(int);
    bool operator==(const inorder_iterator&) const;
    bool operator!=(const inorder_iterator&) const;
    const T& operator*() const;

  private:
    const binary_tree<T>* m_current;

    const binary_tree* leftmost_child(const binary_tree*);
  };

  template <class T>
  binary_tree<T>::inorder_iterator::inorder_iterator(const binary_tree* root)
  : m_current{leftmost_child(root)} {}

  template <class T>
  typename binary_tree<T>::inorder_iterator&
  binary_tree<T>::inorder_iterator::operator++() {
    if (m_current->m_right != nullptr) {
      m_current = leftmost_child(m_current->m_right.get());
      return *this;
    }

    while (m_current != nullptr) {
      if (m_current->m_parent != nullptr && m_current->m_parent->m_left.get() == m_current) {
        m_current = m_current->m_parent;
        return *this;
      }

      m_current = m_current->m_parent;
    }

    return *this;
  }

  template <class T>
  const typename binary_tree<T>::inorder_iterator
  binary_tree<T>::inorder_iterator::operator++(int) {
    auto previous = *this;
    ++(*this);

    return previous;
  }

  template <class T>
  bool binary_tree<T>::inorder_iterator::operator==(const inorder_iterator& rhs) const {
    return m_current == rhs.m_current;
  }

  template <class T>
  bool binary_tree<T>::inorder_iterator::operator!=(const inorder_iterator& rhs) const {
    return !(*this == rhs);
  }

  template <class T>
  const T& binary_tree<T>::inorder_iterator::operator*() const {
    return m_current->m_data;
  }

  template <class T>
  const binary_tree<T>* binary_tree<T>::inorder_iterator::leftmost_child(const binary_tree* from) {
    if (from == nullptr)
      return from;

    while (from->m_left != nullptr)
      from = from->m_left.get();

    return from;
  }
}

#endif // BINARY_SEARCH_TREE_H

Tags:
construct:assignment
construct:auto
construct:boolean
construct:class
construct:comment
construct:constructor
construct:const
construct:const-cast
construct:constructor-initializer
construct:field
construct:if
construct:implicit-conversion
construct:initializer
construct:integral-number
construct:invocation
construct:method
construct:namespace
construct:null
construct:nullptr
construct:parameter
construct:ternary
construct:template
construct:template-alias
construct:template-template-parameter
construct:throw
construct:throw-expression
construct:typedef
construct:using-declaration
construct:variable
construct:visibility-modifiers
construct:while-loop
paradigm:imperative
paradigm:object-oriented
paradigm:template-metaprogramming
technique:exceptions
technique:inheritance
technique:looping
technique:recursion
uses:std::unique-ptr

Exercise: circular-buffer
Code
#ifndef CIRCULAR_BUFFER_H
#define CIRCULAR_BUFFER_H

#include <vector>

namespace circular_buffer {
template <class T>
class circular_buffer {
public:
  using size_type = typename std::vector<T>::size_type;
  using value_type = T;

  explicit circular_buffer(size_type size);
  value_type read();
  void write(const value_type& val);
  void overwrite(const value_type& val);
  void clear();

private:
  std::vector<T> m_data;
  size_type m_size {0};
  size_type m_read_pos {0};
  size_type m_write_pos {0};

  size_type next(size_type x) const;
};

template <class T>
circular_buffer<T>::circular_buffer(size_type size)
: m_data(size) {}

template <class T>
typename circular_buffer<T>::value_type
circular_buffer<T>::read() {
  if (m_size == 0)
    throw std::domain_error{"The buffer is empty."};

  const auto value = m_data[m_read_pos];
  m_read_pos = next(m_read_pos);
  --m_size;

  return value;
}

template <class T>
void
circular_buffer<T>::write(const value_type& val) {
  if (m_size == m_data.size())
    throw std::domain_error{"The buffer is full."};

  m_data[m_write_pos] = val;
  m_write_pos = next(m_write_pos);
  ++m_size;
}

template <class T>
void
circular_buffer<T>::overwrite(const value_type& val) {
  if (m_size != m_data.size()) {
    write(val);
    return;
  }

  m_data[m_write_pos] = val;
  m_read_pos = next(m_read_pos);
}

template <class T>
void
circular_buffer<T>::clear() {
  m_size = m_write_pos = m_read_pos = 0;
}

template <class T>
typename circular_buffer<T>::size_type
circular_buffer<T>::next(size_type x) const {
  return (x + 1) % m_data.size();
}
}

#endif // CIRCULAR_BUFFER_H

Tags:
construct:add
construct:assignment
construct:char
construct:class
construct:comment
construct:constructor
construct:const
construct:field
construct:if
construct:index-operator
construct:initializer-list
construct:int
construct:integral-number
construct:invocation
construct:lambda
construct:method
construct:method-overloading
construct:namespace
construct:number
construct:parameter
construct:return
construct:size_t
construct:template
construct:throw
construct:using-declaration
construct:variable
construct:vector
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:exceptions
technique:higher-order-functions

Exercise: collatz-conjecture
Code
#pragma once
#include <cstdint>
#include <stdexcept>

namespace collatz_conjecture
{
    std::uint64_t steps(std::int64_t n)
    {
        if (n < 1)
        {
            throw std::domain_error("argument must be positive");
        }
        std::uint64_t steps = 0;
        while (n != 1)
        {
            if (n % 2 == 0)
            {
                n /= 2;
            }
            else
            {
                n = 3 * n + 1;
            }
            ++steps;
        }
        return steps;
    }
}

Tags:
construct:add
construct:assignment
construct:constructor
construct:divide
construct:header
construct:if
construct:include
construct:integral-number
construct:invocation
construct:loop
construct:method
construct:multiply
construct:namespace
construct:number
construct:parameter
construct:pragma
construct:return
construct:string
construct:throw
construct:uint64_t
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:object-oriented
technique:exceptions
technique:looping

Exercise: two-fer
Code
#include "two_fer.h"

namespace two_fer
{
    const std::string two_fer()
    {
        return "One for you, one for me.";
    }
    const std::string two_fer(std::string name)
    {
        return "One for " + name + ", one for me.";
    }

} // namespace two_fer

Tags:
construct:add
construct:class
construct:comment
construct:const
construct:constructor
construct:include
construct:method
construct:namespace
construct:overloading
construct:parameter
construct:return
construct:string
construct:throw
construct:using-declaration
construct:visibility-modifiers
paradigm:object-oriented
technique:exceptions

Exercise: two-fer
Code
#if !defined(TWO_FER_H)
#define TWO_FER_H
#include <string>

using namespace std;

namespace two_fer
{
    string two_fer(string one_fer = "you") {
        return "One for " + one_fer +", one for me.";
    }
} // namespace two_fer

#endif //TWO_FER_H

Tags:
construct:add
construct:class
construct:comment
construct:define
construct:header
construct:include
construct:namespace
construct:optional-parameter
construct:return
construct:string
construct:using-directive
construct:visibility-modifiers
paradigm:object-oriented

I am willing to help.

I'm done @ErikSchierboom

I "only" checked if the tags matched the exercise. I did not check if the tags are conform to https://exercism.org/docs/building/tooling/analyzers/tags. Should I do that as well?

Thanks! We'll do the cross-checking, don't worry!

This is an automated comment
Hello :wave: Next week we're going to start using the tagging work people are doing on these. If you've already completed the work, thank you! If you've not, but intend to this week, that's great! If you're not going to get round to doing it, and you've not yet posted a comment letting us know, could you please do so, so that we can find other people to do it. Thanks!

Thanks for the help! We've updated the tags.