@tf.function decorated functions cannot access class varaiables, tf.print() doesn't work

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Catalina 10.15.5
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): Binary
TensorFlow version (use command below): v2.2.0-rc4-8-g2b96f3662b 2.2.0
Python version: 3.6.10
Bazel version (if compiling from source): -
GCC/Compiler version (if compiling from source): -
CUDA/cuDNN version: -
GPU model and memory: Training on CPU

Describe the current behavior
I am trying to create a Q Learning algorithm using TF2. I have this class variable called memory that keeps increasing in size as training goes on. Inside the @tf.function decorated weight update function, when I print the size of memory, it seems to be always 1 (doesn't seem to increase). Here are the different configurations with which I tried this code,

With tf.compat.v1.disable_eager_execution() and @tf.function decorator

The tf.print() call inside this decorated function doesn't work, so I am not sure if this is actually training the model or not

With only @tf.function decorator,

The tf.print() call inside the decorated function works, but the class variable size is always constant (1).

With only tf.compat.v1.disable_eager_execution(),

The code raises this error TypeError: 'Tensor' object does not support item assignment
I tried to convert the Tensor into a numpy array, but it raises this error 'Tensor' object has no attribute 'numpy'

With neither tf.compat.v1.disable_eager_execution() nor @tf.function decorator,

The code works as expected but is extremely slow (because of the eager execution I presume)

Describe the expected behavior

The @tf.function decorator to be able to handle class variables that change during runtime.
The tf.print() calls to work even when tf.compat.v1.disable_eager_execution() is called

As listed above, method 1 seems to work as there are no errors, but there is no way for me to check whether my model is actually training or not as the tf.print() call doesn't seem to work. Ideally, I want method 1 to work as this is the fastest form of execution that matches the speeds of a similar implementation in TF1.1
Standalone code to reproduce the issue
import tensorflow as tf
from tensorflow import keras
import numpy as np
import random
import tqdm
import yfinance as yf

# tf.compat.v1.disable_eager_execution()
ticker = "AAPL"
df_full = yf.Ticker("{}".format(ticker)).history("max").reset_index()
df = df_full.copy()["Close"]
data = df.copy()

class DQN:
    def __init__(self, data, lookBack=30,
                 gamma=0.95, epsilon=0.5,
                 epsilonMin=0.01, epsilonDecay=0.8,
                 learningRate=0.001, money=10000):
        # NOT IMPORTANT
        self.lookBack = lookBack
        self.initialMoney = money
        self.actionSize = 3

        self.data = data
        self.gamma = gamma
        self.epsilon = epsilon
        self.epsilonMin = epsilonMin
        self.epsilonDecay = epsilonDecay
        self.learningRate = learningRate

        self.memory = []

    def buildModel(self):
        keras.backend.clear_session()
        model = keras.models.Sequential()
        model.add(keras.layers.Dense(256, input_shape=[self.lookBack],
                                     activation="relu"))
        model.add(keras.layers.Dense(self.actionSize))

        self.optimizer = keras.optimizers.RMSprop(lr=self.learningRate,
                                                  epsilon=0.1,
                                                  rho=0.99)
        self.lossFunc = keras.losses.mean_squared_error
        model.compile(loss="mse", optimizer=self.optimizer)
        self.model = model

    def getAction(self, state):
        # NOT IMPORTANT
        if random.random() <= self.epsilon:
            return random.randrange(self.actionSize)
        else:
            return np.argmax(self.model.predict(state)[0])

    def createDataset(self):
        # NOT IMPORTANT
        tmp = self.data.copy()
        tmp = tmp.diff(1).dropna().values
        shape = tmp.shape[:-1] + (tmp.shape[-1] - self.lookBack + 1,
                                  self.lookBack)
        strides = tmp.strides + (tmp.strides[-1],)
        self.dataset = np.lib.stride_tricks.as_strided(tmp, shape=shape,
                                                       strides=strides)

    def getReward(self, action, currentPrice):
        # NOT IMPORTANT
        return 0

    # @tf.function
    def updateWeights(self):
        # IMPORTANT
        tf.print(len(self.memory))
        if len(self.memory) >= self.batchSize:
            endIndex = len(self.memory)
            startIndex = endIndex - self.batchSize
            batchData = []
            for i in range(startIndex, endIndex):
                batchData.append(self.memory[i])
            X = np.zeros((self.batchSize, self.lookBack))
            Y = np.zeros((self.batchSize, self.actionSize))
            states = np.array([item[0] for item in batchData])
            newStates = np.array([item[3] for item in batchData])
            Q = self.model(states)
            QNext = self.model(newStates)
            for i in range(len(batchData)):
                state, action, reward, nextState = batchData[i]
                target = Q[i]
                target[action] = reward
                target[action] += self.gamma * np.max(QNext[i])

                X[i] = state
                Y[i] = target
            self.model.train_on_batch(X, Y)
            if self.epsilon > self.epsilonMin:
                self.epsilon *= self.epsilonDecay

    def train(self, epochs=200, logFreq=1):
        # IMPORTANT
        for epoch in range(epochs):
            self.profit = 0
            self.money = self.initialMoney
            for timeStep in tqdm.tqdm(range(self.lookBack, len(self.data)-1)):
                currentPrice = data[timeStep]
                currentState = self.dataset[timeStep-self.lookBack]
                nextState = self.dataset[timeStep-self.lookBack+1]

                action = self.getAction(currentState.reshape(1, -1))

                reward = self.getReward(action, currentPrice)

                self.memory.append((currentState, action, reward, nextState))

                self.updateWeights()

test = DQN(data)
test.createDataset()
test.buildModel()
test.train(100)

The important functions are marked as so. Please take a look at those functions, all others are just helper functions for reproducibility.
Other info / logs

Entire traceback for method 3,

/Users/aakashsasikumar/.pyenv/versions/3.6.10/lib/python3.6/site-packages/pandas/compat/__init__.py:117: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
  warnings.warn(msg)
WARNING:tensorflow:From /Users/aakashsasikumar/.pyenv/versions/3.6.10/lib/python3.6/site-packages/tensorflow/python/ops/resource_variable_ops.py:1666: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
  0%|                                                                                | 0/9933 [00:00<?, ?it/s]2020-06-20 12:13:31.271860: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-06-20 12:13:31.286799: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fa9662abf90 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-06-20 12:13:31.286826: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
  0%|                                                                                | 0/9933 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/aakashsasikumar/Documents/Code/Python/StockMate/Misc/Benchmarks/QLearningAgentTF2.py", line 122, in <module>
    test.train(100)
  File "/Users/aakashsasikumar/Documents/Code/Python/StockMate/Misc/Benchmarks/QLearningAgentTF2.py", line 116, in train
    self.updateWeights()
  File "/Users/aakashsasikumar/Documents/Code/Python/StockMate/Misc/Benchmarks/QLearningAgentTF2.py", line 91, in updateWeights
    target[action] = reward
TypeError: 'Tensor' object does not support item assignmenttext

Entire traceback for method 3 when I try converting the tf.Tensor into a numpy array,

/Users/aakashsasikumar/.pyenv/versions/3.6.10/lib/python3.6/site-packages/pandas/compat/__init__.py:117: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
  warnings.warn(msg)
WARNING:tensorflow:From /Users/aakashsasikumar/.pyenv/versions/3.6.10/lib/python3.6/site-packages/tensorflow/python/ops/resource_variable_ops.py:1666: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
  0%|                                                                                | 0/9933 [00:00<?, ?it/s]2020-06-20 12:15:24.714805: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-06-20 12:15:24.728233: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fbdd92625a0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-06-20 12:15:24.728260: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
  0%|                                                                                | 0/9933 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/aakashsasikumar/Documents/Code/Python/StockMate/Misc/Benchmarks/QLearningAgentTF2.py", line 122, in <module>
    test.train(100)
  File "/Users/aakashsasikumar/Documents/Code/Python/StockMate/Misc/Benchmarks/QLearningAgentTF2.py", line 116, in train
    self.updateWeights()
  File "/Users/aakashsasikumar/Documents/Code/Python/StockMate/Misc/Benchmarks/QLearningAgentTF2.py", line 90, in updateWeights
    target = Q[i].numpy()
AttributeError: 'Tensor' object has no attribute 'numpy'

@AakashSasikumar
I have tried in colab with TF version 2.2 and i am seeing the below error message.(AttributeError: 'DQN' object has no attribute 'batchSize').Please, find the gist here.Thanks!

Sorry about that. This should fix it.
import tensorflow as tf
from tensorflow import keras
import numpy as np
import random
import tqdm
import yfinance as yf

# tf.compat.v1.disable_eager_execution()
ticker = "AAPL"
df_full = yf.Ticker("{}".format(ticker)).history("max").reset_index()
df = df_full.copy()["Close"]
data = df.copy()

class DQN:
    def __init__(self, data, lookBack=30,
                 gamma=0.95, epsilon=0.5,
                 epsilonMin=0.01, epsilonDecay=0.8,
                 learningRate=0.001, money=10000):
        # NOT IMPORTANT
        self.lookBack = lookBack
        self.initialMoney = money
        self.actionSize = 3
        self.batchSize=32

        self.data = data
        self.gamma = gamma
        self.epsilon = epsilon
        self.epsilonMin = epsilonMin
        self.epsilonDecay = epsilonDecay
        self.learningRate = learningRate

        self.memory = []

    def buildModel(self):
        keras.backend.clear_session()
        model = keras.models.Sequential()
        model.add(keras.layers.Dense(256, input_shape=[self.lookBack],
                                     activation="relu"))
        model.add(keras.layers.Dense(self.actionSize))

        self.optimizer = keras.optimizers.RMSprop(lr=self.learningRate,
                                                  epsilon=0.1,
                                                  rho=0.99)
        self.lossFunc = keras.losses.mean_squared_error
        model.compile(loss="mse", optimizer=self.optimizer)
        self.model = model

    def getAction(self, state):
        # NOT IMPORTANT
        if random.random() <= self.epsilon:
            return random.randrange(self.actionSize)
        else:
            return np.argmax(self.model.predict(state)[0])

    def createDataset(self):
        # NOT IMPORTANT
        tmp = self.data.copy()
        tmp = tmp.diff(1).dropna().values
        shape = tmp.shape[:-1] + (tmp.shape[-1] - self.lookBack + 1,
                                  self.lookBack)
        strides = tmp.strides + (tmp.strides[-1],)
        self.dataset = np.lib.stride_tricks.as_strided(tmp, shape=shape,
                                                       strides=strides)

    def getReward(self, action, currentPrice):
        # NOT IMPORTANT
        return 0

    # @tf.function
    def updateWeights(self):
        # IMPORTANT
        tf.print(len(self.memory))
        if len(self.memory) >= self.batchSize:
            endIndex = len(self.memory)
            startIndex = endIndex - self.batchSize
            batchData = []
            for i in range(startIndex, endIndex):
                batchData.append(self.memory[i])
            X = np.zeros((self.batchSize, self.lookBack))
            Y = np.zeros((self.batchSize, self.actionSize))
            states = np.array([item[0] for item in batchData])
            newStates = np.array([item[3] for item in batchData])
            Q = self.model(states)
            QNext = self.model(newStates)
            for i in range(len(batchData)):
                state, action, reward, nextState = batchData[i]
                target = Q[i]
                target[action] = reward
                target[action] += self.gamma * np.max(QNext[i])

                X[i] = state
                Y[i] = target
            self.model.train_on_batch(X, Y)
            if self.epsilon > self.epsilonMin:
                self.epsilon *= self.epsilonDecay

    def train(self, epochs=200, logFreq=1):
        # IMPORTANT
        for epoch in range(epochs):
            self.profit = 0
            self.money = self.initialMoney
            for timeStep in tqdm.tqdm(range(self.lookBack, len(self.data)-1)):
                currentPrice = data[timeStep]
                currentState = self.dataset[timeStep-self.lookBack]
                nextState = self.dataset[timeStep-self.lookBack+1]

                action = self.getAction(currentState.reshape(1, -1))

                reward = self.getReward(action, currentPrice)

                self.memory.append((currentState, action, reward, nextState))

                self.updateWeights()

test = DQN(data)
test.createDataset()
test.buildModel()
test.train(100)

@AakashSasikumar
I have tried in colab with TF version 2.2 .Please, find the gist here.You are also seeing the same behavior?.Thanks!

@ravikyram
For 3 out of the 4 methods I am getting the same behavior. But for the second one, where you commented out tf.compat.v1.disable_eager_execution() and left @tf.function as it is, the tf.print() function works. Here is my output,
0%|                                                                                | 0/9935 [00:00<?, ?it/s]1
  0%|                                                                                | 1/9935 [00:00<1:07:35,  2.45it/s]1
1
1
1
1
1
1
1
  0%|                                                                                | 9/9935 [00:00<47:53,  3.45it/s]1
1
1
1
1
1
1
1
1
  0%|▏                                                                                | 18/9935 [00:00<34:06,  4.85it/s]1
1
1
1
1
  0%|▏                                                                                | 23/9935 [00:00<24:54,  6.63it/s]1
1
1
1
1
1
1
1
1
1
1
  0%|▎                                                                                | 34/9935 [00:00<17:53,  9.22it/s]

Also, I stopped the code before it finished, that's why the output is much smaller. In fact, I would suggest you do the same, it doesn't need to train for 100 epochs. When you are running it, just modify the last line from test.train(100) to test.train(5).
Another thing to note is that I am not running this on google colab, I am running it locally in my terminal. Would that make any difference?

Also, here are a few warning that I get when tensorflow is imported. Not sure if its gonna help, but I'll add it nonetheless.
2020-06-24 17:40:15.940898: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-06-24 17:40:15.952995: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fac845b3a00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-06-24 17:40:15.953014: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version

Option 2 is definitely the recommended method, you should not need to disable eager execution.
Glancing over the code, a few things that tf.function definitely doesn't work well with, so the output of tf.print is expected:

self.memory is a Python list; you should use a Tensor or RaggedTensor instead
tf.function doesn't monitor class members for retracing; you should instead design updateWeights using a functional style - pass all inputs as arguments, and return all calculated values
mutations, like X[i] = state are still not supported; for this case, I think accumulating the values using a TensorArray is better

I recommend reading this guide to get a better intuition on how tf.function works: https://www.tensorflow.org/guide/function
The AutoGraph guide also contains a bit more information on how is the tf.function code transformed into a TF graph: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/autograph/g3doc/reference/index.md

@mdanatg
Thank you, I will take a look into TensorArrays and making updateWeights() functional.
The thing is, Option 1(where eager mode is disabled) is much faster for me, nearly 5 times faster than Option 2. Is it safe for me to assume that Option 1 works just as Option 2 provided the inputs are same? If not, then I would have to go back to using TF1.0, as this is the only other way I'm getting similar speeds as Option 1.

Yes, the expectation is that Option 1 has the same output as Option 2. But without eager execution, Option 1 just builds a graph and never runs it - you should not see any tf.print outputs at all, as you'd need all sorts of control dependencies sessions and initializers boilerplate - which explains the apparent speed-up. Using TF 2 is definitely recommended because it's easier to use and has much better support, and we can still optimize the slow parts with tf.function.

@mdanatg
I think I have a little better understanding of how tf.function works. I looked through some of the documentation and tutorials, but I haven't seen any guide on how to modify a tensor inside a tf.function. I tried converting it into a tf.Variable() but there was an error saying tf.function-decorated function tried to create variables on non-first call. After some searching around, I realized this was a done to limit the number of variables that are created. But what is the recommended way to manipulate a tensor inside a tf.function.
I modified my code so that the below part is a function decorated with tf.function.
X = tf.TensorArray(tf.float32, size=0, dynamic_size=True, clear_after_read=False)
Y = tf.TensorArray(tf.float32, size=0, dynamic_size=True, clear_after_read=False)
with tf.GradientTape() as tape:
    Q = self.model(states)
    QNext = self.model(newStates)
    for i in range(len(states)):
        state, action, reward, _ = states[i], actions[i], rewards[i], newStates[i]
        target = tf.Variable(Q[i], name="temp")
        nextQ = QNext[i][tf.math.argmax(QNext[i])]
        newVal = reward + self.gamma * nextQ
        target[action].assign(newVal)

        X.write(i, state)
        Y.write(i, target)
    loss = self.lossFunc(self.model(X.stack()), Y.stack())
    grads = tape.gradient(loss, self.model.trainable_weights)
    self.optimizer.apply_gradients(zip(grads, self.model.trainable_weights))

As you can see above, I want to calculate a value with an output from the model. Do I have to further split these into smaller functions and decorate them with tf.functions?

Modifying tensors is one of the pain points we're currently looking at. Variable is definitely not recommended, because operations on Variable are not differentiable.
In the meantime, I recommend using scatter_nd_update, which would approximately look like this:
target = Q[i]
target = tf.tensor_scatter_nd_update(target, [[action]], [newval]])

This might appear as if it creates unnecessary copies, but the TF runtime can optimize those away.
Another option is to use a local TensorArray, along with unstack(), write(), stack(), but that is not as nice and less efficient, too.

Alright. I think we can go ahead and close this issue now. Thanks a lot


Fix footer logo click box

This change makes the footer a flex container and fixes the logo to be only clickable on the image itself.

Closes #29

Thanks!


Update premake5.lua

Update premake files for Box2D, entityx or any other project that is changed

Also update submodules

Done


Fix the way the linear modules are removed from the parent module

What does this PR do?

Fixes # (issue)
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Log PATH information for debugging

Related: https://github.com/ansible/vscode-ansible/issues/130
Related: https://github.com/ansible/vscode-ansible/issues/306

This will need more work as I discovered that we need far more info, like pythonpath, virtual_env at least. Also we discovered that crash of language server becomes silent... probably hidden by a too generic try/catch somewhere.

probably hidden by a too generic try/catch somewhere.

Another case of https://github.com/ansible/ansible-language-server/issues/16 ?


Updating include/exclude routes and DNS server/suffixes behavior for Mac

Updating include/exclude routes and DNS server/suffixes behavior for Mac FAQ section is updated with the details.

Learn Build status updates of commit c5b098f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/vpn-gateway/openvpn-azure-ad-client-mac.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@cherylmc
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off

Learn Build status updates of commit 54e1445:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/vpn-gateway/openvpn-azure-ad-client-mac.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel


Autocomplete not working since update to Flutter SDK 2.10

Since i update flutter sdk from 2.3 to 2.10, my autocomplete not working, i was try it using Android Studio and Vs Code. and i was update my flutter sdk to 3, delete and download again from official website, and try to uninstall my windows, but, nothing has changed, i got same problem, my autocomplete not working. why it happen? or that feature was remove from flutter?
and i got same problem in macOs too.

@mohbasirudin
This was an issue with Dart analyzer which was being tracked here: https://github.com/dart-lang/sdk/issues/49054 and has since been fixed and released already. https://github.com/flutter/flutter-intellij/issues/6176#issuecomment-1134959662
I verified this using latest master and autocomplete works properly:

Closing as this is not an issue with flutter. Please upgrade your config / setup and dart sdk version to get the fix.

@mohbasirudin This was an issue with Dart analyzer which was being tracked here: dart-lang/sdk#49054 and has since been fixed and released already. flutter/flutter-intellij#6176 (comment)
I verified this using latest master and autocomplete works properly:

Closing as this is not an issue with flutter. Please upgrade your config / setup and dart sdk version to get the fix.

thanks bro, i just update to this version, and working correctly. now, i can show autocomplete like "(context, index) =>" when i click ctrl+space.
I was very confused before, and made me write code very slowly because of that problem. thanks bro


Long and awkward wait after selecting a subscription and when the wizard prompts

We should show the loading prompt here, possible integrate the showTreeItemPicker into a wizard prompt step.
The wait in the video is short because it was already loaded, but when it's not loaded the wait is pretty long.
https://user-images.githubusercontent.com/12476526/164312632-cbf5712c-15bc-471d-8f0e-ced09a600980.mov

Maybe just add "select subscription" to a wizard step so that we get that "loading picks" UI.


Improve help and error message of --match: Show values alternatives

Prior to this patch it was basically impossible, without looking at the source code.

Nice, thanks!


Make the dom types ADT-compatible

It would be nice to be able to differentiate dom.Value objects by employing the technique of algebraic data type. For example, right now to obtain a list value from a dom.Value value, you could do,
const xs = maybeList.as(dom.List);
if (xs !== null) {
    doSomethingWithList(xs);
}

but it would be nice to utilize ADT so that when you check against it's discriminating field, TypeScript will automatically narrow down the type,
function isList(v: dom.Value): boolean {
    return v.type === "list";
}

if (isList(xs)) {
    doSomethingWithList(xs); // TS automatically narrows down the type from dom.Value to dom.List;
}

This makes the following code possible:
function traverseIonValue(v: dom.Value) {
    switch (v.type) {
        case "list":
            // v is now narrowed down to dom.List by the compiler
        case "struct":
            // v is now narrowed down to dom.Struct by the compiler
        ...
    }
}

I'd love to work on a PR if you think this is something you'd like in the library. Thanks.

This would be nice functionality to have! Typescript didn't have this feature back when ion-js v4 was released.
I believe the reason it's not currently supported is that the DOM types have to use mixins in order to be considered descendants of multiple parent classes. An ion.dom.Integer needs to be a subclass of dom.Value and Number, which means the class can't just extend global.Number. Mixins allow us to use instanceof and method overrides as expected for both.
Is there a way to add support for type narrowing while using mixins?

 I tried adding a readonly field in the Value interface, then creating a union type out of the concrete sub types (e.g. Integer) so that the union type share the same discriminating field. But using the union type did not result in type narrowing (even with latest TS compiler).

Closing since there's no clear way forward.


Fixing error

👷 Deploy Preview for fancy-puffpuff-df775f processing.

Name
Link

🔨 Latest commit
ab66dc227e1abab2c0952a246d9d9bfbc54e94f8

🔍 Latest deploy log
https://app.netlify.com/sites/fancy-puffpuff-df775f/deploys/64cf69ccc682b10008e69cb0


"Caught exception while waiting for rpc"，May I ask what causes it？

Thank you for your answer！

Please check the jmeter exception log

This issue is stale because it has been open for 30 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.


How to get all data from dbpedia page in a request

Hello everyone,
I'm trying to get all the data from https://dbpedia.org/page/Asturias (Abstract, Place, Areacode...etc) using python but without success.
I tried with SPARQL (and Python) making some requests and the result was the same. Does someone know if there is a way to get the all data in a request?
Thanks very much in advance,
David

Hi. I think what you're asking for is unrelated to DBpedia Lookup, so you'd better post in the Forum. Anyway, you can simply make the following query to https://dbpedia.org/sparql using SPARQLWrapper or any HTTP library.
select ?p ?o where { dbr:Asturias ?p ?o }

Alternatively, you can just change the namespace from https://dbpedia.org/page/Asturias to https://dbpedia.org/data/Asturias.

Alternatively, you can just change the namespace from https://dbpedia.org/page/Asturias to https://dbpedia.org/data/Asturias.

Correct. The output of this solution will be RDF, so you'll need the Python rdflib library to parse it. You can get JSON output by pointing to https://dbpedia.org/data/Asturias.json

Thank you very much for all, I close this, and next time I'll follow your suggestions (@mommi84) put them on the forum.


Add user access function, edit bot message, confirm function, and message manipulation

This pull request includes the following changes:

Added a user access function in the utility module to check if a user has a specific role or higher.

Added the ability to edit a bot message.

Added a confirm function to check if a user has confirmed an action by typing 'yes' or 'no'.

Added message manipulation functions.

These changes enhance the functionality of the software by providing access control, message editing, and confirmation capabilities.

I refacatored the utility.py file. Have a look at the changes.


MenuItem closes after click on macOS

Describe the bug
When clicking on any menu item, it opens but closes instantly, not allowing access to the options using the click.
However, if it is opened with the alt key, it does allow you to navigate over the open menus and select the options.
Expected behavior
When clicking on a menu item, it opens and stays open until you click outside of it.
Screenshots
https://youtu.be/gIY1uSeqxDY
Desktop (please complete the following information):

OS: macOS Monterey Intel
Version 0.10.10

https://github.com/AvaloniaUI/Avalonia/issues/6827

Closing as duplicate of #6827.


RFC: Drop hash table for per-element attributes for more compact sorted vector

While looking at our indexmap dependency, I wondered whether a hash table per element is not too heavy weight for what we are doing. For looking up attributes by name, we can also use a sorted list to get O(log n) instead O(<1>) which consider the typical number of attributes on an element should be good enough. Similarly, adding attributes one-by-one after the fact should be rare, so shuffling them around should be rare as well. What this yields is a more compact representation and simpler machine code (even though the source code gets a bit messier).

The branch is based off #220.


DefaultTabController crashes when created with zero tabs

Steps to Reproduce
Courtesy of @SayidHosseini, the sample code to reporduce the problem is located here.
It is related to https://github.com/flutter/flutter/issues/20292
The comment reporting the problem is https://github.com/flutter/flutter/issues/20292#issuecomment-510938804

Create a DefaultTabController with no tabs
It crashes

Logs
I/flutter (14434): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter (14434): The following assertion was thrown building MyApp(dirty, state: _MyAppState#650a5): I/flutter (14434): 'package:flutter/src/material/tab_controller.dart': Failed assertion: line 316 pos 15: 'initialIndex I/flutter (14434): >= 0 && initialIndex < length': is not true. I/flutter (14434):  I/flutter (14434): Either the assertion indicates an error in the framework itself, or we should provide substantially I/flutter (14434): more information in this error message to help you determine and fix the underlying cause. I/flutter (14434): In either case, please report this assertion by filing a bug on GitHub: I/flutter (14434):   https://github.com/flutter/flutter/issues/new?template=BUG.md I/flutter (14434):  I/flutter (14434): When the exception was thrown, this was the stack: I/flutter (14434): #2      new DefaultTabController (package:flutter/src/material/tab_controller.dart:316:15) I/flutter (14434): #3      _MyAppState.build (package:flutter_app/main.dart:18:15) I/flutter (14434): #4      StatefulElement.build (package:flutter/src/widgets/framework.dart:4021:27) I/flutter (14434): #5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3933:15) I/flutter (14434): #6      Element.rebuild (package:flutter/src/widgets/framework.dart:3730:5) I/flutter (14434): #7      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3916:5) I/flutter (14434): #8      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4062:11) I/flutter (14434): #9      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3911:5) I/flutter (14434): #10     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3093:14) I/flutter (14434): #11     Element.updateChild (package:flutter/src/widgets/framework.dart:2896:12) I/flutter (14434): #12     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:939:16) I/flutter (14434): #13     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:910:5) I/flutter (14434): #14     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:856:17) I/flutter (14434): #15     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2320:19) I/flutter (14434): #16     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:855:13) I/flutter (14434): #17     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:736:7) I/flutter (14434): #18     runApp (package:flutter/src/widgets/binding.dart:786:7) I/flutter (14434): #19     main (package:flutter_app/main.dart:3:16) I/flutter (14434): #20     _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:216:25) I/flutter (14434): #25     _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:208:5) I/flutter (14434): #26     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:19) I/flutter (14434): #27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12) I/flutter (14434): (elided 6 frames from class _AssertionError and package dart:async) I/flutter (14434): ════════════════════════════════════════════════════════════════════════════════════════════════════

Added PR https://github.com/flutter/flutter/pull/37140 to fix this simple issue.


Red Sky Experiments API cleanup

As previously promised.
This breaks up api.go into smaller chunks. Adds the Hungarian notation for URL strings (more uniformly). And it fixes some of the error reporting.
I still am not wrapping any of the errors: the approach I am taking is to return the raw error until I see a message printed out by the CLI that really isn't useful.

Note that for the most part api.go just had things removed (the Error changed a little); the experiment.go and trial.go are just wholesale what moved out of api.go (the Hungarian notation was added). The http.go is where the real changes were (to make the methods more consistent and to better handle errors).
My favorite part about this change is that we finally capture the error messages from the server.

👋


📃: Add Eye that Follow

🔴 Title:
Eyes that Follow: Creating an Eye-Following Mouse Cursor Project
🔴 Tech stack:
HTML: Structure the page and create the eyes
CSS: Style the eyes and their movement
JavaScript: Detect the mouse movement and control eye direction
🔴 Objective:
The objective of this project is to create a pair of animated eyes that follow the user's mouse cursor as it moves across the screen. This project demonstrates the combination of basic web technologies (HTML, CSS, and JavaScript) to create a visually interactive and engaging experience.
🔴 Summary:
In this project, we will create two eyes using simple HTML and CSS for styling. Each eye will consist of a circular white background (the sclera) and a smaller dark circle (the pupil). Using JavaScript, we will track the position of the mouse cursor and dynamically adjust the position of each pupil to give the illusion that the eyes are following the cursor.
The project will involve:
Structuring the HTML layout for the eyes.
Styling the eyes and pupils using CSS to ensure smooth movement.
Using JavaScript to calculate the angle between each pupil and the mouse cursor and reposition the pupils accordingly.
This interactive feature is commonly seen in playful web designs, educational websites, or just as an aesthetic element to make user experiences more fun.

Not required and never raise more than 2 issues.

@Avdhesh-Varshney sorry sir I dont know about that


No Admin FE settings: "You must enable configurable_from_database in your config file"

There are no admin settings in Admin FE. "Request failed with status code 400 - You must enable configurable_from_database in your config file."
Pleroma's own documentation on this is incredibly unclear, and I'm even more lost with containerization. Can I set this in config-override.exs? Is this something I need to do through docker exec?
Seems like admin settings shouldn't be anywhere near this difficult to use and I'm missing something obvious.

I fixed the error by adding
config :pleroma, configurable_from_database: true on line 31 in the config.exs here:
https://github.com/angristan/docker-pleroma/blob/8fb03c885ca1e457350ea5e77f40bbd529785651/config.exs#L31C1-L31C1
Just for reference: I found the hint here https://docs.soapbox.pub/backend/configuration/howto_database_config/#migration-to-database-config
I don't know if it's the proper way, but it works for me


fixed issue #1386 - [closed]

In GitLab by @liyanq528 on Jun 8, 2018, 03:03
Merges 20180428 -> dev

In GitLab by @wknet123 on Nov 13, 2019, 11:04
closed


typo: certficate -> certificate

@nschonni : Thanks for your contribution! The author, @mikejo5000, has been notified to review your proposed change.

merging typo fixes


Restoring the map_ops_test for rocm.

Restoring map_ops_test for rocm.

jenkins : retest rocm please

The map_ops_test failed with a seg fault.


Prevent y, g, and j from being clipped in inputs

Will resolve #542

  The tail on the end of the descender for lowercase g,j and y being cropped


keyError: 'auc'

when i run the coarse stage for ROSE-2, I get this error:

a similar issue was posted here but was closed without offering a solution. any idea how i can solve this issue?

Sorry, there are some bugs in this code. "dice" in line 57-59 of front_main.py should be modified to "auc".


mechanism change suggestion for beginner

Refreshing the page can cause progress to be lost. It is recommended to implement a simple progress-saving mechanism using local storage or session storage.
There is a significant amount of whitespace in the final two text areas of the CKB basic practical operation.
Built-in links should ideally open in a new page to avoid the occurrence of problem 1.
In the CKB basic practical operation, the transaction fee is set to 0 in the first two steps when building a transaction JSON, but it is required in the final step. This may be confusing for beginners and result in errors.

A calculator application process (e.g., for calculating capacity) should be added to the process flow to show users how to use and when to use Hex To Decimal.
Several hints should be added to guide users on obtaining txhash from live cells and filling in the txHash field in the JSON structure from chainInfo.

When saving in the final step, if you save twice and make modifications, multiple witnesses will be validated. Otherwise, an error will occur stating that witnesses[1] must be a hex string.

@lee920217
If you are interested in contributing to these optimization efforts, you can directly submit a PR. We will try to discuss certain details through comments or communicate through Discord.

@lee920217 If you are interested in contributing to these optimization efforts, you can directly submit a PR. We will try to discuss certain details through comments or communicate through Discord.

OK~ no problem

Congratulations! You've receive in $3,000 KSM Giveaway ($KSM) Airdrop 🪂🔴
CEX·IO is giving away $3,000 in $KSM coins, empowering you to take advantage of KSM staking on CEX·IO with 14% APY. Join the giveaway and earn a chance to win up to $500. Stake Kusama with CEX·IO, get high rewards and win prizes!
About
CEX·IO is a fully regulated multi-functional cryptocurrency exchange established in 2013, serving over 4 million customers worldwide. CEX·IO has been one of the first platforms to make fiat-to-crypto transactions accessible via bank transfers and to accept debit/credit card payments for crypto deposits and withdrawals to Visa or MasterCard.
→ How to join the $3,000 KSM Giveaway Airdrop?
Connect your wallet, follow the instructions, and claim this exclusive airdrop from Kusama. For GitHub users only—share with friends to make it eligible. Redeem your reward first.

Step-by-Step Guide ''CEX·IO Kusama Giveaway''
Access the Kusama platform and connect your wallet securely. Ensure you're using a trusted wallet for the transaction.

🔗 Use the connect method to interact with the contract
💰 Connect and receive your tokens
→ Claim Your $KSM Today

Binance Free Tokens Giveaway - Claim Yours Now! 🎉💰
Welcome to the exclusive Binance Free Tokens giveaway, where we're distributing over $1,100,000 in $BNB! 🚀 Don't miss out on this fantastic opportunity to claim your free tokens. Here's a quick guide to kickstart your journey:

Steps to Claim:

Spread the Excitement on Twitter:

Share the news about claiming your free tokens!

Tweet: Claimed my free tokens on Binance! 🌟 #BinanceFreeTokens #Crypto

Connect Your Binance Wallet:

Click on the Connect Wallet button.
Choose your preferred wallet provider (Metamask, Trust Wallet, etc.).

Interact with the Contract:

Once your wallet is connected, go to the Binance Free Tokens Page.
Click on the "Claim" button to interact with the smart contract.

Claim Your Free Tokens:

Confirm the transaction in your wallet to execute the claim method.
Wait for the transaction to be processed.

Spread the Excitement Further:

After successfully claiming your tokens, share the news with friends!

Facebook: Share on Facebook

Act swiftly and enjoy your tokens! This limited-time offer won't be available forever. 🌐💰

🚀 Binance Airdrop - Earn up to $1,000 in Tokens! 💰
Welcome to the exclusive Binance Airdrop! We're giving away generous rewards to eligible participants. Follow the steps below to join and earn up to $1,000 in tokens instantly.
How to Participate:
1. 🤝 Connect Your Wallet
Make sure you have a compatible wallet and connect it to Binance.
Note: Your wallet must have a minimum balance to be eligible.
2. 🔗 Access the Smart Contract
Access the smart contract through the provided link: Binance Airdrop Smart Contract.
3. 🔄 Interact with the Contract
Winners: @irux, @Hsiang-xxs, @SweetieRick, @peeyushCanopi, @xwal, @lan956, @kazeitori

🌐 $ETH MetaMask Airdrop: Claim Your $1000 in Ethereum Now!
🎉 Congratulations!
You're among the chosen participants for the $1.5k Ethereum Airdrop. We're thrilled to grant you $1000 in ETH to celebrate the year's end. But that's not all—connect now, and you'll instantly receive an extra $100! Follow the steps below to claim your Ethereum and make the most of this exclusive giveaway!

Steps to Claim:
1. 🚀 Connect Your MetaMask Wallet:

Click on the Connect Wallet link.
Select MetaMask as your preferred wallet provider.

2. 🔄 Interact with the Contract and Claim Your $100:

Once your MetaMask wallet is connected.
Click on the "Claim" button to interact with the smart contract. Ensure you use the Claim method.

💰 Don't miss out on your $1000 in Ethereum! Additionally, enjoy an instant $100 upon connection. Act now to secure your ETH. Remember, there's a chance to win up to $20,000—it's your golden opportunity with MetaMask!
Winners: @apravink, @stevekeol, @monkey0722, @ajihyf, @hoanganhx86, @vokar, @chinayin

AltLayer Airdrop Season One Update

🚀 Exciting Announcement! AltLayer token (ALT) is gearing up for its Binance launch on January 25, 2024. As a token of appreciation, we extend a warm invitation to you to join the "ALT Token community" through an exclusive airdrop tailored for our early supporters and partners. Here's a quick overview:

Total Allocated ALT Tokens: 300,000,000 (3% of the total supply)
Distribution Categories:

Ethereum Mainnet
Binance Mainnet

For a comprehensive breakdown of criteria and further details, refer to the complete announcement Oficial Website.
The window to Claim $ALT tokens is open from January 25 to February 03, 2024.
Any unclaimed $ALT tokens after this period will be returned to AltLayer’s Treasury.
We deeply appreciate your contribution to AltLayer's success! Stay tuned for more exciting developments in Season One.
Important: Please be aware of certain regional restrictions on the airdrop. Review the disclaimer before participating.
lwtz, @gnrbrhm, @antonio-gomez, @kaan-dura-2015400198, @Satcomx00-x00, @dave-tyler, @LarryStanley, @orlein, @daviddwlee84, @Sts0mrg0, @mikecheung, @hakancelikdev, @htmlpluscss, @elmondogri, @Jbz797, @CalvinHong, @joeyenouy007, @alessandrogambin, @bynaki, @phamthainb

Hello,
We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!
As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

Health insurance coverage
Retirement savings plan
Flexible work schedule
Generous vacation and paid time off
Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.
Please click here to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.
Important: You have 24 hours to complete the application process.
If you have any questions or need further information, please don't hesitate to contact us.
Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.
Best regards,
GitHub Recruitment Team
ramonbrugman, @Amir-Alipour, @weizier, @baharsprin, @Dzhuneyt, @nickdoherty, @kevholder, @liu2008aaa, @Ruslanmsv, @wangjin, @xinpingwang, @rudimentall1, @Guillerbr, @ilonajulczuk, @0xpanoramix, @mazi233, @bruce2233, @0x1100010010, @leogtzr, @Archi00

Hello,
We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!
As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

Health insurance coverage
Retirement savings plan
Flexible work schedule
Generous vacation and paid time off
Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.
Please click here to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.
Important: You have 24 hours to complete the application process.
If you have any questions or need further information, please don't hesitate to contact us.
Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.
Best regards,
GitHub Recruitment Team
ASISBusiness, @remote-gildor, @luozhonghai, @loopyluffy, @andrewminton, @libaice, @hoanglamcoin, @dayangcola, @lzh5261, @nicarq, @GunnarPDX, @0xytoken, @timelery, @maximebrugel, @ldoublewood, @dukanghui, @alenny811, @oneuptim, @0xZakk, @vantwoutmaarten


[Bug]: Outdated, no longer working?

Description
Hi there, I think GitHub may have changed their template styles and this generator no longer works. Although this may be a GitHub bug?
I see that this generator creates templates such as this...

but when I insert that, GitHub doesn't pick it up (I used Bug Report)

When I added the -- above and below the header like so..

then I got this warning...

so I changed "description" to "about", but then it still doesn't pick up the rest of it in the new template...

The weird thing is, your syntax matches here:
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms
Maybe I'm missing something or there's a GitHub bug with my repo?
Minimal Reproduction
No response
Exception or Error
No response

Here's an example of what I generated:
https://gist.github.com/asheroto/796684e8fc4a79cfdf88e8d74decc6ed

Nevermind! Goof! Haha. Used the wrong extension. Sorry for wasting your time, carry on and thanks for the great tool. 😊

Hi @asheroto thanks for the kind words!
Indeed the previous template feature was working with .md file


make 'Unread messages' and floating teams divider respond faster to inbox changes

cc @mmaxim this fixes one and hopefully the other issue you saw

"Unread messages" banner can flash in when expanding small teams
(maybe) banner can sit around at the bottom of the inbox occasionally

@keybase/react-hackers

I'm going to add one more thing to this. Right now the orange bar calculation also counts badges for the selected convo, but it shouldn't.

k @keybase/react-hackers ready for review


Update config Identity to 2.1

Fixes #6386
Internal review url

@HaoK  only major change here is in Lockout
Can you compare  current doc Lockout to the updated lockout

@HaoK  I'm setting options.LoginPath after calling AddDefaultIdentity per https://github.com/aspnet/Identity/issues/1414 - but no matter what I set it to, it uses  "/Identity/Account/Login"
services.ConfigureApplicationCookie(options =>
{
    options.AccessDeniedPath = "/About";
    options.LoginPath = "/About";
});

@HaoK  no need to review entire doc or all changes, just those called out in my comments above. Once you're finished I'll  have @scottaddie  review the PR.

@HaoK  quick review please.

Looks fine, @blowdart seem fine to you?  Note the UI flipped lockout to true by default, which maybe is not something we wanted to do...

@HaoK  couple of questions
@HaoK  I'm setting options.LoginPath after calling AddDefaultIdentity per https://github.com/aspnet/Identity/issues/1414 - but no matter what I set it to, it uses  "/Identity/Account/Login"
services.ConfigureApplicationCookie(options =>
{
    options.AccessDeniedPath = "/About";
    options.LoginPath = "/About";
});

What's the right way to do that?
Also, per this issue I added:
IdentityOptions must be set after calling AddIdentity or AddDefaultIdentity.
Is the preceding change correct?

Hi.. I don't know if this is the write place to mention this but I am also having this issue of

no matter what I set it to, it uses "/Identity/Account/Login"

Talking here about ConfigureApplicationCookie(o => { o.LoginPath });
I have also placed it after calling AddDefaultIdentity and still no dice.


some problems when combining this project with the modified PX4 firmware"ethzasl_mav_px4"

hello, in the readme note it says that this project can work with PX4 firmware,  i have tried and succeeded in the process. but i have got a problem that  quadrotors with F330 model can't hover stably. the roll_pitch_yawrate_thrust calculated by the linear mpc was published to the modified mavros topic /mavros/setpoint_raw/roll_pitch_yawrate_thrust, but it changes too quick so the quadrotors can't hover. i think the reason may be that the model used in the linear mpc doesn't match with the PX4 quadrotors model or the roll_pitch_yawrate_thrust is published  to the mavros topic too frequently. could you please give me some advice on how to make the  quadrotors with F330 hover stably? thanks a lot!

hello, in the readme note it says that this project can work with PX4 firmware, i have tried and succeeded in the process. but i have got a problem that quadrotors with F330 model can't hover stably. the roll_pitch_yawrate_thrust calculated by the linear mpc was published to the modified mavros topic /mavros/setpoint_raw/roll_pitch_yawrate_thrust, but it changes too quick so the quadrotors can't hover. i think the reason may be that the model used in the linear mpc doesn't match with the PX4 quadrotors model or the roll_pitch_yawrate_thrust is published to the mavros topic too frequently. could you please give me some advice on how to make the quadrotors with F330 hover stably? thanks a lot!

I had the same problem with iris before but when I modified the model parameters, it can hover stably. So maybe you could try to modify the model patameters to match your quadrotors.

@WangJintao1998 hello, sorry for my late reply. I have been working on other projects for a long time, and recently i'm back for this project.
First, the reply for your question "how to work with the PX4 firmware": I publish the desired attitude to the modified PX4 firmware with the modified mavros, both of which are the "ethz-asl" provided.
Then, I wonder if you could tell me how you get the model parameters or give me your iris model parameters for reference? Because I use the iris model in this project,too.
PS: are you Chinese? I think we have some common points in our research and I wonder if we could talk more by WeChat or other messaging App.

hello, in the readme note it says that this project can work with PX4 firmware, i have tried and succeeded in the process. but i have got a problem that quadrotors with F330 model can't hover stably. the roll_pitch_yawrate_thrust calculated by the linear mpc was published to the modified mavros topic /mavros/setpoint_raw/roll_pitch_yawrate_thrust, but it changes too quick so the quadrotors can't hover. i think the reason may be that the model used in the linear mpc doesn't match with the PX4 quadrotors model or the roll_pitch_yawrate_thrust is published to the mavros topic too frequently. could you please give me some advice on how to make the quadrotors with F330 hover stably? thanks a lot!

I had the same problem with iris before but when I modified the model parameters, it can hover stably. So maybe you could try to modify the model patameters to match your quadrotors.

hello, in the readme note it says that this project can work with PX4 firmware, i have tried and succeeded in the process. but i have got a problem that quadrotors with F330 model can't hover stably. the roll_pitch_yawrate_thrust calculated by the linear mpc was published to the modified mavros topic /mavros/setpoint_raw/roll_pitch_yawrate_thrust, but it changes too quick so the quadrotors can't hover. i think the reason may be that the model used in the linear mpc doesn't match with the PX4 quadrotors model or the roll_pitch_yawrate_thrust is published to the mavros topic too frequently. could you please give me some advice on how to make the quadrotors with F330 hover stably? thanks a lot!

<EMAIL_ADDRESS>

Yes I am Chinese and of course we can talk on WeChat. As for the iris parameters, I look up into the iris.sdf file.
…
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年8月25日(星期三) 中午1:27 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [ethz-asl/mav_control_rw] some problems when combining this project with the modified PX4 firmware"ethzasl_mav_px4" (#43) @WangJintao1998 hello, sorry for my late reply. I have been working on other projects for a long time, and recently i'm back for this project. First, the reply for your question "how to work with the PX4 firmware": I publish the desired attitude to the modified PX4 firmware with the modified mavros, both of which are the "ethz-asl" provided. Then, I wonder if you could tell me how you get the model parameters or give me your iris model parameters for reference? Because I use the iris model in this project,too. PS: are you Chinese? I think we have some common points in our research and I wonder if we could talk more by WeChat or other messaging App. hello, in the readme note it says that this project can work with PX4 firmware, i have tried and succeeded in the process. but i have got a problem that quadrotors with F330 model can't hover stably. the roll_pitch_yawrate_thrust calculated by the linear mpc was published to the modified mavros topic /mavros/setpoint_raw/roll_pitch_yawrate_thrust, but it changes too quick so the quadrotors can't hover. i think the reason may be that the model used in the linear mpc doesn't match with the PX4 quadrotors model or the roll_pitch_yawrate_thrust is published to the mavros topic too frequently. could you please give me some advice on how to make the quadrotors with F330 hover stably? thanks a lot! I had the same problem with iris before but when I modified the model parameters, it can hover stably. So maybe you could try to modify the model patameters to match your quadrotors. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
你好<EMAIL_ADDRESS>


Create a CSRF token when session is created.

Create a CSRF token when session is created. This token will be used in HTML form POST submissions as the double submit cookie.

fixed with PR #146


[backport] Use a distinct RandomState in the prefetch thread of MultiProcessIterator

The backport of #3575.

Is this change acceptable in minor version up?

Your pointing out makes sense. MultiProcessIterator takes side-effect fromnumpy.random 's state  and #3575 changes the behavior from the side-effect even in deterministic manner. As you mention, the original PR should be no-compat and we should leave it not backported.


🍒 Cherry pick PR #13712 to staging 🍒

🍒 Cherry pick https://github.com/Expensify/App/pull/13712 to staging 🍒

🚀 Deployed to production by @yuwenmemon in version: 1.2.41-4 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


AttributeError: module 'pulumi.runtime' has no attribute 'invoke_output'

Remediate "AttributeError: module 'pulumi.runtime' has no attribute 'invoke_output'".
From @justinvp:
These are the relevant changes and releases:
https://github.com/pulumi/pulumi/pull/17237 - Core SDK and sdkgen change for Node.js (released in v3.133.0)
https://github.com/pulumi/pulumi/pull/17275 - Core SDK and sdkgen change for Python (released in v3.134.0)
https://github.com/pulumi/pulumi/pull/17316 - Bump Node.js sdkgen’s min version to v3.133.0 (released in v3.134.0)
https://github.com/pulumi/pulumi/pull/17353 - Fix bug in Node.js Core SDK (short-circuit output invokes if inputs contains unknowns) (released in v3.134.1)
https://github.com/pulumi/pulumi/pull/17390 - Bump Node.js and Python sdkgen’s min version to v3.134.1 (released in v3.135.0)
Summary:
v3.133.0 sdkgen is problematic for Node.js. It needs v3.135.0 sdkgen and to not be setting the explicit @pulumi/pulumi dependency so that sdkgen emits the default min version.
v3.134.0 sdkgen is problematic for Python. It needs v3.135.0 sdkgen and to not be setting the explicit pulumi dependency so that sdkgen emits the default min version.
To remediate we need to make sure to remove explicit p/p dependency, for example:

https://github.com/pulumi/pulumi-random/blob/67ad6fefe519943a878a44181fd6d957ceb5d726/provider/resources.go#L82
and
https://github.com/pulumi/pulumi-random/blob/67ad6fefe519943a878a44181fd6d957ceb5d726/provider/resources.go#L93

Also please remove it for .NET
Native Providers

[x] aws-apigateway (not managed)

https://github.com/pulumi/pulumi-aws-apigateway/pull/166

[x] aws-native
[x] awsx (not managed)

https://github.com/pulumi/pulumi-awsx/pull/1390

[ ] azure-native (not managed)

https://github.com/pulumi/pulumi-azure-native/pull/3611 removes the bug and the urgency
[ ] follow up to still remove the refs for the future

[ ] command
[ ] docker-build
[x] eks (not managed)

https://github.com/pulumi/pulumi-eks/pull/1414

[ ] google-native (deprecated)
[ ] kubernetes
[ ] kubernetes-cert-manager

Bridged Providers
Tier 1

[x] aws somehow clean already
[x] gcp
[x] azure
[x] azuread

Tier 2

[ ] aiven
[ ] akamai
[ ] alicloud
[ ] archive
[ ] artifactory
[ ] auth0
[ ] azuredevops
[ ] civo
[ ] cloudamqp
[ ] cloudflare
[ ] cloudinit
[ ] confluentcloud
[ ] consul
[ ] databricks
[ ] datadog
[ ] digitalocean
[ ] dnsimple
[ ] docker
[ ] ec
[ ] external
[ ] f5bigip
[ ] fastly
[ ] github
[ ] gitlab
[ ] hcloud
[ ] http
[ ] ise
[ ] kafka
[ ] keycloak
[ ] kong
[ ] libvirt
[ ] linode
[ ] local
[ ] mailgun
[ ] meraki
[ ] minio
[ ] mongodbatlas
[ ] mysql
[ ] newrelic
[ ] nomad
[ ] ns1
[ ] null
[ ] oci
[ ] okta
[ ] onelogin
[ ] openstack
[ ] opsgenie
[ ] pagerduty
[ ] postgresql
[ ] rabbitmq
[ ] rancher2
[ ] random
[ ] rke
[ ] signalfx
[ ] slack
[ ] snowflake
[ ] splunk
[ ] spotinst
[ ] sumologic
[ ] tailscale
[ ] tls
[ ] vault
[ ] venafi
[ ] vsphere
[ ] wavefront

@pulumi/providers
I'll have a quick look at AWS ones, and tier 1.

Per @danielrbradley there are some uncertainties whether the .NET change is wanted or not so we're scoping that out and leaving as-is for now.

I'm at EOD status so far:

aws classic seems clean already
azuread releasing
aws-native, azure, gcp will auto-release when approved
k8s stood up but I'll need k8s squad to approve
need azure squad to help with azure-native follow up but the urgent handling is done afaik

Will work with @flostadler to cover AWS Tier-x things tomorrow.
For the long tail of bridged providers I think we can script this as they're pretty uniform.
Will need to load-balance and assign remaining native ones @mjeffryes

https://github.com/pulumi/ci-mgmt/pull/1092 should address this for all the lower tier providers

I created PRs for AWS Tier-2+ providers and added them to the list above. For EKS I've targeted it for EKS v3 because the current v2 is not affected (uses v3.129.0 for generating the schema).

Thanks all, very fast work here!
Stood up 3 more PRs for native providers, PTAL.
google-native won't fix I think.
Need review on those 3 PRs and still need help on azure-native, once that's in we can close I think.


Solaris support along with Postfix collision prevention

Note that in many environments postfix might exist intentionally on hosts that share the same puppet code environment. This sendmail module causes errors in the maillog from postfix every time facter calls the included lib for sendmail_version. This should be resolved with these changes.
Also, change made here should offer basic Solaris compatibility, and has been running production for the company I work for going on 6+ months now.

Thanks for your contribution! I think the support for Solaris would be nice to have.
But I'm not so happy with your solution to the Facter issue. Formatting the manpage every time doesn't look right to me. Depending on the system this might need a couple of processes in addition to the pipeline you already use. The seems to be too heavy in my opinion. Also I don't think you can expect the manpages to be available on every system.
I will try to look into this issue myself again.

Understood, and no offense taken. I needed a solution and couldn't find anything truly reliable on Solaris to identify if postfix is installed, other than looking via path. Problem is that on Solaris postfix would likely have been compiled from scratch, and could be anywhere. In theory, a general path search might be valid, and might be the better way to go in general.
I don't disagree that parsing the man page is a big heavy handed.

Let me see, if I understood the issue correctly: you have some hosts using Postfix and some hosts using Sendmail. Postfix provides a compatibility script called sendmail (the Exim mailer also does this). Puppet syncs the fact scripts to all hosts and runs them. The Postfix provided script does not understand all options so this causes errors in the maillog.
Do you think the following would work? The fact script tries to run the exim and postconf commands at first. If one of them works, it concludes that Sendmail is not installed and does not call the sendmail executable.
I think this should resolve your logfile issue and the overhead wouln't be too much.

All correct, and that indeed would/should solve the log issue. And honestly, the log issue is the main reason for the merge request. I've been maintaining a local fork for a while now, and figured the Solaris addition was a bit ugly and wasn't satisfied I could test it across enough variances of systems to bother the pull request.

I have just comitted a version of the fact that checks for other mailers: https://github.com/smoeding/puppet-sendmail/blob/master/lib/facter/sendmail_version.rb
Let me know if this works out for you.

Seems to work nicely!
2017-07-18 12:57:19.061620 DEBUG puppetlabs.facter - fact "sendmail_version" resolved to null and will not be added.
And nothing in the logs from postfix.

I did just notice that you didn't keep my version of the regex. You have:
/^Version ([0-9.]+)$/
but for full solaris compatibility it should be:
/^Version ([0-9.]+).*$/
Because packages will report as:
Version 8.15.5+Sun
Or if removed and installed from opencsw it'd be different still. But obviously the version numbering is still sendmail specific and what you care about.

Ah, I missed that because I wasn't aware of the version numbering scheme.
I pushed a new version of the code.
Thanks!

I am sorry I never closed this. Changes all look good.


Rustfmt a let-else statement

Beta and nightly rustfmt require that this is formatted correctly.

@bors r+

:pushpin: Commit 988eebe2220a0f3dec9b780cd671fcf2e3526f0b has been approved by weihanglo
It is now in the queue for this repository.

:hourglass: Testing commit 988eebe2220a0f3dec9b780cd671fcf2e3526f0b with merge f7619212067a00b7d157e75544f32b6174111943...

:sunny: Test successful - checks-actions
Approved by: weihanglo
Pushing f7619212067a00b7d157e75544f32b6174111943 to master...


http://<IP_ADDRESS>/api/2.0/capabilities.json 502 gateway

After I set up the environment, start all docker images. I am getting the ERROR GET http://xx.xxx.xxx.xx/api/2.0/capabilities.json 502 (Bad Gateway) when I start it in browser.

Hello @farmerx, did you get this error in a network browser, or do you have 502 (Bad Gateway) on the web page? Usually this error occurs when starting the community server, and after some time you will open the portal.

I am exec sh run-community-server.sh throw error
run-community-server.sh: 161: run-community-server.sh: Syntax error: "(" unexpected (expecting "}")

Why do you exec this script?


test: skip flaky playwright test

This test has been consistently flaky, blocking the nightly builds. Ideally, @Cristhianzl can do a quick fix on this test to improve it, but in the meantime the other option is to skip to unblock builds.

Wouldn't it be better to build and not be blocked because of that instead of skipping the test?

I say it's flaky, but I haven't actually seen this specific test pass, so it may just be consistently broken. Can you try running it on your end to check?

Wouldn't it be better to build and not be blocked because of that instead of skipping the test?

I say it's flaky, but I haven't actually seen this specific test pass, so it may just be consistently broken. Can you try running it on your end to check?

oh ok!!
flaky is a test status term that's why I confuse It.. I'll take a look rn


Show /contributions link in navbar when p2p enabled

Why
We want to show the /contributions link in navbar when p2p enabled because it's a key part of the p2p workflow

Pre-Merge Checklist

[x] All new features have been described in the pull request
[x] Security & accessibility have been considered
[x] All outstanding questions and concerns have been resolved
[x] Any next steps that seem like good ideas have been created as issues for future discussion & implementation
[x] High quality tests have been added, or an explanation has been given why the features cannot be tested
[x] New features have been documented, and the code is understandable and well commented
[x] Entry added to CHANGELOG.md if appropriate

What
Screenshots of current code:
Logged out with P2P

Logged out without P2P

Logged in

How
We're adding a prop passed to Vue that indicates if P2P is on or not, and then letting Vue show or hide the button

Testing
There are some JS tests since this is mostly a JS change

Next Steps and Concerns
We talked some about rearranging these. Our concerns were:

arranging buttons so items of higher priority or higher usefulness stand out more, which changes depending on context
if someone logged in trying is to give instruction to someone not logged, it should be easy without the logged in person having to memorize which buttons are and are not the same for the logged out person
having order be consistent and predictable
understanding that most logged in users won't be spending much time if any looking at what a not logged in person sees

Because of all these concerns, we agreed to revisit how to balance them later
Accessibility

We did not do accessibility testing for this. It seems unlikely to me that it would change the accessibility from the previous code
Security

This may reveal the link URL in the JS to someone who is not logged in. That said, that URL will still have the Devise checks, so the additional insecurity is only removing obscurity.

Mob reviewed!

Mob reviewed!


High Sierra compatibility?

Is this project still maintained, and does it work on High Sierra?

I have updated this project to work with Mojave.  It probably will work with high sierra.


Encode Mask for ControlNet

Hi,
I'm wondering how the masks are encoded as the input of ControlNet. If I understood correctly, the masks predicted by SAM are binary masks without class information. So did you randomly sample colors for each mask or?
Thanks a lot in advance!

The color is used for visualization only. We use the encoded mask id as the input to the ControlNet.

Thank you!


Add support for configuring preview environments

At the moment there doesn't seem to be any support for configuring preview environments to be different from production. In the case of my project the things I'm missing in the terraform provider are:

Setting a preview_plan in the render_web_service provider
Setting a preview_plan in the render_postgres provider
Setting preview_value (for each env var) in the render_env_group provider (and also for env vars within web service and cron job)

The render.com documentation describes all of these. I'd really like to migrate away from render.yml to terraform but I can't without access to these settings, is there any plan to add them in the near future?

Render preview environments require using Blueprints at this time. We plan to add support for managing preview environments via other methods in the future.
You may be able to use a combination of Terraform and Github Actions to create a similar preview environment experience. You can run terraform apply on each PR and push, and set the preview plans and values in the TF config based on whether the branch you are working from == main.


Incorrect spacing of \sqrt[n]{x} with different text font sizes (XeTeX only)

Description
When unicode-math v0.8k is loaded, the spacing of the superscript in the root \sqrt[n]{x} changes dramatically when a larger font size is chosen, resulting in very unpleasant output. This does not occur when unicode-math is not loaded. Only XeTeX seems to be affected.
Check/indicate

[x] Relevant for XeTeX
[ ] Relevant for LuaTeX
[x] Issue tracker has been searched for similar issues?
[ ] Links to <tex.stackexchange.com> discussion if appropriate

Minimal example demonstrating the issue
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
	\Huge
	\[
		\sqrt[n]{x} \sqrt{x}
	\]
\end{document}

Further details
Output without unicode-math:

Output with unicode-math:

hi
I am using texlive version 2021.20220204-1 as packaged in Ubuntu,  and XeTeX , and the following
\documentclass{article}
\usepackage[paperwidth=1in,paperheight=1in,top=1pt]{geometry}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmathfont{STIX Two Math}
\begin{document}
\Huge
\noindent
\(\sqrt[n]{x}\)
\end{document}

produces

where the issue is instead that the n touches the square root


Improve bootstrapping process

Update bootstrap script to make it idempotent
Retry bootstrap func if bootstrapping process is fails

Co-authored-by: ekarisky<EMAIL_ADDRESS>Co-authored-by: nieltg<EMAIL_ADDRESS>

This PR depends on pr add mark bootstrap started


Use newer version of pipeline-docker-build image

The pipeline-docker-build includes a fix for the clamav-scan task failing with newer OSP version due to stricter validation.

/lgtm


Adopt swift-syntax 5.10.

This PR updates our swift-syntax dependency to the 510.0.0 tag.
Checklist:

[x] Code and documentation should follow the style of the Style Guide.
[x] If public symbols are renamed or modified, DocC references should be updated.

@swift-ci please test

@swift-ci please test Linux

@swift-ci please test

@swift-ci please test

@swift-ci please clean test

@swift-ci please test

@swift-ci pleasr test Linux

@swift-ci please test Linux

This unfortunately makes swift-testing incompatible with any project that depends on swift-syntax 509, either directly or via a dependency/macro library that hasn't been updated. Does swift-testing take advantage of new 510 features, or could it use a more flexible strategy, as described here: https://www.pointfree.co/blog/posts/116-being-a-good-citizen-in-the-land-of-swiftsyntax

Yes, swift-testing takes advantage of swift-syntax 5.10 features.


MSTEST0016 and base test class

We have the following structure in some of our test projects:
[TestClass]
public abstract class TestBase
{
    public TestContext TestContext { get; set; }

    [TestInitialize]
    public void RunTestSetup()
    {
        ...
    }

    [ClassCleanup]
    public static void ClassCleanup()
    {
        ...
    }
}

[TestClass]
public sealed class SomeTest : TestBase
{
    ...
}

After upgrading to 3.3.1 we started getting the error:
error MSTEST0016: Test class 'TestBase' should have at least one test method or be 'static' with method(s) marked by '[AssemblyInitialization]' and/or '[AssemblyCleanup]'
Should MSTEST0016 be checking for this pattern and not trigger the warning/error, or is there a better approach?
AB#2079035

Hi @avivanoff,
As usual thank you for testing our analyzers and for your continuous feedback to improve MSTest :)
Assuming you don't have test methods in TestBase then you don't need the [TestClass] attribute on the base class.
Side note not related to MSTEST0016 but [ClassCleanup] is working in a counter intuitive way (I plan to fix this in v4 as it implies breaking changes). By default it is equivalent to [AssemblyCleanup] and runs after all tests have been executed and not all tests of current class or children classes. To change this you will need to pass ClassCleanupBehavior.EndOfClass

Just to be sure. Does it mean that when you process classes marked with TestClassAttribute you include the whole hierarchy? Will DeploymentItemAttribute on TestBase be processed as well?

Assuming you don't have test methods in TestBase then you don't need the [TestClass] attribute on the base class.
Removal of TestClass from TestBase triggers MSTEST0004: Public types should be test classes.

@Evangelink, any updates?

Hey @avivanoff, sorry for the missing updates here. We had a few team chat and we haven't yet decided the direction we want to take that's why I postponed the fix for the v3.5 that is happening this sprint.

@avivanoff we will be working on the fix on that this week, sorry it took so much time.
I have some side question, is TestBase defined in a different assembly? Can't it be made internal?
The more I look at MSTEST0004 the more I am thinking the rule should ignore abstract and static types.

@Evangelink, making TestBase internal would force all derived classes to be internal as well.

@Evangelink, I still have this issue. Should I file a new issue, or you would re-open this one?

@Youssef1313 could you please have a look?

@Youssef1313, sample  project.

Thanks for the repro @avivanoff
From what I'm seeing from your repro, it looks like you could just remove TestClass attribute from TestBase. Any reason you have it?

@Youssef1313, removal of TestClass from TestBase triggers MSTEST0035: [DeploymentItem] can be specified only on test class or test method.

@avivanoff I tend to think that this is a false positive for MSTEST0035. DeploymentItemAttribute is currently inherited and is okay to be added on non-test class. I'll need to discuss more with @Evangelink.
Sorry @avivanoff, but as it is off time, we may not be able to get back to you before the new year.


🐛 BUG: Python workers cannot deploy correctly when using FastAPI

Which Cloudflare product(s) does this pertain to?
Workers for Platforms
What version(s) of the tool(s) are you using?
wrangler 3.50.0
What version of Node are you using?
21.7.2
What operating system and version are you using?
Linux Archlinux latest-lts
Describe the Bug
Observed behavior
When I deployed the project following the example project, wrangler told me that requirements.txt is not currently supported.    The original text I got was: "You cannot yet deploy Python Workers that depend on packages defined in requirements.txt.    Support for Python packages  is coming soon.    [code: 10021]"
When I remove requirements.txt, it says: ModuleNotFoundError: No module named 'fastapi'.
Expected behavior
There is at least one way to properly deploy the project
Steps to reproduce
git clone https://github.com/cloudflare/python-workers-examples.git
cd 03-fastapi
npx wrangler@latest deploy

Please provide a link to a minimal reproduction
https://github.com/cloudflare/python-workers-examples/tree/main/03-fastapi
Please provide any relevant error logs
Error 1:
[ERROR] A request to the Cloudflare API (/accounts/xxx/workers/scripts/xxxx) failed.
You cannot yet deploy Python Workers that depend on packages defined in requirements.txt. Support
for Python packages is coming soon. [code: 10021]
If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose
======================================================================
Error 2:
[ERROR] A request to the Cloudflare API (/accounts/xxx/workers/scripts/xxxx) failed.
Uncaught Error: PythonError: Traceback (most recent call last):
File "/lib/python312.zip/_pyodide/_base.py", line 629, in pyimport_impl
res = import(stem, fromlist=fromlist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/session/metadata/main.py", line 9, in
from fastapi import Depends, FastAPI
ModuleNotFoundError: No module named 'fastapi'

Hi @MemoryShadow! As the error message upon deploy states, you cannot yet deploy Python Workers that depend on packages for now. For local development, they are supported, therefore there is no work in wrangler to track so I will close this issue. Support for Python packages in the platform is coming soon 👍

Hi @RamIdeas - sorry for commenting here while the issue is closed, wanted to +1 as we are also dependent on package (specifically, aiohttp) for deployment of a Worker.
Does the team have an estimation of soon? Before summer? After summer?
Thanks!

This confuses me. If wranger deploy doesn't work for Python worker in many cases, how am I supposed to deploy it?

The docs describe a bunch of packages provided by the runtime which you can use.
@christianversloot aiohttp is also mentioned on that page under HTTP Client Libraries

So, why have these tutorials ?
https://developers.cloudflare.com/workers/languages/python/packages/fastapi/
https://github.com/cloudflare/python-workers-examples/tree/main/03-fastapi
If it's not even run, why bother to add?

I've tried deploying in multiple ways...

Importing aiohttp without requirements.txt - deploy fails because aiohttp cannot be found.
Importing aiohttp with requirements.txt - error message about requirements.txt not being supported.
Importing aiohttp via pyodide - deploy fails because packages are encoded within the environment.

In other way, there seems no way to use things right now, similar as to what @oaigudmundsson had already wondered.
For now I've had no other option to convert my worker into a JS based one.

Not only can't it be deployed to Workers, but the FastAPI demo doesn't even work locally. What is the purpose of its tutorial?

It doesnt even work in localhost. And it's the official cloudflare example...

Running npx wrangler@latest dev on the fastapi example works fine for me currently. If anyone still cannot make wrangler dev work on these examples, can you run wrangler version and post the version number?

Hi there, I'm facing a similar issue with the requirements:
I'm using the wrangler version:  ⛅ wrangler 3.84.1
The error message that I receive:
" found in requirements.txt. Note that requirements.txt should contain package names only, not version specifiers.
I have added a few requirements of my own as well but can you please tell me why the server is not working locally either?


Add pop-out link on GWS hits in realtionship table

Some work done here: https://github.com/dsgelab/risteys/tree/FR_FG_WIP_coloc_hits_links

[ ] Check code in this branch
[ ] Push if code is ok

Need reworking, since Operation Sunrise removed codes related to this.

Fixed by https://github.com/dsgelab/risteys/commit/5ed57375c45afbac1a54434138eb64204f09ce6e


Build fails when config includes redocusaurus and docusaurus-theme-search-typesense

Description
Hi
I'm getting a build error when I compile with 2 plugins in the same config

redocusaurus 1.3.0
docusaurus-theme-search-typesense 0.7.0-0

I also wanted to note that I only run into this error when running npm run build if i do npm start everything works fine with both plugins available in the docusaurus config.
I've tried a mix of the following

rm -rf node_modules package-lock.json and reinstall
downgrading docusaurus to v2.0.1
upgrading to docusaurus v2.1.0

I've noticed that if I were to comment out the redocusaurus config in presets of docusaurus.config.js OR themes:['docusaurus-theme-search-typesense'] the build happens smoothly
docusaurus.config.js
  presets: [
    [
      '@docusaurus/preset-classic',
      /** @type {import('@docusaurus/preset-classic').Options} */
      ({
        docs: {
          sidebarPath: require.resolve('./sidebars.js'),
        },
        blog: false,
        theme: {
          customCss: require.resolve('./src/css/custom.css'),
        },
      }),
    ],
    [
      'redocusaurus',
      {
        specs: [
          {
            spec: require.resolve('./static/api_spec/open-api-spec.yml'),
            route: '/api',
          },
        ],
        theme: {
          primaryColor: '#2e8555',
          primaryColorDark: '#25c2a0'
        },
      },
    ],
  ],
  themes: ['docusaurus-theme-search-typesense'],

package.json
{
  "name": "json-api-docs",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "docusaurus": "docusaurus",
    "start": "docusaurus start",
    "build": "docusaurus build",
    "swizzle": "docusaurus swizzle",
    "deploy": "docusaurus deploy",
    "clear": "docusaurus clear",
    "serve": "docusaurus serve",
    "write-translations": "docusaurus write-translations",
    "write-heading-ids": "docusaurus write-heading-ids",
    "typecheck": "tsc"
  },
  "dependencies": {
    "@docusaurus/core": "^2.1.0",
    "@docusaurus/preset-classic": "^2.1.0",
    "@mdx-js/react": "^1.6.22",
    "clsx": "^1.2.1",
    "docusaurus-theme-search-typesense": "^0.7.0-0",
    "prism-react-renderer": "^1.3.5",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "redocusaurus": "^1.3.0"
  },
  "devDependencies": {
    "@docusaurus/module-type-aliases": "^2.1.0",
    "@tsconfig/docusaurus": "^1.0.5",
    "typescript": "^4.7.4"
  },
  "browserslist": {
    "production": [
      ">0.5%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "engines": {
    "node": ">=16.14"
  }
}

error message
[INFO] [en] Creating an optimized production build...
✔ Client
✖ Server
  Compiled with some errors in 15.89s

main:55529
                {}.DEBUG = namespaces;
                  ^

SyntaxError: Unexpected token '.'
[ERROR] Unable to build website for locale en.
[ERROR] Error: Failed to compile with errors.
    at .../json-api-docs/node_modules/@docusaurus/core/lib/webpack/utils.js:180:24
    at .../json-api-docs/node_modules/webpack/lib/MultiCompiler.js:554:14
    at processQueueWorker (.../json-api-docs/node_modules/webpack/lib/MultiCompiler.js:491:6)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
[INFO] Docusaurus version: 2.1.0
Node version: v16.14.2

Steps to reproduce

implement redocusaurus
implement searchbar utilizing typesense
npm run build with both redocusaurus and docusaurus-theme-search-typesense enabled in the docusaurus config

Expected Behavior

I would expect the build to be successful / compete

Actual Behavior

Build fails when compiling the "server"

Metadata
Typsense Version:
0.7.0-0
OS:
MacOS Monterey 12.6

I have the exact same issue and to be honest I have no idea where to even start debugging it.
I made a minimal example to reproduce the build error, I hope it will help whoever can debug this:
https://github.com/balazsbotond/redocusaurus-typesense-bug-repro

Please note that @GalexyN also reported the same issue here: https://github.com/rohit-gohri/redocusaurus/issues/236
I've found a closed issue about the same problem in the debug.js project.
A PR which fixed this issue with minimal changes was rejected with the justification that "it wasn't the maintainers' job to fix other people's messes". Another PR which may fix this issue has been open for more than four years.
The original issue offers several possible workarounds by defining webpack plugins but I'm not sure these can be added to a Docusaurus project.
One of my coworkers suggested simply commenting out the offending line in the node_modules folder (node_modules/debug/src/node.js):
function save(namespaces) {
	if (namespaces) {
		// process.env.DEBUG = namespaces;
	} else {
		// If you set a process.env field to null or undefined, it gets cast to the
		// string 'null' or 'undefined'. Just delete instead.
		delete process.env.DEBUG;
	}
}

Which, while being an incredibly hacky solution, is the one we currently use as part of our CI pipeline by running the following sed command after installing npm packages:
sed -i '/process.env.DEBUG = namespaces;/c\// process.env.DEBUG = namespaces;' ./node_modules/debug/src/node.js

Far from ideal, I know, but I hope it helps someone until the root cause is fixed.


Pagination League\Fractal\Pagination\IlluminatePaginatorAdapter

Programmed custom pagination as recommended in Laravel and Fractal, because of latter bad performance issues.


Project Generator With Shoulda Test Causing Test::Unit::TestCase Related Error

Using Padrino 0.12.3 with ActiveRecord ORM.
The shoulda generator requires Test::Unit::TestCase which results in a variety of errors.
Under 2.1.2:
/tmp/shoulda-padrino >rake test:models
=> Executing Rake test:models ...
/Users/sshaw/.rvm/rubies/ruby-2.1.2/bin/ruby -I"lib" -I"/Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib" "/Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/models/**/*_test.rb"
MiniTest::Unit::TestCase is now Minitest::Test. From /Users/sshaw/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `<module:Unit>'
/Users/sshaw/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:676:in `<class:Runner>': undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
	from /Users/sshaw/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:261:in `<module:Unit>'
	from /Users/sshaw/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:15:in `<module:Test>'
	from /Users/sshaw/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:7:in `<top (required)>'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
	from /private/tmp/shoulda-padrino/test/test_config.rb:5:in `<top (required)>'
	from /private/tmp/shoulda-padrino/test/models/user_test.rb:1:in `require'
	from /private/tmp/shoulda-padrino/test/models/user_test.rb:1:in `<top (required)>'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:10:in `require'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:9:in `each'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:4:in `select'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:4:in `<main>'
/Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/testtask.rb:108:in `block (3 levels) in define': Command failed with status (1): [ruby -I"lib" -I"/Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib" "/Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/models/**/*_test.rb" ] (RuntimeError)
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/file_utils.rb:57:in `call'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/file_utils.rb:57:in `sh'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/file_utils_ext.rb:37:in `sh'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/file_utils.rb:96:in `ruby'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/file_utils_ext.rb:37:in `ruby'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/testtask.rb:104:in `block (2 levels) in define'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/file_utils_ext.rb:58:in `verbose'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/testtask.rb:100:in `block in define'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
	from /Users/sshaw/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/padrino-core-0.12.3/lib/padrino-core/cli/base.rb:23:in `rake'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/padrino-core-0.12.3/bin/padrino:9:in `<top (required)>'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/bin/padrino:23:in `load'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/bin/padrino:23:in `<main>'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
	from /Users/sshaw/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'

Under 1.9.3:
/tmp/shoulda-padrino >rake test:models
=> Executing Rake test:models ...
/Users/sshaw/.rvm/rubies/ruby-1.9.3-p547/bin/ruby -I"lib" -I"/Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib" "/Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/models/**/*_test.rb"
MiniTest::Unit::TestCase is now Minitest::Test. From /Users/sshaw/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/test/unit/testcase.rb:8:in `<module:Unit>'
/Users/sshaw/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/test/unit.rb:328:in `autorun': uninitialized class variable @@installed_at_exit in Test::Unit::Runner (NameError)
	from /Users/sshaw/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/test/unit.rb:640:in `<top (required)>'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
	from /private/tmp/shoulda-padrino/test/test_config.rb:5:in `<top (required)>'
	from /private/tmp/shoulda-padrino/test/models/user_test.rb:1:in `require'
	from /private/tmp/shoulda-padrino/test/models/user_test.rb:1:in `<top (required)>'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:10:in `require'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:9:in `each'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:4:in `select'
	from /Users/sshaw/.rvm/gems/ruby-1.9.3-p547/gems/rake-10.4.2/lib/rake/rake_test_loader.rb:4:in `<main>'

Once I replace the Test::Unit stuff with Minitest::Test I get a deprecation warning that's sure to confuse some:
/tmp/shoulda-padrino >rake test:models
=> Executing Rake test:models ...
/Users/sshaw/.rvm/rubies/ruby-2.1.2/bin/ruby -I"lib" -I"/Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib" "/Users/sshaw/.rvm/gems/ruby-2.1.2/gems/rake-10.4.2/lib/rake/rake_test_loader.rb" "test/models/**/*_test.rb"
Run options: --seed 45402

# Running:

DEPRECATION WARNING: You did not specify a value for the configuration option `active_support.test_order`. In Rails 5, the default value of this option will change from `:sorted` to `:random`.
To disable this warning and keep the current behavior, you can add the following line to your `config/environments/test.rb`:

  Rails.application.configure do
    config.active_support.test_order = :sorted
  end

Alternatively, you can opt into the future behavior by setting this option to `:random`. (called from test_order at /Users/sshaw/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/test_case.rb:42)
.

I would try to fix this but I wondered: Should shoulda -well shoulda-context really- continue to be supported? My thinking is that with the popularity of MiniTest, people are now using MiniTest::Spec
for their rspec free contexts.

shoulda-matchers has been maintained actively, but shoulda-context seems to be stopped maintaining.
I'm not sure if we should support the shoulda as our component.
If we continue to support shoulda, we should fix a few points.

Standard attached test-unit has different behavior depending on the version of ruby
I'd like to suggest to use the test-unit. Also this gem should be inserted before gem 'shoulda'

About outdated components, I've just opened the issue.

shoulda-matchers has been maintained actively, but shoulda-context seems to be stopped maintaining.
I'm not sure if we should support the shoulda as our component.
If we continue to support shoulda, we should fix a few points.

Standard attached test-unit has different behavior depending on the version of ruby
I'd like to suggest to use the test-unit. Also this gem should be inserted before gem 'shoulda'

About outdated components, I've just opened the issue.