[C++] Performance of numeric casts

A simple numeric cast in pyarrow / Arrow C++ seems to be quite a bit slower compared to numpy. Often Arrow does more work (safe casting, handling nulls, ..), but I also see this this for a plain unsafe int64 -> float64 cast of a 1d array without nulsl, where Arrow is almost 4-5x slower than numpy. For a simple operation like that, this seems an unexpected big difference.
The python code I used to compare both:
import numpy as np
import pyarrow as pa

nrows = 10**5
arr_np = np.random.randn(nrows*20).astype("int64")
arr = pa.array(arr_np)

%timeit arr_np.astype("float64")
# 1.1 ms ± 2.69 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
%timeit arr.cast(pa.float64(), safe=False)
# 4.7 ms ± 10.9 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

I see this both with my local development version as with released conda packages.

Looking into the inner loop in both Arrow and numpy, it seems to be quite similar. In numpy, almost all time is spent in _aligned_contig_cast_long_to_double, which essentially boils down to:
    npy_intp N = dimensions[0];
    char *src = args[0], *dst = args[1];

    while (N--) {
        *(npy_double *)dst = ((npy_double)(*(npy_long *)src));
        dst += sizeof(npy_double);
        src += sizeof(npy_long);
    }

and in Arrow, almost all time is spent in CastPrimitive, which essentially does:
https://github.com/apache/arrow/blob/cf832b8b5dd91ca1b70519fa544f0a44ebdb3bce/cpp/src/arrow/compute/kernels/scalar_cast_internal.cc#L40-L46
Anybody any insight in why our templated C++ code is so much slower than numpy's C code? Logically it looks very similar, or would there be something in our code that prevents optimizations?

Well, this really seems to be a problem with jemalloc actually:
>>> arr = pa.array([42]*1_000_000, type=pa.int64())

>>> %timeit arr.cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
2.17 ms ± 19.5 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
>>> %timeit arr[:10_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
8.86 µs ± 41 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

>>> %timeit arr.cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
545 µs ± 6.75 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
>>> %timeit arr[:10_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
8.16 µs ± 25.2 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

>>> %timeit arr.cast(pa.float64(), safe=False, memory_pool=pa.system_memory_pool())
802 µs ± 2.23 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
>>> %timeit arr[:10_000].cast(pa.float64(), safe=False, memory_pool=pa.system_memory_pool())
8.81 µs ± 32 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)

>>> np_arr = arr.to_numpy()
>>> %timeit np_arr.astype('float64')
514 µs ± 2.54 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)

Trying to prefer mimalloc in https://github.com/apache/arrow/pull/40875

That said, even with mimalloc we're much slower that Numpy on larger arrays, so there's perhaps another issue (are we allocating a null bitmap?):
>>> arr = pa.array([42]*100_000_000, type=pa.int64())
>>> np_arr = arr.to_numpy()

>>> %timeit arr.cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
277 ms ± 636 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)
>>> %timeit arr[:10_000_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
27.6 ms ± 448 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
>>> %timeit arr[:1_000_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
557 µs ± 2.43 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)

>>> %timeit np_arr.astype('float64')
126 ms ± 177 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
>>> %timeit np_arr[:10_000_000].astype('float64')
12.6 ms ± 45.7 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
>>> %timeit np_arr[:1_000_000].astype('float64')
466 µs ± 4.85 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)

By the way, it seems the mimalloc/jemalloc really occurs for a certain range of sizes, above and below which they seem to have similar perf:
>>> %timeit arr[:250_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
77 µs ± 955 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
>>> %timeit arr[:250_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
77.1 µs ± 696 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)

>>> %timeit arr[:500_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
149 µs ± 744 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
>>> %timeit arr[:500_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
146 µs ± 197 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)

>>> %timeit arr[:1_000_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
550 µs ± 543 ns per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
>>> %timeit arr[:1_000_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
2.21 ms ± 6.7 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

>>> %timeit arr[:2_000_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
1.89 ms ± 6.83 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)
>>> %timeit arr[:2_000_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
4.92 ms ± 60.8 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

>>> %timeit arr[:4_000_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
3.76 ms ± 1.07 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
>>> %timeit arr[:4_000_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
10.3 ms ± 27.2 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

>>> %timeit arr[:8_000_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
21.9 ms ± 254 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
>>> %timeit arr[:8_000_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
22 ms ± 128 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

>>> %timeit arr[:16_000_000].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
41.6 ms ± 21.6 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
>>> %timeit arr[:16_000_000].cast(pa.float64(), safe=False, memory_pool=pa.jemalloc_memory_pool())
40.4 ms ± 376 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

By the way, one can also take a look at the C++ results (with mimalloc):
CastInt64ToDoubleUnsafe/524288/1000     148707 ns       148677 ns         4705 items_per_second=3.52635G/s null_percent=0.1 size=524.288k
CastInt64ToDoubleUnsafe/524288/10       148746 ns       148718 ns         4601 items_per_second=3.5254G/s null_percent=10 size=524.288k
CastInt64ToDoubleUnsafe/524288/2        148716 ns       148681 ns         4709 items_per_second=3.52625G/s null_percent=50 size=524.288k
CastInt64ToDoubleUnsafe/524288/1        149002 ns       148976 ns         4699 items_per_second=3.51927G/s null_percent=100 size=524.288k
CastInt64ToDoubleUnsafe/524288/0        146288 ns       146262 ns         4783 items_per_second=3.58459G/s null_percent=0 size=524.288k

and compare them with a corresponding Python benchmark:
>>> %timeit arr[:524288].cast(pa.float64(), safe=False, memory_pool=pa.mimalloc_memory_pool())
153 µs ± 1.82 µs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)

and then to Numpy:
>>> np_arr = arr.to_numpy()
>>> %timeit np_arr[:524288].astype('float64')
153 µs ± 5.48 µs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)

They are all very similar (~150 µs per iteration, despite different levels of internal boilerplate).

import numpy as np
import pyarrow as pa

results = []
for exp in range(N,10):
    N = 10**exp
    arr = np.random.randint(0, 100, size=N)
    res = %timeit -o arr.astype("float64")
    results.append((N, "numpy", res.average))
    arr = pa.array(arr)
    for pool in [pa.mimalloc_memory_pool(), pa.jemalloc_memory_pool(), pa.system_memory_pool()]:
        res = %timeit -o arr.cast(pa.float64(), safe=False, memory_pool=pool)
        results.append((N, f"pyarrow ({pool.backend_name})", res.average))

df = pd.DataFrame(results, columns=["N", "backend", "time"])

import seaborn.objects as so
so.Plot(df, x="N", y="time", color="backend").add(so.Line()).scale(y="log", x="log").show()

It's indeed a specific size of data where jemalloc is performing worse, and it was just that size as I was testing in the OP ..
For larger data, the different allocators give the same result, but it's still around 2x slower than numpy (eg for the 10^9 size, 2.3 vs 1.3s)

Tried running smaller examples through godbolt with gcc 14.1 to see if they produced any instruction differences. I think this replicates the NumPy example:
void foo() {
    char *src;
    char *dst;
    while (1) {
        *(double *)dst = ((double)(*(long *)src));
        dst += sizeof(double);
        src += sizeof(long);
    }
}

producing the following asm:
foo:
        push    rbp
        mov     rbp, rsp
.L2:
        mov     rax, QWORD PTR [rbp-8]
        mov     rax, QWORD PTR [rax]
        pxor    xmm0, xmm0
        cvtsi2sd        xmm0, rax
        mov     rax, QWORD PTR [rbp-16]
        movsd   QWORD PTR [rax], xmm0
        add     QWORD PTR [rbp-16], 8
        add     QWORD PTR [rbp-8], 8
        jmp     .L2

and this typifies the C++ example:
void foo() {
    using OutT = double;
    using InT = long;
    const InT* in_values;
    OutT* out_values;
    for (;;) {
        *out_values++ = static_cast<OutT>(*in_values++);
    }
 }

producing the following asm:
foo():
        push    rbp
        mov     rbp, rsp
.L2:
        mov     rax, QWORD PTR [rbp-8]
        lea     rdx, [rax+8]
        mov     QWORD PTR [rbp-8], rdx
        mov     rax, QWORD PTR [rax]
        pxor    xmm0, xmm0
        cvtsi2sd        xmm0, rax
        mov     rax, QWORD PTR [rbp-16]
        lea     rdx, [rax+8]
        mov     QWORD PTR [rbp-16], rdx
        movsd   QWORD PTR [rax], xmm0
        jmp     .L2

Maybe the processor just handles the add instructions more effectively than the lea / mov combination in the C++ example?
FWIW if you change the C++ code to do the pointer increment in subsequent expressions rather than doing inline, the asm generated matches the C examples:
void foo() {
    using OutT = double;
    using InT = long;
    const InT* in_values;
    OutT* out_values;
    for (;;) {
        *out_values = static_cast<OutT>(*in_values);
        out_values++;
        in_values++;
    }
 }

Maybe there is also the possibility to use memcpy in the case where sizeof(OutT) == sizeof(InT) to help boost performance?

Ah sorry - ignore that comment


Status bar does not show updates

When I change my program and I know it's busy verifying, the status bar stays empty. If it fails to verify it will change to "Verification failed" when its done verifying.
Logging shows that status bar update messages are coming in from the language server, but the IDE doesn't seem to use them. I'm using the v2.1.1 Dafny extension from dafny-lang.
[Trace - 12:15:28 PM] Received notification 'dafny/compilation/status'.
Params: {
    "uri": "file:///Users/rwillems/Documents/Notes/DafnyExamples/temp.dfy",
    "version": 4,
    "status": "VerificationInProgress",
    "message": "SquareRoot2NotRational2"
}

[Trace - 12:15:28 PM] Received notification 'dafny/compilation/status'.
Params: {
    "uri": "file:///Users/rwillems/Documents/Notes/DafnyExamples/temp.dfy",
    "version": 4,
    "status": "VerificationInProgress",
    "message": "GetConstant"
}

I'm guessing that's because you're using Dafny from master but the extension from the VSCode store.  The current extension doesn't understand the notifications that the master branch of Dafny sends, so it displays nothing instead.
I guess we could condition these new notifications on an explicit feature tag sent by the client.

And if we publish a new extension version now, will the status bar be broken unless someone upgrades to the latest Dafny?

I guess we could condition these new notifications on an explicit feature tag sent by the client.

I think we should.
Given that new protocol versions are introduced by the server and not the client(s), I think it's better to have the server adapt to the protocol version supported by the client, then ask client(s) to support both the current and upcoming protocol versions of the server.

And if we publish a new extension version now, will the status bar be broken unless someone upgrades to a new enough Dafny?

No, it shouldn't be.

I think we should.

OK, I'll prepare a patch


Update AzVolumeAttachment controller replica management logic

What type of PR is this?
/kind design

What this PR does / why we need it:
updates replica management logic for AzVolumeAttachment controller.
adds convergence test to controller test suite
Which issue(s) this PR fixes:

Fixes #21
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[x] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
this PR requires further investigation on whether this logic update is going to be beneficial performance-wise.
Release note:
none

Pull Request Test Coverage Report for Build 727694632

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 73.105%

Totals

Change from base Build 727245032:
0.0%

Covered Lines:
2180

Relevant Lines:
2982

💛  - Coveralls


[rcore] [web] Add implementation to GetWindowScaleDPI() for PLATFORM_WEB

Ref: doc, #4525. The PR can be tested with:
#include "raylib.h"
int main(void) {
    InitWindow(800, 450, "test");
    SetTargetFPS(60);
    while (!WindowShouldClose()) {

        const Vector2 scale = GetWindowScaleDPI();

        BeginDrawing();
        ClearBackground(RAYWHITE);
        DrawText(TextFormat("scale %fx%f", scale.x, scale.y), 20, 20, 20, BLACK);
        EndDrawing();
    }
    CloseWindow();
    return 0;
}

@asdqwe Thank you very much for the addition!
BTW, I saw your closed PR about GetMonitorScale() but you were to fast at closing it; yes, it was same as GetWindowScaleDPI(). Actually, I'm thinking if GetMonitorScaleDPI() could be a better naming for it. Something to consider in a future...
As a side note, there is an open Discussion to refactor fullscreen modes that could be somewhat related to High-DPI windowing. Definitely not an easy problem considering all the possible configurations and platforms.


Create top-level documentation

The document structure sent by e-mail is in documentation/docs/main.rst of the branch top-lvl-#1. Intersphinx was configured to reference other project's docs.

Structure created.
Now we need to add content to the given structure.


Visible all window/frame

First of all, thanks for your great job!!
Is there possibility when we use the button show the graph, it fills all text editor area size with a custom shortcut?

Thanks! As far as I know this kind of behavior is not currently supported by the Joplin window system.

If you resize the editor panel to be as small as possible while the graph panel is showing, later when you toggle the graph on, it will take up most of the editor space you indicated, though it's not 100%. The note tab and the top of the editor panel with the title will still show but I think that's pretty usuable amount of space.

The new release should fix the resizing issue.

Having a plugin panel going fullscreen is not supported at this time so I will close this issue.


Use internalization key instead of hardcode

Fix hardcoded Edit condition text on existing internalization key ConditionEditor.EditCondition.Label

Thanks.

This patch has been merged to the upstream too (https://github.com/pentaho/pentaho-kettle/pull/5836).


bolt fails if hiera-config is specified but doesn't exist

Describe the Bug
When running bolt puppetfile install on a new module, an error occurs if the bolt.yaml contains a hiera-config key, but the file path that it points to doesn't exist.
Expected Behavior
Silently ignore the missing hiera config, similar to the behavoir when specifying inventory and that file not existing.
Steps to Reproduce
Steps to reproduce the behavior:

Create a new bolt.yaml

hiera-config: "/path/that/doesnt/exist/hiera.yaml"

Run bolt

bolt puppetfile install

Get error

$ bolt puppetfile install
Traceback (most recent call last):
        10: from /opt/puppetlabs/bolt/bin/bolt:23:in `<main>'
         9: from /opt/puppetlabs/bolt/bin/bolt:23:in `load'
         8: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/exe/bolt:9:in `<top (required)>'
         7: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/cli.rb:118:in `parse'
         6: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/config.rb:51:in `from_boltdir'
         5: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/config.rb:51:in `new'
         4: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/config.rb:88:in `initialize'
         3: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/config.rb:280:in `validate'
         2: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/config.rb:280:in `raise'
         1: from /opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/config.rb:280:in `exception'
/opt/puppetlabs/bolt/lib/ruby/gems/2.5.0/gems/bolt-1.31.1/lib/bolt/error.rb:130:in `initialize': wrong number of arguments (given 1, expected 2) (ArgumentError)

Environment

Version: 1.31.0
Environment: RHEL 7.7

I predict an issue 3 months from now "Bolt silently ignores hiera-config if it has a typo"...
Does your workflow here involve later creating a hiera.yaml in that location or are you just using a standard bolt.yaml with a hiera config that may or may not exist? Would it be reasonable to warn if the path is specified but doesn't exist? I would imagine the warning will be annoying if this state is going to persist, but not so much of a problem if you're going to create hiera.yaml shortly afterward.

I would even be ok if it straight up errored out with a meaningful error, rather than failing with a cryptic stacktrace.

Oh to be honest I didn't even really look at the stacktrace. That's bad. I opened https://github.com/puppetlabs/bolt/pull/1266 to fix that part.
Now you'll get Could not read hiera-config file /path/to/nonexistent/file

We think, for the most part, if you have hiera-config defined but no file that's more likely a mistake than intended behavior. Going to close this since the error message is correct now!


Add Bermudan vs European test case for Expected Exposure

This PR adds a component test to compare expected exposures of Bermudan swaption and co-terminal European swaptions.

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

Comparison is base (171a1b0) 98.97% compared to head (7d5a56e) 98.97%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #47   +/-   ##
=======================================
  Coverage   98.97%   98.97%
=======================================
  Files          59       59
  Lines        2934     2934
=======================================
  Hits         2904     2904
  Misses         30       30

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


[WIP] Add deposit.all endpoint

Addresses #1133
Work in progress ...

Coverage increased (+0.09%) to 78.261% when pulling 84cdb46170e3e90af4034f116522367b17e8ab19 on add-deposit-exit-endpoints into 6e178d27b64d8a452742923cd83a9fa1171c46ed on master.

And Swagger specs updated


add jwt reflect and resource config to support jwt authentication type

Native image can be build with jwt support and started. I got some errors when I tried to save a user (entity) but I seemed unrelated. Will open another issue for that.
@alina-yur especially for you
closes #48

this will be very helpful, thank you, @atomfrede!👏

Looks like the threadpool for sending mails async is not working properly (non webflux). Going to investigate today. Besides that it looks quite well.

Very strange, after I disabled async mail sending, the thymeleaf template can't be compile, because of an error with org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "locale.language". Which is confusing as we have the same template with webflux and I can see there is a locale (which has of course a public getLanguage method).

Seems I found a solution. Let me update the PR

@mraible There seems to be an issue with macos ci. Will restart the failed builds, but everything works fine, now also with JWT 🎉

I have fixed remaining issues with webflux and reflect config. Macos build is working fine locally, so as @mshima said flaky environment. I would say let's merge it and create a new release.

bounty claimed https://opencollective.com/generator-jhipster/expenses/91302


quake api is not working on windows

=> uncover.exe   -qk  'google.com'  -v     -config /provider-config.yaml
=> [quake] json: cannot unmarshal string into Go struct field Response.code of type int
api key is 100% correct and working

having similar issues on kali.
some requests go through, some give an error

@tk-t0n0y fixed in latest release - https://github.com/projectdiscovery/uncover/releases/tag/v1.0.4


Unable to properly ignore/exclude files for transformation

Steps to reproduce
I'm trying to use Pigment CSS in a project that uses decorators and TextDecoder/TextEncoder.
However this doesn't work because WYW-in-JS uses Babel.
If I add the @babel/plugin-proposal-decorators I now get an error saying that TextDecoder is not defined.
These files are part of separate libraries and not part of the main application.
Here's what I've tried without any luck:

Installing the libraries as packages in node_modules.
Using the exclude option only tells the Vite plugin to ignore certain files, but that doesn't affect WYW-in-JS because it still resolves the imports for those files and tries to transform them.

If I modify the source code https://github.com/Anber/wyw-in-js/blob/d3c2791adacd7c20e8ace2417fae5aab5fce7814/packages/transform/src/transform/generators/resolveImports.ts#L108 to exclude these imports I end up with a Babel transform failed error.

Excluding files from Babel transformation results in a Babel transform failed error.
Adding a custom ignore rule using the rules option completely breaks the plugin causing it to not transform anything at all.

Here's my vite.config.ts.
import { defineConfig } from 'vite';
import { nxViteTsPaths } from<EMAIL_ADDRESS>import { vitePlugin as remix } from '@remix-run/dev';
import { remixPWA } from '@remix-pwa/dev';
import { join } from 'node:path';
import { workspaceRoot } from '@nx/devkit';
import tailwindcss from '@tailwindcss/vite';
import { pigment } from '@pigment-css/vite-plugin';
import { createTheme } from '@mui/material';
import { deepkitType } from '@deepkit/vite';

const buildDirectory = join(workspaceRoot, 'dist/apps/web');

const isProd = process.env.NODE_ENV === 'production';

const __dirname = import.meta.dirname;

const transformLibraries = ['@mui/material', '@mui/material-pigment-css', '@pigment-css/react'];

export default defineConfig({
  root: __dirname,
  base: './',
  cacheDir: join(workspaceRoot, 'node_modules/.vite/apps/web'),
  css: {
    transformer: 'lightningcss',
    lightningcss: {
      drafts: {
        customMedia: true,
      },
    },
  },
  plugins: [
    tailwindcss(),
    deepkitType({
      tsConfig: join(__dirname, 'tsconfig.json'),
      compilerOptions: {
        sourceMap: true,
      },
    }),
    remix({
      buildDirectory,
      future: {
        v3_fetcherPersist: true,
        v3_relativeSplatPath: true,
        v3_throwAbortReason: true,
        // unstable_singleFetch: true,
        unstable_optimizeDeps: true,
        unstable_lazyRouteDiscovery: true,
      },
    }),
    isProd &&
      remixPWA({
        buildVariables: {
          'process.env.REMIX_APP_VERSION': '',
          'process.env.MEDIA_HOST': '',
        },
      }),
    nxViteTsPaths({ buildLibsFromSource: !isProd }),
    pigment({
      transformLibraries: ['@mui/material'],
      theme: createTheme({
        cssVariables: {
          colorSchemeSelector: 'media',
        },
        defaultColorScheme: 'dark',
      }),
      // adding rules breaks the plugin
      rules: [
         {
           test: filename => !filename.endsWith('.tsx') &&
             !filename.endsWith('.css') &&
             !transformLibraries.some(packageName =>
               filename.includes(packageName),
             ),
           action: 'ignore',
         },
       ],
    }),
  ],
  build: {
    commonjsOptions: {
      include: ['@mui/utils', '@toolpad/core'],
    },
  },
  ssr: {
    noExternal: [/@mui/, /@pigment-css/, '@toolpad/core'],
  },
  server: { middlewareMode: true },
  test: {
    setupFiles: [join(__dirname, 'test-setup.ts')],
    watch: false,
    globals: true,
    environment: 'jsdom',
    include: [
      join(__dirname, 'tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'),
    ],
    reporters: ['default'],
    coverage: {
      reportsDirectory: join(workspaceRoot, 'coverage/apps/web'),
      provider: 'v8',
    },
  },
});

Search keywords: rules, decorators, exclude, ignore

@brijeshb42 it doesn't, and even if it did, it would stil be a workaround.

I had to do some dirty hack to make pigment work with some files it was complaining about, something like this:
  babelOptions: {
    babelrc: true,
    plugins: [
      [
        "module-resolver",
        {
          alias: {
            "@": "./src",
            "@/lib/utils/enum": "./src/_empty",
          },
        },
      ],
    ],
  },

When _empty.ts is this:
const empty = {};

export default empty;

Its sole purpose is to replace files pigment complains about using module-resolver.
I also had to write this babel plugin for some other cases (like next-auth) to make pigment ignore them:
"use strict";

module.exports.__esModule = true;
module.exports.default = function ignoreModules({ types: t }) {
  return {
    visitor: {
      Program(path, state) {
        const { filename } = state.file.opts;
        const { entryPoints } = state.opts;

        if (entryPoints.some((entryPoint) => filename.endsWith(entryPoint))) {
          path.node.body = [
            t.variableDeclaration("const", [
              t.variableDeclarator(t.identifier("value"), t.valueToNode({})),
            ]),
            t.expressionStatement(
              t.assignmentExpression(
                "=",
                t.memberExpression(
                  t.identifier("module"),
                  t.identifier("exports"),
                ),
                t.identifier("value"),
              ),
            ),
          ];
        }
      },
    },
  };
};

But I think it's not needed when transformLibraries is set correctly.


MACD  reports 0 activity (Kraken dataset XLM/USD)

Hello¡
just installed, first trials on default strats with default settings.
Every strat reports activity but MACD. It reports 0 (fictionall) trades. Both with defaults and custom settings.
Used three month, kraken, xlm-usd dataset.
would it be a bug? I'm worried about integrating MACD with other indicators if it is not working (can't see the supossed/expected bug by myself)
thanks¡

Would you mind posting something we can reproduce this with? For example what strategy you tried and some market data (from history folder). That way we can reproduce and have a look at your exact situation.

Sure, sorry.
Used MACD strat with default settings, with different candle size and warm-up periods.
Attached will find binance data from history folder and some screen shots.
thanks¡
history.zip

should this post be in the forum instead of here, shouldn't it?

I have the same issue with MCAD for poloniex:BTC:LTC

Ok after some testing, seems this issue is related only to Gekko-datasets.
So if I'am testing datasets what were imported with gekko directy from exchanges, everything is fine.
But if I'am downloading datasets from Gekko-datasets as sqlite database, I'am getting in this issue for, SOME strategies, as described above.
Do you have any issues?
I tried to change gekko versions (stable 0.6.5, 0.6.4, 0.6.2, develop) they have all the same behavior, so seems it's some issue with https://github.com/xFFFFF/Gekko-Datasets

@askmike this sounds like the same issue I am having, but mine was broken with locally imported data via gekko. I didn't pull data from anywhere except the gekko importer.


[WIP] Browser push notifications

I know this repo is no longer maintained, but I figured this would be a good PR for those that are still searching how to get browser notifications working.
Please consider moving raix:push to community packages!

@wreiske should we try to revive this or start a new project? I'm more leaning towards archiving this and starting from scratch with this as potential inspiration. Thoughts? @jankapunkt


fix(admin): fix cluster/group crud api

What this PR does:
fix clusters/group crud
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

Codecov Report
Base: 36.02% // Head: 36.03% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (fa83573) compared to base (f676667).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #509   +/-   ##
=======================================
  Coverage   36.02%   36.03%
=======================================
  Files         157      157
  Lines       21576    21576
=======================================
+ Hits         7773     7775    +2
+ Misses      12959    12956    -3
- Partials      844      845    +1

Impacted Files
Coverage Δ

pkg/boot/discovery.go
28.33% <0.00%> (ø)

pkg/schema/loader.go
6.74% <0.00%> (+1.12%)
:arrow_up:

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

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


Refactor endpoints into classes

User Story
As a devops operator I would like to be able to endpoints defined as classes so that I am able to pass in dependencies.
Acceptance Criteria

Endpoints are refactored into classes and initialized in the fantasylol init file

Tech Notes

Will enable passing in a logger and initializing services with dependencies then passing in those services into the the endpoints

This isn't needed anymore.


Cannot change 'timeout' property of connection

Please first make sure you have looked at:

Documentation: https://github.com/mkleehammer/pyodbc/wiki
Other issues

Environment
To diagnose, we usually need to know the following, including version numbers.  On Windows, be
sure to specify 32-bit Python or 64-bit:

Python: 3.8.10
pyodbc: 4.0.32
OS: Linux Mint 20.1 Ulyssa
DB: MS SQL Server (don't know the year)
driver: ODBC Driver 17 for SQL Server

Issue
import pyodbc
connection = pyodbc.connect('Driver={ODBC Driver 17 for SQL Server};Server=host;Database=db;Uid=user;Pwd=pwd')
connection.timeout = 0.5
print(connection.timeout)
expected behaviour - timeout property of connection changes
observed behaviour - timeout property does not change
Often it is easiest to describe your issue as "expected behavior" and "observed behavior".

https://github.com/mkleehammer/pyodbc/blob/master/src/connection.cpp#L1071
Timeout is an integer.

Confirmed that this works correctly when timeout is specified as an integer value.
>>> import pyodbc
>>> connection = pyodbc.connect("DSN=mssqlLocal")
>>> connection.timeout
0
>>> connection.timeout = 1
>>> connection.timeout
1


Docker 1.5 and latest fail to pastebin to IRC

Using hif1/heisenbridge:latest:
heisenbridge-1  | ERROR:root:Ignoring exception from room handler. This should be fixed.
heisenbridge-1  | Traceback (most recent call last):
heisenbridge-1  |   File "/opt/heisenbridge/heisenbridge/__main__.py", line 233, in _on_mx_event
heisenbridge-1  |     await room.on_mx_event(event)
heisenbridge-1  |   File "/opt/heisenbridge/heisenbridge/room.py", line 100, in on_mx_event
heisenbridge-1  |     await handler(event)
heisenbridge-1  |   File "/opt/heisenbridge/heisenbridge/plumbed_room.py", line 257, in on_mx_message
heisenbridge-1  |     await self.relay_message(event, self.network.conn.privmsg, sender)
heisenbridge-1  |   File "/opt/heisenbridge/heisenbridge/plumbed_room.py", line 271, in relay_message
heisenbridge-1  |     await self._send_message(event, func, prefix)
heisenbridge-1  |   File "/opt/heisenbridge/heisenbridge/private_room.py", line 819, in _send_message
heisenbridge-1  |     f"... long message truncated: {self.serv.mxc_to_url(str(content_uri))} ({len(messages)} lines)",
heisenbridge-1  |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
heisenbridge-1  |   File "/opt/heisenbridge/heisenbridge/__main__.py", line 385, in mxc_to_url
heisenbridge-1  |     if not self.media_endpoint:
heisenbridge-1  |            ^^^^^^^^^^^^^^^^^^^
heisenbridge-1  | AttributeError: 'BridgeAppService' object has no attribute 'media_endpoint'

IRC only receives the first line, since the second line with the pastebin URL is obviously never sent. On Matrix side, if REACTS are enabled then the pastebin react is not shown.
If it matters (I was able to reproduce with multiple inputs), the message I sent to trigger the above message was:
```
test message so I can file a bug report
line 2
line 3
```

Everything works as expected with the 1.14 image.
If it matters, the redacted Docker compose file is:
# This compose file is compatible with Compose itself, it might need some
# adjustments to run properly with stack.

services:

  heisenbridge:
    # image: hif1/heisenbridge:latest
    image: hif1/heisenbridge:1.14
    volumes:
      - ./init/heisenbridge-init.sh:/heisenbridge-init.sh:ro
      - ./files:/data
    entrypoint: /heisenbridge-init.sh
    user: nobody
    depends_on:
      - synapse

  maubot:
    image: dock.mau.dev/maubot/maubot:latest
    restart: unless-stopped
    volumes:
      - ./maubot:/data
    ports:
      - 29316:29316
    expose:
      - 29316:29316
    depends_on:
      - synapse

  synapse:
    image: docker.io/matrixdotorg/synapse:latest
    # Since synapse does not retry to connect to the database, restart upon
    # failure
    restart: unless-stopped
    # See the readme for a full documentation of the environment settings
    # NOTE: You must edit homeserver.yaml to use postgres, it defaults to sqlite
    environment:
      - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
    volumes:
      # You may either store all the files in a local folder
      - ./files:/data
      # .. or you may split this between different storage points
      # - ./files:/data
      # - /path/to/ssd:/data/uploads
      # - /path/to/large_hdd:/data/media
    depends_on:
      - db
      - redis

  db:
    image: docker.io/postgres:12-alpine
    # Change that password, of course!
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=[REDACTED]
      # ensure the database gets created correctly
      # https://element-hq.github.io/synapse/latest/postgres.html#set-up-database
      - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
    expose:
      - 5432:5432
    volumes:
      # You may store the database tables in a local folder..
      - ./schemas:/var/lib/postgresql/data
      # .. or store them on some high performance storage for better results
      # - /path/to/ssd/storage:/var/lib/postgresql/data

  nginx:
    image: docker.io/nginx:latest
    volumes:
      - ./web:/usr/share/nginx/html:ro
      - ./nginx-conf:/etc/nginx/conf.d
      - ./certbot:/var/www/certbot:ro
      - ./letsencrypt:/etc/letsencrypt:ro
    restart: always
    # needed to read TLS certs; will downgrade itself afterward
    user: root
    ports:
      - 8448:8448
      - 443:443
      - 80:80
    depends_on:
      - synapse
      - maubot

  redis:
    image: docker.io/redis:latest
    volumes:
      - ./redis-conf:/usr/local/etc/redis
      - ./redis-data:/redis-data
    expose:
      - 6379:6379

  certbot:
    image: certbot/certbot:latest
    volumes:
      - ./certbot:/var/www/certbot
      - ./letsencrypt:/etc/letsencrypt
    depends_on:
      - nginx
    profiles:
      - dummy

Did you forget to configure media like the release notes say?

Where are these release notes hidden? They do not appear to be on GitHub or Docker Hub.

They're on GitHub in the releases section: https://github.com/hifi/heisenbridge/releases/tag/v1.15.0

May I suggest that these be made more visible in the future? Preferably I would expect to see a changelog at the top level of the repo and release notes in a subdirectory for reference.

There probably won't be any more releases before someone gets around to rewriting the bridge in Go


Enable casting shadow

I want objects to cast shadows on the map(ground) and on themselves. Looking at the code, it seems that shadows are not set for the lights...
any ideas on how to cast a shadow?

I am also looking to cast shadows on the map, thanks

Closing this as this package is no longer maintained and will be archived.
Please consider using the official @googlemaps/three instead and report feature-requests there.


Tahmina: Workflows, week 1

my fork of the exercises repo

Study Plan
Learning Objectives

[x] - 🥚 Git Remote/Local Connection: You can create a local git repository, commit changes, connect a remote repository and push changes to the remote.

[x] - 🥚 Linting: what is it? why does it matter? can write CSS & Markdown that passes a linting check

[x] - 🥚 Git Branching Workflow: You can manage your work locally using branches: pull remote changes -> create a new branch -> push the branch to the remote repository -> open a PR with passing Continuous Integration checks -> merge changes to main/master.

[x] - 🥚 Command Line Interface (CLI): You can navigate a directory, manage folders/files, make small changes in a file using nano/vim, and much more (list coming soon).

[x] - 🥚 NPM: You can install npm dependencies and use npm scripts (dev, lint and format)

[ ] - 🥚 Browser + DevTools: You can open a local HTML/CSS project in your browser and inspect the elements, emulate different devices, and inspect the source

[x] - 🥚 File Extensions: You can identify all of the languages covered at HYF and give the correct file extension. (You don't need to know the languages, just recognize them!)

[ ] - 🥚 VSCode: You can complete these workflows in VScode, and can use keyboard shortcuts when possible:

[x] Opening a repository in a new window
[x] Opening the repository in VSCode terminal
[x] Adding a new file
[x] Adding a new folder
[x] Deleting a file
[x] Deleting a folder
[x] Previewing a Markdown File
[ ] Opening an HTML file with the LiveServer extension
[ ] Viewing the repository's git history with Git Graph extension

[x] - 🐣 Touch Typing: You can write a README without looking at your keyboard to find any letters, numbers or special characters. (slowly is ok!)

[x] - 🐣 User Stories: Given pictures of a website, you can describe the page with user stories: As a type of user I can do something so that something good happens.

[ ] - 🐣 Planning and Collaborating: You can comfortably complete these steps of the Planning and Collaborating process described in the Student Guidebook:

Repository Setup
Project Definition
Communication Plan
Backlog
Wireframe

[ ] - 🐣 Development Strategies: You can work as a group to follow the steps in a development strategy and reconstruct a web page when the code is provided.

[ ] - 🐣 Atomic Commits & Feature Branches: You can organize your development process using small single-purpose commits on feature branches. You will learn to develop each of these features on a separate branch and to merge it to main/master on GitHub when the feature is complete.

[x] - 🐣 GitHub: You can create new repositories, turn on GitHub Pages, connect the repository to your local computer, push/pull different branches, and pass Continuous Integration checks for code linting and validation.

[ ] - 🐥 GitHub Collaboration: You can collaborate in a single repository and contribute a markdown file. This includes: creating a new branch, creating and editing a file on that branch, sending a pull request, addressing any requested changes, and reviewing+merging a classmate's pull request. (this can all be done from the GitHub UI)

[ ] - 🐥 Code Review: You can use a code review checklist in a Pull Request to check a classmates code before merging.

Week 2

[x] I have pushed my progress to [https://github.com/lab-antwerp-1/pc-group-5)

Check-In
I Need Help With:
What went well?
writing readme, creating project board, creating Issues and PRs,
What went less well?
timing and millstones
Lessons Learned
Sunday Prep Work


Fix TestWorld.evolveMigration

Changes and Information
Please briefly list the changes made, additional Information and what the Reviewer should look out for:

Fixed the TestWorld.evolveMigration unit test, that was most likely an issue created by #624 where new tests were added.
Removed the parameters, since they were actually not providing much and were on the wrong AgeGroup partially.

Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author

[x] Every addressed issue is linked (use the "Closes #ISSUE" keyword below)
[x] New code adheres to coding guidelines
[x] No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
[x] Tests are added for new functionality and a local test run was successful
[x] Appropriate documentation for new functionality has been added (Doxygen in the code and Markdown files if necessary)
[x] Proper attention to licenses, especially no new third-party software with conflicting license has been added

Checks by code reviewer(s)

[ ] Corresponding issue(s) is/are linked and addressed
[ ] Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.)
[ ] Appropriate unit tests have been added, CI passes and code coverage is acceptable (did not decrease)
[ ] No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)

I put p1 back to InfectedNoSymptoms to verify that this person still goes to work without symptoms.

Sorry, I also removed the std::cout stuff in my Pull Request that just got merged, looks like you need to resolve conflicts. I would have merged this first and resolved them myself, but Martin was faster :)

Sorry, I also removed the std::cout stuff in my Pull Request that just got merged, looks like you need to resolve conflicts. I would have merged this first and resolved them myself, but Martin was faster :)

No problem, I have changed this. Somehow, the formatting on some lines is different on my autosave. Not sure why that is.


Revert "Find LAPACKE and link to it"

This commit silently breaks the CI. Reverting it since we can't run/test the code with it.

Let me try another solution first.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@bb90114). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #158   +/-   ##
=========================================
  Coverage          ?   89.09%
=========================================
  Files             ?       53
  Lines             ?     2503
  Branches          ?        0
=========================================
  Hits              ?     2230
  Misses            ?      273
  Partials          ?        0

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 bb90114...d0d672e. Read the comment docs.


Create icon/thumbnail/logo for ZXLive

There is a icon for the taskbar now, but we probably want to revisit it, as I just quickly made it just to have something.


zfs receive does not work if the destination filesystem has been changed since the most recent snapshot

Error:
cat 20210607_020000.inc | zfs receive <filesystem>@20210607_020000
cannot receive incremental stream: destination <filesystem> has been modified
since most recent snapshot

zfsup restore <filesystem> 20210607_020000 doesn't return anything. If you wrap the restore command in a try except statement you'll get a BrokenPipeError. We'll want to catch that and let the user know what the problem likely is. The -F option forces a rollback to the most recent snapshot. We should add an option for that.

I've found that sometimes it returns a BrokenPipeError and other times it doesn't and the error is correctly read from stderr.


Denizen says valid tag: <context.entity.location.tc_biome.name> is invalid.

Hello,
I've written a script that uses on 'entity despawns:' this is how it looks:
NaturalMobSpawningScript:
  type: world
  debug: true
  events:
    on entity despawns:
    - define 1 <context.entity.location.tc_biome.name>
    - if <server.flag[<def[1]>ZOMBIEMaxSpawnedEntities]||false> > 0 {
      - flag server <context.location.tc_biome.name>ZOMBIEMaxSpawnedEntities:-:1
      }

Script hastebin: http://one.denizenscript.com/haste/37360
When I start up the server it gives a bunch of errors saying:
ERROR in script 'NATURALMOBSPAWNINGSCRIPT'! Tag <context.entity.location.tc_biome.name> is invalid!
While it says the following when I'm logged in and everything is started up:
Filled tag <context.entity.location.tc_biome.name> with 'TemperateFrozenPlains'.
I think that denizen currently is missing a validation for this tag as it works perfectly, it's just the startup error.
Here are the sources:
http://one.denizenscript.com/haste/37356
http://one.denizenscript.com/paste/37357
Thanks for reviewing this issue in advance!

Also, I'd like to note that this tag causes a error on startup:
http://one.denizenscript.com/haste/37447

What is <context.entity.location> returning in these cases?

Also, I'd like to note that this tag causes a error on startup:
http://one.denizenscript.com/haste/37447

...I'm confused. You didn't try the tag I asked you to, but the tag you're reporting an issue with is working just fine in that log?


Feature: IPv4 port mapping could not be defined

Users would like to expose ports on IPv4 to link different services together.

Added range validation:
    port: int = Field(ge=1, le=65535, description="Port open on by the program and to be exposed")

It would be interesting to add something such as:
class PortMapping(PublishedPort):
    """IPv4 port mapping from a public port on the host to a port on the VM."""

    # The range 49152–65535 (215 + 214 to 216 − 1) contains dynamic or private
    # ports that cannot be registered with IANA.[406] This range is used for
    # private or customized services, for temporary purposes, and for automatic
    # allocation of ephemeral ports.
    # https://datatracker.ietf.org/doc/html/rfc6335
    public_port: int = Field(ge=49152, le=65535, description="Port open routed to the service port")


[libxcrypt] Add build requirements

Fix #38372
Add message of build requirements autoconf automake libtool pkg-config from upstream README
Checklist

[x] Changes comply with the maintainer guide.
[ ] ~SHA512s are updated for each updated download.~
[ ] ~The "supports" clause reflects platforms that may be fixed by this new version.~
[ ] ~Any fixed CI baseline entries are removed from that file.~
[ ] ~Any patches that are no longer applied are deleted from the port's directory.~
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

Test
Port install tests pass with following triplets:

x64-linux

I was not able to repro the original issue. I find it unlikely that this is the solution to the original problem.

 I find it unlikely that this is the solution to the original problem.

 I'll check this out :)

I failed to realize that the original issue is on linux. I was originally skeptical because vcpkg_configure_make already prints a message and fails if it doesn't find autoconf. But it seems the script only handle automake, libtool, and pkg-config on windows. I think these changes are good to go :)

In fact it is a shame that we pollute all ports with redundant instructions for Ubuntu, Fedora, Alpine, macOS ... while everything is in one place for Windows.


Changes before manual computeChangeSet are not saved to db

Lately I was trying to find a way to know if my document's data has been changed in my own event listener (which is working before DocumentManager's flush) and I decided to use UnitOfWork's computeChangeSet method. Changes are calculated properly but later if I change something else in document then these changes are lost and only latest are saved to database (unless I explicitly call recomputeSingleDocumentChangeSet). I believe this is happening because UnitOfWorks always calculates changes, never recalculates them even if changeSet already exists. Is there any reason for this?
Here's test case failing on dev-master:
<?php

namespace Doctrine\ODM\MongoDB\Tests\Functional;

use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
use Doctrine\ODM\MongoDB\Tests\BaseTest;

class ManualComputeChangeSetTest extends BaseTest
{
    public function testAutoRecompute()
    {
        $d = new Document();
        $d->value1 = "Value 1";
        $this->dm->persist($d);
        $this->dm->flush();
        $this->dm->clear();
        $d = $this->dm->getRepository(get_class($d))->findOneByValue1("Value 1");
        $d->value1 = "Changed";
        $this->uow->computeChangeSet($this->dm->getClassMetadata(get_class($d)), $d);
        $changeSet = $this->uow->getDocumentChangeSet($d);
        if (isset($changeSet['value1'])) {
            $d->value2 = "v1 has changed";
        }
        // with next line uncommented test passes
        // $this->uow->recomputeSingleDocumentChangeSet($this->dm->getClassMetadata(get_class($d)), $d);
        $this->dm->flush();
        $this->dm->clear();
        $d = $this->dm->getRepository(get_class($d))->findOneByValue1("Changed");
        $this->assertNotNull($d);
    }
}

/** @ODM\Document */
class Document
{
    /** @ODM\Id */
    public $id;

    /** @ODM\String */
    public $value1;

    /** @ODM\String */
    public $value2;
}

Lately I was trying to find a way to know if my document's data has been changed in my own event listener (which is working before DocumentManager's flush) and I decided to use UnitOfWork's computeChangeSet method.

On which event were you listening? Is there a reason you weren't able to use getDocumentChangeSet() to access the changeset and instead thought to calculate it?
AFAIK, computeChangeSet() will always end up resetting the original document data, which means you'll lose the original changeset. recomputeSingleDocumentChangeSet() is most certainly what you'd like to use, since it will pass the necessary boolean to computeOrRecomputeChangeSet() and ensure the new changes are merged atop the existing changeset (see: here).

For the background I'm not using any of Doctrine events, I'm dispatching my own events when I'm about to save something and calling flush() at the very end of flow. Problem is that I have called manually computeChangeSet to take advantage of having something that actually can calculate change set instead of rolling my own implementation and later during flush() UoW calls computeChangeSets()

#1306 was merged, closing ticket.


Output fields of a custom processor should honor the schema definition

Right now even if a field is set to optional ("optional": true) in the output schema, the generated output schema of the stream is "optional": false. This should not be the case.
Need to check for other components as well where UI generates the output schema based on the input schema. It should honor the "optional" property.

Raised PR https://github.com/hortonworks/streamline/pull/1297

@arunmahadevan please confirm the issue has been resolved.
AFAIK the PR #1297 has been merged, so we can close the relevant issue.


Build new official image 0.0.3 from #26

Need to build a new image from PR #26 and push to official dockerhub.
Also requires chart updates to pull new image

@scr-oath I've just built a new official image including your recent changes. Would you be willing to test it?
k8srestdev/scaling:0.0.3
Would really appreciate a second pair of eyes on that 👍

Thanks! Yes, I'll reach out to get this imaged deployed soon.

I finally got around to testing this - and, with both a good and bad ss, I can see the bad one rejected and the good one come (every second :D )

Awesome. I'll get this updated in the chart and tagged as a stable build
On Fri, Nov 13, 2020 at 12:24 AM Sheridan C Rawlins <
<EMAIL_ADDRESS>wrote:

I finally got around to testing this - and, with both a good and bad ss, I
can see the bad one rejected and the good one come (every second :D )
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/West-Coast-Devops/scheduled-scaler/issues/27#issuecomment-726598792,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYS6AFQPQOQVTECDUETUALSPTUKDANCNFSM4TQAVXEA
.


Calculate the average holding time of position

My code doesn't seem to be working as expected, how do I modify it or is this completely the wrong approach.
  let curr_orders = hbt.orders(0);

  let holding_ts = curr_orders
      .iter()
      .filter(|(_, x)| x.status == Status::Filled)
      .map(|(_, x)| hbt.current_timestamp() - x.local_timestamp)
      .sum::<i64>() as f64
      / curr_orders.len() as f64;

Wouldn't it be better to compute holding time based on position changes?

Thanks for clearing up the confusion, this is a good way to calculate the holding time.


Company Page - Transaction Create should Auto Fill Company Name

Problem -

user flow - on Company Page - Ledger View - open Company Details (Transaction list with Company Filter) - Click Create new Transaction (opens Transaction create window)
End User expects that Company is selected, but they need to select Company again

Suggested Solution-

Auto Fill Company when possible

Technical Problems-

CRId and Name needs to be passed between popovers, that is not implemented everywhere
This need 2 hours of time every where this needed

Currently suggested for above flow only
Create Possibility to set for other places but completes only when required by end user
Reported by - @vinpahilwani
Verified by @mitulpanch

yes rquired

ok. currently we need it only on above suggested pages.

https://www.berrycast.com/conversations/e20ebe1d-ffc7-5cdf-b7e9-937a84744ae7


setMediaElement does render waveform and does not fire events

Bug description
I need to use the ready event together with using a custom media element, so I first create the wavesurfer, add the event and then use the setMediaElement, however this does not work, and the wavesurfer is not rendered and events are not fired. Using load() it works as expected, but I can't use load() with a custom media element.
Environment

Browser: Chrome

Minimal code snippet
const wavesurfer = WaveSurfer.create({
  container: document.body,
})

wavesurfer.on('ready', (duration) => {
  console.log('Ready', duration + 's')
})
const audio = new Audio()
audio.controls = true
audio.src = '/examples/audio/audio.wav'

wavesurfer.setMediaElement(audio) // does not work
wavesurfer.setOptions({ // does not work
  media: audio
})
wavesurfer.load(audio.src) // works

Expected result
Should fire the read event and should render the waveform using setMediaElement.

Never mind it was my mistake, I didn't load the peaks correctly


Replace Hardcoded 'UTC' Timezones with Environment Variable (If possible)

Please describe the feature you would like to see implemented.
For example I want to calculate if a store is open to given opening hours serverside, there are always problems with the timezone.
I would have simple solution for it:

Add a Environment Variable: SHOPWARE_TIMEZONE=Europe/Berlin
Replace 'UTC' with getenv('SHOPWARE_TIMEZONE')

I have seen, there are many hardcoded 'UTC' in the Core, so it would be hard to build in a system_config?
Anyway, if the suggested solution works, it would be fine.

It makes a difference if you want to analyze log files for example....
Example: prod-2021-09-06.log

@dennishei That should be a custom option of monolog https://github.com/symfony/monolog-bundle/issues/419
I am closing this as its inactive


docker-machine does not support setting the docker engine bridge IP

Currently docker-machine times out when setting the bip flag.
docker-machine create -d vmwarefusion --engine-opt bip=<IP_ADDRESS>/24 node0
Creating SSH key...
Creating VM...
Starting node0...
Waiting for VM to come online...
Error creating machine: Maximum number of retries (60) exceeded
You will want to check the provider to make sure the machine and associated resources were properly removed.

Dang, should work.  I'll try / run by our in house networking gurus and get back to you.

Hm, OK, so I know why this happens, but not 100% sure how to fix it.  Basically, the first time docker comes up it creates docker0 with the default bip, but then we try to restart it with the new parameters and it doesn't see the network the right way.  You have to delete the default bridge and restart Docker to get it to work.

Hi,
I also got this issue,
I ran this command
<docker-machine create docker -d virtualbox --engine-opt bip=<IP_ADDRESS>/16>

One walk around is to patch the machine/libmachine/provision/utils.go
Add the following lines after Line 169
	// Tempory fix
	if _, err = p.SSHCommand("ip link delete docker0"); err != nil {
		return err
	}

It will remove the docker0 bridge after set the docker engine options. And when docker daemon is started, it will create a new docker0 bridge based on the  "--bip" settings.
It works on Ubuntu and should work on RHEL/CentOS. But I cannot make it general for all the supported OS in the provisioners.
Thanks

#1662 is a dupe of this (with some additional detail)

interesting strategy @danverdino .  I wonder if it would cause any other issues.  I'm in favor if it seems safe.
@mavenugo @mrjana Do you have any input on this thread?  I'm wondering if @danverdino solution seems reasonable.

Deleting (and having docker recreate) the docker0 interface can be avoided if you ensure the EXTRA_ARGS are populated with all the engine options before starting up for the first time. I haven't dug in, but ensuring /var/lib/boot2docker/profile is present before ever launching docker makes the bridge interface come up with the right IP.

Was this fixed? I haven't seen an update that has better behavior, yet :-(

I'm also running into this.  Any ETA on a fix?

+1

I am running docker machine 0.6.0 and it appears to still be an issue.

@puleos Can you open another issue and post --debug output please?  Thanks!

@nathanleclaire I have the same problem as OP, unable to set docker0 IP when creating a new machine. I have created a new issue with debug output as per your request.

As a workaround I was able to add bip and fixed-cidr to the boot2docker configuration like this:
docker-machine ssh
vi /var/lib/boot2docker/profile

and modified EXTRA_ARGS like this:
EXTRA_ARGS='
--label provider=vmwarefusion
--bip=<IP_ADDRESS>/24
--fixed-cidr=<IP_ADDRESS>/25
'

As shown above:
docker-machine create docker -d virtualbox --engine-opt bip=<IP_ADDRESS>/16
Still fails to create the VM with docker-machine 0.9.0


feat: deploy portal in abax-vwfs, add abaxvwfs database in abax minuba database instance

Following a few changes in the abax-vwfs project, we will now be deploying an image called portal, not ui.
TODO

[ ] Identify which secrets we must provide
[ ] Add secrets to config
[ ] Set up database

status:
Diagnostics:
    pulumi:pulumi:Stack (branches-main-main):
      error: Missing required configuration variable 'abax-vwfs:db-host'
      	please set a value using the command `pulumi config set abax-vwfs:db-host <value>`
  Outputs:
    - githubToken: [secret]
      at Object.createCommandError (/home/runner/work/_actions/pulumi/actions/v4/webpack:/pulumi-github-action/node_modules/@pulumi/pulumi/automation/errors.js:77:1)

Superceded by #359


GH-3412: Fix costs for some system entry points

Closes #3412
This PR fixes activate_bid to actually charge for the correct cost from the cost table - currently it was charging for read_era_id but coincidentally the cost is currently the same.
This also adds separate entries for the redelegate entry point that was charging for undelegate, and mint_into_existing_purse that charged for mint for the same reasons.

bors r+


Cant get it working with 'socket.io-redis'

Hi @sibartlett ,
I'm using PM2 with -i max to run my app as cluster but the initial handshake fails. There is a solution which is http://socket.io/docs/using-multiple-nodes/ by using 'socket.io-redis'
var io = require('socket.io')(3000);
var redis = require('socket.io-redis');
io.adapter(redis({ host: 'localhost', port: 6379 }));

Just tried to do something like this on  server.register callback:
var io = server.plugins['hapi-io'].io;
var redis = require('socket.io-redis');
io.adapter(redis({ host: 'localhost', port: 6379 }));

But didn't work. Any suggestion?

I have the same problem, I use a cluster of hapi server and I need redis to redispatch to the corect server/client the events.

You need to add the adapter to the plugin config, something like the this:
import HapiIO from 'hapi-io';
import ioRedis from 'socket.io-redis';
...
{
      register: HapiIO,
      options: {
        socketio: {
          adapter: ioRedis({
            host: process.env.REDIS_HOST,
            port: process.env.REDIS_PORT,
          }),
        },
      },
    },
...


Is training support when using device_map and/or low_cpu_mem_usage

In the documentation page (such as this and that), it is stated that device_map and low_cpu_mem_usage can only be used for inference, not training. The reason seems to be that these methods wrap around a couple torch.no_grad behind the scenes. Presumably this means gradients won't be available.
However, I noticed that, in practice, these methods still provide gradients as long as the model is fully on (maybe multiple) GPUs. Notably, the hooks have the attribute no_grad that was set to False by default and never set to True in practice.
Am I correct in that as long as the models live fully on (one or many) GPUs, device_map and/or low_cpu_mem_usage in fact do support training (i.e., getting gradients)? (They might not be performant, but works.) Thanks in advance for the help!
A similar issue has been mentioned in the forum but the answer does not seem particularly satisfying to me.

Training is supported if your model is on multiple GPUs yes. It is only the offload to CPU/disk that ends up with training not supported.

I'll be writing some docs on this soon, great question @HanGuo97

Got it -- thanks both for the clarification!


cmd/go: suggestion to fail to build, or emit warning, on unused build tags

What version of Go are you using (go version)?

$ go version
go version go1.16.3 darwin/arm64

What did you expect to see?
I added a build tag (specifically go build -tags lambda.norpc), which is a build tag honored by https://github.com/aws/aws-lambda-go
However, it just so happened that the build tag was introduced in a version later than the version I had pinned. My go mod had v1.13, the build tag was introduced in v1.18
This was incredibly difficult to discover, therefor I am suggesting that passing a build tag should produce an error if that build tag is not found anywhere. At least a warning should be displayed, if not failing the build entirely.

I think this would be fairly difficult in practice.  For example there is a standard library build tag osusergo, used only by the "os/user" package.  Some people routinely build with go build -tags=osusergo.  They don't want the build to fail just because the specific program they happen to be building doesn't import the "os/user" package.

@ianlancetaylor Good to know! Perhaps a list of known common build tags could be omitted from the check? Normally I feel something like this would be in go vet but as it's a build argument, there's no way to include it there.
Conversely, if the tags are not found during normal compilation, a scan could be performed of all relevant source codes - all of stdlib, all of vendor - and if it is still not found that could be cause for a build failure? The problem you mentioned would still exist but in much rarer cases, perhaps rare enough that it is unlikely to have happened.

Doesn't seem to be feasible.


Grammarly corrections

Grammarly corrections
Use "number" rather than "amount" when discussing items that can be counted 🧮

The difference between "number" and "amount"

It throws off my cascading comments 😭


About An Ensemble Model

Hi, thank you for releasing a code for the paper.
I have a question on the implementation.
It is written in the paper that you have obtained the best performance on something-something from an ensemble of networks with {16, 20, 24, 32} number of frames.
I wonder how was this ensemble implemented?
Did you train one single model (e.g. taking 16 frames as an input) and test by making that model to take various number of frames {16, 20, 24, 32} (it could be possible because the model performs global average pooling at the end of 3DConvNet so temporal dimension goes away),
or
train multiple models with different number of frames (\e.g. one model takes 16 frames on both train/test, another model takes 20 frames on both train/test, .. , the other takes 32 frames on both train/test)?
Thank you

Hi @pplntech ,
Actually, we trained several variations and then for the ensemble we fused the scores. But also it's possible to use the same network for a different number of frames. Although it's possible, there will be performance drop due to the temporal resolution of different variations.


Question: What styling controls the presentation page shrinking effect in the default app?

Hi,
A small question to help a noob understand things a bit better.
On the default app, in android, when I move back to the PresentationScreen, from one of the sub pages, (not the the menu drawer), the contents of the presentation screen seem to do a grow/shrink effect.  It also has a white padding/border around it as it shrinks/grows.
I suspect there is a style somewhere controlling this, but I can't find it, or it isn't where I think it is.

can you make a small video showing this effect, it doesn't come to mind.

Here's a quick demo I made via my Nexus phone (which is a higher version than marshmallow)
https://youtu.be/6x1PPlQ19FQ

Ah yes!  I'm familiar with that.  I think that's either part of the transitions in React Native, OR that comes from RNRF.   I'm pretty sure it's configurable.
@skellock - do you know?

Oh ya... that's the default transition in Navigation Experimental (inside RNRF).  They do a 95% scaling which will cause that silly white background.
I'm not entirely sure where to go to change it, but I know that Navigation Experimental is customizable.
Hope that helps.

You are indeed correct.  There is a fadeInScene function in node_modules/react-native-router-flux/src/DefaultRenderer.js which has a 0.95 scaling.
That function gets called by the direction interpolator.  How I override this I've no clue.

You can pass your own animation style with your own interpolation function:
https://github.com/aksonov/react-native-router-flux/blob/38260d7812431dfc39195391c11ff14924b989d7/docs/API_CONFIGURATION.md


Look into integrating reanimate

The reanimate library is pretty exciting, and I'd love to provide an easier environment to experiment with it.  Currently, it must be run as a binary, which either renders to a gif or similar format, or serves an interpreted file via HTTP.  I want to look into whether it's easy to run reanimate via GHCJS and render into the local document, instead.  If that were possible, I would add reanimate to the list of pre-installed dependencies for CodeWorld's native Haskell mode, so it could be used without locally installed tooling.
https://reanimate.github.io/

@Lemmih in case you have thoughts.

This would be great. Is it easy to compile Haskell libraries to Javascript? What are some common pitfalls?

I guess the main open question is this: if you didn't have the filesystem or network at all, could I still use reanimate to build an animation, and then just ask it for the SVG at a given time?  I can add SVG to an HTML document without too much difficulty (for example, the diagrams example at https://code.world/haskell#PfSPvyMNOP1r_mU0pY3wnZw -- there may be a better way to do it, but that one works)
Images are definitely a problem.  Since you don't have access to the filesystem, you can't really load them that way.  Any images would need to be referenced by URL instead of a file path.
I will start by trying to just build reanimate for GHCJS, and see if that succeeds.

Okay, the first problem I ran into is that reanimate depends on chiphunk, which in turn depends on a C library.  As long as that's the case, building with GHCJS won't be possible.

I can move chuphunk to a separate package. I'm also using a C library for earclipping. Guess that'll have to be moved to a separate package as well. Then the core 'reanimate' library wouldn't use any C code.
Can I depend on 'hmatrix'? Does blas and lapack run as javascript? What about 'fsnotify'? Is it OK to depend on that library as long as it isn't actually used?

hmatrix will not build with GHCJS. I know that one right off, because it's why I couldn't build the hamilton package.  fsnotify is fine, as you say, so long as it isn't actually used.

Ok, so 'chiphunk' and 'hmatrix' dependencies have to be moved to a separate package.
Is it possible to use Javascript libraries from Haskell? I'd like to use LaTeX.js and earcut.js

Hm, maybe MathJax instead of LaTeX.js

It's definitely possible to use GHCJS to build bindings for JavaScript libraries.  I guess the completely self-contained way would be to (a) use the ghcjs-dom package to add a script element to the document, referencing the library on a CDN somewhere, (b) use an onload handler to wait for the script load to finish, and then (c) use JavaScriptFFI to call into the JavaScript library once it's loaded.
It sounds like this is becoming a pretty major change for reanimate.  If you choose to do it, that's great, but it's way more than I expected.

Is there an easy way of installing ghcjs and testing whether reanimate works with it? Looking at your install script, it seems fairly involved.

Is there an easy way of installing ghcjs

That is the golden question, isn't it?  I am not aware of an easy way of installing GHCJS.  But assuming you have a relatively recent cabal and ghc installed, you can probably skip most of the steps from my install script, and do this:

Clone GHCJS and change to that directory.
./utils/makePackages.sh
cabal v2-install .
ghcjs-boot

You may run into https://github.com/ghcjs/ghcjs/issues/740 and need to fix the symlink for ghcjs-boot.  But maybe that bug is fixed in HEAD.  I don't know.  The install will likely take an hour or two.

Sigh, I'm using double-conversion to pretty-print doubles and that library uses C. This is not gonna be easy.

I couldn't figure out how to install GHCJS but I made Reanimate work with Asterius.
The reanimate-svg package still needs to know whether to use C code or if it should resort to a slower, pure-haskell implementation. Do you know if there's a way to detect if a package is being compiled by GHCJS?

Okay, if it works with Asterius, then I think that's a good sign that GHCJS is likely to work, as well.
To detect if it's being compiled by GHCJS, you can do one of the following:

In Cabal: if impl(ghcjs).  See https://github.com/google/codeworld/blob/e2029cefde1a5982d60fb15ec25bf47264846bf6/codeworld-api/codeworld-api.cabal#L70 for an example.
In Haskell with CPP: #ifdef ghcjs_HOST_OS. See https://github.com/google/codeworld/blob/e2029cefde1a5982d60fb15ec25bf47264846bf6/codeworld-api/src/CodeWorld/Driver.hs#L75 for an example.


Enabling hal.allocator.wrap.byte_buffer to actually wrap.

On CPU this removes the alloc+copy of rodata. GPU backends still perform
the duplication but could be improved in the future to support memory
import/direct host memory access/etc.
On BERT CPU this drops our memory consumption 93.5MB and (on my desktop) drops startup time 15-20ms and shutdown time by ~5ms.

Darn, flatcc/flatbuffers isn't aligning things right - the rodata vectors have no alignment applied. Need to figure out a workaround.

Darn, flatcc/flatbuffers isn't aligning things right - the rodata vectors have no alignment applied. Need to figure out a workaround.

:/ LMK when resolved and I can stamp

Cool - looks like this found a legit issue. Because we aren't tracking buffer access in the compiler yet we emit an in-place operation onto a constant buffer that is passed through block arguments, which then at runtime now that the buffer is read-only correctly throws a PERMISSION_DENIED error here:
https://github.com/google/iree/blob/55a3af40a3c77d46826277f571c96bf4903dd651/iree/hal/buffer.c#L145-L154
Hooray for validation, boo for having to fix this for real now too :P

I'm going to try to work around this for now by preventing reuse of stream operands entirely until #5492 can be done.

Ugh no workaround is going to work for this - needs to be actually fixed in #5492 :( I'll split out the other commits for submission now as they are useful regardless.


[AzureMonitorDistro] Update Readme with advanced configuration

API change check
API changes are not detected in this pull request.


Prepare release v2.6.0

This PR makes a few changes to prepare the release of a new version v2.6.0, which includes the new implementation for Google Analytics gtag.
Changes

Explain the three Google Analytics options
Update change log
Bump version

Alright,

We clarified that the GA setup instructions are correct (i.e. the script tags actually go into <head>...</head>, as weird as it seems).
I updated the change log and bumped the version number (minor component).

I believe, we're ready to release the baby. @jcassee?

On thing is missing: We're not testing against the latest supported Python+Django version combinations. This is probably worth being updated. It would also officially drop Python 2 support.

This is now ready for merging, I guess. @jcassee, as soon as you accept the review we can merge.


Add binary implementation

See ramsey/uuid for a similar implementation.

Hello,
any news for this?
Thanks.

Nope. As I am using Postgres as datastore, there is no need for me to have a binary implementation. So be my guest to send a PR for this if you need it yourself.


fix problem with loop optimization

Cherry pick the fix for the loop optimization bug from Microsoft/visualfsharp#756
It would be best not to apply this until the build and fix has been fully validated though

Merged despite the failure - the problem with the failing CI is recorded at https://github.com/fsharp/fsharp/issues/528


KOGITO-8277: FunctionRef.arguments could be String or JsObject

(cherry picked from commit 040f143a933c54d129575e21e9952515dde3dfe0)

Hey @LuboTerifaj
Can you please review this cherry-pick ?
Thanks in advance!


Create provider specific NuGet packages for async method support

In .NET 8.0, The System.Data.Entity namespace was removed from the core framework and moved to the Microsoft.EntityFrameworkCore package. As such, all async method retrievals, such as ToListAsync(), CountAsync() and other aggregate methods are no longer available. Additionally, I think we can remove the reference to LinqKit as I don't think the Expandable() function needs to be used any longer. But it will be needed for backwards framework support (less than .net6).
The primary use of the new NuGet packages for each provider is so we can enable async support. Since each engine may have some caveats down the road, it is probably a good idea to have in place for provider-specific changes that may introduce themselves later.
This would mean we would have:

ServiceQuery
ServiceQuery.AzureDataTables
ServiceQuery.EntityFrameworkCore
ServiceQuery.MongoDb

Adding async support not needed. Use the System.Linq.Async package


Feat: Encrypting coordinates

Description:

Encrypting users coordinates to make sure that they are transferring securely with base64 conversion, I had to install a package called base64-react-native due to react native does not compatible with buffer node module.
Linked issues:

Feat: 274
How to test:

git pull && git checkout Feat/274-encypting-coordinates
Report yourself as positive covid user and change your location
The app should send your location encrypted

Note: Talk to @epolanco to confirm that coordinates has been sent

before to implement I talked to @epolanco about it, he said is just to try, if we see that all works correctly it will be change it


Incorrect hightlight of CSS pseudo classes in saved SCSS files.

Incorrect hightlight of pseudo selectors in SCSS files.

VSCode Version:
Version 1.13.0 (1.13.0)
OS Version:
macOS Sierra 10.12.5

Steps to Reproduce:

Create new file
Set language to SCSS
Enter the following code:

.bc-player-BkxEu_AGb_default.vjs-mouse {
    font-family: Helvetica;

    &:hover:not(.vjs-native),
    &.vjs-native.test-show-controls {
        &::before {
            display: none;
        }
    }
}

Save the file with any name and .scss extension.

Result:

Expected result:
Correct highlight as it is before file is saved.

That's what I see in the latest build before and after save.
Maybe you have multiple extensions that provide grammars for scss?


Problems with Keras/Tensorflow backend

Hi,
when trying to run your example, I get a TypeError using the Tensorflow backend.
./run_cem.py --env=Acrobot-v1 --agent=modular_rl.agentzoo.DeterministicAgent  --n_iter=2
TypeError: Input 'b' of 'MatMul' Op has type float32_ref that does not match type float64 of argument 'a'.
Do you have an idea how to fix this?
I run everything in a virtual python environment.
Find attached the output of pip list and the error output.
pip_list.txt
log.txt
In my Keras.json I use the default settings: floatx:"float32", backend: "tensorflow"
I am new to tensorflow and to openai, so it might also just be because of that.
Thanks,
Andreas

Hi,
it seems to be a problem with the GPU/CUDA 7.5, I was trying to run code on a 980 and it didn't work. Using a TitanX and CUDA 8.0 it works finally.


"Components" & "Theming" Cards without links to documentation

Links to components and theming documentation part are missed here at the end of the Getting Started page. Like "Ionic Native" card has.

Hmm, they're all links for me. And they're links in the source as well
https://github.com/driftyco/ionic-site/blob/master/getting-started/index.html#L123-L144
Can you clear your browser cache?

True!


Fork Request for Win9x and WinXP

Hey there,
I am using ddrawcompat for many years now and I deeply appreciate the work you are putting into this project.
One feature that caught my eye is the emulation of 8bit palletized textures, used in Final Fantasy 7 and 8. Enabling it enables us to play those games with DX hardware renderer in Win10. Without it, we are stuck with software renderer.
In the retro scene, palettized textures are discussed a lot, although there are not too many games affected. However, the Final Fantasy series are still very popular ones.
Is it possible to create a fork of ddrawcompat for Win9x and WinXp, but only for the palletized textures feature / conversion?
Many of us retro gamers want to play those games on retro hardware, but the 8 bit palletized textures are not supported on some newer Ati and Nvidia cards. Voodoos are expensive these days.
Thanks in advance! And keep up the great work!

Is it possible? Sure, anyone can fork it and do whatever they want with it. Is it possible to "just" delete 95% of the code and expect it to work on Win9x/XP with palettized texture support? No. you'd definitely have to rewrite parts of it. For example, converting palettized textures to 32-bit textures happens in shaders through WDDM driver hooks, which is not available on anything older than Vista, so it would have to be reimplemented on the CPU. Moreover, very old GPUs might not support 32-bit textures at all (I think the Voodoos didn't, for example). And from what I recall, FF8 uses combined 8 bit alpha + 8 bit palette textures, so it may not be possible to emulate without 32-bit texture support. It may work with loss of precision if something like A4R4G4B4 is supported. You'd likely have to add support for different formats on different GPUs, depending on the available capabilities.
If you're asking if I'll do it, then no. I have neither the time, nor the interest in supporting old hardware and OSes.

Thank you for the detailed background of the 8bit texture conversion! As you maybe notice, I lack knowlege of programming. For me, the work you do is pure magic! I also would never ask anyone to do it, if it is extensive and time consuming. It is probably not worth the effort. And if 32-bit texture support is a must have, than we would be limited the other way around.
I admire the work you have put in ddrawcompat so far, considering the complexity of the earlier Direct Draw and Direct 3D implementations in games. Back in the day, you would need a certain graphic adapter with a certain driver to be able to run some stuff. The fiddeling around with hardware and drivers was an essntial pain we had to suffer back in the day in the time of Win 95/98.
Interestingly, the Ati Rage Series had some palletized texture "emulation" in the driver options as well as table fog, which actually works quite good. I think, that S3 took a smilar approach in their Savage series. Maybe I will look into this more deeply.


Multiple Queue Connections, Amazon SQS, Laravel Cannot Push or Read to Secondary Non-Default Connection

I have the following Queue config:
    'default' => 'sqs',

    'connections' => array(

        'high' => array(
            'driver' => 'sqs',
            'key'    => 'xxx',
            'secret' => 'xxx',
            'queue'  => 'https://sqs.us-east-1.amazonaws.com/xxx/xxxx',
            'region' => 'us-east-1',

        ),

        'sqs' => array(
            'driver' => 'sqs',
            'key'    => 'xxx',
            'secret' => 'xxx',
            'queue'  => 'https://sqs.us-east-1.amazonaws.com/yyy/yyyy',
            'region' => 'us-east-1',
        ),
    ),

This works if I am pushing with:
Queue::push('MethodName');

And listening (via supervisord) with this:
php artisan queue:listen

I have tested both connections individually and they do connect (push/read) with SQS fine.
However, when I try listening with:
php artisan queue:listen --queue=high,sqs

I get this error repeatedly in my logs when I run the listener:
Aws\Sqs\Exception\SqsException: AWS Error Type: client, AWS Error Message:
The address high is not valid for this endpoint., User-Agent: aws-sdk-php2/2.6.5 Guzzle/3.9.1 curl/7.26.0 PHP/5.5.12-1~dotdeb.1`

So, AWS is actually seeing my connection alias named high it seems?
Also, when I try pushing to the 'high' connection with:
Queue::push('MethodName', $params, 'high');

I get the same error in my logs and the connection fails.
I have tried changing the connection names, ex high,low. I have also tried changing the queue priority order to sqs,high with the same problem.
If queue priority cannot be used I would settle for simply for having some workers dedicated to the 'high' queue and some to the 'sqs' queue. However I can't seem to find ANY way to target both, specific SQS queues with any combination of configuration.
My guess is something buggy is going on.

You saved my life!!!! For all you guys having the same issue, this is the right solution coz it works for me!

2 years later, this is still a HUGE help! Please note that - at least in my case - the quotation marks around the queue path are essential. This should really be in the documentation. Thank you, @phirschybar ! :-)

2018 ===> Still relevant. thank you @phirschybar

No.
The correct way is to define a prefix key in the array.
'driver' => 'sqs',
'key'    => 'your-aws-key',
'secret' => 'your-aws-secret',
'queue'  => 'your-default-queue-name',
'prefix'  => 'https://sqs.us-east-1.amazonaws.com/your-account-id', // region is in there, if you are not "us-east-1" has to be changed here, too
'region' => 'us-east-1',

Laravel will then build the correct queue url.


Remove Milestones filter if there are no milestones

When there are no milestones the filter in issues and PRs listing page in a repo still have a filter for milestones which is not useful at all. There's just one option which just shows all issues/PRs with no milestones which are basically every issue/PR.
I think this would reduce clutter for projects not using milestones and not change anything if you're using milestones.

👍

I took a stab at this, but the milestone list isn't loaded until you attempt to filter on it. Is there another way we can determine if they're using milestones outside of what's in the list and if not, do we want to call the list all the time just to remove it?

@busches Use MutationObserver.

@sindresorhus that seems clunky though.

MutationObserver is pretty fast, so not sure it would even be visible before it was removed. Any other suggestions?

Ok, I misunderstood how it worked.

Fetch and cache Milestones count at earlier convenience
Use it
Make it expire after a day (expiration just means storing the retrieval date, it doesn't need to be cleaned up since it's just a handful of bytes: `{'sindresorhus/refined-github': [0,<PHONE_NUMBER>424]})

This requires a fetch to the API to check if a project has any Milestones. Is it worth it?


thermald: disable network access

Use systemd PrivateNetwork feature to prevent thermald daemon to have
network capabilities.
Motivation for this change
systemd has a feature to prevent a service to use network, thermald doesn't require network so disable it.
If people are okay with this one, I'm going to review more systemd units to disable network when it's not required, and also check if we can harden more their defaults without fallout.
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[X] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/hardening-systemd-services/17147/1

Are you able to file a PR upstream to introduce this change as well? Ideally we could replace our systemd.services.thermald definition with systemd.packages = [ pkgs.thermald ]; as well. Are you familiar with using upstream service units in NixOS?
What do you think?

Of course, it would be a lot better to have this upstreamed, but given the amount of services that could be hardened, this will be very complicated to have all upstream to agree with changes in a reasonable time.
I think we need to discuss this topic a bit on the discourse because this is important to know what we want and then how to implement it (case by case, opt-in, opt-out, upstream only).

Quite a few upstream developers won't even accept systemd units so it isn't a hard policy... just something that is nice to do when upstream is willing to work with distros and we have the time/motivation to do so.

Love the effort, feel free to tag me in reviews of future PRs like this.
Also, don't be shy about making a larger PR bundling these changes up :)


Consider using stdout in bin/build instead of launch.toml

As an alternative to writing a launch.toml, the bin/build script could be considered a proper program in the Unix sense: it writes status info (such as all build progress info) to stderr, and its program output, which more or less is the launch info, to stdout.
It's trivial to simply send everything that's written by programs or echo to stderr at the beginning of a script:
exec 1>&2

That way, buildpack authors must not pay special attention to e.g. programs they're calling misbehaving by printing informational output to stdout instead of stderr.
Same then for bin/develop, which would no longer have to write develop.toml.
/cc @jkutner

@dzuelke exec 1>&2 works well for Bash, but we expect buildpacks to be written in other languages too. I'm so sure that redirection is as easy or reliable. Any solution would need to be 100% reliable because any cruft in stderr would result in invalid TOML, and fail a build.

In addition, we've seen with the previous generation of buildpacks, that many authors and others who interacted with buildpacks considered the use of stdout for conveying information problematic in practice.  We've seen requests to move further away from using stdout, rather than closer, so we now have input in both directions.

Sorry, I was sloppy with my terminology.  What I mean to say is:
In addition, we've seen with the previous generation of buildpacks, that many authors and others who interacted with buildpacks considered the use of stdin/stdout for conveying programmatic input/output problematic in practice. We've seen requests to move further away from using stdin/stdout for programmatic input/output, rather than closer, so we now have design requests in both directions.

Appreciate the feedback @dzuelke! Definitely want to make sure these interfaces are reasonable.

I'm saying that stdout shouldn't be used for informational output, but stderr, which is standard Unix practice, and which is what almost all programs do. It's the reason you can do curl foo | bar: data (in the case of bin/build that'd be the TOML output) goes to stdout, and status/info/error/debug messaging (such as curl's progress bar) to stderr.

I definitely agree with this practice for command line utilities on UNIX systems. That said, I'm not convinced that we should do this for /bin/build.
Here are some disadvantages I can think of:

The primary responsibility of /bin/build is to execute other CLI utilities. Preserving the separation of stdout and stderr from these utilities seems desirable on cloud platforms, where logs sent to stderr are sometimes formatted differently (e.g.,  bold or red) compared to logs sent to stdout. In practice, many language tools (e.g., npm, gem) send logs to both stdout and stderr so they can split informational logs from diagnostic logs. Shouldn't we preserve that split?
The entire output of /bin/build cannot be sent to stdout, just the buildpack metadata. Sending just the contents of launch.toml to stdout would split the output between stdout and disk (launch + cache layers). This seems less elegant to me than having just the launch and cache directories be the output.
We would prevent buildpack authors from using libraries that are hardcoded to output to stdout or output to stdout by accident. Such libraries could even silently corrupt the metadata. (Note: This can be completely avoided for languages on Linux that let you make the dup2 syscall directly, like C or Go.)
We would make writing a buildpack in a less common language difficult for users who are not familiar with output redirection.

Do those reasons make sense to you? What benefits do you see for sending the metadata to stdout?

I guess :) Thanks folks! It was just a minor nitpick really.

@dzuelke https://github.com/buildpack/spec/issues/24 makes the build/detect interfaces match, so at least they are consistent 😄


Show Cesium3DTileset wire frame

We sometimes want to show the wire frame (with no texture) for a 3D tileset (ideally on top of the original model/textures). Is that a feature that will/could be added?

Yes, this would be a welcomed contribution.  To get started, see Cesium3DTileset.debugColorizeTiles and Model.debugWireframe.

Having the model wireframe show seems relatively straightforward, but it I haven't found any way of showing the wireframe and the textured model at the same time (except perhaps for loading the tiles twice, once with debugWireframe and once normally).
Is there something I have overlooked, or does Cesium not currently support this unless modifying model shader code?

Is there something I have overlooked, or does Cesium not currently support this unless modifying model shader code?

Right, Cesium doesn't currently support this.
This could be of interest to you: https://github.com/virtualglobebook/OpenGlobe/tree/master/Source/Scene/Renderables/Wireframe (it uses a geometry shader so it would need to be adapted for WebGL).

Thanks, will keep that in mind. (I'll probably not be able to dig into this problem soon though -- perhaps a bit later.)

@austinEng for this one it's fine to just draw the wireframe itself, not both the solid and wireframe at the same time.

Fixed in #4844

Does cesium support to show the wireframe and the textured model at the same time now?


OAK-10921 : fixed race condition where fullGC database variables gets…

… overridden if they are reset by external components

Started rereviewing and must admit that it's perhaps not immediately obvious why we use update in one case and set in the other.
Then I noticed that the jira as well doesn't much go into details as to what exactly the race condition is. The PR does :

(fixed) race condition where fullGC database variables gets overridden if they are reset by external components

What about adding a comment to the jira that explains what goes wrong when "the race condition" happens? I guess it is : when you do a reset using oak-run while an oak instance is executing a regular fullGC (not dry run), then the reset would be ignored? And at the same time perhaps why dry run is different from wet run in this regard? Just might make code reading a bit easier.
PS: also noticed that due to the force-push I can't review the diff between my last review and this one - so can't follow what has changed since.

Related to that, currently resetGCFromOakRunWhileRunning and resetFullGCFromOakRunWhileRunning test doing a reset (in the 2 variants) against a wet fullGC run. Would having a a combination with a dry fullGC run (and the 2 reset variants) be good to have as well?
Perhaps in combination with explaining why dry and wet are different when they race with the different resets, could make the code a bit easier to understand.

The flow is like this:

Full GC is running normally.

We reset the variables externally let's say via oak-run.
Oak run removes the variables fullGCTimeStamp & fullGCId from the database.
Once the normal cycle of fullGC finishes, it will again add/update those variables, which would nullify the effect of reset.

To fix this, we need to replace the updateAndCreate API (to update full GC variables after each full GC cycle) with findAndModify, this will ensure that in case they are already removed, they won't get added again.
Once the new cycle of GC starts, it will add them again with values of the oldest modified document & its ID.
Note: This race condition won't come in case of dry run because dry run is not supported in normal flow. We can dry run with only the oak run command.


Kevin/authorize redirect

Fixes Issue #253

Updated AspNetCore dependencies to use 1.10-* packages for consistency. (Advised from the product team)
The issue was a package conflict with the current 1.1.0-* Authentication package and a 1.0.0 version of IISIntegration. "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-preview1-final" resolves this.
Startup.cs authentication and identity flow is correct.

To Test:

Rebuild project with updated project.json
Build project
Observe the beautiful Login page that loads on your screen.
Double check you are hitting Home Controller by navigating to your root and ensure you are redirected again.

The project now loads to the login screen as expected
:shipit:

@adamtuliper Will Merge PR  and close Issue #253 once 0.5.0 release build is made.
@jcocchi Thanks for testing.

@KSLHacks  Go ahead and merge/close. All good.


Fix WHO CM bug

Fixes https://github.com/mapping-commons/sssom-py/issues/260

@nicolevasilevsky this can be merged


improve error handling handleIntermediateTimerCatchEvent()

Propagate errors, so that users/developers can detect/handle errors.
See todo:
https://github.com/nitram509/lib-bpmn-engine/blob/0c53af867c85a437e9561eecb66cc9b87df7064c/pkg/bpmn_engine/engine_timer.go#L36

Done, with 0c72655ffc6f18baf6336955c556fd8505091857