Enhance stats

This issues serves the purpose to track all things that could be improved or implemented to make stats more accurate.
This is an ever evolving list

[ ] Pet perks that alter weapon, armor or stats directly
[ ] Magic find from pet score
[ ] Century cakes, see #1386
[ ] Potion effects, see #1382
[ ] Dungeon shop upgrades, see #1385
[ ] Harp quest, see #1384
[ ] Accessory bag power and tuning, see #1381
[ ] Bestiary level (+2hp per level)
[x] Reaper peppers (+1hp each)
[ ] Harp intelligence bonus
Reforges:

[ ] Renown
[ ] Loving, see #1419

Armor set bonuses or abilities

[ ] Superior Dragon Armor
[ ] Young Dragon Armor
[ ] Cheap Tuxedo
[ ] Fancy Tuxedo
[ ] Elegant Tuxedo
[ ] Lapis Armor
[ ] Emerald Armor
[ ] Fairy Armor
[ ] Speedster Armor
[ ] Mastiff Armor

Item abilities

[ ] Day Crystal
[ ] Night Crystal
[ ] Obsidian Chestplate
[ ] Speed Talisman
[ ] Speed Ring
[ ] Speed Artifact
[ ] Frozen Chicken

Items giving personalized bonus based on kills or other things ("Kills: ", "Your Bonus: ", ...)

EHP?

Also see lib.js->getStats()

Hey, letting u know that this stuff has been already done in QwackAPI. Accuracy isn't 100% there are some stuff which are not possible to make like Magic Find and Wisdom from Booster Cookie (Impossible to detect if player has an cookie or not, not in API I think, not 100% sure) and 1-10 Intelligence (Defuse Kit, not in API). Example of stats can be found Here. I have tested this on multiple profiles and accounts, accuracy is like 99% without taking in fact impossible stuff, mostly because Hypixel's WIKI's reforge information isn't 100% accurate.
I made this recently so code isn't really clean or fully optimized. I have to update some stuff like calculation so it uses names of items instead of IDs and stuff like that, but other than that it's pretty much complete

Completion

[ ] Bestiary Level (Health)
[x] Cake Bag (Health)
[x] Catacombs Level (Health)
[x] Reaper Peppers (Health)
[ ] Unique Pets (Magic Find)
[ ] Jacob's Farming Shop (Farming Fortune)
[ ] Permanent stats from Wither Essence Shop
[x] Fairy Souls
[x] Slayer Level Up Bonus
[ ] Slayer Tier Completions (Combat Wisdom
[ ] Skill Level up (Carpentry is missing)
[x] Equipment
[x] Active Accessories
[ ] Custom accessory abilities (Day/Night Crystal)
[ ] Current Reforge
[ ] HOTM (Mining Fortune, Speed, Mining Wisdom)
[ ] Harp (Intelligence)
[x] Armor
[ ] Custom Armor Abilities (Superior, Young, Obsidian Chestplate etc..)
[x] Active Pet
[ ] Custom Pet Abilities (Whale pet health multiplier, Ender Dragon stats Multiplier etc..)
[ ] Active Potion Effects


Fix error when reading gpkg with bbox

closes #149 and #4

Note that this also fixes and #4 as far as I can tell...

@theroggy I updated to resolve conflicts esp. after #151.  Would you mind taking a quick look at the latest to make sure everything is still OK?  (tests pass and I think all your original logic was preserved)

It's been a while, but at first sight it seems OK...
Back then I recall writing the test first first as well to be sure it caught the issue, so if the tests pass it should be OK.

Thanks @theroggy !  (sorry for the long delay in review / merge)


phpPackages.composer: 2.7.2 -> 2.7.3

Description of changes
Changes:
https://github.com/composer/composer/releases/tag/2.7.3

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

No new failures.
Result of nixpkgs-review run on x86_64-linux 1

1 package failed to build:

php81Packages.phpinsights

66 packages built:

adminer
bookstack
composer-require-checker
davis
firefly-iii
librenms
movim
n98-magerun
n98-magerun2
paratest
pdepend
pest
phel
php81Packages.box (php82Packages.box ,php83Packages.box)
php81Packages.castor
php81Packages.composer
php81Packages.deployer
php81Packages.grumphp
php81Packages.phan
php81Packages.phing
php81Packages.phive
php81Packages.php-codesniffer
php81Packages.php-cs-fixer
php81Packages.php-parallel-lint
php81Packages.phpmd
php81Packages.phpstan
php81Packages.psalm
php81Packages.psysh
php82Packages.castor
php82Packages.composer
php82Packages.deployer
php82Packages.grumphp
php82Packages.phan
php82Packages.phing
php82Packages.phive
php82Packages.php-codesniffer
php82Packages.php-cs-fixer
php82Packages.php-parallel-lint
php82Packages.phpinsights
php82Packages.phpmd
php82Packages.phpstan
php82Packages.psalm
php82Packages.psysh
php83Packages.castor
php83Packages.composer
php83Packages.deployer
php83Packages.grumphp
php83Packages.phan
php83Packages.phing
php83Packages.phive
php83Packages.php-codesniffer
php83Packages.php-cs-fixer
php83Packages.php-parallel-lint
php83Packages.phpinsights
php83Packages.phpmd
php83Packages.phpstan
php83Packages.psalm
php83Packages.psysh
phpactor
phpdocumentor
phpunit
pixelfed
platformsh
robo
snipe-it
vimPlugins.phpactor

Add a :+1: reaction to pull requests you find important.

@ofborg build phpPackages.composer


Questions: Best approach to re-use a set of tests for a series of URL

Hi,
i have 50 url to check with the same set of tests.
right now this 50 urls are set in an array so i can loop them.
what would be the best approach to handle that ?
statsAssertions.tests.forEach(function(value, index, array) {

    describe("Series Stats Endpoint", function () {

     before(function () {
        apiResponse = chakram.get( myUrl);
     })

     /* set of tests */
      it("should return json content type", function() {
           return expect(apiResponse).to.have.header("content-type", "/json/");
      } );

    })
})

Would that approach work ? (currently coding it)

it seems to work perfectly like this


Make document ID URL-safe + refactorings

Codecov Report
Patch coverage: 100.00% and project coverage change: +0.15 :tada:

Comparison is base (d873381) 85.37% compared to head (1d2a473) 85.52%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #15      +/-   ##
============================================
+ Coverage     85.37%   85.52%   +0.15%
  Complexity      125      125
============================================
  Files            18       18
  Lines           383      387       +4
============================================
+ Hits            327      331       +4
  Misses           56       56

Impacted Files
Coverage Δ

src/Index/AbstractIndex.php
94.87% <100.00%> (ø)

src/Model/ElasticsearchableTrait.php
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Improve displayName description

closes https://github.com/MicrosoftDocs/office-docs-powershell/issues/11323

@tiburd Please merge this PR. Thanks


Unable to modify pg_ident.conf

Hey,
it is possible to modify the pg_hba in the Cluster yaml, but I saw no option todo the same with pg_ident.conf. Is there another way of modifing this file?
Best regards
Niclas

What's your goal?

I would like to use cloudNativePG with supabase, so I made their postgres image compatible with cloudNativePG with a custom image that builds on top of their image, but the pg_ident.conf and pg_hba.conf get overwritten by the cloudNativePG operator.  I need settings that match https://github.com/supabase/postgres/blob/develop/ansible/files/postgresql_config/pg_hba.conf.j2

I was able to run the supabase postgres image with cloud native by doing
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: {{ include "supabase.db.fullname" . }}
  labels:
    {{- include "supabase.labels" . | nindent 4 }}
spec:
  instances: 2
  primaryUpdateStrategy: unsupervised
  imageName: "supabase/postgres:<IP_ADDRESS>"
  imagePullPolicy: IfNotPresent
  postgresUID: 101
  postgresGID: 102
  ...

The actual issue was the postgres user id and group.
pg_hba and pg_ident are fine and work with supabase postgres image.
I updated my readme README.md


RequestError: Connection lost - read ECONNRESET

Environment
Knex version: 0.15.2
Database + version:  Microsoft SQL + 12.0
OS: ubuntu 16.04
Select applicable template from below.
@ smorey2 , @ lorefnon
Bug

Explain what kind of behaviour you are getting and how you think it should do
unpredictable works at windows 10 system fine that is on my local not on dev environment which is at azure with ubuntu 16.04

Error message
RequestError: Connection lost - read ECONNRESET
at handleError (/src/node_modules/mssql/lib/tedious.js:519:15)
at Connection.emit (events.js:203:15)
at Connection.socketError (/src/node_modules/tedious/lib/connection.js:1028:14)
at Socket. (/src/node_modules/tedious/lib/connection.js:878:18)
at Socket.emit (events.js:203:15)

Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.

Feature discussion / request

Explain what is your use case
I have 4 tables Order,LineItem,Shipment,ShipmentQuantity having some relationship between them which are mention below

ShipmentQuantity table and its relationship
// order table column
static get jsonSchema() {
return {
type: 'object',
required: ['shipmentId', 'lineItemId', 'quantity'],
properties: {
id: { type: 'number' },
shipmentId: { type: 'number' },
lineItemId: { type: 'number' },
quantity: { type: 'number' },
},
};
}
// table relation-ship
static get relationMappings() {
return {
lineItem: {
relation: Model.BelongsToOneRelation,
modelClass: __dirname + '/LineItem',
join: {
from: 'ShipmentQuantity.lineItemId',
to: 'LineItem.id',
},
},
shipment: {
relation: Model.BelongsToOneRelation,
modelClass: __dirname + '/Shipment',
join: {
from: 'ShipmentQuantity.shipmentId',
to: 'Shipment.id',
},
},
};
}
}
Shipment table and its relationship
// Shipment table column
static get jsonSchema() {
return {
type: 'object',
required: ['orderId', 'status'],
properties: {
id: { type: 'number' },
orderId: { type: 'number' },
},
};
}
// table relation-ship
static get relationMappings() {
return {
shipmentQuantities: {
relation: Model.HasManyRelation,
modelClass: __dirname + '/ShipmentQuantity',
join: {
from: 'Shipment.id',
to: 'ShipmentQuantity.shipmentId',
},
},
};
}
LineItem table and its relationship
static get jsonSchema() {
return {
type: 'object',
properties: {
id: { type: 'number' },
orderId: { type: 'number' },
quantitySupplied: { type: 'number' },
name: { type: 'string' },
amount: { type: 'number' },
currency: { type: 'string' },
},
};
}
static get relationMappings() {
 return {
   order: {
   relation: Model.BelongsToOneRelation,
   modelClass: __dirname + '/Order',
    join: {
      from: 'LineItem.orderId',
      to: 'Order.id',
     },
    },
   shipmentQuantities: {
    relation: Model.HasManyRelation,
    modelClass: __dirname + '/ShipmentQuantity',
    join: {
     from: 'LineItem.id',
     to: 'ShipmentQuantity.lineItemId',
  },
 },
};

}
Order table and its relationship
static get jsonSchema() {
return {
type: 'object',
properties: {
id: { type: 'number' },
supplierId: { type: 'number' },
siteId: { type: 'number' },
supplierName: { type: 'string' },
comment: { type: 'string' },
orderRef: { type: 'string' },
total: { type: 'number' },
purchaseOrderNumber: { type: 'string' }
},
};
}
static get relationMappings() {
return {
lineItems: {
relation: Model.HasManyRelation,
modelClass: __dirname + '/LineItem',
join: {
from: 'Order.id',
to: 'LineItem.orderId',
},
},
shipments: {
relation: Model.HasManyRelation,
modelClass: __dirname + '/Shipment',
join: {
from: 'Order.id',
to: 'Shipment.orderId',
},
},
orderShipments: {
relation: Model.HasManyRelation,
modelClass: __dirname + '/OrderShipments',
join: {
from: 'Order.id',
to: 'OrderShipments.orderId',
},
},
};
}
According to above relation I am trying to fetching some data for a particular order with a specific order id and the query is given as below
Order.query()
.joinEager('[shipments.shipmentQuantities.lineItem, lineItems.shipmentQuantities]')
.findById(id);
It gives me error at dev environment connection lost while similar query if I replace joinEager with eager then it would works perfectly at dev environment can anyone tell me that is because of joinEager and eager then what's the difference between it or somthing else that i missed
Missing / erroneus documentation
Did not get the exact error message why connection lost on joinEager and what eager actually do
what happens that in this case eager works easily at dev environment no worked with joinEager

Sorry. Cannot reproduce, nor understand this report.
Please try to reduce the reproduction code of your problem to be runnable single file test code (without objection). Can be reopened if someone understands what is this about...


Deep_Residual_Learning_CIFAR-10.py

Run the model (cifar_model_n5.npz) of the saved here file. I get the following results

Loading data...
Building model and compiling functions...
number of parameters in model: 464154
testing phase!
Final results:
test loss:			3.326520
test accuracy:		40.55 %

I do not understand why such a low accuracy.

Have you made some modification to the code? This should be the output:
$ python Deep_Residual_Learning_CIFAR-10.py 5 cifar_model_n5.npz
Loading data...
Building model and compiling functions...
number of parameters in model: 464154
Final results:
  test loss:                    0.292060
  test accuracy:                92.58 %

I have not  made modification. I added only print('testing phase!'). And changed
from lasagne.layers import Conv2DLayer as ConvLayer
#from lasagne.layers.dnn import Conv2DDNNLayer as ConvLayer
I run this code into ipython notebook. I am using Debian without GPU.
Below is the code

"""
Lasagne implementation of CIFAR-10 examples from "Deep Residual Learning for Image Recognition" (http://arxiv.org/abs/1512.03385)
Check the accompanying files for pretrained models. The 32-layer network (n=5), achieves a validation error of 7.42%,
while the 56-layer network (n=9) achieves error of 6.75%, which is roughly equivalent to the examples in the paper.
"""

from __future__ import print_function

import sys
import os
import time
import string
import random
import pickle

import numpy as np
import theano
import theano.tensor as T
import lasagne

# for the larger networks (n>=9), we need to adjust pythons recursion limit
sys.setrecursionlimit(10000)

# ##################### Load data from CIFAR-10 dataset #######################
# this code assumes the cifar dataset from 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'
# has been extracted in current working directory

def unpickle(file):
    import cPickle
    fo = open(file, 'rb')
    dict = cPickle.load(fo)
    fo.close()
    return dict

def load_data():
    xs = []
    ys = []
    for j in range(5):
      d = unpickle('/home/user/db/cifar-10-batches-py/data_batch_'+`j+1`)
      x = d['data']
      y = d['labels']
      xs.append(x)
      ys.append(y)

    d = unpickle('/home/user/db/cifar-10-batches-py/test_batch')
    xs.append(d['data'])
    ys.append(d['labels'])

    x = np.concatenate(xs)/np.float32(255)
    y = np.concatenate(ys)
    x = np.dstack((x[:, :1024], x[:, 1024:2048], x[:, 2048:]))
    x = x.reshape((x.shape[0], 32, 32, 3)).transpose(0,3,1,2)

    # subtract per-pixel mean
    pixel_mean = np.mean(x[0:50000],axis=0)
    #pickle.dump(pixel_mean, open("cifar10-pixel_mean.pkl","wb"))
    x -= pixel_mean

    # create mirrored images
    X_train = x[0:50000,:,:,:]
    Y_train = y[0:50000]
    X_train_flip = X_train[:,:,:,::-1]
    Y_train_flip = Y_train
    X_train = np.concatenate((X_train,X_train_flip),axis=0)
    Y_train = np.concatenate((Y_train,Y_train_flip),axis=0)

    X_test = x[50000:,:,:,:]
    Y_test = y[50000:]

    return dict(
        X_train=lasagne.utils.floatX(X_train),
        Y_train=Y_train.astype('int32'),
        X_test = lasagne.utils.floatX(X_test),
        Y_test = Y_test.astype('int32'),)

# ##################### Build the neural network model #######################

from lasagne.layers import Conv2DLayer as ConvLayer
#from lasagne.layers.dnn import Conv2DDNNLayer as ConvLayer
from lasagne.layers import ElemwiseSumLayer
from lasagne.layers import InputLayer
from lasagne.layers import DenseLayer
from lasagne.layers import GlobalPoolLayer
from lasagne.layers import PadLayer
from lasagne.layers import ExpressionLayer
from lasagne.layers import NonlinearityLayer
from lasagne.nonlinearities import softmax, rectify
from lasagne.layers import batch_norm

def build_cnn(input_var=None, n=5):

    # create a residual learning building block with two stacked 3x3 convlayers as in paper
    def residual_block(l, increase_dim=False, projection=False):
        input_num_filters = l.output_shape[1]
        if increase_dim:
            first_stride = (2,2)
            out_num_filters = input_num_filters*2
        else:
            first_stride = (1,1)
            out_num_filters = input_num_filters

        stack_1 = batch_norm(ConvLayer(l, num_filters=out_num_filters, filter_size=(3,3), stride=first_stride, nonlinearity=rectify, pad='same', W=lasagne.init.HeNormal(gain='relu')))
        stack_2 = batch_norm(ConvLayer(stack_1, num_filters=out_num_filters, filter_size=(3,3), stride=(1,1), nonlinearity=None, pad='same', W=lasagne.init.HeNormal(gain='relu')))

        # add shortcut connections
        if increase_dim:
            if projection:
                # projection shortcut, as option B in paper
                projection = batch_norm(ConvLayer(l, num_filters=out_num_filters, filter_size=(1,1), stride=(2,2), nonlinearity=None, pad='same', b=None))
                block = NonlinearityLayer(ElemwiseSumLayer([stack_2, projection]),nonlinearity=rectify)
            else:
                # identity shortcut, as option A in paper
                identity = ExpressionLayer(l, lambda X: X[:, :, ::2, ::2], lambda s: (s[0], s[1], s[2]//2, s[3]//2))
                padding = PadLayer(identity, [out_num_filters//4,0,0], batch_ndim=1)
                block = NonlinearityLayer(ElemwiseSumLayer([stack_2, padding]),nonlinearity=rectify)
        else:
            block = NonlinearityLayer(ElemwiseSumLayer([stack_2, l]),nonlinearity=rectify)

        return block

    # Building the network
    l_in = InputLayer(shape=(None, 3, 32, 32), input_var=input_var)

    # first layer, output is 16 x 32 x 32
    l = batch_norm(ConvLayer(l_in, num_filters=16, filter_size=(3,3), stride=(1,1), nonlinearity=rectify, pad='same', W=lasagne.init.HeNormal(gain='relu')))

    # first stack of residual blocks, output is 16 x 32 x 32
    for _ in range(n):
        l = residual_block(l)

    # second stack of residual blocks, output is 32 x 16 x 16
    l = residual_block(l, increase_dim=True)
    for _ in range(1,n):
        l = residual_block(l)

    # third stack of residual blocks, output is 64 x 8 x 8
    l = residual_block(l, increase_dim=True)
    for _ in range(1,n):
        l = residual_block(l)

    # average pooling
    l = GlobalPoolLayer(l)

    # fully connected layer
    network = DenseLayer(
            l, num_units=10,
            W=lasagne.init.HeNormal(),
            nonlinearity=softmax)

    return network

# ############################# Batch iterator ###############################

def iterate_minibatches(inputs, targets, batchsize, shuffle=False, augment=False):
    assert len(inputs) == len(targets)
    if shuffle:
        indices = np.arange(len(inputs))
        np.random.shuffle(indices)
    for start_idx in range(0, len(inputs) - batchsize + 1, batchsize):
        if shuffle:
            excerpt = indices[start_idx:start_idx + batchsize]
        else:
            excerpt = slice(start_idx, start_idx + batchsize)
        if augment:
            # as in paper :
            # pad feature arrays with 4 pixels on each side
            # and do random cropping of 32x32
            padded = np.pad(inputs[excerpt],((0,0),(0,0),(4,4),(4,4)),mode='constant')
            random_cropped = np.zeros(inputs[excerpt].shape, dtype=np.float32)
            crops = np.random.random_integers(0,high=8,size=(batchsize,2))
            for r in range(batchsize):
                random_cropped[r,:,:,:] = padded[r,:,crops[r,0]:(crops[r,0]+32),crops[r,1]:(crops[r,1]+32)]
            inp_exc = random_cropped
        else:
            inp_exc = inputs[excerpt]

        yield inp_exc, targets[excerpt]

# ############################## Main program ################################

def main(n=5, num_epochs=100, model=None):
    # Check if cifar data exists
    if not os.path.exists("/home/user/db/cifar-10-batches-py"):
        print("CIFAR-10 dataset can not be found. Please download the dataset from 'https://www.cs.toronto.edu/~kriz/cifar.html'.")
        return

    # Load the dataset
    print("Loading data...")
    data = load_data()
    X_train = data['X_train']
    Y_train = data['Y_train']
    X_test = data['X_test']
    Y_test = data['Y_test']

    # Prepare Theano variables for inputs and targets
    input_var = T.tensor4('inputs')
    target_var = T.ivector('targets')

    # Create neural network model
    print("Building model and compiling functions...")
    network = build_cnn(input_var, n)
    print("number of parameters in model: %d" % lasagne.layers.count_params(network, trainable=True))

    if model is None:
        # Create a loss expression for training, i.e., a scalar objective we want
        # to minimize (for our multi-class problem, it is the cross-entropy loss):
        prediction = lasagne.layers.get_output(network)
        loss = lasagne.objectives.categorical_crossentropy(prediction, target_var)
        loss = loss.mean()
        # add weight decay
        all_layers = lasagne.layers.get_all_layers(network)
        l2_penalty = lasagne.regularization.regularize_layer_params(all_layers, lasagne.regularization.l2) * 0.0001
        loss = loss + l2_penalty

        # Create update expressions for training
        # Stochastic Gradient Descent (SGD) with momentum
        params = lasagne.layers.get_all_params(network, trainable=True)
        lr = 0.1
        sh_lr = theano.shared(lasagne.utils.floatX(lr))
        updates = lasagne.updates.momentum(
                loss, params, learning_rate=sh_lr, momentum=0.9)

        # Compile a function performing a training step on a mini-batch (by giving
        # the updates dictionary) and returning the corresponding training loss:
        train_fn = theano.function([input_var, target_var], loss, updates=updates)

    # Create a loss expression for validation/testing
    test_prediction = lasagne.layers.get_output(network, deterministic=True)
    test_loss = lasagne.objectives.categorical_crossentropy(test_prediction,
                                                            target_var)
    test_loss = test_loss.mean()
    test_acc = T.mean(T.eq(T.argmax(test_prediction, axis=1), target_var),
                      dtype=theano.config.floatX)

    # Compile a second function computing the validation loss and accuracy:
    val_fn = theano.function([input_var, target_var], [test_loss, test_acc])

    if model is None:
        # launch the training loop
        print("Starting training...")
        # We iterate over epochs:
        for epoch in range(num_epochs):
            # shuffle training data
            train_indices = np.arange(100000)
            np.random.shuffle(train_indices)
            X_train = X_train[train_indices,:,:,:]
            Y_train = Y_train[train_indices]

            # In each epoch, we do a full pass over the training data:
            train_err = 0
            train_batches = 0
            start_time = time.time()
            for batch in iterate_minibatches(X_train, Y_train, 128, shuffle=True, augment=True):
                inputs, targets = batch
                train_err += train_fn(inputs, targets)
                train_batches += 1

            # And a full pass over the validation data:
            val_err = 0
            val_acc = 0
            val_batches = 0
            for batch in iterate_minibatches(X_test, Y_test, 500, shuffle=False):
                inputs, targets = batch
                err, acc = val_fn(inputs, targets)
                val_err += err
                val_acc += acc
                val_batches += 1

            # Then we print the results for this epoch:
            print("Epoch {} of {} took {:.3f}s".format(
                epoch + 1, num_epochs, time.time() - start_time))
            print("  training loss:\t\t{:.6f}".format(train_err / train_batches))
            print("  validation loss:\t\t{:.6f}".format(val_err / val_batches))
            print("  validation accuracy:\t\t{:.2f} %".format(
                val_acc / val_batches * 100))

            # adjust learning rate as in paper
            # 32k and 48k iterations should be roughly equivalent to 41 and 61 epochs
            if (epoch+1) == 41 or (epoch+1) == 61:
                new_lr = sh_lr.get_value() * 0.1
                print("New LR:"+str(new_lr))
                sh_lr.set_value(lasagne.utils.floatX(new_lr))

        # dump the network weights to a file :
        np.savez('cifar10_deep_residual_model.npz', *lasagne.layers.get_all_param_values(network))
    else:
        # load network weights from model file
        with np.load(model) as f:
             param_values = [f['arr_%d' % i] for i in range(len(f.files))]
        lasagne.layers.set_all_param_values(network, param_values)

    # Calculate validation error of model:
    print('testing phase!')
    test_err = 0
    test_acc = 0
    test_batches = 0
    for batch in iterate_minibatches(X_test, Y_test, 500, shuffle=False):
        inputs, targets = batch
        err, acc = val_fn(inputs, targets)
        test_err += err
        test_acc += acc
        test_batches += 1
    print("Final results:")
    print("  test loss:\t\t\t{:.6f}".format(test_err / test_batches))
    print("  test accuracy:\t\t{:.2f} %".format(
        test_acc / test_batches * 100))

line run looks like that
main(model='/home/user/cifar_model_n5.npz')
result is as follow
Loading data...
Building model and compiling functions...
number of parameters in model: 464154
testing phase!
Final results:
test loss:			3.326520
test accuracy:		40.55 %

And changed
from lasagne.layers import Conv2DLayer as ConvLayer
#from lasagne.layers.dnn import Conv2DDNNLayer as ConvLayer

If you do this, you need to add flip_filters=False to the constructor of the convolution layers. This is a mean pitfall we can't fix without breaking backwards compatibility. The recipes should all have been adapted to avoid this (#39), but apparently this one hasn't. Sorry for the trouble!

Thank you! After correcting (flip_filters=False) the program works correctly


Enable GPU acceleration in containers

It is possible to have GPU acceleration in docker containers in WSL as explained in this guide.
However, Installing the Nvidia Docker Toolkit is not so simple on dockerinwsl, since alpine has no pre-built package provided by Nvidia (list of supported distros).
This could be solved by either:

switching to an Ubuntu-based distro for dockerinwsl (or providing another flavor that is based on Ubuntu and has GPU acceleration)
building the Nvidia toolkit for apline and bundling it along with the base image.

FYI: It might be needed to switch to ubuntu anyways (see #13). Maybe this gets easier then.

DockerInWSL 1.2.x is now based on Ubuntu. Feel free to experiment with. You can enter the distro by executing wsl -d clf_dockerinwsl in a normal shell. After that you should be able to use it like any other wsl2 ubuntu installation (besides some networking weirdness because of docker and vpnkit).
Would be great if you could add your experiments to our wiki (https://github.com/cloudflightio/dockerinwsl/wiki) :)

I just tried to enable GPU acceleration.
These steps worked for me: https://docs.nvidia.com/cuda/wsl-user-guide/index.html#ch04-sub02-install-nvidia-docker

This project has been discontinued.


add(wasm) WebAssembly support

WebAssembly support. https://webassembly.org
This is a pretty key part of the web architecture now.
Checklist

[x] Added markup tests, or they don't apply here because...
[x] Updated the changelog at CHANGES.md

Do you want to keep the copy of the Prism grammar as a comment at the bottom?

No, I'll fix that. :)


Added information

From http://geneontology.org/page/go-annotation-standard-operating-procedures

That path will no longer exist; go ahead and move the image into this repo.


Introduce bare option to omit boilerplate

This will be quite useful when converting snippets like documentation.
Will generate this from ./test.tf
        new AwsProvider(this, 'aws', {
                a: "b",
                c: "d",
                region: "us-east-1"
            });

            new DnssimpleProvider(this, 'dnssimple', {
                a: "b",
                c: "d"
            });

            const ubuntu = new Instance(this, 'ubuntu', {
            ami: "ami-0ff8a91507f77f867",
            availabilityZone: "us-east-1a",
            instanceType: "t3.nano",
            tags: [
                {
                    name: "MyInstance"
                }
            ]
        });

        const ubuntu2 = new Instance(this, 'ubuntu2', {
            ami: "ami-0ff8a91507f77f867",
            availabilityZone: "us-east-1a",
            instanceType: "t3.nano",
            tags: [
                {
                    name: "MyInstance2"
                }
            ]
        });

        const reftest = new SsmParameter(this, 'reftest', {
            name: "ExampleInstanceId",
            type: "String",
            value: ubuntu.id
        });

The indentation looks a bit weird, not sure if I broke this.

Perhaps it could be useful to use this library, which is used by the CDKs to generate code and keeps track of indentation.


MacOS Example Needed Modifications

Had to make a few changes to get the MacOS example working.

Added import Foundation to the TelegraphDemo class
Added the Telegraph package (I expected to have to do this) with the Swift Package Manager
Removed the reference to Telegraph.framework (apparently its not needed once the package is installed)

With that, it runs.  Woot!

Oh, xcode version 14.0.1, MacOS Monterey

Thanks, I've added the import Foundation statement, although I haven't ran into issues with that myself.
If you like, feel free to check out the latest commits.


Chapter5 - builder pattern

Problem
Builder pattern not used in the test.
Fix
Replace constuctor by builder pattern

Thanks. The builder is introduced in during chapter 5, so in 05-begin is still not used. From 05-intermediate, the builder pattern is also used in the auto-tests.


Loop results in multiple empty lines

Now while I'm sure I'm doing something wrong, I just can't figure out what it is.
I have the following data set:
// ...

var connections = [
  { remoteAddress: 'xxx.26.22.234',
    hostname: 'host1',
    location: 'xxx',
    lastSeen: Fri Jan 29 2016 14:25:51 GMT-0500 (EST),
    _id: 56abbcbfa9d4e26524a32fdd
  },
  { remoteAddress: 'xxx.193.149.159',
    hostname: 'host2',
    location: 'xxx',
    lastSeen: Fri Jan 29 2016 14:36:59 GMT-0500 (EST),
    _id: 56abbf5b3c758d3325eb7bb4
  }
]

vars.lastConnections = connections;
res.render('user/profile', vars);

The template for the user profile looks like so:
...

Debug data

              User-ID
              {profile.id}

              IP: {connections.remoteAddress}
              Last seen: {connections.lastSeen}

...

 Any idea? (On a side node: I'm working on a larger project without relations to NodeBB, I just liked the templates.js syntax and implemented the engine with express.)

vars.lastConnections = connections;
typo? try switching this to
vars.connections = connections;

The typo just happened while trying to change a few things and see what breaks...
I found the real problem though - the lastSeen (Date) and _id (Mongo ID) were not strings. Once I toStringed them, iteration worked fine. Is this expected behaviour?

No not expected, but that said this isn't valid JSON to begin with, I'm surprised it didn't error out:
lastSeen: Fri Jan 29 2016 14:36:59 GMT-0500 (EST),

I snatched the data object from the output of console.log() as I retrieve it directly from the database. Sorry, missed to add that...

I just committed a passing test that loops an array with objects holding integers (pretty much similar to what you have going on)... seems okay. I can't seem to reproduce on my end
Without doing toString, can you console.log vars right before the res.render line?

That was exactly what I did, the first code block in the issue is the console.log output

Should be fixed in Benchpress


@link parses trailing <...> as part of linkName

Similar to #46428.
Fixes #44818

Yes I think this looks good. Thanks for taking a look!


Fall back to match repository by name in DwC importer

In the DwC Occurrence importer, some repositories may not have acronyms, only names. We should try matching on that if no acronym matches the institutionCode

Codecov Report

Merging #2867 (50174c8) into development (68141b4) will decrease coverage by 10.11%.
The diff coverage is 0.00%.

@@               Coverage Diff                @@
##           development    #2867       +/-   ##
================================================
- Coverage        87.00%   76.88%   -10.12%
================================================
  Files             1890     1540      -350
  Lines            66673    48857    -17816
================================================
- Hits             58009    37564    -20445
- Misses            8664    11293     +2629

Impacted Files
Coverage Δ

...pp/models/dataset_record/darwin_core/occurrence.rb
62.20% <0.00%> (-0.15%)
:arrow_down:

spec/support/concerns/request/api.rb
11.11% <0.00%> (-88.89%)
:arrow_down:

app/models/identifier/global/issn.rb
14.28% <0.00%> (-85.72%)
:arrow_down:

app/models/identifier/global/isbn.rb
8.33% <0.00%> (-85.42%)
:arrow_down:

app/models/identifier/global/orcid.rb
22.22% <0.00%> (-77.78%)
:arrow_down:

app/models/identifier/global/lccn.rb
11.53% <0.00%> (-76.93%)
:arrow_down:

lib/batch_load/import/otus.rb
24.24% <0.00%> (-75.76%)
:arrow_down:

...odels/identifier/global/gen_bank_accession_code.rb
27.27% <0.00%> (-72.73%)
:arrow_down:

app/helpers/workbench/html_helper.rb
33.33% <0.00%> (-66.67%)
:arrow_down:

app/models/identifier/global/lsid.rb
33.33% <0.00%> (-66.67%)
:arrow_down:

... and 736 more

Continue to review full report at Codecov.

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


Updated visual-studio-code to 0.10.11

Thank you for the contribution. It was merged directly as 6d0a3fa60d4e6c65e9c9113086ccdc17bd03f897 to keep commit history cleaner. Your contribution is still credited to you.


Code Release

Hi @jiazhou-garland, thanks for sharing this work!
I would like to know when will the code be publicly available, thanks.

Sorry, the code and checkpoint will be publicly available as soon as possible after the paper acception. Thank you for you attention.

Hi Lindong Kong，
Thank you for your attention to this paper.
We will release the codes and pre-trained weights on GitHub (
https://github.com/jiazhou-garland/E-CLIP) after the paper acceptance ASAP.
Best,
Jiazhou Zhou
Lingdong Kong @.***> 于2023年9月8日周五 19:44写道：

Hi @jiazhou-garland https://github.com/jiazhou-garland, thanks for
sharing this work!
I would like to know when will the code be publicly available, thanks.
—
Reply to this email directly, view it on GitHub
https://github.com/jiazhou-garland/ELIP/issues/1, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANY7S64VTYVRWMA5QNDAUVDXZMALPANCNFSM6AAAAAA4QIKFSQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Thanks for your reply. Looking forward to your code!

All codes and checkpoints have been released. If you find my repositories useful, please consider staring 🌟 it and citing 📑 the corresponding papers.


Slightly useful docstrings?

The help screens are borderline useless. Trying to figure out what the CLI commands and parameters actually mean is a huge and completely unnecessary time suck - many of the issues arising in the discord channels would be completely eliminated if the help screens were clear.

:+1: I wonder if we can (partially?) generate this from the graphql descriptions.

Closing this issue as it is stale for a long time.


Getting this error while sending message

Hi,
I got this error yesterday when trying to send message .
MessengerApiException(super=com.github.messenger4j.exception.MessengerApiException: (#2) Service temporarily unavailable, type=Optional[OAuthException], code=Optional[2], fbTraceId=Optional[DRK+4tBKnaY]).
i was trying to fetch the user profile
UserProfile userProfile = null;
try {
//userProfile = messenger.queryUserProfile(senderId);
} catch (MessengerApiException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (MessengerIOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

Seems like you have a conflict with your data (Old or outdated?).
maybe just clean your cache and give it a second try. Or maybe the ist just temporarily unreachable due down time.

Do you still have this issue? Seems to me that there was an error on the messenger platform side.

Issue was with platform today I am not receiving this error.  Thanks for your time.


COMPRESS-660: Make commons.codec imports optional

Hi @beatbrot
Thank you for your PR.
You'll want to run mvn by itself to run all of our build checks in order to catch the current build failures.
TY!

@garydgregory Alright. mvn passes on my machine :) Maybe you could re-trigger the workflows?

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (1887b3d) 80.76% compared to head (4584cea) 80.77%.
Report is 90 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #482   +/-   ##
=========================================
  Coverage     80.76%   80.77%
- Complexity     6801     6830   +29
=========================================
  Files           348      348
  Lines         24945    25007   +62
  Branches       4029     4034    +5
=========================================
+ Hits          20148    20200   +52
- Misses         3269     3283   +14
+ Partials       1528     1524    -4

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

TY @beatbrot Merged!


Format cell display

Environment

Operating System: windows
Python Version: 3.9.2
How did you install Qgrid: pip

Description of Issue
Display format of timedeldata objects

What did you expect to happen?
Display de column the sameway it looks in pandas or change format with a function.

What happened instead?
The display format looks like this

Reproduction Steps
import numpy as np
import pandas as pd

# td = np.random.randint(1, 400,400)

df = pd.DataFrame([pd.Timedelta(days=d) for d in td],columns=['timeDelta'])

import qgrid
display(qgrid.show_grid(df))
display(df)

What steps have you taken to resolve this already?
None

Same problem here but I have a temporary fix. You can use:
qgrid.set_grid_option('forceFitColumns', False)
And eventualy increase default column width for more visibility:
qgrid.set_grid_option('defaultColumnWidth', 100)
Hope this help


FCP is larger than LCP

Thanks for this awesome library.
I am using GA for collecting the web vitals data. From GA dashboard, I can see FCP value is larger than LCP at some date, which is beyond our expectation(FCP should be less than LCP). Seems there is something wrong.

I am using web-vitals v0.2.2.
The following is my data reporting code (pls let me know if I am using it incorrectly):
import {getFCP, getLCP} from 'web-vitals';

function sendToGoogleAnalytics({name, delta, id}) {
  // Assumes the global `gtag()` function exists, see:
  // https://developers.google.com/analytics/devguides/collection/gtagjs
  gtag('event', name, {
    event_category: 'Web Vitals',
    // Google Analytics metrics must be integers, so the value is rounded.
    // For CLS the value is first multiplied by 1000 for greater precision
    // (note: increase the multiplier for greater precision if needed).
    value: Math.round(name === 'CLS' ? delta * 1000 : delta),
    // The `id` value will be unique to the current page load. When sending
    // multiple values from the same page (e.g. for CLS), Google Analytics can
    // compute a total by grouping on this ID (note: requires `eventLabel` to
    // be a dimension in your report).
    event_label: id,
    // Use a non-interaction event to avoid affecting bounce rate.
    non_interaction: true,
  });
}

getFCP(sendToGoogleAnalytics);
getLCP(sendToGoogleAnalytics);

You are most likely experiencing what our customers are experiencing as well with real-user data: https://www.instana.com/docs/website_monitoring/faq#why-are-some-website-metrics-not-always-available-andor-have-weird-values
Excerpt:

This in turn can mean that statistical aggregations across a set of observations result in smaller LCP than FCP values. While this is impossible to observe for a single page load, it can occur for a set of page loads given a difference in web browser support as the following examples shows.
Observed First-Contentful Paint values: 1000 ms, 1400 ms, 1600 ms. Mean: 1333ms.
Observed Largest-Contentful Paint values: 1000 ms, UNSUPPORTED METRIC, 1600 ms. Mean: 1300ms.

I tried to add a filter "browser == Chrome", and then there is no more FCP > LCP.
@bripkens Thank you for your explanation.


Superset Visualizations are timing out after 60 seconds. Want to increase that. How can I implement it?

Timeout error
We’re having trouble loading this visualization. Queries are set to timeout after 60 seconds.
This may be triggered by:
Issue 1000 - The dataset is too large to query.
Issue 1001 - The database is under an unusual load.

Hey there @imamaigein99 moving to Github Discussions as this isn't a bug per say!
In general, I would think about Superset as a light frontend over your existing database / data stack. So if you attempt to query a large # of rows / records that your database can't handle, it'll take too long for the results to come back.


fix(blupdate)

vol keywords are replaced by base name and related refactors are made.
Even though haven't updated the old test case which passes on old code, after refactoring it is still passing. I think the test need to update. i was not sure so i kept it untouched. the tutorial test are failing even though the docs_src module is in virtual env.

@10zinten all the tests are passing. please have a look.


Allow multiple values for a single option

This is a feature request.
The use case is as follows: I use boilr to create various kinds of configuration files, such as configuration for Kubernetes deployments or XML configuration for Magento. In both these kinds of configuration, there's the possibility to have multiple values under a single "option". Below is an example of Volumes in Kubernetes, where you might have multiple assigned to each pod:
  role: "{{ Role | toLower }}"
    spec:
      volumes:
      # Record 1
      - name: "{{ Service | toLower }}-etc-conf-d"
        {{ VolumeType }}:
          {{ if eq VolumeType "HostVolume" }}path: /data/{{ Service | toLower }}/
          {{ else if eq VolumeType "ConfigMap"}}name: "{{ Service | toLower }}-etc-conf-d"
          {{ end }}
      # Record 2
      - name: "{{ Service | toLower }}-data"
        {{ VolumeType }}:
          {{ if eq VolumeType "HostVolume" }}path: /data/{{ Service | toLower }}/
          {{ else if eq VolumeType "ConfigMap"}}name: "{{ Service | toLower }}-etc-conf-d"
          {{ end }}

https://github.com/littlemanco/boilr-k8sdeployment/blob/master/template/50-{{ Service | toLower }}.dep.yml#L48-L52
The ideal here would be to a foreach iteration of a set of values, such as
{
  "Volumes": [
    {
      "VolumeName": "ExampleVolumeName",
      "VolumeType": [
        "HostVolume",
        "ConfigMap"
      ]
    }
  ],
  ... // record 2, record 3, {n}
}

At the moment, I'm just commenting out stubs of the configuration that I need replicated many times, as you can see in the template above.
I'm writing this hastily as I'm waiting for a report to complete, so if it's at all unclear, please let me know. I also understand that it'd be considerable work, so you're welcome to decline the request!
Cheers,

Thank you for the detailed request Andrew.
I was thinking about this one as well, but one problem is that JSON has limited types and we're using the list type for choices at the moment. I'll see what I can do about this one.
In the meanwhile feel free to add your boilr templates to the wiki template index, it's editable by everyone

Actually the dictionary lists, like your example, might be the best type for the foreach iteration. But, I don't want to use implicit typing too much, and using a DSL would be harder since everybody knows JSON

I appreciate you taking the time to think about it. This tool has rapidly made it into my standard toolkit! It's excellent. If I had the time to contribute more, I would.
I'll add the templates I create to the wiki.

I'm very happy to hear that you found boilr useful!
You don't have to submit PRs to contribute to boilr, even reporting the issues is of tremendous value, thank you :)


added decimal option to series to alter the range of draggable values

Try decimals : 1 in a series object to restrict to one decimal place when dragging.

Also added inputs to draggable charts optionally so that they can be more precise for the values

question just to understand this PR - would decimals: 0 enforce only integers?


fix typo in err msg from ambigious to ambiguous

fix typo in err msg from ambigious to ambiguous

LGTM

LGTM 🐯

Okay, so looks like GitHub changed, and didn't show this as a merge conflict with https://github.com/docker/docker/pull/24287. Merging this PR just became a "no-op"; https://github.com/docker/docker/commit/6aacb1802484710156676fb44644b2c8de9bb662


Hooks in the invocation?

Why is there a param for Hook in the invocation (e.g. getBooleanDetails)? What's the use-case there?

That didn't take long. We thought of one right around the time we were complaining about how it didn't make sense. ;)
We're thinking we might use it to override a global hook.

Hey @justinabrahms, I think it just gives the app developer flexibility. For example, you may want to add logging to a single flag evaluation or validate a return value like we did here.


Nesting a widget an even number of times makes its text dimmed

Versions

Python: 3.6
OS: Windows 10
Kivy: 10.0.1
Kivy installation method: pip3

Description
I am running into an unexpected behavior adding labels to layouts. When I add a label to a layout nested into n other layouts, if n is even, the label's text is dimmed. Here's what I mean by dimmed:
when n is 5:

when n is 6:

Code and Logs
Here is the code I am using to generate the above images and exhibit my issue.
import kivy
kivy.require("1.10.1")

from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.stacklayout import StackLayout
from kivy.uix.floatlayout import FloatLayout

class MyApp(App):

    def build(self):
        layouts = []
        nest = 6 # with nest equal to 6, the Label's text is dimmed.
        # if nest were equal to 5, the Label's text would not be dimmed.
        for _ in range(nest):
            innerLayout = StackLayout()
            if len(layouts) != 0:
                layouts[-1].add_widget(innerLayout)
            layouts.append(innerLayout)

        layouts[-1].add_widget(Label(text="Hello, world"))
        return layouts[0]

if __name__ == '__main__':
    MyApp().run()

Can you check that it's not because of
https://github.com/kivy/kivy/issues/6318?
On Fri, May 24, 2019, 4:22 PM Basset Hound<EMAIL_ADDRESS>wrote:

Versions

Python: 3.6
OS: Windows 10
Kivy: 10.0.1
Kivy installation method: pip3

Description
I am running into an unexpected behavior adding labels to layouts. When I
add a label to a layout nested into n other layouts, if n is even, the
label's text is dimmed. Here's what I mean by dimmed:
when n is 5:
[image: image]
https://user-images.githubusercontent.com/13923183/58354531-c1bded80-7e3f-11e9-8824-65485dd49571.png
when n is 6:
[image: image]
https://user-images.githubusercontent.com/13923183/58354557-d9957180-7e3f-11e9-92fb-f25f0698d4bd.png
Code and Logs
Here is the code I am using to generate the above images and exhibit my
issue.
import kivy
kivy.require("1.10.1")
from kivy.app import Appfrom kivy.uix.label import Labelfrom kivy.uix.stacklayout import StackLayoutfrom kivy.uix.floatlayout import FloatLayout
class MyApp(App):
def build(self):
    layouts = []
    nest = 6 # with nest equal to 6, the Label's text is dimmed.
    # if nest were equal to 5, the Label's text would not be dimmed.
    for _ in range(nest):
        innerLayout = StackLayout()
        if len(layouts) != 0:
            layouts[-1].add_widget(innerLayout)
        layouts.append(innerLayout)

    layouts[-1].add_widget(Label(text="Hello, world"))
    return layouts[0]

if name == 'main':
MyApp().run()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kivy/kivy/issues/6332?email_source=notifications&email_token=AAMRN7RCHI5B2A7HKYSZJP3PXBE6PA5CNFSM4HPSOVT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GVZDYGA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMRN7RQWUFX3TQLT5CD2ULPXBE6PANCNFSM4HPSOVTQ
.

I made a new kivy candidate release that hopefully resolves the issues and uploaded it to pypi. I also made new wheels for kivy dependencies. Given the existing issues with the binary dependencies I also took the opportunity to migrate our dependencies from kivy.deps.xxx to kivy_deps.xxx. So, I'd ask that you try the new wheels in a new clean virtual environment so there's no clash with previous kivy dependencies and see if you still face any issues.
Here's complete instructions.
python -m pip install --upgrade pip setuptools wheel virtualenv
python -m virtualenv kivy_venv

If you're in windows cmd shell do:
kivy_venv\Scripts\activate

otherwise do:
source kivy_venv/Scripts/activate

Next do (note that to install the new kivy rc2 you need to add --pre to pip):
pip install kivy_deps.glew kivy_deps.sdl2 kivy_deps.gstreamer kivy kivy_examples --pre
python kivy_venv/share/kivy-examples/demo/kivycatalog/main.py

Or any other tests and let me know if you run into any issues.

Hey, thank you for helping me out. From a stackoverflow post I was told to roll back the sdl2 version slightly, and that ended up working fine for me.


Create auto-label.yml

Fixed #87
Overview : This pull request addresses the issues with the "auto-label" GitHub workflow, ensuring that labels are automatically applied to pull requests and issues as intended.

Hey @BamaCharanChhandogi  I have raised the PR
Thanks

Hii @archanasingh11,
thanks for your contributions. If the user adds an issue it will automatically add those tags, right?

Yes

Do assign me the labels in the PR too or else my contribution wont be counted

Hii @archanasingh11, thanks for your contributions. If the user adds an issue it will automatically add those tags, right?

So, it might be a problem if users are not part of Hacktoberfest or GSSC.

We can change that any time we want that

We can putt off the autolabeling when we dont need that

Now many admins dont assign the lables in the pr due to which contributors contribution gets un-noticed

No, it will add tags to all issues, but there will be some issues I don't work on, so I won't add those tags. I think manual tagging would be better. You can create issue templates; that would help

Okay
I would love  to work on the idea you have suggested  to me .
So, I will create a new issue for this .
I request you to do merge this PR


How do you use same backend with multi-env?

Describe the bug
Confused on the best way to do this step that's currently in the multienv docs.

When following these steps it'll show that I need to update the api part of the stack and when I do my other team member has to then create a whole new stack again and it goes back and forth like this.
What is the best way to share the same backend if the steps in the docs don't work?

@d3vhound sorry about the confusion, we update the documentation regularly based on customer feedback, feel free to open an issue in the https://github.com/aws-amplify/docs repository next time.
After you've created the initial amplify cli workspace for a new team member and since team-provider-info.json contains the required deployment information, team members during the development cycle just have to repeat these steps, just like for git:
$ amplify env pull
$ git pull origin dev

No need to repeat the same steps for adding APIs, etc. That needs to be done only by the team member who is responsible for that part.
Would this clear up the process for you?
If you think that this is functionally not working, please send the exact steps you're executing between team members to help us to track down the issue.

@d3vhound Which version of the CLI are you using? We recently released a fix for avoiding the "Update" status to REST API's/Lambda functions (When there is no update to the src code) when working between teams.

@attilah when I run amplify env pull right after cloning the project for the first time I either get an Unauthorized error or this:
2019-06-27T17:14:04.208Z - error: uncaughtException: Cannot read property 'awscloudformation' of undefined date=Thu Jun 27 2019 12:14:04 GMT-0500 (Central Daylight Time), pid=44232, uid=501, gid=20, cwd=/Users/devionvillegas/Developer/WELLHAUX/AMPLIFY/wellhaux-pumper, execPath=/usr/local/bin/node, version=v11.14.0, argv=[/usr/local/bin/node, /usr/local/bin/amplify, env, pull], rss=207908864, heapTotal=155426816, heapUsed=119862544, external=20600458, loadavg=[1.9375, 3.14013671875, 2.62744140625], uptime=223385, trace=[column=30<EMAIL_ADDRESS>function=initializationTasks.push, line=56, method=push, native=false, column=18<EMAIL_ADDRESS>function=null, line=16, method=null, native=false, column=5, file=internal/process/task_queues.js, function=process.runNextTicks [as _tickCallback], line=52, method=runNextTicks [as _tickCallback], native=false, column=11, file=internal/modules/cjs/loader.js, function=Module.runMain, line=880, method=runMain, native=false, column=11, file=internal/main/run_main_module.js, function=null, line=21, method=null, native=false], stack=[TypeError: Cannot read property 'awscloudformation' of undefined,     at initializationTasks.push (/usr/local/lib/node_modules/@aws-amplify/cli/src/lib/initialize-env.js:56:30),     at /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/promise-sequential/index.js:16:18,     at process.runNextTicks [as _tickCallback] (internal/process/task_queues.js:52:5),     at Function.Module.runMain (internal/modules/cjs/loader.js:880:11),     at internal/main/run_main_module.js:21:11]

The exact steps are:

1st team member sets up graphql api with amplify
pushes to github
2nd member clones repository
2nd member wants to change schema or see output of amplify status

The 4. step is where I've always encountered difficulty. The docs make it seem like you have to run amplify init after cloning and switching to a branch. Is that not the case?

@kaustavghosh06
❯ amplify -v
1.7.6

@d3vhound Are the team members using different versions of the CLI? Also, would it be possible to see your amplify directory structure? I'm suspicious that the project is using pre v1 version project structure.

No, we're all on 1.7.6. The project structure is the same as running amplify init right now with a react native project.

@d3vhound Are you still experiencing issues?


EF7 beta6: Error saving multiple entities

I am creating an API using ASP.NET5 and Entity Framework 7.0.0-beta 6, and when I try to execute various updates in several requests, I get this Exception:
'Company' cannot be tracked because another instance of this type with the same key is already being tracked. For new entities consider using an IIdentityGenerator to generate unique key values.
This is my code:
public class MrBellhopContext : DbContext
{

	public DbSet<Company> Company { get; set; }

	protected override void OnModelCreating(ModelBuilder modelBuilder)
	{
		modelBuilder.Entity<Company>(entity =>
		{
			entity.Key(c => c.CompanyId);

			entity.Index(c => c.Name);

			entity.Property(c => c.CompanyId).ValueGeneratedOnAdd();
		});

		modelBuilder.UseSqlServerIdentityColumns();

		base.OnModelCreating(modelBuilder);
	}

}

public class Company
{

	public int CompanyId { get; set; }

	public string Name { get; set; }

	public string Description { get; set; }

	public string Phone { get; set; }

	public string Email { get; set; }

	public short StatusId { get; set; }

}

public class CompanyRepository : ICompanyRepository
{

	MrBellhopContext _dbcontext;

	public async Task UpdateAsync(Company company)
	{
		_dbcontext.Update(company);
		await _dbcontext.SaveChangesAsync();
	}
}

[Route("api/[controller]")]
public class CompanyController : Controller
{

	[HttpPut]
	public async void UpdateAsync([FromBody] Company company)
	{
		if ((!ModelState.IsValid) || (company == null))
		{
			Context.Response.StatusCode = 400;
			return;
		}
		else
		{
			await _repository.UpdateAsync(company);
		}
	}

}

I have tried to solve it by removing ValueGeneratedOnAdd(), UseSqlServerIdentityColumns() or changing the mapping, but if I try to update several entities in several requests, I get the Exception:
First req: Update CompanyId 8
First req: Update CompanyId 9 !! ERROR
Does anyone know how to solve this issue?

@unairoldan could it be that you are trying to use the same context instance to update two different instances of an entity that have the same key?
There isn't a lot we can do here without a full set of code to reproduce the issue. Any chance you could share a project? The full stack trace from the exception would be useful too.

This is the full stack trace:
An exception of type 'System.InvalidOperationException' occurred in mscorlib.dll but was not handled in user code
Additional information: The instance of entity type 'MrBellhop.Model.Company.Company' cannot be tracked because another instance of this type with the same key is already being tracked. For new entities consider using an IIdentityGenerator to generate unique key values.
   at Microsoft.Data.Entity.ChangeTracking.Internal.StateManager.StartTracking(InternalEntityEntry entry)
   at Microsoft.Data.Entity.ChangeTracking.Internal.InternalEntityEntry.SetEntityState(EntityState oldState, EntityState newState, Boolean acceptChanges)
   at Microsoft.Data.Entity.ChangeTracking.Internal.InternalEntityEntry.SetEntityState(EntityState entityState, Boolean acceptChanges)
   at Microsoft.Data.Entity.ChangeTracking.EntityEntry.set_State(EntityState value)
   at Microsoft.Data.Entity.DbContext.SetEntityState[TEntity](TEntity entity, EntityState entityState)
   at Microsoft.Data.Entity.DbContext.Update[TEntity](TEntity entity)
   at MrBellhop.Data.Repositories.Company.CompanyRepository.<UpdateAsync>d__5.MoveNext() in D:\SciOf\MrBellhop\MrBellhop.Data\Repositories\Company\CompanyRepository.cs:line 46
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at MrBellhop.API.Controllers.Company.CompanyController.<UpdateAsync>d__9.MoveNext() in D:\SciOf\MrBellhop\MrBellhop.API\Controllers\Company\CompanyController.cs:line 62

I have shared the example project in this repository:
https://github.com/unairoldan/EF7-beta-6-MS_Example/tree/553ccd7b5724fec21d62aa1785da2161a32ae2c2
I just delete some code (from other DB entities) to make easier track the problem

@unairoldan that exception means that you are trying to attach two entity instances that have the same key to a context. This isn't supported in EF. There can only be one entity instance with a given key per context.
This is occurring because you have added a singleton instance of your repository:
services.AddSingleton<Data.Interfaces.Company.ICompanyRepository,Data.Repositories.Company.CompanyRepository>();

This means that all requests are sharing a single instance of the repository. You should reduce this to Scoped, so that you have a single repository instance per request. Aside from avoiding the issue you are hitting, it will also ensure you don't end up with a gigantic context instance tracking all the data from your database in memory.

Hi I am using single ton Database context. I am getting the same error as above.
The instance of entity type 'Person' cannot be tracked because another instance of this type with the same key is already being tracked
Please suggest.

Single ton Database Context but scoped repositories.

@gollapudiramyak we do not recommend using a singleton context. This is especially true if you are in a web application since DbContext is not thread safe and you will get undefined behavior if you try to use the same context from two threads (which is what you'll get when you have two concurrent web requests).
As you discovered, if you share a context between parts of the application, you also need to deal with ensuring that you only have one instance that represents a given entity. That is one of the reasons we recommend having short lived context instances.

Thank you for your quick reply.
How about using .AsNoTracking for all Get operations. like below
context.User..AsNoTracking()
//To Get the User
MyDataBaseContext.context.Attach(userobject);
MyDataBaseContext.context.SaveChanges();
// To Update the User
MyDataBaseContext.context.User.Add(userobject );
DatabaseContext.context.SaveChanges();
//To Insert a new User
Reason for going for single ton datacontext is  - don't want to open the connection for each operation from entities. Example like below for 2 entities. We have about 90 entities which are there in my MyDbontext.
using(MyDbContext db= new MyDbContext(connectionString))//open connecion
{
return db.Users;
}//closes connection
using(MyDbContext db= new MyDbContext(connectionString))//open connecion
{
return db.Person;
}//closes connection

Singleton generally means one context instance per AppDomain, that is something you should avoid. If you want to use the same context instance for a series of operations then that is fine (i.e. open connection and run two queries)... just be careful that it is not used on two different threads.
BTW I'd be careful not to prematurely optimize things... often times folks end up building something really complex and it ends up being way slower than just letting EF open and close connections etc. as it normally would.

Thank you. If we use short lived context objects overserved the below highlighted ones
public IEnumerable Get()
{
using (BloggingContext db = new BloggingContext())
{
var list= db.orgs.ToList(); **//Its calling OnConfiguration Method of Blogging Context
**            }
        using (BloggingContext db = new BloggingContext())
        {
            return db.orgs.ToList();** //Its calling OnConfiguration Method of Blogging Context

**
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
        if (!optionsBuilder.Options.Extensions.Any())
        {
           optionsBuilder.UseSqlServer(ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString); **//This Line is called twice in this example - i.e each time I call db.orgs.ToList().**
        }

    }

How the Connection management and connection pooling is maintained by entity framework? Will this be ok the onconfigurationmethod called multiple times from the application which has loads of call to entities.

OnConfiguring is called each time you construct a context. We don't do any caching here because it's "cheap" code to run - all it's doing to stashing a few values away for the context. Connection pooling is handled by ADO.NET (SQL Client, if you are targeting SQL Server).
I would really only start mucking around with connections etc. if you have a particular part of the application where you are seeing poor performance and the problem can be addressed by re-using the same DbConnection. For the most part, I think you are going too get the best perf if you just let ADO.NET take care of connection pooling for you and use short lived contexts that will open and close the connection as needed.

Before update data we have fetch existing data row from data base like that
_context.TableName.SingleOrDefault(p => p.Id ==id);
so we need to use AsNoTracking when fetch data
_context.TableName.AsNoTracking().SingleOrDefault(p => p.Id ==id);
and for Updata data in database use
_context.TableName.Update(updatedTableEntity);

I have the same issue as the OP.  I have two classes: JournalEntry, and JournalEntryItem (references JournalEntry).  I do not want EF to operate on my classes as a graph, but rather singular individual entities.
In the example below I'm addressing a list of three objects (JournalEntry, JournalEntryItem,JournalEntryItem).  On the third iteration of my loop I'm adding JournalEntryItem to the dbcontext and it complains that JournalEntry is already in there.  It appears as if Entry() is reading the entire object.
The problem line is:
this.DbContext.Entry(dbDataModel).State = EntityStates.Modified; on the third iteration...dbDataModel in this case is a JournalEntryItem, but it throws an error saying JournalEntry is already being tracked.
Without debugging

With debugging

@BlackjacketMack you can only have one instance of an entity with the same key values being tracked by the same context instance.. so it seems that there must be two JournalEntrys with the same key. If this is intentional, then perhaps use a fresh context instance for each iteration of the loop?

What I ended up doing was calling SaveChanges() and detaching the object for each iteration.  It works, but I don't get the nicely bundled inserts.  That's ok!  Thanks for your help.

@BlackjacketMack I am having the same problem. How did you manage that?

For what it's worth, I've just spent hours debugging this issue.
Turns out I was actually tracking two copies of the same entity. Go figure..

@fergalmoran if you are hitting an issue similar to the one originally posted here using a non-preview version of EF Core, could you please create a new issue and provide a repro?

Hi @divega, sorry I wasn't clearer. What I meant was that I hit this issue and the problem turned out to be EXACTLY what the error message was telling me it was, it just took me hours to realise that..


Example of using outside meteor

Are there any examples of using this package without meteor? Is there a package we can use that replaces meteor/mongo?
If not it might be a good idea to add in the readme that this package must be used with meteor.
Happy to help contribute to the documentation if there is.

Definitely not tied to Meteor in any way. The only reason the example uses Meteor is because long ago this was a Meteor package. I'm not sure exactly what you're asking for, but I would consider merging additional example apps if anyone wants to submit one in a pull request.
All of the example code in the readme should work in any JS project. Works in NodeJS. Works in all modern browsers.


python38Packages.hvac: 0.10.14 -> 0.11.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python38Packages.hvac is: "HashiCorp Vault API client"
meta.homepage for python38Packages.hvac is: "https://github.com/ianunruh/hvac"
meta.changelog for python38Packages.hvac is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 0.11.0 with grep in /nix/store/jgz3nx12mlj6zkrck12iy66vlq2c4f47-python3.8-hvac-0.11.0

found 0.11.0 in filename of file in /nix/store/jgz3nx12mlj6zkrck12iy66vlq2c4f47-python3.8-hvac-0.11.0

directory tree listing: https://gist.github.com/578c443481ba8fc8979abcc9a1cd36d4

du listing: https://gist.github.com/e76f32bb6f1f4597ddc8eb2819317dbf

Rebuild report (if merged into master) (click to expand)

8 total rebuild path(s)

2 package rebuild(s)

2 x86_64-linux rebuild(s)
2 i686-linux rebuild(s)
2 x86_64-darwin rebuild(s)
2 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
python38Packages.hvac
python39Packages.hvac

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/jgz3nx12mlj6zkrck12iy66vlq2c4f47-python3.8-hvac-0.11.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python38Packages.hvac https://github.com/r-ryantm/nixpkgs/archive/fa4fefc4b2e81377f4c10ad9b88b077ac5a9def4.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/jgz3nx12mlj6zkrck12iy66vlq2c4f47-python3.8-hvac-0.11.0
ls -la /nix/store/jgz3nx12mlj6zkrck12iy66vlq2c4f47-python3.8-hvac-0.11.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

python38Packages.hvac
python39Packages.hvac

Maintainer pings

Result of nixpkgs-review pr 134182 at fa4fefc4 run on aarch64-linux 1

2 packages built successfully:

python38Packages.hvac
python39Packages.hvac

1 suggestion:

warning: maintainers-missing
Package does not have a maintainer. Consider adding yourself?
Near pkgs/development/python-modules/hvac/default.nix:33:5:
   |
33 |     maintainers = with maintainers; [ ];
   |     ^


registrations with DRF

Are you planning to make registration through django-rest-framework-social-oauth2? Or it will be only authorisation?

What do you mean by registration ?
An user object is automatically created if you use an external token but I can't really handle registration as some people will not have the same fields, actions and behaviors for their user.
I can help you by posting some examples but I will not implement it in this package unless wanted by a lot of people.
# You can use this as a simple serializer
class UserSerializer(serializers.ModelSerializer):
    is_active = serializers.CharField(read_only=True)
    date_joined = serializers.DateTimeField(read_only=True)

    class Meta:
        model = User
        fields = ('email', 'password', 'username', 'first_name', 'last_name', 'is_active', 'date_joined',)
        extra_kwargs = {'password': {'write_only': True}}

# And this viewset
class UserAPIView(GenericViewSet, RetrieveModelMixin, UpdateModelMixin, CreateModelMixin):
    """
    ### Interact with users

    - **Methods**:
        - list: *Post*
        - detail: *Get*, *Put*, *Patch*
        - me: *Get*
            - returns the current user
    - **Permissions**:
        - authenticated user required on detail
    - **Returns**:
        - the user
    """
    queryset = User.objects.all()
    serializer_class = UserSerializer
    permission_classes = [permissions.IsAuthenticated]

    def get_object(self):
        obj = super(UserAPIView, self).get_object()
        if obj != self.request.user:
            raise Http404
        return obj

    @list_route()
    def me(self, request):
        user = get_object_or_404(self.queryset, pk=request.user.id)
        serializer = self.serializer_class(user)
        return Response(serializer.data)

# Add these to your urls
    url(r'^api/', include('rest_framework_social_oauth2.urls')),
    url(r'^api/users/?$', UserAPIView.as_view({'post': 'create'}), name='user-list'),
    url(r'^api/users/me/?$', UserAPIView.as_view({'get': 'me'}), name='user-me'),
    url(r'^api/users/(?P<pk>\d+)$', UserAPIView.as_view({'get': 'retrieve', 'put': 'update', 'patch': 'partial_update'}), name='user-detail'),

I mean creating new user from FB account's data

This should work already. Python social auth is used in the authentication backend and will automatically create an user if it doesn't exist.

I'm closing this since it's the current behavior.
Feel free to reopen if I didn't answer your questions.


Speed up deployment

Make docker build a bit faster
Remove earth engine function deployment which is now done inside colab notebook
Save pytorch jit models always (not only when threshold is reached)
Remove files no longer needed
Updates notebook so it's harder to accidentally start exporting the same files

7 mins faster


odd behavour on windows

I reported this bug to tui-textarea https://github.com/rhysd/tui-textarea here https://github.com/rhysd/tui-textarea/issues/14
They support tui and ratatui
In their demo app (very simple) the keystrokes are duplicated on windows. It works fine using tui but fails 100% using ratatui
here is gif of the behavior

Go checkout #120 which brought up the same issue, essentially in windows you will need to match against the specific KeyPressed  event, otherwise your code will also be triggered by KeyUp event (don't quote me on the event type names tho). All the examples were fixed in order to handle this explicitly in #129.
So without checking out there example, that's most likely what's happening.

but it worked fine with tui, so ratatui introduced a breaking change

This is a crossterm issue

@pm100 I wouldn't be able to tell you without looking more into it why it changed, but this was most likely introduced by a crossterm update. However, this isn't a bug with ratatui nor crossterm and more a bug with the particular example you're looking at.
There's an open pr over on the crossterm repo aiming to make the KeyUp event opt-in, but hasn't been merged yet.
Since this isn't really a bug with ratatui, I'll close this for now.

fyi - caused by https://github.com/crossterm-rs/crossterm/pull/745


Carla0.9.13Ubuntu additionalmap serialization error action needer corrupt data found please verify installition

Hi, I'm closing this issue as it does not provide enough information. Feel free to either reopen it or create a new one, but you must provide the entire log.


N7: Users should be able to query LLMs to seek explanation of code written by the other user in a collaborative session

N7: Incorporate generative AI to assist during the preparation. For example, users can seek help from ChatGPT, Copilot (or such other services) to seek explanation of code written by the other participant. Users can seek help from gen AI to solve the puzzle by providing prompts from within the interface.

Closed via #79


shaders: Remove workaround for const / let globals

In the past, naga had issues with the correct form for this code, so a workaround was put into place to let the shaders-as-written use let, but then turn it into const.
This hasn't been strictly followed since then with a couple of things using const anyway.

Take note that a few things were commented out and using hand-written constants but now are using the const to evaluate the value.


Fix vlc nox

Thank you for contributing to AlexaPi.
Issue this PR fixes (if applicable): #465
Description:
Checklist:

[x] Update CHANGELOG.md

So more things were needed actually.
Closing in favor of #472.


Create a Chat Room

Can you please create a chat room in  where users can chat?

like it

You could also make a channel in the Gophers Slack if anyone is opposed to using Gitter

I think it should be working here now. Let me know if there's an issue.


Bytecode hashing command

This adds a command that implements a basic approach bytecode instruction identification:

Parse the classfile format
Loop over all methods as they appear in the classfile
For the code in each method, take the opcodes only (i.e. no operands/variable bytes) and run them through md5

Running on log4j-core binaries this produces distinct hashes for 2.16.0, 2.15.0 and 2.12.2. 2.12.0 through 2.14.1 result in the same hash, 2.11.2 is different. Earlier versions have not been tested at this time.

Example:
{code}
./out/build/log4j-sniffer/0.4.0-5-g8a84f85.dirty/darwin-amd64/log4j-sniffer identify ~/go/src/github.palantir.build/deployability/classjack/examples/multiple_bad_versions/log4j-core-2.14.1.jar
Hash of complete class: f1d630c48928096a484e4b95ccb162a0
Hash of all bytecode instructions: 8139e14cd3955ef709139c3f23d38057-v0
{code}
I have appended a -v0 on to the bytecode hash in case we wish to change this approach to produce different hashes in a future version.

Included in https://github.com/palantir/log4j-sniffer/pull/20


STORM-1183:  bump timeout to 10s, since test case isn't really testing speed

@ashnazg I think we fixed the failure in https://github.com/apache/storm/pull/859  Could you please check and see if it worked for you?

@revans2 yep, that test is consistently passing in the builds I'm watching.


Add's setting to download data on wifi only, Fixes #575

@mariobehling @the-dagger This adds user preference to limit download only when connected to wifi and I have set this as default. Please check the screenshot below. Fixes #575

Current coverage is 11.47% (diff: 0.00%)

No coverage report found for development at f66c1e9.

Powered by Codecov. Last update f66c1e9...78cf444


Method to pause and start queue

Requirement:
To prevent promise calls to enter the execution queue until it is resumed or re-started

At intialization of fetch queue class
At any point in the queue

#4


Update onbuild - remove 'run'

In response to https://github.com/dotnet/dotnet-docker/pull/134/files
Tested the debian images this time.


feat: [v0.8-develop] per validation hook data

Motivation
https://github.com/erc6900/resources/issues/32
To better compose plugins, it is useful to allow extra data to be passed to hooks, to prevent having to do non-standard calldata encoding or require re-defining execution functions.
This is necessary for certain types of permissions-enforcing hooks to be used in a composable way – for example, an access control plugin implemented via a merkle tree requires proofs to be passed along with each call.
Solution
This PR implements per-hook data for pre-validation hooks only.

Use the userOp.signature field to pass the extra data into pre user op validation hooks, and adds an authorization field to pre runtime validation hooks to pass in extra data.

Note that this means that pre user op validation hooks and the user op validation function can no longer see the signature data of each other. AFAICT this is an acceptable change to make, but please review this.

To more easily address individual hooks by index, change the storage of pre-validation hooks to be a storage array, rather than an enumerable set. This has no changes to the external interface of the account.
Because not all hooks require data, and because ABI-encoding nested arrays is expensive, define a format for sparse calldata segments. This format consists of a data length, an index, and the data itself, with the requirement that the indices are in ascending order. Non-used indices are skipped in the encoding.

To minimize space, the indices use a single byte. This caps the total number of pre-validation hooks at 255, which also serves as an effective DOS mitigation, to prevent too many hooks from being installed.

Use the spare calldata segments to perform the calls to pre-validation hooks and validation functions.
Add a test case with a mock plugin that uses per-hook data. This is intended to mimic the merkle proof workflow, but does not actually use the merkle proof library - instead it just asserts that an address is present in calldata.

Just to reiterate some points from previous discussions, my main concern lies in this being part of the signature field. We've discussed that similar designs in the past have had some issues but it's difficult to find a better spot.
What's the downside of including it in the beginning of the calldata field instead?

We could include it in calldata, that would help us by ensuring the data is signed over, making it non-malleable. It would come with some additional considerations:

We would probably want to put it at the end of calldata, rather than the beginning, to prevent the data from interfering with solidity's function dispatcher
We would need to strip it out before forwarding to execution functions in the fallback, otherwise plugins may interpret it as something else.
It would be tricky to determine how much data is actually provided, if any. Because the account doesn't know the parameter format of installed execution functions, it's not clear to me how it would distinguish between data for hooks and data for the actual execution function.

For native functions, it would be possible, but expensive, as we'd have to re-implement the ABI decoding that solidity does automatically for every external function, then look past-the-end of the field encoded last.

Do you know of any way we could encode it in calldata such that the account could parse it out? We're constrained by the fact that the account doesn't know the parameter format of plugin-defined execution functions.

I do agree that using the signature is error prone. I just realized there's an issue with the current implementation, you can express zero-length hook data in two different ways: specifying the index and setting a length of zero, or skipping the encoding. I'll update the PR to enforce 1 canonical encoding format.

Updated to enforce canonical encoding, it is no longer possible to add zero-length segments to the signature. Instead, zero length segments must be omitted. It is up to the validation function and hooks to enforce that only the expected amount of data is provided.

Taking a look, overall thoughts so far:

Sparse calldata lib is super cool!
Overall, think this is in line with the v0.8 changes to improving efficiency by moving storage to calldata. Want to call out that this creates more burden on SDKs and potentially requires some other source of data storage.
For pre UO validation hooks, this makes sense. But for the pre runtime validation path, specifically, I would not expect other plugins to use executeWithAuthorization with extra calldata for the standard call flow of account -> plugin -> account. Mostly because the plugin would need to store this extra calldata to pass back into the account, so any savings from moving from calldata -> storage is lost

I do agree that using the signature is error prone. I just realized there's an issue with the current implementation, you can express zero-length hook data in two different ways: specifying the index and setting a length of zero, or skipping the encoding. I'll update the PR to enforce 1 canonical encoding format.

I overall agree with the change, but what abuses could this lead to (forgive me if we talked about this already)?

Are we sure we only want to call onInstall() and onUninstall() when there is nonzero data to be passed? What if I want to pass an empty array but still trigger this?


go.mod: Bump Prometheus to current latest

[ ] I added CHANGELOG entry for this change.
[x] Change is not relevant to the end user.

Changes
Bump TSDB.
Verification
Tests.
@thanos-io/thanos-maintainers

Does this contain some important fixes for our users?

Mainly performance improvements, without running it ourselves we don't know how significant those are though. We run latest Thanos in prod all the time, so we want to just get into the habit of bumping TSDB more often so we avoid making big jumps.

Oh and it includes https://github.com/prometheus/prometheus/pull/7472 which allows moving forward with https://github.com/thanos-io/thanos/blob/master/docs/proposals/202005_scalable-rule-storage.md

Looks like a valid test failure @brancz
It's because in tests we are using label values which are not sorted now, we should use SortedLabelValues instead :hugs:
Worth to check our TSDB method we use in StoreAPI for TSDB impl, we probably need to sort to be compliant. (if we want)

I'm not sure what the consequence of this is, I haven't followed those changes very closely on TSDB. From what I can tell sorted LabelValues is not exposed on the storage interfaces though so I'm not sure how to call them explicitly. Suggestions?

Couldn't figure out how to re-run netlify jobs, so re-triggered by amending last commit.

We can ignore netlify, they have some incident


pull request for e2e test at 11/14/2016 14:15:10

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

Details

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Remove loggers from zipkin sanitizers

I could not find where these loggers are used

Coverage remained the same at 100.0% when pulling 8f86811ef5de784b8a24866460deeffe1158be90 on pavolloffay:refactor-zipkin-sanitizer into 79fba1278743840dff6b84aa059ec58f7ec21a0a on uber:master.


Update haskell-platform to v7.10.2-a

URL is a special case for this release, old url is commented out for quick update next version
Fixes #13075

We can do better.

Thank you for the contribution. It needed some fixes, so they were made in d1f7078c6d560e46fde0c9ed19c9ea855309de40. Your contribution is still included (and still credited to you), with the appropriate modifications. Please feel free to ask about any of the changes.

Excellent fix (and clearly better than hardcoding), is that syntax documented anywhere? Didn't see it at a glance.

It’s not special cask syntax, it’s just ruby, so we get all that for free. There are ideas to make common operations like this more readable, in the future.


Crash when rendering Text within ShadowView within Text

Describe the bug
When rendering something like
<Text>
  <ShadowView>
    <Text>"Foo"</Text> // This will be RCTVirtualizedText and crash
  </ShadowView>
</Text>

This is because in react-native, Views import TextAncestor context and set it to false (https://github.com/facebook/react-native/blob/0fb71630c7d4eff5758f7148ae2d9b1f09bc9d2c/packages/react-native/Libraries/Components/View/View.js#L130)
To reproduce

See above
Expected behavior

No crash
Your environment
N/Applicable.

TLDR: this crash is well identified and I've started a discussion with Meta engineers to know how we are supposed to proceed as importing from 'react-native/Libraries/Text/TextAncestor' isn't safe, this is more to let other people having this issue that it's being looked at.

@Titozzz why is importing it directly from react native isn't safe?

@WadhahEssam well this isn't a public API and could break at any release. If you are fine with that point, you can totally use it. (We do)

Hi @Titozzz,
To be sure I understand correctly, could you tell me more about what you're trying to achieve?

If you'd like to apply a shadow directly on the inner text element, you shouldn't use ShadowedView (or even View) but rely instead on the textShadowColor/textShadowRadius/textShadowOffset style props (doc). They work well on both iOS and Android and will perform better on iOS than using a view for this.
If instead you'd like to apply a shadow on the inline ShadowedView element (I assume it would at least have a background color in this case), then indeed, we'll have to add a TextAncestor context in ShadowedView for it to work. I'm ok to import it even though it's not a public API as we've been relying on it internally for our design system for a while now and it didn't break for many React Native releases. In the meantime, you can probably fix the crash by just wrapping the ShadowedView with a regular View to get the context without having to import the file yourself. Also, note that inline views in Text comes with some downsides: text within the inline view won't be wrapped, you might need to adjust vertical alignment of text and you might get different results between iOS and Android.

Not trying to achieve anything special, usually we avoid nesting view within Text for the reasons listed above, but for some reason there were a few that slipped through. And when I replaced all our Views with ShadowedViews it crashed.
It's not a huge deal since I now only replace Views if there are shadow styles + I removed the nested View as they should not have existed. Also just to be sure, I patched the lib so that it wouldn't crash.
This issue was more a FYI than anything else!


Only collect person.id by default for person tracking

Allow the ability to send person.email and person.username, but by default we should only collect person.id going forward.
@rokob This is a top priority.

Based on how the person is set, we don't need the configuration option here. This is because we don't do anything automatically, anywhere someone is setting the person manually they can choose what to send in exactly the same way as setting a configuration option. Moreover having both manually set person data and configuration options would be unnecessarily confusing.


TypeScript error - Could not run ionic app including classes from cloud-angular

Hi there,
I'm trying to push notifications with an ionic2 app but I need to import classes from ionic-cloud-angular.
When I'm doing this, I have those errors :

TypeScript error: /home/crayer/dev/frontend/mobile/node_modules/@ionic/cloud/dist/es5/auth.d.ts(13,21): Error TS1110: Type expected.
[ ... ]
TypeScript error: /home/crayer/dev/frontend/mobile/node_modules/@ionic/cloud/node_modules/ionic-native/dist/es5/plugins/apprate.d.ts(46,21): Error TS1005: '=' expected.
TypeScript error: /home/crayer/dev/frontend/mobile/node_modules/@ionic/cloud/node_modules/ionic-native/dist/es5/plugins/apprate.d.ts(46,32): Error TS1005: ';' expected.
TypeScript error: /home/crayer/dev/frontend/mobile/node_modules/@ionic/cloud/node_modules/ionic-native/dist/es5/plugins/contacts.d.ts(39,14): Error TS1005: '=' expected.
[...]

These are my information about ionic configuration :
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID:	Ubuntu Description:	Ubuntu 16.04.1 LTS
Node Version: v4.2.6
And here is my package.json :
{
  "dependencies": {
    "@angular/common": "2.0.0-rc.4",
    "@angular/compiler": "2.0.0-rc.4",
    "@angular/core": "2.0.0-rc.4",
    "@angular/platform-browser": "2.0.0-rc.4",
    "@angular/platform-browser-dynamic": "2.0.0-rc.4",
    "@angular/http": "2.0.0-rc.4",
    "@angular/forms": "0.2.0",
    "@ionic/cloud-angular": "^0.5.2",
    "es6-shim": "0.35.1",
    "ionic-angular": "2.0.0-beta.11",
    "ionic-native": "1.3.10",
    "ionicons": "3.0.0",
    "reflect-metadata": "0.1.8",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "0.6.12"
  },
  "devDependencies": {

    "del": "2.2.0",
    "gulp": "3.9.1",
    "gulp-watch": "4.3.5",
    "ionic-gulp-browserify-typescript": "2.0.0",
    "ionic-gulp-fonts-copy": "^1.0.0",
    "ionic-gulp-html-copy": "^1.0.0",
    "ionic-gulp-sass-build": "^1.0.0",
    "ionic-gulp-scripts-copy": "^2.0.0",
    "ionic-gulp-tslint": "^1.0.0",
    "run-sequence": "1.1.5",
    "tslint-ionic-rules": "0.0.4"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "name": "mobile",
  "description": "mobile: An Ionic project"
}

I tried to install beta and stable version of ionic but there is nothing I can do to use the cloud classes ...
I hope someone could help

I think you're using new dependencies on an old app. The Ionic RC was released, and because of all the changes made, we can only really support it going forward (and not beta or alpha versions of Ionic 2). Check out the blog post: http://blog.ionic.io/announcing-the-ionic-2-release-candidate/ and the CHANGELOG: https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#200-rc0-2016-09-28


How can I use html inside alert ?

I don't see how to use html inside alert in README, that mean I can't use html same sweetalert2 js ?

Please read the docs closer :)
There are two syntaxes, either the array one where the second index is mapped to text (so it doesn't supports HTML, indeed):
<button [swal]="['title', 'plain text']"></button>

Either the object one:
<button [swal]="{ title: 'title', html: '<b>this is html text</b>' }"></button>

That last one takes an object of SweetAlert2 options, so you can pass any options here, including the html one.


Looks like ALTER TABLE t DELETE... not cleaning disk space actually

OPTIMIZE also haven't any effect, i haven't checked FINAL because many chunks can be affected at ones and it is a lot of handworks.
Clarify please, what is underlying under DELETE process and how we can reuse free space after.
In mongodb, for example, we should restart instance for changes have taken in account.

I'm sorry, it's my fault. I'm checking another table when comparing size...
btw, any chance to support ON CLUSTER in future?

ON CLUSTER should work, the syntax is (just as with other ALTER commands):
ALTER TABLE [db].table ON CLUSTER 'cluster' DELETE WHERE expr

Thank you!


zoom/ scale to bounds

Hi @moagrius, thanks for this wonderful library ! I'm making a floor plan inspector app base on your library. I wonder is there any build in method to zoom/ scale to fit a bounds, like we do on Google Map ? If not, can you suggest me any way to do it with the library ? Sorry for the trouble !
Btw, i already read #165, but it's only a point, need to focus a bounds, like a hotspot

like this? https://github.com/moagrius/TileView/issues/468

Thanks for the reply. It's a bit similar but i just want to slide and fit in a bounds, not restrict scroll or anything. It's like the moveCamera function of google map api

yeah that's not built in, you'd have to do it manually

Thanks, i have implemented the feature successfully thank to slideToAndCenter and setScale. I have another issue thought, when i tap a marker inside a hotspot, HotSpotTapListener is triggered. Any way to prevent this ? Because i'm adding marker through HotSpotTapListener

You could remove the HotSpot with removeHotSpot.  You could remove the listener and put it back after.  You could set a null listener to that specific HotSpot.  Etc.


Fix: in slot_attention.py the slot initialization parameters were not learnable.

The slot initialization parameters are now learnable, as the paper says they should be. Also initial variance is scaled appropriately

@Horse7354 ohh interesting, could you point me to where / when this change happened in the paper?

@Horse7354 ohh interesting, could you point me to where / when this change happened in the paper?

It was always like that in the paper (algorithm1 "We initialize the slots by sampling their initial values
as independent samples from a Gaussian distribution with shared, learnable parameters"), and since we stored slot_mu and slot_sigma as params I assume it was intended to make them learnable. Problem is torch.normal doesn't backprop gradients to it's arguments

It was always like that in the paper (algorithm1 "We initialize the slots by sampling their initial values
as independent samples from a Gaussian distribution with shared, learnable parameters"), and since we stored slot_mu and slot_sigma as params I assume it was intended to make them learnable. Problem is torch.normal doesn't backprop gradients to it's arguments

@Horse7354 Sorry, it's been a long time since I worked on this repo. So I think torch.normal is differentiable, based on https://github.com/pytorch/pytorch/issues/4620

@Horse7354 Sorry, it's been a long time since I worked on this repo. So I think torch.normal is differentiable, based on https://github.com/pytorch/pytorch/issues/4620

@Horse7354 so it was fine the way it is, but let's do it your way to make it more explicit

@Horse7354 so it was fine the way it is, but let's do it your way to make it more explicit

@Horse7354 oh actually I'm no longer sure, yea, you may be right. Thank you for catching this!

@Horse7354 oh actually I'm no longer sure, yea, you may be right. Thank you for catching this!


Filter '
' from external metadata sources

To ensure that our subscriber SP do not suffer from this bug should the character be introduced upstream (this recently occured via an eduGAIN source) filter these values on ingest from remote sources.
n.b. this will need to occur post signature validation and should simply replace '
' with '' in the raw XML snippet we store.

This should simply become a stage as part of https://github.com/ausaccessfed/saml-service/issues/141


Added ability to specify alternate version

Usage
--matt1:1-esv
--matt1:1-niv2011
Added regex to match the versions.
Created a constant defaultBibleVersion to fall back on if the specified version is not in BibleVersionCollection.

I tried to read and codes and understand it.
Just a quick question, what will it happen if I type --matt1:1 instead of --matt1:1-esv?

If we use --matt1:1 the regex won't be matched, so it'll act as how it currently will.

@allcontributors add @Benedictteo05 for code