php artisan tenancy:migrate throws 'Access denied'

Description
The command php artisan tenancy:migrate throws:
SQLSTATE[HY000] [1045] Access denied for user '1970139221de4d6993bcdc213a67f570'@'localhost' (using password: YES).
The package works good. It creates the database, it creates the database user, it also sets the password and i can connect to the tenant database later.
The bad news is that everytime i try to update all tenants' databases using tenancy:migrate, it throws that error.
What i've tried so far, and didn't solve the problem.

I have tried to run the following code after creating a new tenant:

// Grant all privileges to user on newly-created Tenant database.
DB::connection(env('DB_CONNECTION'))->statement("GRANT ALL PRIVILEGES ON ".$website->uuid.".* TO '".$website->uuid."'@'".env('DB_HOST')."' IDENTIFIED BY 'password'");

// Flush privileges.
DB::connection(env('DB_CONNECTION'))->statement("FLUSH PRIVILEGES");

I have created a command that runs this:

// For each tenant, connect to their database and run the migrate command with the custom path.
foreach(Hostname::all() as $hostname)
{
       // Initiate environment and hostname.
       $environment = app(\Hyn\Tenancy\Environment::class);

       // Switch environment to the hostname.
       $environment->hostname($hostname);

       // Update the migrations.
       $this->call('migrate', [
            '--database' => 'tenant',
            '--path' => 'database/migrations/tenant',
        ]);
}

It seems like it doesn't wanna connect to MySQL using that password or there is something wrong that goes along with my database privileges. As long as i have updated the privileges for that Tenant user and i have flushed them afterwards, i don't know what can be.

Information

hyn/multi-tenant version: 5.1
laravel version: 5.6
database driver and version: MariaDB 10.2.14
webserver software and version: Apache 2.4
php version: 7.2.3

tenancy.php config
<?php

/*
 * This file is part of the hyn/multi-tenant package.
 *
 * (c) Daniël Klabbers<EMAIL_ADDRESS> *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @see https://laravel-tenancy.com
 * @see https://github.com/hyn/multi-tenant
 */

use Hyn\Tenancy\Database\Connection;

return [
    'models' => [
        /**
         * Specify different models to be used for the global, system database
         * connection. These are also used in their relationships. Models
         * used have to implement their respective contracts and
         * either extend the SystemModel or use the trait
         * UsesSystemConnection.
         */

        // Must implement \Hyn\Tenancy\Contracts\Customer
        'customer' => \Hyn\Tenancy\Models\Customer::class,

        // Must implement \Hyn\Tenancy\Contracts\Hostname
        'hostname' => \Hyn\Tenancy\Models\Hostname::class,

        // Must implement \Hyn\Tenancy\Contracts\Website
        'website' => \Hyn\Tenancy\Models\Website::class
    ],
    'website' => [
        /**
         * Each website has a short random hash that identifies this entity
         * to the application. By default this id is randomized and fully
         * auto-generated. In case you want to force your own logic for
         * when you need to have a better overview of the complete
         * tenant folder structure, disable this and implement
         * your own id generation logic.
         */
        'disable-random-id' => false,

        /**
         * The random Id generator is responsible for creating the hash as mentioned
         * above. You can override what generator to use by modifying this value
         * in the configuration.
         *
         * @warn This won't work if disable-random-id is true.
         */
        'random-id-generator' => Hyn\Tenancy\Generators\Uuid\ShaGenerator::class,

        /**
         * Enable this flag in case you're using a driver that does not support
         * database username or database name with a length of more than 32 characters.
         *
         * This should be enabled for MySQL, but not for MariaDB and PostgreSQL.
         */
        'uuid-limit-length-to-32' => env('LIMIT_UUID_LENGTH_32', false),

        /**
         * Specify the disk you configured in the filesystems.php file where to store
         * the tenant specific files, including media, packages, routes and other
         * files for this particular website.
         *
         * @info If not set, will revert to the default filesystem.
         */
        'disk' => null,

        /**
         * Automatically generate a tenant directory based on the random id of the
         * website. Uses the above disk to store files to override system-wide
         * files.
         *
         * @info set to false to disable.
         */
        'auto-create-tenant-directory' => false,

        /**
         * Automatically rename the tenant directory when the random id of the
         * website changes. This should not be too common, but in case it happens
         * we automatically want to move files accordingly.
         *
         * @info set to false to disable.
         */
        'auto-rename-tenant-directory' => false,

        /**
         * Automatically deletes the tenant specific directory and all files
         * contained within.
         *
         * @see
         * @info set to true to enable.
         */
        'auto-delete-tenant-directory' => false,

        /**
         * Time to cache websites in minutes. Set to false to disable.
         */
        'cache' => false,
    ],
    'hostname' => [
        /**
         * If you want the multi tenant application to fall back to a default
         * hostname/website in case the requested hostname was not found
         * in the database, complete in detail the default hostname.
         *
         * @warn this must be a FQDN, these have no protocol or path!
         */
        'default' => env('TENANCY_DEFAULT_HOSTNAME'),
        /**
         * The package is able to identify the requested hostname by itself,
         * disable to get full control (and responsibility) over hostname
         * identification. The hostname identification is needed to
         * set a specific website as currently active.
         *
         * @see src/Jobs/HostnameIdentification.php
         */
        'auto-identification' => env('TENANCY_AUTO_HOSTNAME_IDENTIFICATION', true),

        /**
         * In case you want to have the tenancy environment set up early,
         * enable this flag. This will run the tenant identification
         * inside a middleware. This will eager load tenancy.
         *
         * A good use case is when you have set "tenant" as the default
         * database connection.
         */
        'early-identification' => env('TENANCY_EARLY_IDENTIFICATION', false),

        /**
         * Abort application execution in case no hostname was identified. This will throw a
         * 404 not found in case the tenant hostname was not resolved.
         */
        'abort-without-identified-hostname' => false,

        /**
         * Time to cache hostnames in minutes. Set to false to disable.
         */
        'cache' => false,
    ],
    'db' => [
        /**
         * The default connection to use; this overrules the Laravel database.default
         * configuration setting. In Laravel this is normally configured to 'mysql'.
         * You can set a environment variable to override the default database
         * connection to - for instance - the tenant connection 'tenant'.
         */
        'default' => env('TENANCY_DEFAULT_CONNECTION'),
        /**
         * Used to give names to the system and tenant database connections. By
         * default we configure 'system' and 'tenant'. The tenant connection
         * is set up automatically by this package.
         *
         * @see src/Database/Connection.php
         * @var system-connection-name The database connection name to use for the global/system database.
         * @var tenant-connection-name The database connection name to use for the tenant database.
         */
        'system-connection-name' => env('TENANCY_SYSTEM_CONNECTION_NAME', Connection::DEFAULT_SYSTEM_NAME),
        'tenant-connection-name' => env('TENANCY_TENANT_CONNECTION_NAME', Connection::DEFAULT_TENANT_NAME),

        /**
         * The tenant division mode specifies to what database websites will be
         * connecting. The default setup is to use a new database per tenant.
         * In case you prefer to use the same database with a table prefix,
         * set the mode to 'prefix'.
         *
         * @see src/Database/Connection.php
         */
        'tenant-division-mode' => env('TENANCY_DATABASE_DIVISION_MODE', 'database'),

        /**
         * The database password generator takes care of creating a valid hashed
         * string used for tenants to connect to the specific database. Do
         * note that this will only work in 'division modes' that set up
         * a connection to a separate database.
         */
        'password-generator' => App\Vendor\Hyn\TenantPasswordGenerator::class,

        /**
         * The tenant migrations to be run during creation of a tenant. Specify a directory
         * to run the migrations from. If specified these migrations will be executed
         * whenever a new tenant is created.
         *
         * @info set to false to disable auto migrating.
         *
         * @warn this has to be an absolute path, feel free to use helper methods like
         * base_path() or database_path() to set this up.
         */
        'tenant-migrations-path' => database_path('migrations/tenant'),

        /**
         * Seeds the newly created tenant database based on this Seeder.
         *
         * @info requires tenant-migrations-path to be in use.
         *
         * @warn specify a valid fully qualified class name.
         * @example App\Seeders\AdminSeeder::class
         */
        'tenant-seed-class' => false,

        /**
         * Automatically generate a tenant database based on the random id of the
         * website.
         *
         * @info set to false to disable.
         */
        'auto-create-tenant-database' => true,

        /**
         * Automatically rename the tenant database when the random id of the
         * website changes. This should not be too common, but in case it happens
         * we automatically want to move databases accordingly.
         *
         * @info set to false to disable.
         */
        'auto-rename-tenant-database' => true,

        /**
         * Automatically deletes the tenant specific database and all data
         * contained within.
         *
         * @info set to true to enable.
         */
        'auto-delete-tenant-database' => false,
    ],
    'folders' => [
        'config' => [
            /**
             * Merge configuration files from the config directory
             * inside the tenant directory with the global configuration files.
             */
            'enabled' => true,

            /**
             * List of configuration files to ignore, preventing override of crucial
             * application configurations.
             */
            'blacklist' => ['database', 'tenancy', 'webserver'],
        ],
        'routes' => [
            /**
             * Allows adding and overriding URL routes inside the tenant directory.
             */
            'enabled' => true,

            /**
             * Prefix all tenant routes.
             */
            'prefix' => null,
        ],
        'trans' => [
            /**
             * Allows reading translation files from a trans directory inside
             * the tenant directory.
             */
            'enabled' => true,

            /**
             * Will override the global translations with the tenant translations.
             * This is done by overriding the laravel default translator with the new path.
             */
            'override-global' => true,

            /**
             * In case you disabled global override, specify a namespace here to load the
             * tenant translation files with.
             */
            'namespace' => 'tenant',
        ],
        'vendor' => [
            /**
             * Allows using a custom vendor (composer driven) folder inside
             * the tenant directory.
             */
            'enabled' => true,
        ],
        'media' => [
            /**
             * Mounts the assets directory with (static) files for public use.
             */
            'enabled' => true,
        ]
    ]
];

webserver.php config
<?php

/*
 * This file is part of the hyn/multi-tenant package.
 *
 * (c) Daniël Klabbers<EMAIL_ADDRESS> *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @see https://laravel-tenancy.com
 * @see https://github.com/hyn/multi-tenant
 */

return [

    /**
     * Apache2 is one of the most widely adopted webserver packages available.
     *
     * @see http://httpd.apache.org/docs/
     * @see https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu
     */
    'apache2' => [
        /**
         * Whether the integration with Apache2 is currently active.
         */
        'enabled' => false,

        /**
         * Define the ports of your Apache service.
         */
        'ports' => [
            /**
             * HTTP, non-SSL port.
             *
             * @default 80
             */
            'http' => 80,
            /**
             * HTTPS, SSL port.
             *
             * @default 443
             */
            'https' => 443
        ],

        /**
         * The generator taking care of hooking into the Apache services and files.
         */
        'generator' => \Hyn\Tenancy\Generators\Webserver\Vhost\ApacheGenerator::class,

        /**
         * The view that holds the vhost configuration template.
         */
        'view' => 'tenancy.generators::webserver.apache.vhost',

        /**
         * Specify the disk you configured in the filesystems.php file where to store
         * the tenant vhost configuration files.
         *
         * @info If not set, will revert to the default filesystem.
         */
        'disk' => null,

        'paths' => [

            /**
             * Location where vhost configuration files can be found.
             */
            'vhost-files' => [
                '/etc/apache2/sites-enabled/'
            ],

            /**
             * Actions to run to work with the Apache2 service.
             */
            'actions' => [
                /**
                 * Action that asserts Apache2 is installed.
                 */
                'exists' => '/etc/init.d/apache2',
                /**
                 * Action to run to test the apache configuration.
                 */
                'test-config' => 'apache2ctl -t',
                /**
                 * Action to run to reload the apache service.
                 */
                'reload' => 'apache2ctl graceful'
            ]
        ]
    ],

    /**
     * Nginx webserver support.
     *
     * @see http://nginx.org
     */
    'nginx' => [
        /**
         * Whether the integration with nginx is currently active.
         */
        'enabled' => false,

        /**
         * The php sock to be used.
         */
        'php-sock' => 'unix:/var/run/php/php7.1-fpm.sock',

        /**
         * Define the ports of your nginx service.
         */
        'ports' => [
            /**
             * HTTP, non-SSL port.
             *
             * @default 80
             */
            'http' => 80,
            /**
             * HTTPS, SSL port.
             *
             * @default 443
             */
            'https' => 443
        ],

        /**
         * The generator taking care of hooking into the nginx services and files.
         */
        'generator' => \Hyn\Tenancy\Generators\Webserver\Vhost\NginxGenerator::class,

        /**
         * The view that holds the vhost configuration template.
         */
        'view' => 'tenancy.generators::webserver.nginx.vhost',

        /**
         * Specify the disk you configured in the filesystems.php file where to store
         * the tenant vhost configuration files.
         *
         * @info If not set, will revert to the default filesystem.
         */
        'disk' => null,

        'paths' => [

            /**
             * Location where vhost configuration files can be found.
             */
            'vhost-files' => [
                '/etc/nginx/sites-enabled/'
            ],

            /**
             * Actions to run to work with the Nginx service.
             */
            'actions' => [
                /**
                 * Action that asserts nginx is installed.
                 */
                'exists' => '/etc/init.d/nginx',
                /**
                 * Action to run to test the nginx configuration.
                 */
                'test-config' => '/etc/init.d/nginx configtest',
                /**
                 * Action to run to reload the nginx service.
                 */
                'reload' => 'systemctl restart nginx'
            ]
        ]
    ]
];

Okay, getting to the bottom of this:

use <IP_ADDRESS> instead of localhost as this has been changed in mariadb lately (if I'm not mistaken)
never, ever use env() calls because if you forget them and they end up in production they will always return null because if you use config:cache the env is no longer loading
the exact user exists and has permission over the database?

Thank you for the prompt answer and for some tips over stuff i should have avoided.
The problem itself was due to the nasty localhost which must have been <IP_ADDRESS>.
I am no longer calling those two DB statements, by updating privileges & flushing them anymore as long as i have ran tests and it works without them.
The problem solved after i changed to <IP_ADDRESS> and ran both config:cache and cache:clear commands.

Glad that is the issue, that localhost mutation really had me think a few times too.
Good luck building, let us know if you encounter any more issues and feel free to join the Discord chat for faster issue mitigation; https://laravel-tenancy.com/chat

@rennokki which file you change the hostname i am also taking same error but i did not fix it.


Update stable version in repo from 0.0.0 to 0.1.1

Think about adding version 0.1.1 to stable repository.
Version: stable=0.0.0 (0 days old) => latest=0.1.1 (30 days old)
Installs: stable=0 (0%), latest=26 (81.25%), total=32
Click to edit

@foxriver76
Kann / soll der Adapter (vor allem in Hinblick auf js-controller5) ins stable?

Jo gerne

Ok, dann mach ich das mal (aber eher morgen :-))

Keine Eile lieben Dank

This issue seems to be outdated.
This issue suggests to update the stable version of this adapter to 0.1.1 but the current stable version is already 0.1.1.
So this issue should be closed.


details on evaluation

Hello,
When i read your paper, i am confused about the details on automatic evaluation of image retrieval:

You said "set the the number of retrieval candidates to 100", there is randomness in the selection of both ground-truth images and candidates. Are the results in Table 12 the average results? If so, how many results are averaged?
Are all image-sharing turns in the test set involved in the evaluation?

Hope for your reply!
Best regards.

Hello,
Sorry for too late response. 1. We fixed the seed number. So when we conducted the evaluation, we used the same candidates. 2. Yes, we considered all image-sharing turns in the evaluation.

Thanks for your response.


Implement swapaxes

Feature request
Dear numba team,
it would be great to have support for swapaxes, as it allows for clean code when working with arrays of arbitrary dimension and similar multiplications along specific axes.
For example, this would be handy for computing the discrete spatial gradient.
def gradient(arr, axis):
    out = zeros((len(axis),) + arr.shape, dtype=arr.dtype)

    for i, k in enumerate(axis):
        # swap current gradient axis to the front
        out_swap = swapaxes(out, 1, 1+k)
        arr_swap = swapaxes(arr, 0, k)

        # central difference
        out_swap[i, 1:-1] = 0.5 * (arr_swap[2:] - arr_swap[:-2])

        # forward/backward diff at borders
        out_swap[i, 0] = arr_swap[1] - arr_swap[0]
        out_swap[i, -1] = arr_swap[-1] - arr_swap[-2]

    return out

This is just an example; I'm aware of the gradient function in numpy ;-)
Thanks for your continuous effort on this great package!

It looks like numpy.transpose is implemented in numba. You can pass an arbitrary axis ordering to this function, so I think this should provide the same functionality as swapaxes.

I don't think the Numba implementation of np.transpose (as of 0.48) supports arguments.

Thank you @dkafri for the suggestion! I've actually already tried this for myself, but ran into numba compiler errors which I was not able to resolve.
@stuartarchibald np.transpose seems to support arguments, as in an explicit return np.transpose(x, (1, 2, 0)) for example. When I tried to construct the arguments more dynamically is where I ran into problems.
Repro:
import numpy as np
from numba import jit
from functools import partial

@partial(jit, nopython=True)
def swap(x, a, b):
    axes = list(range(x.ndim))
    axes[a], axes[b] = axes[b], axes[a]
    return np.transpose(x, tuple(axes))

x = np.random.rand(10, 20, 30)
print(x.shape)
print(swap(x, 1, 2).shape)

gives
TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of Function(<class 'tuple'>) with argument(s) of type(s): (list(int64))
 * parameterized
In definition 0:
    All templates rejected with literals.
In definition 1:
    All templates rejected without literals.
This error is usually caused by passing an argument of a type that is unsupported by the named function.
[1] During: resolving callee type: Function(<class 'tuple'>)
[2] During: typing of call at <ipython-input-3-6cc830e49edf> (9)

File "<ipython-input-3-6cc830e49edf>", line 9:
def swap(x, a, b):
    <source elided>
    axes[a], axes[b] = axes[b], axes[a]
    return np.transpose(x, tuple(axes))
    ^

@clemisch, I think you need to limit your variables to numpy arrays and homogeneously typed tuples. Here is a version of swap that works (on numba 0.48), but with a somewhat different call signature:
import numpy as np
from numba import jit
from functools import partial

@partial(jit, nopython=True)
def swap(x, t_args):
    return np.transpose(x, t_args)

x = np.random.rand(10, 20, 30)
print(x.shape)
print(swap(x, (0, 2, 1)).shape)

You may want to consider setting cache=True in the call to jit.

I don't think the Numba implementation of np.transpose (as of 0.48) supports arguments.

@stuartarchibald, transpose  seems to support arguments for me. I was able to implement a kludgy version of tensordot.
import numpy as np
from numba import jit
from typing import Tuple

@jit(nopython=True)
def my_tensor_dot(left: np.ndarray, transpose_args_left: Tuple[int, ...],
                  left_shape: Tuple[int, ...], right: np.ndarray,
                  transpose_args_right: Tuple[int, ...],
                  right_shape: Tuple[int, ...],
                  output_shape: Tuple[int, ...]) -> np.ndarray:
    # We will need to reshape the array so that the contracted indices are
    # merged into the first index. To do so the array data must be C-contiguous.
    right = np.ascontiguousarray(np.transpose(right, transpose_args_right))
    # merge contracted indices
    right = right.reshape(right_shape)

    left = np.ascontiguousarray(np.transpose(left, transpose_args_left))
    left = left.reshape(left_shape)

    # take contraction and unmerge axes
    return np.dot(left, right).reshape(output_shape)

L = np.arange(24, dtype=float).reshape((4, 3, 2))
R = np.arange(60, dtype=float).reshape((3, 5, 4))

L_t_args = (2, 1, 0)
R_t_args = (0, 2, 1)
L_shape = (2, 12)
R_shape = (12, 5)
LR_shape = (2, 5)

actual = my_tensor_dot(L, L_t_args, L_shape, R, R_t_args, R_shape, LR_shape)
expected = np.tensordot(L, R, ((1, 0), (0, 2)))
np.testing.assert_almost_equal(actual, expected)

@dkafri ah great, thanks for looking, the docs could probably do with an update.

Thanks for the suggestion @dkafri. Your version of swap is merely a proxy for transpose, which does not fulfil the same role as swapaxes. That's the reason why I created this issue in the first place ;-)
I was hoping that someone could cast some light on the problem or a solution/workaround for the error from my repro.
(The swapaxes behavior is there; it's "just" not jit'able.)

If it helps you, this is what I do in my own code.  This works because a.ndim is known at compile time.
import numba as nb
from numba.np.unsafe.ndarray import to_fixed_tuple, tuple_setitem

@nb.njit
def swapaxes(a, axis1, axis2):
    """ Numba swapaxes ala np.swapaxes() """
    axis1 = a.ndim + axis1 if axis1 < 0 else axis1
    axis2 = a.ndim + axis2 if axis2 < 0 else axis2
    if axis1 == axis2:
        return a
    pos = to_fixed_tuple(np.arange(a.ndim), a.ndim)
    tmp = pos[axis1]
    pos = tuple_setitem(pos, axis1, pos[axis2])
    pos = tuple_setitem(pos, axis2, tmp)
    return a.transpose(pos)

That looks great @blackbox-tech! I was not aware of to_fixed_tuple and tuple_setitem, thanks.

@blackbox-tech thanks for submitting this! Perhaps this implementation could be the beginning of a pull-request to implement the requested feature? 😉

Will do...

@blackbox-tech thanks for submitting this! Perhaps this implementation could be the beginning of a pull-request to implement the requested feature?

I'm not familiar with the innards of numba, so I've not yet been able to get it to work.  I tried this but I got stuck as the @overload decorator seems to only except pure-python, so the to_fixed_tuple intrinsic is not available.  Also numba's np_transpose_impl() signature does not take a tuple, so I'm not sure how to pass my arguments to it?
@overload(np.swapaxes)
def numpy_swapaxes(a, axis1, axis2):
    @register_jitable
    def numpy_swapaxes_impl(a, axis1, axis2):
        if isinstance(axis1, types.Literal):
            axis1 = axis1.literal_value
        if isinstance(axis2, types.Literal):
            axis2 = axis2.literal_value
        axis1 = a.ndim + axis1 if axis1 < 0 else axis1
        axis2 = a.ndim + axis2 if axis2 < 0 else axis2
        if axis1 == axis2:
            return a
        pos = to_fixed_tuple(np.arange(a.ndim), a.ndim)
        tmp = pos[axis1]
        pos = tuple_setitem(pos, axis1, pos[axis2])
        pos = tuple_setitem(pos, axis2, tmp)
        return np_transpose_impl(a, pos)
    return numpy_swapaxes_impl(a, axis1, axis2)

Any pointers on how to overload numpy functions with numba code instead of pure-python would be great.

@blackbox-tech I am not sure what the error message is you are receiving. But perhaps the following will help?
http://numba.pydata.org/numba-doc/latest/extending/overloading-guide.html
I have never seen @register_jitable being used with an @overload. If code works within @njit it is likely to working with @overload.

The use of Numba's extension API @overload decorator is strongly recommended for this task. A guide to using @overload is here and API documentation is here.
It may be useful to take a look at examples of pull requests adding support for a NumPy function that have already been done if guidance is needed... here's a couple:

np.roll: https://github.com/numba/numba/pull/3563/files
np.roots: https://github.com/numba/numba/pull/2135/files

Also, this is a bit tricky as literals are required, here's a rough sketch to get a PR going:
from numba import njit, literally, types
import numpy as np
from numba.extending import overload
from numba.np.unsafe.ndarray import to_fixed_tuple, tuple_setitem

@overload(np.swapaxes)
def numpy_swapaxes(a, axis1, axis2):
    # THIS IS TYPING SCOPE, EVERYTHING IS A TYPE

    # This is a special function to tell Numba to go and get literal values
    # if they aren't literal already
    force_literal = lambda a, axis1, axis2: a, literally(axis1), literally(axis2)
    if isinstance(axis1, types.Literal):
        axis1_val = axis1.literal_value
    else:
        return force_literal
    if isinstance(axis2, types.Literal):
        axis2_val = axis2.literal_value
    else:
        return force_literal

    def impl(a, axis1, axis2):
        # THIS IMPLEMENTATION SCOPE, BUT YOU CAN ACCESS THE OUTER SCOPE
        axis1 = a.ndim + axis1_val if axis1_val < 0 else axis1_val
        axis2 = a.ndim + axis2_val if axis2_val < 0 else axis2_val
        if axis1 == axis2:
            return a
        pos = to_fixed_tuple(np.arange(a.ndim), a.ndim)
        tmp = pos[axis1]
        pos = tuple_setitem(pos, axis1, pos[axis2])
        pos = tuple_setitem(pos, axis2, tmp)
        return a.transpose(pos)

    return impl

@njit
def foo(a):
    return np.swapaxes(x, 0, 2)

x = np.array([[[0,1],[2,3]],[[4,5],[6,7]]])

print(foo(x))

@stuartarchibald  I've started a PR here https://github.com/numba/numba/pull/6272 but I'm not at all confident it correct if you want to review it?

np.swapaxes seems to be implemented in the way I needed it when creating this function.
Working repro:
import numpy as np
from numba import jit
from functools import partial

@partial(jit, nopython=True)
def gradient(arr, axis):
    out = np.zeros((len(axis),) + arr.shape, dtype=arr.dtype)

    for i, k in enumerate(axis):
        # swap current gradient axis to the front
        out_swap = np.swapaxes(out, 1, 1+k)
        arr_swap = np.swapaxes(arr, 0, k)

        # central difference
        out_swap[i, 1:-1] = 0.5 * (arr_swap[2:] - arr_swap[:-2])

        # forward/backward diff at borders
        out_swap[i, 0] = arr_swap[1] - arr_swap[0]
        out_swap[i, -1] = arr_swap[-1] - arr_swap[-2]

    return out

x = np.random.rand(2, 10)
print(x.shape)  # (2, 10)
print(gradient(x, (0, 1)).shape)  # (2, 2, 10)


Use matrix parameters for CircleCI builds

This also moves us to version 2.1 of the CircleCI config format.
Recommend viewing without whitespace changes, because YAML.

Will update required statuses post approval.


make use of ANDROID_HOME for adb

would be good to check for ANDROID_HOME and failing accordingly instead of expecting platform-tools adb to be on the path
https://github.com/rajdeepv/parallel_calabash/blob/master/lib/parallel_calabash/adb_helper.rb#L15

this is expected functionality for calabash itself.


typo in 3.1 release notice

Godot version:
320f49f
Issue description:
Small typo in description: Should be "improvements" instead of "improvemetns"

Which release notice ? Do you have a link ?

I fixed it, see https://github.com/godotengine/godot/releases/tag/3.1-stable :smiley:

Well that was quick!


npm intall fails (Windows/VS2017) due to bad postinstall

Expected behavior
Executing command 'npm install<EMAIL_ADDRESS>should install steem
Actual behavior
====Executing command 'npm install<EMAIL_ADDRESS>'====
'scripts' is not recognized as an internal or external command,

<EMAIL_ADDRESS>postinstall C:\Source\Repos\SteemBot\SteemBot\node_modules\steem
operable program or batch file.
scripts/post-install.js
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install"<EMAIL_ADDRESS>npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>postinstall: scripts/post-install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script 'scripts/post-install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the steem package,
npm ERR! not with npm itself.

How to reproduce
Visual Studio 2017, new NodeJS project, add steem to package.json

I'm assuming that all you have to do is add the command node into the post-install command in package.json so it works across all platforms . . . .

ARGH!  No . . . . the whole build chain is UNIX specific . . . .  :-(

@MWaser Can you try using npm install<EMAIL_ADDRESS>

That worked perfectly.  Thank you!
From: Nilesh Suthar<EMAIL_ADDRESS>Sent: Monday, June 5, 2017 4:08 AM
To: steemit/steem-js<EMAIL_ADDRESS>Cc: Mark Waser<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [steemit/steem-js] npm intall fails (Windows/VS2017) due to bad postinstall (#158)
@MWaser https://github.com/mwaser  Can you try using npm install<EMAIL_ADDRESS><EMAIL_ADDRESS>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/steemit/steem-js/issues/158#issuecomment-306128912 , or mute the thread https://github.com/notifications/unsubscribe-auth/AHh0Qft2qlZdTQwNWU702FqCjVf8nQz2ks5sA7dsgaJpZM4NvYY4 .  https://github.com/notifications/beacon/AHh0Qf5z4tQbJHI1FglX6GcuKwEc09xnks5sA7dsgaJpZM4NvYY4.gif


NOTICK Enforce gradle rerun smoke tests regardless of previous successful runs

Enforce gradle to rerun smoke tests regardless of previous successful runs.

Closing in favor of https://github.com/corda/corda-runtime-os/pull/2926


Validation error due to "expired" SSL certificate

When verifying a badge the following error is displayed:
FETCH_HTTP_NODE: <class 'requests.exceptions.SSLError'> ["requests.exceptions.SSLError: HTTPSConnectionPool(host='www.msmog.nl', port=443): Max retries exceeded with url: /cemi/badges/9000001.json (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:897)'),))\n"]
This may be related to Let's Encrypt's switchover to a new root certificate. See: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
The certificate JSON data at https://www.msmog.nl/cemi/badges/9000001.json is valid and so is the certificate, but the Badgr software is unable to verify the certificate becaus it probably hasn't updated to the new chain of trust.

Resolved. Caused by a bad certification chain at the server.

Hello
Im from Brazil and I work in Serpro Public  Company(https://www.serpro.gov.br/en/about-serpro), and We are testing a Badge Server and We are trying to validade our badges in IMS Validate Form and we have same problem.
I believe our certificate chain needs to be on your server, do you can help me ?
All certification chain can be downloaded from:
https://acraiz.icpbrasil.gov.br/ICP-Brasil.crt
https://ccd.serpro.gov.br/acserpro/docs/serprov2.crt
https://ccd.serpro.gov.br/acserpro/docs/serprofinalv2.crt
https://certificados.serpro.gov.br/arserpro/pages/information/certificate_chain.jsf

Any suggestions for testing on local with a self signed certificate?


[Forwardport] - Upgrade from Rancher 2.3.x -> 2.4.0 caused all Kubelets to constantly be restarted

Forward port for - https://github.com/rancher/rancher/issues/26399

It is already ported into master. Available to test in master head.

https://github.com/rancher/rancher/commit/a6907ab73a595a05e5e80f84a4fe3efec440d5df https://github.com/rancher/rancher/commit/bfa3e1c8a45931cc138198be6323c2cff8867e22

The bug fix is validated in Rancher:master-head 8bd924599 HA upgraded from Rancher:v2.3.6
Steps:

run rancher:v2.3.6 in HA mode
add two clusters (DO and ec2), each has 1 etcd, 1 control plan, and 2 workers
upgrade rancher to master-head 8bd92459
ssh to each node

Results:

the container kubelet does not restart in any of those nodes

~$ docker ps | grep kubelet
b475af6168cc        rancher/hyperkube:v1.17.4-rancher1                "/opt/rke-tools/entr…"   30 minutes ago      Up 29 minutes                           kubelet

~$ docker inspect kubelet | grep RestartCount
        "RestartCount": 0,

from https://github.com/rancher/rancher/issues/26399#issuecomment-616728493
Rancher version: master-head (04/20/2020) commit id: 8bd924599

HA Install with self-signed certs.
Upgrade from v2.3.5
All nodes checked and the kubelet wasn't restarting as reported in this issue.

3 clusters tested
DO

1 etcd
1 controlplane
2 workers

Linode

1 etcd
1 controlplane
2 workers

Custom from EC2

1 etcd
1 controlplane
1 workers


Can I render "Selected Color" in GridShader.shader at multiple coordinate positions (id) at the same time?

Can I render "Selected Color" in GridShader.shader at multiple coordinate positions (id) at the same time ?

Yes. You need to duplicate this block of code in the shader :
if (round(_SelectCell) == 1.0 && id.x == _SelectedCellX && id.y == _SelectedCellY)

{
    brightness = _SelectedColor.w;
    color = _SelectedColor;

}

And then replace the following variable inside the block with new ones you create  :
_SelectedCell is the toggle variable that is set to 1 when you want to highlight the selected cell.
_SelectedCellX and _SelectedCellY are the GUI set params used to select a cell.
_SelectedColor is the applied color.
If you just want another cell selected and keep the same color, make some new X and Y values but still use the _SelectedColor value in the new if block.
You can also change the conditions to work with a "range" of selected values by defining some new variables, using two selected positions you can draw "lines" of selected cells on the grid. Using a single selected cell and a new "range" variable and some basic math you can select circles or square area of cells.
Just remember that the more if blocks you use the slower the shader will become.


HADOOP-17760. Delete hadoop.ssl.enabled and dfs.https.enable from docs and core-default.xml

JIRA: HADOOP-17760

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 54s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+0 :ok:
markdownlint
0m  0s

markdownlint was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 1 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
31m 28s

trunk passed

+1 :green_heart:
compile
20m 55s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
compile
18m  9s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
checkstyle
1m  7s

trunk passed

+1 :green_heart:
mvnsite
1m 36s

trunk passed

+1 :green_heart:
javadoc
1m  8s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
1m 45s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
2m 26s

trunk passed

+1 :green_heart:
shadedclient
15m 58s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
0m 55s

the patch passed

+1 :green_heart:
compile
20m 19s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javac
20m 19s

the patch passed

+1 :green_heart:
compile
18m  9s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
javac
18m  9s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
1m  4s

the patch passed

+1 :green_heart:
mvnsite
1m 37s

the patch passed

+1 :green_heart:
xml
0m  2s

The patch has no ill-formed XML file.

+1 :green_heart:
javadoc
1m  7s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
1m 43s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
2m 34s

the patch passed

+1 :green_heart:
shadedclient
15m 46s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
17m  1s

hadoop-common in the patch passed.

+1 :green_heart:
asflicense
0m 58s

The patch does not generate ASF License warnings.

177m 11s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3099/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3099

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell xml markdownlint spotbugs checkstyle

uname
Linux eb7d73c8db4b 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 73924d047754041be1277e36d5f45571f50f0bec

Default Java
Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3099/1/testReport/

Max. process+thread count
2158 (vs. ulimit of 5500)

modules
C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3099/1/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

Thanks for your review, @ayushtkn. Updated the PR.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
0m 32s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  1s

codespell was not available.

+0 :ok:
markdownlint
0m  1s

markdownlint was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 1 new or modified test files.

_ trunk Compile Tests _

+0 :ok:
mvndep
14m 10s

Maven dependency ordering for branch

+1 :green_heart:
mvninstall
20m 13s

trunk passed

+1 :green_heart:
compile
20m 48s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
compile
18m  4s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
checkstyle
3m 50s

trunk passed

+1 :green_heart:
mvnsite
2m 24s

trunk passed

+1 :green_heart:
javadoc
1m 51s

trunk passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
2m 25s

trunk passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
3m 26s

trunk passed

+1 :green_heart:
shadedclient
14m 23s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 27s

Maven dependency ordering for patch

+1 :green_heart:
mvninstall
1m 20s

the patch passed

+1 :green_heart:
compile
20m  8s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javac
20m  8s

the patch passed

+1 :green_heart:
compile
18m  7s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
javac
18m  7s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
3m 48s

the patch passed

+1 :green_heart:
mvnsite
2m 22s

the patch passed

+1 :green_heart:
xml
0m  1s

The patch has no ill-formed XML file.

+1 :green_heart:
javadoc
1m 50s

the patch passed with JDK Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04

+1 :green_heart:
javadoc
2m 24s

the patch passed with JDK Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

+1 :green_heart:
spotbugs
3m 49s

the patch passed

+1 :green_heart:
shadedclient
14m 44s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
unit
16m 55s

hadoop-common in the patch passed.

+1 :green_heart:
unit
12m 17s

hadoop-sls in the patch passed.

+1 :green_heart:
asflicense
0m 58s

The patch does not generate ASF License warnings.

205m 16s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3099/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/3099

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell xml markdownlint spotbugs checkstyle

uname
Linux 624fa50c3b2e 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 03850636fe3c1cb570bae7a3891d0815fcacad8c

Default Java
Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.11+9-Ubuntu-0ubuntu2.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_292-8u292-b10-0ubuntu1~20.04-b10

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3099/2/testReport/

Max. process+thread count
2231 (vs. ulimit of 5500)

modules
C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-sls U: .

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-3099/2/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

Merged. Thanks for reviewing it, @ayushtkn!


Enhancement: ability to specify output image name

It would be nice to have the ability to give a name to the output image from the build task. It's nice that nodeshift already uses the name from package.json. But it would be good for pipelines to be able to specify a given run what the output image name - for example my-webapp-staging and my-webapp-production.

This would be a nice addition and it sort of goes along with a TODO item that i've had in the code for a while around being able to specify a tag name instead of just using latest,
Since we are always using latest,  we are overwriting the previous "version" of the imagestream during every build.
Another thing that might also make sense, is the ability to specify different buildConfigs?  Currently when you run nodeshift a default buildConfig is created, then this is used on subsequent calls to nodeshift unless the flag to recreate is specified.  It could be interesting if you had the ability to specify a previously created buildConfig without having to re-create each time
I'm sort of hijacking this issue, but i think they logically go together.

@lholmquist @helio-frota I think the implementation for the image name + tag could be very simple. E.g.
config.outputImageTag = config.outputImageTag ? config.outputImageTag : 'latest';
const outputImageStreamTag = `${config.outputImage}:${config.outputImageTag}`;

And of course, adding outputImage and outputImageTag as command line options so they end up on the config object.
I think the flexibility you'd get by naming the BuildConfig would be nice. But yeah, that's a different issue. :)


Performance

Hi,
Thanks for sharing this!
Is there any comparison about performance between this implementation and the otsu in opencv (cpu version)?
Lin

Hey, sorry for late response and thanks for stopping by :)
I decided to follow own implementations and comparison between them just for a sake of simiplicity when it comes to run configurations. If there are reasonable close configuration options for my app and any other app/library that does otsu, I think that it can be compared.
If you (or anyone reading this :)) have a suggestion on how I can add some more configuration options, please post me a github issue with description.


Website: add logo placement grid to Logo grid page

The guide for logo placement:
Logo placement spec
Box for above file: https://ibm.box.com/s/2c2dt2fivbmbcce29oul7hjaktjaqj26

https://ibm.box.com/s/2c2dt2fivbmbcce29oul7hjaktjaqj26
Logo placement speca

Notes
When possible, use horizontally oriented logos to avoid vertical spacing issues
Safe space on grid
Use ratios in the grid
Optically align.

@shixiedesign if you have a moment would love your thoughts on the logo grid guidelines. As discussed, I just added the centered 4:3 placement to logo grid, and we will work on incorporating left aligned logos and sizes when we do Logo card explorations.

Documenting feedback from slack:
Outline changes:

Logo placement

Grid template
Alignment

Tips and techniques

Orientation
Type
Color

[ ] update outline

Under Logo placement > Alignment I think a more common mistake is people use the largest width and ignore height of grid

[ ] update visual example to full width

Logos on IBM.com

https://www.ibm.com/watson
https://www.ibm.com/cloud


Fix TPKeyboardAvoiding_contentInsetForKeyboard

Reset newInset.bottom to state.priorInset.bottom if the keyboard is getting closed.

Thank you!


Reference position tracking

Note:
This is still in development and needs real-time testing. Posting this PR in case the next student might be interested in using this code.
Main Changes
This PR is about the implementation of a reference position tracker.
It implements;

A QR-Camera based heading and (x, y) coordinate tracker.
A Kalman filter for estimating the (x, y) coordinates along with the corresponding velocities (vx, vy).
An LQR for position reference tracking.

Tests
Only preliminary simulations.

@jamie-54 this may contain some useful pieces of code. Can we clean it up and merge it? If not, let's close it.


Endpoint to calculate Profitability index

What bug or feature you wants to report.
The profitability index (PI) describes an index representing the relationship between a proposed project's costs and benefits.

And to calculate the PV of future cash flows this formula is used:

Looks good, go ahead:))


[WFLY-18645] Upgrade openjdk-orb to 10.0.0.Final

https://issues.redhat.com/browse/WFLY-18645
Openjdk-orb was refactored to be built on jdk11, hence the major version bump. This change was triggered by
https://issues.redhat.com/browse/JBEAP-25755

Thanks @tadamski


add dumpInertia() testing method

This pull request intent is to add a new dumpInertia(string $key = null) method to TestResponseMacros file. Existing testing methods like dump(), dumpSession(), dumpHeaders() are very convenient in Laravel testing.
If parameter is not set, then all of the Inertia data will be printed (component, props, url, version, ...).
If parameter is set, then props property content will be printed (accepting dot-notation thanks to Arr:get())

Heya. We removed our master branch. Feel free to re-attempt this to 1.x!


LXD Support?

Could this panel be converted to use LXD instead? Seems like the way to go forward and I haven't seen any LXD panels yet.

+1 LXD has some very nice features and it would be nice if this web interface could support it too

See also #103


[SPARK-13747][Core]Add ThreadUtils.awaitReady and disallow Await.ready

What changes were proposed in this pull request?
Add ThreadUtils.awaitReady similar to ThreadUtils.awaitResult and disallow Await.ready.
How was this patch tested?
Jenkins

Test build #76149 has started for PR 17763 at commit e79a05a.

Test build #76149 has finished for PR 17763 at commit e79a05a.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/76149/
Test FAILed.

Merged build finished. Test FAILed.

Test build #76150 has started for PR 17763 at commit f10461b.

Test build #76150 has finished for PR 17763 at commit f10461b.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/76150/
Test FAILed.

Merged build finished. Test FAILed.

Test build #76151 has started for PR 17763 at commit 2bb83e1.

Test build #76151 has finished for PR 17763 at commit 2bb83e1.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/76151/
Test PASSed.

Merged build finished. Test PASSed.

retest this please

Test build #76977 has started for PR 17763 at commit 2bb83e1.

@yhuai could you take a look at this one since you reviewed the previous PR, please?

lgtm

Thanks! Merging to master and 2.2.


Running ng add turns JSON files into random number arrays

Versions
Angular CLI: 6.0.1
Node: 6.11.2
OS: win32 x64
Angular: 6.0.2

Repro steps

Run ng-add (e.g. ng add @angular/elements)

Observed behavior

package.json & angular.json will be turned into a comma-separated file with a bunch of random numbers.

For example, a part of my package.json:
123,10,32,32,34,110,97,109,101,34,58,32,34,97,110,103,117,108,97,114,45,115,105,103,110,97,103,101,34,44,10,32,32,34,118,101,114,115,105,111,110,34,58,32,34,48,46,48,46,48,34,44,10,32,32,34, (.. goes on like this)
Desired behavior
Keep my package.json intact and add a package instead of messing up the file.

This appears to be a bug but we will need to look at a reproduction to find and fix the problem. Can you setup a minimal reproduction please?
You can read here why this is needed. A good way to make a minimal reproduction is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information.
If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.


Uncaught Error: error sending request for url

The agents can't generate conversations, the traceback is as follows:
8/12/2024, 5:33:59 PM [CONVEX A(aiTown/agentOperations:agentGenerateMessage)] Uncaught Error: error sending request for url (http://<IP_ADDRESS>:11434/api/embeddings): error trying to connect: tcp connect error: Connection refused (os error 61)

check that you have something running on
http://<IP_ADDRESS>:11434/api/embeddings - e.g. ollama - and that it's
accessible from where you're running the backend
On Mon, Aug 12, 2024 at 6:44 AM knightmarehs @.***>
wrote:

The agents can't generate conversations, the traceback is as follows:
8/12/2024, 5:33:59 PM [CONVEX
A(aiTown/agentOperations:agentGenerateMessage)] Uncaught Error: error
sending request for url (http://<IP_ADDRESS>:11434/api/embeddings): error
trying to connect: tcp connect error: Connection refused (os error 61)
—
Reply to this email directly, view it on GitHub
https://github.com/a16z-infra/ai-town/issues/249, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACZQWYU5ZCM6MUVZLBZOI3ZRC34PAVCNFSM6AAAAABMMG4SEOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ3DCMBVGQYDGOA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Hi there, I'm facing a similar issue, the agents can't generate conversations, but in the traceback, it's saying the request was forbidden:
9/29/2024, 2:53:34 PM [CONVEX A(aiTown/agentOperations:agentGenerateMessage)] Uncaught Error: Request to http://localhost:11434/api/embeddings forbidden

I have the same problem too!!!

@likeUMR did you resolve this issue or figure something out? Thanks.

@ianmacartney  is there any clue for this issue? Thanks.

Sorry I haven't seen this issue before. I suggest dropping in logs,
reproducing simple requests, verifying some assumptions (is ai-town running
on your machine or in the cloud environment? is it running in a container?
is ollama running somewhere accessible?
You might also try <IP_ADDRESS> instead of localhost since some Windows
users have seen odd behavior there. Best of luck with the debugging
On Sat, Oct 19, 2024 at 10:34 PM quanchentg @.***>
wrote:

@ianmacartney https://github.com/ianmacartney is there any clue for
this issue? Thanks.
—
Reply to this email directly, view it on GitHub
https://github.com/a16z-infra/ai-town/issues/249#issuecomment-2424608774,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACZQW5A3HMBIF6YUMN4HIDZ4M6GJAVCNFSM6AAAAABMMG4SEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRUGYYDQNZXGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

For me this happened when the frontend is pointing to Convex backend managed by Convex in the cloud (dashboard.convex.dev).
Check your .env.local file and make sure VITE_CONVEX_URL=http://<IP_ADDRESS>:3210 is there. If not you can re-generate it with npm run dev:backend after clearing the contents of .env.local.
Then you might need to restart the frontend app - npm run dev:frontend to pick up the change.

@leol15 Thanks for your nice suggestions. Let me give it a try!

@leol15 您好，想问您是使用本地的convex后端，不使用云端的convex就能成功跟Ollama通信是吗，我现在遇到的问题就是跟Ollama的连接被拒绝，我现在的convex使用的是云端的dashboard.convex.dev，.env.local也是设置的云端的没有用http://<IP_ADDRESS>:3210，您是使用http://<IP_ADDRESS>:3210就能避免通信被拒这个问题是吗

Uncaught Error: Request to http://<IP_ADDRESS>:11434/api/embeddings forbidden
When i change the embeddings to embed(base on a post about the ollama new api doc, so it is http://<IP_ADDRESS>:11434/api/embed) the problem still exist!

Hello, I’m facing the same issue as you. I also changed ‘embedding’ to ‘embed’, but I’m still getting an error（Uncaught Error: Request to http://localhost:11434/api/embed forbidden
）. Have you found a solution? Thank you.

@Tsailj Yes, local backend worked for me. This is the relevant command to start the backend https://github.com/a16z-infra/ai-town/blob/main/Justfile#L31
I'm unsure how the cloud backend was able to communicate with Ollama running locally, appreciate if others could explain!

in the readme there are directions for using ngrok / tunnelmole to proxy
the traffic locally
On Sun, Nov 24, 2024 at 12:08 AM Oreo @.***> wrote:

@Tsailj https://github.com/Tsailj Yes, local backend worked for me.
This is the relevant command to start the backend
https://github.com/a16z-infra/ai-town/blob/main/Justfile#L31
I'm unsure how the cloud backend was able to communicate with Ollama
running locally, appreciate if others could explain!
—
Reply to this email directly, view it on GitHub
https://github.com/a16z-infra/ai-town/issues/249#issuecomment-2495817436,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACZQW2GY75KSP4HSF3243T2CFNLFAVCNFSM6AAAAABMMG4SEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVHAYTONBTGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

@leol15 您好，想问您是使用本地的convex后端，不使用云端的convex就能成功跟Ollama通信是吗，我现在遇到的问题就是跟Ollama的连接被拒绝，我现在的convex使用的是云端的dashboard.convex.dev，.env.local也是设置的云端的没有用http://<IP_ADDRESS>:3210，您是使用http://<IP_ADDRESS>:3210就能避免通信被拒这个问题是吗

我只能成功的使用雲端的 convex，再另外設置 tunnel 服務連到本地端的 localhost:11434，tunnel 的連結是寫入到 convex dashboard 的 Settings 中，新增一項 OLLAMA_HOST 環境變數，以建立 ngrok 連結為例，需要指定發送服務的標頭內 host 內容為 localhost:11434，指令參考: ngrok http 11434 --host-header="localhost:11434"，我還另外在本地端環境設置了 Ollama_ORIGINS 變數為 *


Feature/#302 hide deprecated relationships

Description of what has changed

Added support for deprecated relationships.
Issues addressed by pull request

Closes #302.

Was unsuccessful with removing deprecated relationships with STIX filters.


'URL' object has no attribute 'decode'

aiocfscrape==1.0.0
aiohttp==3.6.2
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in aenter
self._resp = await self._coro
File "/usr/local/lib/python3.7/site-packages/aiocfscrape/init.py", line 87, in _request
return await self.solve_cf_challenge(resp, **kwargs)
File "/usr/local/lib/python3.7/site-packages/aiocfscrape/init.py", line 125, in solve_cf_challenge
parsed_url = urlparse(resp.url)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 367, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 123, in _coerce_args
return _decode_args(args) + (_encode_result,)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 107, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 107, in
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 'URL' object has no attribute 'decode'

same issue to me.
Please fix this.

It's possible it is the version of aiohttp we are using.
I'm going to be looking into it now, and will make a PR when I figure out what is going on

@ItsASmallWorld @pystar1007 I pushed a fix. Lets hope it gets accepted :)
It did have to do with the version of aiohttp. They changed the data struct of the response object. and it didn't like not having org_method undefined before checking if it is None.

Ok so this module is too outdated from the original cfscrape.
I pulled a fresh source of cfscrape and started making it IO again.
It will be completely working tommorrow.
https://github.com/DevL0rd/aio-cloudflare-scrape

@ItsASmallWorld @pystar1007 I pushed a fix. Lets hope it gets accepted :)
It did have to do with the version of aiohttp. They changed the data struct of the response object. and it didn't like not having org_method undefined before checking if it is None.

Same issue, does it work now?
also, @flabbet see this

Ok so this module is too outdated from the original cfscrape.
I pulled a fresh source of cfscrape and started making it IO again.
It will be completely working tommorrow.
https://github.com/DevL0rd/aio-cloudflare-scrape

does this work, @DevL0rd?

Ok so this module is too outdated from the original cfscrape.
I pulled a fresh source of cfscrape and started making it IO again.
It will be completely working tommorrow.
https://github.com/DevL0rd/aio-cloudflare-scrape

does this work, @DevL0rd?

cloudflare has updated new challenge this lib dont work for new challenge

Ok so this module is too outdated from the original cfscrape.
I pulled a fresh source of cfscrape and started making it IO again.
It will be completely working tommorrow.
https://github.com/DevL0rd/aio-cloudflare-scrape

cloudflare has updated new challenge this lib dont work for new challenge

This will be fixed with https://github.com/pavlodvornikov/aiocfscrape/tree/na/update-to-latest-cfscrape and as I explained some stuff in here, an issue which also talks about this error, I'll close this one


How do i save my game?

recently-ish started using submeresedvr, and i cant find any keybinds on my controllers to pause, save, then quit! I lose all my progress!
If there isnt a fix, im happy for a "menu in pda" mod or something.
Quest 3 user.

There should be a big Menu button on the bottom right corner in the PDA already. If you don't see that the mod probably isn't installed properly.

There should be a big Menu button on the bottom right corner in the PDA already. If you don't see that the mod probably isn't installed properly.

Ahh, Thankyou!


Case: User has repo access, but is not a member of Organization

Details-
Step 1. Issue is assigned to user (member of org and has access to repo)
Step 2. User removed from org
product: unspecified

PRMergerTest3 is not a member of prmergertest organization, therefore is automatically removed from issue assignee list.


Is it still necessary to switch on USB debugging for rooted device?

Is it still necessary to switch on USB debugging for rooted device?

I turned off USB debugging and found no difference of brevent ui showing, but have no idea if also no difference of brevent backend functionality.


If ring instances have conflicting tokens, rings can compute different instance ownership.

If instances have conflicting tokens in the ring, then different ring incarnations can compute different token ownerships from same underlying RingDesc.
This happens because ringDesc.getTokensInfo() iterate through instances in different order, and may therefore compute different assignments of tokens to instances.
Following test shows the problem:
func TestConflictingTokens(t *testing.T) {
	seed := time.Now().UnixNano()
	t.Log("token generator seed:", seed)

	instances1 := map[string]InstanceDesc{}
	instances2 := map[string]InstanceDesc{}

	const zones = 3
	const instancePerZone = 100
	for z := 0; z < zones; z++ {
		zoneGen := NewRandomTokenGeneratorWithSeed(seed) // We restart token generation for each zone.

		for i := 0; i < instancePerZone; i++ {
			inst, desc, _ := generateRingInstance(zoneGen, i, z, 100*z, nil) // Number of tokens per instance will be different in each zone.
			instances1[inst] = desc
			instances2[inst] = desc
		}
	}

	ringDesc1 := &Desc{Ingesters: instances1}
	ringDesc2 := &Desc{Ingesters: instances2}

	require.Equal(t, ringDesc1.GetTokens(), ringDesc2.GetTokens())
	require.Equal(t, ringDesc1.getTokensByZone(), ringDesc2.getTokensByZone())
	require.Equal(t, ringDesc1.getTokensInfo(), ringDesc2.getTokensInfo())
}

When running it with go test -run 'TestConflictingTokens' -v -count=1000, it fails quite reliably.
I think we should fix the ring code to always produce consistent results even in case when there are conflicting tokens in the ring.

Hi @pstibrany,
The first remark I have here is: does it make sense that instances have conflicting tokens? In the current design I guess it is not the case. Otherwise, once we start searching for a replica set, and we find a token owned by more than one instance, how do we chose which of the instances which will be in the replica set? This already introduces some ambiguity: namely, it could happen that the same timeseries will be replicated to different set of ingesters in different push requests.
The second remark is: generateRingInstance(), used in our tests, actually calls zoneGen.GenerateTokens() containing 2 arguments: requestedTokensCount int, number of tokens to be generated, and allTakenTokens []uint32, a list of all tokens generated so far, and ensures that, if allTakenTokens is passed, new generated tokens will be "fresh". In some tests, this one included, allTakenTokens is set to nil, but in the production code it is not the case.
So, if my first remark is correct, it will imply the correctness of the second remark. Otherwise, we need to re-think about the current design.

Hi @pstibrany, The first remark I have here is: does it make sense that instances have conflicting tokens? In the current design I guess it is not the case. Otherwise, once we start searching for a replica set, and we find a token owned by more than one instance, how do we chose which of the instances which will be in the replica set? This already introduces some ambiguity: namely, it could happen that the same timeseries will be replicated to different set of ingesters in different push requests.

In production this should not happen:

when using Consul or Etcd, then clients will never generate conflicting tokens, because they generate unique tokens and then use CAS operation to write new generated tokens back. So conflict can't happen.
when using memberlist KV store, conflicting tokens can be generated by multiple instances adding an entry at the same time, but memberlist client will resolve such conflicts in deterministic way.

If I remember correctly, I only ran into this problem (conflicting tokens) in test code, as you mention in your comment. We could either make sure that no tests generate conflicting tokens, or implement predictable results as I suggest in the issue.

The second remark is: generateRingInstance(), used in our tests, actually calls zoneGen.GenerateTokens() containing 2 arguments: requestedTokensCount int, number of tokens to be generated, and allTakenTokens []uint32, a list of all tokens generated so far, and ensures that, if allTakenTokens is passed, new generated tokens will be "fresh". In some tests, this one included, allTakenTokens is set to nil, but in the production code it is not the case.


AppImage for Linux

Providing an AppImage would have, among others, these advantages:

Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
One app = one file = super simple for users: just download one AppImage file, make it executable, and run
No unpacking or installation necessary
No root needed
No system libraries changed
Works out of the box, no installation of runtimes needed
Optional desktop integration with appimaged
Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
Can optionally GPG2-sign your AppImages (inside the file)
Works on Live ISOs
Can use the same AppImages when dual-booting multiple distributions
Can be listed in the AppImageHub central directory of available AppImages
Can double as a self-extracting compressed archive with the --appimage-extract parameter

Here is an overview of projects that are already distributing upstream-provided, official AppImages.
If you have questions, AppImage developers are on #AppImage on irc.freenode.net.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Possibly https://github.com/probonopd/linuxdeployqt/#using-linuxdeployqt-with-travis-ci could be used almost 1:1.

You do realize that this is not really usable, and development is close to dead, right?
So, you should probably prepare this and file a PR, or, even better, work on making it actually usable in practice :)


Improve cancel() method of CZConcurrentOperation.

Sometimes operations won't be cancelled because they already executed given
operation executes more than one at a time after cancelling - usually five operations
execute at the same time.
TODO

Operation executes more than one at a time after cancelling.
Operation execution order after cancelling isn't as enqueued.

Solution

Use ConcurrentBlockOperation instead.


Rendering glitch in ControlCatalog with DeferredRenderer

Change the first line in MainWindow.xaml.cs to
<Window xmlns="https://github.com/avaloniaui" MinWidth="500" MinHeight="300" Height="300"

and resize the window using the bottom grip.

possibly related to #1194


Table edit switches to visualization edit automatically?

Fixes management issue 3816

Frontend tests were OK :+1: (details)

retest this please

Frontend tests were OK :+1: (details)

@rafatower CR please (all tests should pass)

Frontend tests were OK :+1: (details)

:+1:


Deb config files are getting wrong file mode

The file mode for 'config' files is currently being set to 0o644 when it should be 0o755.  When the mode is incorrect you will get an error like this when trying to install the deb:
Can't exec "/var/lib/dpkg/info/pkg.config": Permission denied at /usr/share/perl/5.28/IPC/Open3.pm line 178.
open2: exec of /var/lib/dpkg/info/pkg.config configure  failed: Permission denied at /usr/share/perl5/Debconf/ConfModule.pm line 59.

The following patch is enough to fix this:
--- make_deb.py.orig    2019-10-07 16:37:51.000000000 -0700
+++ make_deb.py 2019-10-07 16:38:13.000000000 -0700
@@ -176,7 +176,7 @@
   if postrm:
     extrafiles['postrm'] = (postrm, 0o755)
   if config:
-    extrafiles['config'] = (config, 0o644)
+    extrafiles['config'] = (config, 0o755)
   if templates:
     extrafiles['templates'] = (templates, 0o644)
   if conffiles:

Would someone like to send a PR with a test case?


Drawer: fix the focus issue when open the drawer

there is no enough reason to make the title focusable.
Please make sure these boxes are checked before submitting your PR, thank you!

[x] Make sure you follow Element's contributing guide (中文 | English | Español | Français).
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

fix the following issues:
https://github.com/ElemeFE/element/issues/18380
https://github.com/ElemeFE/element/issues/18279
https://github.com/ElemeFE/element/issues/18270
https://github.com/ElemeFE/element/issues/18230

Drawer focus the first descendant element on open.
https://github.com/ElemeFE/element/blob/507db848521cc44810dd21fbd4e7528e2c569d12/packages/drawer/src/main.vue#L137
In your case, the close button is focused. That's still not very useful.
https://github.com/ElemeFE/element/blob/507db848521cc44810dd21fbd4e7528e2c569d12/packages/drawer/src/main.vue#L32

See my PR: https://github.com/EOITek/element/pull/32

难道要更新才解决的到？


Message response should report invalid letter

added a fix for this, just need to do more testing later to make sure it fully works!


Closure Compiler Support

Is there a way to compile things using LitElement with Closure Compiler?
Since @property has the @ExportDecoratedItems tag, I thought tsickle might just make things work. But sadly it doesn't.
I've gotten it to work with something like this:
class MyElement extends LitElement {
  @property({=type: String=})
  uri: string = '';
}
Object.defineProperty(
    MyElement.prototype, goog.reflect.objectProperty('uri', MyElement.prototype),
    Object.getOwnPropertyDescriptor(MyElement.prototype, 'uri')!);

But that's pretty ugly to write for every property. Is there some easier way?

I found a nicer workaround for the non-decorator property definitions:
class MyElement extends LitElement {
  uri: string = '';
  static get properties() {
    return goog.reflect.object(MyElement, {
      uri: {type: String}
    })
  }
}

Tagging the class with @polymer also seems to work with the non-decorator version, but I'm not sure if that make other changes to the class.

For Closure you need to use the static properties property. @rictic or @azakus can you comment on what else is needed?

With tsickle, properties should be properly protected from renaming. Are you compiling with --generate_exports and --export_local_property_definitions?

Are you saying the decorator should work with tsickle, or the static properties style?
It doesn't look like I had those flags set, I'll give that a try.

Yeah, idiomatic code with the @property decorator should just work.

Yes, adding those flags seems to fix the decorated properties. Thanks!

Glad to hear it!


🔥 Remove steps strategy

This was not used and breaks in postgis 2.3+ because the extension is no longer relocatable.

Less 🔴 than before, so 🚀


fix: Improve apt facts install

Reduce the number of packages installed by the apt package facts preflight by using the apt module and disabling recommends packages.

Except we do need to switch to apt, since package doesn't expose "install_recommends" as a parameter.

That is true but it simply passes the parameters down to the underlying module that it's proxy-ing.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/package_module.html#id1


proposal: disallow changing GOMAXPROCS in runtime

The runtime.GOMAXPROCS function allows updating the number of p at any time during the program execution. This could be useful before go1.5 when GOMAXPROCS was set to 1 by default and when goroutine scheduler wasn't very good.
Now the goroutine scheduler is great and GOMAXPROCS equals to the number of available CPU cores by default. So there are no major reasons to change it during program execution. Additionally, GOMAXPROCS may be overridden via environment variable at program start if required:
GOMAXPROCS=1 ./path/to/program

The ability to change GOMAXPROCS in runtime complicates the code in runtime and sync packages. @dvyukov should agree with this :)
The documentation to runtime.GOMAXPROCS explicitly says:

This call will go away when the scheduler improves.

Maybe it's time to make runtime.GOMAXPROCS no-op, i.e. just return the GOMAXPROCS value set at program start?

FWIW we use GOMAXPROCS=1 in some tests, and I think cluster management systems may need finer-grained control over GOMAXPROCS during dynamic machine partitioning.

Yes, if your VM is reconfigured, or if somebody wants to call sched_setaffinity on your process, then it still makes sense to change GOMAXPROCS.

Wouldn't that make LockOSThread() way less useful tho ? Currently you can just increase number of goroutines before calling it to be sure you will have other threads to use for rest of goroutines

There isn't any real interaction between LockOSThread and GOMAXPROCS.  GOMAXPROCS is essentially the number of operating system threads that are permitted to run Go code concurrently.  When a goroutine is ready to run, the scheduler permits it to run if there are fewer than GOMAXPROCS threads running.  That is true whether or not a goroutine is locked to a thread.

This would certainly eliminate a source of bugs, but we're aware of uses both inside and outside Google that update GOMAXPROCS in reaction to containers or VMs reconfiguring the number of available effective CPUs. We can't do this before Go 2, but even in Go 2 I don't think we can do this.

@valyala you are wrong. There are good reasons to set GOMAXPROCS to > NUMCPU. The scheduler is not that good at all - it is not even preemptive!

This issue has been closed for several months, please do not consent further.
We don't the issue tracker to ask questions. Please see https://golang.org/wiki/Questions for good places to continue this discussion. Thanks.


Themes aren't escaping control characters properly?

Hey all,
First, thanks for bash-it, it's really been helpful! I have one bug I can't seem to figure out. FWIW, i'm running a terminal on OSX (mavericks) and sshing into a Centos5 machine (bash version 3.2.25(1)-release-(x86_64-redhat-linux-gnu)). With all of the themes I've tried (~5 of them), long command lines aren't properly line wrapped. I'm not sure of the best way to describe it, so I'll take a few screenshots
First login screen.

up-arrow a few times to a very long command line (this works)

change directories to a deep subdirectory within a git repository

up-arrow to the same command line (note the beginning of the line is off)

go down and up twice (bash miscounts the line again and moves up the terminal window)

Is it possible that the scm info isn't properly escaped? I tried poking around, but nothing jumps out at me.

It looks like the color codes are causing grief as well particularly with the 'pure' theme. Setting LC_ALL doesn't resolve the issue. I think the issue is they are non printable and related to http://tldp.org/HOWTO/Bash-Prompt-HOWTO/nonprintingchars.html

Just ran into this problem while using the bobby theme, with the following plugins:
plugins:

base
explain
extract
osx
rvm
ssh

Line wrapping works fine when I'm using it on OSX Mavericks 10.9.5 with OS-shipped version of bash:
bash --version
GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.

However, after starting a docker-machine VM, with shared /Users folder... I can run a docker container based on CentOS 7, and because my home directory is mounted inside, it sources my .bashrc, including ~/.bash_it/bash-it.sh.  Inside the container environment, I notice that long lines are not wrapping properly, and the bobby theme includes some 3-byte chars such as ☆, and depending on git status for the directory I'm in, either one of: ✗ or ✓.
When I put export LC_ALL=en_US.UTF-8 in my ~/.bashrc and re-run the Docker container, line wrapping works fine!
So the reason I'm posting this is to add my own testing results for LC_ALL=en_US.UTF-8 fixing it on CentOS 7, and to suggest that docker is a good way to test bash-it against different Unix platforms & bash versions.
Tested against docker image based on the official CentOS 7 image (FROM centos:centos7):
$ CentOS Linux release 7.1.1503 (Core)
$ bash --version
GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.

I added a note to the README about this, so I will close the issue.
Thanks!

:+1:

Started getting the bad line wrapping behavior again in an Ubuntu 14.04.3 LTS container, this time with error message:
bash: warning: setlocale: LC_ALL: cannot change locale

To fix it, I had to do this:
sudo apt-get update;  sudo apt-get upgrade -y locales

sudo locale-gen en_US.UTF-8
echo LANG=en_US.UTF-8 | sudo tee /etc/default/locale


moving CONTRIBUTING.md to root

Moved contributing.md to root so internal github link works

Codecov Report

Merging #24 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev      #24   +/-   ##
=======================================
  Coverage   27.00%   27.00%
=======================================
  Files          14       14
  Lines         400      400
  Branches       55       55
=======================================
  Hits          108      108
  Misses        292      292

Flag
Coverage Δ

#unittests
27.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out 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 96d7b1b...fb24b72. Read the comment docs.


Addition of extend for newRowClasses

Allows for creation of extension of row classes in gridfield.

+1 I was thinking about exactly the same!

Ping

I guess someone needs to re-create this themselves...

Can you squash please?

we can do it our selves now! yay

Yeah from me too! I hadn't made the time yet to re-look up how to squash.


capital letter in seed phrase on mobile

Overview
On mobile, when a seed phrased is imported , an error appears if the first word starts with a capital letter. The error says that each word must be separated by a space, doesn't say anything specific about caps / no caps.
References and additional details

go to app.shapeshift.com on mobile
click connect wallet, choose native, click import wallet.
type out your seed phrase and put a capital letter in one of the words.
notice the error ,"Enter your secret recovery phrase with a single space in between words. Omit commas, returns, or any additional characters."

Does not mention anything about capital letters.

Acceptance Criteria
The error should mention something about uppercase and lowercase letters.
Need By Date
No response
Screenshots/Mockups

Ownership

[X] If my bounty needs engineering or needs product I have added the respective labels on the right
[X] As the sponsor of this bounty I will review the changes in a preview environment (ops/product) or review the PR (engineering)

Estimated effort
No response
Sponsor / Stakeholder
No response
Bounty Hunters

Join our discord
Include an expected timeline for you to complete work in the work plan when you apply for this bounty!
Please refer to this link for some basic info
Please do not start work on this issue until you are approved in Gitcoin.

Possible alternate solution: trim() the string and run toLowerCase() on it.


Growing buffer validation error upon adding many conducting equipment in a big project

Describe the bug
Upon adding many conducting equipment in the project leads to growing buffer validation error in OpenSCD version 0.31.0
To Reproduce
Steps to reproduce the behavior:

Import .scd file that is larger than the size of 45MB.
Add minimum of three conducting equipment's (one CB and two disconnectors for example) for more than two bays in a project.
Growing buffer validation error upon adding many conducting equipment in the project
See error below in the attachments

Expected behavior
There should be ho validation errors
Screenshots

Desktop (please complete the following information):

OS: [e.g. Microsoft Windows 10 Enterprise
Browser [\Microsoft Edge)
Version [Version 113.0.1774.35 (Official build) (64-bit]

Additional context
Add any other context about the problem here.

Thanks for the report!

I think this is an indicator that overall system memory is becoming constrained - I'd suggest closing tabs or other applications which should free up memory to allow the validator to perform.
It's not (shouldn't be) related to ConductingEquipment specifically, more the overall size of the SCL file and the memory of the system. I occasionally have this problem when I have an application leaking memory.
However I don't often try to use SCL files of 45 Mb which is about where performance starts to become an issue in OpenSCD at the moment (I tested with file of about 30 Mb from time to time).

@danyill Thanks for your feedback and I understand this is definitely related to the system memory.
I tried to monitor the memory usage from the task manager side by side, noticed that the CPU memory hits 100% all of the sudden that leads to the problem reported.
I tried to stop the unused services and closed all the other apps except running OpenSCD.
This unwanted error sometimes leads to crashing of OpenSCD,all of the sudden all the work done is disappeared and went in vain.
This sometime demotivates the OpenSCD users.
I have one .SCD file that is around 600MB and I am not even able to open it in OpenSCD

I would appreciate the developer to provide the system requirements in the Wiki area for the better performance of OpenSCD

How much Gb memory do you have in your computer?
Chrome supports upto maximal 256 Mb size.
You can send you error files to your collegues @microjacobon  for testing.
What brand of IED's are in the SCD files?

Suggestions to fix this:

Optimalisation of code
Auto-save

TIL that even if you have plenty of memory there must also be adequate disk space. I have a 32 Gb RAM system and I had about 5-8 Gb of memory free but the validator was failing. It was because I had poorly managed my spare disk space and it was very low (like 5 Mb!). Once I made more disk space available it behaved fine with, say, 40 IEDs.

Without an example file or a specific use case I'm not sure this is actionable. @microjacobon do you have some comments or feedback on where the issue is here and whether it is reproducible?

@arulrajirudayasamy is this solved now?


Failure to parse ROM names with "$" symbol

I got a LUA error (unfortunately no screenshot) when Scrappy tried to parse GBA ROM name "WarioWare - Mega Microgame$!". I believe it fails to escape special symbols.

Hopefully this is fixed in the newest version.
https://github.com/gabrielfvale/scrappy/releases/tag/v1.1.0


Pivot Table v2, can't show subtotals based on a single column

In the example shown in the picture, I'm extracting prices (column 'Importo') and a delta %. When showing subtotals, I need the sum of prices, but when selecting SUM as aggregate function, it calculates even the sum of the delta, that doesn't make sense.
Is it possible to aggregate on a single column? Even leaving other values empty and showing only the one associated to the aggregate function
Screenshots

Yes, it's how you said. The sum of pricing is good and the sum of the delta doesn't make sense..
In my opinion, if there was the possibility to aggregate on a single set of column (in this case the sum of pricing), the other columns in the subtotal can even be left empty.
In my case specifically, the red box can be left empty because the value that I have to see in the subtotal is the sum of prices.
Thanks for the response!

Hmmm... to do what you ask here would mean either building a dynamic control panel section with display options for each metric you've added (kind of like the "Customize Columns section of the Table controls, pictured below), or additional (chart-specific) options for each item in the Metrics control. I don't think we have plans to do either right now, bur if you're passionate about this, you might want to look at how the Table controls are built and consider opening a PR based on that if you're interested in contributing to the codebase.

Even I would like to have this feature in superset!

I support this issue. The same problem - I don't need total sum where there is % sign in metric column and there isn't possibility to cancel total sum for specific columns. However, for column as shipment or plan (without % sign) it's ok to sum each month result for annual total.
Addition: is it possible to bold pivot table borders? maybe is there issue on this topic?
Thanks

This issue has been quiet for quite a while, so I'll close it in favor of https://github.com/apache/superset/issues/23560, which links to the other similar reported issues. This thread still has a lot of useful context, so thank you for reporting it here and I hope it serves in helping someone tackle the problem. To say what everyone says in open source, contributions welcome/encouraged!


[log] View log repeat output

What kind of request is this (question/bug/enhancement/feature request):
bug
Steps to reproduce (least amount of steps as possible):
Enter the rancher dashboard
Choose a deployed deployment
Click on the corresponding pod
Select view logs in the pod operation
At this time, the window will print the log normally
But after clicking the settings button in the lower right corner to select the previous container and cancel it, you will find that the console will repeatedly output the same log twice
Repeat this operation, each time the console will add the same log output
Result:
The same line of log will be output multiple times
Other details that may be helpful:
My guess is that a new data channel is established for each operation, and the identity of the channel established each time is the same, so there is a situation of data superimposition.
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI):v2.5.7
Installation option (single install/HA):single install

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported): Infrastructure Provider
Machine type (cloud/VM/metal) and specifications (CPU/memory): cloud  cpu：2 * Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz  mem：8G
Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:23:52Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8+k3s1", GitCommit:"6b595318666804506c19cfc3d3d228423d38fab1", GitTreeState:"clean", BuildDate:"2020-08-14T20:42:29Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}

Docker version (use docker version):

no docker, with containerd

This was fixed already for 2.5.8, the old connection wasn't closed before opening a new one.

this is not reproducible on v2.5-head (7002499):
Steps to reproduce (least amount of steps as possible):

Enter the rancher dashboard
Choose a deployed deployment
Click on the corresponding pod
Select view logs in the pod operation
At this time, the window will print the log normally
But after clicking the settings button in the lower right corner to select the previous container and cancel it,

PR: https://github.com/rancher/dashboard/pull/2661


Allow documentation doesn't explain what happens with multiple allow keys

Documentation here: https://datasette.readthedocs.io/en/0.45/authentication.html#defining-permissions-with-allow-blocks
Doesn't explain that with the following "allow" block:
{
  "allow": {
    "id": "simonw",
    "role": "staff"
  }
}

The rule will match if EITHER the id is simonw OR the role includes staff.
The tests are missing this case too: https://github.com/simonw/datasette/blob/028f193dd6233fa116262ab4b07b13df7dcec9be/tests/test_utils.py#L504
Related to #906

It might be good to have a little interactive tool which helps debug these things, since there are quite a few edge-cases and the damage caused if people use them incorrectly is substantial.

Actually that is already covered here:
https://github.com/simonw/datasette/blob/6be5654ffab282e8cf39cc138ba2d4496ebc7407/docs/authentication.rst#L158


[WIP] rarcrack: init at 0.2

build works on NixOS.
i still have strange problems on darwin:
unibook:nixpkgs davidak$ nix-env -i rarcrack -f ~/code/nixpkgs/
installing ‘rarcrack-0.2’
these derivations will be built:
  /nix/store/2d2rh4mawpp43r95kwjqlbx4dalshx9m-rarcrack-0.2.drv
building path(s) ‘/nix/store/h60z799j3mmk616mn6gbwn000j95n2qx-rarcrack-0.2’
unpacking sources
unpacking source archive /nix/store/60lvm53cxwncw1i5wsdp946cm13v9z3n-rarcrack-0.2.tar.bz2
source root is rarcrack-0.2
setting SOURCE_DATE_EPOCH to timestamp<PHONE_NUMBER> of file rarcrack-0.2/README
patching sources
configuring
no configure script, doing nothing
building
make flags: SHELL=/nix/store/8m9j9nzm9kjasvw6ipa55vxr6i0rhvvd-bash-4.3-p42/bin/bash
gcc -pthread rarcrack.c `xml2-config --libs --cflags` -O2 -o rarcrack
/nix/store/8m9j9nzm9kjasvw6ipa55vxr6i0rhvvd-bash-4.3-p42/bin/bash: gcc: command not found
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 127
builder for ‘/nix/store/2d2rh4mawpp43r95kwjqlbx4dalshx9m-rarcrack-0.2.drv’ failed with exit code 2
error: build of ‘/nix/store/2d2rh4mawpp43r95kwjqlbx4dalshx9m-rarcrack-0.2.drv’ failed

p7zip is packaged, the actual 7zip only works on Windows.

@jgillich i searched for 7zip and found nothing. thank you!

it needs file as a dependency, i added it but it don't work. file alone works.
[davidak@nixos:~/Downloads]$ file test.rar
test.rar: RAR archive data, vf,

[davidak@nixos:~/Downloads]$ rarcrack test.rar
RarCrack! 0.2 by David Zoltan Kedves<EMAIL_ADDRESS>
INFO: detected file type:
ERROR: Couldn't detect archive type

it works when you set type manually. (on NixOS)

You need to either add file to PATH using makeWrapper, or patch the path in the source code.

the source code has no special path. from rarcrack.h: const char CMD_DETECT[] = "file -i -b %s"; //this command return what is the file mime type
shouldn't it be enough to have it as an input on the first line like unrar etc?

also don't work :/


dtype for array construction can not be passed as string in nopython context

from numpy import zeros
from numba import njit
@njit
def test():
    return zeros(10, dtype='int32')
test()

Fails with:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/numba/compiler.py", line 249, in run
    stage()
  File "/usr/local/lib/python2.7/dist-packages/numba/compiler.py", line 475, in stage_nopython_frontend
    self.locals)
  File "/usr/local/lib/python2.7/dist-packages/numba/compiler.py", line 799, in type_inference_stage
    infer.propagate()
  File "/usr/local/lib/python2.7/dist-packages/numba/typeinfer.py", line 613, in propagate
    raise errors[0]
TypingError: Invalid usage of Function(<built-in function zeros>) with parameters (int64, str)
 * parameterized
File "<ipython-input-1-5e362d305d47>", line 5

Failed at nopython (nopython frontend)
Invalid usage of Function(<built-in function zeros>) with parameters (int64, str)
 * parameterized
File "<ipython-input-1-5e362d305d47>", line 5

As I'm trying to pass the dtype around as a variable, unfortunately I can't just use the appropriate numpy dtype, as again, it can't be used in nopython context. ( usecase, see https://github.com/numba/numba/issues/1818 )

Same issue, here

As this works nowadays, I'd be fine with closing the issue, even if the original still doesn't work.
from numpy import zeros
from numba import njit
@njit
def test():
    return zeros(10, dtype=np.int32)
test()

Hello,
What is @njit  ?
Thanks

Michael<EMAIL_ADDRESS>Saturday, October 29, 2016 8:06 AM
As this works nowadays, I'd be fine with closing the issue, even if
the original still doesn't work.
from numpy import zeros
from numba import njit
@njit
def test():
return zeros(10, dtype=np.int32)
test()
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/numba/numba/issues/1819#issuecomment-257049300,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AR10p4d_NE2J3FwSeOpVVpiW4QTJRgwGks5q4n_4gaJpZM4IDnOk.

njit is equivalent to jit(nopython=True)

Closing as #2201 is now tracking the dtype as string issue.


PUT /store/algorithms  does not add version to ETCD /algorithms/versions/

HKube micro-service
API server
Describe the bug
when adding a new version using PUT /store/algorithms (image algorithm) the process should add the added version to the ETCD /algorithms/versions/
Expected behavior
A clear and concise description of what you expected to happen.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

tested on
systemVersion: "v2.0.22",
fullSystemVersion: "v2.0.22-1606139142985",