Swift 5: adopt new Data.withUnsafeBytes API

Unfortunately I wasn't able to use the #if compiler(>=5.0) flag since the project supports older swift versions where this directive is not available.

Unfortunately I wasn't able to use the #if compiler(>=5.0) flag since the project supports older swift versions where this directive is not available.

Why?  We already use directive like that with problems.

Unfortunately I wasn't able to use the #if compiler(>=5.0) flag since the project supports older swift versions where this directive is not available.

Why? We already use directive like that without problems.

Sorry I should've been more clear. #if swift() has been supported for a while but #if compiler() less so. The project at first glance supports Swift versions right back to 3.0, but #if compiler() was added much later than that.
I didn't see any in the codebase when I grep'd for it, but I would prefer to be wrong because I want to use that here :)

The project at first glance supports Swift versions right back to 3.0,...

Our policy is to support one full major version back.  Since 5.0 is the current release version, that means we still support 4.0 and later.  Once 5.2 is released, we'll be able to use #if compiler since we'll only support >= 4.2 at that point.

I also don't know the #compiler would be correct, as some of these seem to be API changes. API changes should be tied to the language version, not the underlying compiler version/release.  If they were tied to the compiler doesn't that mean some code that compiles with Swift 4.x would suddenly stop compiling in 4.x mode with the 5 compiler?
ps - I completely read that initial comment as if #swift(), adding to the confusion here. 😄

I also don't know the #compiler would be correct, as some of these seem to be API changes. API changes should be tied to the language version, not the underlying compiler version/release. If they were tied to the compiler doesn't that mean some code that compiles with Swift 4.x would suddenly stop compiling in 4.x mode with the 5 compiler?
ps - I completely read that initial comment as #if swift(), adding to the confusion here. 😄

Yep you're totally right. These changes are all Swift 5 compiler in 5.0 mode, not backwards compatible with 5 compiler in 4.2 mode.

@alanzeino -- I'm testing a branch where I've globally replaced all of the Data(bytes:) with Data(_:).  Once I finish running tests (for Swift 4.0 through 5.0), I'll put up a PR for that.  So I think you can focus on just the 24 warnings about withUnsafeBytes and withUnsafeMutableBytes.  If you can fix those, I think I've got the rest of the 5.0 issues covered.

@alanzeino -- I'm testing a branch where I've globally replaced all of the Data(bytes:) with Data(_:). Once I finish running tests (for Swift 4.0 through 5.0), I'll put up a PR for that. So I think you can focus on just the 24 warnings about withUnsafeBytes and withUnsafeMutableBytes. If you can fix those, I think I've got the rest of the 5.0 issues covered.

Yep, I'll rebase.

@thomasvl @tbkka think we could merge this so there can be a new release that supports Swift 5?

The following seems sufficient to emulate the Swift 5 API on Swift 4:
#if !swift(>=5.0)
extension Data {
  func withUnsafeBytes<T>(_ body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T {
    let c = count
    return try withUnsafeBytes { (p: UnsafePointer<UInt8>) throws -> T in
      try body(UnsafeRawBufferPointer(start: p, count: c))
    }
  }
  mutating func withUnsafeMutableBytes<T>(_ body: (UnsafeMutableRawBufferPointer) throws -> T) rethrows -> T {
    let c = count
    return try withUnsafeMutableBytes { (p: UnsafeMutablePointer<UInt8>) throws -> T in
      try body(UnsafeMutableRawBufferPointer(start: p, count: c))
    }
  }
}
#endif

Note that every place we used the old withUnsafeBytes APIs, we always used it with UInt8, so this is actually correct for us.
Using the above, I've experimentally switched a couple of places to use the Swift 5 APIs -- the result seems to work correctly on both Swift 4 and Swift 5.  In the process, I did see some spots where the resulting code could probably be simplified, but I think such improvements can wait until after we get a clean build.

The following seems sufficient to emulate the Swift 5 API on Swift 4:
#if !swift(>=5.0)
extension Data {
  func withUnsafeBytes<T>(_ body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T {
    let c = count
    return try withUnsafeBytes { (p: UnsafePointer<UInt8>) throws -> T in
      try body(UnsafeRawBufferPointer(start: p, count: c))
    }
  }
  mutating func withUnsafeMutableBytes<T>(_ body: (UnsafeMutableRawBufferPointer) throws -> T) rethrows -> T {
    let c = count
    return try withUnsafeMutableBytes { (p: UnsafeMutablePointer<UInt8>) throws -> T in
      try body(UnsafeMutableRawBufferPointer(start: p, count: c))
    }
  }
}
#endif

Note that every place we used the old withUnsafeBytes APIs, we always used it with UInt8, so this is actually correct for us.
Using the above, I've experimentally switched a couple of places to use the Swift 5 APIs -- the result seems to work correctly on both Swift 4 and Swift 5. In the process, I did see some spots where the resulting code could probably be simplified, but I think such improvements can wait until after we get a clean build.

Ah I didn't think to hardcode the type. Updating now.

Updated all the cases. One thing to mention, looks like the master branch does not compile. So I did this with a commit that did compile, then once I verified that it all compiled after my changes, I rebased so that the diff didn't have any conflicts.
Any plan to add a CI check to these PRs?

We don't have PR testing, but we do have CI for the master branch:
https://ci.swift.org/job/swift-protobuf-linux-ubuntu-16_04/
According to that, the master branch did build last night.  I'll take a look when I get a chance.

We don't have PR testing, but we do have CI for the master branch:
https://ci.swift.org/job/swift-protobuf-linux-ubuntu-16_04/
According to that, the master branch did build last night. I'll take a look when I get a chance.

If I were to guess, I'd say that master branch build uses swift build and not xcodebuild build — and the reason why this doesn't compile is because a new type (TextFormatEncodingOptions) was added in a new file, but the .xcodeproj wasn't updated to use that new file.
That also raises another question I had — should we add the .xcodeproj to the .gitignore and just generate it using Swift PM? Then we can add a CI job that does both swift build and then swift package generate-xcodeproj && xcodebuild build -scheme SwiftProtobuf_iOS , which would catch these project inconsistencies.

Does your branch pass the test suite?  (E.g. make test?)
I'm seeing failures here in the following three tests:
SwiftProtobufTests.Test_JSON testMultipleFields
SwiftProtobufTests.Test_JSON_Array testTwoObjectsWithMultipleFields
SwiftProtobufTests.Test_Map_JSON testMapInt32Bytes
I find it interesting that the failing cases all relate to JSON and all of them have a bytes field which is empty.

That also raises another question I had — should we add the .xcodeproj to the .gitignore and just generate it using Swift PM? Then we can add a CI job that does both swift build and then swift package generate-xcodeproj && xcodebuild build -scheme SwiftProtobuf_iOS , which would catch these project inconsistencies.

Since SwiftPM doesn't really do iOS, and to better support users wanting Carthage, etc.; I think we end up needing a project file checked in. 🙁 The Makefile does have a bunch of Xcode related targets (test-xcode*), but I don't think most people bother to check them often.

Does your branch pass the test suite? (E.g. make test?)
I'm seeing failures here in the following three tests:
SwiftProtobufTests.Test_JSON testMultipleFields
SwiftProtobufTests.Test_JSON_Array testTwoObjectsWithMultipleFields
SwiftProtobufTests.Test_Map_JSON testMapInt32Bytes
I find it interesting that the failing cases all relate to JSON and all of them have a bytes field which is empty.

I should've taken your advice and just converted a few cases just to be safe. Unfortunately I have a bit of a problem in that I'm starting at a new employer next week that might not want me working on Open Source so how about for now I just land the back–ported extension in Data+Extensions.swift and convert one other place for reference, and I'll leave the rest to you since it would be a more careful strategy to do them piecemeal?

If you can fix the style issues I pointed out earlier, I'll see if I can debug that test failure.

If you can fix the style issues I pointed out earlier, I'll see if I can debug that test failure.

Okay!

Looks good.  I'm going to run some more tests before I merge this.

Cool! Lemme know if there's more changes I should make.

I ran tests on Ubuntu with Swift 4.0 through a 5.0 beta and it all looks good.  Thanks for working through this!


Paragraph Indent parameter Typography docs

Related issue: https://github.com/six7/figma-tokens/issues/735
Related docs: https://docs.figmatokens.com/styles#typography-tokens
Name doc: >Addition to Typography page
Video walk through:
Doc:

commited changes to Styles > Typography


Fix Issue #1273 about a segfault in NC_check_nulls

Fixes Issue https://github.com/Unidata/netcdf-c/issues/1273

 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.

Thanks! This change is already pending in #1266.


[Event attendance] An authorized user can`t join to the ''Closed'' event.

Environment:
Windows 10 Pro 21H2
Google Chrome 109.0.5414.75
Reproducible: always
Build found: 01/02/2023
Preconditions:

The website https://www.testgreencity.ga/GreenCityClient/#/ is opened.
The user is signed in. (E.g. login<EMAIL_ADDRESS>password:Green@333)
Closed-type event is created by an Organizer, who is a friend of the user.
An authorized user has an event Organizer in his friend list.

Steps to reproduce

Click the ''Events'' link.
Observe the closed future event`s preview card.

Actual result: The ''See rating' button is displayed on the closed future event preview card.
Expected result: The ''Join event'' button is displayed on the closed future event preview card, an authorized user can join to the event.
User story and test case links
User story #3270
[Test case]https://jira.softserve.academy/browse/GC-4899

this bug is already fixed


Add ADUC_CopyIf and use for safe StrCopyN impl

( stacked on PR https://github.com/Azure/iot-hub-device-update/pull/591 )

add CopyIf to string_c_utils
use ADUC_CopyIf for ADUC_Safe_StrCopyN impl

Closing in favor of PR on the top of stack: https://github.com/Azure/iot-hub-device-update/pull/593


Aspect ratio guide

Also set html-btn as active by default (auto click)

Also please clean up root directory and get rid of all the messes ❤ UDM can potentially be outside a folder

Make all artwork ::selection invisible


Google Search API integration with serper.dev (wrapper, tests, docs, …

Adds Google Search integration with Serper a low-cost alternative to SerpAPI (10x cheaper + generous free tier). Includes documentation, tests and examples. Hopefully I am not missing anything.
Developers can sign up for a free account at serper.dev and obtain an api key.
Usage
from langchain.utilities import GoogleSerperAPIWrapper
from langchain.llms.openai import OpenAI
from langchain.agents import initialize_agent, Tool

import os
os.environ["SERPER_API_KEY"] = ""
os.environ['OPENAI_API_KEY'] = ""

llm = OpenAI(temperature=0)
search = GoogleSerperAPIWrapper()
tools = [
    Tool(
        name="Intermediate Answer",
        func=search.run
    )
]

self_ask_with_search = initialize_agent(tools, llm, agent="self-ask-with-search", verbose=True)
self_ask_with_search.run("What is the hometown of the reigning men's U.S. Open champion?")

Output
Entering new AgentExecutor chain...
 Yes.
Follow up: Who is the reigning men's U.S. Open champion?
Intermediate answer: Current champions Carlos Alcaraz, 2022 men's singles champion.
Follow up: Where is Carlos Alcaraz from?
Intermediate answer: El Palmar, Spain
So the final answer is: El Palmar, Spain

> Finished chain.

'El Palmar, Spain'

Thanks for the quick feedback! I reverted self_ask_with_search.ipynb and fixed the types + linting issues.

@hwchase17 could you review again?


read_parquet -> apply -> to_parquet

df = wr.s3.read_parquet(f's3://{bucket}/{key}')
df = df.apply(update_row, client=client, axis=1)
wr.s3.to_parquet(
    df=df,
    path=out_path,
    index=False
)

I'm trying to process batches of files using parquet + lambda.
Things work until I go to upload back into Redshift.  to_parquet seems to be converting int32 columns to int64.
The table field types should be identical between mappings.  How can I ensure the output matches the input?

Hi @twonil-jordan-stout, how are you uploading to redshift? It is not in your code sample. What exactly happens then - does the upload fail with an error? If so, what is the error? Is df.apply in the code sample relevant to the issue?

@kukushking Hey,
The out_path is an s3 source, so to_parquet is doing the upload.
df.apply in this updates two different columns based on criteria and returning the full row.
def update_row(row):
    uri_query = row['uri_query']
    traffic_source = row['traffic_source']
    referer = row['referer']

    # fix utm_source if changed
    query_params = querystring_dict(uri_query)
    fixed_utm_source = get_utm_source(query_params['utm_source'], uri_query)
    if fixed_utm_source != row['utm_source']:
        row['utm_source'] = fixed_utm_source

    # fix traffic source if changed
    fixed_traffic_source = get_traffic_source(query_params['utm_source'], uri_query, referer, client)
    if fixed_traffic_source != traffic_source:
        row['traffic_source'] = fixed_traffic_source

    return row

I can run this same pipeline using pandas directly and manually uploading to S3 and everything works.

Thanks @twonil-jordan-stout I see so there is no Redshift involved, it's only S3. When you say it doesn't work - what is the error? Can you share the full stack trace of the error?

@kukushking
file [...] has an incompatible Parquet schema for column [...]/.yr Column type INT. Parqu
yr in source file is int32 and the output file changes it to int64
When using dask, I can pass in the original dataframe and it retains types.  Also, again, plain pandas doesn't change types.
# this doesn't change types using pandas
import pandas as dd

df = dd.read_parquet('0015_part_00.parquet')
df.to_parquet('0015_part_00_hmm.parquet', index=False)

# this does change types
import awswrangler as wr

df = wr.s3.read_parquet(f's3://{bucket}/{key}')
wr.s3.to_parquet(
      df=df,
      path=f's3://{bucket}/out/{key}',
      index=False
)

@kukushking Just confirmed that it happens when using apply but doesn't happen when using dask.  Dask retains the column types


Add public function to graphite parser to apply template

This is to support the Telegraf statsd plugin, where I want to provide templating for statsd/graphite-style buckets -> influxdb info.
For Telegraf I don't want the full point parsing (Parser.Parse), I only want to parse the measurement name and tags.

+1, assuming the case I asked about is handled.

Good question, I'll add a test to verify that it doesn't do anything to the measurement name if it doesn't match.

closed by https://github.com/influxdb/influxdb/commit/883d32cfd06e8cf14e6d9fc75dbe7b7b92345623


Scan for error while patching

Add detection to see if file was patched correctly and avoid loading when patching failed

Check if functions like nextSiblingElement returns null


libdislocator, typo fix.

I saw that change to uppercase but it compiled for me so I was fine with it ... whats up with this?

the upper case is one is "just" the default value whereas the lower's is the tls value which can be overriden (this is how I found out the issue).

thanks!


MaskRCNN - IndexError: list index out of range after training 1 epoch

Hello, I'm having trouble  with this kinda weird error:
  File "./mmdetection/mmdet/datasets/coco.py", line 259, in _segm2json
    if isinstance(segms[i]['counts'], bytes):
IndexError: list index out of range

Showing up right after I trained 1 epoch :cry:
Could anyone help me to handle it :love_letter:  Thanks in advance!

I suspect that your data may be incorrectly labeled, you need to check

Sir, thanks for your reply. I did check the data(only 1 class) but everything seems good :confused:

You can also use visual scripts to find problems easily

+1 here when resume-from model,  at epoch 23

+1 here when resume-from model, at epoch 23 using dist train

I think this error has nothing to do with the train, it may just be a dataset problem.

@hhaAndroid I followed the solution in fix supple_mask above but the error is still there :sob: :sob:

@hhaAndroid I followed the solution in fix supple_mask above but the error is still there

This problem is more difficult to eliminate, can you debug to see the cause? Thank you.

+1

+1

Are you using the coco data set? Can you provide more details？

+1

Are you using the coco data set? Can you provide more details？

I use the custom dataset but covert it to coco format,  the error appear when evaluation：
2021-04-28 14:33:52,806 - mmdet - INFO - Saving checkpoint at 1 epochs
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 50/50, 6.9 task/s, elapsed: 7s, ETA:     0sTraceback (most recent call last):
File "tools/train.py", line 190, in
main()
File "tools/train.py", line 186, in main
meta=meta)
File "/home/chenyixin03/mmdetection/mmdet/apis/train.py", line 171, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train
self.call_hook('after_train_epoch')
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 147, in after_train_epoch
key_score = self.evaluate(runner, results)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 177, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 417, in evaluate
result_files, tmp_dir = self.format_results(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 362, in format_results
result_files = self.results2json(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 299, in results2json
json_results = self._segm2json(results)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 267, in _segm2json
if isinstance(segms[i]['counts'], bytes):
IndexError: list index out of range

+1

Are you using the coco data set? Can you provide more details？

I use the custom dataset but covert it to coco format, the error appear when evaluation：
2021-04-28 14:33:52,806 - mmdet - INFO - Saving checkpoint at 1 epochs
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 50/50, 6.9 task/s, elapsed: 7s, ETA: 0sTraceback (most recent call last):
File "tools/train.py", line 190, in
main()
File "tools/train.py", line 186, in main
meta=meta)
File "/home/chenyixin03/mmdetection/mmdet/apis/train.py", line 171, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train
self.call_hook('after_train_epoch')
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 147, in after_train_epoch
key_score = self.evaluate(runner, results)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 177, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 417, in evaluate
result_files, tmp_dir = self.format_results(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 362, in format_results
result_files = self.results2json(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 299, in results2json
json_results = self._segm2json(results)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 267, in _segm2json
if isinstance(segms[i]['counts'], bytes):
IndexError: list index out of range

Have you tried #5065 solution?

+1

Are you using the coco data set? Can you provide more details？

I use the custom dataset but covert it to coco format, the error appear when evaluation：
2021-04-28 14:33:52,806 - mmdet - INFO - Saving checkpoint at 1 epochs
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 50/50, 6.9 task/s, elapsed: 7s, ETA: 0sTraceback (most recent call last):
File "tools/train.py", line 190, in
main()
File "tools/train.py", line 186, in main
meta=meta)
File "/home/chenyixin03/mmdetection/mmdet/apis/train.py", line 171, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train
self.call_hook('after_train_epoch')
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 147, in after_train_epoch
key_score = self.evaluate(runner, results)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 177, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 417, in evaluate
result_files, tmp_dir = self.format_results(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 362, in format_results
result_files = self.results2json(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 299, in results2json
json_results = self._segm2json(results)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 267, in _segm2json
if isinstance(segms[i]['counts'], bytes):
IndexError: list index out of range

Have you tried #5065 solution?

yes，but not work.

+1

Are you using the coco data set? Can you provide more details？

I use the custom dataset but covert it to coco format, the error appear when evaluation：
2021-04-28 14:33:52,806 - mmdet - INFO - Saving checkpoint at 1 epochs
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 50/50, 6.9 task/s, elapsed: 7s, ETA: 0sTraceback (most recent call last):
File "tools/train.py", line 190, in
main()
File "tools/train.py", line 186, in main
meta=meta)
File "/home/chenyixin03/mmdetection/mmdet/apis/train.py", line 171, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train
self.call_hook('after_train_epoch')
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 147, in after_train_epoch
key_score = self.evaluate(runner, results)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 177, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 417, in evaluate
result_files, tmp_dir = self.format_results(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 362, in format_results
result_files = self.results2json(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 299, in results2json
json_results = self._segm2json(results)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 267, in _segm2json
if isinstance(segms[i]['counts'], bytes):
IndexError: list index out of range

Have you tried #5065 solution?

yes，but not work.

It is difficult for me to reproduce. Could you please debug to see the approximate reason？Thank you.

+1

Are you using the coco data set? Can you provide more details？

I use the custom dataset but covert it to coco format, the error appear when evaluation：
2021-04-28 14:33:52,806 - mmdet - INFO - Saving checkpoint at 1 epochs
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 50/50, 6.9 task/s, elapsed: 7s, ETA: 0sTraceback (most recent call last):
File "tools/train.py", line 190, in
main()
File "tools/train.py", line 186, in main
meta=meta)
File "/home/chenyixin03/mmdetection/mmdet/apis/train.py", line 171, in train_detector
runner.run(data_loaders, cfg.workflow)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run
epoch_runner(data_loaders[i], **kwargs)
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 54, in train
self.call_hook('after_train_epoch')
File "/home/chenyixin03/miniconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 307, in call_hook
getattr(hook, fn_name)(self)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 147, in after_train_epoch
key_score = self.evaluate(runner, results)
File "/home/chenyixin03/mmdetection/mmdet/core/evaluation/eval_hooks.py", line 177, in evaluate
results, logger=runner.logger, **self.eval_kwargs)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 417, in evaluate
result_files, tmp_dir = self.format_results(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 362, in format_results
result_files = self.results2json(results, jsonfile_prefix)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 299, in results2json
json_results = self._segm2json(results)
File "/home/chenyixin03/mmdetection/mmdet/datasets/coco.py", line 267, in _segm2json
if isinstance(segms[i]['counts'], bytes):
IndexError: list index out of range

Have you tried #5065 solution?

yes，but not work.

It is difficult for me to reproduce. Could you please debug to see the approximate reason？Thank you.

The reason for this error is that the num of the bboxs and the num of of the segms is not euqal when evaluation in _segm2json function. I don't know why.

@YiXinChenChen #5065 is to solve this situation, but I don't know why it has not been solved? Are there other situations that have not been considered? You can take a closer look at #5065. thank you!

@YiXinChenChen #5065 is to solve this situation, but I don't know why it has not been solved? Are there other situations that have not been considered? You can take a closer look at #5065. thank you!

OK, I found that the current MMD version is 2.11.0，when I update to master，it work！ Thanks！

@YiXinChenChen #5065 is to solve this situation, but I don't know why it has not been solved? Are there other situations that have not been considered? You can take a closer look at #5065. thank you!

OK, I found that the current MMD version is 2.11.0，when I update to master，it work！ Thanks！

May I ask you how to fix this error? I got the same error!!!

I modified line 267 in mmdet（2.28.2）/datasets/coco.py from ’ isinstance(segms[i]['counts'], bytes): ’to:
’if i < len(segms) and 'counts' in segms[i]:
if isinstance(segms[i]['counts'], bytes):’
After this change, the code ran successfully. The reason for the error was that there were images in my dataset that did not require annotations.
I hope it was helpful for you.


[BUG] Movie script - can't open cog (settings) in macro manager

Describe the bug
A clear and concise description of what the bug is.
I have done this before where it worked, but I'm trying again in a new vault. I follow this: https://minimal.guide/Guides/Create+a+movie+database
When I add the js-file to the vault and in the macro manager in Quickadd, nothing happens when I press the cog-icon next to the script. Therefore, I can't get to add my API for OMDB.

I get this in the console:
obsidian.md-1680643384109.log

Try following the steps I outline at the bottom of this issue:
https://github.com/chhoumann/quickadd/issues/417
Looks like there's some symbol in the file that's unexpected.


docs: 0.15.0 changelog

This adds the missing 0.15.0 items to the changelog.

Yes! It was removed in the commit that removed the feature. I've rebased this on main.


Make Analysis content machine-independent

There are number of items in Analysis currently that's machine dependent.
We could for example, keep the machine dependent parts such as base directory in-memory, and store relative paths in Analysis. Similar treatment could be done for library JARs, Java Home etc.
Making Analysis content machine-independent allows cached compilation.

This is related to #214.
I agree this is a nice have. Though I'm not sure we should push for it for the next stable release since it does not affect key functionality in Scala devs workflow. I would suggest marking it as "contributions welcome" or "community" so that people like @gabro could have a stab at it. WDYT @eed3si9n ?

@jvican I think it's a good idea, although it'd be great if you guys should provide some extra context/analysis, so that a person not familiar with the code base (like myself) could pick this up.
For instance, do you already have a list of the machine-dependent items?

Only paths that I know of. The idea described by @eed3si9n is to have an internal representation that is absolute but only keep relative parts in the serialized analysis instances (and therefore API). An internal conversion relative -> absolute -> relative would need to be performed (the first one to read analysis and the second one to write it).
Classpaths would need special handling (we need to be careful, some of the paths in classpaths are absolute and therefore machine-dependent). Those should be left unchanged. We should only change paths that affect user-defined class files or jars.

Lightbend and @romanowski (VirtusLab) has spent some time thinking about this problem, so I think it's something one of us should tackle. Analysis structure is among the most critical aspect of Zinc to get right.

Good @eed3si9n, that makes sense! I'll focus for now on the dependency analysis, but if I have time left I'll try to get it out. Though I would prefer if someone else (perhaps @romanowski) is interested in tackling this soon.

First of all we need to make both Analysis and MInisetup machine independent.
Zinc (in current shape) is IMO way too low level to handle relative classpath or even relative source roots.
Classpath is good example here since build tool (e.g. sbt) knows what makes given classpath entry. We can map e.g. jar back to its declaration (so e.g. /my/absolute/path/lib.jar becomes ogranization%name%version%jar that we can share across machines).
However zinc can allows clients to make analysis machine independent. All what is required to achieve that is already implemented in #216 as mappers (so client can map part of Analysis based of its setup).
I am working on client (plugin for sbt) based on that idea (https://github.com/romanowski/hoarder) for both 1.0 and 0.13. As said in PR we are now not open source integration that reusing analysis between different machines (it includes different build tools and operating systems).

@romanowski I won't assign any cycles to this. Are you thinking of implementing it?

I my opinion this should not be implemented inside zinc and as (Hoarder)[https://github.com/romanowski/hoarder] shows it can be done outside quite easily. So I think we should either close this issue or move it down in priority queue.

That sounds good to me. The fact that we can outsource this kind of functionality is very beneficial to Zinc maintenance, since I do not expect this one to be easy to implement. You're doing crazy progress on Hoarder, hope to see that feature implemented there.
What do other maintainers think about this? I'm for closing this issue.
@gabro If you're interested in this, you should probably reach out to @romanowski and talk about potential ways of collaborating. I'm sure he'll help you out! :smile:

@gabro I've got planty od ideas how Hoarder's engine can be used and the only thing I lack is time. Any help appreciated!

I suspect certain parts of Zinc is still machine-dependent as long as we depend on Java serialization, which I think sbinary codecs do sometimes.

I think we should keep this open, even at low priority: just because it can done externally doesn't mean that all clients much always be burden by this.
I've not looked at the details properly but I fail to understand how @romanowski can claim that "it can be done outside quite easily" while @jvican states "I do not expect this one to be easy to implement". Something doesn't add up... :-D

There is one thing that we miss in zinc: context. Example: if you got sources (and we get sources as an array): /my/path/root1/pck1/Ala.scala, /my/path/root1/pck2/Ala.scala, /my/path/root2/pck1/Ala.scala then you can't tell where is your sources roots are (but if you use context from e.g. sbt becomes quite simple).

We may want to keep this open and fix it upstream to help Pants and other build tools that need this. (/cc @stuhood @peiyuwang).

In our experience distributing zinc's analysis across Linux and OSX machines in pants' cache, the only thing that is necessary to rewrite are filenames.
In particular, we have a single "sourceroot" for all input sources (the root of the repository), and a single "workdir" (usually $root/.pants.d/) for all binary outputs. We relativize all paths inside the analysis to those two bases when we put an entry in the cache, and rewrite it when we take an entry from the cache.
The reason there are two paths (rather than just a single "repo base") is to support locating the binary outputs directory outside of the repo, which can help in deployment models that put compile outputs in a ramdisk, for example.
One notable thing that pants does is to symlink out of the ivy (or coursier) cache and into the "workdir", in order to guarantee that all inputs can be relativized to one of the two directories.

single "workdir" (usually $root/.pants.d/) for all binary outputs. We relativize all paths inside the analysis to those two bases when we put an entry in the cache, and rewrite it when we take an entry from the cache.

Sbt has several workdirs, but I think achieving this is doable.

locating the binary outputs directory outside of the repo, which can help in deployment models that put compile outputs in a ramdisk

Do you place compile outputs in a ramdisk? I would be interested to know what speedups you get.

One notable thing that pants does is to symlink out of the ivy (or coursier) cache and into the "workdir", in order to guarantee that all inputs can be relativized to one of the two directories.

This is a good solution for the problem. I think we could experiment with it. I don't see any reason why we couldn't do the same with sbt. However, this will require us to place some logic in sbt/sbt instead of sbt/zinc.

This is more or less what I am doing in Hoarder.
@stuhood How do you rewrite paths? I recommend using AnalysisMappers

@romanowski : Neat. A long while ago (and thus potentially no-longer-relevant) we found that fully deserializing analysis in order to rewrite it was much more expensive than doing line-oriented rewrites... and so we're currently using a python line-oriented implementation.
But since AnalysisMappers looks like it could be used on the fly while saving analysis, I'm guessing it would solve the problem of redundant serialization.

Fixed in #351. Analysis is now machine independent provided that build tools implement ReadMapper and WriteMapper. These mappers are used after reading and before writing, respectively. If you want to see an example, have a look at https://github.com/sbt/zinc/blob/3026ea8f57ecf18e5fa93f9f2fe7542e5174e2f5/internal/zinc-persist/src/main/scala/sbt/internal/inc/mappers/RelativeReadMappers.scala.


Bump aks-engine to v0.31.1 to support private ACR

Incorporate aks-engine update: https://github.com/Azure/aks-engine/pull/523
Notes:
Update tests and docs to use aks-engine v0.31.1 to support private ACR to fix e2e tests

/test pull-cloud-provider-azure-e2e

/test pull-cloud-provider-azure-e2e

/test pull-cloud-provider-azure-e2e


Calculated tokens much higher than actual

Thanks for this. I've noticed a weird issue though both with this library and also the official code from open ai that I found a while back before gpt-4 came out.
What is happening is that the tokens calculated by this tool are much higher than the openai api is reporting in the completion. For example, a prompt I just submitted to gpt-4 was calculated as 7810 tokens by this library but when I got the completion from openai it told me my prompt had 5423 tokens. I'm not sure if you have also noticed something similar? In the prompt I'm submitting primarily Node JS code.

As a workaround, I've noticed when you request too many tokens, you get a 400 error very quickly for example
This model's maximum context length is 8192 tokens. However, you requested 13674 tokens (7469 in the messages, 6205 in the completion). Please reduce the length of the messages or completion.

So I parse of the messages token count and resubmit with a max_tokens calculated as follows: 8192 - 7469 - 1

Hi @Qarj! Thanks for flagging this problem.
As @ricardomatias noticed in #5, the tokenizer is using the r50k_base encoding, which isn't the one used by GPT-4. Hence the token offset. I'm working on v2 which will allow for choosing which encoding to use, which will correctly tokenize for GPT-4 specifically.

Thanks very much for addressing this! I will definitely use this feature in v2 when it is out.

Thanks very much for this! Am using it already :)

So it seems it is much closer now to the actual tokens, in a test I did the prompt was calculated as 998 tokens according to the library but 1003 tokens according to open ai. I suspect if we allow a 50 token margin then our completion token requests should always be within limit.

Interesting. I wonder if there are 5 additional tokens that are set by OpenAI for each request? The algorithm should be exactly the same as OpenAIs.
Thanks for investigating.

@Qarj added the new encodeChat function which should return correct values for chats!

Thanks very much for this! :)


Error #2F067065 - "ess signing certificate error" when validating timestamp reply

Hi,
I get an error when I try to validate a RFC3161-compliant timestamp reply.
The reply can be validated with an application using BouncyCastle.
This bug was also present in OpenSSL 1.0.1 as mentioned in #2473 .
Here is my environment:
# Distrib info
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

# OpenSSL info
OpenSSL 1.1.0g  2 Nov 2017
built on: reproducible build, date unspecified
platform: debian-amd64
compiler: gcc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/lib/ssl\"" -DENGINESDIR="\"/usr/lib/x86_64-linux-gnu/engines-1.1\""
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-1.1"

Steps to reproduce:
# Query generation
$ openssl ts -query -data /etc/passwd -sha256 -out query.tsr

# Here is the query
$ openssl ts -query -text -in query.tsq
Using configuration from /usr/lib/ssl/openssl.cnf
Version: 1
Hash Algorithm: sha256
Message data:
    0000 - 85 26 8f fc df fc 8f 54-ea d0 04 88 02 35 53 c1   .&.....T.....5S.
    0010 - 06 4b d9 7f 04 ed e4 11-a1 dc 99 12 4c e9 ac 54   .K..........L..T
Policy OID: unspecified
Nonce: 0x985B3170CE7DEED8
Certificate required: no
Extensions:

# Send it to the server - PrimeKey SignServer 4.0.0
$ cat query.tsq | curl -H 'Content-Type: application/timestamp-query' --cacert ca-tls.pem https://signserver.my.domain:8442/signserver/tsa?workerName=TimeStampSigner --data-binary @- -o reply.tsr

# Here is the reply
$ openssl ts -reply -in reply.tsr -text
Using configuration from /usr/lib/ssl/openssl.cnf
Status info:
Status: Granted.
Status description: Operation Okay
Failure info: unspecified

TST info:
Version: 1
Policy OID: [confidential - scrapped]
Hash Algorithm: sha256
Message data:
    0000 - 85 26 8f fc df fc 8f 54-ea d0 04 88 02 35 53 c1   .&.....T.....5S.
    0010 - 06 4b d9 7f 04 ed e4 11-a1 dc 99 12 4c e9 ac 54   .K..........L..T
Serial number: 0x2D26E0730ABDDD1B
Time stamp: Aug 23 14:19:52 2018 GMT
Accuracy: 0x01 seconds, unspecified millis, unspecified micros
Ordering: no
Nonce: 0x985B3170CE7DEED8
TSA: [confidential - scrapped: same info as my TSA cert for sure]
Extensions:

# This is when it gets weird
$ openssl ts -verify -in query.tsr -CAfile tsa-ca.pem -untrusted tsa.pem -queryfile query.tsq
Using configuration from /usr/lib/ssl/openssl.cnf
Verification: FAILED
140401657303488:error:2F067065:time stamp routines:ts_check_signing_certs:ess signing certificate error:../crypto/ts/ts_rsp_verify.c:230:

I can't attach reply ASN.1 for confidentiality issues but if it is really needed I can reproduce these steps in a test environment with no private info and then send the reply.
Thanks !

Hi Gigaju,
I ran into the same issue while working with dfn.de TSA. This happens when your TSA is working with the SHA256withRSAEncryption algorithm.
Support has been added in the pull request #771 , but it is not included in openssl 1.1.0. It is included in openssl 1.1.1 pre-release though.
I downloaded this version, compiled it and timestamp verification worked fine for me.
Hope this helps you.

I have a similar issue when the timestamp response contains an EssCertIdv2 as described in the RFC and to be compliant with ETSI. Does someone have already verify a timestamp response with and EssCertIdv2 ?

@H3llK33p3r : take a look at #14503 and related, it has fix some issues related to EssCertIdv2.

Thank for the response @FdaSilvaYY , after more investigation it seems that my issue is related to the EssCertIdv2 issuerSerial.
I have no issue with my server returning the v1 (no general names included in issuer serial).
With EssCertIdv2, the verify fails when issuer serial is set (this part is optionnal according to rfc5035). So either the serial number has an issue or the general names. I will perform additionnal tests.

The ess cert id handling should be fixed on current master. Closing. Please open new issues if you still see problems with ess handling in the current 3.0 prereleases.

Ok thanks, the issue was related to the RFC (on my side only) and the order of the general names element.
issuer
      contains the issuer name of the certificate.  For non-attribute certificates, the issuer MUST contain only the issuer name from
      the certificate encoded in the directoryName choice of GeneralNames.  For attribute certificates, the issuer MUST contain
      the issuer name field from the attribute certificate.

Sorry for the inconvenience.

Sorry for the inconvenience.

No problem.


Event View Area

Added event view template and endpoint
Minor CSS fixes in event edit

Codecov Report

Merging #90 (2608f6a) into develop (53d226d) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop      #90      +/-   ##
===========================================
+ Coverage    98.55%   98.57%   +0.02%
===========================================
  Files            8        8
  Lines          207      210       +3
===========================================
+ Hits           204      207       +3
  Misses           3        3

Impacted Files
Coverage Δ

app/routers/event.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

Codecov Report

Merging #90 (2608f6a) into develop (53d226d) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop      #90      +/-   ##
===========================================
+ Coverage    98.55%   98.57%   +0.02%
===========================================
  Files            8        8
  Lines          207      210       +3
===========================================
+ Hits           204      207       +3
  Misses           3        3

Impacted Files
Coverage Δ

app/routers/event.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Add optional decimal places

https://github.com/husainshabbir/form-filler/issues/111
trying to create a option on the number custom field type which allows decimal places.

@husainshabbir sorry I couldn't put any translated messages by the way, I can only speak English unfortunately

Yes me too 😄
The Chinese translations were contributed by someone. I will try getting hold of that person and see if they can be updated.


do you host the ocamldoc somewhere online?

that would be cool!

you could even serve the pages on github ...

I do :
https://github.com/madroach/ocaml-zlib/blob/master/README.md


Shovel + anvil (or hardhat)

Hello,
I'm willing to use shovel for my indexing but I can't make it work locally with my local network (anvil or hardhat).
It looks like it can't work with http
l=debug v=582d msg=rpc connection error: %w ig=transfer src=custom !BADKEY=unable to do http request: Post "": unsupported protocol scheme ""

  "eth_sources": [
    {
        "name": "custom",
        "chain_id": 31337,
        "urls": ["http://<IP_ADDRESS>:8545"]
    }
  ],

Is there something I can do to make it work locally?

Nevermind, I was using only one element in the array for urls which seems to break it, I had to replace my config with
  "eth_sources": [
    {
      "name": "custom",
      "chain_id": 31337,
      "url": "https://foo.bar"
      }
  ],


Use default partitioning function with checkkey enabled

Does it make sense to set the checkkey property to the default partitioning function to true?
Currently it's undefined which results in balancing to a certain partition even if we don't have a key specified. This in turn leads to partial results in certain search queries.
Do you see any obstacles in changing the default behaviour?

Do we need to adapt the dataflow (and perhaps reduce/map functions) code or we can simply change the default?

As far as I can see in  the dataflow we're not using the default and I don't think we need to change that, except we find really strong arguments to do so.
To me it looks like just changing the default, but ...


Update 2021-04-30-ols-2-participant-fez-speedblog.md

Edits suggested by Eva

Approved by @evaherbst.


[Question] Is it possible to interact with the devtools frontend with CDP?

Hi, I'm trying to mimic the default chrome dev tools behavior on Overlay.inspectNodeRequested with my application, to open the Elements panel of the chrome dev-tools window, and selecting the inspected node.
But I don't find any message in the protocol to interact with the frontend UI. So just wanted to check with you.
Please feel free to throw at me any ideas on how that can be achieved.
BTW, thanks for this library, it is so helpful. 🙏

Hopefully this should give you something to work on:
const CDP = require('chrome-remote-interface');

async function example() {
    try {
        const client = await CDP();
        const {DOM, Overlay} = client;

        Overlay.inspectNodeRequested(async ({backendNodeId}) => {
            console.log(`node requested: ${backendNodeId}`);
            await Overlay.setInspectMode({
                mode: 'none',
                highlightConfig: {}
            });
        });

        await DOM.enable();
        await Overlay.enable();
        await Overlay.setInspectMode({
            mode: 'searchForNode',
            highlightConfig: {
                contentColor: {r: 255, g: 0, b:0, a: 0.5}
            }
        });
    } catch (err) {
        console.error(err);
    }
}

example();

@cyrus-and Thanks for the quick reply. I have been trying the same and I'm able to get the node inspected.
But I need Chrome's dev-tools window opened with the inspected node, which I'm quite not sure how to achieve.
I can open the dev-tools window through other means, but focusing this node on the Elements panel of the dev tools is what I'm not able to get through.
Any ideas there?

But I need Chrome's dev-tools window opened with the inspected node, which I'm quite not sure how to achieve.

I'm quite sure this cannot be done, but you might want to ask here or here.

I can open the dev-tools window through other means

How?

I'm quite sure this cannot be done, but you might want to ask here or here.

Thanks for these pointers, I looked into the devtools-frontend and got some ideas to work on.

How?

Since the pages are loaded using electron webview, there are APIs to open the dev-tools window.
I'm closing this issue now, thanks for the help!

Feel free to post here a sketch of the solution if you find it so to help others.

I think he literally just called
openDevTools
https://github.com/responsively-org/responsively-app/blob/90240a64b950a415447d50e4940e696aab8bee6f/desktop-app/app/main.dev.js#L588


SQL is not being rendered in BaseSQLDecoratedOperator

As a user I would like to see the rendered sql in the task instance "Rendered" section of the Airflow UI.
cc @mikeshwe (as, if I am not mistaken, you brought this up)

We need to verify this. @feluelle is this already fixed?

No, the PR for that is still in Draft.


kubectl delete replication controller hangs for the same spec but with different name

$ cat t1.yaml
apiVersion: v1beta3
kind: ReplicationController
metadata:
  name: kube-nginx1
  namespace: default
spec:
  replicas: 1
  selector:
    k8s-app: kube-nginx1
  template:
    metadata:
      labels:
        k8s-app: kube-nginx1
    spec:
      containers:
      - name: nginx
        image: nginx

$ cat t2.yaml
apiVersion: v1beta3
kind: ReplicationController
metadata:
  name: kube-nginx2
  namespace: default
spec:
  replicas: 1
  selector:
    k8s-app: kube-nginx1
  template:
    metadata:
      labels:
        k8s-app: kube-nginx1
    spec:
      containers:
      - name: nginx
        image: nginx

$ kubectl create -f t1.yaml
replicationcontrollers/kube-nginx1
$ kubectl create -f t2.yaml
replicationcontrollers/kube-nginx2
$ kubectl delete -f t2.yaml (hangs for several minutes)

$ kubectl get rc
kube-nginx1                      nginx                   nginx                                            k8s-app=kube-nginx1                        1
kube-nginx2                      nginx                   nginx                                            k8s-app=kube-nginx1                        0

Well, it's not hanging forever, but takes abnormal long time to return.

@yifan-gu, we don't check if the replication controllers have the same selector, but we should (#2210). It should not allow you to create the second replication controller.

@yujuhong I was expecting this because it is confusing what if the two rc have different numbers...

What if you do --cascade=false for the delete command?  I hope that actually completes.
Sent from my iPhone

On May 20, 2015, at 8:03 PM, Yifan Gu<EMAIL_ADDRESS>wrote:
$ cat t1.yaml
apiVersion: v1beta3
kind: ReplicationController
metadata:
name: kube-nginx1
namespace: default
spec:
replicas: 1
selector:
k8s-app: kube-nginx1
template:
metadata:
labels:
k8s-app: kube-nginx1
spec:
containers:
- name: nginx
image: nginx
$ cat t2.yaml
apiVersion: v1beta3
kind: ReplicationController
metadata:
name: kube-nginx2
namespace: default
spec:
replicas: 1
selector:
k8s-app: kube-nginx1
template:
metadata:
labels:
k8s-app: kube-nginx1
spec:
containers:
- name: nginx
image: nginx
$ kubectl create -f t1.yaml
replicationcontrollers/kube-nginx1
$ kubectl create -f t2.yaml
replicationcontrollers/kube-nginx2
$ kubectl delete -f t2.yaml (hangs forever, never returns)
$ kubectl get rc
kube-nginx1                      nginx                   nginx                                            k8s-app=kube-nginx1                        1
kube-nginx2                      nginx                   nginx                                            k8s-app=kube-nginx1                        0
—
Reply to this email directly or view it on GitHub.

@derekwaynecarr --cascade=false works, seems should be covered by #2210. Thanks!

@derekwaynecarr --cascade=false indeed worked for me as well. However, without cleaning out the resources in a cascade fashion, would it eventually clog up k8s server?
On Tuesday, September 20, 2016, Ye Wang<EMAIL_ADDRESS>wrote:

@derekwaynecarr https://github.com/derekwaynecarr --cascade=false
indeed worked for me as well. However, without cleaning out the resources
in a cascade fashion, would it eventually clog up k8s server?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/kubernetes/issues/8598#issuecomment-248416397,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF8dbGKQqQTdY8h7HJBn-H14C8PnI81lks5qsDsugaJpZM4EinI7
.


fix: upgrade to version 3.1.338

from: https://github.com/jenkins-x/jx-cli

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign garethjevans
You can assign the PR to them by writing /assign @garethjevans in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jenkins-x-bot-test: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

gsm
9f5c051a0539fc4d8a9183f57b7f2d97f2f7306f
link
/test gsm

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here.

/retest


LPR improvements

Should we be moving away from having a single LPR and build in capacity to assign different LPRs to different types of equipment or facilities based on historical data? LPR could even sample from a distribution. Or should we just leave it as a single value?
@tbarchyn @KeeganShaw-GIS @AkaMrmuffin @c-vollrath

Yes to moving away from having a single LPR value and disaggregating this down to the equipment scale. Would it work to divide a site-level LPR by the number of equipment(s) on site depending on the inputs provided by the user or a default distribution in LDAR-Sim? Or would it have to be proportional based on some pieces of equipment being more likely to have leaks arise than others? If the latter, how would we approach this? The distribution could work well here!

To continue following the advice Tom keeps giving, if we build in equipment-scale LPR functionality it needs to be an enhancement - an option - and the simpler version still needs to exist. Ideally operators have sufficient data to inform equipment scale LPR. However, this data might rarely be available.
@c-vollrath Yes, the simplest approach would be to add up all the LPRs for all sites, add up all the equipments, and allocate accordingly. That doesn't take into account BMPs, equipment type, age, etc. etc. So, start simple...
Another way to do it would be to switch things around - rather than generate leaks AT each facility, generate leaks all together and then assign them to facilities and equipment and even components. If all of the leaks in your input distrubution have a facility type, equipment type, and component type associated with them, then this is easy. Otherwise, good luck!
I want to come back to this one as it is one of the more complicated options but definitely important... I think start easy as we have with other topics, perhaps by allocating using the first method you described Coleman...


Change seedu.address to dukecooks

Also made changes to Ingredients and editRecipeCommand and adapted test cases accordingly

Looks good to me! 👍


s3: ingester does not report listener config to gravwell tag, but does report global config

Fixed previously by https://github.com/gravwell/gravwell/pull/846


Automatically save cards and positions to browser local storage

This issue is an implementation detail rather than a goal, so closing out. I think the idea behind this is that card positions should be remembered which they are.
The discussion on localstorage use can happen over here: https://github.com/tableflip/posc/issues/8


Step 4: Merge your headers

Step 4: Merge your headers
I see you've added at least one header, @Pranav-Nadapana. You can continue working if you'd like, otherwise let's merge :book: this pull request and move on with the course.
:keyboard: Activity: Merge the Pull Request

Click Merge pull request below.

Watch below for my response!
Originally posted by @github-learning-lab[bot] in https://github.com/Pranav-Nadapana/markdown-portfolio/issues/2#issuecomment-1073754071

Pranav Naidu


⚠ Samsung has degraded performance

In 6f215e7, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2049 ms

Resolved: Samsung performance has improved in b997aec.


3 typos: "Essentials" instead of "Essential"

It is a common typo, but there should be Essentials instead of Essential - see the details on the website with the pricing: https://www.microsoft.com/en-us/dynamics-365/products/business-central/pricing or the licensing guide: https://www.microsoft.com/content/dam/microsoft/final/en-us/microsoft-brand/documents/Dynamics-365-Licensing-Guide-October-2024-375295.pdf.

Thanks for fixing this, much appreciated!


Updated readme

Added my name and GitHub Profile link.
What changes does this PR do?
added my name and GitHub profile link to readme

Given the length of time with no activity I will close. Feel free to raise a new Pull Request.


Review script for paper "2023ApJS..264...51L" made with predictor "DataLinkerCondenseDetailsWithTemplate"

Created by Paper Data Linking Bot
Please review the download script and instrument details for the paper.
bibcode: 2023ApJS..264...51L
predictor: DataLinkerCondenseDetailsWithTemplate

Script is more or less accurate, but the researchers did not directly use the LASCO data, they used the CDAW catalogue. There are several cases like this and I suppose they do not fit neatly into our VSO focus. I'm curious what the ideal script would look like in this scenario.


Offline Message from Maryann Martone: I notice we don't have the NeuroNames I...

This Github issue is synchronized with Zendesk:
Ticket ID: #23816
Group: Support
Requester<EMAIL_ADDRESS>Issue escalated by: SciCrunch
URL:
Original ticket description:

From: Maryann Martone<EMAIL_ADDRESS>Phone:
Location: La Jolla, United States
URL: https://scicrunch.org/scicrunch/interlex/view/ilx_0110082?searchTerm=nucleus
Department:
I notice we don't have the NeuroNames IDs in Neurolex.  They were all mapped, as far as I know.
----
Zopim
https://www.zopim.com

Closing as duplicate of #125. We don't want to add these because many were wrong


Is there a way to import the Settings.bundle without opening Xcode?

I'm using the following:
cordova-plugin-app-preferences: 0.7.4
Xcode: 7.1.1
iOS 9.1
Ionic: 1.7.10
Cordova: 5.4.0
I'm using the Ionic CLI to build the my project where after executing "ionic prepare ios" the Settings.bundle is created in platforms/ios.  At this point, I need to open Xcode and manually add the Settings.bundle to my project.  Otherwise, the Settings app on my iOS device will not display my app preferences that I've defined.  Is there a way to do this manual step via the command line so it can be automated?
I noticed that when I do the manual step above that project.pbxproj get modified.  Is there a way to do this via xcodebuild?

Not sure about ionic, but cordova adds Settings.bundle just fine to the xcode project file. Try latest version, I've smashed some nasty bugs.

Sometimes preference pane changes not reflected on app rebuild, like in #76. In that case you'll need to remove app from device and install it again.


remove fpc

We plan to move the FPC extension for FSC into the FPC repo. The corresponding issue https://github.com/hyperledger/fabric-private-chaincode/issues/784 keep track of the work.


how to send icp to an account

I want to send icp to account: 1586275a55430abba47862989da56f2c9ac31bc9f1c58739d6637a33714f307a
Here is my code:
var mne ='xxx';
var p = RosettaApi();
var key = fromMnemonicWithoutValidation(mne, []);
await p.init();
var pre = await p.transferPreCombine(
key.getPublicKey().toRaw(),
hex.HEX.decode(
'1586275a55430abba47862989da56f2c9ac31bc9f1c58739d6637a33714f307a'),
BigInt.from(90000),
BigInt.from(10000),
{});
var s = await transferCombine(key, pre);
var res = await p.transfer_post_combine(s);
print(res);
But when I run code above, I get some error. Could you please give me a code example, thanks.

In a day or two. Hang tight
2021年10月9日 +0800 PM4:00 xiao11lang @.***>，写道：

I want to send icp to account: 1586275a55430abba47862989da56f2c9ac31bc9f1c58739d6637a33714f307a
Here is my code:
var mne ='xxx';
var p = RosettaApi();
var key = fromMnemonicWithoutValidation(mne, []);
await p.init();
var pre = await p.transferPreCombine(
key.getPublicKey().toRaw(),
hex.HEX.decode(
'1586275a55430abba47862989da56f2c9ac31bc9f1c58739d6637a33714f307a'),
BigInt.from(90000),
BigInt.from(10000),
{});
var s = await transferCombine(key, pre);
var res = await p.transfer_post_combine(s);
print(res);
But when I run code above, I get some error. Could you please give me a code example, thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

In a day or two. Hang tight 2021年10月9日 +0800 PM4:00 xiao11lang @.***>，写道：
…
I want to send icp to account: 1586275a55430abba47862989da56f2c9ac31bc9f1c58739d6637a33714f307a Here is my code: var mne ='xxx'; var p = RosettaApi(); var key = fromMnemonicWithoutValidation(mne, []); await p.init(); var pre = await p.transferPreCombine( key.getPublicKey().toRaw(), hex.HEX.decode( '1586275a55430abba47862989da56f2c9ac31bc9f1c58739d6637a33714f307a'), BigInt.from(90000), BigInt.from(10000), {}); var s = await transferCombine(key, pre); var res = await p.transfer_post_combine(s); print(res); But when I run code above, I get some error. Could you please give me a code example, thanks. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Thanks for reply. I found that there may be errors in the source code.  When use transferCombine , I got a error. I think it may be the problem of the combine function.  The wrong statement is:
var update = unsignedTransaction["updates"][0];
Should it be :
var update = unsignedTransaction["updates"][0][1];
After I changed source code and send message, I got error: Cannot deserialize the submit request in CBOR format because of: invalid type: map, expected variant identifier. How do I solve this