Secrets are leaked in error messages

When you get an error message, it might be that the conda-key is leaked.
✔ conda-forge/osx-arm6 [00:00:08] Done
✔ conda-forge/noarch   [00:00:08] Done
✔ get/custom-channel/osx- [00:00:08] Done
❌ get/custom-channel/noar [00:00:07] 404 not found                                                                                Error:   × Failed to resolve dependencies error sending request for url (https://<custom-host>/t/<this-gets-leaked>/get/custom-channel
  │ /noarch/repodata.json.bz2): error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or
  │ not known
  ├─▶ error sending request for url (https://<custom-host>/t/<this-gets-leaked>/get/custom-channel/noarch/repodata.json.bz2):
  │   error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
  ├─▶ error trying to connect: dns error: failed to lookup address information: nodename nor servname provided, or not known
  ├─▶ dns error: failed to lookup address information: nodename nor servname provided, or not known
  ╰─▶ failed to lookup address information: nodename nor servname provided, or not known

I think this might (also) be a rattler problem ...

cc @baszalmstra

I investigated and I think it's harder than I thought to write a "masker" with tracing_subscriber.
We should maybe write a custom wrapper for the URL type that masks out the tokens in (debug) print.
For now I'll leave this open and hope that Github Actions and others do the masking for us :)

This one might help: https://github.com/mamba-org/rattler/pull/407


Faster JSON decoding of the bulk response

Using the bulk indexer heavily shows that JSON decoding is one of the heaviest CPU consumers.
In my (real world) application a CPU profile shows these top 10:
Duration: 8.96s, Total samples = 2.44s (27.24%)
Showing nodes accounting for 1280ms, 52.46% of 2440ms total
Dropped 131 nodes (cum <= 12.20ms)
Showing top 10 nodes out of 183
      flat  flat%   sum%        cum   cum%
     360ms 14.75% 14.75%      360ms 14.75%  runtime.memmove
     360ms 14.75% 29.51%      360ms 14.75%  runtime/internal/syscall.Syscall6
     120ms  4.92% 34.43%      350ms 14.34%  encoding/json.(*Decoder).readValue
      90ms  3.69% 38.11%       90ms  3.69%  runtime.futex
      80ms  3.28% 41.39%       80ms  3.28%  crypto/aes.gcmAesEnc
      70ms  2.87% 44.26%       70ms  2.87%  runtime.nextFreeFast
      50ms  2.05% 46.31%       50ms  2.05%  encoding/json.stateInString
      50ms  2.05% 48.36%       50ms  2.05%  encoding/json.unquoteBytes
      50ms  2.05% 50.41%       70ms  2.87%  runtime.findObject
      50ms  2.05% 52.46%       50ms  2.05%  runtime.memclrNoHeapPointers

This made me wonder how the top N look like when sorted by CPU cumulated (sort=cum):
Showing top 10 nodes out of 183
      flat  flat%   sum%        cum   cum%
         0     0%     0%     1250ms 51.23%  main.runDelayed.func1
         0     0%     0%     1250ms 51.23%  main.startProcessingExecutables.func1
         0     0%     0%      680ms 27.87%  encoding/json.(*Decoder).Decode
         0     0%     0%      680ms 27.87%  github.com/elastic/go-elasticsearch/v8/esutil.(*bulkIndexer).Close
         0     0%     0%      680ms 27.87%  github.com/elastic/go-elasticsearch/v8/esutil.(*worker).flush
         0     0%     0%      680ms 27.87%  github.com/elastic/go-elasticsearch/v8/esutil.defaultJSONDecoder.UnmarshalFromRead

It was unexpected to see the Decode() so high ranked. After some digging, I found the bulk response decoding being responsible.
A fast drop in replacement for encode/json is "github.com/goccy/go-json".
There is a good comparison of JSON Go libraries here.
For basically just changing a single line of code, the reduction of CPU is quite nice:
Duration: 7.95s, Total samples = 1.97s (24.79%)
Showing nodes accounting for 1020ms, 51.78% of 1970ms total
Showing top 10 nodes out of 300
      flat  flat%   sum%        cum   cum%
     250ms 12.69% 12.69%      250ms 12.69%  runtime.memmove
     240ms 12.18% 24.87%      240ms 12.18%  runtime/internal/syscall.Syscall6
     110ms  5.58% 30.46%      180ms  9.14%  github.com/goccy/go-json/internal/decoder.stringBytes
     100ms  5.08% 35.53%      220ms 11.17%  runtime.mallocgc
      90ms  4.57% 40.10%       90ms  4.57%  runtime.futex
      50ms  2.54% 42.64%      200ms 10.15%  github.com/goccy/go-json/internal/encoder/vm.Run
      50ms  2.54% 45.18%      100ms  5.08%  google.golang.org/protobuf/internal/impl.(*MessageInfo).unmarshalPointer
      50ms  2.54% 47.72%       50ms  2.54%  runtime.memclrNoHeapPointers
      40ms  2.03% 49.75%       40ms  2.03%  net.appendHex (inline)
      40ms  2.03% 51.78%       40ms  2.03%  runtime.(*randomEnum).next

So that is a drop by 19% for the overall application CPU usage.
The bulk indexer flush() CPU usage dropped by ~40% (from 680ms down to 390ms):
      flat  flat%   sum%        cum   cum%
     0.01s  0.51%  0.51%      0.39s 19.80%  github.com/elastic/go-elasticsearch/v8/esutil.(*worker).flush

[Warning]: The above numbers are from single/manual tests and have some variation between runs. So take them more as a indicator of an significant improvement.

Thank you for raising this, however I'd prefer not to tie the whole library to anything more than the standard runtime.
Furthermore you can inject a custom decoder via the BulkResponseJSONDecoder interface in BulkIndexerConfig.Decoder which would allow you to achieve the same thing from your application code.


links: update github branch

@imba-tjd : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Initial releases.json file

This file is supposed to be updated automatically when a new release is performed. It should always contain up-to-date information on maintained Garden Linux releases. This is relevant for glvd and it might also be useful for other tooling.
There are ways to find out about existing releases (for example git tags, github releases, ..) but they don't provide life-cycle information (for example if a version is eol or not).
This file should have more fields indicating the exact status of a release, and that needs to be updated automatically (for example by the 'create release notes' workflow).
see https://github.com/gardenlinux/gardenlinux/issues/2296

Obsolete thanks to @yeoldegrove and his work on glrd


enhanced toggle for mode switch

Pull Request Checklist
fixes #362

[x] I have added screenshots and videos to show before and after the working of my code.
[x] I have ensured that the screen size is set to 100% while making the video.
[x] I have synced the latest fork with my local repository and resolved any conflicts.
[x] I have mentioned the issue number which I created before making this PR .
[x] I understand that if any the above conditions are not met , my PR will not be MERGED .

I have ensured that the screen size is set to 100% while making the video.
this means i need to see the video and the working of the feature , video should have the whole screen , also kindly resync your fork


Email not dynamically pulling the correct task name from the tasks table on adding a collaborator to the task

Corrected the code in task_model.py which was not passing the task_name correctly. Now, it is passing that object to the caller function.


[Bug][Dashboard] No restrictions are added to the input of port numbers, such as dataproxy node

What happened
with configuring the ip:port of dataproxy or other module, there are no format restrictions on ip or port.
please check this kind of problem, not only dataproxy node.
What you expected to happen
add input restrictions.
How to reproduce
input ip port
Environment
No response
InLong version
master
InLong Component
InLong Dashboard
Are you willing to submit PR?

[ ] Yes, I am willing to submit a PR!

Code of Conduct

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

@bluewang PTAL.


c++ book in pt

What does this PR do?
Add Resource(s)
For resources
C++ for beginners
Description
Why is this valuable (or not)?
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[x] Not a duplicate
[x] Included author(s) if appropriate
[x] Lists are in alphabetical order
[x] Needed indications added (PDF, access notes, under construction)

I don't like the link for this document. It a blog post point at a defunct website and to Google Docs. I suggest you upload the pdf to internet archive (might already be there!) and use a link pointing at internet archive. Many more people will benefit, and it won't go away.

no, docplayer is worse.

I don't want to receive this email
On Fri, Nov 20, 2020, 16:42 Eric Hellman<EMAIL_ADDRESS>wrote:

Closed #4692
https://github.com/EbookFoundation/free-programming-books/pull/4692.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/EbookFoundation/free-programming-books/pull/4692#event-4021458819,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AO6SRRKH6OM7X66SB5TFZMLSQ2E5LANCNFSM4S5YZ7FA
.


identity / autoincrement fields are not ignored by seed.sql

Using this code
`import { SnapletClient } from '@snaplet/seed';
// You can use @snaplet/copycat to generate fake data for a field, for example:
// // await snaplet.users([{ email: ({ seed }) => copycat.email(seed) }]) //
// More on this in our docs: https://docs.snaplet.dev/core-concepts/seed#inside-the-snapletseed-workflow
import { copycat } from '@snaplet/copycat'
// This is a basic example generated by Snaplet to start you off, check out the docs for where to go from here
// * For more on getting started with @snaplet/seed: https://docs.snaplet.dev/getting-started/quick-start/seed
// * For a more detailed reference: https://docs.snaplet.dev/core-concepts/seed
const snaplet = new SnapletClient({
dryRun: process.env.DRY !== '0',
});
// Clears all existing data in the database, but keep the structure
await snaplet.$resetDatabase()
await snaplet.users([
{
purchases: (x) => x(3, (index) => ({
amount: ({ seed }) => copycat.int(seed, { min: 1, max: 100 }),
description: copycat.sentence(index),
}))
}
]);
//await snaplet.purchases([{}], { connect: true }); // should create a purchase per user?
`
The sql inserts random integers into a order_id column (that is used for sorting). I want it to just ignore that field since the database takes care of setting the value. I looked everywhere how to ignore/not set any fields in a column to no avail. Any help would be appreciated?

@justinvdm or @jgoux is it possible to pass in a null value here any let the database take care of this?

Hello @rodpatulski, could you share the schema of the table containing order_id?
Normally if there is a DEFAULT value for the column we shouldn't produce a value on our end if you don't specify anything.

Here is the schema:
`--
-- PostgreSQL database dump
-- Dumped from database version 15.1 (Ubuntu 15.1-1.pgdg20.04+1)
-- Dumped by pg_dump version 15.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: public; Type: SCHEMA; Schema: -; Owner: pg_database_owner
CREATE SCHEMA public;
ALTER SCHEMA public OWNER TO pg_database_owner;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: pg_database_owner
COMMENT ON SCHEMA public IS 'standard public schema';
--
-- Name: handle_new_user(); Type: FUNCTION; Schema: public; Owner: postgres
CREATE FUNCTION public.handle_new_user() RETURNS trigger
LANGUAGE plpgsql
AS $$begin
insert into public.profiles (id, full_name, avatar_url)
values (new.id, new.raw_user_meta_data->>'full_name', new.raw_user_meta_data->>'avatar_url');
return new;
end;$$;
ALTER FUNCTION public.handle_new_user() OWNER TO postgres;
--
-- Name: running_purchase_total(uuid, boolean); Type: FUNCTION; Schema: public; Owner: postgres
CREATE FUNCTION public.running_purchase_total(usr_id uuid, isweek boolean) RETURNS TABLE(purchase_date date, cumulative_amount numeric)
LANGUAGE plpgsql
AS $$
DECLARE
user_budget NUMERIC;
BEGIN
-- Retrieve the daily budget for the user from the preferences table
SELECT daily_budget INTO user_budget
FROM preferences
WHERE user_id = usr_id;
IF NOT FOUND THEN
    user_budget := 20;
END IF;

ASSERT user_budget IS NOT NULL, 'user_budget cannot be NULL for user_id: ' || usr_id;
ASSERT user_budget >= 0, 'user_budget cannot be negative or 0 for user_id: ' || usr_id;

RETURN QUERY
WITH date_series AS (
    SELECT
        generate_series(
            CASE
                WHEN isWeek THEN date_trunc('week', CURRENT_DATE)
                ELSE date_trunc('month', CURRENT_DATE)
            END,
            CASE
                WHEN isWeek THEN date_trunc('week', CURRENT_DATE) + interval '6 days'
                ELSE date_trunc('month', CURRENT_DATE) + interval '1 month - 1 day'
            END,
            interval '1 day'
        )::date AS purchase_date
),
daily_purchase AS (
    SELECT
        ds.purchase_date,
        COALESCE(SUM(P.amount), 0) AS total_purchase_amount
    FROM
        date_series ds
    LEFT JOIN
        purchases P ON ds.purchase_date = DATE(P.created_at) AND P.user_id = usr_id
    GROUP BY
        ds.purchase_date  -- Group by the date from the date_series
)
SELECT
    DP.purchase_date,
    SUM(user_budget - DP.total_purchase_amount) OVER (ORDER BY DP.purchase_date) AS cumulative_amount
FROM
    daily_purchase DP;

END;
$$;
ALTER FUNCTION public.running_purchase_total(usr_id uuid, isweek boolean) OWNER TO postgres;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: preferences; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.preferences (
user_id uuid NOT NULL,
created_at timestamp with time zone DEFAULT now(),
daily_budget smallint DEFAULT '20'::smallint
);
ALTER TABLE public.preferences OWNER TO postgres;
--
-- Name: purchases; Type: TABLE; Schema: public; Owner: postgres
CREATE TABLE public.purchases (
created_at date DEFAULT now() NOT NULL,
amount smallint DEFAULT '0'::smallint NOT NULL,
description character varying DEFAULT ''::character varying NOT NULL,
user_id uuid NOT NULL,
id uuid DEFAULT gen_random_uuid() NOT NULL,
order_id integer NOT NULL
);
ALTER TABLE public.purchases OWNER TO postgres;
--
-- Name: purchases_order_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
ALTER TABLE public.purchases ALTER COLUMN order_id ADD GENERATED BY DEFAULT AS IDENTITY (
SEQUENCE NAME public.purchases_order_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1
);
--
-- Data for Name: preferences; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.preferences (user_id, created_at, daily_budget) FROM stdin;
.
--
-- Data for Name: purchases; Type: TABLE DATA; Schema: public; Owner: postgres
COPY public.purchases (created_at, amount, description, user_id, id, order_id) FROM stdin;
2024-01-24	78	Discens sibus possitatque fatem quos.	0f5d546a-dd80-5406-a005-a4f3061b9fb4	889b70dc-0238-5556-9f83-b458c43d10c5	0
2024-01-24	30	Advero quisquamquam inquam ii possit est dolorem synephebos.	0f5d546a-dd80-5406-a005-a4f3061b9fb4	9ffb4f71-471c-59cf-b48d-de0f11935ce7	1
2024-01-24	4	Dicunt ut nulla in odia qui doctis et, recte quisitural ita beate sitata voluptatem nostri quoniam.	0f5d546a-dd80-5406-a005-a4f3061b9fb4	4099a4ff-334f-5bfe-8f49-4e5a5b58abd9	2
2024-01-24	4	Discens sibus possitatque fatem quos.	5fef9e7c-116a-5504-a6ae-d16f4442d448	538057a3-fc03-5231-af06-2f4f0ab34f00	3
2024-01-24	41	Advero quisquamquam inquam ii possit est dolorem synephebos.	5fef9e7c-116a-5504-a6ae-d16f4442d448	1d593d16-5015-5afd-bf57-bee4fe94b479	4
2024-01-24	65	Dicunt ut nulla in odia qui doctis et, recte quisitural ita beate sitata voluptatem nostri quoniam.	5fef9e7c-116a-5504-a6ae-d16f4442d448	00842d54-aa98-5a96-ac30-0354afaa2745	5
.
 (This was done in the supabase interface by checking the 'identity' option in column options when editing the table in the supabase gui). Hope this helps.

I this bug still occurring on latest version @rodpatulski ?
We should now continue the sequence assigned to a column so I'm wondering if it fixed your bug.

I'm going to close this due to lack of response. If this is still happening please let us know and we'll open it up again.

Not sure if this is the same behavior, but snaplet seems to break when seeding tables that have a generative field.
Anything DB generated really is difficult. I had to manually randomize an int for increments, which is how I worked around that issue, but I cannot get it to ignore a fullName generated column to save my life
It's autogenerated by the db. It doesn't need to be created, and this is something that prisma itself (which I am using with snaplet) doesn't seem to have any difficulties with.
In the data model json, I've tried manually setting it as generated, given it a default value, nothing works. It always tries to generate random names
I could work around this with a trigger, which I've seen suggested a few times but that feels like a convoluted approach to me


Command args?

Hey are there any command arms we can use like lowvram split attention no half etc.....?

I just realized only sd 1.5 single file safetensors are supported that's y it was crashing....will sdxl Safetensors be supported soon?

I just realized only sd 1.5 single file safetensors are supported that's y it was crashing....will sdxl Safetensors be supported soon?

Not soon, may be later

Hey are there any command arms we can use like lowvram split attention no half etc.....?
FastSD CPU is current focus is on CPU. VRAM does not come into the picture now.


How to get the predicted probabilities for image classification using tensor flow CNN

I am studying the tensor flow for CNN image classification following the official document(https://www.tensorflow.org/tutorials/layers) . The code in above link for image classification with tensorflow CNN, I want to get all the probabilities of each image labels in test data. I want to ask.
How to get the probabilities of predicting result for each image.
How to evaluate the result of predicted probabilities, in this example using accuracy for label classification. Thanks!
`import numpy as np
import tensorflow as tf

tf.logging.set_verbosity(tf.logging.INFO)

def cnn_model_fn(features, labels, mode):
  """Model function for CNN."""
  # Input Layer
  # Reshape X to 4-D tensor: [batch_size, width, height, channels]
  # MNIST images are 28x28 pixels, and have one color channel
  input_layer = tf.reshape(features["x"], [-1, 28, 28, 1])

  # Convolutional Layer #1
  # Computes 32 features using a 5x5 filter with ReLU activation.
  # Padding is added to preserve width and height.
  # Input Tensor Shape: [batch_size, 28, 28, 1]
  # Output Tensor Shape: [batch_size, 28, 28, 32]
  conv1 = tf.layers.conv2d(
      inputs=input_layer,
      filters=32,
      kernel_size=[5, 5],
      padding="same",
      activation=tf.nn.relu)

  # Pooling Layer #1
  # First max pooling layer with a 2x2 filter and stride of 2
  # Input Tensor Shape: [batch_size, 28, 28, 32]
  # Output Tensor Shape: [batch_size, 14, 14, 32]
  pool1 = tf.layers.max_pooling2d(inputs=conv1, pool_size=[2, 2], strides=2)

  # Convolutional Layer #2
  # Computes 64 features using a 5x5 filter.
  # Padding is added to preserve width and height.
  # Input Tensor Shape: [batch_size, 14, 14, 32]
  # Output Tensor Shape: [batch_size, 14, 14, 64]
  conv2 = tf.layers.conv2d(
      inputs=pool1,
      filters=64,
      kernel_size=[5, 5],
      padding="same",
      activation=tf.nn.relu)

  # Pooling Layer #2
  # Second max pooling layer with a 2x2 filter and stride of 2
  # Input Tensor Shape: [batch_size, 14, 14, 64]
  # Output Tensor Shape: [batch_size, 7, 7, 64]
  pool2 = tf.layers.max_pooling2d(inputs=conv2, pool_size=[2, 2], strides=2)

  # Flatten tensor into a batch of vectors
  # Input Tensor Shape: [batch_size, 7, 7, 64]
  # Output Tensor Shape: [batch_size, 7 * 7 * 64]
  pool2_flat = tf.reshape(pool2, [-1, 7 * 7 * 64])

  # Dense Layer
  # Densely connected layer with 1024 neurons
  # Input Tensor Shape: [batch_size, 7 * 7 * 64]
  # Output Tensor Shape: [batch_size, 1024]
  dense = tf.layers.dense(inputs=pool2_flat, units=1024, activation=tf.nn.relu)

  # Add dropout operation; 0.6 probability that element will be kept
  dropout = tf.layers.dropout(
      inputs=dense, rate=0.4, training=mode == tf.estimator.ModeKeys.TRAIN)

  # Logits layer
  # Input Tensor Shape: [batch_size, 1024]
  # Output Tensor Shape: [batch_size, 10]
  logits = tf.layers.dense(inputs=dropout, units=10)

  predictions = {
      # Generate predictions (for PREDICT and EVAL mode)
      "classes": tf.argmax(input=logits, axis=1),
      # Add `softmax_tensor` to the graph. It is used for PREDICT and by the
      # `logging_hook`.
      "probabilities": tf.nn.softmax(logits, name="softmax_tensor")
  }
  if mode == tf.estimator.ModeKeys.PREDICT:
    return tf.estimator.EstimatorSpec(mode=mode, predictions=predictions)

  # Calculate Loss (for both TRAIN and EVAL modes)
  loss = tf.losses.sparse_softmax_cross_entropy(labels=labels, logits=logits)

  # Configure the Training Op (for TRAIN mode)
  if mode == tf.estimator.ModeKeys.TRAIN:
    optimizer = tf.train.GradientDescentOptimizer(learning_rate=0.001)
    train_op = optimizer.minimize(
        loss=loss,
        global_step=tf.train.get_global_step())
    return tf.estimator.EstimatorSpec(mode=mode, loss=loss, train_op=train_op)

  # Add evaluation metrics (for EVAL mode)
  eval_metric_ops = {
      "accuracy": tf.metrics.accuracy(
          labels=labels, predictions=predictions["classes"])}
  return tf.estimator.EstimatorSpec(
      mode=mode, loss=loss, eval_metric_ops=eval_metric_ops)

def main(unused_argv):
  # Load training and eval data
  mnist = tf.contrib.learn.datasets.load_dataset("mnist")
  train_data = mnist.train.images  # Returns np.array
  train_labels = np.asarray(mnist.train.labels, dtype=np.int32)
  eval_data = mnist.test.images  # Returns np.array
  eval_labels = np.asarray(mnist.test.labels, dtype=np.int32)

  # Create the Estimator
  mnist_classifier = tf.estimator.Estimator(
      model_fn=cnn_model_fn, model_dir="/tmp/mnist_convnet_model")

  # Set up logging for predictions
  # Log the values in the "Softmax" tensor with label "probabilities"
  tensors_to_log = {"probabilities": "softmax_tensor"}
  logging_hook = tf.train.LoggingTensorHook(
      tensors=tensors_to_log, every_n_iter=50)

  # Train the model
  train_input_fn = tf.estimator.inputs.numpy_input_fn(
      x={"x": train_data},
      y=train_labels,
      batch_size=100,
      num_epochs=None,
      shuffle=True)
  mnist_classifier.train(
      input_fn=train_input_fn,
      steps=20000,
      hooks=[logging_hook])

  # Evaluate the model and print results
  eval_input_fn = tf.estimator.inputs.numpy_input_fn(
      x={"x": eval_data},
      y=eval_labels,
      num_epochs=1,
      shuffle=False)
  eval_results = mnist_classifier.evaluate(input_fn=eval_input_fn)
  print(eval_results)

if __name__ == "__main__":
  tf.app.run()`

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

Nagging Awaiting Response: It has been 14 days with no activityand the awaiting response label was assigned. Is this still an issue?

This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there.
If you think we've misinterpreted a bug, please comment again with a clear explanation, as well as all of the information requested in the issue template. Thanks!


feat: color select panel component

PR
PR Checklist
Please check if your PR fulfills the following requirements:

[ ] The commit message follows our Commit Message Guidelines
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?
Split the components.

Issue Number: N/A
What is the new behavior?
Split the Color Select Panel component from the color picker component.
Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

@GaoNeng-wWw 可否贴一张效果图？


Long time to install

I have seen your efforts on installing this package and its dependencies, and I appreciate your great job.
But it still takes more than an hour installing this package in China, either SKIP_ or not.
So I hope if you could build most of things as binary wheels and let them be downloaded in github for faster installing.
Again, thank you for your time.

Hm, that's interesting.
There are two options to install Magnitude as you mentioned:

Install normally. This does actually install with binary wheels (if your system is supported Mac, Linux, some Windows). It doesn't download the wheel from PyPI, however, as I made the install script download it from our S3 bucket for reasons. However, it should be coming from us-east-1 Amazon S3 which is quite far from China, but still shouldn't be that big of a problem IMO (let me know if that is an issue, maybe I can set up a CDN). I actually bundle all of the recursive dependencies (numpy, torch) as binary wheels as well, to prevent C compilation issues during install. So the binary wheel actually gets quite large (~120-300MB). The download is a little slow for 120-300MB, but the installation is pretty much instant since there is nothing to build. Here in the USA 120MB downloads pretty quickly even at most residential internet speeds.

Build from source (SKIP_MAGNITUDE_WHEEL). You can build from source by passing this flag. If a wheel for your system is not supported, it will build from source. This can be slow. It has to compile 2 versions of SQLite, and if your system doesn't have numpy or torch it may compile those as well.

Could you answer some questions to help debug:

Do you have this problem with other packages as well? I'm not very familiar with the internet situation in China, but is there throttling of US websites / is the overall internet speed low?
Would downloading 120-300MB from Amazon S3 take a long time?
Why do you need to install Magnitude over and over again?

@AjayP13

pip install using official pypi source downloads slowly in China, but we have lots of mirrors of pypi, by using the mirror source, pip install goes fast as 50MB/s+. Generally, US website goes slower in China as half planet long way to transfer.
AWS US might go slow in China. Would you mind give me a link of some big files so I could clearly give you the speed? I think adding CDN or an offline wheel zip should be much better.
Yeah, I plan to use it in a Docker image.

Got it, that makes sense. Since we are using our S3 server for the wheel download, it might not be taking advantage of the PyPI China mirrors.

Try downloading this: https://s3.amazonaws.com/magnitude.plasticity.ai/wheelhouse/pymagnitude-0.1.119-cp36-cp36m-manylinux1_x86_64.whl (Python 3.6 Linux x86_64 Binary Wheel Magnitude Version: 0.1.119) and tell me if that is slow and how long it takes. (It's 135MB)

If #2 is where the slowness is coming from I will set up an Amazon CloudFront CDN to mirror the files globally.
If #2 is fast enough, downloading is probably not the bottleneck, it is probably building from source on your computer, which is why it is slow (SQLite is slow to compile). Please run pip install magnitude -vvv (verbose mode logging) and paste the log here in that case.

I can't use PyPI for the wheel. It's not a standard wheel, its a modified wheel file that I made. The setup.py file that is run when you install using pip will install it correctly.
The real issue is why you are getting Unable to establish SSL connection.. Can you paste the full log? I don't think this is caused by internet issues or server issues. I think your system has an SSL issues due to maybe outdated SSL libraries.

@AjayP13 😅I use wget in Aliyun to download the link above, when I use http, it downloads fast every time, and when I use https, it just hungs like
wget https://s3.amazonaws.com/magnitude.plasticity.ai/wheelhouse/pymagnitude-0.1.119-cp36-cp36m-manylinux1_x86_64.whl
--2018-11-28 10:39:15--  https://s3.amazonaws.com/magnitude.plasticity.ai/wheelhouse/pymagnitude-0.1.119-cp36-cp36m-manylinux1_x86_64.whl
Resolving s3.amazonaws.com (s3.amazonaws.com)... <IP_ADDRESS>
Connecting to s3.amazonaws.com (s3.amazonaws.com)|<IP_ADDRESS>|:443...

@AjayP13 Good and Bad.

Using http helps a lot in connection success rate, thank you.
When I wget http://s3.amazonaws.com/magnitude.plasticity.ai/wheelhouse/pymagnitude-0.1.120-cp36-cp36m-manylinux1_x86_64.whl in 7 hours ago and now, I both got a speed of less than 100KB/s, compared with 0.1.119 of 1MB/s and more. I will send more feedback and cdn might be needed.

@AjayP13 Test more.

Sometimes both in Aliyun and AWS China, I only got less than 50KB/s download speed. Sometimes 2MB/s+. No pattern founded. Just really not stable. Poor network between China and US.
Using CDN is great, and add an parameter for load an offline pymagnitude-0.1.120-cp36-cp36m-manylinux1_x86_64.whl is also good enough.
Thank you for your time.

Got it, that makes sense. Since we are using our S3 server for the wheel download, it might not be taking advantage of the PyPI China mirrors.
Try downloading this: https://s3.amazonaws.com/magnitude.plasticity.ai/wheelhouse/pymagnitude-0.1.119-cp36-cp36m-manylinux1_x86_64.whl (Python 3.6 Linux x86_64 Binary Wheel Magnitude Version: 0.1.119) and tell me if that is slow and how long it takes. (It's 135MB)

If 2) is where the slowness is coming from I will set up an Amazon CloudFront CDN to mirror the files globally.
If 2) is fast enough, downloading is probably not the bottleneck, it is probably building from source on your computer, which is why it is slow (SQLite is slow to compile). Please run pip install pymagnitude -vvv (verbose mode logging) and paste the log here in that case.

Can you provide windows version?


getUserMedia() no longer works on insecure origins.

getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.

@soundstep I just wanted to check if you have plans to redeploy at a working https url?  I ended up just using github's pages with the master branch, which if once enabled would make the app available at https://soundstep.github.io/magic-xylophone/app/ I think.

Very good idea, I'll do that! Thanks for the suggestion.


Disable raw upload while onroad

Saves about 10% of a core if a user is connected to wifi

Think it's very unlikely to be onroad and in wifi range, but it's a simple change.

I feel like this should be a UI toggle rather than off. Some people might have it connected to in vehicle hotspots (OnStar, Uconnect, SYNC Connect, Entune)


magidoc generate fails when using introspection type of sdl

Describe the bug
I'm trying to use the following configuration in my magidoc.mjs config file:
export default {
   introspection: {
      type: 'sdl',
      paths: ['./src/generated/schema.graphql'],
   },
   // other fields omitted
}

The file ./src/generated/schema.graphql exists and contains our entire gql schema.
When I run the generate command, it fails with the following stack trace:
------- Stacktrace -------
Error: No paths found matching target glob patterns: [C:\GitProjectRepos\shure.system-api\sprint-q3.4-gqldoc\packages\standalone-server\src\generated\schema.graphql].
If you used relative paths, make sure the paths are relative to where the node command was launched or use absolute paths.
    at readFullSchema (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/rollup-plugin-parse-gql-schema/build/schema/parse.js:20:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async parseGraphqlSchema (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/rollup-plugin-parse-gql-schema/build/schema/parse.js:6:23)
    at async parseSchema (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/rollup-plugin-parse-gql-schema/build/index.js:5:20)
    at async Object.executor (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/cli/build/tasks/all/loadGraphqlSchema.js:20:21)
    at async Task.run (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/listr2/dist/index.js:960:11)
    at async C:\GitProjectRepos\shure.system-api\sprint-q3.4-gqldoc\node_modules\p-map\index.js:57:22

I know the path is correct, and it is relative to where I'm invoking the generate command.  If I use the file option using the same relative path, as listed below, generate works.
export default {
   introspection: {
      // this works.
      type: 'file',
      location: './src/generated/introspection.json',
   },
}

I wanted to use the schema file instead of the introspection file with the hope that the comments we've included in our schema file will show up as useful comments in the generated document.
Reproduction
you can use the information above
Logs
Error: No paths found matching target glob patterns: [C:\GitProjectRepos\shure.system-api\sprint-q3.4-gqldoc\packages\standalone-server\src\generated\schema.graphql].
If you used relative paths, make sure the paths are relative to where the node command was launched or use absolute paths.
    at readFullSchema (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/rollup-plugin-parse-gql-schema/build/schema/parse.js:20:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async parseGraphqlSchema (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/rollup-plugin-parse-gql-schema/build/schema/parse.js:6:23)
    at async parseSchema (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/rollup-plugin-parse-gql-schema/build/index.js:5:20)
    at async Object.executor (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/@magidoc/cli/build/tasks/all/loadGraphqlSchema.js:20:21)
    at async Task.run (file:///C:/GitProjectRepos/shure.system-api/sprint-q3.4-gqldoc/node_modules/listr2/dist/index.js:960:11)
    at async C:\GitProjectRepos\shure.system-api\sprint-q3.4-gqldoc\node_modules\p-map\index.js:57:22

System Info
$ npx envinfo --system --binaries --browsers --npmPackages "{@magidoc/*}"
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

  System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
    Memory: 4.99 GB / 31.73 GB
  Binaries:
    Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.2.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 103.0.5060.134
    Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.47)

Severity
serious, but I can work around it
Additional Information
No response

Thanks for raising the issue. I will have a look as soon as possible!

I found the issue. It's due to a behaviour of fast-glob that I was not aware of (the library used for glob matching). It seems that backslashes are not supported for globs since they can be used to escape some characters. Fix should be simple and deployed in the next minutes.
Thanks again for raising this issue.

Fixed with #141 and already deployed (2.7.1).  Enjoy!

Awesome. Thanks much!
I'll give it a try!
~~~~~~~~~~~~~~~~~~~
Tom Hoffman
On Tue, Aug 9, 2022 at 11:13 AM Sunny Pelletier @.***>
wrote:

Fixed with #141 https://github.com/magidoc-org/magidoc/pull/141 and
already deployed (2.7.1). Enjoy!
—
Reply to this email directly, view it on GitHub
https://github.com/magidoc-org/magidoc/issues/140#issuecomment-1209590187,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEDJHP2MK7RNZNRRXN2SAPDVYJ7T5ANCNFSM56A6C5ZQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


Invisible password during the account creation.

Hum, the code I added here is perfectly php-cs-Fixer friendly…

@sdebacker it's not your fault. Looks like that the checkout GH action has some issues. I'm not sure if this is related to the name of your branch (it works fine for all the other PRs), but in any case we will merge your code soon. Thank you for your contribution.


Pointers are vastly over used

There is a general overuse of pointers within this library and many make no sense at all (to me).
All return structs fields are pointers to fields, rather than plain fields e.g. string, float or int. This makes this generated code so much less usable as everything has to be nil checked before using. Your own examples using fmt.Printf("%+v", someReturnStruct) produces a nice array of pointer addresses. Look at libraries like AWS SDK, they have made the same mistake and moved away from this thinking. https://aws.amazon.com/blogs/developer/aws-sdk-for-go-version-2-general-availability/
Another example is here:  https://github.com/Finnhub-Stock-API/finnhub-go/blob/master/model_earnings_calendar.go#L20
// EarningsCalendar struct for EarningsCalendar
type EarningsCalendar struct {
	// Array of earnings release.
	EarningsCalendar *[]EarningRelease `json:"earningsCalendar,omitempty"`
}

Here we have field that is a pointer to a slice on struct that is a return value. Pointers to slices have their uses (see https://medium.com/swlh/golang-tips-why-pointers-to-slices-are-useful-and-how-ignoring-them-can-lead-to-tricky-bugs-cac90f72e77b ) but as a struct field value on what is essentially api data (i.e. it shouldn't get changed by the application once read from the api), it's pointless.
As an example, perform a query on stock symbols:
symbols, _, _ := finnhubClient.StockSymbols(context.Background()).Exchange("L").Execute()
for _, s := range symbols {
	fmt.Printf("%s : %+v", *s.DisplaySymbol, s)
}

gives a whole array of lines like (one line example)
TIGT.L : {Description:0xc000cb2400 DisplaySymbol:0xc000cb2410 Symbol:0xc000cb2450 Type:0xc000cb2470 Mic:0xc000cb2430 Figi:0xc000cb2420 ShareClassFIGI:0xc000cb2440 Currency:0xc000cb23f0 Symbol2:0xc000cb2460 Isin:<nil>
Please make the library more Go friendly.

Okay - to be fair, I half knew what I was talking about.
The issue comes from the api spec itself, where return structs do not have any "required" properties defined, so everything is seen by the code generator as optional and likely empty.
It would make sense to add required field definitions for many properties of returned object, for example that a StockSymbol call should always have a string symbol associated with it.
I understand that this isn't the correct repo for this kind of feedback so feel free to close with scathing disgust if necessary.


Choose a memoization key in preprocessor(memoize=True)

Is your feature request related to a problem? Please describe.
Currently, there is no way to decide the key to be memoized when using preprocessor(memoize=True).
This leads to 2 issues :

memoization can not be done for unhashable classes (typically a group of pandas rows). We need to wrap or subclass it.
memoization key can not be specific to a preprocessing.
Example : We are trying to evaluate the reliability of a paragraph in a blog post.
We could evaluate the reliability of the paragraph and of the website.
The preprocessing corresponding to those 2 tasks will share the same key for memoize, which is not ideal : a website can have a few thousand paragraphs so we will evaluate website reliability a lot more than necessary.

Describe the solution you'd like
Being able to parametrize it in the decorator.
@preprocessor(memoize=True, memoize_key=lambda p: p.base_website_url)
def add_website_reliability(paragraph):
    paragraph.website_reliability = evaluate_reliability(paragraph.base_website_url)
    return paragraph

Additional context
Current workaroud.
@mock.patch("snorkel.map.core.get_hashable", lambda p: p.base_website_url)
@preprocessor(memoize=True)
def add_website_reliability(paragraph):
    paragraph.website_reliability = evaluate_reliability(paragraph.base_website_url)
    return paragraph

Hi @Wirg, thanks for posting! Sounds like you have a really interesting use case here, would love to hear about it if you want to share some detail! The solution you proposed makes sense to me. I'd be happy to help out and review if you want to submit a PR. Looks like you'd need to make the change in get_hashable (https://github.com/snorkel-team/snorkel/blob/dd240003857ee4e95fa49599d708c5ba878b3939/snorkel/map/core.py#L41) and then make the keyword argument accessible up the stack.

Hi @henryre and thank you for the answer,
I would have considered using a memoize_key like argument with None defaulting to the current get_hashable.
Namely, something like :
class BaseMapper:
    def __init__(self, name: str, pre: List["BaseMapper"], memoize: bool, memoize_key: Callable=None) -> None:
        if memoize_key is None:
                memoize_key = get_hashable
        self.name = name
        self._pre = pre
        self.memoize = memoize
        self._memoize_key = memoize_key
        self.reset_cache()

    def __call__(self, x: DataPoint) -> Optional[DataPoint]:
        if self.memoize:
            x_hashable = self._memoize_key(x)
            if x_hashable in self._cache:
                return self._cache[x_hashable]
       ...

What would you think of this ?
Concerning the use case, it's not the one I am currently working on but I thought this one would be simpler to explain.

Hey @Wirg, that looks good to me! Just tag me on a PR once you submit!

Hi @henryre , to pick up the discussion on the pr : https://github.com/snorkel-team/snorkel/pull/1572 .
I wanted to solve two issues with this change.

memoization can not be done for unhashable classes (typically a group of pandas rows). We need to wrap or subclass it.
memoization key can not be specific to a preprocessing.
Example : We are trying to evaluate the reliability of a paragraph in a blog post.
We could evaluate the reliability of the paragraph and of the website.
The preprocessing corresponding to those 2 tasks will share the same key for memoize, which is not ideal : a website can have a few thousand paragraphs so we will evaluate website reliability a lot more than necessary.

Memoization can not be done for unhashable classes
The first one is solved : we can introduce a memoize_key to hash any object we want.
There is one red flag tho : the memoize_key has to be "really smart" and should be able to memoize/hash the data coming from any preprocessor results binded to the DataPoint else in some case we will have dangerous caching that will create issues when the preprocessor is used by different LF/preprocessor with preprocessor in a different order.
from snorkel.labeling import labeling_function, LFApplier
from snorkel.preprocess import preprocessor
from types import SimpleNamespace

data = [
    SimpleNamespace(text='this a check', number=5),
    SimpleNamespace(text='this is something else', number=5)
]

# the memoize key here does not take into account
# all the attributes defined by other preprocessors
@preprocessor(memoize=True, memoize_key=lambda d: (d.number, d.text))
def square(x):
    x.square = x.number ** 2
    return x

@preprocessor(memoize=True)
def text_contains_check(x):
    x.contains_check = "check" in x.text
    return x

If we define our LFS and applier :
@labeling_function(pre=[square])
def square_gt_20(x):
    return x.square > 20

@labeling_function(pre=[text_contains_check, square])
def square_gt_10_and_contains_check(x):
    return x.square > 10 and x.contains_check

# this fails because  `x.contains_check` is not defined inside `square_gt_10_and_contains_check`
# because it has been erased by the cache applied to square
applier = LFApplier([square_gt_20, square_gt_10_and_contains_check])
predictions = applier.apply(data)

# this succeeds but `square_gt_20` was mutated by `text_contains_check`
# which could have a silent side effect
applier = LFApplier([square_gt_10_and_contains_check, square_gt_20])
predictions = applier.apply(data)

This does not appear with pre=[square, text_contains_check] in the other order.
Relying on this with a big code base seems to be a potential red flag to me.
I see snorkel LFs as a way to design bigger and smarter expert systems by reducing the headache of combining multiple expert functions.
This seems to me as this change does not fit this role as is : one will have to keep in mind how does every preprocessor caches, and how to order them.
Memoization key can not be specific to a preprocessing
My goal here was to be able to compute only once some preprocessing that might be quite expensive but replicated between a bunch of DataPoints.
In the previous example, if square was really expensive (squaring a huge matrix ?), it would be nice if it was only applied to each new matrix to square and not each new DataPoint with its previous preprocessings.
In this situation, the memoize_key of square would be lambda x: x.number and if we do so we will override any preprocessing not specific to the number attribute and also any other attributes.
Current workaround
I think the issue is coming from the fact that snorkel.preprocess.preprocessor is expected to both produce the value from the DataPoint and assign it back.
To work around this, I created this decorator which transform a producer that does not do the assignment to a preprocessor.
from functools import wraps
from typing import Callable, Mapping, Optional, List, Any, Hashable

from cachetools import cached
from snorkel.map.core import get_hashable, BaseMapper
from snorkel.preprocess import preprocessor
from snorkel.types import DataPoint

Preprocessor = Callable[[DataPoint], DataPoint]
Producer = Callable[[DataPoint], Any]
HashingFunction = Callable[[Any], Hashable]

def producer_to_snorkel_preprocessor(
        name: Optional[str] = None,
        attribute_key: Optional[str] = None,
        pre: Optional[List[BaseMapper]] = None,
        memoize: bool = False,
        memoize_key: Optional[HashingFunction] = None,
        cache: Mapping = None,
) -> Callable[[Producer], Preprocessor]:
    memoize_key = get_hashable if memoize_key is None else memoize_key

    def _decorator(producer: Producer) -> Preprocessor:
        if memoize:
            _producer = cached({} if cache is None else cache, key=memoize_key)(producer)
        else:
            _producer = producer
        _attribute_key = producer.__name__ if attribute_key is None else attribute_key
        @wraps(producer)
        def _producer_as_preprocessor(x: DataPoint):
            attribute_to_add = _producer(x)
            if hasattr(x, '__setitem__'):
                x[_attribute_key] = attribute_to_add
            else:
                setattr(x, _attribute_key, attribute_to_add)
            return x
        return preprocessor(name=name, pre=pre)(_producer_as_preprocessor)
    return _decorator

And I use it this way.
from snorkel.labeling import labeling_function, LFApplier
from snorkel.preprocess import preprocessor
from types import SimpleNamespace
import numpy as np

@producer_to_snorkel_preprocessor(memoize=True, memoize_key=lambda x: x.number)
def square(x):
    return x.number ** 2

@producer_to_snorkel_preprocessor(memoize=True, memoize_key=lambda x: x.text)
def contains_check(x):
    return "check" in x.text

@labeling_function(pre=[square])
def square_gt_20(x):
    return x.square > 20

@labeling_function(pre=[contains_check, square])
def square_gt_10_and_contains_check(x):
    return x.square > 10 and x.contains_check

data = [SimpleNamespace(text='this a check', number=5), SimpleNamespace(text='this is something else', number=5)]

applier = LFApplier([square_gt_20, square_gt_10_and_contains_check])

np.testing.assert_array_equal(applier.apply(data), applier.apply(data[::-1])[::-1])

@henryre Do you think there is any way to make this cleaner ? I feel like I am a bit lost between the Mapper, Preprocessor and their snake_case decorators.

Hi @Wirg thanks for the extra context here! I think we're pretty close to a solution with the PR you put up.
To your first point: cache key selection is always a tricky problem, and choosing a custom key is an advanced user operation. So I think it's fair to assume that anyone using this option is expected to understand how the preprocessor memoization works. A common approach here would be to  pre-generate a random, unique ID for each data point.
To your second point about specific preprocessing: Snorkel is currently set up to cache preprocessing at the data point-level, not the field level. In many (not all) cases, however, I believe you should be able to accomplish what you're looking for using nested preprocessors. The preprocessor decorator (or the Preprocessor class initializer) can take in a pre=[...] argument itself with a list of other Preprocessors. This means that you can choose to memoize at the outer layer only. So taking a look at your example:
from snorkel.labeling import labeling_function, LFApplier
from snorkel.preprocess import preprocessor
from types import SimpleNamespace
import numpy as np

@preprocessor(memoize=False)
def square(x):
     x.square = x.number ** 2
     return x

@preprocessor(memoize=True, pre=[square], memoize_key=lambda x: (x.text, x.number))
def contains_check_and_sqaure(x):
    x.contains_check = "check" in x.text
    return x

@labeling_function(pre=[square])
def square_gt_20(x):
    return x.square > 20

@labeling_function(pre=[contains_check_and_sqaure])
def square_gt_10_and_contains_check(x):
    return x.square > 10 and x.contains_check

data = [SimpleNamespace(text='this a check', number=5), SimpleNamespace(text='this is something else', number=5)]

applier = LFApplier([square_gt_20, square_gt_10_and_contains_check])

np.testing.assert_array_equal(applier.apply(data), applier.apply(data[::-1])[::-1])

If there are multiple expensive per-field operations, then the one-field-per-preprocessor approach likely won't work here. You could, however, put those in the same preprocessor.
@preprocessor(memoize=True, memoize_key=lambda x: (x.text, x.number))
def contains_check_and_sqaure(x):
    x.square = x.number ** 2
    x.contains_check = "check" in x.text
    return x

I can only agree with the complexity of setting up a cache.
I guess the feature as is solve solves some of the issues I was aiming for.
For the rest, I currently have a workaround I mentioned above and you mentioned two other ways to achieve this.
I am waiting for your review (https://github.com/snorkel-team/snorkel/pull/1572).


add 2, shelleyblock ?

https://github.com/input-output-hk/cardano-ledger-specs/blob/183a70c001587d9b1977541deae28c3e44713907/byron/cddl-spec/byron.cddl#L4

Is that needed given that the shelley.cddl has its own block definition? https://github.com/input-output-hk/cardano-ledger-specs/blob/master/shelley/chain-and-ledger/executable-spec/cddl-files/shelley.cddl

1.18.0 has that extra 2 in the block received, looks like the shelley cddl block fits here as
[2, shelley_block]

@ashisherc Those extra bytes you're seeing is because of the Hard Fork Combinator. You see, the Cardano block chain consists of both the Byron era and the Shelley era (and many more to come in the future). When sending/receiving a block/header/transaction/... (x) across the network, we need to be able to detect whether it is a Byron x or a Shelley x.
For headers, transactions, ..., we use [0, byron_x] and [1, shelley_x] where that first number is a tag indicating the era.
For blocks, we had to maintain backwards compatibility and use [0, byron_epoch_boundary_block], [1, byron_regular_block], [2, shelley_block].
To see more examples of this, you can have a look the golden output in https://github.com/input-output-hk/ouroboros-network/tree/master/ouroboros-consensus-cardano/test/golden/CardanoNodeToNodeVersion2.
This should also answer https://github.com/input-output-hk/cardano-ledger-specs/issues/1713 and https://github.com/input-output-hk/ouroboros-network/issues/2467.

yes, that answers everything. Can the specs be updated to reflect this?

Can the specs be updated to reflect this?

Note that cardano-ledger-specs is entirely agnostic of the Hard Fork Combinator.

Okay, I would like to suggest a place to see all the docs related to networking and ledger specs, which shows all the latest changes.
Someone building on top of this specification will have a hard day figuring out the changes.


Feature Request: read all records in the store

Thank you for your great library.
Would it be possible to have a method for getting all records of a store?
getting records one by one with GetRecordByIdAsync is time-consuming for big stores.
Thanks.

There actually is already a call on the manager called ToArray<T>(string storeName) that you should be able to use.

It worked perfectly for me.
Thanks


Where to download the Danish Colossal Corpus dataset

Hey I was wondering where it is possible to get access to the Danish Colossal Corpus dataset?

Hi Mads. Unfortunately, most of the dataset is not publicly available. I see that you're affiliated with SDU -- as such there might be possibilities for collaborations within the project. Feel free to write a few sentences about your idea here, or reach out to me (Lasse Hansen) and/or Kenneth Enevoldsen on the DDSC slack (here's an invite link): https://join.slack.com/t/danskdatascie-o8m9638/shared_invite/zt-1jh2dwmj4-D_mjywfXERvVP75n9O0ykg


Add Atlas app-configuration alerts

towards https://github.com/giantswarm/giantswarm/issues/31147
New alerts to check if some Atlas apps have unexpected configmaps/secrets
Checklist

[x] Update CHANGELOG.md
[ ] Add Unit tests
[ ] Follow Alert structure
[ ] Consider creating a dashboard (guidelines) (if it does not exist already) to help oncallers monitor the status of the issue.
[ ] Request review from oncall area, as well as team (e.g: oncall-kaas-cloud GitHub group).

We should but it often happen that we set user values instead of using a custom branch of the shared configs for instance for Loki or Mimir so we have a few leftovers that we never cleaned up and that's causing issues when we change something and WE don't know why it has no effects

@giantswarm/team-atlas any opinion on those new alerts ?


Require Kokkos 4.0

Require Kokkos 4.0
Switch 3.7 builds to 4.1
Remove pre Kokkos 4.0 workarounds

retest this please

retest this pleaae

We can also replace KOKKOS_VERSION comparisons with KOKKOS_VERSION_GREATER_EQUAL(MAJOR, MINOR, PATCH) from Kokkos 4.0.00 on, see https://github.com/kokkos/kokkos/pull/5424.

We can also replace KOKKOS_VERSION comparisons with KOKKOS_VERSION_GREATER_EQUAL(MAJOR, MINOR, PATCH) from Kokkos 4.0.00 on, see kokkos/kokkos#5424.

Imho, this seems to be more complicated than KOKKOS_VERSION >= 40100.

Imho, this seems to be more complicated than KOKKOS_VERSION >= 40100.

The main motivation is that the new syntax clearly separates major, minor, and patch versions whereas that is not so clear for 40100.

The main motivation is that the new syntax clearly separates major, minor, and patch versions whereas that is not so clear for 40100.

I understand that. It's a tradeoff.


Improve clarity of times on stop page with labels

Context

as a first time user today, I thought it was unclear what the numbers meant next to train
adding a label should improve accessibility/UX

Changes

add time unit labels: m for minute, s for seconds
replace 1/2 character with 30s
replace Arr with Now

Test plan

before
after

This is a great improvement! Thank you very much for contributing it!
I have one concern on the "30s" case which is that at a quick glance it's hard to distinguish "30s" from "30m". Especially late at night when fewer trains are running, when there won't be later trains further down the list for context. I wonder if there's alternate text we could use here? Perhaps "<1m"? Also happy to submit with "30s", I think it's still an improvement on the current version.

that's a good call - I like <1m as well bc it's more consistent

Awesome, thank you! I submitted this and it's now live on realtimerail.nyc. :)


Removed Join us text and button

Please make sure that these boxes are checked before submitting your pull request - Thank you !

[] Run unit tests with python manage.py test to make sure you didn't break anything.

[] If you have multiple commits, please combine them into a single commit by squashing them.

[] Please attach GIF/Screenshot(s) showing the changes you have made.

Issue Reference :
Please provide a reference to the related issue here, if present.
E.g- #IssueNumber
GIF/Screenshots :
Attach GIF/Screeshots here

Please provide valid screenshot with changes :)

There are different commits related to different stuff to in this pull request and I don't see any need to remove the join us text as well. Therefore, I am closing this PR :)


Add 'transferrable' flags for locations and topics

There are two types of datacatalogs.
First type is a classical data catalog with topics/keywords and locations linked to each single dataset. For example it's global data catalogs like Humanitarian Data Exchange. Datasets in this catalog could be linked to different topics and different countries. There is no one single country or other location for all datasets
Second type is a data catalog that has topics or location linked and these topics and locations are attributes of each dataset too. For example most regional and local government data catalogs do not have datasets for other locations except location except region / local territory. Also there are scientific repositories dedicated only to agriculture or sea exploration and we don't need to identify topic of each dataset, we could copy topics from data catalog registry entry.
This approach require manual or half-automated assignment of topics to data catalogs and adding flags that topics and location values are "transferable".
It could be following attributes:

transfer_topics: True
transfer_geotopics: True
transfer_location: True

This way we could toward to replace "Country" facet search from country covered by the source, to the country of single dataset.

Added as "transferable_topics" and "transferable_location", no geotopics since they are just like other topics under topics property


[Fix] Fix version

Hi,
This pull request fixes 3 things:

Add pt1.7 and pt1.8 to CI. After the CI passes, I will further verify the compatibility by training. And I will let you know when it's done.
Add missing "Projects in OpenMMLab" section to README.md.
Update __init__.py to ensure MMCV compatibility.

Please kindly take a look. Thank you.

@LXXXXR Please fix the linting issue (docformatter)


Failed to extract manifest from APK: ProcessException: The command failed              Command: /opt/android-sdk/build-tools/31.0.0/aapt dump xmltree

Steps to Reproduce
Encountering issues with flutter run which crashes after build is successful even in the default new project with regards to the XML file
[ +355 ms] Running Gradle task 'assembleDebug'... (completed in 17.2s)
[ +134 ms] calculateSha: LocalDirectory:
'/home/ksatrayamaii/scratchbac/my_app/build/app/outputs/flutter-apk'/app.apk
[ +666 ms] ✓  Built build/app/outputs/flutter-apk/app-debug.apk.
[   +1 ms] executing: /opt/android-sdk/build-tools/31.0.0/aapt dump xmltree
/home/ksatrayamaii/scratchbac/my_app/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[   +1 ms] Exit code 127 from: /opt/android-sdk/build-tools/31.0.0/aapt dump xmltree
/home/ksatrayamaii/scratchbac/my_app/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[        ] /opt/android-sdk/build-tools/31.0.0/aapt: error while loading shared libraries: /lib/libc++.so: file too
short
[   +1 ms] Failed to extract manifest from APK: ProcessException: The command failed
             Command: /opt/android-sdk/build-tools/31.0.0/aapt dump xmltree
             /home/ksatrayamaii/scratchbac/my_app/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml.
[   +1 ms] Exception: Problem building Android application: see above error(s).
[   +2 ms] "flutter run" took 19,006ms.

Logs

Logs

JAVA_HOME=/usr/lib/jvm/java-11-temurin/ flutter run --verbose
[  +50 ms] executing: uname -m
[  +21 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +3 ms] executing: [/opt/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 6928314d505d2bb4777be05e45d7808a5aa91d2a
[        ] executing: [/opt/flutter/] git tag --points-at 6928314d505d2bb4777be05e45d7808a5aa91d2a
[  +10 ms] Exit code 0 from: git tag --points-at 6928314d505d2bb4777be05e45d7808a5aa91d2a
[        ] 3.3.6
[  +35 ms] executing: [/opt/flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[   +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] origin/stable
[   +1 ms] executing: [/opt/flutter/] git ls-remote --get-url origin
[   +3 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +28 ms] executing: [/opt/flutter/] git rev-parse --abbrev-ref HEAD
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +38 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +46 ms] executing: /opt/android-sdk/platform-tools/adb devices -l
[  +63 ms] List of devices attached
           R9YT6096SHA            device usb:1-3 product:a03nnxx model:SM_A035F device:a03 transport_id:4
[   +6 ms] /opt/android-sdk/platform-tools/adb -s R9YT6096SHA shell getprop
[  +50 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +108 ms] Skipping pub get: version match.
[  +73 ms] Generating
/home/ksatrayamaii/scratchbac/demo/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +25 ms] ro.hardware = ums9230_25c10
[        ] ro.build.characteristics = phone
[  +23 ms] Initializing file store
[   +7 ms] Skipping target: gen_localizations
[   +4 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs
have updated contents: /home/ksatrayamaii/scratchbac/demo/.dart_tool/package_config_subset}
[  +16 ms] gen_dart_plugin_registrant: Complete
[        ] Skipping target: _composite
[   +1 ms] complete
[   +3 ms] Launching lib/main.dart on SM A035F in debug mode...
[   +3 ms] /opt/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev
/opt/flutter/bin/cache/dart-sdk/bin/snapshots/frontend_server.dart.snapshot --sdk-root
/opt/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter
--debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill
/tmp/flutter_tools.HCPWHK/flutter_tool.DAFZZN/app.dill --packages
/home/ksatrayamaii/scratchbac/demo/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false
--enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build/c075001b96339384a97db4862b8ab8db.cache.dill.track.dill --verbosity=error
--enable-experiment=alternative-invalidation-strategy
[   +4 ms] executing: /opt/android-sdk/build-tools/31.0.0/aapt dump xmltree
/home/ksatrayamaii/scratchbac/demo/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[   +1 ms] Exit code 127 from: /opt/android-sdk/build-tools/31.0.0/aapt dump xmltree
/home/ksatrayamaii/scratchbac/demo/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml
[        ] /opt/android-sdk/build-tools/31.0.0/aapt: error while loading shared libraries: /lib/libc++.so: file too
short
[   +2 ms] Failed to extract manifest from APK: ProcessException: The command failed
             Command: /opt/android-sdk/build-tools/31.0.0/aapt dump xmltree
             /home/ksatrayamaii/scratchbac/demo/build/app/outputs/flutter-apk/app.apk AndroidManifest.xml.
[   +2 ms] No application found for TargetPlatform.android_arm64.
           Is your project missing an android/app/src/main/AndroidManifest.xml?
           Consider running "flutter create ." to create one.
[   +4 ms] <- compile package:demo/main.dart
[+6173 ms] "flutter run" took 6,644ms.
[   +2 ms]
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:713:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1209:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure>
           (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>

[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

[✓] Flutter (Channel stable, 3.3.6, on Arch Linux 6.0.7-arch1-1, locale en_US.UTF-8)
    • Flutter version 3.3.6 on channel stable at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (2 weeks ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /opt/android-sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /opt/android-sdk
    • ANDROID_SDK_ROOT = /opt/android-sdk
    • Java binary at: /usr/lib/jvm/java-8-openjdk/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_352-b08)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✗] Linux toolchain - develop for Linux desktop
    • clang version 14.0.6
    • cmake version 3.24.3
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from
      https://github.com/ninja-build/ninja/releases
    • pkg-config version 1.8.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (2 available)
    • SM A035F (mobile) • R9YT6096SHA • android-arm64 • Android 12 (API 31)
    • Linux (desktop)   • linux       • linux-x64     • Arch Linux 6.0.7-arch1-1

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.
[ksatrayamaii@ksatrayamaii demo]$ JAVA_HOME=/usr/lib/jvm/java-11-temurin/ flutter doctor -v
[✓] Flutter (Channel stable, 3.3.6, on Arch Linux 6.0.7-arch1-1, locale en_US.UTF-8)
    • Flutter version 3.3.6 on channel stable at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6928314d50 (2 weeks ago), 2022-10-25 16:34:41 -0400
    • Engine revision 3ad69d7be3
    • Dart version 2.18.2
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /opt/android-sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /opt/android-sdk
    • ANDROID_SDK_ROOT = /opt/android-sdk
    • Java binary at: /usr/lib/jvm/java-11-temurin/bin/java
    • Java version OpenJDK Runtime Environment Temurin-<IP_ADDRESS>+1 (build <IP_ADDRESS>+1)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✗] Linux toolchain - develop for Linux desktop
    • clang version 14.0.6
    • cmake version 3.24.3
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from
      https://github.com/ninja-build/ninja/releases
    • pkg-config version 1.8.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (2 available)
    • SM A035F (mobile) • R9YT6096SHA • android-arm64 • Android 12 (API 31)
    • Linux (desktop)   • linux       • linux-x64     • Arch Linux 6.0.7-arch1-1

[✓] HTTP Host Availability
    • All required HTTP hosts are available

Hello @KosmonautX. I think this is occurring because your Android SDK is not in your /home directory. Try installing/moving it to inside $HOME instead and try again. You can also use the SDK bundled with Android Studio that should be located at $HOME/Android/Sdk by running flutter config --android-sdk $HOME/Android/Sdk

Since I cannot reproduce this issue, I am labeling it for further investigation by the team.

Our current theory is that there are permission issues with your files. Either with the permissions at install of flutter or in your project. Not sure there is something we can do on our side to fix this.


Can't use psda.vmf

ModuleNotFoundError: No module named 'psda.vmf'; 'psda' is not a package

I have renamed psda.psda --> psda.psdamodel. I have tested the new code on examples\demo and examples\calibration_demo and they run correctly.

It is still not working
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Niko @.>
Sent: Thursday, April 28, 2022 2:46 PM
To: @.>
Cc: Hussin Mohammed Hussin @.>; @.>
Subject: Re: [bsxfan/PSDA] Can't use psda.vmf (Issue #2)
I have renamed psda.psda --> psda.psdamodel. I have tested the new code on examples\demo and examples\calibration_demo and they run correctly.
—
Reply to this email directly, view it on GitHubhttps://github.com/bsxfan/PSDA/issues/2#issuecomment-1112159961, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQ47UOOSOWV7QZXS2WKZVE3VHKCB7ANCNFSM5UNBMBVA.
You are receiving this because you authored the thread.Message ID: @.***>

How can I use your code to apply speaker identification
Technology on my app
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Niko @.>
Sent: Thursday, April 28, 2022 2:46 PM
To: @.>
Cc: Hussin Mohammed Hussin @.>; @.>
Subject: Re: [bsxfan/PSDA] Can't use psda.vmf (Issue #2)
Closed #2https://github.com/bsxfan/PSDA/issues/2.
—
Reply to this email directly, view it on GitHubhttps://github.com/bsxfan/PSDA/issues/2#event-6514824025, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQ47UOLCRRIIYTTDXLW2Y7DVHKCCDANCNFSM5UNBMBVA.
You are receiving this because you authored the thread.Message ID: @.***>

Can you give more details please, for example a stacktrace.
Niko
On Thu, 28 Apr 2022 at 21:38, Hussen Mohamed @.***>
wrote:

It is still not working
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Niko @.>
Sent: Thursday, April 28, 2022 2:46 PM
To: @.>
Cc: Hussin Mohammed Hussin @.>; @.>
Subject: Re: [bsxfan/PSDA] Can't use psda.vmf (Issue #2)
I have renamed psda.psda --> psda.psdamodel. I have tested the new code on
examples\demo and examples\calibration_demo and they run correctly.
—
Reply to this email directly, view it on GitHub<
https://github.com/bsxfan/PSDA/issues/2#issuecomment-1112159961>, or
unsubscribe<
https://github.com/notifications/unsubscribe-auth/AQ47UOOSOWV7QZXS2WKZVE3VHKCB7ANCNFSM5UNBMBVA

.
You are receiving this because you authored the thread.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/bsxfan/PSDA/issues/2#issuecomment-1112586316, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7ZFDINDRGCFZDEUFH3DELVHLSKPANCNFSM5UNBMBVA
.
You are receiving this because you modified the open/close state.Message
ID: @.***>


db query wrong column order in resultset

Hi, a simple db.query with a simple "select a,b,c,d,e,f,g, h,i from xxxtable" returns me the resultset with the column in a different order : [{e-name,a-name,b-name,c-name,d-name,f-name,g-name,h-name,i-name},{e-1,a-1,b-1,c-1,d-1,f-1,g-1,h-1,i-1},,...,{e-i,a-i,b-i,c-i,d-i,f-i,g-i,h-i,i-i},,...]
how can I keep my original column order ?
I use a h2 database, when I query directly this database (usign jdbc via squirrelDb) the resultset is always well ordered with my column order.
What am I missing here ?
regards
Cyril

Closing due to inactivity.


🐛 hack: gomod needs to verify all go.mod files

gomod.sh has only checked top-level go.mod/go.sum so far, which means api/ and hack/tools go.mods have not been verified.
The script also did not work locally at all, since /workdir was mounted read-only and "go mod tidy" writes to the directory.
Utilize existing "make modules" target.
Manual backport of #199

/test-ubuntu-integration-release-1-3
/cherry-pick release-1.2

/cherry-pick cancel
Cherry-pick would bring in wrong Go version, doing the PR manually.

Never mind the cherry picks, handled manually.


parse_with = until_eof on a Vec of enum gives failed to fill whole buffer error

Issue also applies to https://github.com/jam1garner/binread/issues/47
Created a proof of concept at https://github.com/qtfkwk/br-eof-poc
Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
 ╺━━━━━━━━━━━━━━━━━━━━┅ Backtrace ┅━━━━━━━━━━━━━━━━━━━━╸

 0: Error: no variants matched at 0x2a...
   ╭───────────────────────┄ Dog ┄────────────────────┄
   ┆
   ┆ 0: Error: failed to fill whole buffer
   ┆           While parsing field 'self_0' in Animal::Dog
   ┆     at src/main.rs:31
   ┆
   ╰──────────────────────────────────────────────────┄
   ╭───────────────────────┄ Cat ┄────────────────────┄
   ┆
   ┆ 0: Error: failed to fill whole buffer
   ┆           While parsing field 'self_0' in Animal::Cat
   ┆     at src/main.rs:31
   ┆
   ╰──────────────────────────────────────────────────┄
    ...While parsing field 'list' in Pets
     at src/main.rs:40

 ╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸

', src/main.rs:72:39

Am I missing something? Thanks!

I don’t think you are missing anything; the is_eof function just isn’t checking for variant errors in EnumErrors to see if they are all EOF errors.

Thanks for the hint! Implemented @csnover's suggested fix and it resolved the issue as far as I'm concerned.


Simplify Target to use only to cases: BuiltIn and Custom

In the current form, cross needs to known every target its supports.
This makes things too restrict. For example, its not possible to use a
custom target image for a target that cross does not provides a docker
image (like aarch64-unknown-linux-musl, for example). Cross refuses to
execute saying it does not support the specified target. Besides that,
to add a new docker image the cross code needs to be changed.
This changes simplifies the Target enum to have only two variants:
BuiltIn and Custom. Cross needs to known if a target is a custom target
so it can call xargo, otherwise, all BuitIn targets can be uniformly
handled.

Appreciate a second review from @jamesmunns or @rust-embedded/tools

@malbarbo  Fails on one target
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-unknown-dragonfly` target may not be installed

The target x86_64-unknown-dragonfly is not available on rustup, so it also needs xargo. Can we try again?

Sure. though i feel that having uses_xargoandneeds_xargo` variables feels a odd and confusing to me. We can refactor it later though.

bors: r+

Your latest change broke every platform :smile:

I've adjusted AvaliableTargets (see the commit message) and remove the needs_xargo flag.

Dragonfly strikes again. Same issue as we had previously

bors: try

The same issue, but a different reason. I tested dragonfly locally. Let's see how is goes.


undefined reference to `FlutterPlatformMessageReleaseResponseHandle'

Flutter version

Flutter x.xx.x • channel beta • https://github.com/flutter/flutter.git
Framework • revision xxxxxxxxxx (x weeks ago) • xxxxxxxxxxxxxxxxxxxxxxxx
Engine • revision xxxxxxxxxx
Tools • Dart x.x.x (build xxxxxxxxxx)

Golang errors (Optional)

Golang's compiling errors

Steps to Reproduce

xxx
xxx
xxx

hover: Using engine from cache
hover: Cleaning the build directory
hover: ⚠⚠ The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: ⚠⚠     It's advised to use the beta channel. ($ flutter channel beta)
hover: Bundling flutter app
hover: Checking available release on Github
hover: Compiling 'go-flutter' and plugins
github.com/go-flutter-desktop/go-flutter/embedder
C:\Users\chencai.cc\AppData\Local\Temp\go-build163909302\b040_x003.o: In function _cgo_84ad20d147fe_Cfunc_FlutterPlatformMessageReleaseResponseHandle': /tmp/go-build/cgo-gcc-prolog:252: undefined reference to FlutterPlatformMessageReleaseResponseHandle'
C:\Users\chencai.cc\AppData\Local\Temp\go-build163909302\b040_x005.o: In function createMessageResponseHandle': D:\gopath\go\pkg\mod\github.com\go-flutter-desktop\go-flutter@v0.29.0\embedder/embedder_helper.c:72: undefined reference to FlutterPlatformMessageCreateRespon
seHandle'
collect2.exe: error: ld returned 1 exit status
hover: Go build failed: exit status 2

hover: Using engine from cache
hover: Cleaning the build directory
hover: ⚠⚠ The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: ⚠⚠     It's advised to use the beta channel. ($ flutter channel beta)
hover: Bundling flutter app
hover: Checking available release on Github
hover: Compiling 'go-flutter' and plugins
github.com/go-flutter-desktop/go-flutter/embedder
C:\Users\xxxx\AppData\Local\Temp\go-build163909302\b040_x003.o: In function _cgo_84ad20d147fe_Cfunc_FlutterPlatformMessageReleaseResponseHandle': /tmp/go-build/cgo-gcc-prolog:252: undefined reference to FlutterPlatformMessageReleaseResponseHandle'
C:\Users\xxxx\AppData\Local\Temp\go-build163909302\b040_x005.o: In function createMessageResponseHandle': D:\gopath\go\pkg\mod\github.com\go-flutter-desktop\go-flutter@v0.29.0\embedder/embedder_helper.c:72: undefined reference to FlutterPlatformMessageCreateRespon
seHandle'
collect2.exe: error: ld returned 1 exit status
hover: Go build failed: exit status 2

FYI: Updating the beta channel the the latest version solved this issue.

duplicate of  #247


Minor UI changes for sign-in page

This branch has not been rebased onto main and has the following conflicts
Auto-merging src/components/Navigation.jsx
CONFLICT (content): Merge conflict in src/components/Navigation.jsx
Auto-merging src/components/pages/SignIn.css
Auto-merging src/components/pages/SignIn.jsx
CONFLICT (content): Merge conflict in src/components/pages/SignIn.jsx
error: could not apply 75db668... Minor UI changes for sign-in page


example: Provide ProgramTest example

Program developers will want to write end-to-end tests using other programs, which is not totally possible with unit tests.  solana-program-test is extremely useful, so we should have a small example of how to use it.  A few things to consider:

an example of adding another program's processor function (e.g. spl_token)
an example using a builtin (e.g. stake)

Also, there's an error that I ran into while doing this:
error: the #[global_allocator] in solana_measure conflicts with global allocator in: spl_stake_pool
so an extra comment or an FAQ point about that error and how to resolve it would be useful as well, e.g. adding
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))] in entrypoint.rs to avoid defining global_allocator twice.
tag @jackcmay

@joncinque

What do you think we should do something simple like two test programs, once calls the other to keep the example super clean (rather then call token)?
Does the current cross-program-invocation example cover the builtin example (it calls system program

I definitely thing this example should invoke SPL Token.  The first thing people familiar with ERC-20 ask seems to be, "so how do I customize the SPL Token implementation for my application".  To which we reply, "please don't, there's a better way".
I conveniently wrote this example earlier today, https://github.com/mvines/solana-bpf-program-template/pull/3, that perhaps can be recycled in whole or part for this issue

@mvines What was the intent of writing that example in its own repo and not as an example under SPL?

Nope.  Just wanted to park it somewhere for now, and seemed easiest to add it under my account for now.

Cool, I'll add it to the examples

@jackcmay my bad, I put this in late yesterday and hadn't read through all of the examples you've already provided.  the cross-program-invocation program is perfect as it is for using builtins.  I was thinking the same thing as @mvines regarding an spl-token CPI example, since most people want to work with tokens.

@joncinque the global allocator conflict should go away now that SPL is on v1.4.8.  I remove the extra checks in this PR: https://github.com/solana-labs/solana-program-library/pull/852


Ability to create docker registry endpoints for devops extension from the azure cli so that it can be scripted.

Is your feature request related to a problem? Please describe.
I want to automate setting up azure devops projects where i want to be able to bootstrap things like Github connection, External Docker Registry connections etc. In the UI I can create service-endpoints and use it in the pipeline but the devops extension doesn't allow me to create the same.
Describe the solution you'd like
I would like the azure devops extension to support the creation of service endpoints for all the types that are supported in the GUI.
Describe alternatives you've considered
Just do it in the GUI.

Please open an issue at https://github.com/Azure/azure-devops-cli-extension


Refactor response for getting metadata API

Following API requires improvements into its response: "/api/package/{publisher}/{package} -
DPR meta-data get operation". There is a typo in datapackag_url but we also want to rename it. Also we want to remove views property from the top level as it is already in descriptor.
http://staging.datapackaged.com/api/package/core/finance-vix
Acceptance Criteria

[x] response has bitstore_url with value as .../_v/latest
[x] response has not views in top level

Tasks

[x] fix datapackag_url => bitstore_url: ..._v/latest

[x] rename datapackag_url => bitstore_url
[x] remove datapackage.json from the url

[x] remove views from the top level object
[x] change the upload url for datapackage.json (remove datapackage.json from the end)

Currently dpm publish does not work - throws 500 as we need to change upload URL from .../lates/datapackage.json to .../latest

FIXED. if relative path to file ends with datapackage.json it is replaced with empty string ('')

This issue was misunderstood:

we want to have metadata with bitstore_url on .../_v/latest/
we still want to have actual datapackage.json on .../_v/latest/datapackage.json

At the moment, we are not getting datapackage.json from above uri, which is crucial for our service to operate.

FIXED


Prepare for b8 release, set changelog date and adjust pypi link.

Thanks for the migration guide/sample fixes, I hadn't been even thinking in that vein when proofreading but they're mighty good catches on all parts.

/check-enforcer evaluate


sql: remove experimental flags around primary key changes

PR: https://github.com/cockroachdb/cockroach/pull/45753
From release notes:

The experimental variable gating around usages of online primary key changes is now removed. [#45753][#45753] {% comment %}doc{% endcomment %}

Fixed by #6830.


mutagen_enabled: true should be global default on macOS in v1.22.0

Is there an existing issue for this?

[X] I have searched the existing issues

Is your feature request related to a problem?
People don't know that mutagen is great for everybody.
Describe your solution
Make the global config mutagen_enabled: true default for next major release
Describe alternatives
No response
Additional context
No response

Just here to give a big 👍 from me. Is there a way to not have that be the case on Linux or systems where it doesn't make sense?


coverflowEffect slideShadows: false doesn't work

Check that this is really a bug

[X] I confirm

Reproduction link
https://codesandbox.io/s/swiper-effect-coverflow-forked-c9rhu?file=/index.html
Bug description
slideShadows effect can't be turned off
Expected Behavior
I tried to remove slide shadows using
slidesShadows using only slideShadows: false and then also using it in a coverflowEffect: {in here}
it didn't work, as u can clearly see in the code sandbox I provided
Actual Behavior
Nothing changes,
I also tried removing it with css but it got overwritten or something
Swiper version
latest
Platform/Target and Browser Versions
macOS , Safari Version 14.0.3
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
[X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

[ ] I'm willing to open a PR

The demo you provided is wrong, you have two coverflowEffect props, one overwrite another one


Add rating component to vortex

As a user i should be able to rate the Vortex dApp
Acceptance criteria

After successfully completing offramp on Vortex, show the rating pop-up
The pop-up should close after rating is received.
Once the rating is received from the user, they should not be prompted for rating for 15 days.
If the user closes the pop-up without providing rating, show it after 15 days
Following info to be captured in a excel file/database

Rating

Note

Linking the same design for Portal rating to avoid double work
Replace the text "How would you rate our interface?" with "How would you rate your experience?"
Show it at the bottom of the screen on the success screen
This ticket is to capture the CSAT score of end users

Design
https://www.figma.com/proto/5up5sghcttBogehUq4255i/App?node-id=2849-5156&t=t26OmPb2nSn7Axcj-0&scaling=scale-down&page-id=136%3A114&starting-point-node-id=2849%3A5156

Hey team! Please add your planning poker estimate with Zenhub @ebma @Sharqiewicz @TorstenStueber

We haven't implemented this in the portal yet, right? Can you still link to the respective issue ticket in the portal? Github will show the link in both tickets once you mention it here so it's easier to find, no matter where we end up implementing it first.

Also let me know if anything unclear, also can we capture this in the same google sheet where we are dumping txns? maybe in the same doc but separate sheet?

Yes, we could dump it to the same overall document. However, we are already using two separate Google Sheets for storing the user email vs the transaction dump. So following that structure, we would actually need to create a third page. @pendulum-chain/devs any thoughts? Should we break the logic and add the user rating to the same doc or create a new one?

@ebma I think we could in this case add it to the email sheet.
Btw, will we distinguish user by their wallet? Or by the local store. Because if it is wallet we could add the rating to the transaction spradsheet which already saves them.

I think we shouldn't add it to the same table as the transaction dump because then we'd need to retroactively find the row that belongs to the same transaction. Which shouldn't be too hard since we have all the information available but maybe we can keep it simple and without coupling. If we decide to update existing rows we might introduce bugs that mess up the existing data.
I would suggest we store a pair of walletAddress + rating in the sheet and add a timestamp that tracks the last user interaction with the rating (be it a dismissal of the dialog or an actual rating submission) to the localStorage.

@ebma https://app.zenhub.com/workspaces/pendulum-6408a0365cda59c57d39bee5/issues/gh/pendulum-chain/portal/475

@ebma https://github.com/pendulum-chain/portal/issues/475

I would suggest we store a pair of walletAddress + rating in the sheet and add a timestamp that tracks the last user interaction with the rating (be it a dismissal of the dialog or an actual rating submission) to the localStorage.

Good idea ✅

I would suggest we store a pair of walletAddress + rating in the sheet and add a timestamp that tracks the last user interaction with the rating (be it a dismissal of the dialog or an actual rating submission) to the localStorage.

Sounds good, let's do this in a different sheet then.

@prayagd Can I pick it up?

I would suggest we store a pair of walletAddress + rating in the sheet and add a timestamp that tracks the last user interaction with the rating (be it a dismissal of the dialog or an actual rating submission) to the localStorage.

Like this idea

@prayagd Can I pick it up?
Yes ser please, go ahead


Does this tool support 0x20 encoding?

When proxying the DNS requests, can this tool send the response using proper 0x20 DNS encoding? Does it do this by default?
I would suggest adding a note about this (whether or not the tool supports it) to the README.

Hi,
As mentioned in the README, SnitchDNS does not implement its own DNS library but is based on Twisted. I had a look at the features/code/tickets and couldn't find any reference to 0x20 DNS Encoding, therefore it's not supported in SnitchDNS either.
Thanks,
Pavel

What would be required to add support for 0x20 DNS encoding? Also, where are Twisted's issue documented? It appears that they're turned off on GitHub

Twisted's issues are documented here: https://www.twistedmatrix.com/trac/report/1?sort=component&asc=1&page=1
If they implement it in the library, then I could make it an option in SnitchDNS.

Feature requested. See you in a year.
Twisted feature request ticket. https://twistedmatrix.com/trac/ticket/10272


Blog post about solving problems by reformulating

Roots in programming. Asking "why?" instead of just jumping into a nasty hack.
e.g. "Send more people to college" could be reformulated into "Fix the job market, send less to college, get better signals for employers"

https://twitter.com/levie/status/586388783785873408
"Enterprise software used to be about making existing work more efficient. Now, the opportunity for software is to transform the work itself."


[KeyboardDatepicker] value automatically set when opening and min max out of range

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
When opening the datepicker, it will automatically trigger onChange when the KeyboardDatepicker is provided with a minDate & maxDate not including today's date.
Expected Behaviour 🤔
When opening the datepicker, onChange should not be triggered.
Current workaround 🤔
Provide the datepicker with the props initialFocusedDate and set to a date between the provided custom range.
Steps to Reproduce 🕹

Steps:
Link: https://codesandbox.io/s/still-fast-6t6pb?file=/src/App.js

Open the console
Open the datepicker and see the onChange message
Comment the minDate, maxDate and refresh the page
Open the datepicjer and see that onChange wasn't triggered

Context 🔦
In my current implementation the onChange being called would update a few parent component with the new Date which would then close the datepicker and replace it by another component.
Your Environment 🌎

`npx @material-ui/envinfo`
  System:
    OS: macOS 10.15.7
  Binaries:
    Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.17.0/bin/yarn
    npm: 7.15.0 - ~/.nvm/versions/node/v14.17.0/bin/npm
  Browsers:
    Chrome: 92.0.4515.107
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.1.2
  npmPackages:
    @material-ui/core: ^4.12.1 => 4.12.1
    @material-ui/pickers: ^3.3.10 => 3.3.10
    @material-ui/styles:  4.11.4
    @material-ui/system:  4.12.1
    @material-ui/types:  5.1.0
    @material-ui/utils:  4.11.2
    @types/react:  17.0.13
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2

Thanks for the feedback.
Intuitively I would agree. I would've expected the picker to be rendered in an invalid state since the value is out of range. Would you agree?

Just realized that you're still using @material-ui/pickers which is no longer maintained. You want to use @material-ui/lab instead with which the issue no longer reproduces: https://codesandbox.io/s/basicdatepicker-material-demo-forked-oi8p0?file=/demo.tsx

I was hoping the current version would be fixed but if it's no longer maintained, my workaround will do until the next major release come out.
@eps1lon Thanks for the reply and context


Question: What about hide/skip Main file from src folder

As far as I know, the Main class in Mork should not be modifiable, so why show it in the source folder?

To give the user an obvious entry point, usually IDEs detect the main method and configure run buttons accordingly:

Although it is not necessary, removing it could cause more confusion, opinions?

I was thinking about include the Main class in the core.
Do IDE consider/detect Main classes of external libraries? If so, Main class will be totally invisible to the developer.
If the developer needs to create its own Main class, he could do it based on the Main class of the core.

Not a priority right now, may review in the future. PRs always welcome though if there is interest.


Create Dockerfile to allow easy access/testing of Numba with Python 3.11 support

As title, maintainers feel free to edit.
Steps to include:

[x] Making a Python 3.11 branch on numba-hatchery

[x] Fixing numba-hatchery to "just compile and not test" https://github.com/numba/numba-hatchery/pull/1.
[x] Adjust numba-hatchery to refer to the py3.11 branch (at a specific hash) of Numba and the corresponding llvmlite PR. (https://github.com/numba/numba-hatchery/pull/2)
[x] Adjust numba-hatchery to use a non pre-release Python 3.11 docker image. (https://github.com/numba/numba-hatchery/pull/2)
[x] Adjust numba-hatchery to work on x86_64/amd64 only. (https://github.com/numba/numba-hatchery/pull/4)

[x] Posting to discourse, explicitly note the few things that are known to be not working yet.

[x] https://numba.discourse.group/t/ann-docker-image-for-early-testing-numba-on-python-3-11/1698

Completed!