Using pre-trained model in a way like TensorflowHub

I am wondering if we can use NiftyNet pre-trained model in a way like TensorflowHub,
such as the example from TensorflowHub :
with tf.Graph().as_default():
  module_url = "https://tfhub.dev/google/nnlm-en-dim128-with-normalization/1"
  embed = hub.Module(module_url)
  embeddings = embed(["A long sentence.", "single-word",
                      "http://example.com"])

  with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    sess.run(tf.tables_initializer())

    print(sess.run(embeddings))

I want to do transfer learning using the pre-trained model on my dataset, I think I can modify the config file to do what I want, but I am used to the tensorflowhub way. Thus asking this question.
So the question are :

Is it possible to do the above way now? If yes, I am thinking maybe I can add some example and issue pull request after I finish my work.
If not, is it possible in the future ?

Thank you!

Hi @johnnychhsu an example of transfer learning is presented here -- https://github.com/NifTK/NiftyNet/pull/140. It's still a work in progress, mainly we need a generic user interface (via config file) to handle these changes so that the user is able to specify which variables to be initialised from checkpoint files and the others from random initialisation. If you are also interested in this direction, we could collaborate on it.
Alternatively if you want to have full control of the graph, the code example attached could be a good starting point. A caveat is that the preprocessing layers (not included here) should exactly follow the ones used for training e.g. https://github.com/NifTK/NiftyNet/blob/v0.3.0/niftynet/application/segmentation_application.py#L178.
import tensorflow as tf
import os
from niftynet.io.image_reader import ImageReader
from niftynet.engine.sampler_resize import ResizeSampler
import numpy as np
os.environ["CUDA_VISIBLE_DEVICES"]='1'

##### Address of the model to be restored
check_point_location='/home/niftynet/models/dense_vnet_abdominal_ct/models/model.ckpt-3000'
#####

##### Create a sampler

data_param = {'image': {'path_to_search': '~/niftynet/data/dense_vnet_abdominal_ct',
                        'filename_contains': 'CT', 'spatial_window_size': (144, 144, 144)}}

reader = ImageReader().initialise(data_param)

sampler = ResizeSampler(
    reader=reader,
    data_param=data_param,
    batch_size=1,
    shuffle_buffer=True,
    queue_length=35)

#####

with tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=False)) as sess:

    sampler.run_threads(sess, tf.train.Coordinator(), num_threads=1)

    from niftynet.network.dense_vnet import DenseVNet
    data_dict = sampler.pop_batch_op()
    net_logits = DenseVNet(num_classes=9)(data_dict['image'])

    # restore the variables
    saver = tf.train.Saver()
    saver.restore(sess, check_point_location)

    net_logits = sess.run(net_logits)
    print(net_logits.shape)

Thank you! I would like to work on it, any suggestion ?
I think I can try this, thanks!

@wyli
Hi, I tried to modify the code attached, but got some problems.
import tensorflow as tf
import os
import pdb
from niftynet.io.image_reader import ImageReader
###
only sampler_resize_v2 exist in dev
###
from niftynet.engine.sampler_resize_v2 import ResizeSampler
import numpy as np
os.environ["CUDA_VISIBLE_DEVICES"]='3'

##### Address of the model to be restored
check_point_location='/home/niftynet/models/dense_vnet_abdominal_ct/models/model.ckpt-3000'
#####

##### Create a sampler
data_param = {'image': {'path_to_search': '~/niftynet/data/dense_vnet_abdominal_ct',
                        'filename_contains': 'CT', 'spatial_window_size': (144, 144, 144)}}

reader = ImageReader().initialise(data_param)

sampler = ResizeSampler(
    reader=reader,
    window_sizes=(144, 144, 144),
    batch_size=1,
    shuffle=True,
    queue_length=35)

#####

with tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=False)) as sess:
    sampler.run_threads(sess, tf.train.Coordinator(), num_threads=1)
    from niftynet.network.dense_vnet import DenseVNet
    data_dict = sampler.layer_op()
    # pdb.set_trace()
    input_data = tf.placeholder(tf.float32, shape=(None, 144, 144, 144, 1, 1))
    ###
    I think this should be defined by placeholder as a computation graph first, then feed the actual data
    into the model
    ###
    net_logits = DenseVNet(num_classes=9)(input_data)
    pdb.set_trace()

    # restore the variables
    saver = tf.train.Saver()
    saver.restore(sess, check_point_location)

    net_logits = sess.run(net_logits, feed_dict={input_data: data_dict['image']})
    print(net_logits.shape)

The sampler in branch is sampler_resize_v2. The input is tensor and feed into the graph when run sess.
However still got some error. The error is
Traceback (most recent call last):
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 518, in make_tensor_proto
    str_values = [compat.as_bytes(x) for x in proto_values]
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 518, in <listcomp>
    str_values = [compat.as_bytes(x) for x in proto_values]
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/util/compat.py", line 67, in as_bytes
    (bytes_or_text,))
TypeError: Expected binary or unicode string, got None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test_transfer.py", line 36, in <module>
    net_logits = DenseVNet(num_classes=9)(input_data)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/base_layer.py", line 34, in __call__
    return self._op(*args, **kwargs)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/ops/template.py", line 351, in __call__
    result = self._call_func(args, kwargs)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/ops/template.py", line 302, in _call_func
    result = self._func(*args, **kwargs)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/network/dense_vnet.py", line 195, in layer_op
    input_tensor = augment_layer(input_tensor)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/base_layer.py", line 34, in __call__
    return self._op(*args, **kwargs)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/ops/template.py", line 351, in __call__
    result = self._call_func(args, kwargs)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/ops/template.py", line 302, in _call_func
    result = self._func(*args, **kwargs)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/affine_augmentation.py", line 79, in layer_op
    batch_size, spatial_rank)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/affine_augmentation.py", line 56, in _random_transform
    output_corners = tf.tile([output_corners], [batch_size, 1, 1])
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/ops/gen_array_ops.py", line 5587, in tile
    "Tile", input=input, multiples=multiples, name=name)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 513, in _apply_op_helper
    raise err
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 510, in _apply_op_helper
    preferred_dtype=default_dtype)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1036, in internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/constant_op.py", line 235, in _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/constant_op.py", line 214, in constant
    value, dtype=dtype, shape=shape, verify_shape=verify_shape))
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/framework/tensor_util.py", line 522, in make_tensor_proto
    "supported type." % (type(values), values))
TypeError: Failed to convert object of type <class 'list'> to Tensor. Contents: [None, 1, 1]. Consider casting elements to a supported type.

originally defined at:
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/network/dense_vnet.py", line 194, in layer_op
    hyper['augmentation_scale'], 'LINEAR', 'ZERO')
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/affine_augmentation.py", line 35, in __init__
    Layer.__init__(self, name=name)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/base_layer.py", line 26, in __init__
    self._op = tf.make_template(name, self.layer_op, create_scope_now_=True)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/ops/template.py", line 152, in make_template
    **kwargs)

originally defined at:
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/network/dense_vnet.py", line 93, in __init__
    name=name)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/network/base_net.py", line 21, in __init__
    super(BaseNet, self).__init__(name=name)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/base_layer.py", line 58, in __init__
    super(TrainableLayer, self).__init__(name=name)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/niftynet/layer/base_layer.py", line 26, in __init__
    self._op = tf.make_template(name, self.layer_op, create_scope_now_=True)
  File "/home/dsa321123321/test/lib/python3.5/site-packages/tensorflow/python/ops/template.py", line 152, in make_template
    **kwargs)

Do you have any idea? Thank you!

Hi @johnnychhsu The problem in your code is the layer_op() call. The following works for me:
with tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=False)) as sess:
    from niftynet.network.dense_vnet import DenseVNet
    data_dict = sampler.pop_batch_op()
    net_logits = DenseVNet(num_classes=9)(data_dict['image'])
    saver = tf.train.Saver()
    saver.restore(sess, check_point_location)

    net_logits = sess.run(net_logits)
    print(net_logits.shape)

If you want to use placeholders, one possibility would be overriding the sampler's dataset initialisation (https://github.com/NifTK/NiftyNet/blob/dev/niftynet/engine/image_window_dataset.py#L207)
with something like tf.dataset.from_tensor_slices(placeholders).

@wyli  Thank you!
If I want to work on this, do you have any suggestion to start?

HI @wyli
I'd like to work on these steps by steps, I think I can start with the first one!
Thank you!

@johnnychhsu
I want to use niftynet pretrained segmentation model for segmenting custom data. I downloaded the pre trained weights and and modified model_dir path to downloaded one.
However when I run
python3 net_segment.py train -c /home/Container_data/config/promise12_demo_train_config.ini
I am getting the error below.
Caused by op 'save/Assign_17', defined at:     File "net_segment.py", line 8, in <module>       sys.exit(main())     File "/home/NiftyNet/niftynet/__init__.py", line 142, in main       app_driver.run(app_driver.app)     File "/home/NiftyNet/niftynet/engine/application_driver.py", line 197, in run       SESS_STARTED.send(application, iter_msg=None)     File "/usr/local/lib/python3.5/dist-packages/blinker/base.py", line 267, in send       for receiver in self.receivers_for(sender)]     File "/usr/local/lib/python3.5/dist-packages/blinker/base.py", line 267, in <listcomp>       for receiver in self.receivers_for(sender)]     File "/home/NiftyNet/niftynet/engine/handler_model.py", line 109, in restore_model       var_list=to_restore, save_relative_paths=True)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1102, in __init__       self.build()     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1114, in build       self._build(self._filename, build_save=True, build_restore=True)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 1151, in _build       build_save=build_save, build_restore=build_restore)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 795, in _build_internal       restore_sequentially, reshape)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 428, in _AddRestoreOps       assign_ops.append(saveable.restore(saveable_tensors, shapes))     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py", line 119, in restore       self.op.get_shape().is_fully_defined())     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/state_ops.py", line 221, in assign       validate_shape=validate_shape)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/gen_state_ops.py", line 61, in assign       use_locking=use_locking, name=name)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper       op_def=op_def)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/deprecation.py", line 488, in new_func       return func(*args, **kwargs)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3274, in create_op       op_def=op_def)     File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 1770, in __init__       self._traceback = tf_stack.extract_stack()   InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:   Assign requires shapes of both tensors to match. lhs shape= [3,3,61,256] rhs shape= [3,3,3,61,9]            [[node save/Assign_17 (defined at /home/NiftyNet/niftynet/engine/handler_model.py:109)  = Assign[T=DT_FLOAT, _class=["loc:@DenseVNet/conv/conv_/w"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](DenseVNet/conv/conv_/w, save/RestoreV2/_35)

Your custom data doesn't seem to be the same dimension as the data the network was trained on.
Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error: Assign requires shapes of both tensors to match. lhs shape= [3,3,61,256] rhs shape= [3,3,3,61,9]
Without knowing more about what you're trying to do, we can't help you. I would suggest following these steps before requesting additional help however.

@johnnychhsu were you able to use placeholders with niftynet pipeline? I'm unable to restore the model when using a placeholder, please let me know you fixed this issue.
Thank you

@wyli is it possible to train a network in a similar method of tf Sessions?


docs: improve documentations

Deliverables:

[x] Add detailed concepts about recipes, making them easier to be created.
[x] Document metadata models
[x] Feature matrix for extractors
[x] look through references and find improvements.

should rename docs/data models to docs/metadata_models?
models alone without metadata can also mean meteor models such as recipe, processors, etc.
wdyt?

@ravisuhag having this feature matrix will require contributors to always make sure it is updated. Also whenever there are model changes we need to keep track of it as well here.
It's nice to have it but was just wondering if the maintenance outweighs the benefits. 🤔

@StewartJingga We will maintain it by versions. we can specify the version in docs. But having this will allow contributors and users to easily understand what is present.

@StewartJingga @GrayFlash To address update concerns, I have added comments in proto file of models. which can be used to generate docs for those models and we can link to them. For the feature matrix maybe we can have only a high-level facet name instead of each attribute to give clarity and more info can be linked to the readme of each extractor. Thoughts?

@ravisuhag It seems fine for me we can do that and I have actually not added all the attributes and just written facet names actually in the feature matrix. For e.g. used Timestamp and not last_updated or last_edited attribute.
Btw any issue around the metadata model's readme or other updates I made.

For the feature matrix maybe we can have only a high-level facet name instead of each attribute to give clarity and more > info can be linked to the readme of each extractor.

Yeah showing only facets should be pretty descriptive of the model and would be easier to maintain.


fix bug list naming

fix the issue with space in list item 2022-09-01 07:26:45,849 WARNING Cannot fetch bugs from a different project (current project: OCPBUGS): [' 1996013', '2096508', '2097724', '2101092', '2101794', '2104669', '2105584', '2105592']

/lgtm


feat: iOS 13 Card-style Modal Presentation

Feature Request
Ionic version:

[x] 4.x
Describe the Feature Request

Add the iOS 13 Modal UI and gesture. It should go over the content, shrinking the content behind it, and optionally be swiped down to close.
Describe Preferred Solution

I can't wait for that!! 👏

Is this feature already available?

Not yet. It will be available in an upcoming release of Ionic Framework.

Not yet. It will be available in an upcoming release of Ionic Framework.

Can't wait for it :D !!!!

@brandyscarney  I was able to test on Ionic 5 Beta and it is working perfectly. Will this be released only on Ionic 5 or will we still have version 4? Thanks

This will be released as part of Ionic 5 only.


Does<EMAIL_ADDRESS>includes a breaking change ?

Before (3.52.0) t.exposeID('id')
Typescript says that expose (ID, string, etc..) methods NEEDs a second parameter, even empty.
After (3.56.0) t.exposeID('id', {})
Was it planned, or is it just a misconfiguration on my side ?

This is not intentional, I'll try to figure out what's going on with that

should be fixed now


Unable to navigate away from drawer screens

Current Behavior
Drawer item headers seem unconfigurable.
I set the navigationOptions on a drawer item like so:
  static navigationOptions = ({ navigation }) => ({
    title: 'Terms & Conditions',
    headerLeft: () => navigation.dispatch(NavigationActions.back()),

Then when I click on that drawer item, I am unable to navigate away and have to reset the app to get out. No title appears and nothing resembling a header appears.
Expected Behavior
I click on the drawer item, it opens the screen for that item and the navigationOptions work as I would expect on the screen of a StackNavigator.
Your Environment

software
version

react-navigation
1.0.0-beta.9

react-native
0.44.0

node
7.10.0

npm or yarn
yarn 0.23.4

Screens

As an aside, does anyone have an up-to-date example of a drawer working with Redux? I have got mine working, but I am not sure if it's correct and I'm mostly thinking in terms of React-Native-Router-Flux and trying to make React-Navigation's work in a similar way.
Thanks

Hi! In an effort to reduce the number of open issues I'm closing issues that haven't had any activity in a while.
If you think this should be re-opened please let me know or, if you can, re-open it.
If this is a question please consider asking it on StackOverflow (react-navigation)
Thanks!

Hi! In an effort to get the hundreds of issues on this repo under control I'm closing issues tagged as questions. Please don't take this personally - it's simply something we need to do to get the issues to a manageable point. If you still have a question I encourage you to re-read the docs, ask on StackOverflow, or ask on the #react-navigation Reactiflux channel. Thank you!


[vulkan] Build error

Host Environment

OS: [e.g. Windows/Linux etc...]
Compiler: revision

To Reproduce
Steps to reproduce the behavior:
./vcpkg install xxxx
Failure logs
-Cut and paste the appropriate build messages from the console output.
-Please attach any additional failure logs mentioned in the console output.
Additional context
Add any other context about the problem here, such as what you have already tried to resolve the issue.

Can you please provide the failure logs which mentioned in the output first?
Thanks.

We don't have enough information to solve this issue, unfortunately; if you have any more information to help us solve this, please reopen!


Inheritance support for Classes and Protocols

The Cuckoo generator can create Mocks and stubs for parents and grandparents methods, instance variables, and all other types that are mockable.
Implementation:

First step is detecting inheritance types on the SourceKit returned type SourceKitRepresentable
When creating the FileRepresentation array I've added a step that merges FileRepresentations
The result of the merge is that all resolved Inherited types (when available in given input files) are flattened on the FileRepresentation.
The merge checks for potential collisions on methods/types/etc.

Result:
Mock implementations have all of its own and (grand)parents methods and variables mocked and stubbed.
This assures that there will never be conflicts in parent or grandparent mocks while still being able to mock all methods/variables available.

@nxtstep Hey! Thanks for this PR, it's really nice! I wrote a few comments on lines I'd like to change before we merge it. Other than that, great job!


Changed sideNav to use translateX instead of left/right property for optimized animations

Following discussion in issue #2250

+1

+1

I took a look at this and there were problems with the dragging and swipe events on mobile.
I implemented a fix here df0c80fbd6c7f42e5d597464ce6962fbb8e3dfea


React component: Infinite loop if peaks option is specified

Bug description
Hi, great work with the react component. However, I am running into a problem. When I define the option “peaks” I get an infinite loop with the in the console the message “Warning: Maximum update depth exceeded...”.
I did not see an option in the @wavesurfer/react to open an issue. I also saw a similar pull request for a similar issue with a different option. However, I don't see how this is also the case for the peaks option.
When specifying the peaks data, the waveform does just generate correctly. But thus with an infinite render loop.
Environment

Browser: Chromium (because the use of Electron)

Minimal code snippet
import { useRef } from "react"
import { useWavesurfer } from "@wavesurfer/react"

const About = () => {
    const containerRef = useRef(null)

    const { wavesurfer, isReady, isPlaying, currentTime } = useWavesurfer({
        container: containerRef,
        waveColor: "purple",
        height: 100,
    })

    async function loadFile() {
        if (wavesurfer) {
            const filePath = "resources/test.wav"
            const audioBuffer = await window.api.loadMediaFile(filePath)
            wavesurfer.loadBlob(new Blob([audioBuffer]))
        }
    }

    const onPlayPause = () => {
        wavesurfer && wavesurfer.playPause()
    }

    return (
        <>
            <div ref={containerRef} />

            <button onClick={onPlayPause}>{isPlaying ? "Pause" : "Play"}</button>
            <button onClick={() => loadFile()}>Open file</button>
        </>
    )
}

export default About

Expected result
The react component loaded without a infinite loop.
Obtained result
A infinite loop.
Screenshots

To add something; i can workaround it by using memo:
const peaks = useMemo(() => [peakData.data], [peakData]); // Memoize the peaks array

    const { wavesurfer, isReady, isPlaying, currentTime } = useWavesurfer({
        container: containerRef,
        waveColor: "purple",
        height: 100,
    })


No difference when using consistencydecoder in  diffusers

Here is my code, however, there seems no difference between  gan_vae and cosistency_vae. What's wrong?
import torch
from diffusers import StableDiffusionPipeline, ConsistencyDecoderVAE
vae = ConsistencyDecoderVAE.from_pretrained("openai/consistency-decoder", torch_dtype=torch.float16)
pipe_gan = StableDiffusionPipeline.from_pretrained(     "runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16 ).to("cuda")
pipe_consistency = StableDiffusionPipeline.from_pretrained(     "runwayml/stable-diffusion-v1-5", vae=vae, torch_dtype=torch.float16).to("cuda")
image_gan = pipe_gan("a girl hold flower", generator=torch.manual_seed(0)).images[0]
image_consistency = pipe_consistency("a girl hold flower", generator=torch.manual_seed(0)).images[0]

The output images in your example are actually slightly different. Checking how many entries match between the two tensors:
import torchvision.transforms as transforms

transform = transforms.Compose([
    transforms.PILToTensor()
])

equals = transform(image_gan) == transform(image_consistency)
equals.sum() / torch.numel(equals)

returns
tensor(0.1281)


Deleting an application command.

How would I go about removing the commands I have created?
One of the examples has a flag called rmcmd, but it is not used for anything.

Sorry I found the function. Closing! :)

What did you find? Thanks!


Not implemented chain_id function.

The ERC20 workspace in Remix is failing to compile.
How to reproduce:

Got to https://smiasojed.github.io/remix-project
Select ERC20 workspace
Compile

results:
Contract `contracts/MyToken.sol:MyToken` compiling error: thread 'main' panicked at /home/runner/work/revive/revive/crates/llvm-context/src/polkavm/evm/context.rs:46:5:
not yet implemented
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

eip: https://eips.ethereum.org/EIPS/eip-1344

Can you rebase against latest main where it will always return a chain id of 0 instead of panicking? I snuck it in recently. We still have to agree on those.

With new version I got panic:
Contract contracts/MyToken.sol:MyToken compiling error: thread 'main' panicked at /Users/smiasojed/Development/revive/crates/llvm-context/src/polkavm/context/pointer.rs:65:9:\nassertion left != right failed: Stack pointers cannot be addressed\n  left: Stack\n right: Stack\n

Can you provide me the contents of MyToken.sol? I don't see the ERC20 workspace you mentioned originally

Also any libraries, assuming it uses OZ

Nevermind. It is caused by the immutables, which are still a WIP.

Can you provide me the contents of MyToken.sol? I don't see the ERC20 workspace you mentioned originally

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import<EMAIL_ADDRESS>import<EMAIL_ADDRESS>
contract MyToken is ERC20, ERC20Permit {
    constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}
}

I planned to add it to the pallet as configuration. Eventually we'll have to settle on the ChainID for every chain we deploy, including testnets. So having it in the configuration seems reasonable to me.

One obvious idea would be to use the parachain id. But it is not unique across relay chains. So maybe something like keccak(relay_chain_id ++ parachain_id). But no matter what we pick: Exposing it as Config` item is the way to go as it has to be configured by the runtime.

Yeah, we might want to add them here too.

Yes I was wondering how if numbers are coordinated. So basically just pick a unique one and get a PR merged. No hashing required :)


Fix for #3783 - TTL parameter for PUT /api/v1/keys/{name}

This is a fix for #3783 where the TTL parameter for PUT /api/v1/keys/{name} was missing.
I added the parameter to st2common/st2common/openapi.yaml.j2 and updated the main definition using make .generate-api-spec.
Is there a way, in the future, to auto-generate st2common/st2common/openapi.yaml.j2 or does this need to be updated manually?

Thanks.
As you have figured out in #3788, without auto-generation stuff it's a bit of a losing battle (can / will get out of date and broken), but we can still merge it.

Not sure why the Travis build failed, doesn't look like anything related to my change... seems like a RabbitMQ failure?
Thoughts?

Yeah, looks like a temporary issue.


Install Apple Certificate fails with TempKeychainSetupFailed

Environment
VSTS.
Instance: Office
Project: Outlook Mobile
Build Definition: iOS - Pull Requests
Build Number: 621542
Agent: All (hosted and private). Various versions of macOS High Sierra.
Issue Description
The installation randomly fails. There seems to be no pattern.
Error logs
2018-04-26T23:44:16.9996310Z ##[section]Starting: Install an Apple certificate
2018-04-26T23:44:17.0285220Z ==============================================================================
2018-04-26T23:44:17.0298980Z Task         : Install Apple Certificate
2018-04-26T23:44:17.0312800Z Description  : Install an Apple certificate required to build on a macOS agent
2018-04-26T23:44:17.0326460Z Version      : 1.131.0
2018-04-26T23:44:17.0340100Z Author       : Microsoft Corporation
2018-04-26T23:44:17.0353800Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=862067)
2018-04-26T23:44:17.0367760Z ==============================================================================
2018-04-26T23:44:17.9102870Z [command]/usr/bin/openssl pkcs12 -in /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/[snipped].p12 -nokeys -passin pass: | /usr/bin/openssl x509 -noout -fingerprint
2018-04-26T23:44:17.9125420Z MAC verified OK
2018-04-26T23:44:17.9153270Z SHA1 Fingerprint=BD:98:22:7F:F7:9D:64:90:16:D3:8B:1D:D3:75:D7:C2:0B:CA:65:3D
2018-04-26T23:44:17.9523880Z [command]/usr/bin/openssl pkcs12 -in /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/[snipped].p12 -nokeys -passin pass: | /usr/bin/openssl x509 -noout -subject
2018-04-26T23:44:17.9544940Z MAC verified OK
2018-04-26T23:44:17.9572310Z subject= /UID=[snipped]/CN=[snipped]/OU=[snipped]/O=Microsoft Corporation/C=US
2018-04-26T23:44:18.0115040Z [command]/usr/bin/security create-keychain -p 0.ux2q0cyg2cx8dtmn8y2l6jemi /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/ios_signing_temp.keychain
2018-04-26T23:44:18.0456960Z [command]/usr/bin/security set-keychain-settings -lut 7200 /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/ios_signing_temp.keychain
2018-04-26T23:44:18.0714290Z [command]/usr/bin/security unlock-keychain -p 0.ux2q0cyg2cx8dtmn8y2l6jemi /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/ios_signing_temp.keychain
2018-04-26T23:44:18.1091480Z [command]/usr/bin/security import /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/[snipped].p12 -P  -A -t cert -f pkcs12 -k /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/ios_signing_temp.keychain
2018-04-26T23:44:18.1121620Z 1 identity imported.
2018-04-26T23:44:18.1361120Z [command]/usr/bin/security list-keychain -d user
2018-04-26T23:44:18.1388110Z     "/Users/olmbuilds/Library/Keychains/login.keychain-db"
2018-04-26T23:44:18.1715480Z [command]/usr/bin/security list-keychain -d user -s /Users/olmbuilds/vsts_agents/vsts_agent_1/_work/_temp/ios_signing_temp.keychain /Users/olmbuilds/Library/Keychains/login.keychain-db
2018-04-26T23:44:18.1945030Z [command]/usr/bin/security list-keychain -d user
2018-04-26T23:44:18.1964790Z     "/Users/olmbuilds/vsts_agents/vsts_agent_2/_work/_temp/ios_signing_temp.keychain"
2018-04-26T23:44:18.1983360Z     "/Users/olmbuilds/Library/Keychains/login.keychain-db"
2018-04-26T23:44:18.2112310Z ##[warning]Can\'t find loc string for key: TempKeychainSetupFailed
2018-04-26T23:44:18.2183390Z ##[error]TempKeychainSetupFailed
2018-04-26T23:44:18.3038770Z ##[section]Finishing: Install an Apple certificate

I've enabled debug logs, but now we just have to wait for it to happen again (and someone to let me know).
Also, just so you know, we run multiple agents on each machine. Could this affect things?

Looks like both agents queried the keychain search list (security list-keychain -d user) and set the keychain search list (security list-keychain -d user -s ...) at the same time. Unfortunately there isn't a security command to add a keychain to the search path.
I will check if there's some form of ipc mutex we can use from Node to solve this. For a self hosted mac, one workaround may be to use the default keychain. However you may get some keychain access prompts until the latest changes to the 5.* task propagate to vsts production.

Ah, I didn't even notice that there definitely were 2 there. Nice catch.
Is it possible to get around it by generating a unique keychain each time the task is run? Creating a keychain adds it to the search list automatically, so this should be enough I would have thought?

I can't seem to catch this one, and no one on my team has mentioned seeing it since, however, I've got no reason to believe that it's not still occurring.

Closing this issue to clean up the backlog. Reopen this if the issue presents itself again.

This does still happen. It happens regularly, I just can't get it to happen with debug logging turned on (and I can't leave it on or our users won't understand most of their build logs).

I managed to see this happening several times in a row today and it's reproducible. I'm running 3 different phases on the same machine, just with different agents. This happens every time when that happens. 1 of the 3 succeeds, the other 2 fail.
Here's the kicker: It only happens when system.debug is set to false.
Here are the logs again:
2018-11-05T12:55:54.1358530Z [command]/usr/bin/openssl pkcs12 -in /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/OLM-Dev-Cert.p12 -nokeys -passin pass: | /usr/bin/openssl x509 -noout -fingerprint
2018-11-05T12:55:54.1505070Z MAC verified OK
2018-11-05T12:55:54.1616970Z SHA1 Fingerprint=[snipped]
2018-11-05T12:55:54.1652770Z [command]/usr/bin/openssl pkcs12 -in /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/OLM-Dev-Cert.p12 -nokeys -passin pass: | /usr/bin/openssl x509 -noout -subject
2018-11-05T12:55:54.1726060Z MAC verified OK
2018-11-05T12:55:54.1853280Z subject= /UID=Z4KJ6W4D67/CN=iPhone Developer: [snipped]/OU=[snipped]/O=Microsoft Corporation/C=US
2018-11-05T12:55:54.1942870Z [command]/usr/bin/security create-keychain -p 0.t200wlofuktjrc326u9n6d2t9 /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/ios_signing_temp.keychain
2018-11-05T12:55:54.2397110Z [command]/usr/bin/security set-keychain-settings -lut 7200 /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/ios_signing_temp.keychain
2018-11-05T12:55:54.2772960Z [command]/usr/bin/security unlock-keychain -p 0.t200wlofuktjrc326u9n6d2t9 /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/ios_signing_temp.keychain
2018-11-05T12:55:54.3102430Z [command]/usr/bin/security import /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/OLM-Dev-Cert.p12 -P  -A -t cert -f pkcs12 -k /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/ios_signing_temp.keychain
2018-11-05T12:55:54.4146110Z 2 identities imported.
2018-11-05T12:55:54.4180540Z [command]/usr/bin/security list-keychain -d user
2018-11-05T12:55:54.4405750Z     "/Users/olmbuilds/Library/Keychains/login.keychain-db"
2018-11-05T12:55:54.4434000Z [command]/usr/bin/security list-keychain -d user -s /Users/olmbuilds/vsts_agents/vsts_agent_3/_work/_temp/ios_signing_temp.keychain /Users/olmbuilds/Library/Keychains/login.keychain-db
2018-11-05T12:55:54.4686890Z [command]/usr/bin/security list-keychain -d user
2018-11-05T12:55:54.4908930Z     "/Users/olmbuilds/vsts_agents/vsts_agent_2/_work/_temp/ios_signing_temp.keychain"
2018-11-05T12:55:54.4909810Z     "/Users/olmbuilds/Library/Keychains/login.keychain-db"
2018-11-05T12:55:54.5124880Z ##[warning]Can\'t find loc string for key: TempKeychainSetupFailed
2018-11-05T12:55:54.5136260Z ##[error]TempKeychainSetupFailed

This is clearly a race condition that occurs when this task runs more than once at a time on the same machine.
The fix is somewhat simple: Instead of creating a keychain named ios_siogning_temp.keychain create one with a unique name and add it to the search path. This allows multiple to be used on the same machine with no race condition. This is exactly how keyper does it.
@joshmgross Please re-open.

@joshmgross Please re-open.

Re-opening at request of users

@dalemyers We have no plans to fix this issue. Making the temp keychain name random may reduce the chances of a race condition, but it's not sufficient. There is no append path so the task has to read the existing path and then set the path. To completely avoid a race condition we would have to either lock across processes (something we want to avoid in the task library) or add retries.
This is not an issue for Microsoft-hosted agents, and customers using self-hosted agents have alternatives:

Use the default keychain, or a custom keychain that's already in the search path.
Add the certificates to your machine / VM image prior to the build.

It is unfortunate that the append command doesn't exist. However, looking at the logs, it doesn't appear that the issue is a race condition with the append command. It seems that the issue is that the two key chains are clobbering each other. Making those unique would correct this. The issue with the race condition would still be there, but it's much less likely to be hit.

@dalemyers My team doesn't plan to fix this issue, but you can contribute this change if you like. If you do pursue the change, please try to keep the PR small (there may be other things you're tempted to fix once you start dealing with our unit tests), and test your change by uploading it to your Azure DevOps organization and running test builds. Example:
# Build and unit test
export TASK_TEST_TRACE="1"
node make.js build --task InstallAppleCertificateV2 && node make.js test --task InstallAppleCertificateV2 && node make.js test --node 5 --task InstallAppleCertificateV2

# Upload to an Azure DevOps org for end-to-end testing
tfx logout
tfx login -u https://chrisid-tasks.visualstudio.com/DefaultCollection -t h2du6...
node make.js build --task InstallAppleCertificateV2 && tfx build tasks delete --task-id d2eff759-736d-4b7b-8554-7ba0960d49d6 && tfx build tasks upload --overwrite --task-path _build/Tasks/InstallAppleCertificateV2

I'm not a node.js dev, so I wouldn't even know where to start with this.
This continues to be an issue though unfortunately. It's pretty disappointing that this won't be fixed considering that it's an issue which affects real world scenarios that are absolutely supported by ADO.


Inet layer unit test error verify and fix

Inet layer has  faulty tests and asserts

Inet layer tests fixed  and all tests passed.
Changes commited to test-unittests branch


[WIP?] Bring data reliability up to standard

This branch is for the things needed to improve data reliability, but testing thus far indicates pretty good results, so right now it just includes some build script shuffling.

This compiled and allowed later branches to work in repl, so :+1: ?

I totally expected this branch to be data reliability, and then it wasn't.  I'll probably merge this (Despite WIP) and then make a new branch when we hammer on it from that angle.


Create FileReadableStream class to stream large files for d&d uploads and add progress notification

This PR fixes #83565

@steven166 great work both on this PR and the previos one. I plan to review this after a meeting today.
Would you maybe be interested in tackling this one as well? I planned to look into this next week and if you are interested we can look into it together. Let me know what you think. https://github.com/microsoft/vscode/issues/93599
Thanks!

@steven166 thanks for bringing this back so quickly, can we keep the streams support but leave out notifications for now? I think the progress reporting via the progress bar in the explorer is OK for now. We can always revisit that later, but I think notifications are a bit too much for my taste when it comes to uploading. There are other more lightweight ways to report progress, e.g. in the status bar too.

@isidorn yeah sure, I can help with that one.
@bpasero I've disabled the notification part for now. I think it can be a long running operation (like minutes) where the user is waiting for, so that is why I choose for a notification. But I'm not sure when to use a notification or the status bar.

@steven166 I think I found a much simpler solution by leveraging the file.stream property. Instead of doing this all on our own, we can simply get a stream from the file object. As such, the upload method would just be this:
private async doUploadWebFileEntry(entry: IWebkitDataTransferItemEntry, parentResource: URI, target: ExplorerItem | undefined): Promise<{ isFile: boolean, resource: URI } | undefined> {
	if (!entry.name || !entry.isFile && !entry.isDirectory) {
		return undefined;
	}

	const resource = joinPath(parentResource, entry.name);

	// Confirm overwrite as needed
	if (target && target.getChild(entry.name)) {
		const { confirmed } = await this.dialogService.confirm(getFileOverwriteConfirm(resource.path));
		if (!confirmed) {
			return undefined;
		}
	}

	// Handle file upload
	if (entry.isFile) {
		const writeableStream = newWriteableBufferStream();

		// Read the file in chunks using File.stream() web APIs
		(async () => {
			try {
				const file = await new Promise<File>((resolve, reject) => entry.file(resolve, reject));
				const reader: ReadableStreamDefaultReader<Uint8Array> = file.stream().getReader();

				let res = await reader.read();
				while (!res.done) {
					writeableStream.write(VSBuffer.wrap(res.value));

					res = await reader.read();
				}
				writeableStream.end(res.value ? VSBuffer.wrap(res.value) : undefined);
			} catch (error) {
				writeableStream.end(error);
			}
		})();

		await this.fileService.writeFile(resource, writeableStream);
		return { isFile: true, resource };
	}

	// Handle folder upload
	else {

		// Create target folder
		await this.fileService.createFolder(resource);

		// Recursive upload files in this directory
		const folderTarget = target && target.getChild(entry.name) || undefined;
		const dirReader = entry.createReader();
		const childEntries = await new Promise<IWebkitDataTransferItemEntry[]>((resolve, reject) => {
			dirReader.readEntries(resolve, reject);
		});

		for (let childEntry of childEntries) {
			await this.doUploadWebFileEntry(childEntry, resource, folderTarget);
		}

		return { isFile: false, resource };
	}
}

Seems to work great, except for Safari where file.stream seems undefined.

I landed this as https://github.com/microsoft/vscode/commit/203508d5ead067dd8a4060856f7bff2bd32ddb35 with some minimal progress. Thanks for this PR that made me look into the file.stream API, but I prefer that approach.


Update provisioning profiles to use app groups

It works for letting the app and the extension use the same
nsuserdefaults
You'll need to use these new provisioning profiles. Cuz I regenerated the profiles and changed the names.

LGTM!


[move] Remove Move IR type inference #9040 -(139-4)

[move] Remove Move IR type inference #9040
Motivation
Simplify the Move IR language and compiler by eliminating the need to keep track of the types of expressions.
For the most part, this requires no change to the language, except for one aspect: when struct fields are borrowed, the user must now explicitly specify which struct type is being accessed. This is because, for example, a simple field identifier f may refer to different fields in any number of different structs S1, S2, etc.
What's in this pull request?
The file count is large because this includes test changes -- the *.mvir files. You can look at them to see what the new field access syntax in Move IR looks like: s.S::f, where s is a struct instance, S is its type, and f is the name of the field being accessed.
The rest of the changes, in the *.rs files are almost exclusively just deleting the InferredType enum.
Test Plan
CI/CD Tests are covered

[diem-framework] Port ValidatorConfig and ValidatorOperatorConfig to unit tests #9131
Motivation
Port ValidatorConfig and ValidatorOperatorConfig to unit tests - Ported testing for the ValidatorConfig and ValidatorOperatorConfig tests to be unit tests.
Test Plan

CI/CD tests are covered
cargo test --package diem-framework --tests

[decoupled-execution] buffer manager execution phase logic #9126
Motivation

[decoupled-execution] buffer manager execution phase logic
This PR deals with
refactor buffer items.
execution phase logic.
remove the buffer diagram as the current design is extremely simple.

Test Plan

CI/CD tests are covered
cargo test --package consensus --lib -- experimental::tests::execution_phase_tests --nocapture

[State Sync] Add a new EventSubscriptionService and tests #9117
Motivation
This PR adds a new on-chain event subscription service to state sync (EventSubscriptionService). Using this service, other components can subscribe to on-chain events and be notified about on-chain reconfigurations. This service differs from the existing on-chain publishing (already provided by state sync) in the following ways:

The service will support arbitrary event subscriptions (not just reconfiguration events!). This is required by future work streams (e.g., the on-chain networking identity work).
The service will not require reconfiguration subscribers to subscribe to individual on-chain configurations, but instead receive all configs when a reconfiguration event occurs. This is because: (i) subscribing to individual configs only adds code complexity, but doesn't provide any tangible benefits (e.g., performance or resource usage). Reconfigurations are fairly infrequent and subscribers tend to just pull out the data they want anyway; (ii) there are actually bugs in our code today where subscribers subscribe to individual configs, but on reconfiguration notifications, access configs they didn't subscribe to (!!). This is because the code already returns all configurations to subscribers anyway; and (iii) there doesn't currently appear to be any requirements for this functionality. If we wish to have this functionality, we can always extend this service to provide it in the future.
The service will better encapsulate the relationships between subscribers and notifications, and not leak implementation details and abstractions. Moreover, the service will be better tested! Right now, there's minimal testing for the on-chain publishing support.
Notes:

Half of this PR is just unit tests (so it hopefully shouldn't be that scary! 😄)
This PR is comprised of two commits: (i) the new service itself; (ii) unit tests.
Test Plan

CI/CD tests are covered
cargo test --package event-notifications --lib -- tests::test_all_configs_returned --exact --nocapture

/canary

/land

:broken_heart: Test Failed - ci-test


Fix a bug in experiments/run_redock.py: 'FlexPepDock' object has no attribute 'amber_relax'

Thank you for sharing the code, and quick response to my email.
A no attribution exception occurs when I run the following script:
python experiments/run_redock.py --in_path tests/inference --ori_path examples/receptor_data --interface_analyzer_path your/path/to/rosetta/main/source/bin/rosetta_scripts.static.linuxgccrelease
After checking the related code in the latest version of analysis/redock.py, I thought there is a typo in the variable name in this line of code, i.e. self.amber_relax --> self.soft_relax
https://github.com/YuzheWangPKU/DiffPepBuilder/blob/62dfd6b1eea2a8445236af9e8ebaa98d3f519bea/analysis/redock.py#L134
The captured exception is as following:

Thank you for catching that typo and for your contribution. I've merged your pull request into the main repository.


TP2000-272: Remove numbering from steps in the create measures wizard

TP2000-272: Remove numbering from steps in the create measures wizard
Why

See ticket

What

Removes the form numbering from the wizard step template

Checklist

Requires migrations? No
Requires dependency updates? No

Codecov Report

Merging #546 (af55efa) into master (0f2ff16) will decrease coverage by 0.03%.
The diff coverage is 96.95%.

@@            Coverage Diff             @@
##           master     #546      +/-   ##
==========================================
- Coverage   92.74%   92.70%   -0.04%
==========================================
  Files         306      316      +10
  Lines       19066    19535     +469
  Branches     1526     1571      +45
==========================================
+ Hits        17682    18110     +428
- Misses       1107     1129      +22
- Partials      277      296      +19

Impacted Files
Coverage Δ

common/models/transactions.py
87.75% <ø> (+2.93%)
:arrow_up:

settings/common.py
75.83% <40.00%> (-1.41%)
:arrow_down:

workbaskets/models.py
85.55% <75.00%> (-1.26%)
:arrow_down:

workbaskets/tasks.py
86.36% <76.92%> (-13.64%)
:arrow_down:

checks/models.py
93.54% <93.54%> (ø)

checks/tests/test_checkers.py
94.44% <94.44%> (ø)

checks/tasks.py
97.10% <97.10%> (ø)

checks/checks.py
97.50% <97.50%> (ø)

checks/tests/factories.py
97.82% <97.82%> (ø)

checks/querysets.py
100.00% <100.00%> (ø)

... and 29 more

Continue to review full report at Codecov.

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


Product style

Looks great.   Some of the pictures may need to be resized in their containers.
This is ready for a merge.


New totp every time?

I'm trying to create a time based one time password in node that is new every single time generate is called... (secret is the same every time from env file)... I need the verify window to be 5 mins...
The problem i am having is that I get duplicates. I assume this is because step = 30 by default and only a new totp will be generated every 30 seconds?  I tried to set it to 0, that didn't work. I tried 1 and i do get a new key everyone one second but if I call it more times than once a second i get duplicates.  I thought epoch(Date.now()) would solve this issue but it does not.
Can you please tell me on how to get a new totp every single generate but still have it valid for 5 mins on verify?

I think what you are trying to achieve is against time based one time passwords. Secret should be UNIQUE per USER. So same secret will generate same password everytime during its step(time in seconds). You can get 5 minutes by multiplying 60seconds by  5, so have step: 300, this means that generated password will be valid for 5 minutes and during that 5 minutes its secret will generate the same password.

@digitalml Did you ever find a solution for this? I am trying this package in my E2E tests and if I require login in my tests, some of my tests fail because same token is being re-used which gives error "token expired"

I think @suruaku  made a good point here.
I tried to use it as suggested and works fine
thanks

I think what you are trying to achieve is against time based one time password's rules. Secret should be UNIQUE for every USER. So same secret will generate same password everytime during its step(time in seconds). You can get 5 minutes by multiplying 60seconds by 5, so have step: 300, this means that generated password will be valid for 5 minutes and during that 5 minutes its secret will generate the same password.

@suruaku
This may be a very basic question, but how are tokens unique per user? How can otplib decide who is a unique user that's making the request vs who's the same user making requests on repeat?

@juanGoesElectric If by token you mean secret, then it's up to you. One way is for example to use some kind of unique option depending on your database (MongoDB example). The same way you ensure unique email for every user.


Create a Navbar component

[ ] Create a Navbar component in the atoms folder.
[ ] It should receive a navbarLinks props array that contains a label and href for each item.
[ ] It should match the UIX design

suny men alyan

i will take this


Playground Feature: Multiple contracts per account for Flipfest issue 21

Description
This PR is for Flipfest issue 21.

[x] frontend: project default loading with multiple contracts per account
[x] frontend: contracts can be added, edited, deployed and deleted
[x] backend: support the above interactions

Check out the demo video
To-dos and known-issues

[x] export project folder
[x] remove comments starting with '//soe'
[x] fix Cadence code check for transactions as contract declarations are not detected - fixed now
[x] write test coverage

initial coverage
more coverage

[x] code documentation

Submission Links & Documents
Backend: flow-playground-api has been forked and work is done on flip-21 branch
Run datastore emulator first
  gcloud beta emulators datastore start

Then run the server
  make run-datastore

Frontend: flow-playground has been forked and work is done on flip-21 branch
  npm install
  npm run start

hello @MaxStalker and code owners,
I have made a few more commits. I would appreciate your reviews and will made necessary changes quickly.
For your reference, I have made documentation here:
https://laser-teal-a79.notion.site/Notes-for-changes-Flipfest-21-b2c49263e87a4551b57826070fe566a6
For quick reference, I have made a screen recording:
https://youtu.be/Wji5UD6HXZE
If you need quick response, I am available on Discord: soe#4875

@janezpodhostnik @soetop Would this one be helpful?
https://github.com/onflow/flow-playground-api/blob/master/migrate/migrate.go
There is also a test file next to it :thinking:

Oh wow! Sorry, didn't know about that. I guess that answers that question. Let's use that! It looks like this goes together with the first option.
Thank you for pointing that out @MaxStalker.

thanks @janezpodhostnik and @MaxStalker for your reviews.
I am looking into migration now. I will take your suggested approach no. 1 leveraging current migration flow.
May I know how version are determined for the code base?
For this migration, I am thinking like this:

upon a project load

check if there is a separate Contract struct

if not then get contracts info from Account struct
migrate each account's contract into separate Contract struct.

Regarding to-do in comments, I noted using "//soe to-do" prefix. There are 3 of them which I will address them in the coming commit. There are "// TO-DO" comments which have been there before.

hello @janezpodhostnik @MaxStalker
here is my early PoC for migration which works for my limited testing. i would like to share with you for your feedback.
version v0.8.0 is used temporarily to denote the version that has multiple contracts feature.
migration happens upon the load of project.

hi @MaxStalker and @janezpodhostnik
what is timeline for next step/release like?
i am thinking of adding "multiple/variable accounts" feature in this PR as well.
this feature might need to refactor AccountIndex to AccountAddress in Contract struct as accounts would be added/deleted and account indices would change along.
if the timeline permits and if you think it is a good idea then, i will start looking into it.

hi @MaxStalker and @janezpodhostnik
what is timeline for next step/release like? i am thinking of adding "multiple/variable accounts" feature in this PR as well.
this feature might need to refactor AccountIndex to AccountAddress in Contract struct as accounts would be added/deleted and account indices would change along.
if the timeline permits and if you think it is a good idea then, i will start looking into it.

Hey @soetop , there isn't a scheduled release schedule for the playground feature, so yes there is still time for you to continue here 😄
Do the suggestions from Janez make sense to you?

@soetop is the "multiple/variable accounts" part of this "multiple contract" feature? I would recommend to solve the multiple contract problem first, so that you can finish it and make code review scope smaller. what do you think?

Hey @soetop , hope everything is going on well on your end. Do the previous suggestions make sense to you? let us know!

Is this PR still active and/or relevant?

Is this PR still active and/or relevant?

It's a feature we would like to eventually implement, but maybe in another way now :shrug:
There was no work for 4 months on it and apparently original author forfeit any work on it, so we can probably close it.


Condensed syntax for (f anything anything anything) => anything :never

My instincts say this goes against the internal representation of all of Midje's source code, however I think a condensed syntax for verifying a function was never called in any way shape or form would be nice.
Instead of:
(fact "if there are no due reminders, never sends any emails out"
  (run-reminders [...recipients...]) => nil
  (provided
    (load-due-reminders anything) => []
    (send-reminder-email anything anything) => anything :never))

It might be something like:
(fact "if there are no due reminders, never sends any emails out"
  (run-reminders [...recipients...]) => nil
  (provided
    (load-due-reminders anything) => []
    (send-reminder-email ...)  :never))

Exact syntax is open to injection of alternate opinions etc.
I'm willing to look into this, if the feature makes sense.

I'm late in the game on this, but what about some syntax like this:
(provided
(send-reminder-email) =never=> anything)
That raises the possibility of this:
(provided
(send-reminder-email) =never=> 5)
I wouldn't be too eager to implement a check that send-reminder-email might have produced values but not the particular value 5.
There really needs to be a way to say "any number of arguments that can have any values". I'm not wild about "..." because it looks so much like a metaconstant (and I think I may have even used it as such in some test somewhere), but I haven't got a better idea. "&anything"?
On Oct 20, 2011, at 5:36 PM, AlexBaranosky wrote:

My instincts say this goes against the internal representation of all of Midje's source code, however I think a condensed syntax for verifying a function was never called in any way shape or form would be nice.
Instead of:
(fact "if there are no due reminders, never sends any emails out"
 (run-reminders [...recipients...]) => nil
 (provided
   (load-due-reminders anything) => []
   (send-reminder-email anything anything) => anything :never))

It might be something like:
(fact "if there are no due reminders, never sends any emails out"
 (run-reminders [...recipients...]) => nil
 (provided
   (load-due-reminders anything) => []
   (send-reminder-email ...)  :never))

Exact syntax is open to
--
Reply to this email directly or view it on GitHub:
https://github.com/marick/Midje/issues/56

Brian Marick, Artisanal Labrador
Now working at http://path11.com
Contract programming in Ruby and Clojure
Occasional consulting on Agile

I'm flexible on what the exact syntax should be.  I can see how "..." would be a confusing syntax to use.  Though it does feel awfully natural to type.
Given:
(defn f [g h i k]
)

I think the core feature like you say is to have a concise way to say function f is called with any number of args and returns anything.
If we used a syntax like (f ~~~) :times 2 for that, then we could just expand that out to (f anything anything anything anything) => anything at the appropriate point in the macro transformation and voila.  All we'd need to do is reflect on the meta data for f to find the number of args it takes.
However, what do we do for vararg functions?
On another note a partial K.I.S.S. solution to this could be a simple alias of any for anything.
Then you get (f any any any any) => any :never  which is starting to look a lot more concise...  If we had the any alias it might be acceptable to have a syntax of (f ~~~) => any :never
Food for thought, say we have this function:
(defn bar [a b &more]

would it be cool to have a syntax to say "this function was called with between 3-4 args that are any value, and it returns anything"?  If we want something like this, what might its syntax look like, and how would it overlap with the above "any # of args" syntax?

Working on the any alias now.

I would find this feature useful, especially w/ support for vararg functions. I'm currently trying to fake a function that takes one required argument, and 5 keyword arguments. Calling 'anything' 11 times is not pleasant.

I suggest this syntax for "never"
(fact ...
   (provided
      foo => never-called))

The issue of &rest arguments is a different one, I think. I'll make a separate issue for it.

Yes.  Let's do something like this.  I need to spend some time solidifying my thoughts on the "best" way to do it though.

Adopting a policy of "if it hasn't happened by now, it will either happen in 2.0 or never", I'm closing this


fix: Filter out sub-directory paths

Description

Filter out sub-directory paths

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

:tada: This PR is included in version 1.2.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add support for target templates

Hi again! I work on a project called REFramework and my colleague expressed interest in converting it's build files over to cmkr after seeing me use it on a few of my personal projects.
While going through the process of converting the build files over to cmake.toml I realized I was duplicating a lot of stuff for each target. The way the project is structured generates individual builds for each game the project supports with only minor differences between each target. Having a "template" of what each target looks like would decrease the amount of duplicated toml, and so I added it.
Here's what it looks like (example):
# A project using templates.

[project]
name = "templates"
description = "Template example"

[template.app]
type = "executable"
sources = ["src/templates.cpp"]
compile-definitions = ["IS_APP=true"]

[target.app-a]
template = "app"
compile-definitions = ["APP_A"]

[target.app-b]
template = "app"
compile-definitions = ["APP_B"]

For a more complex example check out cmake.toml from REFramework (WIP).

Hi,
Thanks for your contribution! This actually has been something I’ve been wanting to implement for a while so thanks!
I’ll review the code a bit better tomorrow, but from your example it looks like you may actually want to use an interface target and link to that, it wouldn’t require a template.

Could you push your cmake.toml files for your project so I can take a look?

Could you push your cmake.toml files for your project so I can take a look?

The link @ the bottom of my post should have gone to it (I did it on a personal fork since it's very a very work-in-progress change). Here it is again just in case: https://github.com/cursey/REFramework/blob/cmkr/cmake.toml

but from your example it looks like you may actually want to use an interface target and link to that, it wouldn’t require a template.

I think you're right about this (not very familiar with interface targets outside of header-only libraries). I'm not sure there is much need for this PR in that case unless there is some other use case I'm missing.

My bad, I didn’t see your link 🤦♂ With regards to the interface, I think this is a documentation issue. I’ll keep this in mind when writing the missing page about the terms used in cmake/cmkr.
I will take a look at all my cmkr projects again, I’m pretty sure there is a use but it involves cmake-after. From what I remember I wanted to do this to declare a “pintool” or “driver” or “qt” target type because those all use some custom cmake scripts that do magic things to the target.

I think I've found another use for templates. Target properties do not seem to apply through interface targets.

I fixed the CI in the main branch, if you rebase on that we can see if the checks pass.

I've tried to implement the changes you requested. I've also included a test that builds a driver using FindWdk.cmake and templates. Let me know what you think.

Thanks! I will review it properly when I have some more time 🙂

Thanks a lot for your contribution!
Locally I created a bit more exhaustive test (cmkr_template_test.zip if you're interested), added error handling and fixed some minor bugs. I also removed the driver example for now because there isn't a way to integrate it nicely and I added the templates test so that the documentation is generated. Probably I will do a full-fledged driver example in the build-cpp organization later.

I released v0.2.6


Make rarena_allocator::unsync::Arena and rarena_allocator::sync::Arena have the same memory layout

Make rarena_allocator::unsync::Arena and rarena_allocator::sync::Arena have the same memory layout, which means sync version Arena can read the file originally written by unsync Arena, and visa-vise.

unsync version SegmentNode on i686 architecture is 4, making this issue more complex.


Stable Diffusion 2 and *.safetensor *.ckpt simple converter

Work on My Intel ARC 750 8GB
7.2it/sec
Super Thanks!
How can i use Stable Diffusion 2  to openvino format?

Hi, we haven't added support for SD2.1 yet. But you can checkout this notebook for SD2.1 model conversion to openvino format - https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/236-stable-diffusion-v2/236-stable-diffusion-v2-text-to-image.ipynb

Thnaks. How can i convert finetuned model to OpenVino format?

how to add more item to this list?

like dreamlike-art/dreamlike-photoreal-2.0
and many other

Where i can change width and height?
i want 768 x 768 \ 768 x 576 \ 1024 x 576

In order to add more models to the list, you will need to modify the code. Once you have openvino version of the models, you can search for all the occurrences of "SD_1.5" in the code base and follow similar method to add custom models (based on 1.4 or 1.5)
Regarding the model dreamlike-art/dreamlike-photoreal-2.0, I believe you can only use it free on  https://dreamlike.art/.
Currently we have only added support for SD-1.4 and SD-1.5 both of which are trained on 512x512 images and produces 512x512 images.

I converted dreamlike-art/dreamlike-photoreal-2.0 - ant it work!!!!
Today i converted more 10 models from https://huggingface.co/models?pipeline_tag=text-to-image&sort=downloads

at Intel ARC 750 speed - 7.26 it/sec!!!!
More than RTX 3060

Thanks for the update @TotalDay -- so you were able to integrate those models into your local running version of ov-stable-diffusion GIMP plugin?

Thanks for the update @TotalDay -- so you were able to integrate those models into your local running version of ov-stable-diffusion GIMP plugin?

yes, all models from hugginface.co work
i am using converter in the Jupiter Notebook (local)


reserve 22 as ttHOOK_SET

We'd like to reserve 22 as SetHook transaction type. This tt will eventually allow configurable behaviour on accounts for send and receive events.

I'm not concerned about burning one ID (number 153) out of 64,000. :laughing:
Hooks is an interesting idea. I think the scope will be paramount. Too big, and you end up with Solidity¹; too small, and you need to keep growing it with more features later. Sometimes having a bunch of specialized tools is useful, sometimes it's too complex and having one all-purpose tool is better.
¹ Solidity is cool, but bugs in smart contracts are a big problem (even the DAO couldn't get their right on the first try, and most of us don't have the option of hardforking the network if we screw up) and the more complexity, the more opportunity for bugs. Also, the more logic and state data you store on-ledger, the harder your scaling problems become.

I am giving a Passed label as this is trivial.


Add code coverage metrics abstraction and python specifics

Description
This PR starts towards detecting code coverage metrics through coverage.py report data which is sometimes included in the root of a repository. Generally I think we need better "coverage" for other languages but this was something I thought we could include because the repository itself can include this type of code coverage. As part of this work I've added code coverage to the project itself to help comply with the metric gathering process.
As a next step, I think scraping or leveraging a public API for Codecov could be a way to rapidly expand how code coverage is detected within the repositories.
References #162
What is the nature of your change?

[ ] Content additions or updates (adds or updates content)
[ ] Bug fix (fixes an issue).
[x] Enhancement (adds functionality).
[ ] Breaking change (these changes would cause existing functionality to not work as expected).

Checklist
Please ensure that all boxes are checked before indicating that this pull request is ready for review.

[x] I have read the CONTRIBUTING.md guidelines.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own contributions.
[x] I have commented my content, particularly in hard-to-understand areas.
[x] I have made corresponding changes to related documentation (outside of book content).
[x] My changes generate no new warnings.
[x] New and existing tests pass locally with my changes.
[x] I have added tests that prove my additions are effective or that my feature works.
[x] I have deleted all non-relevant text in this pull request template.

Thanks @gwaybio for the review on this! After making a few changes based on your comments I will now merge this in.


Add XRTpy as a PyHC project

This PR is to add XRTpy (repo) as a PyHC project.  It also adds "hinode" to the taxonomy.
This PR is of interest to @joyvelasquez & @jslavin.

@namurphy can we mark this as "ready for review"? I'd love to get XRTpy involved with the PyHC community (and get them on a telecon!).

@joyvelasquez — does the information about XRTpy in this PR look good to you?

Yes!
Looks great, thanks Nick!

Thank you for the reviews, and happy to have XRTpy officially join!


remove Mongoid dependencies.

The app does not depend on Mongoid for now, which should be removed.

The mongoid.yml will affect nothing, keep it in project is feasible


[Loc] small update to loc

This PR fixes #

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.03%) to 42.313%

Files with Coverage Reduction
New Missed Lines
%

extensions/sql-database-projects/src/dialogs/publishDatabaseDialog.ts
2
52.04%

Totals

Change from base Build<PHONE_NUMBER>:
-0.03%

Covered Lines:
29355

Relevant Lines:
64538

💛  - Coveralls


Support for "not null going forward", for expand-contract schema+data migration patterns

Problem
Prisma recommends the "expand-contract" pattern for schema & data migrations (which I agree with and think is great):
https://www.prisma.io/dataguide/types/relational/expand-and-contract-pattern
I use this pattern all the time, and the most common case of it for me is adding a new column that I want to eventually set to NOT NULL, but I can't at first, because a bunch of existing data still needs to be migrated to it. (And assuming that a simple backfill in a single SQL statement isn't possible, as it often isn't for non-trivial data.)
In my Prisma schema, I only have two options: fully NOT NULL (via no ? modifier on the field) to require this column on both new data going forward and existing data in the DB (since it adds an explicit NOT NULL constraint in the DB), or fully nullable (via ? modifier), which allows both existing data to omit this column as well as new data going forward.
Suggested solution
I'd love some way to be able to specify that a field may be null on reads — but must not be null on writes.
Specifically, no NOT NULL constraint should be added to the DB, but the client library (generated code) can and should require the field to be explicitly provided and not null on at least creates, and maybe also updates.
Strawman examples of how this might look:
name String? @required // to require it on all writes going forward, both creates and updates

// or:

name String? @required(creates: true, updates: false) // optional args to control when it's required

Alternatives
The only alternative I'm aware of is the only option today: no automatic enforcement. Application code has to take care to ensure it's writing this column going forward on all code paths.
Additional context
I feel like this'd be a shining example of the power of (a) generated code from Prisma's powerful custom schema language and (b) Prisma's strongly typed (TypeScript) client library! And I'd find it extremely convenient.
Thanks for your consideration.

Any update on this? I have a similar use case.
I have an optional column which I want to be NOT NULL for all future CRUD operations. I have migrated all "active" rows and decided to leave all "legacy" rows as null. I have added a DB check constraint manually that ensures any create / update operations on rows created after a certain date have this optional row set but I'd like the Prisma client to enforce this not null constraint. Is it possible? Maybe using Prisma client extensions?


create appendChain to switch between Chains

how can I change from ChatVectorDBQAChain to ConversationChain in langchainjs?
It would be great to have something like  AppendChain contruct that allows to add multiple chains. e.g.
const qaChain = new ChatVectorDBQAChain({
    vectorstore,
    combineDocumentsChain: docChain,
    questionGeneratorChain: questionGen,
    returnSourceDocuments: false,
    k: 1,
  }

  const convChain = new ConversationChain({
      llm: model,
      outputKey: "text",
    });

//The idea here is that if the response of the chain has a string of "Can't find in the documents..."
// then  it will continue with the conversationalChain

const finalChain = new AppendChain([
  {chain: qaChain, passThroughCondition: "Can't find" },
  {chain: convChain, passthrough condition: "" },
], defaultChain: qaChain)

Is there a different approach to solving this requirement that is already available?

I was looking for the same thing. Maybe you're referring to QA_PROMPT :)
I fixed the prompt instead, telling it If you can't find the answer, say "I don't have the right data, but from my knowledge" and continue to provide an answer based on your training data

@pax-k Can't get it to answer outside of the embeddings even if I change the QA_PROMPT. Did you do any other changes?


[WIP] services/ticker: scrape asset data (#1080)

Refs #1080  (Create a function that scrapes stellar.toml data and stores the relevant assets in the db, so we'll later know which market data should be ingested).

All good from me! :ok_hand:


Test remote read client

Signed-off-by: YaoZengzeng<EMAIL_ADDRESS>

It is the test case for SAMPLED remote read client.
Also it laid a solid foundation for testing STREAM remote read client.
@bwplotka PTAL
ref #5926

Can we close this one then?

Yes, this PR will be closed.


The future of casing rules

I just wanted to spin this off of the discussion that @weirdpattern and I were having on #183.
Currently eslint core has the camelcase rule, which enforces variable and (optionally) property names are written in camelCase or PascalCase.
The problem is that camelcase doesn't differentiate between camelCase and PascalCase (https://github.com/eslint/eslint/issues/10473), and rightfully so because there are different use cases which need different casing (i.e. classes and functional components use PascalCase, variables use camelCase).
This relaxed rule leads to invalid naming patterns that lint okay:
const Pascal = "loophole";
class camel {
  PascalField = "I'm not stage 4 yet";
}

To help address this, within this plugin, we have:

class-name-casing which only allows PascalCase for classes AND interfaces.
member-naming which uses regex on specific modifiers (only private atm).
generic-type-naming which uses regex.
interface-name-prefix which just allows or blocks I at the start of interface names.
camelcase (via #183) which adds support for class properties and interface properties on top of the base implementation.

This is obviously a bit of a mess because the naming is inconsistent, and the configuration styles are inconsistent.
The question is, what should our direction be going forward?
(note for below: when I say casing, I mean camelCase / PascalCase / snake_case. When I say case, I mean interface / var / class / property / type / etc).

one rule per case with a standard base config (i.e. enforce casing), and its own individual options (i.e. interface naming to (dis)allow starting with I, (dis)allow class property names starting with _).
one mega rule for name casing, with config for each code case, and then individual rules for the special cases (the individual options above).

This would probably be for a future (2.0?) release, as 1.0.0 is already rather loaded with the dependency upgrades.
Tagging collaborators for visibility
@macklinu, @j-f1, @weirdpattern

I think the multiple smaller rule style is a good idea, although I’d suggest:

variable/property/method (I think the addition of class properties should e contributed to eslint-plugin-babel and we should recommend people use that instead)
type (e.g. type Foo = Bar)
interface
namespace/module (ignoring quoted modules e.g. module "foo" {}) (this could be skipped if it’s rarely used)
class (should we contribute this to ESLint core instead?)

I’m wondering if we should collaborate with eslint-plugin-flowtype (cc @gajus since you’re the maintainer of that project) to make an ESLint plugin for features that are common to both Flow and TS.

my only issue with pushing class properties to a different plugin is that then our users have to also install the plugin to get the coverage.
Telling a typescript user (who doesn't need babel) to use eslint-plugin-babel for a rule would be confusing.
(looking at that plugin, it doesn't need babel, it's just a reimplementation of the rules based off the AST provided by babel-eslint, so there's probably no reason a typescript user who doesn't use babel couldn't use it, assuming it's compatible with typescript-eslint-parser's AST).
Creating a shared library to use between us and eslint-plugin-flowtype would be nice, though that does rely on typescript-eslint-parser keeping the AST we interact with / care about the same. Also depends on if the use cases are the same.
It seems like we're diverging from eslint-core here, so it's hard to say what we should push upstream.
Considering they already have camelcase, would they want extra rule(s) that do similar things to camelcase?
Looking through their rules, the only thing I can see they have for naming other than camelcase is new-cap.
Just to clarify - the idea here would be to essentially tell our users to disable camelcase, and instead use our suite of naming rules.

disabling camelcase shouldn't be a problem once we have a typescript:recommended preset (which is a whole different topic being discussed in a separate bug...), but yeah, I think we shouldn't force our users to install another plugin just to deal with a single case... I like the idea of the shared library though (and if I remember correctly it was discussed at some point... not sure what happened)


The request was aborted: Could not create SSL/TLS secure channel.

I started to get these recently ... i think shortly after updating to latest version ...
What is strange that this is not a consistent behavior, it happens only about 1/3 of the time...
Any inside would be appreciated ...
[WebException: The request was aborted: Could not create SSL/TLS secure channel.]
System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +8286956
System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) +98
[HttpRequestException: An error occurred while sending the request.]
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
DropboxRestAPI.Utils.d__0.MoveNext() +1152
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
DropboxRestAPI.d__c`1.MoveNext() +805
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +144
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +84
DropboxRestAPI.Services.Core.d__1e.MoveNext() +916

Did Windows Update on Server, and seem to resolve the problem... strange thing that this behavior wasn't consistent.


Improve Webhook Router logging.

This PR closes #614. Sprinkles a lot more logging through the router so that if something goes wrong we get better insights into where it went wrong beyond just the exception.

/check-enforcer evaluate


lanenet.postprocess() taking too much time

Hi, I was trying to run your code and after analyzing the model inference and post-processing time, I found out that the DBSCAN clustering part is taking too much time. My system has NVIDIA GTX 1650 ti (4 GB). The model inference time comes around 12-15 ms per sample whereas the clustering part takes 300-400 ms per sample. Is there any faster way to post-process it so that it can be used in real-time? Also, the actual research paper mentions that they have used a mean-shift approach to cluster the lanes.

@SHANK885 You may test mean-shift method yourself. One solution to reduce cluster time cost is to reduce sample counts which used for clustering. For real time application, you'd better use tensorrt or other inference accelerate engine and cpp cluster method:)

@MaybeShewill-CV thanks for the suggestions. Any idea how we can remove the sample counts which is used for clustering?

@SHANK885 try random sample:)

Thanks


copy alias to clipboard & show message

Closes #186
However, I feel now that the success message should be trimmed a bit. This is the final form:
> Success! Alias created (vHtl3AcStIRuwvBVc6FgrKeB): https://inferno-starter.now.sh now points to https://inferno-starter-firbedifww.now.sh (sm6u8PxiD0C2khzyBOXK1RC4) [copied to clipboard]

Perhaps either (1) a new line after Alias created ${chalk.dim((${uid}))}:  or (2) trim the meta data:
# 1
> Success! Alias created (vHtl3AcStIRuwvBVc6FgrKeB):
https://inferno-starter.now.sh now points to https://inferno-starter-firbedifww.now.sh (sm6u8PxiD0C2khzyBOXK1RC4) [copied to clipboard]

# 2
> Success! Alias created: https://inferno-starter.now.sh now points to https://inferno-starter-firbedifww.now.sh [copied to clipboard]

Thanks! 🙏  I'm for the first solution.


notebooks are read only

When I open notebooks I can run them, but they can't write to disk and display a "read-only" icon in the right hand corner of the notebook.
https://beta.mybinder.org/v2/gh/erdc-cm/oxford2017/master

This has been a problem that pops up periodically. I wonder if it's a Python 2 issue. @cekees can you try this out with a python 3 environment or does your code depend on python 2?

My guess is it's the USER when the COPY command runs not being the same as the builder. We need to do some verification that $HOME files have the right permissions in the builders.

Is this resolved now with newer additions to binderhub / jupyterhub?

@choldgraf What's the URL of the current beta instance of Binder?
I can drop the link: https://github.com/erdc-cm/oxford2017.git into it and test.

https://beta.mybinder.org

Thanks @willingc, I checked again and the situation seems the same. I can open new python 2 or 3 notebooks and save them, but the notebooks in the binder can't be saved or copied. I don't have any notebooks in that binder that are Python3 so I can't check that easily @choldgraf.

I think that @minrk 's comment is probably correct...I bet that permissions aren't correct for the notebooks.
@cekees can you edit your Dockerfile per these instructions below and say if this cleans up your problem?
https://mybinder.readthedocs.io/en/latest/dockerfile.html#preparing-your-dockerfile


New open source packages

A Laravel Nova card to display world clocks
https://github.com/naifalshaye/worldclock
A Laravel Nova tool that integrates with Cpanel Mail to manage Email Addresses
https://github.com/naifalshaye/nova-cpanel-mail
A php laravel package to manage cPanel email accounts
https://github.com/naifalshaye/php-cpanel-email
A Laravel Nova field to play a SoundCloud audio
https://github.com/naifalshaye/soundcloud
A Nova field to place a marker on the map to get coordinates then it reverses geocoding the coordinates to get a street address
https://github.com/naifalshaye/nova-map-address
Nova address field that autocompletes the user input to show suggested addresses using Google Place service.
https://github.com/naifalshaye/nova-address-autocomplete
A Laravel Nova password field with generating random password option
https://github.com/naifalshaye/nova-random-password-generation
A Laravel Nova text field with a custom icon
https://github.com/naifalshaye/nova-text-field-with-icon
A Laravel Nova card to display PayPal current balance and latest transactions.
https://github.com/naifalshaye/nova-paypal
Saudi national ID number validation field for Laravel Nova, just for the frontend it will not prevent from submitting the form.
https://github.com/naifalshaye/nova-saudi-id-number-validation
Nova card that displays the latest user timeline and mentions tweets
https://github.com/naifalshaye/nova-twitter-timeline
A Laravel Nova toggle switch field
https://github.com/naifalshaye/toggle-switch

Thanks for contributing, added the new repos to the list


Memory  exhausted when queueing "a lot" of emails

First, thanks for the wonderful extension! I have been using without issue till now:
For a certain case I tried to queue 1500 emails,  but the script exploded around the 500 emails.
Email is no complex, the generated .eml when using fileTransport is 20kb.
Making some db optimizations so all the data is grabbed in one query I was able to make it queue around 700 emails.
After other tests, it seems that the issue is on Yii::$app->mailer->queue().
Any ideas on this?
Thanks!

@glpzzz the issue is at $item->save() in queue() function, which makes a database call each time it's called. So, for 700 mails it makes 700 database calls. You can solve this by doing a bulk insert. Serialize the messages first and insert them later.
$queueModel = new Queue;
Yii::$app->db->createCommand()->batchInsert(Queue::tableName(), $queueModel->attributes(), $rows)->execute();

Don't forget to send a PR if you add a new function to do bulk insert. :)

No promising but I'll try to implement the bulk insert. Thanks on the suggestion!

@nterms any idea on how to call this bulk insert? I'm thinking in something like Yii::$app->mailqueue->bulkQueue($messages) and then execute your suggested code.
Your suggestion worked for us. There where so many emails that it exploded anyway, but because of https://github.com/yiisoft/yii2/issues/6472 TL;DR
$connection = \Yii::$app->db;
$connection->enableLogging = false;
$connection->enableProfiling = false;

before doing the batchInsert. With that all good.
The other thing was to do several batchInsert instead of just one. The base64_encode(serialize($message)) increases the size of the row that MySQL complains for the packet size or PHP because of memory.
In our case is a corner case, so making some manual adjustments to the code it's not a big issue.


Add discussion of params.json and defaults to indicator manual

Indicator manual
This section should discuss:

the local and ansible/production templates
params sections
standard params that MUST be supported
optional standard params
how to choose defaults

defaults MUST allow production runs to be run every day without updating the params file

We also need to actually design a standard for params.json so that the indicators work more similarly.

Patch params section should probably always include a flag turning the patching functionality on/off.

Also want to add validation for the read_params() function; currently the function just json.loads from the file


Intersection speedup and refactor

Mainly better sotrage for map of pairs to states,
and a number of other things.

I have few minor suggestions for small speed ups.  It would be good to go through it again after deadlines and try to make it little bit more readable, as it is sometimes heavy.
Also, I'm wondering if we should keep the old version and maybe have some portfolio intersection method deciding wrt e.g. the size of the input automata, since I have a feeling this will work for big automata, but might be worse for smaller ones (since there are lot of vectors, vector of vectors etc.). Experiments will tell.

Ok lets see, but I actually don't believe that it can be slower, the vectors should be all much cheaper to allocate then the deltas of the input automata, so it should cost relatively nothing.
Lets bother with it only if we see something bad in the experiment.

I uncommenting that assert in uitils.cc in integration-tests but Mmaybe it should no bet failing.
Could you look at it, @tfiedor ? I made an issue.

Lets merge this, no?

Lets merge this, no?

You are done?

@kilohsakul Can the branch be removed? We are trying to keep the number of branches to a minimum in order to keep the repository clean and uncluttered.


LUCENE-9935: Enable bulk-merge for term vectors with index sort

This change enables bulk-merge for term vectors with index sort. The algorithm used here is similar to the one that is used to merge stored fields.
Relates #134

@jpountz Thanks for reviews. It's ready again.

@jpountz Thank you :)


Relaxed dependencies

I confirmed that indexed-extras compiles with more recent packages.

Sorry for not responding to this. I've now merged #3 which among other things includes updated dependencies.


Feature: Implement Queuing / batching functionality on frontend for all the bulk operations happening via application groups

🔖 Feature description
As of now we have below operations happening in bulk via application groups, this feature request is to enable queuing for all Bulk Operations.
i) Build & Deploy ✅ (queuing enabled)
ii) Hibernate & Unhibernate ❌ (queuing disabled)
iii) Restart Workloads ✅ (queuing enabled)
iv) Branch Change ❌ (queuing disabled)
🎤 Pitch / Usecases
My simple use case is to change branch in bulk but the operation fails intermittently probably because there is no queuing functionality on frontend side or backend side.
🔄 Alternative
NA
👀 Have you spent some time to check if this issue has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

AB#9808

This is done.
We now have batching in Frontend for all operation in Application group.
We have a configMap in dashboard to modify the batchSize.
configMap :
API_BATCH_SIZE : "<integer_value>"


[PLUGIN REQUEST] Strapi Plugin: Graphs Builder

Name
strapi-plugin-graphs-builder
Link
https://github.com/surgeharb/strapi-plugin-graphs-builder
Status
Ready
Author
@surgeharb

I just added to the list! As your plugin is ready to use, I close the issue :) Thanks again for this request ❤


Pebble needs to support reactive programming

With the new focus on reactive from Spring 5 and Spring Boot 2, Pebble is now at a disatvantage. Any newcomer to Spring that wants to try the reactive support will be forced to use Freemarker or Thymeleaf.

Suggestion: change the issue title to "Support for Spring 5 WebFlux reactive in Spring Boot 2 autoconfiguration".

We could very well close this issue, as it will probably never be implemented.

Why not though? This is a vital feature for those who use non blocking web frameworks.

Any help would be appreciated on this one

I've just added basic support for Spring 5 WebFlux reactive in Spring Boot 2. It's gonna be available in next release


Fix venv requirement setup

Using the shell script fails setting up the venv correctly - requirements are not installed.

fixed here


BasemapGallery

As a user... I want to be able to select a basemap from a list and apply it to my map or scene.
Min-ship (High Priority):

Either a gridview or listview of basemaps. This can be platform specific
each item will show the name and thumbnail. Default thumbnail will be shown if nothing is available (some TPKs might not have)
Without any configuration, should support displaying a number of the most common basemaps in a gallery view
Works with API Keys
when user selects a basemap, the current map or scene's basemap will be switched to the selected basemap (works in 2D & 3D) -- Note - 3D does not support vector basemaps at the moment

Nice-to-haves (moderate priority):

if user is signed into portal, they should see their org's configured basemap list instead of our default
user can optionally create their own list of basemaps (local or online) in code, and display those in the list

Here is the JavaScript widget for BasemapGallery - https://developers.arcgis.com/javascript/latest/sample-code/widgets-basemapgallery/

Addressed by #375


Imposing Boundary Conditions to Raviart-Thomas Spaces

Hi,
is it possible to directly impose the boundary condition ( sigma . n) = g, for sigma an vector field from an RT space and and n the normal?
Thanks,
Andreas

Isn't this just inhomogeneous Dirichlet boundary condition as in Example 4?

Hm, right, I somehow overlooked this, thanks.


Add ACK operators to Community Operators (OperatorHub.io and Openshift OperatorHub)

Is your feature request related to a problem?
A description of what the problem is. For example: I'm frustrated when [...]
It would be great to add to the ACK automation pipelines the ability to publish the ACK operators to the Community Operator repositories.
Describe the solution you'd like
A description of what you want to happen.
The initial publication will require opening PRs in 2 different repositories, one for OperatorHub.io, the other for the embedded OperatorHub that's present in Openshift 4 (details on these here: https://k8s-operatorhub.github.io/community-operators/contributing-where-to/)
I believe there will need to be 1 PR per operator as well (2 PRs per operator if contributing to both repositories), given how the documentation lays out the current process.
The full details on contributing with all requirements are at this link under the "Contributing" headline: https://k8s-operatorhub.github.io/community-operators/contributing-prerequisites/
Before publication:

we will need to merge the AdoptedResource reconciler changes in aws-controllers-k8s/runtime#59
we should also probably wait until we get Openshift installation documentation merged aws-controllers-k8s/community#1039

Describe alternatives you've considered
A description of any alternative solutions or features you've considered.

The above automation PR will create separate issues for each service controller whenever there is missing olmconfig.yaml or ci.yaml or when automatic olm bundle generation fails.
Closing this parent issue.


No KeyCode mapping for caret?

I didn't find the caret (^) mapping in the keycodes, but on some inputs it is missing. Did I miss something or is there some ground for a new KeyCode to be supported?

KeyCode is correspond to the physical key.
If you want to input ^, you should replace this line:
https://github.com/tekezo/Files/blob/master/Karabiner/private.estonian_backtick/private.xml#L27
with
KeyCode::KEY_6, ModifierFlag::SHIFT_L,

(shift+6 == ^ in U.S. input source.)

Excellent! It works like a charm @tekezo my Estonian mappings are now complete with ain/.dotfiles@0e42c0826ea62ba8b4465f1eaa40763856a536e0
Thanks again for your prompt and very valuable support!


Add pleiades-download reflectance data example

Add pleiades reflectance download data example using catalog search_UP-5271
https://up42.atlassian.net/browse/UP-5271
Items:

[ ] Ran test & live-tests
[ ] Implemented (new) unit tests
[ ] Removed credentials
[ ] Removed argument pointing to staging
[ ] Updated documentation

For release:

[ ] Bumped version
[ ] Added changelog
[ ] Updated announcement banner

docs


docs: correct links to product documentation

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[ ] Make sure to open an issue as a bug/issue before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[ ] Ensure the tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@sushantsikka Thank you for the fix!


error connection

when trying to connect to wallet "error connection"
chrome extension is working
Ubuntu 18.04
Wallet-gui-master compiled

fixed in