Admin user creation

First admin does not need to be created.
Admin should be able to create/mark another account as another admin.
Admin view has a list of all accounts

Some notes related to this:

Use bcrypt to hash the password on the backend

https://www.npmjs.com/package/bcrypt

We should decide between using the Bearer scheme and cookies

Cookies

Set JWT to http-only cookies with like 1-hour expiration
Set JWT on every request -> middleware is good for this
Frontend automatically sends cookies
Backend middleware checks request cookies

Bearer

During authentication return the generated JWT token to frontend
Frontend saves the token to local storage etc
With every request, the frontend sends the token in the Authorization header
Backend reads it from the header and acts accordingly


Add Greenbids Real Time Data Module

🔧 Type of changes

[ ] new bid adapter
[ ] update bid adapter
[ ] new feature
[ ] new analytics adapter
[x] new module
[ ] bugfix
[ ] documentation
[ ] configuration
[ ] tech debt (test coverage, refactorings, etc.)

✨ What's the context?
Greenbids Real Time Data module to filter bidders SSP listed in the imp[].ext.prebid.bidder of the bid request at the processed-auction-request stage.
🧠 Rationale behind the change
Artefacts and caching
To perform the filtering the module uses the ML pipeline that outputs the probability of bid per bidder for each imp for the given BidRequest. Then this probability of bid is compared with the threshold to ensure target True Positive Rate (TPR) defined for each partner publisher. Thus the RTD module uses 2 artefacts that are fetched from the Greenbids Google Cloud Storage bucket

ML predictor in .onnx format
Probability thresholds in .json format with the list of thresholds and their corresponding TPRs

On Greenbids side these artefacts are updated every 15 min in the storage. In the classes ModelCache and ThresholdCache we introduce the caching of these artefacts on RTD side with the cache expiration delay of 15 min using Caffeine. When the artefacts are fetched they are put into the cache with their corresponding keys. When the new thread withe the BidRequest is hooked by the module we search the artefacts from the cache.

if cache hit then we proceed with prediction and filtering
if cache miss then the thread is tryLocked to fetch the artefacts from GCS. If another thread arrives when the mutex is already locked it skips the fetching, skips the filtering and the RTD hook returns the InvocationResult with no_action and BidRequest unchanged

When the artefacts are fetched we craft ThrottlingMessage with the features necessary for inference. The inference time for a single row of data is up to 0.2 ms in normal regime and 3.5 ms at the first call after fetching (warmup).
Communication with AnalyticsReporter and Exploration
The RTD module also communicates the filtering results with the GreenbidsAnalyticsReporter via AnalyticsTags. Here we populate AnalyticsResult of AnalyticsTag for each Imp the with

fingerprint (greenbidsId),
isKeptInAuction map of booleans for each bidder wether we keep them in auction or not for the given imp,
isExploration flag that is necessary to isolate the training log

Then the AnalyticsTag is then parsed by the AnalyticsReporter from ExtBidResponsePrebid and its content added to the analytics payload sent to Greenbids server.
The Exploration part of traffic is split randomly with the ratio defined for each partner publisher per bid requests and is not filtered by the RTD module.
Publisher settings
We have observed 2 options how to handle the settings by the activated partner publishers to avoid adding them to the code base

add the list of authorized partners with their configs (target TPR, Exploration Rate, pbuid) in the prebid-config-with-modules.yaml common config of prebid and update it buy sending manually to PBS team
let publishers add their configs direclty into bid-request.json where they indicate the activation of our module in bid request extenstion bid-request.ext.prebid.analytics.greenbids and bid-request.ext.prebid.analytics.greenbids-rtd . Here we use analytics extension in the hierarchy of both moduels as there is no RTD extensions in ExtRequestPrebid , so this is a workaround to add both modules configs but to name them differently, something like analytics.greenbids-analytics and. analytics.greenbids-rtd

At the given moment the 2nd option is implemented in the RTD module.
"ext": {
    "prebid": {
      "targeting": {
        "includewinners": true,
        "includebidderkeys": true
      },
      "analytics": {
        "greenbids": {
          "pbuid": "PBUID_FROM_GREENBIDS",
          "greenbidsSampling": 1
        },
        "greenbids-rtd": {
	        "pbuid": "PBUID_FROM_GREENBIDS",
	        "targetTpr": 0.95,
	        "explorationRate": 0.001
        }
      }
    }
  }

🧪 Test plan
We are testing the following cases

shouldExitEarlyIfPartnerNotActivatedInBidRequest  when the partner is not activated so the extension bidrequest.ext.prebid.analytics.greenbids-rtd is not defined -> we skip filtering and return FutureSucceeded without modifiying BidRequest
shouldExitEarlyIfModelIsNotAvailable when ONNX model is not in cache on the partner and GCS bucket or the artefact init is not available -> we skip filtering and return FutureSucceeded without modifiying BidRequest
shouldExitEarlyIfThresholdIsNotAvailable same as above
shouldNotFilterBiddersAndReturnAnalyticsTagWhenExploration when we are at the exploration, the model should do the inference but the BidRequest stays unchanged. We populate the AnalyticsTag with the inference results and send it to AnalyticsReporter by indicating all bidders in the result as isKeptInAuction = true
shouldFilterBiddersBasedOnModelResults the nominal case when the module operates end2end: we filter the bidders and return the update BidRequest with modified bidrequest.imp[].ext.prebid.bidders and send AnalyticsTags to AnalyticsReporter.
shouldFilterBiddersBasedOnModelIfAnyFeatureNotAvailable if by any reason some features are not available in the BidRequest (ex: user IP address or device are null) -> we do the inference anyway same as in normal case but with filling the absent features with empty strings

🏎 Quality check

[ ] Are your changes following our code style guidelines?
[ ] Are there any breaking changes in your code?
[ ] Does your test coverage exceed 90%?
[ ] Are there any erroneous console logs, debuggers or leftover code in your changes?

I don't see any tests that cover ModelCache, ThresholdCache and OnnxModel classes, the most important ones I believe
after you add them, I believe the hook test can be simplified

Hi, have added the tests
ModelCacheTest
	getShouldReturnModelFromCacheWhenPresent
	getShouldSkipFetchingWhenFetchingInProgress
	getShouldFetchModelWhenNotInCache
	getShouldThrowExceptionWhenStorageFails
	getShouldThrowExceptionWhenOnnxModelFails
	getShouldThrowExceptionWhenBucketNotFound

ThresholdCacheTest
	getShouldReturnThresholdsFromCacheWhenPresent
	getShouldSkipFetchingWhenFetchingInProgress
	getShouldFetchThresholdsWhenNotInCache
	getShouldThrowExceptionWhenStorageFails
	getShouldThrowExceptionWhenLoadingJsonFails
	getShouldThrowExceptionWhenBucketNotFound

OnnxModelRunnerTest
	runModelShouldReturnProbabilitiesWhenValidThrottlingInferenceRow
	runModelShouldThrowOrtExceptionWhenNonValidThrottlingInferenceRow

Then removed some redundant test cases from hook test
Remarks on OnnxModelRunnerTest: OrtEnvironment is not very much mockable as when mocking it NPE on OnnxTensor.createTensor is thrown. So I've used the givenOnnxModelRunner to   return real object OnnxModelRunner. Also we are testing the wrapper class OnnxModelRunner, so no need in testing the base classes OrtEnvironment and OrtSession.

some of UT fails, please check before pushing

The errors in UT were due to Unnecessary stubbings detected when mocking GCS storage, bucket, blob. But we have to mock them to be able to simulate test case. So I've added @Mock(strictness = LENIENT) on these objects


Cannot import AudioKit with cocoapods

Hello,
I am running xcode 11.3.1
When I make a new blank project, first run 'pod install' with the following podfile:
target 'testAK' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for testAK
  pod 'AudioKit'

end

I cannot build, I get a 'Failed to load module 'AudioKit' ' Error.
alongside a long list of other errors. ( https://imgur.com/a/J5SqAC8 )
What could be wrong?
Thnx

Try upgrading to Xcode 11.4

Try upgrading to Xcode 11.4

Can't - I need to stat on Mojave.

In that case, try to request version 4.9.4 explicitly, since that one was built on Xcode 11.3.

In that case, try to request version 4.9.4 explicitly, since that one was built on Xcode 11.3.

Thank you! That fixed it.

Try upgrading to Xcode 11.4

Can't - I need to stay on Mojave.

How to install 4.9.5 through Pod?

Try upgrading to Xcode 11.4

Can't - I need to stay on Mojave.

How to install 4.9.5 through Pod?

this is my Podfile now:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Header' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Header
  pod 'AudioKit', '4.9.4'

end


Compiler warnings in Raspberry-Pi3B

I see the following compiler warnings and notes while compiling the latest code in Raspberry-Pi (running on Raspbian Bullseye hf)
src/fft/src/asgram.proto.c:259:21: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  259 |     ascii[_q->nfft] = '\0'; // append null character to end of string
      |     ~~~~~~~~~~~~~~~~^~~~~~
src/fft/src/asgram.proto.c:258:10: note: at offset [-9223372036854775808,<PHONE_NUMBER>854775807] to an object with size at most<PHONE_NUMBER> declared here
  258 |     char ascii[_q->nfft+1];
      |          ^~~~~
gcc -g -O2    -Wall -fPIC -Wno-deprecated -Wno-deprecated-declarations -I. -Iinclude  -c -o src/fft/src/spgramf.o src/fft/src/spgramf.c
In file included from src/fft/src/spgramf.c:50:
src/fft/src/asgram.proto.c: In function ‘asgramf_print’:
src/fft/src/asgram.proto.c:259:21: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  259 |     ascii[_q->nfft] = '\0'; // append null character to end of string
      |     ~~~~~~~~~~~~~~~~^~~~~~
src/fft/src/asgram.proto.c:258:10: note: at offset [-9223372036854775808,<PHONE_NUMBER>854775807] to an object with size at most<PHONE_NUMBER> declared here
  258 |     char ascii[_q->nfft+1];
      |          ^~~~~

I'd like to reproduce this. What version of GCC are you running?

Ok, fresh install of Raspbian Bullseye (64-bit) running gcc (Debian 10.2.1-6) 10.2.1 20210110 indeed reproduces this warning.

I think it's a gcc 10+ thing. Should be resolved in 445c352d163008cba82d1aa8aefb55d881929360...8f092ddcb9f12863c72c6579da7c99908946b3da

I think it's a gcc 10+ thing. Should be resolved in 445c352...8f092dd

Thanks for the quick fix.


a question: :  neither PartialBlockIdentifier.Hash nor PartialBlockIdentifier.Index is set: unable to fetch tip block???

neither PartialBlockIdentifier.Hash nor PartialBlockIdentifier.Index is set: unable to fetch tip block
but my /block request and response is ok.  get request data from /network/status  to  /block . /network/** is validated.help help me?

Thanks for bringing this up, you can ignore the error for now, that's an issue in check:spec
Regarding block identifier validation, you can refer to https://www.rosetta-api.org/docs/models/PartialBlockIdentifier.html and ensure the following is complied:
When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block.

yes,I ignore this error,into check:data.
result.Block.Timestamp is<PHONE_NUMBER>637 ==> 2020-10-17 19:31:23,but rosetta-cli tell me :
Command Failed: unable to fetch block 1: timestamp is before 01/01/2000: 0: /block: /block not attempting retry: unable to sync to 117326642: unable to sync to 117326642


Set snsTopic property for aws-network-topology-operator on thor

Duplicate. Closing in favor of https://github.com/giantswarm/roadmap/issues/1683 .


Update reactotron to 1.11.0

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

Thank you fine folk of HomeBrew!  🍺 💃 🕺 🍺

Thanks @skellock.


Fix incorrect babel config file reading

Issue: #1148
What I did

Add a basic test suite for babel_config that tests:

A plugins key present as an array.
A plugins key present as a string.
No plugins key present.

Ensure that the config loads correctly in those 3 scenarios.

How to test
run:
 ./node_modules/jest/bin/jest.js babel_config

or manually use a .babelrc config file that follows those 3 scenarios.

Wow, can we have more of these PR's ❤ the unit tests!
Let me know if there's anything I can do for you.


constrained cores option available to other VMs too

See the VM specs table in section "Edsv5-series".
Only one VM is marked as having a constrained core size.
This needs to be corrected, as I see this size exits too "Standard_E4-2ds_v5"

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

ID: d3a25abf-5705-00bc-e619-d91a6de86df5
Version Independent ID: a4cf7710-8d9c-9157-a9b8-0d14198af7df
Content: Edv5 and Edsv5-series - Azure Virtual Machines
Content Source: articles/virtual-machines/edv5-edsv5-series.md
Service: virtual-machines
Sub-service: sizes
GitHub Login: @andysports8
Microsoft Alias: shuji

@ciufudean
Thanks for your feedback! We will investigate and update as appropriate.

Here is the complete list of constrained core Ev5 sizes. https://learn.microsoft.com/en-us/azure/virtual-machines/constrained-vcpu

@andysports8 Thanks for your quick responses.
@ciufudean If there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.

No questions, I just raised an issue the docs.
You can close this ticket by your process.

@ciufudean
We are going to close this thread as resolved but if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.


FanOut/Until Discussion

I like what you have built here, It's almost exactly what we need! We at mailgun have been using https://github.com/mailgun/holster/tree/master/syncutil for quite some time. However, there are two things missing from this library of which I would like to open for discussion.
Until
conc.WaitGroup.Until() https://github.com/mailgun/holster/blob/master/syncutil/waitgroup.go#L56
Until() simplifies running and stopping many long running go rountines. You can chain Until() multiple times and call Stop() to signal all the go rountine's which are looping to end.
func main() {
    // Golang std pattern
    {
        done := make(chan struct{})
        wg := sync.WaitGroup{}
        wg.Add(1)
        go func() {
            for {
                select {
                case <-time.After(time.Second):
                case <-done:
                    wg.Done()
                    return
                }
            }
        }()
        close(done)
        wg.Wait()
    }

    // Until
    {
        wg := syncutil.WaitGroup{}
        wg.Until(func(done chan struct{}) bool {
            select {
            case <-time.After(time.Second):
            case <-done:
                return false
            }
            return true
        })
        wg.Stop()
    }
}

In this example, we save state by not needing the obligatory done every time we start a new go routine. It also saves a single indent as we no longer need the for loop.  Our typical use case is to have many go rountines running which all need to be shutdown when the service ends. Avoiding the need for a donevariable  every time we use this pattern has been nice. Combined with the panic handling in the conc, Until would be even more useful.
Fanout
It appears that conc.pool provides almost everything our current implementation of Fanout does and more. However, we have a VERY common use case where we need to pass in a local variable to the closure to avoid race conditions.
{
    // Limits the max number of go routines running concurrently to 10
    // Loop will block when capacity is reached.
    fan := syncutil.NewFanOut(10)
    for i := 0; i < 100; i++ {
        // Should be updated to support generics
        fan.Run(func(o interface{}) error {
            num := o.(int)
            _, _ = http.Get(fmt.Sprintf("https://example.com/integers/%d", num))
            return nil
        }, i)
    }

    // Should be updated to return an err that supports
    // the new `Unwrap() []error` for multi errors in golang 1.20
    errs := fan.Wait()
    if len(errs) != 0 {
        panic(errs)
    }
}

This isn't a request to add these features so much as a wish to start a conversation around them and other common use cases which might not be covered here.

Hi @thrawn01! Thanks for reaching out.
Starting with Until, could this not be achieved with a context pool?
func main() {
	// Golang std pattern
	{
		done := make(chan struct{})
		wg := sync.WaitGroup{}
		wg.Add(1)
		go func() {
			for {
				select {
				case <-time.After(time.Second):
				case <-done:
					wg.Done()
					return
				}
			}
		}()
		close(done)
		wg.Wait()
	}

	// conc version
	{
		ctx, cancel := context.WithCancel(context.Background())
		p := pool.New().WithContext(ctx)
		p.Go(func(ctx context.Context) error {
			for {
				select {
				case <-time.After(time.Second):
				case <-ctx.Done():
					return ctx.Err()
				}
			}
		})
		cancel()
		p.Wait()
	}
}

a VERY common use case where we need to pass in a local variable to the closure to avoid race conditions

Yes, this is a rather...annoying...problem when it comes to the ergonomics of the library and goroutines/for loops in general. Interestingly, there has been some discussion recently about changing these semantics. The classic way to solve this is by redefining the variable inside the loop:
func main() {
	var wg conc.WaitGroup
	for i := 0; i < 100; i++ {
		i := i // redefined the variable to avoid loop aliasing
		wg.Go(func() {
			println(i)
		})
	}
	wg.Wait()
}

Alternatively, if you have a pre-collected list of things you're iterating over, you can use the iter package.
func main() {
	tasks := make([]int, 100)
	for i := 0; i < 100; i++ {
		tasks[i] = i
	}

	iter.ForEach(tasks, func(i *int) {
		println(*i)
	})
}

This isn't so much a question of how it can be achieved, as there is always the standard implementation. The question is
"Does Until make the code clearer and reduce state management enough to be included in conc or syncutil".
Your proposed p := pool.New().WithContext(ctx) works fine, but doesn't improve upon or achieve anything over using chan done. This pattern of usage requires both wg and done  to exist, or in your example p and ctx need to exist. If it is a common case where done or ctx is always useful outside just needing it to stop the go routines,  then Until becomes a useless as a state reducer.
I hope that makes sense. conc and syncutils as libraries are not solving a problem, they are instead quality of life improvements for developers. If Until doesn't improve the quality of life for a developer then it isn't useful in either library.

The Stop would possibly be a good addition to ContextPool so it would possible to cancel the context without the need cancel the parent context or return an error
func (p *ContextPool) Stop() error {
	p.cancel()
	return p.Wait()
}

Here is how it would look
func main() {
	// Golang std pattern
	{
		done := make(chan struct{})
		wg := sync.WaitGroup{}
		wg.Add(1)
		go func() {
			for {
				select {
				case <-time.After(time.Second):
				case <-done:
					wg.Done()
					return
				}
			}
		}()
		close(done)
		wg.Wait()
	}

	// conc version
	{
		p := pool.New().WithContext(context.Background())
		p.Go(func(ctx context.Context) error {
			for {
				select {
				case <-time.After(time.Second):
				case <-ctx.Done():
					return ctx.Err()
				}
			}
		})
		p.Stop()
	}
}

I like the use of iter which is quite ingenious. I expect the use of a pre-collected list of things is a very common use case for FanOut(). As such Iter() would be more appropriate and removes the need to pass in a local variable. ✨
I expect the exception to this would be reading from a channel to feed the FanOut(). I wonder if a channel version of iter is possible and would be more appropriate. If possible, I suspect It would likely remove any need for an implementation of FanOut() at all.
Thoughts?
Thinking out loud
I recall listening to rob pike lamenting the lack of generics in early versions of golang and because of this, there was no standard library version of FanOut(). I wonder why there still is no standard version 🤔

Ah, I see. Thanks for clarifying here!
I like the idea of Stop() as a more elegant way of handling this pattern. However, it's not super clear to me whether this toy example is actually a pattern that comes up. Could you provide a more realistic example of when someone might actually want to use Stop()?
In the provided example, we're calling Stop() immediately, which will cancel the spawned goroutines immediately. We probably never actually want to do something like that since we probably are always spawning goroutines to do some work and canceling immediately means no work will be done.
So what calls Stop() or triggers it to be called? It's probably some external, asynchronous signal right? Like...a Context? At that point, we're right back where we started by passing a context into the wait group.
 Why not just pass that context directly into
	// the pool?

	p.Stop()
}

I wonder if a channel version of iter is possible and would be more appropriate

Yes, it would definitely be possible. Not terribly difficult to implement either. And it does provide an easy way so concurrently process streams of unknown length with iter, making it viable for even large result sets that we don't want to collect into memory ahead-of-time.
However...I'm pretty allergic to making channels part of a public API, so I'd like to make sure the design is thought through first.
For the sake of discussion, let's take the following stripped-down design:
func ForEachCh[T any](input chan T, f func(T)) {
	task := func() {
		for v := range input {
			f(v)
		}
	}

	var wg conc.WaitGroup
	for i := 0; i < runtime.GOMAXPROCS(0); i++ {
		wg.Go(task)
	}
	wg.Wait()
}

Some arguments I can think of against adding a channel-based API to the iter package:

A caller must always close the input channel, otherwise a we face a deadlock. This must happen even in the face of panics, so close(input) must be defer-ed.
input must be fed somehow, and it has to be from another goroutine because ForEachCh blocks the calling goroutine. The caller now has to manage that goroutine.
We cannot safely provide form of cancellation because input must be consumed in its entirety, otherwise the feeding goroutine will block forever. We don't control the feeding goroutine, so we don't know if it will respect a context cancellation.
If we want to implement the Map equivalent of this pattern, we need both an input channel and an output channel, which adds even more complexity because now the caller also needs to always fully consume the output channel, needs to manager yet another goroutine, etc.

So what calls Stop() or triggers it to be called? It's probably some external, asynchronous signal right? Like...a Context? At that point, we're right back where we started by passing a context into the wait group.
I'm struggling to put words to why this pattern feels a little off, so bear with me 🙁

Sure! Our services own the entire problem domain they are trying to solve. Which includes async work, cron, and data movement between packages & services. These often require long running go routines which span the life time of the service. This pattern is so common we use a naming scheme where if a struct/package creates a long running go routine we call it package.SpawnThing() instead of package.NewThing(). Spawn() is a hint that you must also call Stop(). We noticed we were writing the same boiler plate code over and over with (done & wg) that we developed syncutil.Until().  You will note that Until() also includes a for loop, as this was also very common.
Kafka-Pixy is a public repo of ours (quite old) which has some examples of this pattern. While we no longer use this Factory interface, and no longer call every thing actor 😄  It can serve to illustrate how many structs implement this pattern and how common it can be in a service. https://github.com/mailgun/kafka-pixy/blob/master/offsetmgr/offsetmgr.go#L41

However...I'm pretty allergic to making channels part of a public API, so I'd like to make sure the design is thought through first.

I also have an allergy to using channels in a Public API.

Some arguments I can think of against adding a channel-based API to the iter package:

No amount of sugar or documentation can keep developers from not respecting or using channels correctly.

We cannot safely provide form of cancellation because input must be consumed in its
entirety, otherwise the feeding goroutine will block forever. We don't control the feeding
goroutine, so we don't know if it will respect a context cancellation.

You can check the channel prior to send, but that's not as important as using the channels properly and not getting yourself into a situation where you need to check for send because you improperly closed the Iter() before cleaning up your send side. Again, as much as I would want to, we can't keep dev's from making silly mistakes. However, If we can, we should encourage good behavior, but this is nearly impossible todo with channels. (One of the reasons I avoid it in my API's)
The best way to think about this is to ask "Is the alternative to this sugar a magnitude more painful than the possible pitfalls provided by my API?". Which, I'll admit is often a judgement call.
Here is a complete example of what we currently have today, and hopefully explains some of the common use cases.
package cmd

import (
	"log"
	"time"

	"github.com/mailgun/holster/v4/syncutil"
)

type Event struct {
	AccountID string
}

type EventProcessor struct {
	eventCh chan Event
	wg      syncutil.WaitGroup
	fan     *syncutil.FanOut
}

func (p *EventProcessor) SpawnEventProcessor() {
	// Since Cassandra performs better with lots of concurrency, we want
	// to handle each event with as much concurrency as possible and avoid
	// synchronous handling of events. Allow 30 concurrent handling of events.
	p.fan = syncutil.NewFanOut(30)

	// Run until we ask it to stop or until the channel is closed
	p.wg.Until(func(done chan struct{}) bool {
		select {
		case e, ok := <-p.eventCh:
			// This should be the common case
			if !ok {
				return false
			}
			p.fan.Run(func(obj interface{}) error {
				event := obj.(Event)
				if err := writeEvent(event); err != nil {
					log.Printf("err: %s\n", err)
					return err
				}
				return nil
			}, e)
		case <-done:
			// This only happens if we are forced
			return false
		}
		return true
	})
}

// HandleEvent is called by our kafka consumer to pass the event to the processor
func (p *EventProcessor) HandleEvent(e Event) {
	p.eventCh <- e
}

func (p *EventProcessor) Stop() {
	close(p.eventCh)
	wait := make(chan struct{})
	go func() {
		p.fan.Wait()
		wait <- struct{}{}
	}()

	// It's possible that `writeEvent()` is stuck talking to an external system because something
	// catastrophic happened. If that is the case we don't want to wait around forever as k8s will
	// get mad at us and force kill us, thus possibly not providing time to flush the data other from
	// processors in this service. So we wait for a reasonable amount of time, then force the work
	// group to close.
	select {
	case <-time.After(time.Minute):
		p.wg.Stop()
	case <-wait:
		p.wg.Stop()
	}
}

func writeEvent(e Event) error {
	// Talk to Cassandra and update a datapoint or something
	return nil
}

Here is a standard golang implementation. Which isn't horrible. Both implementations require the user to handle channels properly. Called HandleEvent() after p.eventCh will cause a panic, etc.... so I could add an atomic p.hasClosed to solve for this, or I could just not call HandleEvent() after I've called EventProcessor.Stop(). Using channels is fret with pitfalls that only experience can help remedy.
package cmd

import (
	"log"
	"sync"
	"time"
)

type Event struct {
	AccountID string
}

type EventProcessor struct {
	concurrentCh chan struct{}
	eventCh      chan Event
	doneCh       chan struct{}

	wg  sync.WaitGroup
	fan sync.WaitGroup
}

func (p *EventProcessor) SpawnEventProcessor() {
	// Since Cassandra performs better with lots of concurrency, we want
	// to handle each event with as much concurrency as possible and avoid
	// synchronous handling of events. Allow 30 concurrent handling of events.
	p.concurrentCh = make(chan struct{}, 30)

	// Run until we ask it to stop or until the channel is closed
	p.wg.Add(1)
	go func() {
		defer p.wg.Done()
		for {
			select {
			case e, ok := <-p.eventCh:
				// This should be the common case
				if !ok {
					return
				}
				p.concurrentCh <- struct{}{}
				p.fan.Add(1)
				go func(event Event) {
					defer func() {
						<-p.concurrentCh
						p.fan.Done()
					}()
					if err := writeEvent(event); err != nil {
						log.Printf("err: %s\n", err)
					}
				}(e)
			case <-p.doneCh:
				return
			}
		}
	}()
}

// HandleEvent is called by our kafka consumer to pass the event to the processor
func (p *EventProcessor) HandleEvent(e Event) {
	p.eventCh <- e
}

func (p *EventProcessor) Stop() {
	close(p.eventCh)
	wait := make(chan struct{})
	go func() {
		p.fan.Wait()
		wait <- struct{}{}
	}()

	// It's possible that `writeEvent()` is stuck talking to an external system because something
	// catastrophic happened. If that is the case we don't want to wait around forever as k8s will
	// get mad at us and force kill us, thus possibly not providing time to flush the data other from
	// processors in this service. So we wait for a reasonable amount of time, then force the work
	// group to close.
	select {
	case <-time.After(time.Minute):
		return
	case <-wait:
		p.wg.Wait()
	}
}

func writeEvent(e Event) error {
	// Talk to Cassandra and update a datapoint or something
	return nil
}

I think the use cases around (*ContextPool).Stop() (or more explicitly, CancelAndWait()?) seem to generally be long-lived goroutines (like the example above I think?), where the primary use case is concurrency control and goroutine cleanup on service shutdown, where you want to explicitly stop and wait for things in an order you control. @camdencheek made some comments on long-lived pools over at https://github.com/sourcegraph/conc/pull/89#issuecomment-1427102140 , but I think the may concern here is if you replace the above example's sync.WaitGroup usages with conc/pool, panics get swallowed until EventProcessor is explicitly stopped.
That aside, in the example above, you could manage p.fan easily with a ContextPool and your own cancellation context, but to control a second pool (p.wg) where you don't want to cancel both at the same time, you need another cancellation:
type EventProcessor struct {
	until *pool.ContextPool
	cancelUntil func()

	fan *pool.ContextPool
	cancelFan func()
}

func (p *EventProcessor) Stop() {
	close(p.eventCh)
	wait := make(chan struct{})
	go func() {
		p.cancelFan()
		_ = p.fan.Wait()
		wait <- struct{}{}
	}()

	select {
	case <-time.After(time.Minute):
		return
	case <-wait:
		p.cancelUntil()
		_ = p.until.Wait()
	}
}

In this case Stop / CancelAndWait would be nice sugar to avoid setting up cancellation contexts and calling cancel explicitly, but error handling becomes a bit hard to hold right because there could be a panic that only gets surfaced in each ContextPool's Wait().

Maybe I'm missing something from your requirements for FanOut, but the example can be rewritten to use shadowing with normal pools:
for i := 0; i < 100; i++ {
    i := i // each iteration gets its own var
    pool.Go(func() { /* use i as normal */ })
}


Prerendering a page that uses navigateTo results in an error

Environment

Operating System: Windows_NT
Node Version:     v19.9.0
Nuxt Version:     3.6.2
Nitro Version:    2.5.2

Reproduction
Do you have a starter template for reproductions?
Describe the bug
If you use navigateTo on a (nuxt) page that is prerendered, the prerendering fails as the status code is 302 and not 200:
Prerendering 4 initial routes with crawler                        nitro 20:02:29
  ├─ ....
  ├─ /download (208ms) (Error: [302] )                               nitro 20:02:31
                                                                     nitro 20:02:31
Errors prerendering:
  ├─ /download (302)

Additional context
This error comes from the check
https://github.com/unjs/nitro/blob/6bc50b2f9416dc9af6ba327440deea2ec8e35a33/src/prerender.ts#L171-L176.
If one adds res.status !== 302 it works well. I can open a PR with this fix, but I'm not sure if there are any negative consequences or if there is a better way to handle prerenders of redirects.
Logs
No response

I also get the same behaviour with Nitro 2.5.2 (Nuxt 3.6.2), that I didn't get with Nitro 2.5.1 (Nuxt 3.6.1), but because of redirect in the routeRules of nuxt.config.ts
  routeRules: {
    '/': {redirect: '/search'}
  },

I get this error:
...
Generated public .output/public
Initializing prerenderer
Prerendering 3 initial routes with crawler
   ├─ / (11ms) (Error: [307] )
   ├─ /200.html (48ms)
   ├─ /404.html (48ms)

Errors prerendering:
   ├─ / (307)

The 307 Temporary Redirect is interpreted as an error.
I suppose that all 3xx redirection status codes could be allowed.

Bumping this as currently any kind of redirect in a route completely blocks pre-rendering completely

Related https://github.com/unjs/nitro/issues/1418

Let's followup via #1418


getSystemVolume should be static

:clipboard: Description
The getSystemVolume should not be bound to an instance Sound, but should be accessible statically.
Like this:
import Sound from 'react-native-sound'
Sound.getSystemVolume(volume => console.log(volume))

:bulb: Alternatives
You can do this, but it's not ideal
import { NativeModules } from 'react-native'
NativeModules.RNSound.getSystemVolume(volume => console.log(volume))

If you think it makes sense, I can create a pull request for this 🙂

iOS => getSystemVolume keeps on returning 0, once it reaches 0


docs: Create version upgrade and future deprecations guide

Should we start a 'version upgrade guide' doc that would like this as a change developers should make when updating to the newer version of the SDK?
Originally posted by @aaronsteers in https://github.com/meltano/sdk/pull/732#discussion_r900408291

@edgarrmondragon gut says yes! And as we start building taps/targets on the SDK we'll be able to dogfood it as well 😄

We do have https://sdk.meltano.com/en/v0.30.0/deprecation.html


Question: How can I validate field for fixed value?

Question 1: I would like to validate with SimpleSchema.oneOf([{if field "type" equals "apple", validate by this schema}, {if field "type" equals "banana", validate by next shema}]). Therefore, Is is somehow possible to set in SimpleSchema "type" equals to "value"?
Question 2: Is it possible to create a new custom field type "Html" and sanitize somehow, for example somewhere in clean() method html fields for allowed html tags with "sanitize-html" package?
Thanks a lot.

Question 1: This package doesn't have literal types, but to figure out the correct oneOf schema, it uses the first schema that is valid. Therefore, I think you can do what you want by having allowedValues: ["apple] on the first schema and allowedValues: ["banana] on the second schema

Hi @aldeed, thanks for your answer. I was reported a long time before some "unexpected" behavior with "oneOf", I will try and an case of problem, I will let you know.


Feature: Picture in picture mode

For news and press events, as well as discussion rounds it would to very handy to have picture in picture as a feature.
The FOSS app NewPipe has it implemented.
https://github.com/TeamNewPipe/NewPipe/
There is also an Oreo feature that might be easier to implement, but Oreo has a small user base at the moment.
https://proandroiddev.com/picture-in-picture-working-in-android-oreo-46cb7c0ac917

Just saw #60


include Error.cause stack in log output

Very exciting! Thanks for picking this up

/snapshot

Shall we merge this @tim-smart ?

Shall we merge this @tim-smart ?

I'll test bun and a browser tomorrow, then I think we can.


Is there a reason why NgFacebook.prototype.login() is separated from NgFacebook.prototype.['logout', 'api', 'ui', 'getLoginStatus'] definition ?

I was reviewing the code and these 2 prototype methods looks exactly the same.
I mean they are different only because login() is not taking advantage of loadDeferred promise.
Is there a reason for that?

You seem to be right. The only difference might be the check for the isReady flag.
Thus, it could be that login method be mixed as well with others.
Could you send a pull request on it?


Failing tests on bleed rakudo

Example output: https://gist.github.com/Whateverable/0aef8e252affaf8ebc772c27af77c500
It was bisected to this rakudo commit: https://github.com/rakudo/rakudo/commit/1599873d1420fd5c06a10f8b134213866cbfd87e
So quite possibly it is actually related to this nqp commit: https://github.com/perl6/nqp/commit/f34562f5fb5bcf48dbf31c390ef57627706b9b66
Note that it works just fine with rakudo 1599873d1420^.
I can't really tell if it is some problem with rakudo or if this module (or one of its dependencies) is doing something wrong.

Backlink: RT #131919.

Just to confirm. Getting failure with rakudo.2017.08 after reverting https://github.com/perl6/nqp/commit/d4d77b66c46c57de800b147df61fe486b4486acd
Ungolfed:
use CSS::Module::CSS3;
use CSS::Module::CSS3::Actions;
my CSS::Module::CSS3::Actions $actions .= new;
my $css = '@font-face { font-family: MainText; src: url(gentium.eot); /* for use with older user agents */ src: local(\'Gentium\'), url(gentium.ttf) format(\'truetype\');  /* Overrides src definition */ }';

CSS::Module::CSS3.parse($css, :$actions, :rule<at-rule>);
say $actions.warnings>>.message;
# [extra terms following 'src' declaration: ('Gentium') , url (gentium.ttf) format ('truetype') - dropped]

Slightly golfed to the the following program:
use CSS::Module::CSS3::Fonts::AtFontFace;
say CSS::Module::CSS3::Fonts::AtFontFace.parse('{  src: local(\'Gentium\') }', :rule<declarations> )

which normally produces:
use CSS::Module::CSS3::Fonts::AtFontFace;
say CSS::Module::CSS3::Fonts::AtFontFace.parse('{  src: local(\'Gentium\') }', :rule<declarations> )

But after reverting https://github.com/perl6/nqp/commit/d4d77b66c46c57de800b147df61fe486b4486acd
use CSS::Module::CSS3::Fonts::AtFontFace;
say CSS::Module::CSS3::Fonts::AtFontFace.parse('{  src: local(\'Gentium\') }', :rule<declarations> )

Further golfed, and isolated from CSS::Module, as added to https://rt.perl.org/Ticket/Display.html?id=131919:
grammar Tst {
    rule local {:i('local')'(' [ \'<ident>\' ] ')'}
    rule declaration-list { <test-prop> * }
    rule declarations {
        '{' <declaration-list> '}'
    }
    rule test-prop { (src) ':'  <local> +% ',' }
    }
say Tst.parse('{  src: local(\'Gentium\') }', :rule<declarations> )

I'm not entirely sure why the fix is needed? On all v6.c releases the snippet you provided works OK.
Commits of interest are:

(2017-08-19) https://github.com/rakudo/rakudo/commit/c5cb74abebda54a6abb5f6dfc3a681e95a7dbe36
(2017-08-20) https://github.com/rakudo/rakudo/commit/2545e6d656ee97b23f09f508bb47f65be679507e

Some output: https://gist.github.com/AlexDaniel/10198eaebb128e03066058d3b0d70ad0

In other words, it was broken in Aug 2017 and I opened this ticket, but then it was fixed a few days later. No?


remove hook

Hi @hanouard
Thank you, I'd like to manage it as an option: https://github.com/zg2pro/zg2pro-formatter-plugin/pull/21


CORE-12696: Revert "Up Kafka max.poll.records to 500 (#3772)"

This reverts commit fdfaf46043a931bb82921f05d9b859ed132c4992.

Increasing max.poll.records to 500 has introduced a performance degradation in the soak-tests. Below are the tests executed in order to reach this conclusion:

Soak Tests build (10 minutes) using CORDA_CHART_VERSION=5.0.0-beta.1683094088097 (corda-runtime-os commit 2718e708076e8c74912d2913c1d7c23678ff03b5). Metrics Show that the mean is ~ 23ops/s.
Soak Tests build (10 minutes) using CORDA_CHART_VERSION=5.0.0-beta.1683180487996 (corda-runtime-os commit dc7af93b56cab4477bd3ca1030c26cd232f0ef29). Metrics Show that the mean is ~ 16ops/s.

$$> git log 2718e708076e8c74912d2913c1d7c23678ff03b5..dc7af93b56cab4477bd3ca1030c26cd232f0ef29  --pretty=oneline

dc7af93b56cab4477bd3ca1030c26cd232f0ef29 ES-313: use latest Java 11 Azul Zulu base image (#3779)
3fb9da88468daee90735e4ba7170d713479853b4 ES-175: remove redundant JavaDoc generation (#3750)
9d125c3fe5c3140c9c126c4b4b4548ff320f92e8 CORE-8714 Update authentication protocol (#3784)
ca43d08304a94e96e54c027a744e405f748ffdc2 CORE-11656 Add validations to `DigestServiceImpl.parseSecureHash` (#3743)
e0039cbc74e4f5bafab953e884c80146f334ea8e CORE-13158 Remove MGM CPB (#3764)
fdfaf46043a931bb82921f05d9b859ed132c4992 CORE-12696 - up kafka max.poll.records to 500 (#3772)
3c9d3495a8148f459b436fc07bc7070227107430 CORE-11838: Upgrade to Felix Security 2.8.4. (#3778)
9049bcdece9197f4ac3630e663ce8f46696e5e51 CORE-13137: Fix incorrect AMQP serialization test for WireTransaction. (#3776)

Soak Tests build (10 minutes) using CORDA_CHART_VERSION=5.0.0-beta.1683119169962 (corda-runtime-os commit ca43d08304a94e96e54c027a744e405f748ffdc2). Metrics Show that the mean is ~ 16.5ops/s.

There are no green builds in Jenkins between 9049bcdece9197f4ac3630e663ce8f46696e5e51 and ca43d08304a94e96e54c027a744e405f748ffdc2, so we don't have published helm chart versions available to test out of the box. I've created https://github.com/corda/corda-runtime-os/tree/feature/revert-kafka-max-poll-records pointing at commit 3c9d3495a8148f459b436fc07bc7070227107430 and triggered https://ci02.dev.r3.com/job/Corda5/job/Publish Helm Pipeline/job/feature%252Frevert-kafka-max-poll-records/1/ to get a valid helm chart pointing to 3c9d3495a8148f459b436fc07bc7070227107430.

Soak Tests build (10 minutes) using CORDA_CHART_VERSION=5.0.0-alpha.1683294095394 (corda-runtime-os commit 3c9d3495a8148f459b436fc07bc7070227107430). Metrics Show that the mean gets back to ~ 22.5ops/s.

I'll launch another 10 minute build using the artefacts produced by this PR once CI finishes green.

Soak Tests build (10 minutes) using the Helm Chart produced by this PR (CORDA_CHART_VERSION=5.0.0-alpha.1683296488427). Metrics Show that the mean is ~ 18ops/s.

I've executed a build of the current HEAD of corda-runtime-os for 15 minutes, the completion rate is ~22ops/s (metrics here).

Running again for 15 minutes, using the images generated from this PR, shows that the completion rate is ~20ops/s (metrics here).

Closing this PR now, as there are no performance improvements by reverting the change to max.poll.records.


Questions about training NER models

So, I'm glad I found this gem. Most NLP gems for Ruby seem to be many years out of date.
I got it up and running rather easily, but I am having some trouble that you may be ale to point em int he right direction about:
rake task to train the model:
trainer = Mitie::NERTrainer.new("#{Rails.root}/bin/total_word_feature_extractor.dat")

    # Give NER Model ingredient names to train it
    ingredient_data = CSV.read("#{Rails.root}/db/seeds/Recipes-All Recipes.csv", headers: true)
    ingredient_names = ingredient_data.map { |row| row.entries[0][1] }

    # Give NER Model measurement units to train it
    units =  %w(teaspoon tsp teaspoons tsps tablespoon tbsp tablespoons tbsps cup c cups ounce oz ounces gram gr g grams milligram mg miligrams calorie cals calories clove cloves')

    tokens = ingredient_names + units

    instance = Mitie::NERTrainingInstance.new(tokens)
    instance.add_entity(0..144, "Ingredient")
    instance.add_entity(145..170, "Measurement Unit")

    trainer.add(instance)

    model = trainer.train

    model.save_to_disk("#{Rails.root}/bin/eddi_model.dat")

"Soy Mustard Salmon" is actually the string name of of the ingredients in the CSV -- I expected it to say it was an Ingredient...but the generated model seems to score everything as a Measurement Unit -- despite it being a much smaller dataset in the instance.
I'm also noticing some portions where seems to match correctly, but it gives me the WHOLE string in the doc.entities data instead of the matching portion.
Example:

I will say that the ease of use was great -- I'm wondering if there's anything I can do to better train the model. More data?

Hey @hjoseph96, I'm not sure how well it'll work on short phrases (rather than complete sentences) or this specific use case, but for training, you'll want a training instance for each segment.
segment = "- 1 tablespoon minced garlic, (10g)"

# clean up data
segment = segment.delete_prefix("- ")

# tokenize
tokens = Mitie.tokenize(segment) # ["1", "tablespoon", "minced", "garlic", ",", "(", "10g", ")"]

# add entities
instance = Mitie::NERTrainingInstance.new(tokens)
instance.add_entity(1..1, "Measurement Unit") # tablespoon
instance.add_entity(2..3, "Ingredient")       # minced garlic
trainer.add(instance)


I used pip to install Spleeter, it doesn't work

So I ditched conda and used python installer and installed it and pip.
pip install spleeter
Requirement already satisfied: spleeter in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages
Requirement already satisfied: ffmpeg-python in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: norbert==0.2.1 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: pandas==0.25.1 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: requests in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: setuptools>=41.0.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: librosa==0.7.2 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: numba==0.48.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: tensorflow==1.15.2 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: importlib_resources in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from spleeter)
Requirement already satisfied: future in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from ffmpeg-python->spleeter)
Requirement already satisfied: scipy in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from norbert==0.2.1->spleeter)
Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from pandas==0.25.1->spleeter)
Requirement already satisfied: numpy>=1.13.3 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from pandas==0.25.1->spleeter)
Requirement already satisfied: pytz>=2017.2 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from pandas==0.25.1->spleeter)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from requests->spleeter)
Requirement already satisfied: idna<3,>=2.5 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from requests->spleeter)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from requests->spleeter)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from requests->spleeter)
Requirement already satisfied: audioread>=2.0.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from librosa==0.7.2->spleeter)
Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from librosa==0.7.2->spleeter)
Requirement already satisfied: joblib>=0.12 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from librosa==0.7.2->spleeter)
Requirement already satisfied: decorator>=3.0.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from librosa==0.7.2->spleeter)
Requirement already satisfied: six>=1.3 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from librosa==0.7.2->spleeter)
Requirement already satisfied: resampy>=0.2.2 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from librosa==0.7.2->spleeter)
Requirement already satisfied: soundfile>=0.9.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from librosa==0.7.2->spleeter)
Requirement already satisfied: llvmlite<0.32.0,>=0.31.0dev0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from numba==0.48.0->spleeter)
Requirement already satisfied: google-pasta>=0.1.6 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: astor>=0.6.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: protobuf>=3.6.1 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: wrapt>=1.11.1 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: grpcio>=1.8.6 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: keras-applications>=1.0.8 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: absl-py>=0.7.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: keras-preprocessing>=1.0.5 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: wheel>=0.26; python_version >= "3" in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: tensorflow-estimator==1.15.1 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: gast==0.2.2 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorflow==1.15.2->spleeter)
Requirement already satisfied: zipp>=0.4; python_version < "3.8" in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from importlib_resources->spleeter)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from scikit-learn!=0.19.0,>=0.14.0->librosa==0.7.2->spleeter)
Requirement already satisfied: cffi>=1.0 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from soundfile>=0.9.0->librosa==0.7.2->spleeter)
Requirement already satisfied: h5py in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from keras-applications>=1.0.8->tensorflow==1.15.2->spleeter)
Requirement already satisfied: markdown>=2.6.8 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2->spleeter)
Requirement already satisfied: werkzeug>=0.11.15 in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2->spleeter)
Requirement already satisfied: pycparser in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from cffi>=1.0->soundfile>=0.9.0->librosa==0.7.2->spleeter)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in c:\users\admin\appdata\local\programs\python\python36\lib\site-packages (from markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.2->spleeter)
You are using pip version 9.0.1, however version 20.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

But when I try spleeter separate -i audio_example.mp3 -p spleeter:2stems -o output I get
Traceback (most recent call last):
  File "C:\Users\admin\AppData\Local\Programs\Python\Python36\Scripts\spleeter-script.py", line 33, in <module>
    sys.exit(load_entry_point('spleeter==1.5.4', 'console_scripts', 'spleeter')())
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\spleeter\__main__.py", line 54, in entrypoint
    main(sys.argv)
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\spleeter\__main__.py", line 36, in main
    enable_logging()
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\spleeter\utils\logging.py", line 60, in enable_logging
    tf_logger = get_tensorflow_logger()
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\spleeter\utils\logging.py", line 27, in get_tensorflow_logger
    from tensorflow.compat.v1 import logging
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\tensorflow\__init__.py", line 99, in <module>
    from tensorflow_core import *
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\tensorflow_core\__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\tensorflow\__init__.py", line 50, in __getattr__
    module = self._load()
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\tensorflow\__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "c:\users\admin\appdata\local\programs\python\python36\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\tensorflow_core\python\__init__.py", line 52, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\tensorflow_core\core\framework\graph_pb2.py", line 7, in <module>
    from google.protobuf import descriptor as _descriptor
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\google\protobuf\descriptor.py", line 48, in <module>
    from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.
```

Why is it happening?

Hi again @mevsme
Not sure what's happening here but it seems your python environment is a bit messed up. I'd recommend starting from a clean virtualenv
Good luck


Yarn add error

$ yarn global add nm-prune
yarn global v1.2.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "ENOENT: no such file or directory, open '/Users/me/Library/Caches/Yarn/v1/npm-forever-agent-0.6.1-fbc71f0c41adeb37f96c577ad1ed42d8fdacca91/.yarn-metadata.json'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/me/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Fixed after cache clean


when, i select  a menu item from left drawer then the center view controller show me the last navigation view controller which a left before?

any solution for this problem
plz forword......


Deploy account using Cairo1 structure

At the moment it isn't possible to deploy or declare an Account using cairoVersion = '1'.
It should be possible to specify which cairoVersion the account is and relevant deploy and declare fn should take it into consideration.
This cairoVersion is already carried at several places, but it isn't taken into consideration.

deploy contract is generic and should work, can you specify an example of an issue ?
deployAccount is not adapted to Cairo 1 yet because we just recently got the first Account rewritten in Cairo 1 to test width.

Would you have any ETA regarding cairo1 account support? 😄

I'm working on it at the moment, so I hope this week

To clarify:

All operations from Cairo0 Account should work from before
Deploy Cairo1 account from Caito0 account should also work (deployAccount) from before

What I need to test is:

Deploy Cario 1 account from Cairo 1 account
All operations from Cairo 1 account

When I try to deploy a Cairo1 account I'm running into 'Input too long for arguments', is it normal?
Doing it from a Cairo0 account as follow:
  const { transaction_hash } = await accountToDeploy.deployAccount(
    {
      classHash: accountClassHash,
      constructorCalldata,
      contractAddress,
      addressSalt: publicKey,
    },
    {
      cairoVersion: "1",
    },

Not doing it from a cairo0 account but funding it then executing deployAccount (it should be able to pay for its own deployment), made a mall mistake.

Here i added test for it in this open PR so you can take a look into it:
https://github.com/0xs34n/starknet.js/blob/0ef1ec8624e294a526f8e97d856e70b6426a9ae3/__tests__/account.test.ts#L107
cairoVersion flag should only be used when you use cario 1 Account, even thoe i am still working on that as flag were intermidiate fix. So if you do stuff from Cartio 0 Account you don't use any flags.
const { transaction_hash } = await accountToDeploy.deployAccount(
    {
      classHash: accountClassHash,
      constructorCalldata,
      addressSalt: publicKey,
    })

Resolved


[CELEBORN-808] Remove unnecessary RssShuffleManager in 0.4.0

What changes were proposed in this pull request?
As title
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?

ping @pan3793 @waitinfuture @FMX

let's hold on it a well, at least wait for 0.3.0 released


XML: Use RAII wrappers instead of manual memory management

We (ClickHouse) use azure-sdk-for-cpp as a submodule to connect to Azure Blob storage.
Our comprehensive suite of tests is run under thread/undefined/memory/address sanitizers to detect issues before they hit production. One particular issue detected was a memory leak found and fixed in January 2023 which this PR upstreams.
Notes:
The problem was first addressed in azure 1.6 by these PRs: https://github.com/ClickHouse/azure-sdk-for-cpp/pull/4, https://github.com/ClickHouse/azure-sdk-for-cpp/pull/5, https://github.com/ClickHouse/azure-sdk-for-cpp/pull/6.
Every time azure-sdk-for-cpp was upgraded, the fixes have been picked into the current release. ClickHouse currently pulls in azure-sdk-for-cpp 1.12, also with the fix. This is to say that the fix has been part of our production code for a long while.
There was a previous attempt to upstream the fix (https://github.com/Azure/azure-sdk-for-cpp/pull/4647) but 1. that other PR was sort of different from this fix and 2. the contributor unfortunately disappeared and the PR was abandoned.
I cannot determine which exact memory leak the fix originally addressed. The original fixes in ClickHouse's fork of azure-sdk-for-cpp only state that they fix a memory leak but they don't link to a defect report (sorry). I could spend some time doing code and Git archeology but it is probably not worth the trouble. The idea of this PR is to manage memory using RAII - that is generally a good idea as makes the code safer and less prone to errors. I could not find any obvious places where non-use of RAII would lead to errors.
The PR also makes setup/teardown functions XmlGlobalInitialize and XmlGlobalDeinitialize public. This is required for another fix that frees memory in TLS allocated by libxml when azure/libxml is used by multiple threads: https://github.com/ClickHouse/ClickHouse/blob/907a3659262e9029fd2c257913c62fadfc3bc433/programs/server/Server.cpp#L929 (see https://github.com/ClickHouse/ClickHouse/pull/45796).
Two more notes:

For some weird reason, the XML wrapper code exists twice:

sdk/tables/azure-data-tables/inc/azure/data/tables/internal/xml_wrapper.hpp / sdk/tables/azure-data-tables/inc/azure/data/tables/internal/xml_wrapper.hpp
sdk/storage/azure-storage-common/inc/azure/storage/common/internal/xml_wrapper.hpp / sdk/storage/azure-storage-common/src/xml_wrapper.cpp

This PR only addresses the second file(s). If you think we should rather apply the same fixes in both sets of files, please push another commit into this PR. My personal preference is to kill one of the copies (the other one, ideally) - feel free to do so.

I am a Linux user and did not check or compile the code in the AZ_PLATFORM_WINDOWS ifdef. Perhaps the Windows code is good but kindly double-check.

@rschu1ze I'd like to confirm, you didn't observe any memory leak in the original implementation. This PR is just to adopt a good practice of memory management.

Sorry for the delay, I was on a business trip.

@rschu1ze I'd like to confirm, you didn't observe any memory leak in the original implementation. This PR is just to adopt a good practice of memory management.

I touched on this a bit in https://github.com/Azure/azure-sdk-for-cpp/pull/5767#issue-2394100700. In retrospective, I can't tell which exact memory leak was addressed, but the title of https://github.com/ClickHouse/azure-sdk-for-cpp/pull/4 says "Fix memory leak", so I assume there was some memory leak existed somewhere. In any case, I would argue that using RAII for resource management is a good idea makes generally sense.

Thanks for approving. I am good but as I mentioned in the commit message, the XML wrapper class exists as copypasta in another place. We ideally get rid of the other copy or apply the fix in the other location.

@rschu1ze can you fix the CI failures? There are some format issues.
cc @gearama for the copypasta  in table package.

Fixed the formatting issues.
What remains is a compiler failure on Windows platforms:
D:\a\_work\1\s\sdk\storage\azure-storage-common\src\xml_wrapper.cpp(84,9): error C2027: use of undefined type 'Azure::Storage::_internal::XmlReader::XmlReaderContext' [D:\a\_work\1\s\build\sdk\storage\azure-storage-common\azure-storage-common.vcxproj]
D:\a\_work\1\s\sdk\storage\azure-storage-common\src\xml_wrapper.cpp(84,18): error C2039: 'reader': is not a member of 'std::unique_ptr<Azure::Storage::_internal::XmlReader::XmlReaderContext,std::default_delete<Azure::Storage::_internal::XmlReader::XmlReaderContext>>' [D:\a\_work\1\s\build\sdk\storage\azure-storage-common\azure-storage-common.vcxproj]

Upon a quick look, it is not clear why compilation fails here but I unfortunately don't have access to a Windows/MSVC system to reproduce this locally. I'd really appreciate if someone could do that - thanks a lot!

Hi @rschu1ze , please apply below patch to fix build on Windows
diff --git a/sdk/storage/azure-storage-common/src/xml_wrapper.cpp b/sdk/storage/azure-storage-common/src/xml_wrapper.cpp
index 40f5ce10..ede70454 100644
--- a/sdk/storage/azure-storage-common/src/xml_wrapper.cpp
+++ b/sdk/storage/azure-storage-common/src/xml_wrapper.cpp
@@ -31,7 +31,7 @@ namespace Azure { namespace Storage { namespace _internal {
   void XmlGlobalInitialize() {}
   void XmlGlobalDeinitialize() {}

-  struct XmlReaderContext
+  struct XmlReader::XmlReaderContext
   {
     XmlReaderContext()
     {
@@ -99,20 +99,14 @@ namespace Azure { namespace Storage { namespace _internal {
       throw std::runtime_error("Unsupported xml encoding.");
     }

-    m_context = context.release();
+    m_context = std::move(context);
   }

-  XmlReader::~XmlReader()
-  {
-    if (m_context)
-    {
-      delete static_cast<XmlReaderContext*>(m_context);
-    }
-  }
+  XmlReader::~XmlReader() {}

   XmlNode XmlReader::Read()
   {
-    auto context = static_cast<XmlReaderContext*>(m_context);
+    auto& context = m_context;

     auto moveToNext = [&]() {
       HRESULT ret = WsReadNode(context->reader, context->error);
@@ -222,7 +216,7 @@ namespace Azure { namespace Storage { namespace _internal {
     }
   }

-  struct XmlWriterContext
+  struct XmlWriter::XmlWriterContext
   {
     XmlWriterContext()
     {
@@ -276,20 +270,14 @@ namespace Azure { namespace Storage { namespace _internal {
       throw std::runtime_error("Failed to initialize xml writer.");
     }

-    m_context = context.release();
+    m_context = std::move(context);
   }

-  XmlWriter::~XmlWriter()
-  {
-    if (m_context)
-    {
-      delete static_cast<XmlWriterContext*>(m_context);
-    }
-  }
+  XmlWriter::~XmlWriter() {}

   void XmlWriter::Write(XmlNode node)
   {
-    auto context = static_cast<XmlWriterContext*>(m_context);
+    auto& context = m_context;
     if (node.Type == XmlNodeType::StartTag)
     {
       if (node.HasValue)
@@ -363,7 +351,7 @@ namespace Azure { namespace Storage { namespace _internal {

   std::string XmlWriter::GetDocument()
   {
-    auto context = static_cast<XmlWriterContext*>(m_context);
+    auto& context = m_context;

     BOOL boolValueTrue = TRUE;
     WS_XML_WRITER_PROPERTY writerProperty[2];

Hi @rschu1ze , please apply below patch to fix build on Windows

Thanks, done.

@rschu1ze This PR now looks good to me. We can merge it after fixing the clang format issue.

@rschu1ze This PR now looks good to me. We can merge it after fixing the clang format issue.

Done, thanks.

(Note to myself: bump to v1.12)


Adding a feature for a graphical programming environment for modeling, simulating and analyzing multidomain dynamical systems

A possible feature request for the cadCAD core-tech. It'll reduce the barriers to learn cadCAD. Converting frequently used and cadCAD syntactic functions, methods to a graphical programming language.

Marked as won't do.


KAFKA-4263: fix flaky test QueryableStateIntegrationTest.concurrentAccess

Call for review @bbejeck @dguy @guozhangwang
Note: first commit is code cleanup only. Second commit is actual fix (setting correct breakpoints you can reproduce the race condition)

let Producer only write a single input record
enter main test while-loop (this will spin forever, as long as producer is thread is stopped)
put break point into StreamsThread to suppress any further output
unblock producer thread and let if finish all its iterations
test while-loop will terminate and final "all key test" will run and fail (we produced a single record only and thus only one key is in the store).

On Jenkins this can happen if the StreamThread has a very long pause while the main test thread and producer thread both make regular progress.
The fix makes sure, that all keys are in the store before we start any test and thus this race condition is resolved.

@mjsax - the test failed in one of the runs above

Ah. I guess, we need to wait for both stores...
Updated this.

Retest this please.

retest this please

The explanation makes sense, will wait for the Jenkins to pass.

LGTM. Merged to trunk and 1.1.0.


Split sqlite into two packages

I would like to split sqlite into two packageS:

The library (no dependency on readline)
The executabe (dependency on readline)

This should help users that require a GPL free compilation of sqlite to make the clear case that they do not in fact depend on readline, a GPL library.
Let me know what you all thing.
To create the file list, i had to go through the linux, and windows packages manually and list out the files. This was dooable since this is a small package.
Checklist

[ ] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge/sqlite any thoughts here?

Let's get this in. At this point folks had the change to comment. If things fail we can pull the packages.


Updated CosmosDB analyzer to include SLA calculation

Completed: [Analyzer] Create SLA rule for CosmosDB

Thanks for this one!


chore(shared): Improve test coverage

Description
Improves our test coverage of @clerk/shared by testing some more utilities.
Checklist

[x] npm test runs as expected.
[x] npm run build runs as expected.
[ ] (If applicable) JSDoc comments have been added or updated for any package exports
[ ] (If applicable) Documentation has been updated

Type of change

[x] 🐛 Bug fix
[ ] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

Packages affected

[ ] @clerk/clerk-js
[ ] @clerk/clerk-react
[ ] @clerk/nextjs
[ ] @clerk/remix
[ ] @clerk/types
[ ] @clerk/themes
[ ] @clerk/localizations
[ ] @clerk/clerk-expo
[ ] @clerk/backend
[ ] @clerk/clerk-sdk-node
[x] @clerk/shared
[ ] @clerk/fastify
[ ] @clerk/chrome-extension
[ ] gatsby-plugin-clerk
[ ] build/tooling/chore

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.


Add tests to operator/pkg/httprequest and helm

Hi @adiprerepa. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/ok-to-test

@adiprerepa: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
276377a4567569dfdc141af1a71247b55d586252
link
/test lint_istio

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

@adiprerepa: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
276377a4567569dfdc141af1a71247b55d586252
link
/test lint_istio

gencheck_istio
276377a4567569dfdc141af1a71247b55d586252
link
/test gencheck_istio

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

I'm Still having trouble figuring it out. If you think the rest is ok, if you merge it I would be able to take another attempt at it. thanks. @dgn

@adiprerepa: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
a55ade8bca96e568c068cdf450095d8ac6b15819
link
/test lint_istio

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

@adiprerepa: The following tests failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

lint_istio
a55ade8bca96e568c068cdf450095d8ac6b15819
link
/test lint_istio

gencheck_istio
a55ade8bca96e568c068cdf450095d8ac6b15819
link
/test gencheck_istio

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

@dgn I figured out how to load the file. Is the rest OK?


[NEW] Improve server version check message

Let's make a dialog with more information.

This one is already present in version 2.0.0. I'm gonna close it.


HDT: smarter PFC decoding

Related to / part of #232
The DictionarySectionPFC is rather primitive at this point: it simply decodes / expands the plainfrontcoded S,P,O parts into memory while parsing the input stream.
This is OK for smaller files (a few tens of MB), but will introduce a processing bottleneck and memory issues on larger files (hundreds of MB).
So the idea is to first buffer the input stream, and only then start expanding S,P,O triples parts when needed. E.g. per buffer of N triple
(at the expense of some additional memory at the start, but with the possibility to fine-tune / reduce the much more memory-intensive string expansion parts)
This might also reduce overall speed, but there are several benefits:

handling of statements can start much sooner (so better overall performance / less timeouts)
smarter memory management (by discarding parts of buffer that is not needed anymore, and/or tweak things from the start: like keeping the "shared" dictionary in memory, but discarding the "not shared" objects)
releasing the input stream (much) earlier

FWIW, with these changes I was able to parse the Wiktionary English dataset from the HDT website (http://www.rdfhdt.org/datasets/), which is a 600 MB HDT file with 64 M triples, expanding to a 10 GB N-triples file.


sendmany??

What does it mean? I'm making a transaction
sendmany "" "{" HkVGfRexCF88AwQ2YJ2bSvT4ggv4FNFeBi \ ": 6590.09725277}"
in the block browser:
https://html.mastercalls.io/tx/a1bb4aee35d45751233e574a4e37f4e8af7f2253c60f03e65e71d9910d1b11d7
Where did the second deal come from?<PHONE_NUMBER>3?
in wallet
15/15/18 23:25 Confirmed (14 confirmations). Sent (no label) HiwwDbZVBSHDVVetERvDoJscsVGYumCQgQ -410.01617923
what does it mean?

Your inputs totalled more than the outputs. You cannot spent part of a UTXO but have to spend all of it, so your wallet creates a change address in the local wallet to send the remaining funds to. If you have a GUI enable coin control and look at the inputs window on the send tab or in the console dump the private key for the change address to prove that you own it.

Thank you! understood.

If i checked "dont use change address", But left spend unconfirmed change checked, would I lose html if the inputs where greater than the outputs?  Am I at risk of loosing "burning" html if I check "don't use change address".


datapath:OnlineSalesData.csv

what type of data i can use in my subject datapath:OnlineSalesData.csv

In the test, only csv was used, but basically any text data format can be supported, such as txt, json

NO i ask about what i will put in this csv

Put the data you want to analyze

like what

For example, if you want to analyze stocks, then put the stock data set
and set YourDataName.csv in data_storage

i want to use this tool to generate paper

It may only help you with part of the content

Due to the lack of OpenAI's API, I switched to using some models from Groq. I've tried installing them repeatedly but haven't succeeded. I wonder if the author will release a Docker version in the future

Will make Docker version


Add Sin and Cos to chainerx

This PR references #6423 .
Changelog:

Added sin and cos to chainerx routines. [ In the same fashion as tanh].
Added tests in math_test.cc and test_math.py.
Updated to docs.

Can one of the admins verify this patch?

Thanks for the PR! Could you fix also docs/source/chainerx/reference/routines.rst?

LGTM except for comments!

LGTM. Jenkins, test this please.

Jenkins CI test (for commit 593ad1d7475c77f386a6ea795444b14b88011efb, target branch master) failed with status FAILURE.
(For contributors, please wait until the reviewer confirms the details of the error.)

Jenkins failure is unrelated.

LGTM!

Jenkins CI test (for commit 593ad1d7475c77f386a6ea795444b14b88011efb, target branch master) failed with status FAILURE.
(For contributors, please wait until the reviewer confirms the details of the error.)


Store statements with line numbers and implement LIST statement

Statements with line numbers like 10 PRINT "WINDOWS" should be stored in run-time environment.
These statements should be printed with LIST command.

Reopened cause arithmetic expressions are not well-formatted now.


Make an actual 0.0.9 release

Looks like the normally generated files for github releases are missing :(
Can you generate the files for us so we can use your excellent project easier :)

Sorry, I released v0.0.10 for the forcibly bump.

Thanks!


alter ethernet checksum?

Colleagues, I'm using this great package to modify packets "on the fly" and found an issue.
I'm altering TCP checksum before accepting the packet. While there are no issues with TCP checksum, I see (in tcpdump) that Ethernet frame comes to remote host with incorrect checksum:
23:11:33.982227 52:54:00:b3:33:cd > 72:94:09:84:7b:4e, ethertype IPv4 (0x0800), length 84: (tos 0x0, ttl 63, id 29737, offset 0, flags [DF], proto TCP (6), length 70, bad cksum 7980 (->7972)!)
    <IP_ADDRESS>.54118 > <IP_ADDRESS>.443: Flags [P.], cksum 0x2a12 (correct), seq<PHONE_NUMBER>:3045093903, ack<PHONE_NUMBER>, win 507, options [nop,nop,TS val 127397601 ecr 557607335], length 18
    0x0000:  4500 0046 7429 4000 3f06 7980 cb00 7102  E..Ft)@.?.y...q.
    0x0010:  0a09 080b d366 01bb b580 71fd a59d 0585  .....f....q.....
    0x0020:  8018 01fb 2a12 0000 0101 080a 0797 eee1  ....*...........
    0x0030:  213c 69a7 3132 330a 416c 7465 7265 6420  !<i.123.Altered.
    0x0040:  6461 7461 0a0a                           data..

Is it possible to alter ethernet checksum as well? My code at the moment is simply got from the quickstart where there is nothing about Ethernet headers:
def check_and_modify(pkt):
    packet = pkt.get_payload()
    if <multiple checks>:
        <then modify and >
        pkt.set_payload(packet)
    pkt.accept()

nfqueue = NetfilterQueue()
nfqueue.bind(1, check_and_modify)
try:
    nfqueue.run()
except KeyboardInterrupt:
    print('Ctrl-C!')

Thank you!

The issue behind this is packet drop on ingress receiving host - the packet with incorrect ethernet frame checksum is silently dropped.
This is what I see on transit host:
11:32:52.934009 52:54:00:b3:33:cd > 72:d0:1c:2e:3e:42, ethertype IPv4 (0x0800), length 84: (tos 0x0, ttl 63, id 62499, offset 0, flags [DF], proto TCP (6), length 70, bad cksum f92c (->f91e)!)
    <IP_ADDRESS>.33916 > <IP_ADDRESS>.443: Flags [P.], cksum 0x1b4a (correct), seq<PHONE_NUMBER>:2338249493, ack<PHONE_NUMBER>, win 507, options [nop,nop,TS val<PHONE_NUMBER> ecr<PHONE_NUMBER>], length 18
    0x0000:  4500 0046 f423 4000 3f06 f92c cb00 7102  E..F.#@.?..,..q.
    0x0010:  0a09 0864 847c 01bb 8b5e db03 ff36 4eeb  ...d.|...^...6N.
    0x0020:  8018 01fb 1b4a 0000 0101 080a c810 1cf1  .....J..........
    0x0030:  5b74 bc5b 3132 330a 416c 7465 7265 6420  [t.[123.Altered.
    0x0040:  6461 7461 0a0a                           data..

and nothing on ingress of receiving host. In some cases it's possible to switch checksum check off, but not always and I'm the happy on:
root@sr:~# ethtool -k eth0
Features for eth0:
[ ... ]
rx-checksumming: on [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]

root@sr:~# ethtool -K eth0 rx-fcs on rx-all on
Could not change any device features

So, I will appreciate any ideas how to solve issue with Ethernet FCS when modifying packet.
Thank you.

My fault. I simply forgotten to update IP Header checksum :)


Steam authentication does not escape special chars

Bug Report
Certain special chars, which are allowed in steam PW, can break steamcmd auth. possibly related to stale #454
System Information

Ubuntu 20.04.3
AMP Release "Triton" v<IP_ADDRESS>, built 21/12/2021 15:39
Mainline

I confirm:

[x] that I have searched for an existing bug report for this issue.
[x] that I am using the latest available version of AMP.
[x] that my operating system is up-to-date.

Symptoms

What are you trying to do?

Authenticate to Steam for SteamCMD using username, password and steam guard code

What are you expecting to happen?

After entering valid username an password, a prompt for steam guard code to appear

What is actually happening? ('Nothing' is not an acceptable answer!)

The process hangs, or the password is incorrectly marked as invalid depending on which chars are in the password, thus no steam guard popup shows up and SteamCMD cannot download.

Reproduction

Create any instance that uses SteamCMD for a game that requires a purchase (e.g. Terraria)
Manage and update the instance
Try to log in with your username and password using the prompt from AMP
If your password contains ', ", \ or & (possibly more chars) problems can arise and authentication will fail

Using network debugger and amp logs you can see what happens:
If your password contains \, you can see in network debugger it gets 'escaped' as \\ but it in fact does not need escaping done that way and it ends up trying to log in with a password where every \ is \\ which will be incorrect for that user
If your password contains ' or " You can see in amp logs that it breaks the password argument in the SteamCMD command
If your password contains & I cannot confirm that this breaks auth, but in network debugger the url-encoded form data in the POST request will break, because & marks a new argument

Have you generated startup scripts with secure parameters on and verified that the actual arguments sent to SteamCMD are not escaped? Nothing in the browser is supposed to be escaped except as needed for JSON encoding.

I ran into the issue with SteamCMD on Ubuntu 20.04 yesterday as well. It worked fine on Windows though.  It contained . \ and # special characters. I kept getting incorrect apssword, but didn't grab the logs unfortunately.

Have you generated startup scripts with secure parameters on and verified that the actual arguments sent to SteamCMD are not escaped? Nothing in the browser is supposed to be escaped except as needed for JSON encoding.

I'm not sure what you mean with generated startup scripts. This is happening in the default shipped terraria instance too.
Here's a log output of trying to login with a password containing '
[14:26:40] [API:jasper Activity]  : Updating the application.
[14:26:40] [Core:jasper Error]    : Win32Exception
[14:26:40] [Core:jasper Error]    : [0] (Exception) : ApplicationName='socat', CommandLine=' EXEC:"/AMP/terraria/steamcmd.sh +force_install_dir 105600 +login "foobar" "foo'bar'foo'" +app_update 105600 validate +quit",pty,ctty,echo=0 STDIO', CurrentDirectory='/AMP/terraria/', Native error= Success
[14:26:40] [Core:jasper Error]    :   at Diagnostics.Process.StartWithCreateProcess (Diagnostics.ProcessStartInfo startInfo)
  at Diagnostics.Process.Start ()
  at ModuleShared.AMPProcess.Start ()
  at (wrapper remoting-invoke-with-check) ModuleShared.AMPProcess.Start()
  at steamcmdplugin.Steamcmdhelper.UpdateApp (String appName, String betaTag, Collections.Generic.IEnumerable`1[T] WorkshopItemIDs)

This does not output 'authentication failed' but instead just hangs the update

Test comment to check the Discord hook.

Input during steam prompt from Terraria instance update:
Username: foobar
Password: *ApqNXU2.ho&!M#YKQRTd*U+cB`1;wl^uG7Uc:AcufB?KRi5fU!lOvDD~fk*K5lr
Generated SteamCMD script:
#!/bin/bash
# Generated by AMP
if [ "$USER" != "amp" ]; then echo This script must be run as the 'amp' user.; exit 1; fi
cd "/AMP/terraria/"
"/AMP/terraria/steamcmd.sh" +force_install_dir 105600 +login "foobar" "*ApqNXU2.ho&!M#YKQRTd*U+cB\\`1;wl^uG7Uc:AcufB?KRi5fU!lOvDD\\~fk*K5lr" +app_update 105600 validate +quit

Log line:
[15:54:59] [steamcmdplugin:jasper Warning] : 2021/12/31 15:54:58 socat[58] E "EXEC:/AMP/terraria/steamcmd.sh +force_install_dir 105600 +login foobar *ApqNXU2.ho&!M#YKQRTd*U+cB\`1;wl^uG7Uc": wrong number of parameters (2 instead of 1)

Input during steam prompt from Terraria instance update:
Username: foobar
Password: #tW,p|x#=uu3MX?J1@@8R+G7wQD^I~cm16W&A#%tJ`'"::j'%z&;Xkpxa\4#C&TA
Generated SteamCMD script:
#!/bin/bash
# Generated by AMP
if [ "$USER" != "amp" ]; then echo This script must be run as the 'amp' user.; exit 1; fi
cd "/AMP/terraria/"
"/AMP/terraria/steamcmd.sh" +force_install_dir 105600 +login "foobar" "#tW,p\\|x#=uu3MX?J1@@8R+G7wQD^I\\~cm16W&A#%tJ\\`'"::j'%z&;Xkpxa\4#C&TA" +app_update 105600 validate +quit

Log line:
[16:05:11] [steamcmdplugin:jasper Warning] : 2021/12/31 16:05:10 socat[54] E parseopts(): unknown option "p\|x#"

Both these passwords are valid for steam accounts, i created an account with the first and changed its pw to the second with no issue.
This was done using the terraria module shipped with AMP, but occurs for all SteamCMD update tasks that require auth (through force or through steam requiring it) in generic modules as well.
I used the instructions from This wiki page to generate the scripts, is that what you wanted?

with secure parameters on

i don't know where to find that option if there is one
Let me know if there's anything else you need

Fixed in next build.


Synth Too Quickly

Level 24 Leatherworker, recipe is Toad Leather, Craftsmanship is 145, Careful Synthesis with no buffs results in progress of 24.  Optimizer thinks it will only give 20 progress.  This results in the Synth succeeding before the rest of the steps to increase quality occur.

Level 24 Leatherworker, recipe is Toadskin Survival Belt, Craftsmanship is 145, Careful Synthesis with no buffs results in progress of 22.  Optimizer has it as 17.

D'oh.  Just realized my LTW and CRP levels were not set correctly.  Not sure how they got messed up, but oh well.  Closing!


Mediapipe Install on NVIDIA Jetson Orin Nano Error: Invalid requirement: 'mediapipe==dev'

OS Platform and Distribution
Ubuntu 22.04
Compiler version
No response
Programming Language and version
Python 3.8 / 3.10
Installed using virtualenv? pip? Conda?(if python)
Built from source, generating Python wheel and attempt to pip install wheel
MediaPipe version
0.8.11
Bazel version
Bazelisk v1.8.1
XCode and Tulsi versions (if iOS)
No response
Android SDK and NDK versions (if android)
No response
Android AAR (if android)
None
OpenCV version (if running on desktop)
4.9.0
Describe the problem
I attempted to build the Mediapipe package for ARM64 Linux by following the following walkthrough (https://www.forecr.io/blogs/ai-algorithms/how-to-download-build-mediapipe-on-nvidia-jetson-xavier-nx), which worked on Jetpack 5.1.3. This, however, only let me use the CPU as delegate with TFLite and I wanted to try on Jetpack 6.0.2. The wheels compile but the installation of the wheel fails with this very short error.
Complete Logs
idealab@ubuntu:~/mediapipe/dist$ python3 -m pip install mediapipe-dev-cp38-cp38-linux_aarch64.whl
ERROR: Invalid requirement: 'mediapipe==dev': Expected end or semicolon (after name and no valid version specifier)
    mediapipe==dev
             ^

Hi @paulsadofsky,
Regrettably, We currently do not offer official support for the Nvidia Jetson Development Kit, encompassing both CPU and GPU functionalities. The sole endorsed edge device is the Raspberry Pi 64-bit, as outlined in our documentation.
For now, you may leverage the community-developed plugin accessible at https://github.com/anion0278/mediapipe-jetson, which includes GPU support as well and reasonably up-to-date. It's important to note that the implementation is based on version 0.8.9.
Thank you!!


Fixed precision issue in the AnimalsLoader

Summary Change Description
The problem was caused by the researcher using an excel formula to calculate the infusion rate.  The precision supported by excel had 2 more digits than the database could store, so whenever the record already existed, get_or_create would raise a ConflictingValueError.
To solve this, instead of calling get_or_create with the raw value, I applied sigfig() to the value and set the significant figures to 3.  And in order to support previously loaded values (and changes in significant figures in the future, I implemented a query that searches for values that are within the given precision.
Details:

Added text_util methods:

sigfigfloor
sigfigceil
sigfigrange

Added class attributes to Animal:

INFUSION_RATE_SIGNIFICANT_FIGURES
BODY_WEIGHT_SIGNIFICANT_FIGURES

AnimalsLoader

infusion_rate gets precision applied
boy_weight gets precision applied
Both are set to 3 significant figures
There is now a query preceding the get_or_create that searches for values within the precision indicated.

Affected Issues/Pull Requests

Resolves #1142
Merges into PR #1350

Review Notes

See comments in-line.
Checklist

This pull request will be merged once the following requirements are met.  The
author and/or reviewers should uncheck any unmet requirements:

Review requirements

Minimum approvals: 1
No changes requested
All blocking issues resolved by reviewers
Specific reviewers: @add_username_here

Review period: 2 days

Associated issue/pull request requirements:

[x] All requirements in affected issues marked "resolved" are satisfied
[x] All required pull requests are merged (or none)

Basic requirements

[x] All linters pass
[x] All tests pass
[x] All conflicts resolved

Overhead requirements

[x] New/changed method tests implemented/updated (or no change)
[ ] Updated Unreleased section of changelog.md (or no change)
[x] Migrations created & committed (or no change)

Hey @narzouni, based on your calling attention to negative numbers, I found some issues to fix and made some changes.  Would you mind reviewing those latest changes? You can limit the diff to just represent the last 2 commits.

For whatever reason, github won't let me add a comment in the code review... so I'm putting it here...
is_integer() doesn't support strings, which are accepted as input by this method in order to support significant zeroes, which python doesn't support in general.

    num (Any): a number with any number of digits/figures.  May be str, int, float with sign and optionally in
         scientific notation.

It's a reasonable suggestion though.  Perhaps I should include a string input in the examples.


Using metric map

Why you does not use map structure with more simple API in update scenarios:
let metric = Rc<...>;
service1(metric.clone());
service2(metric.clone());
...
fn service1(metric)
    let counter = 1;
    metric.update("service1.counter", counter.into());
...
fn service2(metric)
    metric.update("service2.status", "READY");
...

instead use
    let status = "READY";
    let row = format!("service2.status = {}", status);
    metric.update(row);

Any additional reasons?

The idea of this crate is to serve metrics that have already been serialized prior to calling update, which is why the underlying type is a Vec<u8>>.
Check out the examples for how I've been using this with a Prometheus registry.
I'm open to discussing other options for this API, though.


Uncaught (in promise): Error: StaticInjectorError(AppModule)[NbIsGrantedDirective -> NbAccessChecker]:

Issue type
I'm submitting a ...  (check one with "x")

[ x] bug report
[ ] feature request
[ ] question about the decisions made in the repository

Issue description
Current behavior:
I migrated my - in -development-ngx-admin-project- from ng 5.x to ng 6.0.x.
Now I get this runtime-error:
ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[NbIsGrantedDirective -> NbAccessChecker]:
StaticInjectorError(Platform: core)[NbIsGrantedDirective -> NbAccessChecker]:
NullInjectorError: No provider for NbAccessChecker!
Error: StaticInjectorError(AppModule)[NbIsGrantedDirective -> NbAccessChecker]:
StaticInjectorError(Platform: core)[NbIsGrantedDirective -> NbAccessChecker]:
NullInjectorError: No provider for NbAccessChecker!
at<EMAIL_ADDRESS>(core.js:979)
at resolveToken (core.js:1232)
at tryResolveToken (core.js:1182)
at<EMAIL_ADDRESS>(core.js:1077)
at resolveToken (core.js:1232)
at tryResolveToken (core.js:1182)
at<EMAIL_ADDRESS>(core.js:1077)
at resolveNgModuleDep (core.js:9238)
at<EMAIL_ADDRESS>(core.js:9919)
at resolveNgModuleDep (core.js:9238)
at<EMAIL_ADDRESS>(core.js:979)
at resolveToken (core.js:1232)
at tryResolveToken (core.js:1182)
at<EMAIL_ADDRESS>(core.js:1077)
at resolveToken (core.js:1232)
at tryResolveToken (core.js:1182)
at<EMAIL_ADDRESS>(core.js:1077)
at resolveNgModuleDep (core.js:9238)
at<EMAIL_ADDRESS>(core.js:9919)
at resolveNgModuleDep (core.js:9238)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4062)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
Expected behavior:
no error
Steps to reproduce:
I have no glue to what this error is related to .... do anybody have me a hint where I have to look at?
Other information:
node version: v8.11.1
npm version: 5.6.0
Angular CLI: 6.0.3
Node: 8.11.1
OS: win32 x64
Angular: 6.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package                           Version
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.3
@angular/cdk                      6.1.0
@angular/cli                      6.0.3
@angular/material                 6.1.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.3
@schematics/update                0.6.3
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

**Angular, Nebular**

"@nebular/auth": {
"version": "2.0.0-rc.8",
"resolved"<EMAIL_ADDRESS>"integrity": "sha512-uImudGbG2qcaTpimjJFyqRdxhjE62sQfqqzZcH//NsokXbC5+8YMfUMcX4SpPTYOpWsx4p9T4vEIUDJOoYIBnw=="
},
"@nebular/security": {
"version": "2.0.0-rc.8",
"resolved"<EMAIL_ADDRESS>"integrity": "sha512-aC3q1AR7jmF3Cm/TNT4Rut/ZQcmBrna0zNPxwg5cBSvWAPk3vRXVTYSFPQCNHDs2tyXJz4Xf50Sl2YJQhCiMnw=="
},
"@nebular/theme": {
"version": "2.0.0-rc.8",
"resolved"<EMAIL_ADDRESS>"integrity": "sha512-1BLG4J0ElUOHMjIJQ6lSSzMK+8iaPX1brDVPI3Ol0O0FTiyCPVXugyK09/GNX2Of4xUIZqX7VvNYGywiJ7dUTw=="
},

I solved it myself ....
had to reinstall @nebular/security
and there it was ;-)
thx

can you please share how ?

@boubaca
Just run "npm uninstall @nebular/security". After that, run "npm install @nebular/security".
Works for me!


VSIX Model editor dont support multiple xafmls per project anymore

Describe the bug
Previously it supported the following structure

now VSIX model windows show only one
Image

fixed in latest lab

eXpand.lab release 19.1.602.5 includes commit that relate to this task:

XpandModelEditor fails to discover additional xafml files #509

Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS.
Thanks a lot for your contribution.

Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.


[sdk] adding testing/scaffolding facilities

What?
This PR relies on the gemfile https://github.com/DataDog/datadog-sdk-testing/pull/1 to provide the testing and scaffolding facilities which we hope will aid in streamlining the development process. Just like the original PR we address the following:

setup the testing environment
generate empty skeleton files that should allow contributors to get up and running as quickly as possible.
create rake tasks for new integrations for seamless test execution.
include new rake integration test task in circle-ci.
help address python package version conflcts
(optionally) setup git pre-commit hooks.

workflow

rake setup_env
rake generate:skeleton[myintegration]
rake lint
rake ci:run[default]
rake ci:run[myintegration]

👍

👍 for the changes


fixes https://github.com/readium/readium-js-viewer/issues/675

( fullscreen API on iOS is missing )

The fix consists in using if (screenfull.enabled) { ... } to fence-off fullscreen API code.